{
"tiddlers": {
"$:/Acknowledgements": {
"title": "$:/Acknowledgements",
"type": "text/vnd.tiddlywiki",
"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 © Jeremy Ruston 2004-2007\nCopyright © UnaMesa Association 2007-2016\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice, this\nlist of conditions and the following disclaimer in the documentation and/or other\nmaterials provided with the distribution.\n\nNeither the name of the UnaMesa Association nor the names of its contributors may be\nused to endorse or promote products derived from this software without specific\nprior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\nSHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\nBUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\nANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGE.\n"
},
"$:/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/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/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/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/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=\"8\"></rect>\n <rect x=\"32\" y=\"52\" width=\"64\" height=\"8\" rx=\"8\"></rect>\n <rect x=\"32\" y=\"68\" width=\"64\" height=\"8\" rx=\"8\"></rect>\n <rect x=\"32\" y=\"84\" width=\"64\" height=\"8\" rx=\"8\"></rect>\n <rect x=\"32\" y=\"100\" width=\"64\" height=\"8\" rx=\"8\"></rect>\n <rect x=\"32\" y=\"20\" width=\"40\" height=\"8\" rx=\"8\"></rect>\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/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 </g>\n</svg>"
},
"$:/core/images/left-arrow": {
"created": "20150315234410875",
"modified": "20150315235324760",
"tags": "$:/tags/Image",
"title": "$:/core/images/left-arrow",
"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/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/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-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/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/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/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/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/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/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/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/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/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": {
"created": "20150316000544368",
"modified": "20150316000831867",
"tags": "$:/tags/Image",
"title": "$:/core/images/up-arrow",
"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/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/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/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/Theme/Caption": {
"title": "$:/language/Buttons/Theme/Caption",
"text": "theme"
},
"$:/language/Buttons/Theme/Hint": {
"title": "$:/language/Buttons/Theme/Hint",
"text": "Choose the display theme"
},
"$:/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/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/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 individual wiki parser rules. Take care as disabling some parser rules can prevent ~TiddlyWiki functioning correctly (you can restore normal operation with [[safe mode|http://tiddlywiki.com/#SafeMode]] )"
},
"$:/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/Hint": {
"title": "$:/language/ControlPanel/Plugins/Add/Hint",
"text": "Install plugins from the official library"
},
"$:/language/ControlPanel/Plugins/Add/Caption": {
"title": "$:/language/ControlPanel/Plugins/Add/Caption",
"text": "Get more plugins"
},
"$:/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": {
"title": "$:/language/ControlPanel/Plugins/Install",
"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/OpenPluginLibrary": {
"title": "$:/language/ControlPanel/Plugins/OpenPluginLibrary",
"text": "open 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": {
"title": "$:/language/ControlPanel/Plugins/Reinstall",
"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/Heading": {
"title": "$:/language/ControlPanel/Saving/Heading",
"text": "Saving"
},
"$:/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/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": "Automatically save changes during editing"
},
"$:/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/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/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"
},
"$:/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"
},
"$:/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"
},
"$:/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/animation": {
"title": "$:/language/Docs/ModuleTypes/animation",
"text": "Animations that may be used with the RevealWidget."
},
"$:/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/isfilteroperator": {
"title": "$:/language/Docs/ModuleTypes/isfilteroperator",
"text": "Operands for the ''is'' filter operator."
},
"$:/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/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 is an external tiddler stored outside of the main TiddlyWiki file. You can edit the tags and fields but cannot directly edit the content itself"
},
"$:/language/EditTemplate/Body/Hint": {
"title": "$:/language/EditTemplate/Body/Hint",
"text": "Use [[wiki text|http://tiddlywiki.com/static/WikiText.html]] to add formatting, images, and dynamic features"
},
"$:/language/EditTemplate/Body/Placeholder": {
"title": "$:/language/EditTemplate/Body/Placeholder",
"text": "Type the text for this tiddler"
},
"$:/language/EditTemplate/Body/Preview/Button/Hide": {
"title": "$:/language/EditTemplate/Body/Preview/Button/Hide",
"text": "hide preview"
},
"$:/language/EditTemplate/Body/Preview/Button/Show": {
"title": "$:/language/EditTemplate/Body/Preview/Button/Show",
"text": "show preview"
},
"$:/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/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/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 http://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-text 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/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/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 2.x.x TiddlyWiki files (`.html`), `.tiddler`, `.tid`, `.json` or other files\n\n```\n--load <filepath>\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/rendertiddler": {
"title": "$:/language/Help/rendertiddler",
"description": "Render an individual tiddler as a specified ContentType",
"text": "Render an individual tiddler as a specified ContentType, defaulting to `text/html` and save it to the specified filename. Optionally a template 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\n```\n--rendertiddler <title> <filename> [<type>] [<template>]\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/rendertiddlers": {
"title": "$:/language/Help/rendertiddlers",
"description": "Render tiddlers matching a filter to a specified ContentType",
"text": "Render 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/savetiddler": {
"title": "$:/language/Help/savetiddler",
"description": "Saves a raw tiddler to a file",
"text": "Saves 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": "Saves 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": {
"title": "$:/language/Import/Imported",
"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|http://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 http://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/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/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/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>Loading external text from ''<$text text={{!!_canonical_uri}}/>''</p><p>If this message doesn't disappear you may be using a browser that doesn't support external text in this configuration. See http://tiddlywiki.com/#ExternalText</p>"
},
"$:/language/MissingTiddler/Hint": {
"title": "$:/language/MissingTiddler/Hint",
"text": "Missing tiddler \"<$text text=<<currentTiddler>>/>\" - click {{$:/core/images/edit-button}} to create"
},
"$:/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/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/Modals/Download": {
"title": "$:/language/Modals/Download",
"type": "text/vnd.tiddlywiki",
"subtitle": "Download changes",
"footer": "<$button message=\"tm-close-tiddler\">Close</$button>",
"help": "http://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",
"type": "text/vnd.tiddlywiki",
"subtitle": "Save your work",
"footer": "<$button message=\"tm-close-tiddler\">Close</$button>",
"help": "http://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/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|http://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/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/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/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"
},
"$:/language/Docs/Types/application/json": {
"title": "$:/language/Docs/Types/application/json",
"description": "JSON data",
"name": "application/json",
"group": "Developer"
},
"$:/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"
},
"$:/language/Docs/Types/image/gif": {
"title": "$:/language/Docs/Types/image/gif",
"description": "GIF image",
"name": "image/gif",
"group": "Image"
},
"$:/language/Docs/Types/image/jpeg": {
"title": "$:/language/Docs/Types/image/jpeg",
"description": "JPEG image",
"name": "image/jpeg",
"group": "Image"
},
"$:/language/Docs/Types/image/png": {
"title": "$:/language/Docs/Types/image/png",
"description": "PNG image",
"name": "image/png",
"group": "Image"
},
"$:/language/Docs/Types/image/svg+xml": {
"title": "$:/language/Docs/Types/image/svg+xml",
"description": "Structured Vector Graphics image",
"name": "image/svg+xml",
"group": "Image"
},
"$:/language/Docs/Types/image/x-icon": {
"title": "$:/language/Docs/Types/image/x-icon",
"description": "ICO format icon file",
"name": "image/x-icon",
"group": "Image"
},
"$:/language/Docs/Types/text/css": {
"title": "$:/language/Docs/Types/text/css",
"description": "Static stylesheet",
"name": "text/css",
"group": "Developer"
},
"$:/language/Docs/Types/text/html": {
"title": "$:/language/Docs/Types/text/html",
"description": "HTML markup",
"name": "text/html",
"group": "Text"
},
"$:/language/Docs/Types/text/plain": {
"title": "$:/language/Docs/Types/text/plain",
"description": "Plain text",
"name": "text/plain",
"group": "Text"
},
"$:/language/Docs/Types/text/vnd.tiddlywiki": {
"title": "$:/language/Docs/Types/text/vnd.tiddlywiki",
"description": "TiddlyWiki 5",
"name": "text/vnd.tiddlywiki",
"group": "Text"
},
"$:/language/Docs/Types/text/x-tiddlywiki": {
"title": "$:/language/Docs/Types/text/x-tiddlywiki",
"description": "TiddlyWiki Classic",
"name": "text/x-tiddlywiki",
"group": "Text"
},
"$:/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": {
"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/*\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",
"title": "$:/core/modules/commander.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/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",
"title": "$:/core/modules/commands/build.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/clearpassword.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/editions.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/help.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/init.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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\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 ext = path.extname(self.params[0]);\n\tfs.readFile(this.params[0],$tw.utils.getTypeEncoding(ext),function(err,data) {\n\t\tif (err) {\n\t\t\tself.callback(err);\n\t\t} else {\n\t\t\tvar fields = {title: self.params[0]},\n\t\t\t\ttype = path.extname(self.params[0]);\n\t\t\tvar tiddlers = self.commander.wiki.deserializeTiddlers(type,data,fields);\n\t\t\tif(!tiddlers) {\n\t\t\t\tself.callback(\"No tiddlers found in file \\\"\" + self.params[0] + \"\\\"\");\n\t\t\t} else {\n\t\t\t\tfor(var t=0; t<tiddlers.length; t++) {\n\t\t\t\t\tself.commander.wiki.importTiddler(new $tw.Tiddler(tiddlers[t]));\n\t\t\t\t}\n\t\t\t\tself.callback(null);\t\n\t\t\t}\n\t\t}\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/load.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/makelibrary.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/output.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/password.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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\tvariables = {};\n\t$tw.utils.createFileDirectories(filename);\n\tif(template) {\n\t\tvariables.currentTiddler = title;\n\t\ttitle = template;\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",
"title": "$:/core/modules/commands/rendertiddler.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/rendertiddlers.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/savelibrarytiddlers.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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\t\ttype = tiddler.fields.type || \"text/vnd.tiddlywiki\",\n\t\tcontentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: \"utf8\"};\n\t$tw.utils.createFileDirectories(filename);\n\tfs.writeFile(filename,tiddler.fields.text,contentTypeInfo.encoding,function(err) {\n\t\tself.callback(err);\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/savetiddler.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/savetiddlers.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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.listen = function(port,host) {\n\tvar self = this;\n\thttp.createServer(function(request,response) {\n\t\t// Compose the state object\n\t\tvar state = {};\n\t\tstate.wiki = self.wiki;\n\t\tstate.server = self;\n\t\tstate.urlInfo = url.parse(request.url);\n\t\t// Find the route that matches this path\n\t\tvar route = self.findMatchingRoute(request,state);\n\t\t// Check for the username and password if we've got one\n\t\tvar username = self.get(\"username\"),\n\t\t\tpassword = self.get(\"password\");\n\t\tif(username && password) {\n\t\t\t// Check they match\n\t\t\tif(self.checkCredentials(request,username,password) !== \"ALLOWED\") {\n\t\t\t\tvar servername = state.wiki.getTiddlerText(\"$:/SiteTitle\") || \"TiddlyWiki5\";\n\t\t\t\tresponse.writeHead(401,\"Authentication required\",{\n\t\t\t\t\t\"WWW-Authenticate\": 'Basic realm=\"Please provide your username and password to login to ' + servername + '\"'\n\t\t\t\t});\n\t\t\t\tresponse.end();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// Return a 404 if we didn't find a route\n\t\tif(!route) {\n\t\t\tresponse.writeHead(404);\n\t\t\tresponse.end();\n\t\t\treturn;\n\t\t}\n\t\t// Set the encoding for the incoming request\n\t\t// TODO: Presumably this would need tweaking if we supported PUTting binary tiddlers\n\t\trequest.setEncoding(\"utf8\");\n\t\t// Dispatch the appropriate method\n\t\tswitch(request.method) {\n\t\t\tcase \"GET\": // Intentional fall-through\n\t\t\tcase \"DELETE\":\n\t\t\t\troute.handler(request,response,state);\n\t\t\t\tbreak;\n\t\t\tcase \"PUT\":\n\t\t\t\tvar data = \"\";\n\t\t\t\trequest.on(\"data\",function(chunk) {\n\t\t\t\t\tdata += chunk.toString();\n\t\t\t\t});\n\t\t\t\trequest.on(\"end\",function() {\n\t\t\t\t\tstate.data = data;\n\t\t\t\t\troute.handler(request,response,state);\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t}).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\tconsole.log(\"Serving on \" + host + \":\" + port);\n\tconsole.log(\"(press ctrl-C to exit)\");\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",
"title": "$:/core/modules/commands/server.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/setfield.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/unpackplugin.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/verbose.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/commands/version.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/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",
"title": "$:/core/modules/config.js",
"type": "application/javascript",
"module-type": "config"
},
"$:/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 = JSON.parse(text),\n\t\tresults = [];\n\tif($tw.utils.isArray(incoming)) {\n\t\tfor(var t=0; t<incoming.length; t++) {\n\t\t\tvar incomingFields = incoming[t],\n\t\t\t\tfields = {};\n\t\t\tfor(var f in incomingFields) {\n\t\t\t\tif(typeof incomingFields[f] === \"string\") {\n\t\t\t\t\tfields[f] = incomingFields[f];\n\t\t\t\t}\n\t\t\t}\n\t\t\tresults.push(fields);\n\t\t}\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",
"title": "$:/core/modules/deserializers.js",
"type": "application/javascript",
"module-type": "tiddlerdeserializer"
},
"$:/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",
"title": "$:/core/modules/filters/addprefix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/addsuffix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/after.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/all/current.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/all/missing.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/all/orphans.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/all/shadows.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/all/tiddlers.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/all.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/backlinks.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/before.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/commands.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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\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",
"title": "$:/core/modules/filters/days.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/each.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/eachday.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/editiondescription.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/editions.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/field.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/fields.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/get.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/getindex.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!tiddler || (tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[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(tiddler && $tw.utils.hop(tiddler.fields,operator.operand) && tiddler.fields[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",
"title": "$:/core/modules/filters/has.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/haschanged.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/indexes.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/is/current.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/is/image.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/is/missing.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/is/orphan.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/is/shadow.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/is/system.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/is/tag.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/is/tiddler.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/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\tvar isFilterOperator = isFilterOperators[operator.operand];\n\tif(isFilterOperator) {\n\t\treturn isFilterOperator(source,operator.prefix,options);\n\t} else {\n\t\treturn [\"Filter Error: Unknown operand for the 'is' filter operator\"];\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/filters/is.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/limit.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/links.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/list.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/listed.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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/*\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",
"title": "$:/core/modules/filters/listops.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/modules.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/moduletypes.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/next.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/plugintiddlers.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/prefix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/previous.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/regexp.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/removeprefix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/removesuffix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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\tvar isSameDay = function(dateField) {\n\t\t\treturn (new Date(dateField)).setHours(0,0,0,0) === targetDate;\n\t\t};\n\tsource(function(tiddler,title) {\n\t\tif(tiddler && tiddler.fields[fieldName]) {\n\t\t\tif(isSameDay($tw.utils.parseDate(tiddler.fields[fieldName]))) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/sameday.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/search.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/shadowsource.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/sort.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/splitbefore.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/storyviews.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/suffix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && !tiddler.hasTag(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(tiddler && tiddler.hasTag(operator.operand)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t\tresults = options.wiki.sortByList(results,operator.operand);\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/tag.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/tagging.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/tags.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/title.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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",
"title": "$:/core/modules/filters/untagged.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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$tw.utils.each($tw.modules.types.wikirule,function(mod) {\n\t\tvar exp = mod.exports;\n\t\tif(exp.types[operator.operand]) {\n\t\t\tresults.push(exp.name);\n\t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/wikiparserrules.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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 return results.slice(0, index + count).concat(marker).concat(results.slice(index + count));\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",
"title": "$:/core/modules/filters/x-listops.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/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 operator, operand, bracketPos, curlyBracketPos;\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\tvar nextBracketPos = 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\t\t\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\t\t\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\t\t\t\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 \"Syntax error in filter expression\";\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 [\"Filter error: \" + 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",
"title": "$:/core/modules/filters.js",
"type": "application/javascript",
"module-type": "wikimethod"
},
"$:/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\treturn infoTiddlerFields;\n};\n\n})();\n",
"title": "$:/core/modules/info/platform.js",
"type": "application/javascript",
"module-type": "info"
},
"$:/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",
"title": "$:/core/modules/language.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/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",
"title": "$:/core/modules/macros/changecount.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/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",
"title": "$:/core/modules/macros/contrastcolour.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/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",
"title": "$:/core/modules/macros/csvtiddlers.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/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",
"title": "$:/core/modules/macros/dumpvariables.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/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",
"title": "$:/core/modules/macros/jsontiddlers.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/makedatauri.js": {
"text": "/*\\\ntitle: $:/core/modules/macros/makedatauri.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to convert the content of a tiddler 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",
"title": "$:/core/modules/macros/makedatauri.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/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",
"title": "$:/core/modules/macros/now.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/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",
"title": "$:/core/modules/macros/qualify.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/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",
"title": "$:/core/modules/macros/resolvepath.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/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",
"title": "$:/core/modules/macros/version.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/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",
"title": "$:/core/modules/parsers/audioparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/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",
"title": "$:/core/modules/parsers/csvparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/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: \"sandbox\"}\n\t\t}\n\t}];\n};\n\nexports[\"text/html\"] = HtmlParser;\n\n})();\n\n",
"title": "$:/core/modules/parsers/htmlparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/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\tif(type === \"application/pdf\" || type === \".pdf\") {\n\t\t\telement.tag = \"embed\";\n\t\t}\n\t} else if(text) {\n\t\tif(type === \"application/pdf\" || type === \".pdf\") {\n\t\t\telement.attributes.src = {type: \"string\", value: \"data:application/pdf;base64,\" + text};\n\t\t\telement.tag = \"embed\";\n\t\t} else if(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[\"application/pdf\"] = ImageParser;\nexports[\"image/x-icon\"] = ImageParser;\n\n})();\n\n",
"title": "$:/core/modules/parsers/imageparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/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\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 an indirect value\n\t\t\tvar indirectValue = $tw.utils.parseTokenRegExp(source,pos,reIndirectValue);\n\t\t\tif(indirectValue) {\n\t\t\t\tpos = indirectValue.end;\n\t\t\t\tnode.type = \"indirect\";\n\t\t\t\tnode.textReference = indirectValue.match[1];\n\t\t\t} else {\n\t\t\t\t// Look for a unquoted value\n\t\t\t\tvar unquotedValue = $tw.utils.parseTokenRegExp(source,pos,reUnquotedAttribute);\n\t\t\t\tif(unquotedValue) {\n\t\t\t\t\tpos = unquotedValue.end;\n\t\t\t\t\tnode.type = \"string\";\n\t\t\t\t\tnode.value = unquotedValue.match[1];\n\t\t\t\t} else {\n\t\t\t\t\t// Look for a macro invocation value\n\t\t\t\t\tvar macroInvocation = $tw.utils.parseMacroInvocation(source,pos);\n\t\t\t\t\tif(macroInvocation) {\n\t\t\t\t\t\tpos = macroInvocation.end;\n\t\t\t\t\t\tnode.type = \"macro\";\n\t\t\t\t\t\tnode.value = macroInvocation;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode.type = \"string\";\n\t\t\t\t\t\tnode.value = \"true\";\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",
"title": "$:/core/modules/utils/parseutils.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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",
"title": "$:/core/modules/parsers/textparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/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 AudioParser = 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\"] = AudioParser;\n\n})();\n\n",
"title": "$:/core/modules/parsers/videoparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/codeblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/codeinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/commentblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/commentinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/dash.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/bold.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/italic.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/subscript.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/superscript.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/underscore.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/entity.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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: http://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},\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",
"title": "$:/core/modules/parsers/wikiparser/rules/extlink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/heading.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/horizrule.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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// 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",
"title": "$:/core/modules/parsers/wikiparser/rules/html.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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[http://tiddlywiki.com/fractalveg.jpg]]\n[img width=23 height=24 [http://tiddlywiki.com/fractalveg.jpg]]\n[img width={{!!width}} height={{!!height}} [http://tiddlywiki.com/fractalveg.jpg]]\n[img[Description of image|http://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",
"title": "$:/core/modules/parsers/wikiparser/rules/image.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/list.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/macrocallblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/macrocallinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/macrodef.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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[http://tiddlywiki.com/fractalveg.jpg]]\n[ext[Tooltip|http://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\t// Update the end position\n\tnode.end = closePos + 2;\n\treturn node;\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/prettyextlink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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},\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",
"title": "$:/core/modules/parsers/wikiparser/rules/prettylink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/quoteblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/rules.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/styleblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/styleinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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 = /~?\\$:\\/[a-zA-Z0-9/.\\-_]+/mg;\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})();",
"title": "$:/core/modules/parsers/wikiparser/rules/syslink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/table.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/transcludeblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/transcludeinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/typedblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/wikilink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/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\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// 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\ttree.push({type: \"text\", text: 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\ttree.push({type: \"text\", text: 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\ttree.push({type: \"text\", text: 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\ttree.push({type: \"text\", text: 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\ttree.push({type: \"text\", text: this.source.substr(this.pos)});\n\t}\n\tthis.pos = this.sourceLength;\n\treturn tree;\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",
"title": "$:/core/modules/parsers/wikiparser/wikiparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/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",
"title": "$:/core/modules/parsers/wikiparser/rules/wikirulebase.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/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\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\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};\n\nexports.PluginSwitcher = PluginSwitcher;\n\n})();\n",
"title": "$:/core/modules/pluginswitcher.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/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(callback) {\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\tcallback(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(\"Error while saving:\\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",
"title": "$:/core/modules/saver-handler.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/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",
"title": "$:/core/modules/savers/andtidwiki.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/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\tfilename = 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\tlink.setAttribute(\"target\",\"_blank\");\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\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 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",
"title": "$:/core/modules/savers/download.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/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",
"title": "$:/core/modules/savers/fsosaver.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/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",
"title": "$:/core/modules/savers/manualdownload.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/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",
"title": "$:/core/modules/savers/msdownload.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/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 (window.location.protocol === \"file:\");\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new TiddlyFoxSaver(wiki);\n};\n\n})();\n",
"title": "$:/core/modules/savers/tiddlyfox.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/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",
"title": "$:/core/modules/savers/tiddlyie.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/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(\"Error saving to TWEdit: \" + 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",
"title": "$:/core/modules/savers/twedit.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/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(\"Error:\" + 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",
"title": "$:/core/modules/savers/upload.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/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\t\tiframeInfo = {\n\t\t\t\turl: url,\n\t\t\t\tstatus: \"loading\",\n\t\t\t\tdomNode: iframe\n\t\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\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\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(\"Error loading plugin library: \" + 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$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(\"Error loading plugin library: \" + 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",
"title": "$:/core/modules/browser-messaging.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/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",
"title": "$:/core/modules/startup/commands.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/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",
"title": "$:/core/modules/startup/favicon.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/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",
"title": "$:/core/modules/startup/info.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/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",
"title": "$:/core/modules/startup/load-modules.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/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",
"title": "$:/core/modules/startup/password.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/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",
"title": "$:/core/modules/startup/render.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/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);\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",
"title": "$:/core/modules/startup/rootwidget.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/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\tif($tw.browser) {\n\t\t$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));\n\t}\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});\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// 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",
"title": "$:/core/modules/startup.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/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-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",
"title": "$:/core/modules/startup/story.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/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\",{document: $tw.fakeDocument, variables: variables}),\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",
"title": "$:/core/modules/startup/windows.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/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",
"title": "$:/core/modules/story.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/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})();",
"title": "$:/core/modules/storyviews/classic.js",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/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",
"title": "$:/core/modules/storyviews/pop.js",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/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",
"title": "$:/core/modules/storyviews/zoomin.js",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/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/*\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\t// Make a logger\n\tthis.logger = new $tw.utils.Logger(\"syncer\" + ($tw.browser ? \"-browser\" : \"\") + ($tw.node ? \"-server\" : \"\"));\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) {\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\tthis.wiki.addEventListener(\"lazyLoad\",function(title) {\n\t\tself.handleLazyLoadEvent(title);\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/*\nConstants\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\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};\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) {\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) {\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};\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(\"Error retrieving skinny tiddler list:\",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);\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// Queue up a sync task to load this tiddler\n\tthis.enqueueSyncTask({\n\t\ttype: \"load\",\n\t\ttitle: title\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: \"Login to TiddlySpace\",\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\tif(!$tw.utils.hop(this.tiddlerInfo,task.title)) {\n\t\tthis.tiddlerInfo[task.title] = {\n\t\t\trevision: null,\n\t\t\tadaptorInfo: {},\n\t\t\tchangeCount: -1\n\t\t};\n\t}\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 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.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);\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",
"title": "$:/core/modules/syncer.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/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 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\n})();\n",
"title": "$:/core/modules/tiddler.js",
"type": "application/javascript",
"module-type": "tiddlermethod"
},
"$:/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",
"title": "$:/core/modules/upgraders/plugins.js",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/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",
"title": "$:/core/modules/upgraders/system.js",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/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",
"title": "$:/core/modules/upgraders/themetweaks.js",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/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",
"title": "$:/core/modules/utils/crypto.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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",
"title": "$:/core/modules/utils/dom/animations/slide.js",
"type": "application/javascript",
"module-type": "animation"
},
"$:/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",
"title": "$:/core/modules/utils/dom/animator.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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",
"title": "$:/core/modules/utils/dom/browser.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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",
"title": "$:/core/modules/utils/dom/csscolorparser.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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 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/*\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\n})();\n",
"title": "$:/core/modules/utils/dom.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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*/\nexports.httpRequest = function(options) {\n\tvar type = options.type || \"GET\",\n\t\theaders = options.headers || {accept: \"application/json\"},\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.responseText,this);\n\t\t\t\treturn;\n\t\t\t}\n\t\t// Something went wrong\n\t\toptions.callback(\"XMLHttpRequest error code: \" + 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",
"title": "$:/core/modules/utils/dom/http.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/keyboard.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/dom/keyboard.js\ntype: application/javascript\nmodule-type: utils\n\nKeyboard utilities\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar namedKeys = {\n\t\"backspace\": 8,\n\t\"tab\": 9,\n\t\"enter\": 13,\n\t\"escape\": 27\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}\nKey descriptors have the following format:\n\tctrl+enter\n\tctrl+shift+alt+A\n*/\nexports.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};\n\tfor(var t=0; t<components.length; t++) {\n\t\tvar s = components[t].toLowerCase();\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\") {\n\t\t\tinfo.metaKey = true;\n\t\t}\n\t\t// Replace named keys with their code\n\t\tif(namedKeys[s]) {\n\t\t\tinfo.keyCode = namedKeys[s];\n\t\t}\n\t}\n\treturn info;\n};\n\nexports.checkKeyDescriptor = function(event,keyInfo) {\n\tvar metaKeyStatus = !!keyInfo.metaKey; // Using a temporary variable to keep JSHint happy\n\treturn event.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 === metaKeyStatus;\t\n};\n\n})();\n",
"title": "$:/core/modules/utils/dom/keyboard.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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});\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});\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.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: \"Close\"\n\t\t\t}}}\n\t\t]}],\n\t\tparentWidget: $tw.rootWidget,\n\t\tdocument: document,\n\t\tvariables: variables\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",
"title": "$:/core/modules/utils/dom/modal.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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,{parentWidget: $tw.rootWidget, document: document, variables: variables});\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",
"title": "$:/core/modules/utils/dom/notifier.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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",
"title": "$:/core/modules/utils/dom/popup.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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",
"title": "$:/core/modules/utils/dom/scroller.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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",
"title": "$:/core/modules/utils/edition-info.js",
"type": "application/javascript",
"module-type": "utils-node"
},
"$:/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}\n});\n\nObject.defineProperty(TW_Element.prototype, \"textContent\", {\n\tget: function() {\n\t\tif(this.isRaw) {\n\t\t\tthrow \"Cannot get textContent on a raw TW_Element\";\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\tthrow \"Cannot get formattedTextContent on a raw TW_Element\";\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",
"title": "$:/core/modules/utils/fakedom.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/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})();\n",
"title": "$:/core/modules/utils/filesystem.js",
"type": "application/javascript",
"module-type": "utils-node"
},
"$:/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) {\n\tthis.componentName = componentName || \"\";\n}\n\n/*\nLog a message\n*/\nLogger.prototype.log = function(/* args */) {\n\tif(console !== undefined && console.log !== undefined) {\n\t\treturn Function.apply.call(console.log, console, [this.componentName + \":\"].concat(Array.prototype.slice.call(arguments,0)));\n\t}\n};\n\n/*\nAlert a message\n*/\nLogger.prototype.alert = function(/* args */) {\n\t// Prepare the text of the alert\n\tvar text = Array.prototype.join.call(arguments,\" \");\n\t// Create alert tiddlers in the browser\n\tif($tw.browser) {\n\t\t// Check if there is an existing alert with the same text and the same component\n\t\tvar existingAlerts = $tw.wiki.getTiddlersWithTag(ALERT_TAG),\n\t\t\talertFields,\n\t\t\texistingCount,\n\t\t\tself = this;\n\t\t$tw.utils.each(existingAlerts,function(title) {\n\t\t\tvar tiddler = $tw.wiki.getTiddler(title);\n\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\talertFields = $tw.utils.extend({},tiddler.fields);\n\t\t\t}\n\t\t});\n\t\tif(alertFields) {\n\t\t\texistingCount = alertFields.count || 1;\n\t\t} else {\n\t\t\talertFields = {\n\t\t\t\ttitle: $tw.wiki.generateNewTitle(\"$:/temp/alerts/alert\",{prefix: \"\"}),\n\t\t\t\ttext: text,\n\t\t\t\ttags: [ALERT_TAG],\n\t\t\t\tcomponent: this.componentName\n\t\t\t};\n\t\t\texistingCount = 0;\n\t\t}\n\t\talertFields.modified = new Date();\n\t\tif(++existingCount > 1) {\n\t\t\talertFields.count = existingCount;\n\t\t} else {\n\t\t\talertFields.count = undefined;\n\t\t}\n\t\t$tw.wiki.addTiddler(new $tw.Tiddler(alertFields));\n\t\t// Log the alert as well\n\t\tthis.log.apply(this,Array.prototype.slice.call(arguments,0));\n\t} else {\n\t\t// Print an orange message to the console if not in the browser\n\t\tconsole.error(\"\\x1b[1;33m\" + text + \"\\x1b[0m\");\n\t}\n};\n\nexports.Logger = Logger;\n\n})();\n",
"title": "$:/core/modules/utils/logger.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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",
"title": "$:/core/modules/utils/parsetree.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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",
"title": "$:/core/modules/utils/performance.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/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 + \"\\nError: \" + 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",
"title": "$:/core/modules/utils/pluginmaker.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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 warning, in colour if we're on a terminal\n*/\nexports.warning = function(text) {\n\tconsole.log($tw.node ? \"\\x1b[1;33m\" + text + \"\\x1b[0m\" : text);\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/*\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\tObject.freeze(object);\n\tfor(key in object) {\n\t\tproperty = object[key];\n\t\tif($tw.utils.hop(object,key) && (typeof property === \"object\") && !Object.isFrozen(property)) {\n\t\t\tdeepFreeze(property);\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[/^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[/^[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\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 n = Math.floor((dt.getTime()-new Date(dt.getFullYear(),0,1) + 3600000) / 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 e = 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 String.fromCharCode(parseInt(e.substr(2),16));\t\n\t\t} else {\n\t\t\treturn String.fromCharCode(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 String.fromCharCode(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(/[\\x80-\\uFFFF]/g, exports.escape); // 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\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})();\n",
"title": "$:/core/modules/utils/utils.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/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\tif(this.actionField) {\n\t\tremoveFields[this.actionField] = undefined;\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}\n\t\t});\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getModificationFields(),tiddler,removeFields,this.wiki.getCreationFields()));\n\t}\n\treturn true; // Action was invoked\n};\n\nexports[\"action-deletefield\"] = DeleteFieldWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/action-deletefield.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/action-deletetiddler.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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 tagfilter = \"[list[\" + this.target + \"!!tags]] \" + this.filtertags;\n\t\tthis.wiki.setText(this.target, \"tags\", undefined, $tw.utils.stringifyList(\n\t\t\tthis.wiki.filterTiddlers(tagfilter, this)));\n\t}\n\treturn true; // Action was invoked\n};\n\nexports[\"action-listops\"] = ActionListopsWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/action-listops.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/action-navigate.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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});\n\treturn true; // Action was invoked\n};\n\nexports[\"action-sendmessage\"] = SendMessageWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/action-sendmessage.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/action-setfield.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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\" to allow a directory to be selected\n\tif(this.webkitdirectory) {\n\t\tdomNode.setAttribute(\"webkitdirectory\",this.webkitdirectory);\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,function(tiddlerFieldsArray) {\n\t\t\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify(tiddlerFieldsArray)});\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.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};\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",
"title": "$:/core/modules/widgets/browse.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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(handled) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t}\n\t\treturn handled;\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/*\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});\n};\n\nButtonWidget.prototype.dispatchMessage = function(event) {\n\tthis.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable(\"currentTiddler\")});\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.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\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 || (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",
"title": "$:/core/modules/widgets/button.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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 = tiddler.fields[this.checkboxField] || 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\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\tvar value = checked ? this.checkboxChecked : this.checkboxUnchecked;\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\tif(hasChanged) {\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),fallbackFields,tiddler,newFields,this.wiki.getModificationFields()));\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.checkboxTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.checkboxTag = this.getAttribute(\"tag\");\n\tthis.checkboxField = this.getAttribute(\"field\");\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.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})();",
"title": "$:/core/modules/widgets/checkbox.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/codeblock.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/count.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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};\n\nDropZoneWidget.prototype.enterDrag = function() {\n\t// Check for this window being the source of the drag\n\tif($tw.dragInProgress) {\n\t\treturn false;\n\t}\n\t// We count enter/leave events\n\tthis.dragEnterCount = (this.dragEnterCount || 0) + 1;\n\t// If we're entering for the first time we need to apply highlighting\n\tif(this.dragEnterCount === 1) {\n\t\t$tw.utils.addClass(this.domNodes[0],\"tc-dragover\");\n\t}\n};\n\nDropZoneWidget.prototype.leaveDrag = function() {\n\t// Reduce the enter count\n\tthis.dragEnterCount = (this.dragEnterCount || 0) - 1;\n\t// Remove highlighting if we're leaving externally\n\tif(this.dragEnterCount <= 0) {\n\t\t$tw.utils.removeClass(this.domNodes[0],\"tc-dragover\");\n\t}\n};\n\nDropZoneWidget.prototype.handleDragEnterEvent = function(event) {\n\tthis.enterDrag();\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();\n};\n\nDropZoneWidget.prototype.handleDropEvent = function(event) {\n\tthis.leaveDrag();\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// Reset the enter count\n\tthis.dragEnterCount = 0;\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 = this.wiki.readFiles(dataTransfer.files,function(tiddlerFieldsArray) {\n\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify(tiddlerFieldsArray)});\n\t});\n\t// Try to import the various data types we understand\n\tif(numFiles === 0) {\n\t\tthis.importData(dataTransfer);\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.importData = function(dataTransfer) {\n\t// Try each provided data type in turn\n\tfor(var t=0; t<this.importDataTypes.length; t++) {\n\t\tif(!$tw.browser.isIE || this.importDataTypes[t].IECompatible) {\n\t\t\t// Get the data\n\t\t\tvar dataType = this.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.convertToFields(data);\n\t\t\t\tif(!tiddlerFields.title) {\n\t\t\t\t\ttiddlerFields.title = this.wiki.generateNewTitle(\"Untitled\");\n\t\t\t\t}\n\t\t\t\tthis.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify([tiddlerFields])});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nDropZoneWidget.prototype.importDataTypes = [\n\t{type: \"text/vnd.tiddler\", IECompatible: false, convertToFields: function(data) {\n\t\treturn JSON.parse(data);\n\t}},\n\t{type: \"URL\", IECompatible: true, convertToFields: function(data) {\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 JSON.parse(match[1]);\n\t\t} else {\n\t\t\treturn { // As URL string\n\t\t\t\ttext: data\n\t\t\t};\n\t\t}\n\t}},\n\t{type: \"text/x-moz-url\", IECompatible: false, convertToFields: function(data) {\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 JSON.parse(match[1]);\n\t\t} else {\n\t\t\treturn { // As URL string\n\t\t\t\ttext: data\n\t\t\t};\n\t\t}\n\t}},\n\t{type: \"text/html\", IECompatible: false, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}},\n\t{type: \"text/plain\", IECompatible: false, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}},\n\t{type: \"Text\", IECompatible: true, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}},\n\t{type: \"text/uri-list\", IECompatible: false, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}}\n];\n\nDropZoneWidget.prototype.handlePasteEvent = function(event) {\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(),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} 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\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",
"title": "$:/core/modules/widgets/dropzone.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/edit-binary.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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 = 300,\n\tDEFAULT_IMAGE_HEIGHT = 185;\n\n// Configuration tiddlers\nvar LINE_WIDTH_TITLE = \"$:/config/BitmapEditor/LineWidth\",\n\tLINE_COLOUR_TITLE = \"$:/config/BitmapEditor/Colour\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EditBitmapWidget = function(parseTreeNode,options) {\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 our element\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\tthis.widthDomNode = $tw.utils.domMaker(\"input\",{\n\t\tdocument: this.document,\n\t\t\"class\":\"tc-edit-bitmapeditor-width\",\n\t\teventListeners: [{\n\t\t\tname: \"change\", handlerObject: this, handlerMethod: \"handleWidthChangeEvent\"\n\t\t}]\n\t});\n\tthis.heightDomNode = $tw.utils.domMaker(\"input\",{\n\t\tdocument: this.document,\n\t\t\"class\":\"tc-edit-bitmapeditor-height\",\n\t\teventListeners: [{\n\t\t\tname: \"change\", handlerObject: this, handlerMethod: \"handleHeightChangeEvent\"\n\t\t}]\n\t});\n\t// Insert the elements into the DOM\n\tparent.insertBefore(this.canvasDomNode,nextSibling);\n\tparent.insertBefore(this.widthDomNode,nextSibling);\n\tparent.insertBefore(this.heightDomNode,nextSibling);\n\tthis.domNodes.push(this.canvasDomNode,this.widthDomNode,this.heightDomNode);\n\t// Load the image into the canvas\n\tif($tw.browser) {\n\t\tthis.loadCanvas();\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};\n\n/*\nNote that the bitmap editor intentionally doesn't try to refresh itself because it would be confusing to have the image changing spontaneously while editting it\n*/\nEditBitmapWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\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.updateSize();\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.updateSize();\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** Update the input boxes with the actual size of the canvas\n*/\nEditBitmapWidget.prototype.updateSize = function() {\n\tthis.widthDomNode.value = this.currCanvas.width;\n\tthis.heightDomNode.value = this.currCanvas.height;\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.handleWidthChangeEvent = function(event) {\n\t// Get the new width\n\tvar newWidth = parseInt(this.widthDomNode.value,10);\n\t// Update if necessary\n\tif(newWidth > 0 && newWidth !== this.currCanvas.width) {\n\t\tthis.changeCanvasSize(newWidth,this.currCanvas.height);\n\t}\n\t// Update the input controls\n\tthis.updateSize();\n};\n\nEditBitmapWidget.prototype.handleHeightChangeEvent = function(event) {\n\t// Get the new width\n\tvar newHeight = parseInt(this.heightDomNode.value,10);\n\t// Update if necessary\n\tif(newHeight > 0 && newHeight !== this.currCanvas.height) {\n\t\tthis.changeCanvasSize(this.currCanvas.width,newHeight);\n\t}\n\t// Update the input controls\n\tthis.updateSize();\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.strokeStyle = this.wiki.getTiddlerText(LINE_COLOUR_TITLE,\"#ff0\");\n\tctx.lineWidth = parseInt(this.wiki.getTiddlerText(LINE_WIDTH_TITLE,\"3\"),10);\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,1.0),\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",
"title": "$:/core/modules/widgets/edit-bitmap.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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 DEFAULT_MIN_TEXT_AREA_HEIGHT = \"100px\"; // Minimum height of textareas in pixels\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EditTextWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditTextWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditTextWidget.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 our element\n\tvar editInfo = this.getEditInfo(),\n\t\ttag = this.editTag;\n\tif($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {\n\t\ttag = \"input\";\n\t}\n\tvar domNode = this.document.createElement(tag);\n\tif(this.editType) {\n\t\tdomNode.setAttribute(\"type\",this.editType);\n\t}\n\tif(editInfo.value === \"\" && this.editPlaceholder) {\n\t\tdomNode.setAttribute(\"placeholder\",this.editPlaceholder);\n\t}\n\tif(this.editSize) {\n\t\tdomNode.setAttribute(\"size\",this.editSize);\n\t}\n\tif(this.editRows) {\n\t\tdomNode.setAttribute(\"rows\",this.editRows);\n\t}\n\t// Assign classes\n\tif(this.editClass) {\n\t\tdomNode.className = this.editClass;\n\t}\n\t// Set the text\n\tif(this.editTag === \"textarea\") {\n\t\tdomNode.appendChild(this.document.createTextNode(editInfo.value));\n\t} else {\n\t\tdomNode.value = editInfo.value;\n\t}\n\t// Add an input event handler\n\t$tw.utils.addEventListeners(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\tparent.insertBefore(domNode,nextSibling);\n\tthis.domNodes.push(domNode);\n\tif(this.postRender) {\n\t\tthis.postRender();\n\t}\n\t// Fix height\n\tthis.fixHeight();\n\t// Focus field\n\tif(this.editFocus === \"true\") {\n\t\tif(domNode.focus && domNode.select) {\n\t\t\tdomNode.focus();\n\t\t\tdomNode.select();\n\t\t}\n\t}\n};\n\n/*\nGet the tiddler being edited and current value\n*/\nEditTextWidget.prototype.getEditInfo = function() {\n\t// Get the edit value\n\tvar self = this,\n\t\tvalue,\n\t\tupdate;\n\tif(this.editIndex) {\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.editTitle,this.editIndex,this.editDefault);\n\t\tupdate = function(value) {\n\t\t\tvar data = self.wiki.getTiddlerData(self.editTitle,{});\n\t\t\tif(data[self.editIndex] !== value) {\n\t\t\t\tdata[self.editIndex] = value;\n\t\t\t\tself.wiki.setTiddlerData(self.editTitle,data);\n\t\t\t}\n\t\t};\n\t} else {\n\t\t// Get the current tiddler and the field name\n\t\tvar tiddler = this.wiki.getTiddler(this.editTitle);\n\t\tif(tiddler) {\n\t\t\t// If we've got a tiddler, the value to display is the field string value\n\t\t\tvalue = tiddler.getFieldString(this.editField);\n\t\t} else {\n\t\t\t// Otherwise, we need to construct a default value for the editor\n\t\t\tswitch(this.editField) {\n\t\t\t\tcase \"text\":\n\t\t\t\t\tvalue = \"Type the text for the tiddler '\" + this.editTitle + \"'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"title\":\n\t\t\t\t\tvalue = this.editTitle;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tvalue = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(this.editDefault !== undefined) {\n\t\t\t\tvalue = this.editDefault;\n\t\t\t}\n\t\t}\n\t\tupdate = function(value) {\n\t\t\tvar tiddler = self.wiki.getTiddler(self.editTitle),\n\t\t\t\tupdateFields = {\n\t\t\t\t\ttitle: self.editTitle\n\t\t\t\t};\n\t\t\tupdateFields[self.editField] = value;\n\t\t\tself.wiki.addTiddler(new $tw.Tiddler(self.wiki.getCreationFields(),tiddler,updateFields,self.wiki.getModificationFields()));\n\t\t};\n\t}\n\treturn {value: value, update: update};\n};\n\n/*\nCompute the internal state of the widget\n*/\nEditTextWidget.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.editDefault = this.getAttribute(\"default\");\n\tthis.editClass = this.getAttribute(\"class\");\n\tthis.editPlaceholder = this.getAttribute(\"placeholder\");\n\tthis.editSize = this.getAttribute(\"size\");\n\tthis.editRows = this.getAttribute(\"rows\");\n\tthis.editAutoHeight = this.getAttribute(\"autoHeight\",\"yes\") === \"yes\";\n\tthis.editMinHeight = this.getAttribute(\"minHeight\",DEFAULT_MIN_TEXT_AREA_HEIGHT);\n\tthis.editFocusPopup = this.getAttribute(\"focusPopup\");\n\tthis.editFocus = this.getAttribute(\"focus\");\n\t// Get the editor element tag and type\n\tvar tag,type;\n\tif(this.editField === \"text\") {\n\t\ttag = \"textarea\";\n\t} else {\n\t\ttag = \"input\";\n\t\tvar fieldModule = $tw.Tiddler.fieldModules[this.editField];\n\t\tif(fieldModule && fieldModule.editTag) {\n\t\t\ttag = fieldModule.editTag;\n\t\t}\n\t\tif(fieldModule && fieldModule.editType) {\n\t\t\ttype = fieldModule.editType;\n\t\t}\n\t\ttype = type || \"text\";\n\t}\n\t// Get the rest of our parameters\n\tthis.editTag = this.getAttribute(\"tag\",tag);\n\tthis.editType = this.getAttribute(\"type\",type);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEditTextWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\t// Completely rerender if any of our attributes have changed\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes[\"default\"] || changedAttributes[\"class\"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else if(changedTiddlers[this.editTitle]) {\n\t\tthis.updateEditor(this.getEditInfo().value);\n\t\treturn true;\n\t}\n\t// Fix the height anyway in case there has been a reflow\n\tthis.fixHeight();\n\treturn false;\n};\n\n/*\nUpdate the editor with new text. This method is separate from updateEditorDomNode()\nso that subclasses can override updateEditor() and still use updateEditorDomNode()\n*/\nEditTextWidget.prototype.updateEditor = function(text) {\n\tthis.updateEditorDomNode(text);\n};\n\n/*\nUpdate the editor dom node with new text\n*/\nEditTextWidget.prototype.updateEditorDomNode = function(text) {\n\t// Replace the edit value if the tiddler we're editing has changed\n\tvar domNode = this.domNodes[0];\n\tif(!domNode.isTiddlyWikiFakeDom) {\n\t\tif(this.document.activeElement !== domNode) {\n\t\t\tdomNode.value = text;\n\t\t}\n\t\t// Fix the height if needed\n\t\tthis.fixHeight();\n\t}\n};\n\n/*\nGet the first parent element that has scrollbars or use the body as fallback.\n*/\nEditTextWidget.prototype.getScrollContainer = function(el) {\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 this.document.body;\n};\n\n/*\nFix the height of textareas to fit their content\n*/\nEditTextWidget.prototype.fixHeight = function() {\n\tvar domNode = this.domNodes[0];\n\tif(this.editAutoHeight && domNode && !domNode.isTiddlyWikiFakeDom && this.editTag === \"textarea\") {\n\t\t// Resize the textarea to fit its content, preserving scroll position\n\t\t// Get the scroll container and register the current scroll position\n\t\tvar container = this.getScrollContainer(domNode),\n\t\t\tscrollTop = container.scrollTop;\n // Measure the specified minimum height\n\t\tdomNode.style.height = this.editMinHeight;\n\t\tvar minHeight = domNode.offsetHeight;\n\t\t// Set its height to auto so that it snaps to the correct height\n\t\tdomNode.style.height = \"auto\";\n\t\t// Calculate the revised height\n\t\tvar newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,minHeight);\n\t\t// Only try to change the height if it has changed\n\t\tif(newHeight !== domNode.offsetHeight) {\n\t\t\tdomNode.style.height = newHeight + \"px\";\n\t\t\t// Make sure that the dimensions of the textarea are recalculated\n\t\t\t$tw.utils.forceLayout(domNode);\n\t\t\t// Set the container to the position we registered at the beginning\n\t\t\tcontainer.scrollTop = scrollTop;\n\t\t}\n\t}\n};\n\n/*\nHandle a dom \"input\" event\n*/\nEditTextWidget.prototype.handleInputEvent = function(event) {\n\tthis.saveChanges(this.domNodes[0].value);\n\tthis.fixHeight();\n\treturn true;\n};\n\nEditTextWidget.prototype.handleFocusEvent = function(event) {\n\tif(this.editFocusPopup) {\n\t\t$tw.popup.triggerPopup({\n\t\t\tdomNode: this.domNodes[0],\n\t\t\ttitle: this.editFocusPopup,\n\t\t\twiki: this.wiki,\n\t\t\tforce: true\n\t\t});\n\t}\n\treturn true;\n};\n\nEditTextWidget.prototype.saveChanges = function(text) {\n\tvar editInfo = this.getEditInfo();\n\tif(text !== editInfo.value) {\n\t\teditInfo.update(text);\n\t}\n};\n\nexports[\"edit-text\"] = EditTextWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/edit-text.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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}]);\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",
"title": "$:/core/modules/widgets/edit.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/element.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/encrypt.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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 textNode = this.document.createTextNode($tw.utils.entityDecode(this.parseTreeNode.entity));\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\treturn false;\n};\n\nexports.entity = EntityWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/entity.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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\tif(tiddler && tiddler.fields.tags) {\n\t\tvar p = tiddler.fields.tags.indexOf(event.param);\n\t\tif(p !== -1) {\n\t\t\tvar modification = this.wiki.getModificationFields();\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\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\tif(tiddler && typeof event.param === \"string\") {\n\t\tvar tag = event.param.trim();\n\t\tif(tag !== \"\") {\n\t\t\tvar modification = this.wiki.getModificationFields();\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({title: this.mangleTitle, tags: tag});\t\t\n\t}\n\treturn true;\n};\n\nexports.fieldmangler = FieldManglerWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/fieldmangler.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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 = row.replace(\"$name$\",fieldName);\n\t\t\t\trow = row.replace(\"$value$\",value);\n\t\t\t\trow = row.replace(\"$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",
"title": "$:/core/modules/widgets/fields.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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}\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",
"title": "$:/core/modules/widgets/image.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/importvariables.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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\t// Create element\n\tvar domNode = this.document.createElement(\"div\");\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.utils.checkKeyDescriptor(event,self.keyInfo)) {\n\t\t\tself.invokeActions(this,event);\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.message = this.getAttribute(\"message\");\n\tthis.param = this.getAttribute(\"param\");\n\tthis.key = this.getAttribute(\"key\");\n\tthis.keyInfo = $tw.utils.parseKeyDescriptor(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\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.keyboard = KeyboardWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/keyboard.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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;\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// Render the link if required\n\tif(useWikiLinks) {\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 wikiLinkTemplateMacro = this.getVariable(\"tv-wikilink-template\"),\n\t\twikiLinkTemplate = wikiLinkTemplateMacro ? wikiLinkTemplateMacro.trim() : \"#$uri_encoded$\",\n\t\twikiLinkText = wikiLinkTemplate.replace(\"$uri_encoded$\",encodeURIComponent(this.to));\n\twikiLinkText = wikiLinkText.replace(\"$uri_doubleencoded$\",encodeURIComponent(encodeURIComponent(this.to)));\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\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\tif(this.draggable === \"yes\") {\n\t\t$tw.utils.addEventListeners(domNode,[\n\t\t\t{name: \"dragstart\", handlerObject: this, handlerMethod: \"handleDragStartEvent\"},\n\t\t\t{name: \"dragend\", handlerObject: this, handlerMethod: \"handleDragEndEvent\"}\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});\n\tif(this.domNodes[0].hasAttribute(\"href\")) {\n\t\tevent.preventDefault();\n\t}\n\tevent.stopPropagation();\n\treturn false;\n};\n\nLinkWidget.prototype.handleDragStartEvent = function(event) {\n\tif(event.target === this.domNodes[0]) {\n\t\tif(this.to) {\n\t\t\t$tw.dragInProgress = true;\n\t\t\t// Set the dragging class on the element being dragged\n\t\t\t$tw.utils.addClass(event.target,\"tc-tiddlylink-dragging\");\n\t\t\t// Create the drag image elements\n\t\t\tthis.dragImage = this.document.createElement(\"div\");\n\t\t\tthis.dragImage.className = \"tc-tiddler-dragger\";\n\t\t\tvar inner = this.document.createElement(\"div\");\n\t\t\tinner.className = \"tc-tiddler-dragger-inner\";\n\t\t\tinner.appendChild(this.document.createTextNode(this.to));\n\t\t\tthis.dragImage.appendChild(inner);\n\t\t\tthis.document.body.appendChild(this.dragImage);\n\t\t\t// Astoundingly, we need to cover the dragger up: http://www.kryogenix.org/code/browser/custom-drag-image.html\n\t\t\tvar cover = this.document.createElement(\"div\");\n\t\t\tcover.className = \"tc-tiddler-dragger-cover\";\n\t\t\tcover.style.left = (inner.offsetLeft - 16) + \"px\";\n\t\t\tcover.style.top = (inner.offsetTop - 16) + \"px\";\n\t\t\tcover.style.width = (inner.offsetWidth + 32) + \"px\";\n\t\t\tcover.style.height = (inner.offsetHeight + 32) + \"px\";\n\t\t\tthis.dragImage.appendChild(cover);\n\t\t\t// Set the data transfer properties\n\t\t\tvar dataTransfer = event.dataTransfer;\n\t\t\t// First the image\n\t\t\tdataTransfer.effectAllowed = \"copy\";\n\t\t\tif(dataTransfer.setDragImage) {\n\t\t\t\tdataTransfer.setDragImage(this.dragImage.firstChild,-16,-16);\n\t\t\t}\n\t\t\t// Then the data\n\t\t\tdataTransfer.clearData();\n\t\t\tvar jsonData = this.wiki.getTiddlerAsJson(this.to),\n\t\t\t\ttextData = this.wiki.getTiddlerText(this.to,\"\"),\n\t\t\t\ttitle = (new RegExp(\"^\" + $tw.config.textPrimitives.wikiLink + \"$\",\"mg\")).exec(this.to) ? this.to : \"[[\" + this.to + \"]]\";\n\t\t\t// IE doesn't like these content types\n\t\t\tif(!$tw.browser.isIE) {\n\t\t\t\tdataTransfer.setData(\"text/vnd.tiddler\",jsonData);\n\t\t\t\tdataTransfer.setData(\"text/plain\",title);\n\t\t\t\tdataTransfer.setData(\"text/x-moz-url\",\"data:text/vnd.tiddler,\" + encodeURIComponent(jsonData));\n\t\t\t}\n\t\t\tdataTransfer.setData(\"URL\",\"data:text/vnd.tiddler,\" + encodeURIComponent(jsonData));\n\t\t\tdataTransfer.setData(\"Text\",title);\n\t\t\tevent.stopPropagation();\n\t\t} else {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n};\n\nLinkWidget.prototype.handleDragEndEvent = function(event) {\n\tif(event.target === this.domNodes[0]) {\n\t\t$tw.dragInProgress = false;\n\t\t// Remove the dragging class on the element being dragged\n\t\t$tw.utils.removeClass(event.target,\"tc-tiddlylink-dragging\");\n\t\t// Delete the drag image element\n\t\tif(this.dragImage) {\n\t\t\tthis.dragImage.parentNode.removeChild(this.dragImage);\n\t\t}\n\t}\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\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) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.link = LinkWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/link.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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\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*/\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.catchTo) {\n\t\tthis.wiki.setTextReference(this.catchTo,event.navigateTo,this.getVariable(\"currentTiddler\"));\n\t}\n\tif(this.catchMessage && this.parentWidget) {\n\t\tthis.parentWidget.dispatchEvent({\n\t\t\ttype: this.catchMessage,\n\t\t\tparam: event.navigateTo,\n\t\t\tnavigateTo: event.navigateTo\n\t\t});\n\t}\n\tif(this.catchSet) {\n\t\tvar tiddler = this.wiki.getTiddler(this.catchSet);\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.catchSet, text: this.catchSetTo}));\n\t}\n\treturn false;\n};\n\nexports.linkcatcher = LinkCatcherWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/linkcatcher.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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(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})();",
"title": "$:/core/modules/widgets/list.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/macrocall.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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\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);\t\t\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\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 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\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\tthis.wiki.deleteTiddler(originalTitle);\n\t\tthis.removeTitleFromStory(storyList,originalTitle);\n\t}\n\t// Delete this 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// 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\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// 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\texistingTiddler,\n\t\tadditionalFields,\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);\t\t\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\tvar self = this;\n\t// Get the tiddlers\n\tvar tiddlers = [];\n\ttry {\n\t\ttiddlers = JSON.parse(event.param);\t\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\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);\t\t\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\") + \"\\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\tself.wiki.addTiddler(new $tw.Tiddler(tiddlerFields));\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 self = this,\n\t\tparamObject = 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 self = this,\n\t\tparamObject = 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",
"title": "$:/core/modules/widgets/navigator.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/password.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/radio.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/radio.js\ntype: application/javascript\nmodule-type: widget\n\nRadio widget\n\nWill set a field to the selected value:\n\n```\n\t<$radio field=\"myfield\" value=\"check 1\">one</$radio>\n\t<$radio field=\"myfield\" value=\"check 2\">two</$radio>\n\t<$radio field=\"myfield\" value=\"check 3\">three</$radio>\n```\n\n|Parameter |Description |h\n|tiddler |Name of the tiddler in which the field should be set. Defaults to current tiddler |\n|field |The name of the field to be set |\n|value |The value to set |\n|class |Optional class name(s) |\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 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 tiddler = this.wiki.getTiddler(this.radioTitle);\n\treturn tiddler && tiddler.getFieldString(this.radioField);\n};\n\nRadioWidget.prototype.setValue = function() {\n\tif(this.radioField) {\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.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.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",
"title": "$:/core/modules/widgets/radio.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/raw.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/reveal.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/scrollable.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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\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};\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.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",
"title": "$:/core/modules/widgets/select.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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.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.setFilter) {\n\t\tvar results = this.wiki.filterTiddlers(this.setFilter,this);\n\t\tif(!this.setValue) {\n\t\t\tvalue = $tw.utils.stringifyList(results);\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.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",
"title": "$:/core/modules/widgets/set.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/text.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/tiddler.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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: \"Recursive transclusion error in transclude widget\"}\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",
"title": "$:/core/modules/widgets/transclude.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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",
"title": "$:/core/modules/widgets/vars.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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\tswitch(this.viewFormat) {\n\t\tcase \"htmlwikified\":\n\t\t\tthis.text = this.getValueAsHtmlWikified();\n\t\t\tbreak;\n\t\tcase \"htmlencodedplainwikified\":\n\t\t\tthis.text = this.getValueAsHtmlEncodedPlainWikified();\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() {\n\treturn this.wiki.renderText(\"text/html\",\"text/vnd.tiddlywiki\",this.getValueAsText(),{parentWidget: this});\n};\n\nViewWidget.prototype.getValueAsHtmlEncodedPlainWikified = function() {\n\treturn $tw.utils.htmlEncode(this.wiki.renderText(\"text/plain\",\"text/vnd.tiddlywiki\",this.getValueAsText(),{parentWidget: this}));\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",
"title": "$:/core/modules/widgets/view.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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 = text.replace(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 === \"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 && child.invokeAction(triggeringWidget,event)) {\n\t\t\thandled = true;\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\nWidget.prototype.allowActionPropagation = function() {\n\treturn true;\n};\n\nexports.widget = Widget;\n\n})();\n",
"title": "$:/core/modules/widgets/widget.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/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*/\nexports.renameTiddler = function(fromTitle,toTitle) {\n\tvar self = this;\n\tfromTitle = (fromTitle || \"\").trim();\n\ttoTitle = (toTitle || \"\").trim();\n\tif(fromTitle && toTitle && fromTitle !== toTitle) {\n\t\t// Rename the tiddler itself\n\t\tvar tiddler = this.getTiddler(fromTitle);\n\t\tthis.addTiddler(new $tw.Tiddler(tiddler,{title: toTitle},this.getModificationFields()));\n\t\tthis.deleteTiddler(fromTitle);\n\t\t// Rename any tags or lists that reference it\n\t\tthis.each(function(tiddler,title) {\n\t\t\tvar tags = (tiddler.fields.tags || []).slice(0),\n\t\t\t\tlist = (tiddler.fields.list || []).slice(0),\n\t\t\t\tisModified = false;\n\t\t\t// Rename tags\n\t\t\t$tw.utils.each(tags,function (title,index) {\n\t\t\t\tif(title === fromTitle) {\n\t\t\t\t\ttags[index] = toTitle;\n\t\t\t\t\tisModified = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\t// Rename lists\n\t\t\t$tw.utils.each(list,function (title,index) {\n\t\t\t\tif(title === fromTitle) {\n\t\t\t\t\tlist[index] = toTitle;\n\t\t\t\t\tisModified = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif(isModified) {\n\t\t\t\tself.addTiddler(new $tw.Tiddler(tiddler,{tags: tags, list: list},self.getModificationFields()));\n\t\t\t}\n\t\t});\n\t}\n}\n\n})();\n",
"title": "$:/core/modules/wiki-bulkops.js",
"type": "application/javascript",
"module-type": "wikimethod"
},
"$:/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\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\tvar fields = {\n\t\t\tcreated: new Date()\n\t\t},\n\t\tcreator = this.getTiddlerText(USER_NAME_TITLE);\n\tif(creator) {\n\t\tfields.creator = creator;\n\t}\n\treturn fields;\n};\n\n/*\nReturn a hashmap of the fields that should be set when a tiddler is modified\n*/\nexports.getModificationFields = function() {\n\tvar fields = Object.create(null),\n\t\tmodifier = this.getTiddlerText(USER_NAME_TITLE);\n\tfields.modified = new Date();\n\tif(modifier) {\n\t\tfields.modifier = modifier;\n\t}\n\treturn fields;\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 (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,defaultData);\n\t\t\t$tw.utils.deepFreeze(value);\n\t\t\treturn value;\n\t\t});\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.getTiddlerData(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\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\n*/\nexports.makeTranscludeWidget = function(title,options) {\n\toptions = options || {};\n\tvar parseTree = {tree: [{\n\t\t\ttype: \"element\",\n\t\t\ttag: \"div\",\n\t\t\tchildren: [{\n\t\t\t\ttype: \"transclude\",\n\t\t\t\tattributes: {\n\t\t\t\t\ttiddler: {\n\t\t\t\t\t\tname: \"tiddler\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tvalue: title}},\n\t\t\t\tisBlock: !options.parseAsInline}]}\n\t]};\n\tif(options.field) {\n\t\tparseTree.tree[0].children[0].attributes.field = {type: \"string\", value: options.field};\n\t}\n\tif(options.mode) {\n\t\tparseTree.tree[0].children[0].attributes.mode = {type: \"string\", value: options.mode};\n\t}\n\tif(options.children) {\n\t\tparseTree.tree[0].children[0].children = options.children;\n\t}\n\treturn $tw.wiki.makeWidget(parseTree,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/*\nRead an array of browser File objects, invoking callback(tiddlerFieldsArray) once they're all read\n*/\nexports.readFiles = function(files,callback) {\n\tvar result = [],\n\t\toutstanding = files.length;\n\tfor(var f=0; f<files.length; f++) {\n\t\tthis.readFile(files[f],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\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,callback) {\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// Create the FileReader\n\tvar reader = new FileReader();\n\t// Onload\n\treader.onload = function(event) {\n\t\t// Deserialise the file contents\n\t\tvar text = event.target.result,\n\t\t\ttiddlerFields = {title: file.name || \"Untitled\", type: type};\n\t\t// Are we binary?\n\t\tif(isBinary) {\n\t\t\t// The base64 section starts after the first comma in the data URI\n\t\t\tvar commaPos = text.indexOf(\",\");\n\t\t\tif(commaPos !== -1) {\n\t\t\t\ttiddlerFields.text = text.substr(commaPos+1);\n\t\t\t\tcallback([tiddlerFields]);\n\t\t\t}\n\t\t} else {\n\t\t\t// Check whether this is an encrypted TiddlyWiki file\n\t\t\tvar encryptedJson = $tw.utils.extractEncryptedStoreArea(text);\n\t\t\tif(encryptedJson) {\n\t\t\t\t// If so, attempt to decrypt it with the current password\n\t\t\t\t$tw.utils.decryptStoreAreaInteractive(encryptedJson,function(tiddlers) {\n\t\t\t\t\tcallback(tiddlers);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Otherwise, just try to deserialise any tiddlers in the file\n\t\t\t\tcallback(self.deserializeTiddlers(type,text,tiddlerFields));\n\t\t\t}\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\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\"]);\n\tif(!origTiddler) {\n\t\treturn tiddler.fields.text !== \"\";\n\t}\n\treturn tiddler.fields[\"draft.title\"] !== tiddler.fields[\"draft.of\"] || !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",
"title": "$:/core/modules/wiki.js",
"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": {
"created": "20150402111612188",
"description": "Good with dark photo backgrounds",
"modified": "20150402112344080",
"name": "DarkPhotos",
"tags": "$:/tags/Palette",
"title": "$:/palettes/DarkPhotos",
"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"
},
"$:/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)http://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-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/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/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{{$:/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",
"type": "text/vnd.tiddlywiki",
"text": "<!-- For Google, and people without JavaScript-->\nThis [[TiddlyWiki|http://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=\"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=\"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\" />\t\t<!-- Force IE standards mode for Intranet and HTA - should be the first meta -->\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=\"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</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]limit[1]]\">\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<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo Filter/Hint>>\n\n<div class=\"tc-search tc-advanced-search\">\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\n<$button popup=<<qualify \"$:/state/filterDropdown\">> class=\"tc-btn-invisible\">\n{{$:/core/images/down-arrow}}\n</$button>\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<$macrocall $name=\"exportButton\" exportFilter={{$:/temp/advancedsearch}} lingoBase=\"$:/language/Buttons/ExportTiddlers/\"/>\n</$reveal>\n</div>\n\n<div class=\"tc-block-dropdown-wrapper\">\n<$reveal state=<<qualify \"$:/state/filterDropdown\">> type=\"nomatch\" text=\"\" default=\"\">\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</$reveal>\n</div>\n\n</$linkcatcher>\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/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<$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</$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<$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</$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<$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</$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\">(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/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-text tag=\"textarea\" tiddler=\"$:/DefaultTiddlers\"/><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/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/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 lingo-base() $:/language/ControlPanel/Plugins/\n\n\\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}}\"\"\">\n{{$:/language/ControlPanel/Plugins/Reinstall}}\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=\"\"\"This plugin is not currently installed\"\"\">\n<em>\nThis plugin is already installed at version <$text text=<<installedVersion>>/>\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 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<<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 parsing-inner(typeCap)\n<li>\n<$checkbox tiddler=\"\"\"$:/config/WikiParserRules/$typeCap$/$(currentTiddler)$\"\"\" field=\"text\" checked=\"enable\" unchecked=\"disable\" default=\"enable\"> ''<$text text=<<currentTiddler>>/>'': </$checkbox>\n</li>\n\\end\n\n\\define parsing-outer(typeLower,typeCap)\n<ul>\n<$list filter=\"[wikiparserrules[$typeLower$]]\">\n<<parsing-inner typeCap:\"$typeCap$\">>\n</$list>\n</ul>\n\\end\n\n<<lingo Hint>>\n\n! <<lingo Pragma/Caption>>\n\n<<parsing-outer typeLower:\"pragma\" typeCap:\"Pragma\">>\n\n! <<lingo Inline/Caption>>\n\n<<parsing-outer typeLower:\"inline\" typeCap:\"Inline\">>\n\n! <<lingo Block/Caption>>\n\n<<parsing-outer typeLower:\"block\" typeCap:\"Block\">>\n"
},
"$:/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 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)\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<$reveal type=\"nomatch\" state=<<plugin-disable-title>> text=\"yes\">\n<$link to={{!!title}} class=\"tc-plugin-info\">\n<<plugin-table-body type:\"$type$\">>\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$\" disabledMessage:\"<$macrocall $name='lingo' title='Disabled/Status'/>\">>\n</$link>\n</$reveal>\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<$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<$reveal type=\"nomatch\" text=\"\" state=\"!!list\">\n<$macrocall $name=\"tabs\" state=<<tabs-state-macro>> tabsList={{!!list}} default=\"readme\" template=\"$:/core/ui/PluginInfo\"/>\n</$reveal>\n<$reveal type=\"match\" text=\"\" state=\"!!list\">\nNo information provided\n</$reveal>\n</div>\n</div>\n</$reveal>\n</$set>\n</$list>\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": {
"title": "$:/core/ui/ControlPanel/Saving",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Saving/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Saving/\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! <<lingo TiddlySpot/Heading>>\n\n<<lingo TiddlySpot/Description>>\n\n|<<lingo TiddlySpot/UserName>> |<$edit-text tiddler=\"$:/UploadName\" default=\"\" tag=\"input\"/> |\n|<<lingo TiddlySpot/Password>> |<$password name=\"upload\"/> |\n|<<lingo TiddlySpot/Backups>> |<<backupLink>> |\n\n''<<lingo TiddlySpot/Advanced/Heading>>''\n\n|<<lingo TiddlySpot/ServerURL>> |<$edit-text tiddler=\"$:/UploadURL\" default=\"\" tag=\"input\"/> |\n|<<lingo TiddlySpot/Filename>> |<$edit-text tiddler=\"$:/UploadFilename\" default=\"index.html\" tag=\"input\"/> |\n|<<lingo TiddlySpot/UploadDir>> |<$edit-text tiddler=\"$:/UploadDir\" default=\".\" tag=\"input\"/> |\n|<<lingo TiddlySpot/BackupDir>> |<$edit-text tiddler=\"$:/UploadBackupDir\" default=\".\" tag=\"input\"/> |\n\n<<lingo TiddlySpot/Hint>>"
},
"$:/core/ui/ControlPanel/Settings/AutoSave": {
"title": "$:/core/ui/ControlPanel/Settings/AutoSave",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/AutoSave/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/AutoSave/\n\n<$link to=\"$:/config/AutoSave\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/AutoSave\" value=\"yes\"> <<lingo Enabled/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/AutoSave\" value=\"no\"> <<lingo Disabled/Description>> </$radio>\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": {
"caption": "{{$:/language/ControlPanel/Settings/DefaultSidebarTab/Caption}}",
"tags": "$:/tags/ControlPanel/Settings",
"title": "$:/core/ui/ControlPanel/Settings/DefaultSidebarTab",
"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/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/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\\define config-title()\n$:/config/EditToolbarButtons/Visibility/$(listItem)$\n\\end\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<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]\" variable=\"listItem\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>> field=\"caption\"/> <i class=\"tc-muted\">-- <$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\n\n</$set>\n\n</$set>\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\\define config-title()\n$:/config/PageControlButtons/Visibility/$(listItem)$\n\\end\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<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]\" variable=\"listItem\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>> field=\"caption\"/> <i class=\"tc-muted\">-- <$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\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\\define config-title()\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\n\\end\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<$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>> field=\"caption\"/> <i class=\"tc-muted\">-- <$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\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": {
"title": "$:/core/ui/EditTemplate/body",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/Body/\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<em class=\"tc-edit\"><<lingo Hint>></em> <$button type=\"set\" set=\"$:/state/showeditpreview\" setTo=\"no\"><<lingo Preview/Button/Hide>></$button>\n\n<div class=\"tc-tiddler-preview\">\n<div class=\"tc-tiddler-preview-preview\">\n<$set name=\"tv-tiddler-preview\" value=\"yes\">\n\n<$transclude />\n\n</$set>\n</div>\n\n<div class=\"tc-tiddler-preview-edit\">\n<$edit field=\"text\" class=\"tc-edit-texteditor\" placeholder={{$:/language/EditTemplate/Body/Placeholder}}/>\n\n</div>\n\n</div>\n\n</$reveal>\n\n<$reveal state=\"$:/state/showeditpreview\" type=\"nomatch\" text=\"yes\">\n\n<em class=\"tc-edit\"><<lingo Hint>></em> <$button type=\"set\" set=\"$:/state/showeditpreview\" setTo=\"yes\"><<lingo Preview/Button/Show>></$button>\n<$edit field=\"text\" class=\"tc-edit-texteditor\" placeholder={{$:/language/EditTemplate/Body/Placeholder}}/>\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[]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[]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\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\\define tag-styles()\nbackground-color:$(backgroundColor)$;\n\\end\n<div class=\"tc-edit-tags\">\n<$fieldmangler>\n<$list filter=\"[all[current]tags[]sort[title]]\" storyview=\"pop\"><$set name=\"backgroundColor\" value={{!!color}}><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></span>\n</$set>\n</$list>\n\n<div class=\"tc-edit-add-tag\">\n<span class=\"tc-add-tag-name\">\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</span> <$button popup=<<qualify \"$:/state/popup/tags-auto-complete\">> class=\"tc-btn-invisible tc-btn-dropdown\" 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<$button message=\"tm-add-tag\" param={{$:/temp/NewTagName}} set=\"$:/temp/NewTagName\" setTo=\"\" class=\"\">\n<<lingo Tags/Add/Button>>\n</$button>\n</span>\n</div>\n\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<$linkcatcher set=\"$:/temp/NewTagName\" setTo=\"\" message=\"tm-add-tag\">\n<$list filter=\"[tags[]!is[system]search:title{$:/temp/NewTagName}sort[]]\">\n{{||$:/core/ui/Components/tag-link}}\n</$list>\n<hr>\n<$list filter=\"[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]\">\n{{||$:/core/ui/Components/tag-link}}\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>\n</div>\n</$fieldmangler>\n</div>"
},
"$:/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\"/>"
},
"$:/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]]'>\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 frame-classes()\ntc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$\n\\end\n<div class=<<frame-classes>>>\n<$set name=\"storyTiddler\" value=<<currentTiddler>>>\n<$keyboard key={{$:/config/shortcuts/cancel-edit-tiddler}} message=\"tm-cancel-tiddler\">\n<$keyboard key={{$:/config/shortcuts/save-tiddler}} message=\"tm-save-tiddler\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]\" variable=\"listItem\">\n<$transclude tiddler=<<listItem>>/>\n</$list>\n</$keyboard>\n</$keyboard>\n</$set>\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>\n<$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>\n</$fieldmangler>\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/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\\define messageField()\nmessage-$(payloadTiddler)$\n\\end\n\\define selectionField()\nselection-$(payloadTiddler)$\n\\end\n\\define previewPopupState()\n$(currentTiddler)$!!popup-$(payloadTiddler)$\n\\end\n<table>\n<tbody>\n<tr>\n<th>\n<<lingo Listing/Select/Caption>>\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>"
},
"$:/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/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/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/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/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<$transclude tiddler=<<listItem>> mode=\"inline\"/>\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-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)$\"/>\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<<journalButton>>\n</$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/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/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<$transclude tiddler=<<listItem>> mode=\"inline\"/>\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}}>\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<$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\">\nNo ''\"<$text text=<<currentTab>>/>\"'' found\n</$transclude>\n</$transclude>\n</$transclude>\n"
},
"$:/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<$list filter=\"[list[$:/StoryList]]\" history=\"$:/HistoryList\" storyview=\"pop\">\n\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\n</$list>\n\n<$button message=\"tm-close-all-tiddlers\" class=\"tc-btn-invisible tc-btn-mini\"><<lingo Button>></$button>\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;\">\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<$set name=\"resultCount\" value=\"\"\"<$count filter=\"[!is[system]search{$(searchTiddler)$}]\"/>\"\"\">\n{{$:/core/images/down-arrow}} {{$:/language/Search/Matches}}\n</$set>\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{{$:/core/ui/SearchResults}}\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",
"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><$transclude tiddler=\"$:/core/ui/TagTemplate\"/></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": "\\define tag-styles()\nbackground-color:$(backgroundColor)$;\nfill:$(foregroundColor)$;\ncolor:$(foregroundColor)$;\n\\end\n\n\\define tag-body-inner(colour,fallbackTarget,colourA,colourB)\n<$set name=\"foregroundColor\" value=<<contrastcolour target:\"\"\"$colour$\"\"\" fallbackTarget:\"\"\"$fallbackTarget$\"\"\" colourA:\"\"\"$colourA$\"\"\" colourB:\"\"\"$colourB$\"\"\">>>\n<$set name=\"backgroundColor\" value=\"\"\"$colour$\"\"\">\n<$button popup=<<qualify \"$:/state/popup/tag\">> class=\"tc-btn-invisible tc-tag-label\" style=<<tag-styles>>>\n<$transclude tiddler={{!!icon}}/> <$view field=\"title\" format=\"text\" />\n</$button>\n<$reveal state=<<qualify \"$:/state/popup/tag\">> type=\"popup\" position=\"below\" animate=\"yes\"><div class=\"tc-drop-down\"><$transclude tiddler=\"$:/core/ui/ListItemTemplate\"/>\n<hr>\n<$list filter=\"[all[current]tagging[]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n</div>\n</$reveal>\n</$set>\n</$set>\n\\end\n\n\\define tag-body(colour,palette)\n<span class=\"tc-tag-list-item\">\n<$macrocall $name=\"tag-body-inner\" colour=\"\"\"$colour$\"\"\" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}}/>\n</span>\n\\end\n\n<$macrocall $name=\"tag-body\" colour={{!!color}} palette={{$:/palette}}/>"
},
"$:/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": "<$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>\n"
},
"$:/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\n{{||$:/core/ui/TiddlerInfo/Advanced/PluginInfo}}\n\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\"><$transclude tiddler=<<listItem>>/></$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": "<$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\"><$text text={{$:/language/Buttons/Clone/Caption}}/></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": "<$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\"><$text text={{$:/language/Buttons/CloseOthers/Caption}}/></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": "<$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\"><$text text={{$:/language/Buttons/Close/Caption}}/></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": "<$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\"><$text text={{$:/language/Buttons/Edit/Caption}}/></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": "{{$:/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": "<$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\"><$text text={{$:/language/Buttons/FoldOthers/Caption}}/></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": "<$reveal type=\"nomatch\" state=<<folded-state>> text=\"hide\" default=\"show\"><$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={{$:/language/Buttons/Fold/Caption}}/>\n</span>\n</$list>\n</$button></$reveal><$reveal type=\"match\" state=<<folded-state>> text=\"hide\" default=\"show\"><$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={{$:/language/Buttons/Unfold/Caption}}/>\n</span>\n</$list>\n</$button></$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": "<$button popup=<<tiddlerInfoState>> tooltip={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\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\"><$text text={{$:/language/Buttons/Info/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/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": "\\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\"><$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/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]\" variable=\"listItem\">\n\n<$reveal type=\"match\" state=<<config-title>> text=\"hide\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\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": "\\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\"><$text text={{$:/language/Buttons/NewHere/Caption}}/></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": "\\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\"><$text text={{$:/language/Buttons/NewJournalHere/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=\"currentTiddlerTag\" value=<<currentTiddler>>>\n<<journalButton>>\n</$set></$set></$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": "<$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\"><$text text={{$:/language/Buttons/OpenWindow/Caption}}/></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": "<$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\"><$text text={{$:/language/Buttons/Permalink/Caption}}/></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": "<$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\"><$text text={{$:/language/Buttons/Permaview/Caption}}/></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": "#ff0"
},
"$:/config/BitmapEditor/LineWidth": {
"title": "$:/config/BitmapEditor/LineWidth",
"text": "3"
},
"$:/config/DefaultSidebarTab": {
"title": "$:/config/DefaultSidebarTab",
"text": "$:/core/ui/SideBar/Open"
},
"$:/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/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/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": "http://tiddlywiki.com/library/v5.1.11/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/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/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/storyview": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/storyview",
"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/SearchResults/Default": {
"title": "$:/config/SearchResults/Default",
"text": "$:/core/ui/DefaultSearchResultList"
},
"$:/config/SyncFilter": {
"title": "$:/config/SyncFilter",
"text": "[is[tiddler]] -[[$:/HistoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status/]] -[prefix[$:/state/]] -[prefix[$:/temp/]]"
},
"$:/config/TiddlerInfo/Default": {
"title": "$:/config/TiddlerInfo/Default",
"text": "$:/core/ui/TiddlerInfo/Fields"
},
"$:/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/cancel-edit-tiddler": {
"title": "$:/config/shortcuts/cancel-edit-tiddler",
"text": "escape"
},
"$:/config/shortcuts/save-tiddler": {
"title": "$:/config/shortcuts/save-tiddler",
"text": "ctrl+enter"
},
"$:/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 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/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\">\n<$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>\n</span>\n<$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/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"
},
"$:/core/macros/tabs": {
"title": "$:/core/macros/tabs",
"tags": "$:/tags/Macro",
"text": "\\define tabs(tabsList,default,state:\"$:/state/tab\",class,template)\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=<<currentTab>> field=\"caption\">\n<$macrocall $name=\"currentTab\" $type=\"text/plain\" $output=\"text/plain\"/>\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": {
"title": "$:/core/macros/tag",
"tags": "$:/tags/Macro",
"text": "\\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": {
"created": "20141212105914482",
"modified": "20141212110330815",
"tags": "$:/tags/Macro",
"title": "$:/core/macros/timeline",
"type": "text/vnd.tiddlywiki",
"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(rootTag,tag,sort:\"\",itemClassFilter)\n<ol class=\"tc-toc\">\n<$list filter=\"\"\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]\"\"\">\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\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<$list filter=\"\"\"[all[current]] -[[$rootTag$]]\"\"\">\n<$macrocall $name=\"toc-body\" rootTag=\"\"\"$rootTag$\"\"\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\"/>\n</$list>\n</li>\n</$set>\n</$list>\n</ol>\n\\end\n\n\\define toc(tag,sort:\"\",itemClassFilter)\n<<toc-body rootTag:\"\"\"$tag$\"\"\" tag:\"\"\"$tag$\"\"\" sort:\"\"\"$sort$\"\"\" itemClassFilter:\"\"\"itemClassFilter\"\"\">>\n\\end\n\n\\define toc-linked-expandable-body(tag,sort:\"\",itemClassFilter)\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\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$\"\"\"/>\n</$reveal>\n</li>\n</$set>\n</$set>\n\\end\n\n\\define toc-unlinked-expandable-body(tag,sort:\"\",itemClassFilter)\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\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$\"\"\"/>\n</$reveal>\n</li>\n</$set>\n</$set>\n\\end\n\n\\define toc-expandable(tag,sort:\"\",itemClassFilter)\n<ol class=\"tc-toc toc-expandable\">\n<$list filter=\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]\">\n<$list filter=\"[all[current]toc-link[no]]\" emptyMessage=\"<<toc-linked-expandable-body tag:'$tag$' sort:'$sort$' itemClassFilter:'$itemClassFilter$'>>\">\n<<toc-unlinked-expandable-body tag:\"\"\"$tag$\"\"\" sort:\"\"\"$sort$\"\"\" itemClassFilter:\"\"\"itemClassFilter\"\"\">>\n</$list>\n</$list>\n</ol>\n\\end\n\n\\define toc-linked-selective-expandable-body(tag,sort:\"\",itemClassFilter)\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\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$\"\"\"/>\n</$reveal>\n</li>\n</$set>\n</$set>\n\\end\n\n\\define toc-unlinked-selective-expandable-body(tag,sort:\"\",itemClassFilter)\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\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$\"\"\"/>\n</$reveal>\n</li>\n</$set>\n</$set>\n\\end\n\n\\define toc-selective-expandable(tag,sort:\"\",itemClassFilter)\n<ol class=\"tc-toc toc-selective-expandable\">\n<$list filter=\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]\">\n<$list filter=\"[all[current]toc-link[no]]\" variable=\"ignore\" emptyMessage=\"<<toc-linked-selective-expandable-body tag:'$tag$' sort:'$sort$' itemClassFilter:'$itemClassFilter$'>>\">\n<<toc-unlinked-selective-expandable-body tag:\"\"\"$tag$\"\"\" sort:\"\"\"$sort$\"\"\" itemClassFilter:\"\"\"$itemClassFilter$\"\"\">>\n</$list>\n</$list>\n</ol>\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"
},
"$:/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/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/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]]",
"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/import]] [[$:/core/ui/Buttons/export-page]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/advanced-search]] [[$:/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/full-screen]] [[$:/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",
"type": "text/vnd.tiddlywiki",
"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>"
}
}
}
The following tiddlers were imported:
# [[ELLIS: BIBLIOGRAPHY]]
# [[ELLIS: BOOK I]]
# [[ELLIS: BOOK I: CHAPTER I]]
# [[ELLIS: BOOK I: CHAPTER II]]
# [[ELLIS: BOOK I: CHAPTER III]]
# [[ELLIS: BOOK I: CHAPTER IV]]
# [[ELLIS: BOOK I: CHAPTER IX]]
# [[ELLIS: BOOK I: CHAPTER V]]
# [[ELLIS: BOOK I: CHAPTER VI]]
# [[ELLIS: BOOK I: CHAPTER VII]]
# [[ELLIS: BOOK I: CHAPTER VIII]]
# [[ELLIS: BOOK I: CHAPTER X]]
# [[ELLIS: BOOK I: CHAPTER XI]]
# [[ELLIS: BOOK I: CHAPTER XII]]
# [[ELLIS: BOOK I: CHAPTER XIII]]
# [[ELLIS: BOOK II]]
# [[ELLIS: BOOK II: CHAPTER I]]
# [[ELLIS: BOOK II: CHAPTER II]]
# [[ELLIS: BOOK II: CHAPTER III]]
# [[ELLIS: BOOK II: CHAPTER IV]]
# [[ELLIS: BOOK II: CHAPTER IX]]
# [[ELLIS: BOOK II: CHAPTER V]]
# [[ELLIS: BOOK II: CHAPTER VI]]
# [[ELLIS: BOOK II: CHAPTER VII]]
# [[ELLIS: BOOK II: CHAPTER VIII]]
# [[ELLIS: BOOK II: CHAPTER X]]
# [[ELLIS: BOOK II: CHAPTER XI]]
# [[ELLIS: BOOK II: CHAPTER XII]]
# [[ELLIS: BOOK III]]
# [[ELLIS: BOOK III: CHAPTER I]]
# [[ELLIS: BOOK III: CHAPTER II]]
# [[ELLIS: BOOK III: CHAPTER III]]
# [[ELLIS: BOOK III: CHAPTER IV]]
# [[ELLIS: BOOK III: CHAPTER IX]]
# [[ELLIS: BOOK III: CHAPTER V]]
# [[ELLIS: BOOK III: CHAPTER VI]]
# [[ELLIS: BOOK III: CHAPTER VII]]
# [[ELLIS: BOOK III: CHAPTER VIII]]
# [[ELLIS: BOOK III: CHAPTER X]]
# [[ELLIS: BOOK III: CHAPTER XI]]
# [[ELLIS: BOOK III: CHAPTER XII]]
# [[ELLIS: BOOK III: CHAPTER XIII]]
# [[ELLIS: BOOK III: CHAPTER XIV]]
# [[ELLIS: BOOK III: CHAPTER XV]]
# [[ELLIS: BOOK III: CHAPTER XVI]]
# [[ELLIS: BOOK III: CHAPTER XVII]]
# [[ELLIS: BOOK III: CHAPTER XVIII]]
# [[ELLIS: BOOK IV]]
# [[ELLIS: BOOK IV: CHAPTER I]]
# [[ELLIS: BOOK IV: CHAPTER II]]
# [[ELLIS: BOOK IV: CHAPTER III]]
# [[ELLIS: BOOK IV: CHAPTER IV]]
# [[ELLIS: BOOK IV: CHAPTER IX]]
# [[ELLIS: BOOK IV: CHAPTER V]]
# [[ELLIS: BOOK IV: CHAPTER VI]]
# [[ELLIS: BOOK IV: CHAPTER VII]]
# [[ELLIS: BOOK IV: CHAPTER VIII]]
# [[ELLIS: BOOK IV: CHAPTER X]]
# [[ELLIS: BOOK IV: CHAPTER XI]]
# [[ELLIS: BOOK IV: CHAPTER XII]]
# [[ELLIS: BOOK IV: CHAPTER XIII]]
# [[ELLIS: BOOK IV: CHAPTER XIV]]
# [[ELLIS: BOOK IV: CHAPTER XV]]
# [[ELLIS: BOOK IV: CHAPTER XVI]]
# [[ELLIS: BOOK V]]
# [[ELLIS: BOOK V: CHAPTER I]]
# [[ELLIS: BOOK V: CHAPTER II]]
# [[ELLIS: BOOK V: CHAPTER III]]
# [[ELLIS: BOOK V: CHAPTER IV]]
# [[ELLIS: BOOK V: CHAPTER IX]]
# [[ELLIS: BOOK V: CHAPTER V]]
# [[ELLIS: BOOK V: CHAPTER VI]]
# [[ELLIS: BOOK V: CHAPTER VII]]
# [[ELLIS: BOOK V: CHAPTER VIII]]
# [[ELLIS: BOOK V: CHAPTER X]]
# [[ELLIS: BOOK V: CHAPTER XI]]
# [[ELLIS: BOOK V: CHAPTER XII]]
# [[ELLIS: BOOK VI]]
# [[ELLIS: BOOK VI: CHAPTER I]]
# [[ELLIS: BOOK VI: CHAPTER II]]
# [[ELLIS: BOOK VI: CHAPTER III]]
# [[ELLIS: BOOK VI: CHAPTER IV]]
# [[ELLIS: BOOK VI: CHAPTER V]]
# [[ELLIS: BOOK VI: CHAPTER VI]]
# [[ELLIS: BOOK VI: CHAPTER VII]]
# [[ELLIS: BOOK VI: CHAPTER VIII]]
# [[ELLIS: BOOK VII]]
# [[ELLIS: BOOK VII: CHAPTER I]]
# [[ELLIS: BOOK VII: CHAPTER II]]
# [[ELLIS: BOOK VII: CHAPTER III]]
# [[ELLIS: BOOK VII: CHAPTER IV]]
# [[ELLIS: BOOK VII: CHAPTER IX]]
# [[ELLIS: BOOK VII: CHAPTER V]]
# [[ELLIS: BOOK VII: CHAPTER VI]]
# [[ELLIS: BOOK VII: CHAPTER VII]]
# [[ELLIS: BOOK VII: CHAPTER VIII]]
# [[ELLIS: BOOK VII: CHAPTER X]]
# [[ELLIS: BOOK VII: CHAPTER XI]]
# [[ELLIS: BOOK VII: CHAPTER XII]]
# [[ELLIS: BOOK VII: CHAPTER XIII]]
# [[ELLIS: BOOK VII: CHAPTER XIV]]
# [[ELLIS: BOOK VII: CHAPTER XV]]
# [[ELLIS: BOOK VII: CHAPTER XVI]]
# [[ELLIS: BOOK VII: CHAPTER XVII]]
# [[ELLIS: BOOK VIII]]
# [[ELLIS: BOOK VIII: CHAPTER I]]
# [[ELLIS: BOOK VIII: CHAPTER II]]
# [[ELLIS: BOOK VIII: CHAPTER III]]
# [[ELLIS: BOOK VIII: CHAPTER IV]]
# [[ELLIS: BOOK VIII: CHAPTER V]]
# [[ELLIS: BOOK VIII: CHAPTER VI]]
# [[ELLIS: BOOK VIII: CHAPTER VII]]
# [[ELLIS: INTRODUCTION]]
# [[Help]]
# [[Jowett: Book Eight]]
# [[Jowett: Book Eight: Chapter I]]
# [[Jowett: Book Eight: Chapter II]]
# [[Jowett: Book Eight: Chapter III]]
# [[Jowett: Book Eight: Chapter IV]]
# [[Jowett: Book Eight: Chapter V]]
# [[Jowett: Book Eight: Chapter VI]]
# [[Jowett: Book Eight: Chapter VII]]
# [[Jowett: Book Five]]
# [[Jowett: Book Five: Chapter I]]
# [[Jowett: Book Five: Chapter II]]
# [[Jowett: Book Five: Chapter III]]
# [[Jowett: Book Five: Chapter IV]]
# [[Jowett: Book Five: Chapter IX]]
# [[Jowett: Book Five: Chapter V]]
# [[Jowett: Book Five: Chapter VI]]
# [[Jowett: Book Five: Chapter VII]]
# [[Jowett: Book Five: Chapter VIII]]
# [[Jowett: Book Five: Chapter X]]
# [[Jowett: Book Five: Chapter XI]]
# [[Jowett: Book Five: Chapter XII]]
# [[Jowett: Book Four]]
# [[Jowett: Book Four: Chapter I]]
# [[Jowett: Book Four: Chapter II]]
# [[Jowett: Book Four: Chapter III]]
# [[Jowett: Book Four: Chapter IV]]
# [[Jowett: Book Four: Chapter IX]]
# [[Jowett: Book Four: Chapter V]]
# [[Jowett: Book Four: Chapter VI]]
# [[Jowett: Book Four: Chapter VII]]
# [[Jowett: Book Four: Chapter VIII]]
# [[Jowett: Book Four: Chapter X]]
# [[Jowett: Book Four: Chapter XI]]
# [[Jowett: Book Four: Chapter XII]]
# [[Jowett: Book Four: Chapter XIII]]
# [[Jowett: Book Four: Chapter XIV]]
# [[Jowett: Book Four: Chapter XV]]
# [[Jowett: Book Four: Chapter XVI]]
# [[Jowett: Book One]]
# [[Jowett: Book One: Chapter I]]
# [[Jowett: Book One: Chapter II]]
# [[Jowett: Book One: Chapter III]]
# [[Jowett: Book One: Chapter IV]]
# [[Jowett: Book One: Chapter IX]]
# [[Jowett: Book One: Chapter V]]
# [[Jowett: Book One: Chapter VI]]
# [[Jowett: Book One: Chapter VII]]
# [[Jowett: Book One: Chapter VIII]]
# [[Jowett: Book One: Chapter X]]
# [[Jowett: Book One: Chapter XI]]
# [[Jowett: Book One: Chapter XII]]
# [[Jowett: Book One: Chapter XIII]]
# [[Jowett: Book Seven]]
# [[Jowett: Book Seven: Chapter I]]
# [[Jowett: Book Seven: Chapter II]]
# [[Jowett: Book Seven: Chapter III]]
# [[Jowett: Book Seven: Chapter IV]]
# [[Jowett: Book Seven: Chapter IX]]
# [[Jowett: Book Seven: Chapter V]]
# [[Jowett: Book Seven: Chapter VI]]
# [[Jowett: Book Seven: Chapter VII]]
# [[Jowett: Book Seven: Chapter VIII]]
# [[Jowett: Book Seven: Chapter X]]
# [[Jowett: Book Seven: Chapter XI]]
# [[Jowett: Book Seven: Chapter XII]]
# [[Jowett: Book Seven: Chapter XIII]]
# [[Jowett: Book Seven: Chapter XIV]]
# [[Jowett: Book Seven: Chapter XV]]
# [[Jowett: Book Seven: Chapter XVI]]
# [[Jowett: Book Seven: Chapter XVII]]
# [[Jowett: Book Six]]
# [[Jowett: Book Six: Chapter I]]
# [[Jowett: Book Six: Chapter II]]
# [[Jowett: Book Six: Chapter III]]
# [[Jowett: Book Six: Chapter IV]]
# [[Jowett: Book Six: Chapter V]]
# [[Jowett: Book Six: Chapter VI]]
# [[Jowett: Book Six: Chapter VII]]
# [[Jowett: Book Six: Chapter VIII]]
# [[Jowett: Book Three]]
# [[Jowett: Book Three: Chapter I]]
# [[Jowett: Book Three: Chapter II]]
# [[Jowett: Book Three: Chapter III]]
# [[Jowett: Book Three: Chapter IV]]
# [[Jowett: Book Three: Chapter IX]]
# [[Jowett: Book Three: Chapter V]]
# [[Jowett: Book Three: Chapter VI]]
# [[Jowett: Book Three: Chapter VII]]
# [[Jowett: Book Three: Chapter VIII]]
# [[Jowett: Book Three: Chapter X]]
# [[Jowett: Book Three: Chapter XI]]
# [[Jowett: Book Three: Chapter XII]]
# [[Jowett: Book Three: Chapter XIII]]
# [[Jowett: Book Three: Chapter XIV]]
# [[Jowett: Book Three: Chapter XV]]
# [[Jowett: Book Three: Chapter XVI]]
# [[Jowett: Book Three: Chapter XVII]]
# [[Jowett: Book Three: Chapter XVIII]]
# [[Jowett: Book Two]]
# [[Jowett: Book Two: Chapter I]]
# [[Jowett: Book Two: Chapter II]]
# [[Jowett: Book Two: Chapter III]]
# [[Jowett: Book Two: Chapter IV]]
# [[Jowett: Book Two: Chapter IX]]
# [[Jowett: Book Two: Chapter V]]
# [[Jowett: Book Two: Chapter VI]]
# [[Jowett: Book Two: Chapter VII]]
# [[Jowett: Book Two: Chapter VIII]]
# [[Jowett: Book Two: Chapter X]]
# [[Jowett: Book Two: Chapter XI]]
# [[Jowett: Book Two: Chapter XII]]
# [[Note on Tiddler Titles]]
# [[Politics]]
# [[Rackham: Book: 1]]
# [[Rackham: Book: 1, Section: 1252a]]
# [[Rackham: Book: 1, Section: 1252a, Note: 1]]
# [[Rackham: Book: 1, Section: 1252a, Note: 2]]
# [[Rackham: Book: 1, Section: 1252a, Note: 3]]
# [[Rackham: Book: 1, Section: 1252b]]
# [[Rackham: Book: 1, Section: 1252b, Note: 1]]
# [[Rackham: Book: 1, Section: 1252b, Note: 2]]
# [[Rackham: Book: 1, Section: 1252b, Note: 3]]
# [[Rackham: Book: 1, Section: 1252b, Note: 4]]
# [[Rackham: Book: 1, Section: 1252b, Note: 5]]
# [[Rackham: Book: 1, Section: 1252b, Note: 6]]
# [[Rackham: Book: 1, Section: 1252b, Note: 7]]
# [[Rackham: Book: 1, Section: 1252b, Note: 8]]
# [[Rackham: Book: 1, Section: 1252b, Note: 9]]
# [[Rackham: Book: 1, Section: 1253a]]
# [[Rackham: Book: 1, Section: 1253a, Note: 1]]
# [[Rackham: Book: 1, Section: 1253b]]
# [[Rackham: Book: 1, Section: 1253b, Note: 1]]
# [[Rackham: Book: 1, Section: 1253b, Note: 2]]
# [[Rackham: Book: 1, Section: 1253b, Note: 3]]
# [[Rackham: Book: 1, Section: 1253b, Note: 4]]
# [[Rackham: Book: 1, Section: 1253b, Note: 5]]
# [[Rackham: Book: 1, Section: 1254a]]
# [[Rackham: Book: 1, Section: 1254a, Note: 1]]
# [[Rackham: Book: 1, Section: 1254a, Note: 2]]
# [[Rackham: Book: 1, Section: 1254b]]
# [[Rackham: Book: 1, Section: 1255a]]
# [[Rackham: Book: 1, Section: 1255a, Note: 1]]
# [[Rackham: Book: 1, Section: 1255a, Note: 2]]
# [[Rackham: Book: 1, Section: 1255b]]
# [[Rackham: Book: 1, Section: 1255b, Note: 1]]
# [[Rackham: Book: 1, Section: 1256a]]
# [[Rackham: Book: 1, Section: 1256a, Note: 1]]
# [[Rackham: Book: 1, Section: 1256a, Note: 2]]
# [[Rackham: Book: 1, Section: 1256b]]
# [[Rackham: Book: 1, Section: 1256b, Note: 1]]
# [[Rackham: Book: 1, Section: 1256b, Note: 2]]
# [[Rackham: Book: 1, Section: 1257a]]
# [[Rackham: Book: 1, Section: 1257a, Note: 1]]
# [[Rackham: Book: 1, Section: 1257b]]
# [[Rackham: Book: 1, Section: 1257b, Note: 1]]
# [[Rackham: Book: 1, Section: 1257b, Note: 2]]
# [[Rackham: Book: 1, Section: 1258a]]
# [[Rackham: Book: 1, Section: 1258a, Note: 1]]
# [[Rackham: Book: 1, Section: 1258a, Note: 2]]
# [[Rackham: Book: 1, Section: 1258b]]
# [[Rackham: Book: 1, Section: 1258b, Note: 1]]
# [[Rackham: Book: 1, Section: 1258b, Note: 2]]
# [[Rackham: Book: 1, Section: 1258b, Note: 3]]
# [[Rackham: Book: 1, Section: 1258b, Note: 4]]
# [[Rackham: Book: 1, Section: 1259a]]
# [[Rackham: Book: 1, Section: 1259a, Note: 1]]
# [[Rackham: Book: 1, Section: 1259a, Note: 2]]
# [[Rackham: Book: 1, Section: 1259a, Note: 3]]
# [[Rackham: Book: 1, Section: 1259a, Note: 4]]
# [[Rackham: Book: 1, Section: 1259a, Note: 5]]
# [[Rackham: Book: 1, Section: 1259a, Note: 6]]
# [[Rackham: Book: 1, Section: 1259a, Note: 7]]
# [[Rackham: Book: 1, Section: 1259a, Note: 8]]
# [[Rackham: Book: 1, Section: 1259a, Note: 9]]
# [[Rackham: Book: 1, Section: 1259b]]
# [[Rackham: Book: 1, Section: 1259b, Note: 1]]
# [[Rackham: Book: 1, Section: 1259b, Note: 2]]
# [[Rackham: Book: 1, Section: 1260a]]
# [[Rackham: Book: 1, Section: 1260a, Note: 1]]
# [[Rackham: Book: 1, Section: 1260a, Note: 2]]
# [[Rackham: Book: 1, Section: 1260a, Note: 3]]
# [[Rackham: Book: 1, Section: 1260a, Note: 4]]
# [[Rackham: Book: 1, Section: 1260a, Note: 5]]
# [[Rackham: Book: 1, Section: 1260a, Note: 6]]
# [[Rackham: Book: 1, Section: 1260b]]
# [[Rackham: Book: 1, Section: 1260b, Note: 1]]
# [[Rackham: Book: 2]]
# [[Rackham: Book: 2, Section: 1260b]]
# [[Rackham: Book: 2, Section: 1261a]]
# [[Rackham: Book: 2, Section: 1261a, Note: 1]]
# [[Rackham: Book: 2, Section: 1261a, Note: 2]]
# [[Rackham: Book: 2, Section: 1261a, Note: 3]]
# [[Rackham: Book: 2, Section: 1261a, Note: 4]]
# [[Rackham: Book: 2, Section: 1261b]]
# [[Rackham: Book: 2, Section: 1261b, Note: 1]]
# [[Rackham: Book: 2, Section: 1261b, Note: 2]]
# [[Rackham: Book: 2, Section: 1262a]]
# [[Rackham: Book: 2, Section: 1262a, Note: 1]]
# [[Rackham: Book: 2, Section: 1262a, Note: 2]]
# [[Rackham: Book: 2, Section: 1262b]]
# [[Rackham: Book: 2, Section: 1262b, Note: 1]]
# [[Rackham: Book: 2, Section: 1262b, Note: 2]]
# [[Rackham: Book: 2, Section: 1263a]]
# [[Rackham: Book: 2, Section: 1263a, Note: 1]]
# [[Rackham: Book: 2, Section: 1263a, Note: 2]]
# [[Rackham: Book: 2, Section: 1263a, Note: 3]]
# [[Rackham: Book: 2, Section: 1263b]]
# [[Rackham: Book: 2, Section: 1264a]]
# [[Rackham: Book: 2, Section: 1264a, Note: 1]]
# [[Rackham: Book: 2, Section: 1264b]]
# [[Rackham: Book: 2, Section: 1264b, Note: 1]]
# [[Rackham: Book: 2, Section: 1264b, Note: 2]]
# [[Rackham: Book: 2, Section: 1265a]]
# [[Rackham: Book: 2, Section: 1265a, Note: 1]]
# [[Rackham: Book: 2, Section: 1265a, Note: 2]]
# [[Rackham: Book: 2, Section: 1265b]]
# [[Rackham: Book: 2, Section: 1265b, Note: 1]]
# [[Rackham: Book: 2, Section: 1265b, Note: 2]]
# [[Rackham: Book: 2, Section: 1265b, Note: 3]]
# [[Rackham: Book: 2, Section: 1265b, Note: 4]]
# [[Rackham: Book: 2, Section: 1266a]]
# [[Rackham: Book: 2, Section: 1266a, Note: 1]]
# [[Rackham: Book: 2, Section: 1266a, Note: 2]]
# [[Rackham: Book: 2, Section: 1266a, Note: 3]]
# [[Rackham: Book: 2, Section: 1266a, Note: 4]]
# [[Rackham: Book: 2, Section: 1266b]]
# [[Rackham: Book: 2, Section: 1266b, Note: 1]]
# [[Rackham: Book: 2, Section: 1267a]]
# [[Rackham: Book: 2, Section: 1267a, Note: 1]]
# [[Rackham: Book: 2, Section: 1267a, Note: 2]]
# [[Rackham: Book: 2, Section: 1267b]]
# [[Rackham: Book: 2, Section: 1267b, Note: 1]]
# [[Rackham: Book: 2, Section: 1267b, Note: 2]]
# [[Rackham: Book: 2, Section: 1267b, Note: 3]]
# [[Rackham: Book: 2, Section: 1268a]]
# [[Rackham: Book: 2, Section: 1268a, Note: 1]]
# [[Rackham: Book: 2, Section: 1268b]]
# [[Rackham: Book: 2, Section: 1268b, Note: 1]]
# [[Rackham: Book: 2, Section: 1269a]]
# [[Rackham: Book: 2, Section: 1269a, Note: 1]]
# [[Rackham: Book: 2, Section: 1269a, Note: 2]]
# [[Rackham: Book: 2, Section: 1269b]]
# [[Rackham: Book: 2, Section: 1269b, Note: 1]]
# [[Rackham: Book: 2, Section: 1269b, Note: 2]]
# [[Rackham: Book: 2, Section: 1270a]]
# [[Rackham: Book: 2, Section: 1270a, Note: 1]]
# [[Rackham: Book: 2, Section: 1270a, Note: 2]]
# [[Rackham: Book: 2, Section: 1270a, Note: 3]]
# [[Rackham: Book: 2, Section: 1270b]]
# [[Rackham: Book: 2, Section: 1270b, Note: 1]]
# [[Rackham: Book: 2, Section: 1270b, Note: 2]]
# [[Rackham: Book: 2, Section: 1270b, Note: 3]]
# [[Rackham: Book: 2, Section: 1270b, Note: 4]]
# [[Rackham: Book: 2, Section: 1271a]]
# [[Rackham: Book: 2, Section: 1271b]]
# [[Rackham: Book: 2, Section: 1271b, Note: 1]]
# [[Rackham: Book: 2, Section: 1271b, Note: 2]]
# [[Rackham: Book: 2, Section: 1271b, Note: 3]]
# [[Rackham: Book: 2, Section: 1271b, Note: 4]]
# [[Rackham: Book: 2, Section: 1271b, Note: 5]]
# [[Rackham: Book: 2, Section: 1272a]]
# [[Rackham: Book: 2, Section: 1272a, Note: 1]]
# [[Rackham: Book: 2, Section: 1272b]]
# [[Rackham: Book: 2, Section: 1272b, Note: 1]]
# [[Rackham: Book: 2, Section: 1272b, Note: 2]]
# [[Rackham: Book: 2, Section: 1272b, Note: 3]]
# [[Rackham: Book: 2, Section: 1272b, Note: 4]]
# [[Rackham: Book: 2, Section: 1272b, Note: 5]]
# [[Rackham: Book: 2, Section: 1272b, Note: 6]]
# [[Rackham: Book: 2, Section: 1273a]]
# [[Rackham: Book: 2, Section: 1273a, Note: 1]]
# [[Rackham: Book: 2, Section: 1273a, Note: 2]]
# [[Rackham: Book: 2, Section: 1273b]]
# [[Rackham: Book: 2, Section: 1273b, Note: 1]]
# [[Rackham: Book: 2, Section: 1274a]]
# [[Rackham: Book: 2, Section: 1274a, Note: 1]]
# [[Rackham: Book: 2, Section: 1274a, Note: 2]]
# [[Rackham: Book: 2, Section: 1274a, Note: 3]]
# [[Rackham: Book: 2, Section: 1274a, Note: 4]]
# [[Rackham: Book: 2, Section: 1274a, Note: 5]]
# [[Rackham: Book: 2, Section: 1274a, Note: 6]]
# [[Rackham: Book: 2, Section: 1274b]]
# [[Rackham: Book: 2, Section: 1274b, Note: 1]]
# [[Rackham: Book: 2, Section: 1274b, Note: 2]]
# [[Rackham: Book: 2, Section: 1274b, Note: 3]]
# [[Rackham: Book: 2, Section: 1274b, Note: 4]]
# [[Rackham: Book: 2, Section: 1274b, Note: 5]]
# [[Rackham: Book: 2, Section: 1274b, Note: 6]]
# [[Rackham: Book: 3]]
# [[Rackham: Book: 3, Section: 1274b]]
# [[Rackham: Book: 3, Section: 1274b, Note: 1]]
# [[Rackham: Book: 3, Section: 1275a]]
# [[Rackham: Book: 3, Section: 1275a, Note: 1]]
# [[Rackham: Book: 3, Section: 1275a, Note: 2]]
# [[Rackham: Book: 3, Section: 1275a, Note: 3]]
# [[Rackham: Book: 3, Section: 1275b]]
# [[Rackham: Book: 3, Section: 1275b, Note: 1]]
# [[Rackham: Book: 3, Section: 1275b, Note: 2]]
# [[Rackham: Book: 3, Section: 1275b, Note: 3]]
# [[Rackham: Book: 3, Section: 1275b, Note: 4]]
# [[Rackham: Book: 3, Section: 1276a]]
# [[Rackham: Book: 3, Section: 1276a, Note: 1]]
# [[Rackham: Book: 3, Section: 1276a, Note: 2]]
# [[Rackham: Book: 3, Section: 1276b]]
# [[Rackham: Book: 3, Section: 1276b, Note: 1]]
# [[Rackham: Book: 3, Section: 1277a]]
# [[Rackham: Book: 3, Section: 1277a, Note: 1]]
# [[Rackham: Book: 3, Section: 1277a, Note: 2]]
# [[Rackham: Book: 3, Section: 1277a, Note: 3]]
# [[Rackham: Book: 3, Section: 1277a, Note: 4]]
# [[Rackham: Book: 3, Section: 1277b]]
# [[Rackham: Book: 3, Section: 1277b, Note: 1]]
# [[Rackham: Book: 3, Section: 1278a]]
# [[Rackham: Book: 3, Section: 1278a, Note: 1]]
# [[Rackham: Book: 3, Section: 1278a, Note: 2]]
# [[Rackham: Book: 3, Section: 1278a, Note: 3]]
# [[Rackham: Book: 3, Section: 1278a, Note: 4]]
# [[Rackham: Book: 3, Section: 1278b]]
# [[Rackham: Book: 3, Section: 1278b, Note: 1]]
# [[Rackham: Book: 3, Section: 1278b, Note: 2]]
# [[Rackham: Book: 3, Section: 1278b, Note: 3]]
# [[Rackham: Book: 3, Section: 1279a]]
# [[Rackham: Book: 3, Section: 1279b]]
# [[Rackham: Book: 3, Section: 1279b, Note: 1]]
# [[Rackham: Book: 3, Section: 1280a]]
# [[Rackham: Book: 3, Section: 1280a, Note: 1]]
# [[Rackham: Book: 3, Section: 1280a, Note: 2]]
# [[Rackham: Book: 3, Section: 1280a, Note: 3]]
# [[Rackham: Book: 3, Section: 1280a, Note: 4]]
# [[Rackham: Book: 3, Section: 1280b]]
# [[Rackham: Book: 3, Section: 1280b, Note: 1]]
# [[Rackham: Book: 3, Section: 1281a]]
# [[Rackham: Book: 3, Section: 1281a, Note: 1]]
# [[Rackham: Book: 3, Section: 1281b]]
# [[Rackham: Book: 3, Section: 1281b, Note: 1]]
# [[Rackham: Book: 3, Section: 1282a]]
# [[Rackham: Book: 3, Section: 1282a, Note: 1]]
# [[Rackham: Book: 3, Section: 1282b]]
# [[Rackham: Book: 3, Section: 1282b, Note: 1]]
# [[Rackham: Book: 3, Section: 1282b, Note: 2]]
# [[Rackham: Book: 3, Section: 1282b, Note: 3]]
# [[Rackham: Book: 3, Section: 1282b, Note: 4]]
# [[Rackham: Book: 3, Section: 1282b, Note: 5]]
# [[Rackham: Book: 3, Section: 1282b, Note: 6]]
# [[Rackham: Book: 3, Section: 1282b, Note: 7]]
# [[Rackham: Book: 3, Section: 1282b, Note: 8]]
# [[Rackham: Book: 3, Section: 1283a]]
# [[Rackham: Book: 3, Section: 1283a, Note: 1]]
# [[Rackham: Book: 3, Section: 1283a, Note: 2]]
# [[Rackham: Book: 3, Section: 1283b]]
# [[Rackham: Book: 3, Section: 1283b, Note: 1]]
# [[Rackham: Book: 3, Section: 1284a]]
# [[Rackham: Book: 3, Section: 1284a, Note: 1]]
# [[Rackham: Book: 3, Section: 1284a, Note: 2]]
# [[Rackham: Book: 3, Section: 1284a, Note: 3]]
# [[Rackham: Book: 3, Section: 1284a, Note: 4]]
# [[Rackham: Book: 3, Section: 1284a, Note: 5]]
# [[Rackham: Book: 3, Section: 1284b]]
# [[Rackham: Book: 3, Section: 1284b, Note: 1]]
# [[Rackham: Book: 3, Section: 1285a]]
# [[Rackham: Book: 3, Section: 1285a, Note: 1]]
# [[Rackham: Book: 3, Section: 1285a, Note: 2]]
# [[Rackham: Book: 3, Section: 1285a, Note: 3]]
# [[Rackham: Book: 3, Section: 1285b]]
# [[Rackham: Book: 3, Section: 1285b, Note: 1]]
# [[Rackham: Book: 3, Section: 1285b, Note: 2]]
# [[Rackham: Book: 3, Section: 1285b, Note: 3]]
# [[Rackham: Book: 3, Section: 1286a]]
# [[Rackham: Book: 3, Section: 1286a, Note: 1]]
# [[Rackham: Book: 3, Section: 1286a, Note: 2]]
# [[Rackham: Book: 3, Section: 1286b]]
# [[Rackham: Book: 3, Section: 1286b, Note: 1]]
# [[Rackham: Book: 3, Section: 1286b, Note: 2]]
# [[Rackham: Book: 3, Section: 1286b, Note: 3]]
# [[Rackham: Book: 3, Section: 1287a]]
# [[Rackham: Book: 3, Section: 1287a, Note: 1]]
# [[Rackham: Book: 3, Section: 1287a, Note: 2]]
# [[Rackham: Book: 3, Section: 1287a, Note: 3]]
# [[Rackham: Book: 3, Section: 1287a, Note: 4]]
# [[Rackham: Book: 3, Section: 1287a, Note: 5]]
# [[Rackham: Book: 3, Section: 1287b]]
# [[Rackham: Book: 3, Section: 1287b, Note: 1]]
# [[Rackham: Book: 3, Section: 1287b, Note: 2]]
# [[Rackham: Book: 3, Section: 1287b, Note: 3]]
# [[Rackham: Book: 3, Section: 1287b, Note: 4]]
# [[Rackham: Book: 3, Section: 1288a]]
# [[Rackham: Book: 3, Section: 1288a, Note: 1]]
# [[Rackham: Book: 3, Section: 1288a, Note: 2]]
# [[Rackham: Book: 3, Section: 1288a, Note: 3]]
# [[Rackham: Book: 3, Section: 1288a, Note: 4]]
# [[Rackham: Book: 3, Section: 1288a, Note: 5]]
# [[Rackham: Book: 3, Section: 1288b]]
# [[Rackham: Book: 3, Section: 1288b, Note: 1]]
# [[Rackham: Book: 4]]
# [[Rackham: Book: 4, Section: 1288b]]
# [[Rackham: Book: 4, Section: 1288b, Note: 1]]
# [[Rackham: Book: 4, Section: 1288b, Note: 2]]
# [[Rackham: Book: 4, Section: 1288b, Note: 3]]
# [[Rackham: Book: 4, Section: 1288b, Note: 4]]
# [[Rackham: Book: 4, Section: 1288b, Note: 5]]
# [[Rackham: Book: 4, Section: 1289a]]
# [[Rackham: Book: 4, Section: 1289a, Note: 1]]
# [[Rackham: Book: 4, Section: 1289a, Note: 2]]
# [[Rackham: Book: 4, Section: 1289a, Note: 3]]
# [[Rackham: Book: 4, Section: 1289a, Note: 4]]
# [[Rackham: Book: 4, Section: 1289a, Note: 5]]
# [[Rackham: Book: 4, Section: 1289b]]
# [[Rackham: Book: 4, Section: 1289b, Note: 1]]
# [[Rackham: Book: 4, Section: 1290a]]
# [[Rackham: Book: 4, Section: 1290a, Note: 1]]
# [[Rackham: Book: 4, Section: 1290a, Note: 2]]
# [[Rackham: Book: 4, Section: 1290b]]
# [[Rackham: Book: 4, Section: 1290b, Note: 1]]
# [[Rackham: Book: 4, Section: 1290b, Note: 2]]
# [[Rackham: Book: 4, Section: 1290b, Note: 3]]
# [[Rackham: Book: 4, Section: 1290b, Note: 4]]
# [[Rackham: Book: 4, Section: 1291a]]
# [[Rackham: Book: 4, Section: 1291a, Note: 1]]
# [[Rackham: Book: 4, Section: 1291a, Note: 2]]
# [[Rackham: Book: 4, Section: 1291a, Note: 3]]
# [[Rackham: Book: 4, Section: 1291a, Note: 4]]
# [[Rackham: Book: 4, Section: 1291b]]
# [[Rackham: Book: 4, Section: 1291b, Note: 1]]
# [[Rackham: Book: 4, Section: 1292a]]
# [[Rackham: Book: 4, Section: 1292a, Note: 1]]
# [[Rackham: Book: 4, Section: 1292a, Note: 2]]
# [[Rackham: Book: 4, Section: 1292b]]
# [[Rackham: Book: 4, Section: 1292b, Note: 1]]
# [[Rackham: Book: 4, Section: 1292b, Note: 2]]
# [[Rackham: Book: 4, Section: 1293a]]
# [[Rackham: Book: 4, Section: 1293a, Note: 1]]
# [[Rackham: Book: 4, Section: 1293a, Note: 2]]
# [[Rackham: Book: 4, Section: 1293a, Note: 3]]
# [[Rackham: Book: 4, Section: 1293a, Note: 4]]
# [[Rackham: Book: 4, Section: 1293b]]
# [[Rackham: Book: 4, Section: 1293b, Note: 1]]
# [[Rackham: Book: 4, Section: 1293b, Note: 2]]
# [[Rackham: Book: 4, Section: 1294a]]
# [[Rackham: Book: 4, Section: 1294a, Note: 1]]
# [[Rackham: Book: 4, Section: 1294a, Note: 2]]
# [[Rackham: Book: 4, Section: 1294a, Note: 3]]
# [[Rackham: Book: 4, Section: 1294b]]
# [[Rackham: Book: 4, Section: 1294b, Note: 1]]
# [[Rackham: Book: 4, Section: 1294b, Note: 2]]
# [[Rackham: Book: 4, Section: 1295a]]
# [[Rackham: Book: 4, Section: 1295a, Note: 1]]
# [[Rackham: Book: 4, Section: 1295a, Note: 2]]
# [[Rackham: Book: 4, Section: 1295a, Note: 3]]
# [[Rackham: Book: 4, Section: 1295b]]
# [[Rackham: Book: 4, Section: 1295b, Note: 1]]
# [[Rackham: Book: 4, Section: 1295b, Note: 2]]
# [[Rackham: Book: 4, Section: 1295b, Note: 3]]
# [[Rackham: Book: 4, Section: 1295b, Note: 4]]
# [[Rackham: Book: 4, Section: 1296a]]
# [[Rackham: Book: 4, Section: 1296a, Note: 1]]
# [[Rackham: Book: 4, Section: 1296b]]
# [[Rackham: Book: 4, Section: 1296b, Note: 1]]
# [[Rackham: Book: 4, Section: 1296b, Note: 2]]
# [[Rackham: Book: 4, Section: 1296b, Note: 3]]
# [[Rackham: Book: 4, Section: 1297a]]
# [[Rackham: Book: 4, Section: 1297b]]
# [[Rackham: Book: 4, Section: 1298a]]
# [[Rackham: Book: 4, Section: 1298a, Note: 1]]
# [[Rackham: Book: 4, Section: 1298a, Note: 2]]
# [[Rackham: Book: 4, Section: 1298b]]
# [[Rackham: Book: 4, Section: 1298b, Note: 1]]
# [[Rackham: Book: 4, Section: 1298b, Note: 2]]
# [[Rackham: Book: 4, Section: 1299a]]
# [[Rackham: Book: 4, Section: 1299a, Note: 1]]
# [[Rackham: Book: 4, Section: 1299b]]
# [[Rackham: Book: 4, Section: 1299b, Note: 1]]
# [[Rackham: Book: 4, Section: 1299b, Note: 2]]
# [[Rackham: Book: 4, Section: 1300a]]
# [[Rackham: Book: 4, Section: 1300a, Note: 1]]
# [[Rackham: Book: 4, Section: 1300a, Note: 2]]
# [[Rackham: Book: 4, Section: 1300a, Note: 3]]
# [[Rackham: Book: 4, Section: 1300b]]
# [[Rackham: Book: 4, Section: 1300b, Note: 1]]
# [[Rackham: Book: 4, Section: 1300b, Note: 2]]
# [[Rackham: Book: 4, Section: 1301a]]
# [[Rackham: Book: 5]]
# [[Rackham: Book: 5, Section: 1301a]]
# [[Rackham: Book: 5, Section: 1301a, Note: 1]]
# [[Rackham: Book: 5, Section: 1301a, Note: 2]]
# [[Rackham: Book: 5, Section: 1301b]]
# [[Rackham: Book: 5, Section: 1301b, Note: 1]]
# [[Rackham: Book: 5, Section: 1301b, Note: 2]]
# [[Rackham: Book: 5, Section: 1301b, Note: 3]]
# [[Rackham: Book: 5, Section: 1301b, Note: 4]]
# [[Rackham: Book: 5, Section: 1302a]]
# [[Rackham: Book: 5, Section: 1302a, Note: 1]]
# [[Rackham: Book: 5, Section: 1302a, Note: 2]]
# [[Rackham: Book: 5, Section: 1302b]]
# [[Rackham: Book: 5, Section: 1302b, Note: 1]]
# [[Rackham: Book: 5, Section: 1302b, Note: 2]]
# [[Rackham: Book: 5, Section: 1302b, Note: 3]]
# [[Rackham: Book: 5, Section: 1302b, Note: 4]]
# [[Rackham: Book: 5, Section: 1302b, Note: 5]]
# [[Rackham: Book: 5, Section: 1302b, Note: 6]]
# [[Rackham: Book: 5, Section: 1302b, Note: 7]]
# [[Rackham: Book: 5, Section: 1302b, Note: 8]]
# [[Rackham: Book: 5, Section: 1302b, Note: 9]]
# [[Rackham: Book: 5, Section: 1303a]]
# [[Rackham: Book: 5, Section: 1303a, Note: 1]]
# [[Rackham: Book: 5, Section: 1303a, Note: 10]]
# [[Rackham: Book: 5, Section: 1303a, Note: 2]]
# [[Rackham: Book: 5, Section: 1303a, Note: 3]]
# [[Rackham: Book: 5, Section: 1303a, Note: 4]]
# [[Rackham: Book: 5, Section: 1303a, Note: 5]]
# [[Rackham: Book: 5, Section: 1303a, Note: 6]]
# [[Rackham: Book: 5, Section: 1303a, Note: 7]]
# [[Rackham: Book: 5, Section: 1303a, Note: 8]]
# [[Rackham: Book: 5, Section: 1303a, Note: 9]]
# [[Rackham: Book: 5, Section: 1303b]]
# [[Rackham: Book: 5, Section: 1303b, Note: 1]]
# [[Rackham: Book: 5, Section: 1303b, Note: 2]]
# [[Rackham: Book: 5, Section: 1303b, Note: 3]]
# [[Rackham: Book: 5, Section: 1303b, Note: 4]]
# [[Rackham: Book: 5, Section: 1303b, Note: 5]]
# [[Rackham: Book: 5, Section: 1303b, Note: 6]]
# [[Rackham: Book: 5, Section: 1303b, Note: 7]]
# [[Rackham: Book: 5, Section: 1303b, Note: 8]]
# [[Rackham: Book: 5, Section: 1304a]]
# [[Rackham: Book: 5, Section: 1304a, Note: 1]]
# [[Rackham: Book: 5, Section: 1304a, Note: 2]]
# [[Rackham: Book: 5, Section: 1304a, Note: 3]]
# [[Rackham: Book: 5, Section: 1304a, Note: 4]]
# [[Rackham: Book: 5, Section: 1304a, Note: 5]]
# [[Rackham: Book: 5, Section: 1304b]]
# [[Rackham: Book: 5, Section: 1304b, Note: 1]]
# [[Rackham: Book: 5, Section: 1304b, Note: 2]]
# [[Rackham: Book: 5, Section: 1304b, Note: 3]]
# [[Rackham: Book: 5, Section: 1304b, Note: 4]]
# [[Rackham: Book: 5, Section: 1304b, Note: 5]]
# [[Rackham: Book: 5, Section: 1304b, Note: 6]]
# [[Rackham: Book: 5, Section: 1305a]]
# [[Rackham: Book: 5, Section: 1305a, Note: 1]]
# [[Rackham: Book: 5, Section: 1305a, Note: 2]]
# [[Rackham: Book: 5, Section: 1305a, Note: 3]]
# [[Rackham: Book: 5, Section: 1305b]]
# [[Rackham: Book: 5, Section: 1305b, Note: 1]]
# [[Rackham: Book: 5, Section: 1305b, Note: 10]]
# [[Rackham: Book: 5, Section: 1305b, Note: 11]]
# [[Rackham: Book: 5, Section: 1305b, Note: 2]]
# [[Rackham: Book: 5, Section: 1305b, Note: 3]]
# [[Rackham: Book: 5, Section: 1305b, Note: 4]]
# [[Rackham: Book: 5, Section: 1305b, Note: 5]]
# [[Rackham: Book: 5, Section: 1305b, Note: 6]]
# [[Rackham: Book: 5, Section: 1305b, Note: 7]]
# [[Rackham: Book: 5, Section: 1305b, Note: 8]]
# [[Rackham: Book: 5, Section: 1305b, Note: 9]]
# [[Rackham: Book: 5, Section: 1306a]]
# [[Rackham: Book: 5, Section: 1306a, Note: 1]]
# [[Rackham: Book: 5, Section: 1306a, Note: 2]]
# [[Rackham: Book: 5, Section: 1306a, Note: 3]]
# [[Rackham: Book: 5, Section: 1306a, Note: 4]]
# [[Rackham: Book: 5, Section: 1306a, Note: 5]]
# [[Rackham: Book: 5, Section: 1306a, Note: 6]]
# [[Rackham: Book: 5, Section: 1306a, Note: 7]]
# [[Rackham: Book: 5, Section: 1306a, Note: 8]]
# [[Rackham: Book: 5, Section: 1306a, Note: 9]]
# [[Rackham: Book: 5, Section: 1306b]]
# [[Rackham: Book: 5, Section: 1306b, Note: 1]]
# [[Rackham: Book: 5, Section: 1306b, Note: 2]]
# [[Rackham: Book: 5, Section: 1306b, Note: 3]]
# [[Rackham: Book: 5, Section: 1306b, Note: 4]]
# [[Rackham: Book: 5, Section: 1306b, Note: 5]]
# [[Rackham: Book: 5, Section: 1307a]]
# [[Rackham: Book: 5, Section: 1307a, Note: 1]]
# [[Rackham: Book: 5, Section: 1307a, Note: 2]]
# [[Rackham: Book: 5, Section: 1307a, Note: 3]]
# [[Rackham: Book: 5, Section: 1307a, Note: 4]]
# [[Rackham: Book: 5, Section: 1307a, Note: 5]]
# [[Rackham: Book: 5, Section: 1307a, Note: 6]]
# [[Rackham: Book: 5, Section: 1307b]]
# [[Rackham: Book: 5, Section: 1307b, Note: 1]]
# [[Rackham: Book: 5, Section: 1308a]]
# [[Rackham: Book: 5, Section: 1308a, Note: 1]]
# [[Rackham: Book: 5, Section: 1308b]]
# [[Rackham: Book: 5, Section: 1308b, Note: 1]]
# [[Rackham: Book: 5, Section: 1308b, Note: 2]]
# [[Rackham: Book: 5, Section: 1308b, Note: 3]]
# [[Rackham: Book: 5, Section: 1308b, Note: 4]]
# [[Rackham: Book: 5, Section: 1308b, Note: 5]]
# [[Rackham: Book: 5, Section: 1309a]]
# [[Rackham: Book: 5, Section: 1309a, Note: 1]]
# [[Rackham: Book: 5, Section: 1309a, Note: 2]]
# [[Rackham: Book: 5, Section: 1309a, Note: 3]]
# [[Rackham: Book: 5, Section: 1309a, Note: 4]]
# [[Rackham: Book: 5, Section: 1309b]]
# [[Rackham: Book: 5, Section: 1309b, Note: 1]]
# [[Rackham: Book: 5, Section: 1310a]]
# [[Rackham: Book: 5, Section: 1310a, Note: 1]]
# [[Rackham: Book: 5, Section: 1310a, Note: 2]]
# [[Rackham: Book: 5, Section: 1310b]]
# [[Rackham: Book: 5, Section: 1310b, Note: 1]]
# [[Rackham: Book: 5, Section: 1310b, Note: 10]]
# [[Rackham: Book: 5, Section: 1310b, Note: 11]]
# [[Rackham: Book: 5, Section: 1310b, Note: 2]]
# [[Rackham: Book: 5, Section: 1310b, Note: 3]]
# [[Rackham: Book: 5, Section: 1310b, Note: 4]]
# [[Rackham: Book: 5, Section: 1310b, Note: 5]]
# [[Rackham: Book: 5, Section: 1310b, Note: 6]]
# [[Rackham: Book: 5, Section: 1310b, Note: 7]]
# [[Rackham: Book: 5, Section: 1310b, Note: 8]]
# [[Rackham: Book: 5, Section: 1310b, Note: 9]]
# [[Rackham: Book: 5, Section: 1311a]]
# [[Rackham: Book: 5, Section: 1311a, Note: 1]]
# [[Rackham: Book: 5, Section: 1311a, Note: 2]]
# [[Rackham: Book: 5, Section: 1311a, Note: 3]]
# [[Rackham: Book: 5, Section: 1311b]]
# [[Rackham: Book: 5, Section: 1311b, Note: 1]]
# [[Rackham: Book: 5, Section: 1311b, Note: 2]]
# [[Rackham: Book: 5, Section: 1311b, Note: 3]]
# [[Rackham: Book: 5, Section: 1311b, Note: 4]]
# [[Rackham: Book: 5, Section: 1311b, Note: 5]]
# [[Rackham: Book: 5, Section: 1311b, Note: 6]]
# [[Rackham: Book: 5, Section: 1312a]]
# [[Rackham: Book: 5, Section: 1312a, Note: 1]]
# [[Rackham: Book: 5, Section: 1312a, Note: 2]]
# [[Rackham: Book: 5, Section: 1312a, Note: 3]]
# [[Rackham: Book: 5, Section: 1312a, Note: 4]]
# [[Rackham: Book: 5, Section: 1312a, Note: 5]]
# [[Rackham: Book: 5, Section: 1312a, Note: 6]]
# [[Rackham: Book: 5, Section: 1312b]]
# [[Rackham: Book: 5, Section: 1312b, Note: 1]]
# [[Rackham: Book: 5, Section: 1312b, Note: 2]]
# [[Rackham: Book: 5, Section: 1312b, Note: 3]]
# [[Rackham: Book: 5, Section: 1312b, Note: 4]]
# [[Rackham: Book: 5, Section: 1312b, Note: 5]]
# [[Rackham: Book: 5, Section: 1313a]]
# [[Rackham: Book: 5, Section: 1313a, Note: 1]]
# [[Rackham: Book: 5, Section: 1313a, Note: 2]]
# [[Rackham: Book: 5, Section: 1313b]]
# [[Rackham: Book: 5, Section: 1313b, Note: 1]]
# [[Rackham: Book: 5, Section: 1313b, Note: 2]]
# [[Rackham: Book: 5, Section: 1313b, Note: 3]]
# [[Rackham: Book: 5, Section: 1313b, Note: 4]]
# [[Rackham: Book: 5, Section: 1313b, Note: 5]]
# [[Rackham: Book: 5, Section: 1313b, Note: 6]]
# [[Rackham: Book: 5, Section: 1313b, Note: 7]]
# [[Rackham: Book: 5, Section: 1314a]]
# [[Rackham: Book: 5, Section: 1314a, Note: 1]]
# [[Rackham: Book: 5, Section: 1314a, Note: 2]]
# [[Rackham: Book: 5, Section: 1314b]]
# [[Rackham: Book: 5, Section: 1315a]]
# [[Rackham: Book: 5, Section: 1315a, Note: 1]]
# [[Rackham: Book: 5, Section: 1315b]]
# [[Rackham: Book: 5, Section: 1315b, Note: 1]]
# [[Rackham: Book: 5, Section: 1315b, Note: 2]]
# [[Rackham: Book: 5, Section: 1315b, Note: 3]]
# [[Rackham: Book: 5, Section: 1315b, Note: 4]]
# [[Rackham: Book: 5, Section: 1315b, Note: 5]]
# [[Rackham: Book: 5, Section: 1315b, Note: 6]]
# [[Rackham: Book: 5, Section: 1315b, Note: 7]]
# [[Rackham: Book: 5, Section: 1315b, Note: 8]]
# [[Rackham: Book: 5, Section: 1316a]]
# [[Rackham: Book: 5, Section: 1316a, Note: 1]]
# [[Rackham: Book: 5, Section: 1316a, Note: 2]]
# [[Rackham: Book: 5, Section: 1316a, Note: 3]]
# [[Rackham: Book: 5, Section: 1316a, Note: 4]]
# [[Rackham: Book: 5, Section: 1316a, Note: 5]]
# [[Rackham: Book: 5, Section: 1316a, Note: 6]]
# [[Rackham: Book: 5, Section: 1316a, Note: 7]]
# [[Rackham: Book: 5, Section: 1316a, Note: 8]]
# [[Rackham: Book: 5, Section: 1316a, Note: 9]]
# [[Rackham: Book: 5, Section: 1316b]]
# [[Rackham: Book: 5, Section: 1316b, Note: 1]]
# [[Rackham: Book: 5, Section: 1316b, Note: 2]]
# [[Rackham: Book: 5, Section: 1316b, Note: 3]]
# [[Rackham: Book: 6]]
# [[Rackham: Book: 6, Section: 1316b]]
# [[Rackham: Book: 6, Section: 1316b, Note: 1]]
# [[Rackham: Book: 6, Section: 1316b, Note: 2]]
# [[Rackham: Book: 6, Section: 1316b, Note: 3]]
# [[Rackham: Book: 6, Section: 1316b, Note: 4]]
# [[Rackham: Book: 6, Section: 1316b, Note: 5]]
# [[Rackham: Book: 6, Section: 1316b, Note: 6]]
# [[Rackham: Book: 6, Section: 1317a]]
# [[Rackham: Book: 6, Section: 1317a, Note: 1]]
# [[Rackham: Book: 6, Section: 1317a, Note: 2]]
# [[Rackham: Book: 6, Section: 1317b]]
# [[Rackham: Book: 6, Section: 1317b, Note: 1]]
# [[Rackham: Book: 6, Section: 1317b, Note: 2]]
# [[Rackham: Book: 6, Section: 1317b, Note: 3]]
# [[Rackham: Book: 6, Section: 1318a]]
# [[Rackham: Book: 6, Section: 1318a, Note: 1]]
# [[Rackham: Book: 6, Section: 1318a, Note: 2]]
# [[Rackham: Book: 6, Section: 1318a, Note: 3]]
# [[Rackham: Book: 6, Section: 1318a, Note: 4]]
# [[Rackham: Book: 6, Section: 1318a, Note: 5]]
# [[Rackham: Book: 6, Section: 1318a, Note: 6]]
# [[Rackham: Book: 6, Section: 1318a, Note: 7]]
# [[Rackham: Book: 6, Section: 1318b]]
# [[Rackham: Book: 6, Section: 1318b, Note: 1]]
# [[Rackham: Book: 6, Section: 1318b, Note: 2]]
# [[Rackham: Book: 6, Section: 1319a]]
# [[Rackham: Book: 6, Section: 1319a, Note: 1]]
# [[Rackham: Book: 6, Section: 1319a, Note: 2]]
# [[Rackham: Book: 6, Section: 1319a, Note: 3]]
# [[Rackham: Book: 6, Section: 1319a, Note: 4]]
# [[Rackham: Book: 6, Section: 1319b]]
# [[Rackham: Book: 6, Section: 1319b, Note: 1]]
# [[Rackham: Book: 6, Section: 1319b, Note: 2]]
# [[Rackham: Book: 6, Section: 1319b, Note: 3]]
# [[Rackham: Book: 6, Section: 1319b, Note: 4]]
# [[Rackham: Book: 6, Section: 1320a]]
# [[Rackham: Book: 6, Section: 1320a, Note: 1]]
# [[Rackham: Book: 6, Section: 1320b]]
# [[Rackham: Book: 6, Section: 1320b, Note: 1]]
# [[Rackham: Book: 6, Section: 1320b, Note: 2]]
# [[Rackham: Book: 6, Section: 1320b, Note: 3]]
# [[Rackham: Book: 6, Section: 1321a]]
# [[Rackham: Book: 6, Section: 1321a, Note: 1]]
# [[Rackham: Book: 6, Section: 1321a, Note: 2]]
# [[Rackham: Book: 6, Section: 1321a, Note: 3]]
# [[Rackham: Book: 6, Section: 1321a, Note: 4]]
# [[Rackham: Book: 6, Section: 1321b]]
# [[Rackham: Book: 6, Section: 1321b, Note: 1]]
# [[Rackham: Book: 6, Section: 1321b, Note: 2]]
# [[Rackham: Book: 6, Section: 1321b, Note: 3]]
# [[Rackham: Book: 6, Section: 1322a]]
# [[Rackham: Book: 6, Section: 1322a, Note: 1]]
# [[Rackham: Book: 6, Section: 1322a, Note: 2]]
# [[Rackham: Book: 6, Section: 1322b]]
# [[Rackham: Book: 6, Section: 1322b, Note: 1]]
# [[Rackham: Book: 6, Section: 1323a]]
# [[Rackham: Book: 7]]
# [[Rackham: Book: 7, Section: 1323a]]
# [[Rackham: Book: 7, Section: 1323a, Note: 1]]
# [[Rackham: Book: 7, Section: 1323a, Note: 2]]
# [[Rackham: Book: 7, Section: 1323b]]
# [[Rackham: Book: 7, Section: 1323b, Note: 1]]
# [[Rackham: Book: 7, Section: 1323b, Note: 2]]
# [[Rackham: Book: 7, Section: 1323b, Note: 3]]
# [[Rackham: Book: 7, Section: 1324a]]
# [[Rackham: Book: 7, Section: 1324a, Note: 1]]
# [[Rackham: Book: 7, Section: 1324a, Note: 2]]
# [[Rackham: Book: 7, Section: 1324b]]
# [[Rackham: Book: 7, Section: 1324b, Note: 1]]
# [[Rackham: Book: 7, Section: 1324b, Note: 2]]
# [[Rackham: Book: 7, Section: 1325a]]
# [[Rackham: Book: 7, Section: 1325a, Note: 1]]
# [[Rackham: Book: 7, Section: 1325a, Note: 2]]
# [[Rackham: Book: 7, Section: 1325a, Note: 3]]
# [[Rackham: Book: 7, Section: 1325b]]
# [[Rackham: Book: 7, Section: 1325b, Note: 1]]
# [[Rackham: Book: 7, Section: 1325b, Note: 2]]
# [[Rackham: Book: 7, Section: 1325b, Note: 3]]
# [[Rackham: Book: 7, Section: 1326a]]
# [[Rackham: Book: 7, Section: 1326a, Note: 1]]
# [[Rackham: Book: 7, Section: 1326b]]
# [[Rackham: Book: 7, Section: 1326b, Note: 1]]
# [[Rackham: Book: 7, Section: 1326b, Note: 2]]
# [[Rackham: Book: 7, Section: 1326b, Note: 3]]
# [[Rackham: Book: 7, Section: 1327a]]
# [[Rackham: Book: 7, Section: 1327a, Note: 1]]
# [[Rackham: Book: 7, Section: 1327a, Note: 2]]
# [[Rackham: Book: 7, Section: 1327b]]
# [[Rackham: Book: 7, Section: 1327b, Note: 1]]
# [[Rackham: Book: 7, Section: 1327b, Note: 2]]
# [[Rackham: Book: 7, Section: 1327b, Note: 3]]
# [[Rackham: Book: 7, Section: 1327b, Note: 4]]
# [[Rackham: Book: 7, Section: 1328a]]
# [[Rackham: Book: 7, Section: 1328a, Note: 1]]
# [[Rackham: Book: 7, Section: 1328a, Note: 2]]
# [[Rackham: Book: 7, Section: 1328a, Note: 3]]
# [[Rackham: Book: 7, Section: 1328a, Note: 4]]
# [[Rackham: Book: 7, Section: 1328a, Note: 5]]
# [[Rackham: Book: 7, Section: 1328a, Note: 6]]
# [[Rackham: Book: 7, Section: 1328b]]
# [[Rackham: Book: 7, Section: 1328b, Note: 1]]
# [[Rackham: Book: 7, Section: 1328b, Note: 2]]
# [[Rackham: Book: 7, Section: 1328b, Note: 3]]
# [[Rackham: Book: 7, Section: 1328b, Note: 4]]
# [[Rackham: Book: 7, Section: 1329a]]
# [[Rackham: Book: 7, Section: 1329a, Note: 1]]
# [[Rackham: Book: 7, Section: 1329a, Note: 2]]
# [[Rackham: Book: 7, Section: 1329a, Note: 3]]
# [[Rackham: Book: 7, Section: 1329a, Note: 4]]
# [[Rackham: Book: 7, Section: 1329b]]
# [[Rackham: Book: 7, Section: 1329b, Note: 1]]
# [[Rackham: Book: 7, Section: 1329b, Note: 2]]
# [[Rackham: Book: 7, Section: 1329b, Note: 3]]
# [[Rackham: Book: 7, Section: 1329b, Note: 4]]
# [[Rackham: Book: 7, Section: 1329b, Note: 5]]
# [[Rackham: Book: 7, Section: 1330a]]
# [[Rackham: Book: 7, Section: 1330a, Note: 1]]
# [[Rackham: Book: 7, Section: 1330a, Note: 2]]
# [[Rackham: Book: 7, Section: 1330a, Note: 3]]
# [[Rackham: Book: 7, Section: 1330a, Note: 4]]
# [[Rackham: Book: 7, Section: 1330a, Note: 5]]
# [[Rackham: Book: 7, Section: 1330b]]
# [[Rackham: Book: 7, Section: 1330b, Note: 1]]
# [[Rackham: Book: 7, Section: 1330b, Note: 2]]
# [[Rackham: Book: 7, Section: 1330b, Note: 3]]
# [[Rackham: Book: 7, Section: 1331a]]
# [[Rackham: Book: 7, Section: 1331a, Note: 1]]
# [[Rackham: Book: 7, Section: 1331a, Note: 2]]
# [[Rackham: Book: 7, Section: 1331b]]
# [[Rackham: Book: 7, Section: 1331b, Note: 1]]
# [[Rackham: Book: 7, Section: 1332a]]
# [[Rackham: Book: 7, Section: 1332a, Note: 1]]
# [[Rackham: Book: 7, Section: 1332a, Note: 2]]
# [[Rackham: Book: 7, Section: 1332a, Note: 3]]
# [[Rackham: Book: 7, Section: 1332a, Note: 4]]
# [[Rackham: Book: 7, Section: 1332a, Note: 5]]
# [[Rackham: Book: 7, Section: 1332b]]
# [[Rackham: Book: 7, Section: 1332b, Note: 1]]
# [[Rackham: Book: 7, Section: 1332b, Note: 2]]
# [[Rackham: Book: 7, Section: 1332b, Note: 3]]
# [[Rackham: Book: 7, Section: 1333a]]
# [[Rackham: Book: 7, Section: 1333a, Note: 1]]
# [[Rackham: Book: 7, Section: 1333a, Note: 2]]
# [[Rackham: Book: 7, Section: 1333a, Note: 3]]
# [[Rackham: Book: 7, Section: 1333a, Note: 4]]
# [[Rackham: Book: 7, Section: 1333a, Note: 5]]
# [[Rackham: Book: 7, Section: 1333b]]
# [[Rackham: Book: 7, Section: 1333b, Note: 1]]
# [[Rackham: Book: 7, Section: 1333b, Note: 2]]
# [[Rackham: Book: 7, Section: 1333b, Note: 3]]
# [[Rackham: Book: 7, Section: 1334a]]
# [[Rackham: Book: 7, Section: 1334a, Note: 1]]
# [[Rackham: Book: 7, Section: 1334a, Note: 2]]
# [[Rackham: Book: 7, Section: 1334a, Note: 3]]
# [[Rackham: Book: 7, Section: 1334b]]
# [[Rackham: Book: 7, Section: 1334b, Note: 1]]
# [[Rackham: Book: 7, Section: 1334b, Note: 2]]
# [[Rackham: Book: 7, Section: 1334b, Note: 3]]
# [[Rackham: Book: 7, Section: 1335a]]
# [[Rackham: Book: 7, Section: 1335a, Note: 1]]
# [[Rackham: Book: 7, Section: 1335a, Note: 2]]
# [[Rackham: Book: 7, Section: 1335a, Note: 3]]
# [[Rackham: Book: 7, Section: 1335b]]
# [[Rackham: Book: 7, Section: 1335b, Note: 1]]
# [[Rackham: Book: 7, Section: 1335b, Note: 2]]
# [[Rackham: Book: 7, Section: 1336a]]
# [[Rackham: Book: 7, Section: 1336a, Note: 1]]
# [[Rackham: Book: 7, Section: 1336b]]
# [[Rackham: Book: 7, Section: 1336b, Note: 1]]
# [[Rackham: Book: 7, Section: 1336b, Note: 2]]
# [[Rackham: Book: 7, Section: 1336b, Note: 3]]
# [[Rackham: Book: 7, Section: 1336b, Note: 4]]
# [[Rackham: Book: 7, Section: 1336b, Note: 5]]
# [[Rackham: Book: 7, Section: 1336b, Note: 6]]
# [[Rackham: Book: 7, Section: 1337a]]
# [[Rackham: Book: 8]]
# [[Rackham: Book: 8, Section: 1337a]]
# [[Rackham: Book: 8, Section: 1337a, Note: 1]]
# [[Rackham: Book: 8, Section: 1337b]]
# [[Rackham: Book: 8, Section: 1337b, Note: 1]]
# [[Rackham: Book: 8, Section: 1337b, Note: 2]]
# [[Rackham: Book: 8, Section: 1338a]]
# [[Rackham: Book: 8, Section: 1338a, Note: 1]]
# [[Rackham: Book: 8, Section: 1338a, Note: 2]]
# [[Rackham: Book: 8, Section: 1338a, Note: 3]]
# [[Rackham: Book: 8, Section: 1338a, Note: 4]]
# [[Rackham: Book: 8, Section: 1338b]]
# [[Rackham: Book: 8, Section: 1338b, Note: 1]]
# [[Rackham: Book: 8, Section: 1338b, Note: 2]]
# [[Rackham: Book: 8, Section: 1338b, Note: 3]]
# [[Rackham: Book: 8, Section: 1339a]]
# [[Rackham: Book: 8, Section: 1339a, Note: 1]]
# [[Rackham: Book: 8, Section: 1339a, Note: 2]]
# [[Rackham: Book: 8, Section: 1339a, Note: 3]]
# [[Rackham: Book: 8, Section: 1339b]]
# [[Rackham: Book: 8, Section: 1339b, Note: 1]]
# [[Rackham: Book: 8, Section: 1340a]]
# [[Rackham: Book: 8, Section: 1340a, Note: 1]]
# [[Rackham: Book: 8, Section: 1340a, Note: 2]]
# [[Rackham: Book: 8, Section: 1340a, Note: 3]]
# [[Rackham: Book: 8, Section: 1340a, Note: 4]]
# [[Rackham: Book: 8, Section: 1340a, Note: 5]]
# [[Rackham: Book: 8, Section: 1340a, Note: 6]]
# [[Rackham: Book: 8, Section: 1340b]]
# [[Rackham: Book: 8, Section: 1340b, Note: 1]]
# [[Rackham: Book: 8, Section: 1340b, Note: 2]]
# [[Rackham: Book: 8, Section: 1341a]]
# [[Rackham: Book: 8, Section: 1341a, Note: 1]]
# [[Rackham: Book: 8, Section: 1341a, Note: 2]]
# [[Rackham: Book: 8, Section: 1341a, Note: 3]]
# [[Rackham: Book: 8, Section: 1341a, Note: 4]]
# [[Rackham: Book: 8, Section: 1341a, Note: 5]]
# [[Rackham: Book: 8, Section: 1341a, Note: 6]]
# [[Rackham: Book: 8, Section: 1341a, Note: 7]]
# [[Rackham: Book: 8, Section: 1341b]]
# [[Rackham: Book: 8, Section: 1341b, Note: 1]]
# [[Rackham: Book: 8, Section: 1341b, Note: 2]]
# [[Rackham: Book: 8, Section: 1341b, Note: 3]]
# [[Rackham: Book: 8, Section: 1342a]]
# [[Rackham: Book: 8, Section: 1342a, Note: 1]]
# [[Rackham: Book: 8, Section: 1342a, Note: 2]]
# [[Rackham: Book: 8, Section: 1342a, Note: 3]]
# [[Rackham: Book: 8, Section: 1342a, Note: 4]]
# [[Rackham: Book: 8, Section: 1342b]]
# [[Rackham: Book: 8, Section: 1342b, Note: 1]]
# [[Rackham: Book: 8, Section: 1342b, Note: 2]]
Personal Wiki of Aristotle's Politics
{
"tiddlers": {
"$:/info/browser": {
"title": "$:/info/browser",
"text": "yes"
},
"$:/info/node": {
"title": "$:/info/node",
"text": "no"
}
}
}
{
"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\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-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-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": "Theme Tweaks",
"text": "\\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<$linkcatcher to=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimage\">\n<$link to=\"\">\n(none)\n</$link>\n<hr>\n<$list filter=\"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[sort[title]]\">\n<$link to={{!!title}}>\n<$transclude/> <$view field=\"title\"/>\n</$link>\n</$list>\n</$linkcatcher>\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\">Scroll with tiddlers</option>\n<option value=\"fixed\">Fixed to window</option>\n</$select>\n\\end\n\n\\define backgroundimagesize-dropdown()\n<$select tiddler=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize\" default=\"scroll\">\n<option value=\"auto\">Auto</option>\n<option value=\"cover\">Cover</option>\n<option value=\"contain\">Contain</option>\n</$select>\n\\end\n\nYou can tweak certain aspects of the ''Vanilla'' theme.\n\n! Options\n\n|[[Sidebar layout|$:/themes/tiddlywiki/vanilla/options/sidebarlayout]] |<$select tiddler=\"$:/themes/tiddlywiki/vanilla/options/sidebarlayout\"><option value=\"fixed-fluid\">Fixed story, fluid sidebar</option><option value=\"fluid-fixed\">Fluid story, fixed sidebar</option></$select> |\n|[[Sticky titles|$:/themes/tiddlywiki/vanilla/options/stickytitles]]<br>//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// |<$select tiddler=\"$:/themes/tiddlywiki/vanilla/options/stickytitles\"><option value=\"no\">No</option><option value=\"yes\">Yes</option></$select> |\n\n! Settings\n\n|[[Font family|$:/themes/tiddlywiki/vanilla/settings/fontfamily]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/settings/fontfamily\" default=\"\" tag=\"input\"/> | |\n|[[Code font family|$:/themes/tiddlywiki/vanilla/settings/codefontfamily]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/settings/codefontfamily\" default=\"\" tag=\"input\"/> | |\n|[[Page background image|$:/themes/tiddlywiki/vanilla/settings/backgroundimage]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimage\" default=\"\" tag=\"input\"/> |<<backgroundimage-dropdown>> |\n|[[Page background image attachment |$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment]] |<<backgroundimageattachment-dropdown>> | |\n|[[Page background image size |$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize]] |<<backgroundimagesize-dropdown>> | |\n\n! Sizes\n\n|[[Font size|$:/themes/tiddlywiki/vanilla/metrics/fontsize]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/fontsize\" default=\"\" tag=\"input\"/> |\n|[[Line height|$:/themes/tiddlywiki/vanilla/metrics/lineheight]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/lineheight\" default=\"\" tag=\"input\"/> |\n|[[Font size for tiddler body|$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize\" default=\"\" tag=\"input\"/> |\n|[[Line height for tiddler body|$:/themes/tiddlywiki/vanilla/metrics/bodylineheight]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/bodylineheight\" default=\"\" tag=\"input\"/> |\n|[[Story left position|$:/themes/tiddlywiki/vanilla/metrics/storyleft]]<br>//how far the left margin of the story river<br>(tiddler area) is from the left of the page// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storyleft\" default=\"\" tag=\"input\"/> |\n|[[Story top position|$:/themes/tiddlywiki/vanilla/metrics/storytop]]<br>//how far the top margin of the story river<br>is from the top of the page// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storytop\" default=\"\" tag=\"input\"/> |\n|[[Story right|$:/themes/tiddlywiki/vanilla/metrics/storyright]]<br>//how far the left margin of the sidebar <br>is from the left of the page// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storyright\" default=\"\" tag=\"input\"/> |\n|[[Story width|$:/themes/tiddlywiki/vanilla/metrics/storywidth]]<br>//the overall width of the story river// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storywidth\" default=\"\" tag=\"input\"/> |\n|[[Tiddler width|$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth]]<br>//within the story river//<br> |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth\" default=\"\" tag=\"input\"/> |\n|[[Sidebar breakpoint|$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint]]<br>//the minimum page width at which the story<br>river and sidebar will appear side by side// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint\" default=\"\" tag=\"input\"/> |\n|[[Sidebar width|$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth]]<br>//the width of the sidebar in fluid-fixed layout// |^<$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\\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\tcolor: <<colour foreground>>;\n\tbackground-color: <<colour page-background>>;\n\tfill: <<colour foreground>>;\n\tword-wrap: break-word;\n\t<<custom-background-datauri>>\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: pre;\n\twhite-space: pre-wrap;\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 white-space: pre-wrap;\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}\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\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\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/*\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 {\n\tvertical-align: middle;\n}\n\n.tc-btn-invisible {\n\tpadding: 0;\n\tmargin: 0;\n\tbackground: none;\n\tborder: none;\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 width: calc(100% + 2px);\n margin-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 top: 6px;\n bottom: 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\t\n\t.tc-unfold-banner {\n\t\tposition: static;\n\t width: calc(100% + 59px);\n }\n\n\t.tc-fold-banner {\n\t\twidth: 16px;\n\t\tmargin-left: -16px;\n\t font-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: 300;\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}\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\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: auto;\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: 28px;\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\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\theight: 0.75em;\n\tfill: <<colour tiddler-controls-foreground>>;\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 input.tc-edit-texteditor, .tc-tiddler-frame textarea.tc-edit-texteditor {\n\twidth: 100%;\n\tpadding: 3px 3px 3px 3px;\n\tborder: 1px solid <<colour tiddler-editor-border>>;\n\tline-height: 1.3em;\n\t-webkit-appearance: none;\n\tmargin: 4px 0 4px 0;\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\n.tc-tiddler-frame input.tc-edit-texteditor {\n\tbackground-color: <<colour tiddler-editor-background>>;\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** 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-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: 48%;\n\tborder: 1px solid <<colour tiddler-editor-border>>;\n\tmargin: 4px 3px 3px 3px;\n\tpadding: 3px 3px 3px 3px;\n}\n\n.tc-tiddler-preview-edit {\n\twidth: 48%;\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-prompt {\n\tpadding: 0 14px;\t\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,\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 padding: 0 7px 0 7px;\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}\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}\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}\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\tdisplay: inline;\n\twidth: auto;\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-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-buttons button.tc-tab-selected {\n\tbackground-color: <<colour sidebar-tab-background-selected>>;\n\tborder: none;\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/*\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 text-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 min-width: 100%;\n min-height: 100%;\n max-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"
},
"$:/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/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"
}
}
}
First edition of works (with omission of Rhetorica, Poetica, and second book of OEconomica), 5 vols. by Aldus Manutius, Venice, 1495-8; re-impression supervised by Erasmus and with certain corrections by Grynaeus (including Rhetorica and Poetica), 1531, 1539, revised 1550; later editions were followed by that of Immanuel Bekker and Brandis (Greek and Latin), 5 vols. The 5th vol. contains the Index by Bonitz, 1831-70; Didot edition (Greek and Latin), 5 vols. 1848-74.
ENGLISH TRANSLATIONS: Edited by T. Taylor, with Porphyry's Introduction, 9 vols., 1812; under editorship of J. A. Smith and W. D. Ross, 1908.
Later editions of separate works:
De Anima: Torstrik, 1862; Trendelenburg, 2nd edition, 1877, with English translation, E. Wallace, 1882; Biehl, 1884, 1896; with English, R. D. Hicks, 1907.
Ethica: J. S. Brewer (Nicomachean), 1836; W. E. Jelf, 1856; J. E. T. Rogers, 1865; A. Grant, 1857-8, 1866, 1874, 1885; E. Moore, 1871, 1878, 4th edition, 1890; Ramsauer (Nicomachean), 1878, Susemihl, 1878, 1880, revised by O. Apelt, 1903; A. Grant, 1885; I. Bywater (Nicomachean), 1890; J. Burnet, 1900.
Historia Animalium: Schneider, 1812; Aubert and Wimmer, 1860, Dittmeyer, 1907.
Metaphysica: Schwegler, 1848; W. Christ, 1899.
Organon: Waitz, 1844-6.
Poetica: Vahlen, 1867, 1874, with Notes by E. Moore, 1875; with English translation by E. R. Wharton, 1883, 1885; Uberweg, 1870, 1875; with German translation, Susemihl, 1874; Schmidt, 1875; Christ, 1878; I. Bywater, 1898; T. G. Tucker, 1899.
De Republics, Atheniensium: Text and facsimile of Papyrus, F. G. Kenyon, 1891, 3rd edition, 1892; Kaibel and Wilamowitz—Moel-lendorf, 1891, 3rd edition, 1898; Van Herwerden and Leeuwen (from Kenyon's text), 1891; Blass, 1892, 1895, 1898, 1903; J. E. Sandys, 1893.
Politica: Susemihl, 1872; with German, 1878, 3rd edition, 1882; Susemihl and Hicks, 1894, etc.; O. Immisch, 1909.
Physica: C. Prantl, 1879.
Rhetorica: Stahr, 1862; Sprengel (with Latin text), 1867; Cope and Sandys, 1877; Roemer, 1885, 1898.
ENGLISH TRANSLATIONS OF ONE OR MORE WORKS: De Anima (with Parva Naturalia), by W. A. Hammond, 1902. Ethica: Of Morals to Nicomachus, by E. Pargiter, 1745; with Politica, by J. Gillies, 1797, 1804, 1813; with Rhetorica and Poetica, by T. Taylor, 1818, and later editions. Nicomachean Ethics, 1819; mainly from text of Bekker, by D. P. Chase, 1847; revised 1861, and later editions with an introductory essay by G. H. Lewes (Camelot Classics), 1890; re-edited by J. M. Mitchell (New Universal Library), 1906, 1910; with an introductory essay by Prof. J.H. Smith (Everyman's Library), 1911; by R.W.Browne (Bohn's Classical Library), 1848, etc.; by R. Williams, 1869, 1876; by W. M. Hatch and others (with translation of paraphrase attributed to Andronicus of Rhodes), edited by E. Hatch, 1879; by F, H. Peters, 1881; J. E. C. Welldon, 1892; J. Gillies (Lubbock's Hundred Books), 1893. Historia Animalium, by R. Creswell (Bohn's Classical Library), 1848; with Treatise on Physiognomy, by T. Taylor, 1809. Metaphysica, by T. Taylor, 1801; by J. H. M'Mahon (Bohn's Classical Library), 1848. Organon, with Porphyry's Introduction, by O. F. Owen (Bohn's Classical Library), 1848. Posterior Analytics, E. Poste, 1850; E. S. Bourchier, 1901; On Fallacies, E. Poste, 1866. Parva Naturalia (Greek and English), by G. R. T. Ross, 1906; with De Anima, by W. A. Hammond, 1902. Youth and Old Age, Life and Death and Respiration, W. Ogle, 1897. Poetica, with Notes from the French of D'Acier, 1705; by H. J. Pye, 1788, 1792; T. Twining, 1789,1812, with Preface and Notes by H. Hamilton, 1851; Treatise on Rhetorica and Poetica, by T. Hobbes (Bohn's Classical Library), 1850; by Wharton, 1883 (see Greek version), S. H. Butcher, 1895, 1898, 3rd edition, 1902; E. S. Bourchier, 1907; by Ingram Bywater, 1909. De Partibus Animalium, W. Ogle, 1882. De Republica Athenientium, by E. Poste, 1891; F. G. Kenyon, 1891; T. J. Dymes, 1891. De Virtutibus et Vitiis, by W. Bridgman, 1804. Politica, from the French of Regius, 1598; by W. Ellis, 1776, 1778, 1888 (Morley's Universal Library), 1893 (Lubbock's Hundred Books); by E. Walford (with AEconomics, and Life by Dr. Gillies) (Bohn's Classical Library), 1848; J. E. C. Welldon, 1883; B. Jowett, 1885; with Introduction and Index by H. W. C. Davis, 1905; Books i. iii. iv. (vii.) from Bekker's text by W. E. Bolland, with Introduction by A. Lang, 1877. Problemata (with writings of other philosophers), 1597, 1607, 1680, 1684, etc. Rhetorica: A summary by T. Hobbes, 1655 (?), new edition, 1759; by the translators of the Art of Thinking, 1686, 1816; by D. M. Crimmin, 1812; J. Gillies, 1823; Anon. 1847; J. E. C. Welldon, 1886; R. C. Jebb, with Introduction and Supplementary Notes by J. E. Sandys, 1909 (see under Poetica and Ethica). Secreta Secretorum (supposititious work), Anon. 1702; from the Hebrew version by M. Gaster, 1907, 1908. Version by Lydgate and Burgh, edited by R. Steele (E.E.T.S.), 1894, 1898.
LIFE, ETC.: J. W. Blakesley, 1839; A Crichton (Jardine's Naturalist's Library), 1843; J. S. Blackie, Four Phases of Morals, Socrates, Aristotle, etc., 1871; G. Grote, Aristotle, edited by A. Bain and G. C. Robertson, 1872, 1880; E. Wallace, Outlines of the Philosophy of Aristotle, 1875, 1880; A. Grant (Ancient Classics for English readers), 1877; T. Davidson, Aristotle and Ancient Educational Ideals (Great Educators), 1892.
---
!!![[CHAPTER I|ELLIS: BOOK I: CHAPTER I]]
{{ELLIS: BOOK I: CHAPTER I}}
---
!!![[CHAPTER II|ELLIS: BOOK I: CHAPTER II]]
{{ELLIS: BOOK I: CHAPTER II}}
---
!!![[CHAPTER III|ELLIS: BOOK I: CHAPTER III]]
{{ELLIS: BOOK I: CHAPTER III}}
---
!!![[CHAPTER IV|ELLIS: BOOK I: CHAPTER IV]]
{{ELLIS: BOOK I: CHAPTER IV}}
---
!!![[CHAPTER V|ELLIS: BOOK I: CHAPTER V]]
{{ELLIS: BOOK I: CHAPTER V}}
---
!!![[CHAPTER VI|ELLIS: BOOK I: CHAPTER VI]]
{{ELLIS: BOOK I: CHAPTER VI}}
---
!!![[CHAPTER VII|ELLIS: BOOK I: CHAPTER VII]]
{{ELLIS: BOOK I: CHAPTER VII}}
---
!!![[CHAPTER VIII|ELLIS: BOOK I: CHAPTER VIII]]
{{ELLIS: BOOK I: CHAPTER VIII}}
---
!!![[CHAPTER IX|ELLIS: BOOK I: CHAPTER IX]]
{{ELLIS: BOOK I: CHAPTER IX}}
---
!!![[CHAPTER X|ELLIS: BOOK I: CHAPTER X]]
{{ELLIS: BOOK I: CHAPTER X}}
---
!!![[CHAPTER XI|ELLIS: BOOK I: CHAPTER XI]]
{{ELLIS: BOOK I: CHAPTER XI}}
---
!!![[CHAPTER XII|ELLIS: BOOK I: CHAPTER XII]]
{{ELLIS: BOOK I: CHAPTER XII}}
---
!!![[CHAPTER XIII|ELLIS: BOOK I: CHAPTER XIII]]
{{ELLIS: BOOK I: CHAPTER XIII}}
As we see that every city is a society, and every society Ed. is established for some good purpose; for an apparent good is the spring of all human actions; it is evident that this is the principle upon which they are every one founded, and this is more especially true of that which has for its object the best possible, and is itself the most excellent, and comprehends all the rest. Now this is called a city, and the society thereof a political society; for those who think that the principles of a political, a regal, a family, and a herile government are the same are mistaken, while they suppose that each of these differ in the numbers to whom their power extends, but not in their constitution: so that with them a herile government is one composed of a very few, a domestic of more, a civil and a regal of still more, as if there was no difference between a large family and a small city, or that a regal government and a political one are the same, only that in the one a single person is continually at the head of public affairs; in the other, that each member of the state has in his turn a share in the government, and is at one time a magistrate, at another a private person, according to the rules of political science. But now this is not true, as will be evident to any one who will consider this question in the most approved method. As, in an inquiry into every other subject, it is necessary to separate the different parts of which it is compounded, till we arrive at their first elements, which are the most minute parts thereof; so by the same proceeding we shall acquire a knowledge of the primary parts of a city and see wherein they differ from each other, and whether the rules of art will give us any assistance in examining into each of these things which are mentioned.
Now if in this particular science any one would attend to its original seeds, and their first shoot, he would then as in others have the subject perfectly before him; and perceive, in the first place, that it is requisite that those should be joined together whose species cannot exist without each other, as the male and the female, for the business of propagation; and this not through choice, but by that natural impulse which acts both upon plants and animals also, for the purpose of their leaving behind them others like themselves. It is also from natural causes that some beings command and others obey, that each may obtain their mutual safety; for a being who is endowed with a mind capable of reflection and forethought is by nature the superior and governor, whereas he whose excellence is merely corporeal is formect to be a slave; whence it follows that the different state of master and slave is equally advantageous to both. But there is a natural difference between a female and a slave: for nature is not like the artists who make the Delphic swords for the use of the poor, but for every particular purpose she has her separate instruments, and thus her ends are most complete, for whatsoever is employed on one subject only, brings that one to much greater perfection than when employed on many; and yet among the barbarians, a female and a slave are upon a level in the community, the reason for which is, that amongst them there are none qualified by nature to govern, therefore their society can be nothing but between slaves of different sexes. For which reason the poets say, it is proper for the Greeks to govern the barbarians, as if a barbarian and a slave were by nature one. Now of these two societies the domestic is the first, and Hesiod is right when he says, "First a house, then a wife, then an ox for the plough," for the poor man has always an ox before a household slave. That society then which nature has established for daily support is the domestic, and those who compose it are called by Charondas <i>homosipuoi</i>, and by Epimenides the Cretan <i>homokapnoi</i>; but the society of many families, which was first instituted for their lasting, mutual advantage, is called a village, and a village is most naturally composed of the descendants of one family, whom some persons call homogalaktes, the children and the children's children thereof: for which reason cities were originally governed by kings, as the barbarian states now are, which are composed of those who had before submitted to kingly government; for every family is governed by the elder, as are the branches thereof, on account of their relationship thereunto, which is what Homer says, "Each one ruled his wife and child;" and in this scattered manner they formerly lived. And the opinion which universally prevails, that the gods themselves are subject to kingly government, arises from hence, that all men formerly were, and many are so now; and as they imagined themselves to be made in the likeness of the gods, so they supposed their manner of life must needs be the same. And when many villages so entirely join themselves together as in every respect to form but one society, that society is a city, and contains in itself, if I may so speak, the end and perfection of government: first founded that we might live, but continued that we may live happily. For which reason every city must be allowed to be the work of nature, if we admit that the original society between male and female is; for to this as their end all subordinate societies tend, and the end of everything is the nature of it. For what every being is in its most perfect state, that certainly is the nature of that being, whether it be a man, a horse, or a house: besides, whatsoever produces the final cause and the end which we desire, must be best; but a government complete in itself is that final cause and what is best. Hence it is evident that a city is a natural production, and that man is naturally a political animal, and that whosoever is naturally and not accidentally unfit for society, must be either inferior or superior to man: thus the man in Homer, who is reviled for being "without society, without law, without family." Such a one must naturally be of a quarrelsome disposition, and as solitary as the birds. The gift of speech also evidently proves that man is a more social animal than the bees, or any of the herding cattle: for nature, as we say, does nothing in vain, and man is the only animal who enjoys it. Voice indeed, as being the token of pleasure and pain, is imparted to others also, and thus much their nature is capable of, to perceive pleasure and pain, and to impart these sensations to others; but it is by speech that we are enabled to express what is useful for us, and what is hurtful, and of course what is just and what is unjust: for in this particular man differs from other animals, that he alone has a perception of good and evil, of just and unjust, and it is a participation of these common sentiments which forms a family and a city. Besides, the notion of a city naturally precedes that of a family or an individual, for the whole must necessarily be prior to the parts, for if you take away the whole man, you cannot say a foot or a hand remains, unless by equivocation, as supposing a hand of stone to be made, but that would only be a dead one; but everything is understood to be this or that by its energic qualities and powers, so that when these no longer remain, neither can that be said to be the same, but something of the same name. That a city then precedes an individual is plain, for if an individual is not in himself sufficient to compose a perfect government, he is to a city as other parts are to a whole; but he that is incapable of society, or so complete in himself as not to want it, makes no part of a city, as a beast or a god. There is then in all persons a natural impetus to associate with each other in this manner, and he who first founded civil society was the cause of the greatest good; for as by the completion of it man is the most excellent of all living beings, so without law and justice he would be the worst of all, for nothing is so difficult to subdue as injustice in arms: but these arms man is born with, namely, prudence and valour, which he may apply to the most opposite purposes, for he who abuses them will be the most wicked, the most cruel, the most lustful, and most gluttonous being imaginable; for justice is a political virtue, by the rules of it the state is regulated, and these rules are the criterion of what is right.
SINCE it is now evident of what parts a city is composed, it will be necessary to treat first of family government, for every city is made up of families, and every family has again its separate parts of which it is composed. When a family is complete, it consists of freemen and slaves; but as in every subject we should begin with examining into the smallest parts of which it consists, and as the first and smallest parts of a family are the master and slave, the husband and wife, the father and child, let us first inquire into these three, what each of them may be, and what they ought to be; that is to say, the herile, the nuptial, and the paternal. Let these then be considered as the three distinct parts of a family: some think that the providing what is necessary for the family is something different from the government of it, others that this is the greatest part of it; it shall be considered separately; but we will first speak of a master and a slave, that we may both understand the nature of those things which are absolutely necessary, and also try if we can learn anything better on this subject than what is already known. Some persons have thought that the power of the master over his slave originates from his superior knowledge, and that this knowledge is the same in the master, the magistrate, and the king, as we have already said; but others think that herile government is contrary to nature, and that it is the law which makes one man a slave and another free, but that in nature there is no difference; for which reason that power cannot be founded in justice, but in force.
Since then a subsistence is necessary in every family, the means of procuring it certainly makes up part of the management of a family, for without necessaries it is impossible to live, and to live well. As in all arts which are brought to perfection it is necessary that they should have their proper instruments if they would complete their works, so is it in the art of managing a family: now of instruments some of them are alive, others inanimate; thus with respect to the pilot of the ship, the tiller is without life, the sailor is alive; for a servant is as an instrument in many arts. Thus property is as an instrument to living; an estate is a multitude of instruments; so a slave is an animated instrument, but every one that can minister of himself is more valuable than any other instrument; for if every instrument, at command, or from a preconception of its master's will, could accomplish its work (as the story goes of the statues of Daedalus; or what the poet tells us of the tripods of Vulcan, "that they moved of their own accord into the assembly of the gods "), the shuttle would then weave, and the lyre play of itself; nor would the architect want servants, or the master slaves. Now what are generally called instruments are the efficients of something else, but possessions are what we simply use: thus with a shuttle we make something else for our use; but we only use a coat, or a bed: since then making and using differ from each other in species, and they both require their instruments, it is necessary that these should be different from each other. Now life is itself what we use, and not what we employ as the efficient of something else; for which reason the services of a slave are for use. A possession may be considered in the same nature as a part of anything; now a part is not only a part of something, but also is nothing else; so is a possession; therefore a master is only the master of the slave, but no part of him; but the slave is not only the slave of the master, but nothing else but that. This fully explains what is the nature of a slave, and what are his capacities; for that being who by nature is nothing of himself, but totally another's, and is a man, is a slave by nature; and that man who is the property of another, is his mere chattel, though he continues a man; but a chattel is an instrument for use, separate from the body.
There is also another species of acquisition which they particularly call pecuniary, and with great propriety; and by this indeed it seems that there are no bounds to riches and wealth. Now many persons suppose, from their near relation to each other, that this is one and the same with that we have just mentioned, but it is not the same as that, though not very different; one of these is natural, the other is not, but rather owing to some art and skill; we will enter into a particular examination of this subject. The uses of every possession are two, both dependent upon the thing itself, but not in the same manner, the one supposing an inseparable connection with it, the other not; as a shoe, for instance, which may be either worn, or exchanged for something else, both these are the uses of the shoe; for he who exchanges a shoe with some man who wants one, for money or provisions, uses the shoe as a shoe, but not according to the original intention, for shoes were not at first made to be exchanged. The same thing holds true of all other possessions; for barter, in general, had its original beginning in nature, some men having a surplus, others too little of what was necessary for them: hence it is evident, that the selling provisions for money is not according to the natural use of things; for they were obliged to use barter for those things which they wanted; but it is plain that barter could have no place in the first, that is to say, in family society; but must have begun when the number of those who composed the community was enlarged: for the first of these had all things in common; but when they came to be separated they were obliged to exchange with each other many different things which both parties wanted. Which custom of barter is still preserved amongst many barbarous nations, who procure one necessary with another, but never sell anything; as giving and receiving wine for corn and the like. This sort of barter is not contradictory to nature, nor is it any species of money-getting; but is necessary in procuring that subsistence which is so consonant thereunto. But this barter introduced the use of money, as might be expected; for a convenient place from whence to import what you wanted, or to export what you had a surplus of, being often at a great distance, money necessarily made its way into commerce; for it is not everything which is naturally most useful that is easiest of carriage; for which reason they invented something to exchange with each other which they should mutually give and take, that being really valuable itself, should have the additional advantage of being of easy conveyance, for the purposes of life, as iron and silver, or anything else of the same nature: and this at first passed in value simply according to its weight or size; but in process of time it had a certain stamp, to save the trouble of weighing, which stamp expressed its value.
Money then being established as the necessary medium of exchange, another species of money-getting soon took place, namely, by buying and selling, at probably first in a simple manner, afterwards with more skill and experience, where and how the greatest profits might be made. For which reason the art of money-getting seems to be chiefly conversant about trade, and the business of it to be able to tell where the greatest profits can be made, being the means of procuring abundance of wealth and possessions: and thus wealth is very often supposed to consist in the quantity of money which any one possesses, as this is the medium by which all trade is conducted and a fortune made, others again regard it as of no value, as being of none by nature, but arbitrarily made so by compact; so that if those who use it should alter their sentiments, it would be worth nothing, as being of no service for any necessary purpose. Besides, he who abounds in money often wants necessary food; and it is impossible to say that any person is in good circumstances when with all his possessions he may perish with hunger.
Like Midas in the fable, who from his insatiable wish had everything he touched turned into gold. For which reason others endeavour to procure other riches and other property, and rightly, for there are other riches and property in nature; and these are the proper objects of economy: while trade only procures money, not by all means, but by the exchange of it, and for that purpose it is this which it is chiefly employed about, for money is the first principle and the end of trade; nor are there any bounds to be set to what is thereby acquired. Thus also there are no limits to the art of medicine, with respect to the health which it attempts to procure; the same also is true of all other arts; no line can be drawn to terminate their bounds, the several professors of them being desirous to extend them as far as possible. (But still the means to be employed for that purpose are limited; and these are the limits beyond which the art cannot proceed.) Thus in the art of acquiring riches there are no limits, for the object of that is money and possessions; but economy has a boundary, though this has not: for acquiring riches is not the business of that, for which reason it should seem that some boundary should be set to riches, though we see the contrary to this is what is practised; for all those who get riches add to their money without end; the cause of which is the near connection of these two arts with each other, which sometimes occasions the one to change employments with the other, as getting of money is their common object: for economy requires the possession of wealth, but not on its own account but with another view, to purchase things necessary therewith; but the other procures it merely to increase it: so that some persons are confirmed in their belief, that this is the proper object of economy, and think that for this purpose money should be saved and hoarded up without end; the reason for which disposition is, that they are intent upon living, but not upon living well; and this desire being boundless in its extent, the means which they aim at for that purpose are boundless also; and those who propose to live well, often confine that to the enjoyment of the pleasures of sense; so that as this also seems to depend upon what a man has, all their care is to get money, and hence arises the other cause for this art; for as this enjoyment is excessive in its degree, they endeavour to procure means proportionate to supply it; and if they cannot do this merely by the art of dealing in money, they will endeavour to do it by other ways, and apply all their powers to a purpose they were not by nature intended for. Thus, for instance, courage was intended to inspire fortitude, not to get money by; neither is this the end of the soldier's or the physician's art, but victory and health. But such persons make everything subservient to money-getting, as if this was the only end; and to the end everything ought to refer.
We have now considered that art of money-getting which is not necessary, and have seen in what manner we became in want of it; and also that which is necessary, which is different from it; for that economy which is natural, and whose object is to provide food, is not like this unlimited in its extent, but has its bounds.
But whether any person is such by nature, and whether it is advantageous and just for any one to be a slave or no, or whether all slavery is contrary to nature, shall be considered hereafter; not that it is difficult to determine it upon general principles, or to understand it from matters of fact; for that some should govern, and others be governed, is not only necessary but useful, and from the hour of their birth some are marked out for those purposes, and others for the other, and there are many species of both sorts. And the better those are who are governed the better also is the government, as for instance of man, rather than the brute creation: for the more excellent the materials are with which the work is finished, the more excellent certainly is the work; and wherever there is a governor and a governed, there certainly is some work produced; for whatsoever is composed of many parts, which jointly become one, whether conjunct or separate, evidently show the marks of governing and governed; and this is true of every living thing in all nature; nay, even in some things which partake not of life, as in music; but this probably would be a disquisition too foreign to our present purpose. Every living thing in the first place is composed of soul and body, of these the one is by nature the governor, the other the governed; now if we would know what is natural, we ought to search for it in those subjects in which nature appears most perfect, and not in those which are corrupted; we should therefore examine into a man who is most perfectly formed both in soul and body, in whom this is evident, for in the depraved and vicious the body seems to rule rather than the soul, on account of their being corrupt and contrary to nature. We may then, as we affirm, perceive in an animal the first principles of herile and political government; for the soul governs the body as the master governs his slave; the mind governs the appetite with a political or a kingly power, which shows that it is both natural and advantageous that the body should be governed by the soul, and the pathetic part by the mind, and that part which is possessed of reason; but to have no ruling power, or an improper one, is hurtful to all; and this holds true not only of man, but of other animals also, for tame animals are naturally better than wild ones, and it is advantageous that both should be under subjection to man; for this is productive of their common safety: so is it naturally with the male and the female; the one is superior, the other inferior; the one governs, the other is governed; and the same rule must necessarily hold good with respect to all mankind. Those men therefore who are as much inferior to others as the body is to the soul, are to be thus disposed of, as the proper use of them is their bodies, in which their excellence consists; and if what I have said be true, they are slaves by nature, and it is advantageous to them to be always under government. He then is by nature formed a slave who is qualified to become the chattel of another person, and on that account is so, and who has just reason enough to know that there is such a faculty, without being indued with the use of it; for other animals have no perception of reason, but are entirely guided by appetite, and indeed they vary very little in their use from each other; for the advantage which we receive, both from slaves and tame animals, arises from their bodily strength administering to our necessities; for it is the intention of nature to make the bodies of slaves and freemen different from each other, that the one should be robust for their necessary purposes, the others erect, useless indeed for what slaves are employed in, but fit for civil life, which is divided into the duties of war and peace; though these rules do not always take place, for slaves have sometimes the bodies of freemen, sometimes the souls; if then it is evident that if some bodies are as much more excellent than others as the statues of the gods excel the human form, every one will allow that the inferior ought to be slaves to the superior; and if this is true with respect to the body, it is still juster to determine in the same manner, when we consider the soul; though it is not so easy to perceive the beauty of the soul as it is of the body. Since then some men are slaves by nature, and others are freemen, it is clear that where slavery is advantageous to any one, then it is just to make him a slave.
But it is not difficult to perceive that those who maintain the contrary opinion have some reason on their side; for a man may become a slave two different ways; for he may be so by law also, and this law is a certain compact, by which whatsoever is taken in battle is adjudged to be the property of the conquerors: but many persons who are conversant in law call in question this pretended right, and say that it would be hard that a man should be compelled by violence to be the slave and subject of another who had the power to compel him, and was his superior in strength; and upon this subject, even of those who are wise, some think one way and some another; but the cause of this doubt and variety of opinions arises from hence, that great abilities, when accompanied with proper means, are generally able to succeed by force: for victory is always owing to a superiority in some advantageous circumstances; so that it seems that force never prevails but in consequence of great abilities. But still the dispute concerning the justice of it remains; for some persons think, that justice consists in benevolence, others think it just that the powerful should govern: in the midst of these contrary opinions, there are no reasons sufficient to convince us, that the right of being master and governor ought not to be placed with those who have the greatest abilities. Some persons, entirely resting upon the right which the law gives (for that which is legal is in some respects just), insist upon it that slavery occasioned by war is just, not that they say it is wholly so, for it may happen that the principle upon which the wars were commenced is unjust; moreover no one will say that a man who is unworthily in slavery is therefore a slave; for if so, men of the noblest families might happen to be slaves, and the descendants of slaves, if they should chance to be taken prisoners in war and sold: to avoid this difficulty they say that such persons should not be called slaves, but barbarians only should; but when they say this, they do nothing more than inquire who is a slave by nature, which was what we at first said; for we must acknowledge that there are some persons who, wherever they are, must necessarily be slaves, but others in no situation; thus also it is with those of noble descent: it is not only in their own country that they are Esteemed as such, but everywhere, but the barbarians are respected on this account at home only; as if nobility and freedom were of two sorts, the one universal, the other not so. Thus says the Helen of Theodectes:
<<<
"Who dares reproach me with the name of slave? When from the immortal gods, on either side, I draw my lineage."
<<<
Those who express sentiments like these, shew only that they distinguish the slave and the freeman, the noble and the ignoble from each other by their virtues and their vices; for they think it reasonable, that as a man begets a man, and a beast a beast, so from a good man, a good man should be descended; and this is what nature desires to do, but frequently cannot accomplish it. It is evident then that this doubt has some reason in it, and that these persons are not slaves, and those freemen, by the appointment of nature; and also that in some instances it is sufficiently clear, that it is advantageous to both parties for this man to be a slave, and that to be a master, and that it is right and just, that some should be governed, and others govern, in the manner that nature intended; of which sort of government is that which a master exercises over a slave. But to govern ill is disadvantageous to both; for the same thing is useful to the part and to the whole, to the body and to the soul; but the slave is as it were a part of the master, as if he were an animated part of his body, though separate. For which reason a mutual utility and friendship may subsist between the master and the slave, I mean when they are placed by nature in that relation to each other, for the contrary takes place amongst those who are reduced to slavery by the law, or by conquest.
It is evident from what has been said, that a herile and a political government are not the same, or that all governments are alike to each other, as some affirm; for one is adapted to the nature of freemen, the other to that of slaves. Domestic government is a monarchy, for that is what prevails in every house; but a political state is the government of free men and equals. The master is not so called from his knowing how to manage his slave, but because he is so; for the same reason a slave and a freeman have their respective appellations. There is also one sort of knowledge proper for a master, another for a slave; the slave's is of the nature of that which was taught by a slave at Syracuse; for he for a stipulated sum instructed the boys in all the business of a household slave, of which there are various sorts to be learnt, as the art of cookery, and other such-like services, of which some are allotted to some, and others to others; some employments being more honourable, others more necessary; according to the proverb, "One slave excels another, one master excels another:" in such-like things the knowledge of a slave consists. The knowledge of the master is to be able properly to employ his slaves, for the mastership of slaves is the employment, not the mere possession of them; not that this knowledge contains anything great or respectable; for what a slave ought to know how to do, that a master ought to know how to order; for which reason, those who have it in their power to be free from these low attentions, employ a steward for this business, and apply themselves either to public affairs or philosophy: the knowledge of procuring what is necessary for a family is different from that which belongs either to the master or the slave: and to do this justly must be either by war or hunting. And thus much of the difference between a master and a slave.
As a slave is a particular species of property, let us by all means inquire into the nature of property in general, and the acquisition of money, according to the manner we have proposed. In the first place then, some one may doubt whether the getting of money is the same thing as economy, or whether it is a part of it, or something subservient to it; and if so, whether it is as the art of making shuttles is to the art of weaving, or the art of making brass to that of statue founding, for they are not of the same service; for the one supplies the tools, the other the matter: by the matter I mean the subject out of which the work is finished, as wool for the cloth and brass for the statue. It is evident then that the getting of money is not the same thing as economy, for the business of the one is to furnish the means of the other to use them; and what art is there employed in the management of a family but economy, but whether this is a part of it, or something of a different species, is a doubt; for if it is the business of him who is to get money to find out how riches and possessions may be procured, and both these arise from various causes, we must first inquire whether the art of husbandry is part of money-getting or something different, and in general, whether the same is not true of every acquisition and every attention which relates to provision. But as there are many sorts of provision, so are the methods of living both of man and the brute creation very various; and as it is impossible to live without food, the difference in that particular makes the lives of animals so different from each other. Of beasts, some live in herds, others separate, as is most convenient for procuring themselves food; as some of them live upon flesh, others on fruit, and others on whatsoever they light on, nature having so distinguished their course of life, that they can very easily procure themselves subsistence; and as the same things are not agreeable to all, but one animal likes one thing and another another, it follows that the lives of those beasts who live upon flesh must be different from the lives of those who live on fruits; so is it with men, their lives differ greatly from each other; and of all these the shepherd's is the idlest, for they live upon the flesh of tame animals, without any trouble, while they are obliged to change their habitations on account of their flocks, which they are compelled to follow, cultivating, as it were, a living farm. Others live exercising violence over living creatures, one pursuing this thing, another that, these preying upon men; those who live near lakes and marshes and rivers, or the sea itself, on fishing, while others are fowlers, or hunters of wild beasts; but the greater part of mankind live upon the produce of the earth and its cultivated fruits; and the manner in which all those live who follow the direction of nature, and labour for their own subsistence, is nearly the same, without ever thinking to procure any provision by way of exchange or merchandise, such are shepherds, husband-men, robbers, fishermen, and hunters: some join different employments together, and thus live very agreeably; supplying those deficiencies which were wanting to make their subsistence depend upon themselves only: thus, for instance, the same person shall be a shepherd and a robber, or a husbandman and a hunter; and so with respect to the rest, they pursue that mode of life which necessity points out. This provision then nature herself seems to have furnished all animals with, as well immediately upon their first origin as also when they are arrived at a state of maturity; for at the first of these periods some of them are provided in the womb with proper nourishment, which continues till that which is born can get food for itself, as is the case with worms and birds; and as to those which bring forth their young alive, they have the means for their subsistence for a certain time within themselves, namely milk. It is evident then that we may conclude of those things that are, that plants are created for the sake of animals, and animals for the sake of men; the tame for our use and provision; the wild, at least the greater part, for our provision also, or for some other advantageous purpose, as furnishing us with clothes, and the like. As nature therefore makes nothing either imperfect or in vain, it necessarily follows that she has made all these things for men: for which reason what we gain in war is in a certain degree a natural acquisition; for hunting is a part of it, which it is necessary for us to employ against wild beasts; and those men who being intended by nature for slavery are unwilling to submit to it, on which occasion such a. war is by nature just: that species of acquisition then only which is according to nature is part of economy; and this ought to be at hand, or if not, immediately procured, namely, what is necessary to be kept in store to live upon, and which are useful as well for the state as the family. And true riches seem to consist in these; and the acquisition of those possessions which are necessary for a happy life is not infinite; though Solon says otherwise in this verse:
<<<
"No bounds to riches can be fixed for man;"
<<<
for they may be fixed as in other arts; for the instruments of no art whatsoever are infinite, either in their number or their magnitude; but riches are a number of instruments in domestic and civil economy; it is therefore evident that the acquisition of certain things according to nature is a part both of domestic and civil economy, and for what reason.
We have now determined what was before doubtful, whether or no the art of getting money is his business who is at the head of a family or a state, and though not strictly so, it is however very necessary; for as a politician does not make men, but receiving them from the hand of nature employs them to proper purposes; thus the earth, or the sea, or something else ought to supply them with provisions, and this it is the business of the master of the family to manage properly; for it is not the weaver's business to make yarn, but to use it, and to distinguish what is good and useful from what is bad and of no service; and indeed some one may inquire why getting money should be a part of economy when the art of healing is not, as it is as requisite that the family should be in health as that they should eat, or have anything else which is necessary; and as it is indeed in some particulars the business both of the master of the family, and he to whom the government of the state is entrusted, to see after the health of those under their care, but in others not, but the physician's; so also as to money; in some respects it is the business of the master of the family, in others not, but of the servant; but as we have already said, it is chiefly nature's, for it is her part to supply her offspring with food; for everything finds nourishment left for it in what produced it; for which reason the natural riches of all men arise from fruits and animals. Now money-making, as we say, being twofold, it may be applied to two purposes, the service of the house or retail trade; of which the first is necessary and commendable, the other justly censurable; for it has not its origin in nature, but by it men gain from each other; for usury is most reasonably detested, as it is increasing our fortune by money itself, and not employing it for the purpose it was originally intended, namely exchange.
And this is the explanation of the name (TOKOS), which means the breeding of money. For as offspring resemble their parents, so usury is money bred of money. Whence of all forms of money-making it is most against nature.
Having already sufficiently considered the general principles of this subject, let us now go into the practical part thereof; the one is a liberal employment for the mind, the other necessary. These things are useful in the management of one's affairs; to be skilful in the nature of cattle, which are most profitable, and where, and how; as for instance, what advantage will arise from keeping horses, or oxen, or sheep, or any other live stock; it is also necessary to be acquainted with the comparative value of these things, and which of them in particular places are worth most; for some do better in one place, some in another. Agriculture also should be understood, and the management of arable grounds and orchards; and also the care of bees, and fish, and birds, from whence any profit may arise; these are the first and most proper parts of domestic management.
With respect to gaining money by exchange, the principal method of doing this is by merchandise, which is carried on in three different ways, either by sending the commodity for sale by sea or by land, or else selling it on the place where it grows; and these differ from each other in this, that the one is more profitable, the other safer. The second method is by usury. The third by receiving wages for work done, and this either by being employed in some mean art, or else in mere bodily labour. There is also a third species of improving a fortune, that is something between this and the first; for it partly depends upon nature, partly upon exchange; the subject of which is, things that are immediately from the earth, or their produce, which, though they bear no fruit, are yet useful, such as selling of timber and the whole art of metallurgy, which includes many different species, for there are various sorts of things dug out of the earth.
These we have now mentioned in general, but to enter into particulars concerning each of them, though it might be useful to the artist, would be tiresome to dwell on. Now of all the works of art, those are the most excellent wherein chance has the least to do, and those are the meanest which deprave the body, those the most servile in which bodily strength alone is chiefly wanted, those most illiberal which require least skill; but as there are books written on these subjects by some persons, as by Chares the Panian, and Apollodorus the Lemnian, upon husbandry and planting; and by others on other matters, let those who have occasion consult them thereon; besides, every person should collect together whatsoever he hears occasionally mentioned, by means of which many of those who aimed at making a fortune have succeeded in their intentions; for all these are useful to those who make a point of getting money, as in the contrivance of Thales the Milesian (which was certainly a gainful one, but as it was his it was attributed to his wisdom, though the method he used was a general one, and would universally succeed), when they reviled him for his poverty, as if the study of philosophy was useless: for they say that he, perceiving by his skill in astrology that there would be great plenty of olives that year, while it was yet winter, having got a little money, he gave earnest for all the oil works that were in Miletus and Chios, which he hired at a low price, there being no one to bid against him; but when the season came for making oil, many persons wanting them, he all at once let them upon what terms he pleased; and raising a large sum of money by that means, convinced them that it was easy for philosophers to be rich if they chose it, but that that was not what they aimed at; in this manner is Thales said to have shown his wisdom. It indeed is, as we have said, generally gainful for a person to contrive to make a monopoly of anything; for which reason some cities also take this method when they want money, and monopolise their commodities. There was a certain person in Sicily who laid out a sum of money which was deposited in his hand in buying up all the iron from the iron merchants; so that when the dealers came from the markets to purchase, there was no one had any to sell but himself; and though he put no great advance upon it, yet by laying out fifty talents he made an hundred. When Dionysius heard this he permitted him to take his money with him, but forbid him to continue any longer in Sicily, as being one who contrived means for getting money inconsistent with his affairs. This man's view and Thales's was exactly the same; both of them contrived to procure a monopoly for themselves: it is useful also for politicians to understand these things, for many states want to raise money and by such means, as well as private families, nay more so; for which reason some persons who are employed in the management of public affairs confine themselves to this province only.
There are then three parts of domestic government, the masters, of which we have already treated, the fathers, and the husbands; now the government of the wife and children should both be that of free persons, but not the same; for the wife should be treated as a citizen of a free state, the children should be under kingly power; for the male is by nature superior to the female, except when something happens contrary to the usual course of nature, as is the elder and perfect to the younger and imperfect. Now in the generality of free states, the governors and the governed alternately change place; for an equality without any preference is what nature chooses; however, when one governs and another is governed, she endeavours that there should be a distinction between them in forms, expressions, and honours; according to what Amasis said of his laver. This then should be the established rule between the man and the woman. The government of children should be kingly; for the power of the father over the child is founded in affection and seniority, which is a species of kingly government; for which reason Homer very properly calls Jupiter "the father of gods and men," who was king of both these; for nature requires that a king should be of the same species with those whom he governs, though superior in some particulars, as is the case between the elder and the younger, the father and the son.
It is evident then that in the due government of a family, greater attention should be paid to the several members of it and their virtues than to the possessions or riches of it; and greater to the freemen than the slaves: but here some one may doubt whether there is any other virtue in a slave than his organic services, and of higher estimation than these, as temperance, fortitude, justice, and such-like habits, or whether they possess only bodily qualities: each side of the question has its difficulties; for if they possess these virtues, wherein do they differ from freemen? and that they do not, since they are men, and partakers of reason, is absurd. Nearly the same inquiry may be made concerning a woman and a child, whether these also have their proper virtues; whether a woman ought to be temperate, brave, and just, and whether a child is temperate or no; and indeed this inquiry ought to be general, whether the virtues of those who, by nature, either govern or are governed, are the same or different; for if it is necessary that both of them should partake of the fair and good, why is it also necessary that, without exception, the one should govern, the other always be governed? for this cannot arise from their possessing these qualities in different degrees; for to govern, and to be governed, are things different in species, but more or less are not. And yet it is wonderful that one party ought to have them, and the other not; for if he who is to govern should not be temperate and just, how can he govern well? or if he is to be governed, how can he be governed well? for he who is intemperate and a coward will never do what he ought: it is evident then that both parties ought to be virtuous; but there is a difference between them, as there is between those who by nature command and who by nature obey, and this originates in the soul; for in this nature has planted the governing and submitting principle, the virtues of which we say are different, as are those of a rational and an irrational being. It is plain then that the same principle may be extended farther, and that there are in nature a variety of things which govern and are governed; for a freeman is governed in a different manner from a slave, a male from a female, and a man from a child: and all these have parts of mind within them, but in a different manner. Thus a slave can have no power of determination, a woman but a weak one, a child an imperfect one. Thus also must it necessarily be with respect to moral virtues; all must be supposed to possess them, but not in the same manner, but as is best suited to every one's employment; on which account he who is to govern ought to be perfect in moral virtue, for his business is entirely that of an architect, and reason is the architect; while others want only that portion of it which may be sufficient for their station; from whence it is evident, that although moral virtue is common to all those we have spoken of, yet the temperance of a man and a woman are not the same, nor their courage, nor their justice, though Socrates thought otherwise; for the courage of the man consists in commanding, the woman's in obeying; and the same is true in other particulars: and this will be evident to those who will examine different virtues separately; for those who use general terms deceive themselves when they say, that virtue consists in a good disposition of mind, or doing what is right, or something of this sort. They do much better who enumerate the different virtues as Georgias did, than those who thus define them; and as Sophocles speaks of a woman, we think of all persons, that their 'virtues should be applicable to their characters, for says he,
<<<
"Silence is a woman's ornament,"
<<<
but it is not a man's; and as a child is incomplete, it is evident that his virtue is not to be referred to himself in his present situation, but to that in which he will be complete, and his preceptor. In like manner the virtue of a slave is to be referred to his master; for we laid it down as a maxim, that the use of a slave was to employ him in what you wanted; so that it is clear enough that few virtues are wanted in his station, only that he may not neglect his work through idleness or fear: some person may question if what I have said is true, whether virtue is not necessary for artificers in their calling, for they often through idleness neglect their work, but the difference between them is very great; for a slave is connected with you for life, but the artificer not so nearly: as near therefore as the artificer approaches to the situation of a slave, just so much ought he to have of the virtues of one; for a mean artificer is to a certain point a slave; but then a slave is one of those things which are by nature what they are, but this is not true of a shoemaker, or any other artist. It is evident then that a slave ought to be trained to those virtues which are proper for his situation by his master; and not by him who has the power of a master, to teach him any particular art. Those therefore are in the wrong who would deprive slaves of reason, and say that they have only to follow their orders; for slaves want more instruction than children, and thus we determine this matter. It is necessary, I am sensible, for every one who treats upon government, to enter particularly into the relations of husband and wife, and of parent and child, and to show what are the virtues of each and their respective connections with each other; what is right and what is wrong; and how the one ought to be followed, and the other avoided. Since then every family is part of a city, and each of those individuals is part of a family, and the virtue of the parts ought to correspond to the virtue of the whole; it is necessary, that both the wives and children of the community should be instructed correspondent to the nature thereof, if it is of consequence to the virtue of the state, that the wives and children therein should be virtuous, and of consequence it certainly is, for the wives are one half of the free persons; and of the children the succeeding citizens are to be formed. As then we have determined these points, we will leave the rest to be spoken to in another place, as if the subject was now finished; and beginning again anew, first consider the sentiments of those who have treated of the most perfect forms of government.
---
!!![[CHAPTER I|ELLIS: BOOK II: CHAPTER I]]
{{ELLIS: BOOK II: CHAPTER I}}
---
!!![[CHAPTER II|ELLIS: BOOK II: CHAPTER II]]
{{ELLIS: BOOK II: CHAPTER II}}
---
!!![[CHAPTER III|ELLIS: BOOK II: CHAPTER III]]
{{ELLIS: BOOK II: CHAPTER III}}
---
!!![[CHAPTER IV|ELLIS: BOOK II: CHAPTER IV]]
{{ELLIS: BOOK II: CHAPTER IV}}
---
!!![[CHAPTER V|ELLIS: BOOK II: CHAPTER V]]
{{ELLIS: BOOK II: CHAPTER V}}
---
!!![[CHAPTER VI|ELLIS: BOOK II: CHAPTER VI]]
{{ELLIS: BOOK II: CHAPTER VI}}
---
!!![[CHAPTER VII|ELLIS: BOOK II: CHAPTER VII]]
{{ELLIS: BOOK II: CHAPTER VII}}
---
!!![[CHAPTER VIII|ELLIS: BOOK II: CHAPTER VIII]]
{{ELLIS: BOOK II: CHAPTER VIII}}
---
!!![[CHAPTER IX|ELLIS: BOOK II: CHAPTER IX]]
{{ELLIS: BOOK II: CHAPTER IX}}
---
!!![[CHAPTER X|ELLIS: BOOK II: CHAPTER X]]
{{ELLIS: BOOK II: CHAPTER X}}
---
!!![[CHAPTER XI|ELLIS: BOOK II: CHAPTER XI]]
{{ELLIS: BOOK II: CHAPTER XI}}
---
!!![[CHAPTER XII|ELLIS: BOOK II: CHAPTER XII]]
{{ELLIS: BOOK II: CHAPTER XII}}
Since then we propose to inquire what civil society is of all others best for those who have it in their power to live entirely as they wish, it is necessary to examine into the polity of those states which are allowed to be well governed; and if there should be any others which some persons have described, and which appear properly regulated, to note what is right and useful in them; and when we point out wherein they have failed, let not this be imputed to an affectation of wisdom, for it is because there are great defects in all those which are already established, that I have been induced to undertake this work. We will begin with that part of the subject which naturally presents itself first to our consideration. The members of every state must of necessity have all things in common, or some things common, and not others, or nothing at all common. To have nothing in common is evidently impossible, for society itself is one species of community; and the first thing necessary thereunto is a common place of habitation, namely the city, which must be one, and this every citizen must have a share in. But in a government which is to be well founded, will it be best to admit of a community in everything which is capable thereof, or only in some particulars, but in others not? for it is possible that the citizens may have their wives, and children, and goods in common, as in Plato's Commonwealth; for in that Socrates affirms that all these particulars ought to be so. Which then shall we prefer? the custom which is already established, or the laws which are proposed in that treatise?
Now as a community of wives is attended with many other difficulties, so neither does the cause for which he would frame his government in this manner seem agreeable to reason, nor is it capable of producing that end which he has proposed, and for which he says it ought to take place; nor has he given any particular directions for putting it in practice. Now I also am willing to agree with Socrates in the principle which he proceeds upon, and admit that the city ought to be one as much as possible; and yet it is evident that if it is contracted too much, it will be no longer a city, for that necessarily supposes a multitude; so that if we proceed in this manner, we shall reduce a city to a family, and a family to a single person: for we admit that a family is one in a greater degree than a city, and a single person than a family; so that if this end could be obtained, it should never be put in practice, as it would annihilate the city; for a city does not only consist of a large number of inhabitants, but there must also be different sorts; for were they all alike, there could be no city; for a confederacy and a city are two different things; for a confederacy is valuable from its numbers, although all those who compose it are men of the same calling; for this is entered into for the sake of mutual defence, as we add an additional weight to make the scale go down. The same distinction prevails between a city and a nation when the people are not collected into separate villages, but live as the Arcadians. Now those things in which a city should be one are of different sorts, and in preserving an alternate reciprocation of power between these, the safety thereof consists (as I have already mentioned in my treatise on Morals), for amongst freemen and equals this is absolutely necessary; for all cannot govern at the same time, but either by the year, or according to some other regulation or time, by which means every one in his turn will be in office; as if the shoemakers and carpenters should exchange occupations, and not always be employed in the same calling. But as it is evidently better, that these should continue to exercise their respective trades; so also in civil society, where it is possible, it would be better that the government should continue in the same hands; but where it is not (as nature has made all men equal, and therefore it is just, be the administration good or bad, that all should partake of it), there it is best to observe a rotation, and let those who are their equals by turns submit to those who are at that time magistrates, as they will, in their turns, alternately be governors and governed, as if they were different men: by the same method different persons will execute different offices. From hence it is evident, that a city cannot be one in the manner that some persons propose; and that what has been said to be the greatest good which it could enjoy, is absolutely its destruction, which cannot be: for the good of anything is that which preserves it. For another reason also it is clear, that it is not for the best to endeavour to make a city too much one, because a family is more sufficient in itself than a single person, a city than a family; and indeed Plato supposes that a city owes its existence to that sufficiency in themselves which the members of it enjoy. If then this sufficiency is so desirable, the less the city is one the better.
But admitting that it is most advantageous for a city to be one as much as possible, it does not seem to follow that this will take place by permitting all at once to say this is mine, and this is not mine (though this is what Socrates regards as a proof that a city is entirely one), for the word All is used in two senses; if it means each individual, what Socrates proposes will nearly take place; for each person will say, this is his own son, and his own wife, and his own property, and of everything else that may happen to belong to him, that it is his own. But those who have their wives and children in common will not say so, but all will say so, though not as individuals; therefore, to use the word all is evidently a fallacious mode of speech; for this word is sometimes used distributively, and sometimes collectively, on account of its double meaning, and is the cause of inconclusive syllogisms in reasoning. Therefore for all persons to say the same thing was their own, using the word all in its distributive sense, would be well, but is impossible: in its collective sense it would by no means contribute to the concord of the state. Besides, there would be another inconvenience attending this proposal, for what is common to many is taken least care of; for all men regard more what is their own than what others share with them in, to which they pay less attention than is incumbent on every one: let me add also, that every one is more negligent of what another is to see to, as well as himself, than of his own private business; as in a family one is often worse served by many servants than by a few. Let each citizen then in the state have a thousand children, but let none of them be considered as the children of that individual, but let the relation of father and child be common to them all, and they will all be neglected. Besides, in consequence of this, whenever any citizen behaved well or ill, every person, be the number what it would, might say, this is my son, or this man's or that; and in this manner would they speak, and thus would they doubt of the whole thousand, or of whatever number the city consisted; and it would be uncertain to whom each child belonged, and when it was born, who was to take care of it: and which do you think is better, for every one to say this is mine, while they may apply it equally to two thousand or ten thousand; or as we say, this is mine in our present forms of government, where one man calls another his son, another calls that same person his brother, another nephew, or some other relation, either by blood or marriage, and first extends his care to him and his, while another regards him as one of the same parish and the same tribe; and it is better for any one to be a nephew in his private capacity than a son after that manner. Besides, it will be impossible to prevent some persons from suspecting that they are brothers and sisters, fathers and mothers to each other; for, from the mutual likeness there is between the sire and the offspring, they will necessarily conclude in what relation they stand to each other, which circumstance, we are informed by those writers who describe different parts of the world, does sometimes happen; for in Upper Africa there are wives in common who yet deliver their children to their respective fathers, being guided by their likeness to them. There are also some mares and cows which naturally bring forth their young so like the male, that we can easily distinguish by which of them they were impregnated: such was the mare called Just, in Pharsalia.
Besides, those who contrive this plan of community cannot easily avoid the following evils; namely, blows, murders involuntary or voluntary, quarrels, and reproaches, all which it would be impious indeed to be guilty of towards our fathers and mothers, or those who are nearly related to us; though not to those who are not connected to us by any tie of affinity: and certainly these mischiefs must necessarily happen oftener amongst those who do not know how they are connected to each other than those who do; and when they do happen, if it is among the first of these, they admit of a legal expiation, but amongst the latter that cannot be done. It is also absurd for those who promote a community of children to forbid those who love each other from indulging themselves in the last excesses of that passion, while they do not restrain them from the passion itself, or those intercourses which are of all things most improper, between a Father and a son, a brother and a brother, and indeed the thing itself is most absurd. It is also ridiculous to prevent this intercourse between the nearest relations, for no other reason than the violence of the pleasure, while they think that the relation of father and daughter, the brother and sister, is of no consequence at all. It seems also more advantageous for the state, that the husbandmen should have their wives and children in common than the military, for there will be less affection among them in that case than when otherwise; for such persons ought to be under subjection, that they may obey the laws, and not seek after innovations. Upon the whole, the consequences of such a law as this would be directly contrary to those things which good laws ought to establish, and which Socrates endeavoured to establish by his regulations concerning women and children: for we think that friendship is the greatest good which can happen to any city, as nothing so much prevents seditions: and amity in a city is what Socrates commends above all things, which appears to be, as indeed he says, the effect of friendship; as we learn from Aristophanes in the Erotics, who says, that those who love one another from the excess of that passion, desire to breathe the same soul, and from being two to be blended into one: from whence it would necessarily follow, that both or one of them must be destroyed. But now in a city which admits of this community, the tie of friendship must, from that very cause, be extremely weak, when no father can say, this is my son; or son, this is my father; for as a very little of what is sweet, being mixed with a great deal of water is imperceptible after the mixture, so must all family connections, and the names they go by, be necessarily disregarded in such a community, it being then by no means necessary that the father should have any regard for him he called a son, or the brothers for those they call brothers. There are two things which principally inspire mankind with care and love of their offspring, knowing it is their own, and what ought to be the object of their affection, neither of which can take place in this sort of community. As for exchanging the children of the artificers and husbandmen with those of the military, and theirs reciprocally with these, it will occasion great confusion in whatever manner it shall be done; for of necessity, those who carry the children must know from whom they took and to whom they gave them; and by this means those evils which I have already mentioned will necessarily be the more likely to happen, as blows, incestuous love, murders, and the like; for those who are given from their own parents to other citizens, the military, for instance, will not call them brothers, sons, fathers, or mothers. The same thing would happen to those of the military who were placed among the other citizens; so that by this means every one would be in fear how to act in consequence of consanguinity. And thus let us determine concerning a community of wives and children.
There are two considerations which offer themselves with respect to the government established at Lacedaemon and Crete, and indeed in almost all other states whatsoever; one is whether their laws do or do not promote the best establishment possible? the other is whether there is anything, if we consider either the principles upon which it is founded or the executive part of it, which prevents the form of government that they had proposed to follow from being observed; now it is allowed that in every well-regulated state the members of it should be free from servile labour; but in what manner this shall be effected is not so easy to determine; for the Penestse have very often attacked the Thessalians, and the Helots the Lacedaemonians, for they in a manner continually watch an opportunity for some misfortune befalling them. But no such thing has ever happened to the Cretans; the reason for which probably is, that although they are engaged in frequent wars with the neighbouring cities, yet none of these would enter into an alliance with the revolters, as it would be disadvantageous for them, who themselves also have their villains. But now there is perpetual enmity between the Lacedaemonians and all their neighbours, the Argives, the Messenians, and the Arcadians. Their slaves also first revolted from the Thessalians while they were engaged in wars with their neighbours the Acheans, the Perrabeans, and the Magnesians. It seems to me indeed, if nothing else, yet something very troublesome to keep upon proper terms with them; for if you are remiss in your discipline they grow insolent, and think themselves upon an equality with their masters; and if they are hardly used they are continually plotting against you and hate you. It is evident, then, that those who employ slaves have not as yet hit upon the right way of managing them.
As to the indulging of women in any particular liberties, it is hurtful to the end of government and the prosperity of the city; for as a man and his wife are the two parts of a family, if we suppose a city to be divided into two parts, we must allow that the number of men and women will be equal.
In whatever city then the women are not under good regulations, we must look upon one half of it as not under the restraint of law, as it there happened; for the legislator, desiring to make his whole city a collection of warriors with respect to the men, he most evidently accomplished his design; but in the meantime the women were quite neglected, for they live without restraint in every improper indulgence and luxury. So that in such a state riches will necessarily be in general esteem, particularly if the men are governed by their wives, which has been the case with many a brave and warlike people except the Celts, and those other nations, if there are any such, who openly practise pederasty. And the first mythologists seem not improperly to have joined Mars and Venus together; for all nations of this character are greatly addicted either to the love of women or of boys, for which reason it was thus at Lacedaemon; and many things in their state were done by the authority of the women. For what is the difference, if the power is in the hands of the women, or in the hands of those whom they themselves govern? it must turn to the same account. As this boldness of the women can be of no use in any common occurrences, if it was ever so, it must be in war; but even here we find that the Lacedaemonian women were of the greatest disservice, as was proved at the time of the Theban invasion, when they were of no use at all, as they are in other cities, but made more disturbance than even the enemy.
The origin of this indulgence which the Lacedaemonian women enjoy is easily accounted for, from the long time the men were absent from home upon foreign expeditions against the Argives, and afterwards the Arcadians and Messenians, so that, when these wars were at an end, their military life, in which there is no little virtue, prepared them to obey the precepts of their law-giver; but we are told, that when Lycurgus endeavoured also to reduce the women to an obedience to his laws, upon their refusal he declined it. It may indeed be said that the women were the causes of these things, and of course all the fault was theirs. But we are not now considering where the fault lies, or where it does not lie, but what is right and what is wrong; and when the manners of the women are not well regulated, as I have already said, it must not only occasion faults which are disgraceful to the state, but also increase the love of money. In the next place, fault may be found with his unequal division of property, for some will have far too much, others too little; by which means the land will come into few hands, which business is badly regulated by his laws. For he made it infamous for any one either to buy or sell their possessions, in which he did right; but he permitted any one that chose it to give them away, or bequeath them, although nearly the same consequences will arise from one practice as from the other. It is supposed that near two parts in five of the whole country is the property of women, owing to their being so often sole heirs, and having such large fortunes in marriage; though it would be better to allow them none, or a little, or a certain regulated proportion. Now every one is permitted to make a woman his heir if he pleases; and if he dies intestate, he who succeeds as heir at law gives it to whom he pleases. From whence it happens that although the country is able to support fifteen hundred horse and thirty thousand foot, the number does not amount to one thousand.
And from these facts it is evident, that this particular is badly regulated; for the city could not support one shock, but was ruined for want of men. They say, that during the reigns of their ancient kings they used to present foreigners with the freedom of their city, to prevent there being a want of men while they carried on long wars; it is also affirmed that the number of Spartans was formerly ten thousand; but be that as it will, an equality of property conduces much to increase the number of the people. The law, too, which he made to encourage population was by no means calculated to correct this inequality; for being willing that the Spartans should be as numerous as possible, to make them desirous of having large families he ordered that he who had three children should be excused the night-watch, and that he who had four should pay no taxes: though it is very evident, that while the land was divided in this manner, that if the people increased there must many of them be very poor.
Nor was he less blamable for the manner in which he constituted the ephori; for these magistrates take cognisance of things of the last importance, and yet they are chosen out of the people in general; so that it often happens that a very poor person is elected to that office, who, from that circumstance, is easily bought. There have been many instances of this formerly, as well as in the late affair at Andros. And these men, being corrupted with money, went as far as they could to ruin the city: and, because their power was too great and nearly tyrannical, their kings were obliged to natter them, which contributed greatly to hurt the state; so that it altered from an aristocracy to a democracy. This magistracy is indeed the great support of the state; for the people are easy, knowing that they are eligible to the first office in it; so that, whether it took place by the intention of the legislator, or whether it happened by chance, this is of great service to their affairs; for it is necessary that every member of the state should endeavour that each part of the government should be preserved, and continue the same. And upon this principle their kings have always acted, out of regard to their honour; the wise and good from their attachment to the senate, a seat wherein they consider as the reward of virtue; and the common people, that they may support the ephori, of whom they consist. And it is proper that these magistrates should be chosen out of the whole community, not as the custom is at present, which is very ridiculous. The ephori are the supreme judges in causes of the last consequence; but as it is quite accidental what sort of persons they may be, it is not right that they should determine according to their own opinion, but by a written law or established custom. Their way of life also is not consistent with the manners of the city, for it is too indulgent; whereas that of others is too severe; so that they cannot support it, but are obliged privately to act contrary to law, that they may enjoy some of the pleasures of sense. There are also great defects in the institution of their senators. If indeed they were fitly trained to the practice of every human virtue, every one would readily admit that they would be useful to the government; but still it might be debated whether they should be continued judges for life, to determine points of the greatest moment, since the mind has its old age as well as the body; but as they are so brought up, that even the legislator could not depend upon them as good men, their power must be inconsistent with the safety of the state: for it is known that the members of that body have been guilty both of bribery and partiality in many public affairs; for which reason it had been much better if they had been made answerable for their conduct, which they are not. But it may be said the ephori seem to have a check upon all the magistrates. They have indeed in this particular very great power; but I affirm that they should not be entrusted with this control in the manner they are. Moreover, the mode of choice which they make use of at the election of their senators is very childish. Nor is it right for any one to solicit for a place he is desirous of; for every person, whether he chooses it or not, ought to execute any office he is fit for. But his intention was evidently the same in this as in the other parts of his government. For making his citizens ambitious after honours, with men of that disposition he has filled his senate, since no others will solicit for that office; and yet the principal part of those crimes which men are deliberately guilty of arise from ambition and avarice.
We will inquire at another time whether the office of a king is useful to the state: thus much is certain, that they should be chosen from a consideration of their conduct and not as they are now. But that the legislator himself did not expect to make all his citizens honourable and completely virtuous is evident from this, that he distrusts them as not being good men; for he sent those upon the same embassy that were at variance with each other; and thought, that in the dispute of the kings the safety of the state consisted. Neither were their common meals at first well established: for these should rather have been provided at the public expense, as at Crete, where, as at Lacedaemon, every one was obliged to buy his portion, although he might be very poor, and could by no means bear the expense, by which means the contrary happened to what the legislator desired: for he intended that those public meals should strengthen the democratic part of his government: but this regulation had quite the contrary effect, for those who were very poor could not take part in them; and it was an observation of their forefathers, that the not allowing those who could not contribute their proportion to the common tables to partake of them, would be the ruin of the state. Other persons have censured his laws concerning naval affairs, and not without reason, as it gave rise to disputes. For the commander of the fleet is in a manner set up in opposition to the kings, who are generals of the army for life.
There is also another defect in his laws worthy of censure, which Plato has given in his book of Laws; that the whole constitution was calculated only for the business of war: it is indeed excellent to make them conquerors; for which reason the preservation of the state depended thereon. The destruction of it commenced with their victories: for they knew not how to be idle, or engage in any other employment than war. In this particular also they were mistaken, that though they rightly thought, that those things which are the objects of contention amongst mankind are better procured by virtue than vice, yet they wrongfully preferred the things themselves to virtue. Nor was the public revenue well managed at Sparta, for the state was worth nothing while they were obliged to carry on the most extensive wars, and the subsidies were very badly raised; for as the Spartans possessed a large extent of country, they were not exact upon each other as to what they paid in. And thus an event contrary to the legislator's intention took place; for the state was poor, the individuals avaricious. Enough of the Lacedaemonian government; for these seem the chief defects in it.
We proceed next to consider in what manner property should be regulated in a state which is formed after the most perfect mode of government, whether it should be common or not; for this may be considered as a separate question from what had been determined concerning wives and children; I mean, whether it is better that these should be held separate, as they now everywhere are, or that not only possessions but also the usufruct of them should be in common; or that the soil should have a particular owner, but that the produce should be brought together and used as one common stock, as some nations at present do; or on the contrary, should the soil be common, and should it also be cultivated in common, while the produce is divided amongst the individuals for their particular use, which is said to be practised by some barbarians; or shall both the soil and the fruit be common? When the business of the husbandman devolves not on the citizen, the matter is much easier settled; but when those labour together who have a common right of possession, this may occasion several difficulties; for there may not be an equal proportion between their labour and what they consume; and those who labour hard and have but a small proportion of the produce, will certainly complain of those who take a large share of it and do but little for that. Upon the whole, as a community between man and man so entire as to include everything possible, and thus to have all things that man can possess in common, is very difficult, so is it particularly so with respect to property; and this is evident from that community which takes place between those who go out to settle a colony; for they frequently have disputes with each other upon the most common occasions, and come to blows upon trifles: we find, too, that we oftenest correct those slaves who are generally employed in the common offices of the family: a community of property then has these and other inconveniences attending it.
But the manner of life which is now established, more particularly when embellished with good morals and a system of equal laws, is far superior to it, for it will have the advantage of both; by both I mean properties being common, and divided also; for in some respects it ought to be in a manner common, but upon the whole private: for every man's attention being employed on his own particular concerns, will prevent mutual complaints against each other; nay, by this means industry will be increased, as each person will labour to improve his own private property; and it will then be, that from a principle of virtue they will mutually perform good offices to each other, according to the proverb, "All things are common amongst friends;" and in some cities there are traces of this custom to be seen, so that it is not impracticable, and particularly in those which are best governed; some things are by this means in a manner common, and others might be so; for there, every person enjoying his own private property, some things he assists his friend with, others are considered as in common; as in Lacedaemon, where they use each other's slaves, as if they were, so to speak, their own, as they do their horses and dogs, or even any provision they may want in a journey.
It is evident then that it is best to have property private, but to make the use of it common; but how the citizens are to be brought to it is the particular business of the legislator. And also with respect to pleasure, it is unspeakable how advantageous it is, that a man should think he has something which he may call his own; for it is by no means to no purpose, that each person should have an affection for himself, for that is natural, and yet to be a self-lover is justly censured; for we mean by that, not one that simply loves himself, but one that loves himself more than he ought; in like manner we blame a money-lover, and yet both money and self is what all men love. Besides, it is very pleasing to us to oblige and assist our friends and companions, as well as those whom we are connected with by the rights of hospitality; and this cannot be done without the establishment of private property, which cannot take place with those who make a city too much one; besides, they prevent every opportunity of exercising two principal virtues, modesty and liberality. Modesty with respect to the female sex, for this virtue requires you to abstain from her who is another's; liberality, which depends upon private property, for without that no one can appear liberal, or do any generous action; for liberality consists in imparting to others what is our own.
This system of polity does indeed recommend itself by its good appearance and specious pretences to humanity; and when first proposed to any one, must give him great pleasure, as he will conclude it to be a wonderful bond of friendship, connecting all to all; particularly when any one censures the evils which are now to be found in society, as arising from properties not being common, I mean the disputes which happen between man and man, upon their different contracts with each other; those judgments which are passed in court in consequence of fraud, and perjury, and flattering the rich, none of which arise from properties being private, but from the vices of mankind. Besides, those who live in one general community, and have all things in common, oftener dispute with each other than those who have their property separate; from the very small number indeed of those who have their property in common, compared with those where it is appropriated, the instances of their quarrels are but few. It is also but right to mention, not only the inconveniences they are preserved from who live in a communion of goods, but also the advantages they are deprived of; for when the whole comes to be considered, this manner of life will be found impracticable.
We must suppose, then, that Socrates's mistake arose from the principle he set out with being false; we admit, indeed, that both a family and a city ought to be one in some particulars, but not entirely; for there is a point beyond which if a city proceeds in reducing itself to one, it will be no longer a city.
There is also another point at which it will still continue to be a city, but it will approach so near to not being one, that it will be worse than none; as if any one should reduce the voices of those who sing in concert to one, or a verse to a foot. But the people ought to be made one, and a community, as I have already said, by education; as property at Lacedaemon, and their public tables at Crete, were made common by their legislators. But yet, whosoever shall introduce any education, and think thereby to make his city excellent and respectable, will be absurd, while he expects to form it by such regulations, and not by manners, philosophy, and laws. And whoever would establish a government upon a community of goods, ought to know that he should consult the experience of many years, which would plainly enough inform him whether such a scheme is useful; for almost all things have already been found out, but some have been neglected, and others which have been known have not been put in practice. But this would be most evident, if any one could see such a government really established: for it would be impossible to frame such a city without dividing and separating it into its distinct parts, as public tables, wards, and tribes; so that here the laws will do nothing more than forbid the military to engage in agriculture, which is what the Lacedaemonians are at present endeavouring to do.
Nor has Socrates told us (nor is it easy to say) what plan of government should be pursued with respect to the individuals in the state where there is a community of goods established; for though the majority of his citizens will in general consist of a multitude of persons of different occupations, of those he has determined nothing; whether the property of the husbandman ought to be in common, or whether each person should have his share to himself; and also, whether their wives and children ought to be in common: for if all things are to be alike common to all, where will be the difference between them and the military, or what would they get by submitting to their government? and upon what principles would they do it, unless they should establish the wise practice of the Cretans? for they, allowing everything else to their slaves, forbid them only gymnastic exercises and the use of arms. And if they are not, but these should be in the same situation with respect to their property which they are in other cities, what sort of a community will there be? in one city there must of necessity be two, and those contrary to each other; for he makes the military the guardians of the state, and the husbandman, artisans, and others, citizens; and all those quarrels, accusations, and things of the like sort, which he says are the bane of other cities, will be found in his also: notwithstanding Socrates says they will not want many laws in consequence of their education, but such only as may be necessary for regulating the streets, the markets, and the like, while at the same time it is the education of the military only that he has taken any care of. Besides, he makes the husbandmen masters of property upon paying a tribute; but this would be likely to make them far more troublesome and high-spirited than the Helots, the Penestise, or the slaves which others employ; nor has he ever determined whether it is necessary to give any attention to them in these particulars, nor thought of what is connected therewith, their polity, their education, their laws; besides, it is of no little consequence, nor is it easy to determine, how these should be framed so as to preserve the community of the military.
Besides, if he makes the wives common, while the property continues separate, who shall manage the domestic concerns with the same care which the man bestows upon his fields? nor will the inconvenience be remedied by making property as well as wives common; and it is absurd to draw a comparison from the brute creation, and say, that the same principle should regulate the connection of a man and a woman which regulates theirs amongst whom there is no family association.
It is also very hazardous to settle the magistracy as Socrates has done; for he would have persons of the same rank always in office, which becomes the cause of sedition even amongst those who are of no account, but more particularly amongst those who are of a courageous and warlike disposition; it is indeed evidently necessary that he should frame his community in this manner; for that golden particle which God has mixed up in the soul of man flies not from one to the other, but always continues with the same; for he says, that some of our species have gold, and others silver, blended in their composition from the moment of their birth: but those who are to be husbandmen and artists, brass and iron; besides, though he deprives the military of happiness, he says, that the legislator ought to make all the citizens happy; but it is impossible that the whole city can be happy, without all, or the greater, or some part of it be happy. For happiness is not like that numerical equality which arises from certain numbers when added together, although neither of them may separately contain it; for happiness cannot be thus added together, but must exist in every individual, as some properties belong to every integral; and if the military are not happy, who else are so? for the artisans are not, nor the multitude of those who are employed in inferior offices. The state which Socrates has described has all these defects, and others which are not of less consequence.
It is also nearly the same in the treatise upon Laws which was writ afterwards, for which reason it will be proper in this place to consider briefly what he has there said upon government, for Socrates has thoroughly settled but very few parts of it; as for instance, in what manner the community of wives and children ought to be regulated, how property should be established, and government conducted.
Now he divides the inhabitants into two parts, husbandmen and soldiers, and from these he select a third part who are to be senators and govern the city; but he has not said whether or no the husbandman and artificer shall have any or what share in the government, or whether they shall have arms, and join with the others in war, or not. He thinks also that the women ought to go to war, and have the same education as the soldiers; as to other particulars, he has filled his treatise with matter foreign to the purpose; and with respect to education, he has only said what that of the guards ought to be.
As to his book of Laws, laws are the principal thing which that contains, for he has there said but little concerning government; and this government, which he was so desirous of framing in such a manner as to impart to its members a more entire community of goods than is to be found in other cities, he almost brings round again to be the same as that other government which he had first proposed; for except the community of wives and goods, he has framed both his governments alike, for the education of the citizens is to be the same in both; they are in both to live without any servile employ, and their common tables are to be the same, excepting that in that he says the women should have common tables, and that there should be a thousand men-at-arms, in this, that there should be five thousand.
All the discourses of Socrates are masterly, noble, new, and inquisitive; but that they are all true it may probably be too much to say. For now with respect to the number just spoken of, it must be acknowledged that he would want the country of Babylonia for them, or some one like it, of an immeasurable extent, to support five thousand idle persons, besides a much greater number of women and servants. Every one, it is true, may frame an hypothesis as he pleases, but yet it ought to be possible. It has been said, that a legislator should have two things in view when he frames his laws, the country and the people. He will also do well, if he has some regard to the neighbouring states, if he intends that his community should maintain any political intercourse with them, for it is not only necessary that they should understand that practice of war which is adapted to their own country, but to others also; for admitting that any one chooses not this life either in public or private, yet there is not the less occasion for their being formidable to their enemies, not only when they invade their country, but also when they retire out of it.
It may also be considered whether the quantity of each person's property may not be settled in a different manner from what he has done it in, by making it more determinate; for he says, that every one ought to have enough whereon to live moderately, as if any one had said to live well, which is the most comprehensive expression. Besides, a man may live moderately and miserably at the same time; he had therefore better have proposed, that they should live both moderately and liberally; for unless these two conspire, luxury will come in on the one hand, or wretchedness on the other, since these two modes of living are the only ones applicable to the employment of our substance; for we cannot say with respect to a man's fortune, that he is mild or courageous, but we may say that he is prudent and liberal, which are the only qualities connected therewith.
It is also absurd to render property equal, and not to provide for the increasing number of the citizens; but to leave that circumstance uncertain, as if it would regulate itself according to the number of women who should happen to be childless, let that be what it would because this seems to take place in other cities; but the case would not be the same in such a state which he proposes and those which now actually unite; for in these no one actually wants, as the property is divided amongst the whole community, be their numbers what they will; but as it could not then be divided, the supernumeraries, whether they were many or few, would have nothing at all. But it is more necessary than even to regulate property, to take care that the increase of the people should not exceed a certain number; and in determining that, to take into consideration those children who will die, and also those women who will be barren; and to neglect this, as is done in several cities, is to bring certain poverty on the citizens; and poverty is the cause of sedition and evil. Now Phidon the Corinthian, one of the oldest legislators, thought the families and the number of the citizens should continue the same; although it should happen that all should have allotments at the first, disproportionate to their numbers.
In Plato's Laws it is however different; we shall mention hereafter what we think would be best in these particulars. He has also neglected in that treatise to point out how the governors are to be distinguished from the governed; for he says, that as of one sort of wool the warp ought to be made, and of another the woof, so ought some to govern, and others to be governed. But since he admits, that all their property may be increased fivefold, why should he not allow the same increase to the country? he ought also to consider whether his allotment of the houses will be useful to the community, for he appoints two houses to each person, separate from each other; but it is inconvenient for a person to inhabit two houses. Now he is desirous to have his whole plan of government neither a democracy nor an oligarchy, but something between both, which he calls a polity, for it is to be composed of men-at-arms. If Plato intended to frame a state in which more than in any other everything should be common, he has certainly given it a right name; but if he intended it to be the next in perfection to that which he had already framed, it is not so; for perhaps some persons will give the preference to the Lacedaemonian form of government, or some other which may more completely have attained to the aristocratic form.
Some persons say, that the most perfect government should be composed of all others blended together, for which reason they commend that of Lacedaemon; for they say, that this is composed of an oligarchy, a monarchy, and a democracy, their kings representing the monarchical part, the senate the oligarchical; and, that in the ephori may be found the democratical, as these are taken from the people. But some say, that in the ephori is absolute power, and that it is their common meal and daily course of life, in which the democratical form is represented. It is also said in this treatise of Laws, that the best form of government must, be one composed of a democracy and a tyranny; though such a mixture no one else would ever allow to be any government at all, or if it is, the worst possible; those propose what is much better who blend many governments together; for the most perfect is that which is formed of many parts. But now in this government of Plato's there are no traces of a monarchy, only of an oligarchy and democracy; though he seems to choose that it should rather incline to an oligarchy, as is evident from the appointment of the magistrates; for to choose them by lot is common to both; but that a man of fortune must necessarily be a member of the assembly, or to elect the magistrates, or take part in the management of public affairs, while others are passed over, makes the state incline to an oligarchy; as does the endeavouring that the greater part of the rich may be in office, and that the rank of their appointments may correspond with their fortunes.
The same principle prevails also in the choice of their senate; the manner of electing which is favourable also to an oligarchy; for all are obliged to vote for those who are senators of the first class, afterwards they vote for the same number out of the second, and then out of the third; but this compulsion to vote at the election of senators does not extend to the third and fourth classes and the first and second class only are obliged to vote for the fourth. By this means he says he shall necessarily have an equal number of each rank, but he is mistaken—for the majority will always consist of those of the first rank, and the most considerable people; and for this reason, that many of the commonalty not being obliged to it, will not attend the elections. From hence it is evident, that such a state will not consist of a democracy and a monarchy, and this will be further proved by what we shall say when we come particularly to consider this form of government.
There will also great danger arise from the manner of electing the senate, when those who are elected themselves are afterwards to elect others; for by this means, if a certain number choose to combine together, though not very considerable, the election will always fall according to their pleasure. Such are the things which Plato proposes concerning government in his book of Laws.
There are also some other forms of government, which have been proposed either by private persons, or philosophers, or politicians, all of which come much nearer to those which have been really established, or now exist, than these two of Plato's; for neither have they introduced the innovation of a community of wives and children, and public tables for the women, but have been contented to set out with establishing such rules as are absolutely necessary.
There are some persons who think, that the first object of government should be to regulate well everything relating to private property; for they say, that a neglect herein is the source of all seditions whatsoever. For this reason, Phaleas the Chalcedonian first proposed, that the fortunes of the citizens should be equal, which he thought was not difficult to accomplish when a community was first settled, but that it was a work of greater difficulty in one that had been long established; but yet that it might be effected, and an equality of circumstances introduced by these means, that the rich should give marriage portions, but never receive any, while the poor should always receive, but never give.
But Plato, in his treatise of Laws, thinks that a difference in circumstances should be permitted to a certain degree; but that no citizen should be allowed to possess more than five times as much as the lowest census, as we have already mentioned. But legislators who would establish this principle are apt to overlook what they ought to consider; that while they regulate the quantity of provisions which each individual shall possess, they ought also to regulate the number of his children; for if these exceed the allotted quantity of provision, the law must necessarily be repealed; and yet, in spite of the repeal, it will have the bad effect of reducing many from wealth to poverty, so difficult is it for innovators not to fall into such mistakes. That an equality of goods was in some degree serviceable to strengthen the bands of society, seems to have been known to some of the ancients; for Solon made a law, as did some others also, to restrain persons from possessing as much land as they pleased. And upon the same principle there are laws which forbid men to sell their property, as among the Locrians, unless they can prove that some notorious misfortune has befallen them. They were also to preserve their ancient patrimony, which custom being broken through by the Leucadians, made their government too democratic; for by that means it was no longer necessary to be possessed of a certain fortune to be qualified to be a magistrate. But if an equality of goods is established, this may be either too much, when it enables the people to live luxuriously, or too little, when it obliges them to live hard. Hence it is evident, that it is not proper for the legislator to establish an equality of circumstances, but to fix a proper medium. Besides, if any one should regulate the division of property in such a manner that there should be a moderate sufficiency for all, it would be of no use; for it is of more consequence that the citizen should entertain a similarity of sentiments than an equality of circumstances; but this can never be attained unless they are properly educated under the direction of the law. But probably Phaleas may say, that this in what he himself mentions; for he both proposes a equality of property and one plan of education in his city. But he should have said particularly what education he intended, nor is it of any service to have this to much one; for this education may be one, and yet such as will make the citizens over-greedy, to grasp after honours, or riches, or both. Besides, not only an inequality of possessions, but also of honours, will occasion seditions, but this upon contrary grounds; for the vulgar will be seditious if there be an inequality of goods, by those of more elevated sentiments, if there is an equality of honours.
<<<
"When good and bad do equal honours share."
<<<
For men are not guilty of crimes for necessaries only (for which he thinks an equality of goods would be a sufficient remedy, as they would then have no occasion to steal cold or hunger), but that they may enjoy what they desire, and not wish for it in vain; for if their desire extend beyond the common necessaries of life, they were be wicked to gratify them; and not only so, but if their wishes point that way, they will do the same to enjoy those pleasures which are free from the alloy of pain. What remedy then shall we find for these three disorders. And first, to prevent stealing from necessity, let every one be supplied with a moderate subsistence, which may make the addition of his own industry necessary; second to prevent stealing to procure the luxuries of life, temperance be enjoined; and thirdly, let those who wish for pleasure in itself seek for it only in philosophy, all others want the assistance of men.
Since then men are guilty of the greatest crimes from ambition, and not from necessity, no one, for instance aims at being a tyrant to keep him from the cold, hence great honour is due to him who kills not a thief, but tyrant; so that polity which Phaleas establishes would only be salutary to prevent little crimes. He has also been very desirous to establish such rules as will conduce to perfect the internal policy of his state, and he ought also to have done the same with respect to its neighbours and all foreign nations; for the considerations of the military establishment should take place in planning every government, that it may not be unprovided in case of a war, of which he has said nothing; so also with respect to property, it ought not only to be adapted to the exigencies of the state, but also to such dangers as may arise from without.
Thus it should not be so much as to tempt those who are near, and more powerful to invade it, while those who possess it are not able to drive out the invaders, nor so little as that the state should not be able to go to war with those who are quite equal to itself, and of this he has determined nothing; it must indeed be allowed that it is advantageous to a community to be rather rich than poor; probably the proper boundary is this, not to possess enough to make it worth while for a more powerful neighbour to attack you, any more than he would those who had not so much as yourself; thus when Autophradatus proposed to besiege Atarneus, Eubulus advised him to consider what time it would require to take the city, and then would have him determine whether it would answer, for that he should choose, if it would even take less than he proposed, to quit the place; his saying this made Autophradatus reflect upon the business and give over the siege. There is, indeed, some advantage in an equality of goods amongst the citizens to prevent seditions; and yet, to say truth, no very great one; for men of great abilities will stomach their being put upon a level with the rest of the community. For which reason they will very often appear ready for every commotion and sedition; for the wickedness of mankind is insatiable. For though at first two oboli might be sufficient, yet when once it is become customary, they continually want something more, until they set no limits to their expectations; for it is the nature of our desires to be boundless, and many live only to gratify them. But for this purpose the first object is, not so much to establish an equality of fortune, as to prevent those who are of a good disposition from desiring more than their own, and those who are of a bad one from being able to acquire it; and this may be done if they are kept in an inferior station, and not exposed to injustice. Nor has he treated well the equality of goods, for he has extended his regulation only to land; whereas a man's substance consists not only in this, but also in slaves, cattle, money, and all that variety of things which fall under the name of chattels; now there must be either an equality established in all these, or some certain rule, or they must be left entirely at large. It appears too by his laws, that he intends to establish only a small state, as all the artificers are to belong to the public, and add nothing to the complement of citizens; but if all those who are to be employed in public works are to be the slaves of the public, it should be done in the same manner as it is at Epidamnum, and as Diophantus formerly regulated it at Athens. From these particulars any one may nearly judge whether Phaleas's community is well or ill established.
Hippodamus, the son of Euruphon a Milesian, contrived the art of laying out towns, and separated the Pireus. This man was in other respects too eager after notice, and seemed to many to live in a very affected manner, with his flowing locks and his expensive ornaments, and a coarse warm vest which he wore, not only in the winter, but also in the hot weather. As he was very desirous of the character of a universal scholar, he was the first who, not being actually engaged in the management of public affairs, sat himself to inquire what sort of government was best; and he planned a state, consisting of ten thousand persons, divided into three parts, one consisting of artisans, another of husbandmen, and the third of soldiers; he also divided the lands into three parts, and allotted one to sacred purposes, another to the public, and the third to individuals. The first of these was to supply what was necessary for the established worship of the gods; the second was to be allotted to the support of the soldiery; and the third was to be the property of the husbandman. He thought also that there need only be three sorts of laws, corresponding to the three sorts of actions which can be brought, namely, for assault, trespasses, or death. He ordered also that there should be a particular court of appeal, into which all causes might be removed which were supposed to have been unjustly determined elsewhere; which court should be composed of old men chosen for that purpose. He thought also that they should not pass sentence by votes; but that every one should bring with him a tablet, on which he should write, that he found the party guilty, if it was so, but if not, he should bring a plain tablet; but if he acquitted him of one part of the indictment but not of the other, he should express that also on the tablet; for he disapproved of that general custom already established, as it obliges the judges to be guilty of perjury if they determined positively either on the one side or the other. He also made a law, that those should be rewarded who found out anything for the good of the city, and that the children of those who fell in battle should be educated at the public expense; which law had never been proposed by any other legislator, though it is at present in use at Athens as well as in other cities, he would have the magistrates chosen out of the people in general, by whom he meant the three parts before spoken of; and that those who were so elected should be the particular guardians of what belonged to the public, to strangers, and to orphans.
These are the principal parts and most worthy of notice in Hippodamus's plan. But some persons might doubt the propriety of his division of the citizens into three parts; for the artisans, the husbandmen, and the soldiers are to compose one community, where the husbandmen are to have no arms, and the artisans neither arms nor land, which would in a manner render them slaves to the soldiery. It is also impossible that the whole community should partake of all the honourable employments in it—for the generals and the guardians of the state must necessarily be appointed out of the soldiery, and indeed the most honourable magistrates; but as the two other parts will not have their share in the government, how can they be expected to have any affection for it? But it is necessary that the soldiery should be superior to the other two parts, and this superiority will not be easily gained without they are very numerous; and if they are so, why should the community consist of any other members? why should any others have a right to elect the magistrates? Besides, of what use are the husbandmen to this community? Artisans, 'tis true, are necessary, for these every city wants, and they can live upon their business. If the husbandmen indeed furnished the soldiers with provisions, they would be properly part of the community; but these are supposed to have their private property, and to cultivate it for their own use. Moreover, if the soldiers themselves are to cultivate that common land which is appropriated for their support, there will be no distinction between the soldier and the husbandman, which the legislator intended there should be; and if there should be any others who are to cultivate the private property of the husbandman and the common lands of the military, there will be a fourth order in the state which will have no share in it, and always entertain hostile sentiments towards it. If any one should propose that the same persons should cultivate their own lands and the public ones also, then there would be a deficiency of provisions to supply two families, as the lands would not immediately yield enough for themselves and the soldiers also; and all these things would occasion great confusion.
Nor do I approve of his method of determining causes, when he would have the judge split the case which comes simply before him; and thus, instead of being a judge, become an arbitrator. Now when any matter is brought to arbitration, it is customary for many persons to confer together upon the business that is before them; but when a cause is brought before judges it is not so; and many legislators take care that the judges shall not have it in their power to communicate their sentiments to each other. Besides, what can prevent confusion on the bench when one judge thinks a fine should be different from what another has set it at; one proposing twenty minae, another ten, or be it more or less, another four, and another five; and it is evident, that in this manner they will differ from each other, while some will give the whole damages sued for, and others nothing; in this situation, how shall their determinations be settled? Besides, a judge cannot be obliged to perjure himself who simply acquits or condemns, if the action is fairly and justly brought; for he who acquits the party does not say that he ought not to pay any fine at all, but that he ought not to pay a fine of twenty minae. But he that condemns him is guilty of perjury if he sentences him to pay twenty minae while he believes the damages ought not to be so much.
Now with respect to these honours which he proposes to bestow on those who can give any information useful to the community, this, though very pleasing in speculation, is what the legislator should not settle, for it would encourage informers, and probably occasion commotions in the state. And this proposal of his gives rise also to further conjectures and inquiries; for some persons have doubted whether it is useful or hurtful to alter the established law of any country, if even for the better; for which reason one cannot immediately determine upon what he here says, whether it is advantageous to alter the law or not. We know, indeed, that it is possible to propose to new model both the laws and government as a common good; and since we have mentioned this subject, it may be very proper to enter into a few particulars concerning it, for it contains some difficulties, as I have already said, and it may appear better to alter them, since it has been found useful in other sciences.
Thus the science of physic is extended beyond its ancient bounds; so is the gymnastic, and indeed all other arts and powers; so that one may lay it down for certain that the same thing will necessarily hold good in the art of government. And it may also be affirmed, that experience itself gives a proof of this; for the ancient laws are too simple and barbarous; which allowed the Greeks to wear swords in the city, and to buy their wives of each other. And indeed all the remains of old laws which we have are very simple; for instance, a law in Cuma relative to murder. If any person who prosecutes another for murder can produce a certain number of witnesses to it of his own relations, the accused person shall be held guilty. Upon the whole, all persons ought to endeavour to follow what is right, and not what is established; and it is probable that the first men, whether they sprung out of the earth, or were saved from some general calamity, had very little understanding or knowledge, as is affirmed of these aborigines; so that it would be absurd to continue in the practice of their rules. Nor is it, moreover, right to permit written laws always to remain without alteration; for as in all other sciences, so in politics, it is impossible to express everything in writing with perfect exactness; for when we commit anything to writing we must use general terms, but in every action there is something particular to itself, which these may not comprehend; from whence it is evident, that certain laws will at certain times admit of alterations. But if we consider this matter in another point of view, it will appear to require great caution; for when the advantage proposed is trifling, as the accustoming the people easily to abolish their laws is of bad consequence, it is evidently better to pass over some faults which either the legislator or the magistrates may have committed; for the alterations will not be of so much service as a habit of disobeying the magistrates will be of disservice. Besides, the instance brought from the arts is fallacious; for it is not the same thing to alter the one as the other. For a law derives all its strength from custom, and this requires long time to establish; so that, to make it an easy matter to pass from the established laws to other new ones, is to weaken the power of laws. Besides, here is another question; if the laws are to be altered, are they all to be altered, and in every government or not, and whether at the pleasure of one person or many? all which particulars will make a great difference; for which reason we will at present drop the inquiry, to pursue it at some other time.
The government of Crete bears a near resemblance to this, in some few particulars it is not worse, but in general it is far inferior in its contrivance. For it appears and is allowed in many particulars the constitution of Lacedaemon was formed in imitation of that of Crete; and in general most new things are an improvement upon the old. For they say, that when Lycurgus ceased to be guardian to King Charilles he went abroad and spent a long time with his relations in Crete, for the Lycians are a colony of the Lacedaemonians; and those who first settled there adopted that body of laws which they found already established by the inhabitants; in like manner also those who now live near them have the very laws which Minos first drew up.
This island seems formed by nature to be the mistress of Greece, for it is entirely surrounded by a navigable ocean which washes almost all the maritime parts of that country, and is not far distant on the one side from Peloponnesus, on the other, which looks towards Asia, from Triopium and Rhodes. By means of this situation Minos acquired the empire of the sea and the islands; some of which he subdued, in others planted colonies: at last he died at Camicus while he was attacking Sicily. There is this analogy between the customs of the Lacedaemonians and the Cretans, the Helots cultivate the grounds for the one, the domestic slaves for the other. Both states have their common meals, and the Lacedaemonians called these formerly not <i>psiditia</i> but <i>andpia</i>, as the Cretans do; which proves from whence the custom arose. In this particular their governments are also alike: the ephori have the same power with those of Crete, who are called <i>kosmoi</i>; with this difference only, that the number of the one is five, of the other ten. The senators are the same as those whom the Cretans call the council. There was formerly also a kingly power in Crete; but it was afterwards dissolved, and the command of their armies was given to the <i>kosmoi</i>. Every one also has a vote in their public assembly; but this has only the power of confirming what has already passed the council and the <i>kosmoi</i>.
The Cretans conducted their public meals better than the Lacedaemonians, for at Lacedaemon each individual was obliged to furnish what was assessed upon him; which if he could not do, there was a law which deprived him of the rights of a citizen, as has been already mentioned: but in Crete they were furnished by the community; for all the corn and cattle, taxes and contributions, which the domestic slaves were obliged to furnish, were divided into parts and allotted to the gods, the exigencies of the state, and these public meals; so that all the men, women, and children were maintained from a common stock. The legislator gave great attention to encourage a habit of eating sparingly, as very useful to the citizens. He also endeavoured, that his community might not be too populous, to lessen the connection with women, by introducing the love of boys: whether in this he did well or ill we shall have some other opportunity of considering. But that the public meals were better ordered at Crete than at Lacedaemon is very evident.
The institution of the <i>kosmoi</i>, was still worse than that of the ephori: for it contained all the faults incident to that magistracy and some peculiar to itself; for in both cases it is uncertain who will be elected: but the Lacedaemonians have this advantage which the others have not, that as all are eligible, the whole community have a share in the highest honours, and therefore all desire to preserve the state: whereas among the Cretans the <i>kosmoi</i> are not chosen out of the people in general, but out of some certain families, and the senate out of the <i>kosmoi</i>. And the same observations which may be made on the senate at Lacedaemon may be applied to these; for their being under no control, and their continuing for life, is an honour greater than they merit; and to have their proceedings not regulated by a written law, but left to their own discretion, is dangerous. (As to there being no insurrections, although the people share not in the management of public affairs, this is no proof of a well-constituted government, as the <i>kosmoi</i> have no opportunity of being bribed like the ephori, as they live in an island far from those who would corrupt them.) But the method they take to correct that fault is absurd, impolitic, and tyrannical: for very often either their fellow-magistrates or some private persons conspire together and turn out the <i>kosmoi</i>. They are also permitted to resign their office before their time is elapsed, and if all this was done by law it would be well, and not at the pleasure of the individuals, which is a bad rule to follow. But what is worst of all is, that general confusion which those who are in power introduce to impede the ordinary course of justice; which sufficiently shows what is the nature of the government, or rather lawless force: for it is usual with the principal persons amongst them to collect together some of the common people and their friends, and then revolt and set up for themselves, and come to blows with each other. And what is the difference, if a state is dissolved at once by such violent means, or if it gradually so alters in process of time as to be no longer the same constitution? A state like this would ever be exposed to the invasions of those who were powerful and inclined to attack it; but, as has been already mentioned, its situation preserves it, as it is free from the inroads of foreigners; and for this reason the family slaves still remain quiet at Crete, while the Helots are perpetually revolting: for the Cretans take no part in foreign affairs, and it is but lately that any foreign troops have made an attack upon the island; and their ravages soon proved the ineffectualness of their laws. And thus much for the government of Crete.
The government of Carthage seems well established, and in many respects superior to others; in some particulars it bears a near resemblance to the Lacedaemonians; and indeed these three states, the Cretans, the Lacedaemonians and the Carthaginians are in some things very like each other, in others they differ greatly. Amongst many excellent constitutions this may show how well their government is framed, that although the people are admitted to a share in the administration, the form of it remains unaltered, without any popular insurrections, worth notice, on the one hand, or degenerating into a tyranny on the other. Now the Carthaginians have these things in common with the Lacedaemonians: public tables for those who are connected together by the tie of mutual friendship, after the manner of their Phiditia; they have also a magistracy, consisting of an hundred and four persons, similar to the ephori, or rather selected with more judgment; for amongst the Lacedaemonians, all the citizens are eligible, but amongst the Carthaginians, they are chosen out of those of the better sort: there is also some analogy between the king and the senate in both these governments, though the Carthaginian method of appointing their kings is best, for they do not confine themselves to one family; nor do they permit the election to be at large, nor have they any regard to seniority; for if amongst the candidates there are any of greater merit than the rest, these they prefer to those who may be older; for as their power is very extensive, if they are persons of no account, they may be very hurtful to the state, as they have always been to the Lacedaemonians; also the greater part of those things which become reprehensible by their excess are common to all those governments which we have described.
Now of those principles on which the Carthaginians have established their mixed form of government, composed of an aristocracy and democracy, some incline to produce a democracy, others an oligarchy: for instance, if the kings and the senate are unanimous upon any point in debate, they can choose whether they will bring it before the people or no; but if they disagree, it is to these they must appeal, who are not only to hear what has been approved of by the senate, but are finally to determine upon it; and whosoever chooses it, has a right to speak against any matter whatsoever that may be proposed, which is not permitted in other cases. The five, who elect each other, have very great and extensive powers; and these choose the hundred, who are magistrates of the highest rank: their power also continues longer than any other magistrates, for it commences before they come into office, and is prolonged after they are out of it; and in this particular the state inclines to an oligarchy: but as they are not elected by lot, but by suffrage, and are not permitted to take money, they are the greatest supporters imaginable of an aristocracy.
The determining all causes by the same magistrates, and not orae in one court and another in another, as at Lacedaemon, has the same influence. The constitution of Carthage is now shifting from an aristocracy to an oligarchy, in consequence of an opinion which is favourably entertained by many, who think that the magistrates in the community ought not to be persons of family only, but of fortune also; as it is impossible for those who are in bad circumstances to support the dignity of their office, or to be at leisure to apply to public business. As choosing men of fortune to be magistrates make a state incline to an oligarchy, and men of abilities to an aristocracy, so is there a third method of proceeding which took place in the polity of Carthage; for they have an eye to these two particulars when they elect their officers, particularly those of the highest rank, their kings and their generals. It must be admitted, that it was a great fault in their legislator not to guard against the constitution's degenerating from an aristocracy; for this is a most necessary thing to provide for at first, that those citizens who have the best abilities should never be obliged to do anything unworthy their character, but be always at leisure to serve the public, not only when in office, but also when private persons; for if once you are obliged to look among the wealthy, that you may have men at leisure to serve you, your greatest offices, of king and general, will soon become venal; in consequence of which, riches will be more honourable than virtue and a love of money be the ruling principle in the city-for what those who have the chief power regard as honourable will necessarily be the object which the citizens in general will aim at; and where the first honours are not paid to virtue, there the aristocratic form of government cannot flourish: for it is reasonable to conclude, that those who bought their places should generally make an advantage of what they laid out their money for; as it is absurd to suppose, that if a man of probity who is poor should be desirous of gaining something, a bad man should not endeavour to do the same, especially to reimburse himself; for which reason the magistracy should be formed of those who are most able to support an aristocracy. It would have been better for the legislature to have passed over the poverty of men of merit, and only to have taken care to have ensured them sufficient leisure, when in office, to attend to public affairs.
It seems also improper, that one person should execute several offices, which was approved of at Carthage; for one business is best done by one person; and it is the duty of the legislator to look to this, and not make the same person a musician and a shoemaker: so that where the state is not small it is more politic and more popular to admit many persons to have a share in the government; for, as I just now said, it is not only more usual, but everything is better and sooner done, when one thing only is allotted to one person: and this is evident both in the army and navy, where almost every one, in his turn, both commands and is under command. But as their government inclines to an oligarchy, they avoid the ill effects of it by always appointing some of the popular party to the government of cities to make their fortunes. Thus they consult this fault in their constitution and render it stable; but this is depending on chance; whereas the legislator ought to frame his government, that there the no room for insurrections. But now, if there should be any general calamity, and the people should revolt from their rulers, there is no remedy for reducing them to obedience by the laws. And these are the particulars of the Lacedaemonian, the Cretan, and the Carthaginian governments which seem worthy of commendation.
Some of those persons who have written upon government had never any share in public affairs, but always led a private life. Everything worthy of notice in their works we have already spoke to. Others were legislators, some in their own cities, others were employed in regulating the governments of foreign states. Some of them only composed a body of laws; others formed the constitution also, as Lycurgus; and Solon, who did both. The Lacedaemonians have been already mentioned. Some persons think that Solon was an excellent legislator, who could dissolve a pure oligarchy, and save the people from that slavery which hung over them, and establish the ancient democratic form of government in his country; wherein every part of it was so framed as to be well adapted to the whole. In the senate of Areopagus an oligarchy was preserved; by the manner of electing their magistrates, an aristocracy; and in their courts of justice, a democracy.
Solon seems not to have altered the established form of government, either with respect to the senate or the mode of electing their magistrates; but to have raised the people to great consideration in the state by allotting the supreme judicial department to them; and for this some persons blame him, as having done what would soon overturn that balance of power he intended to establish; for by trying all causes whatsoever before the people, who were chosen by lot to determine them, it was necessary to flatter a tyrannical populace who had got this power; which contributed to bring the government to that pure democracy it now is.
Both Ephialtes and Pericles abridged the power of the Areopagites, the latter of whom introduced the method of paying those who attended the courts of justice: and thus every one who aimed at being popular proceeded increasing the power of the people to what we now see it. But it is evident that this was not Solon's intention, but that it arose from accident; for the people being the cause of the naval victory over the Medes, assumed greatly upon it, and enlisted themselves under factious demagogues, although opposed by the better part of the citizens. He thought it indeed most necessary to entrust the people with the choice of their magistrates and the power of calling them to account; for without that they must have been slaves and enemies to the other citizens: but he ordered them to elect those only who were persons of good account and property, either out of those who were worth five hundred medimns, or those who were called xeugitai, or those of the third census, who were called horsemen.
As for those of the fourth, which consisted of mechanics, they were incapable of any office. Zaleucus was the legislator of the Western Locrians, as was Charondas, the Catanean, of his own cities, and those also in Italy and Sicily which belonged to the Calcidians. Some persons endeavour to prove that Onomacritus, the Locrian, was the first person of note who drew up laws; and that he employed himself in that business while he was at Crete, where he continued some time to learn the prophetic art: and they say, that Thales was his companion; and that Lycurgus and Zaleucus were the scholars of Thales, and Charondas of Zaleucus; but those who advance this, advance what is repugnant to chronology. Philolaus also, of the family of the Bacchiades, was a Theban legislator. This man was very fond of Diocles, a victor in the Olympic games, and when he left his country from a disgust at an improper passion which his mother Alithoe had entertained for him, and settled at Thebes, Philolaus followed him, where they both died, and where they still show their tombs placed in view of each other, but so disposed, that one of them looks towards Corinth, the other does not; the reason they give for this is, that Diodes, from his detestation of his mother's passion, would have his tomb so placed that no one could see Corinth from it; but Philolaus chose that it might be seen from his: and this was the cause of their living at Thebes.
As Philolaus gave them laws concerning many other things, so did he upon adoption, which they call adoptive laws; and this he in particular did to preserve the number of families. Charondas did nothing new, except in actions for perjury, which he was the first person who took into particular consideration. He also drew up his laws with greater elegance and accuracy than even any of our present legislators. Philolaus introduced the law for the equal distribution of goods; Plato that for the community of women, children, and goods, and also for public tables for the women; and one concerning drunkenness, that they might observe sobriety in their symposiums. He also made a law concerning their warlike exercises; that they should acquire a habit of using both hands alike, as it was necessary that one hand should be as useful as the other.
As for Draco's laws, they were published when the government was already established, and they have nothing particular in them worth mentioning, except their severity on account of the enormity of their punishments. Pittacus was the author of some laws, but never drew up any form of government; one of which was this, that if a drunken man beat any person he should be punished more than if he did it when sober; for as people are more apt to be abusive when drunk than sober, he paid no consideration to the excuse which drunkenness might claim, but regarded only the common benefit. Andromadas Regmus was also a lawgiver to the Thracian talcidians. There are some laws of his concerning murders and heiresses extant, but these contain nothing that any one can say is new and his own. And thus much for different sorts of governments, as well those which really exist as those which different persons have proposed.
---
!!![[CHAPTER I|ELLIS: BOOK III: CHAPTER I]]
{{ELLIS: BOOK III: CHAPTER I}}
---
!!![[CHAPTER II|ELLIS: BOOK III: CHAPTER II]]
{{ELLIS: BOOK III: CHAPTER II}}
---
!!![[CHAPTER III|ELLIS: BOOK III: CHAPTER III]]
{{ELLIS: BOOK III: CHAPTER III}}
---
!!![[CHAPTER IV|ELLIS: BOOK III: CHAPTER IV]]
{{ELLIS: BOOK III: CHAPTER IV}}
---
!!![[CHAPTER V|ELLIS: BOOK III: CHAPTER V]]
{{ELLIS: BOOK III: CHAPTER V}}
---
!!![[CHAPTER VI|ELLIS: BOOK III: CHAPTER VI]]
{{ELLIS: BOOK III: CHAPTER VI}}
---
!!![[CHAPTER VII|ELLIS: BOOK III: CHAPTER VII]]
{{ELLIS: BOOK III: CHAPTER VII}}
---
!!![[CHAPTER VIII|ELLIS: BOOK III: CHAPTER VIII]]
{{ELLIS: BOOK III: CHAPTER VIII}}
---
!!![[CHAPTER IX|ELLIS: BOOK III: CHAPTER IX]]
{{ELLIS: BOOK III: CHAPTER IX}}
---
!!![[CHAPTER X|ELLIS: BOOK III: CHAPTER X]]
{{ELLIS: BOOK III: CHAPTER X}}
---
!!![[CHAPTER XI|ELLIS: BOOK III: CHAPTER XI]]
{{ELLIS: BOOK III: CHAPTER XI}}
---
!!![[CHAPTER XII|ELLIS: BOOK III: CHAPTER XII]]
{{ELLIS: BOOK III: CHAPTER XII}}
---
!!![[CHAPTER XIII|ELLIS: BOOK III: CHAPTER XIII]]
{{ELLIS: BOOK III: CHAPTER XIII}}
---
!!![[CHAPTER XIV|ELLIS: BOOK III: CHAPTER XIV]]
{{ELLIS: BOOK III: CHAPTER XIV}}
---
!!![[CHAPTER XV|ELLIS: BOOK III: CHAPTER XV]]
{{ELLIS: BOOK III: CHAPTER XV}}
---
!!![[CHAPTER XVI|ELLIS: BOOK III: CHAPTER XVI]]
{{ELLIS: BOOK III: CHAPTER XVI}}
---
!!![[CHAPTER XVII|ELLIS: BOOK III: CHAPTER XVII]]
{{ELLIS: BOOK III: CHAPTER XVII}}
---
!!![[CHAPTER XVIII|ELLIS: BOOK III: CHAPTER XVIII]]
{{ELLIS: BOOK III: CHAPTER XVIII}}
Every one who inquires into the nature of government, and what are its different forms, should make this almost his first question, What is a city? For upon this there is a dispute: for some persons say the city did this or that, while others say, not the city, but the oligarchy, or the tyranny. We see that the city is the only object which both the politician and legislator have in view in all they do: but government is a certain ordering of those who inhabit a city. As a city is a collective body, and, like other wholes, composed of many parts, it is evident our first inquiry must be, what a citizen is: for a city is a certain number of citizens. So that we must consider whom we ought to call citizen, and who is one; for this is often doubtful: for every one will not allow that this character is applicable to the same person; for that man who would be a citizen in a republic would very often not be one in an oligarchy. We do not include in this inquiry many of those who acquire this appellation out of the ordinary way, as honorary persons, for instance, but those only who have a natural right to it.
Now it is not residence which constitutes a man a citizen; for in this sojourners and slaves are upon an equality with him; nor will it be sufficient for this purpose, that you have the privilege of the laws, and may plead or be impleaded, for this all those of different nations, between whom there is a mutual agreement for that purpose, are allowed; although it very often happens, that sojourners have not a perfect right therein without the protection of a patron, to whom they are obliged to apply, which shows that their share in the community is incomplete. In like manner, with respect to boys who are not yet enrolled, or old men who are past war, we admit that they are in some respects citizens, but not completely so, but with some exceptions, for these are not yet arrived to years of maturity, and those are past service; nor is there any difference between them. But what we mean is sufficiently intelligible and clear, we want a complete citizen, one in whom there is no deficiency to be corrected to make him so. As to those who are banished, or infamous, there may be the same objections made and the same answer given. There is nothing that more characterises a complete citizen than having a share in the judicial and executive part of the government.
With respect to offices, some are fixed to a particular time, so that no person is, on any account, permitted to fill them twice; or else not till some certain period has intervened; others are not fixed, as a juryman's, and a member of the general assembly: but probably some one may say these are not offices, nor have the citizens in these capacities any share in the government; though surely it is ridiculous to say that those who have the principal power in the state bear no office in it. But this objection is of no weight, for it is only a dispute about words; as there is no general term which can be applied both to the office of a juryman and a member of the assembly. For the sake of distinction, suppose we call it an indeterminate office: but I lay it down as a maxim, that those are citizens who could exercise it. Such then is the description of a citizen who comes nearest to what all those who are called citizens are. Every one also should know, that of the component parts of those things which differ from each other in species, after the first or second remove, those which follow have either nothing at all or very little common to each.
Now we see that governments differ from each other in their form, and that some of them are defective, others as excellent as possible: for it is evident, that those which have many deficiencies and degeneracies in them must be far inferior to those which are without such faults. What I mean by degeneracies will be hereafter explained. Hence it is clear that the office of a citizen must differ as governments do from each other: for which reason he who is called a citizen has, in a democracy, every privilege which that station supposes. In other forms of government he may enjoy them; but not necessarily: for in some states the people have no power; nor have they any general assembly, but a few select men.
The trial also of different causes is allotted to different persons; as at Lacedaemon all disputes concerning contracts are brought before some of the ephori: the senate are the judges in cases of murder, and so on; some being to be heard by one magistrate, others by another: and thus at Carthage certain magistrates determine all causes. But our former description of a citizen will admit of correction; for in some governments the office of a juryman and a member of the general assembly is not an indeterminate one; but there are particular persons appointed for these purposes, some or all of the citizens being appointed jurymen or members of the general assembly, and this either for all causes and all public business whatsoever, or else for some particular one: and this may be sufficient to show what a citizen is; for he who has a right to a share in the judicial and executive part of government in any city, him we call a citizen of that place; and a city, in one word, is a collective body of such persons sufficient in themselves to all the purposes of life.
In common use they define a citizen to be one who is sprung from citizens on both sides, not on the father's or the mother's only. Others carry the matter still further, and inquire how many of his ancestors have been citizens, as his grandfather, great-grandfather, etc., but some persons have questioned how the first of the family could prove themselves citizens, according to this popular and careless definition. Gorgias of Leontium, partly entertaining the same doubt, and partly in jest, says, that as a mortar is made by a mortar-maker, so a citizen is made by a citizen-maker, and a Larisssean by a Larisssean-maker. This is indeed a very simple account of the matter; for if citizens are so, according to this definition, it will be impossible to apply it to the first founders or first inhabitants of states, who cannot possibly claim in right either of their father or mother. It is probably a matter of still more difficulty to determine their rights as citizens who are admitted to their freedom after any revolution in the state. As, for instance, at Athens, after the expulsion of the tyrants, when Clisthenes enrolled many foreigners and city-slaves amongst the tribes; and the doubt with respect to them was, not whether they were citizens or no, but whether they were legally so or not. Though indeed some persons may have this further doubt, whether a citizen can be a citizen when he is illegally made; as if an illegal citizen, and one who is no citizen at all, were in the same predicament: but since we see some persons govern unjustly, whom yet we admit to govern, though not justly, and the definition of a citizen is one who exercises certain offices, for such a one we have defined a citizen to be, it is evident, that a citizen illegally created yet continues to be a citizen, but whether justly or unjustly so belongs to the former inquiry.
It has also been doubted what was and what was not the act of the city; as, for instance, when a democracy arises out of an aristocracy or a tyranny; for some persons then refuse to fulfil their contracts; as if the right to receive the money was in the tyrant and not in the state, and many other things of the same nature; as if any covenant was founded for violence and not for the common good. So in like manner, if anything is done by those who have the management of public affairs where a democracy is established, their actions are to be considered as the actions of the state, as well as in the oligarchy or tyranny.
And here it seems very proper to consider this question, When shall we say that a city is the same, and when shall we say that it is different?
It is but a superficial mode of examining into this question to begin with the place and the people; for it may happen that these may be divided from that, or that some one of them may live in one place, and some in another (but this question may be regarded as no very knotty one; for, as a city may acquire that appellation on many accounts, it may be solved many ways); and in like manner, when men inhabit one common place, when shall we say that they inhabit the same city, or that the city is the same? for it does not depend upon the walls; for I can suppose Peloponnesus itself surrounded with a wall, as Babylon was, and every other place, which rather encircles many nations than one city, and that they say was taken three days when some of the inhabitants knew nothing of it: but we shall find a proper time to determine this question; for the extent of a city, how large it should be, and whether it should consist of more than one people, these are particulars that the politician should by no means be unacquainted with. This, too, is a matter of inquiry, whether we shall say that a city is the same while it is inhabited by the same race of men, though some of them are perpetually dying, others coming into the world, as we say that a river or a fountain is the same, though the waters are continually changing; or when a revolution takes place shall we say the men are the same, but the city is different: for if a city is a community, it is a community of citizens; but if the mode of government should alter, and become of another sort, it would seem a necessary consequence that the city is not the same; as we regard the tragic chorus as different from the comic, though it may probably consist of the same performers: thus every other community or composition is said to be different if the species of composition is different; as in music the same hands produce different harmony, as the Doric and Phrygian. If this is true, it is evident, that when we speak of a city as being the same we refer to the government there established; and this, whether it is called by the same name or any other, or inhabited by the same men or different. But whether or no it is right to dissolve the community when the constitution is altered is another question.
What has been said, it follows that we should consider whether the same virtues which constitute a good man make a valuable citizen, or different; and if a particular inquiry is necessary for this matter we must first give a general description of the virtues of a good citizen; for as a sailor is one of those who make up a community, so is a citizen, although the province of one sailor may be different from another's (for one is a rower, another a steersman, a third a boatswain, and so on, each having their several appointments), it is evident that the most accurate description of any one good sailor must refer to his peculiar abilities, yet there are some things in which the same description may be applied to the whole crew, as the safety of the ship is the common business of all of them, for this is the general centre of all their cares: so also with respect to citizens, although they may in a few particulars be very different, yet there is one care common to them all, the safety of the community, for the community of the citizens composes the state; for which reason the virtue of a citizen has necessarily a reference to the state. But if there are different sorts of governments, it is evident that those actions which constitute the virtue of an excellent citizen in one community will not constitute it in another; wherefore the virtue of such a one cannot be perfect: but we say, a man is good when his virtues are perfect; from whence it follows, that an excellent citizen does not possess that virtue which constitutes a good man. Those who are any ways doubtful concerning this question may be convinced of the truth of it by examining into the best formed states: for, if it is impossible that a city should consist entirely of excellent citizens (while it is necessary that every one should do well in his calling, in which consists his excellence, as it is impossible that all the citizens should have the same qualifications) it is impossible that the virtue of a citizen and a good man should be the same; for all should possess the virtue of an excellent citizen: for from hence necessarily arise the perfection of the city: but that every one should possess the virtue of a good man is impossible without all the citizens in a well-regulated state were necessarily virtuous. Besides, as a city is composed of dissimilar parts, as an animal is of life and body; the soul of reason and appetite; a family of a man and his wife—property of a master and a slave; in the same manner, as a city is composed of all these and many other very different parts, it necessarily follows that the virtue of all the citizens cannot be the same; as the business of him who leads the band is different from the other dancers. From all which proofs it is evident that the virtues of a citizen cannot be one and the same. But do we never find those virtues united which constitute a good man and excellent citizen? for we say, such a one is an excellent magistrate and a prudent and good man; but prudence is a necessary qualification for all those who engage in public affairs. Nay, some persons affirm that the education of those who are intended to command should, from the beginning, be different from other citizens, as the children of kings are generally instructed in riding and warlike exercises; and thus Euripides says:
<<<
"... No showy arts Be mine, but teach me what the state requires."
<<<
As if those who are to rule were to have an education peculiar to themselves. But if we allow, that the virtues of a good man and a good magistrate may be the same, and a citizen is one who obeys the magistrate, it follows that the virtue of the one cannot in general be the same as the virtue of the other, although it may be true of some particular citizen; for the virtue of the magistrate must be different from the virtue of the citizen. For which reason Jason declared that was he deprived of his kingdom he should pine away with regret, as not knowing how to live a private man. But it is a great recommendation to know how to command as well as to obey; and to do both these things well is the virtue of an accomplished citizen. If then the virtue of a good man consists only in being able to command, but the virtue of a good citizen renders him equally fit for the one as well as the other, the commendation of both of them is not the same. It appears, then, that both he who commands and he who obeys should each of them learn their separate business: but that the citizen should be master of and take part in both these, as any one may easily perceive; in a family government there is no occasion for the master to know how to perform the necessary offices, but rather to enjoy the labour of others; for to do the other is a servile part. I mean by the other, the common family business of the slave.
There are many sorts of slaves; for their employments are various: of these the handicraftsmen are one, who, as their name imports, get their living by the labour of their hands, and amongst these all mechanics are included; for which reasons such workmen, in some states, were not formerly admitted into any share in the government; till at length democracies were established: it is not therefore proper for any man of honour, or any citizen, or any one who engages in public affairs, to learn these servile employments without they have occasion for them for their own use; for without this was observed the distinction between a master and a slave would be lost. But there is a government of another sort, in which men govern those who are their equals in rank, and freemen, which we call a political government, in which men learn to command by first submitting to obey, as a good general of horse, or a commander-in-chief, must acquire a knowledge of their duty by having been long under the command of another, and the like in every appointment in the army: for well is it said, no one knows how to command who has not himself been under command of another. The virtues of those are indeed different, but a good citizen must necessarily be endowed with them; he ought also to know in what manner freemen ought to govern, as well as be governed: and this, too, is the duty of a good man. And if the temperance and justice of him who commands is different from his who, though a freeman, is under command, it is evident that the virtues of a good citizen cannot be the same as justice, for instance but must be of a different species in these two different situations, as the temperance and courage of a man and a woman are different from each other; for a man would appear a coward who had only that courage which would be graceful in a woman, and a woman would be thought a talker who should take as large a part in the conversation as would become a man of consequence.
The domestic employments of each of them are also different; it is the man's business to acquire subsistence, the woman's to take care of it. But direction and knowledge of public affairs is a virtue peculiar to those who govern, while all others seem to be equally requisite for both parties; but with this the governed have no concern, it is theirs to entertain just notions: they indeed are like flute-makers, while those who govern are the musicians who play on them. And thus much to show whether the virtue of a good man and an excellent citizen is the same, or if it is different, and also how far it is the same, and how far different.
Let us first determine what are the proper limits of an oligarchy and a democracy, and what is just in each of these states; for all men have some natural inclination to justice; but they proceed therein only to a certain degree; nor can they universally point out what is absolutely just; as, for instance, what is equal appears just, and is so; but not to all; only among those who are equals: and what is unequal appears just, and is so; but not to all, only amongst those who are unequals; which circumstance some people neglect, and therefore judge ill; the reason for which is, they judge for themselves, and every one almost is the worst judge in his own cause. Since then justice has reference to persons, the same distinctions must be made with respect to persons which are made with respect to things, in the manner that I have already described in my Ethics.
As to the equality of the things, these they agree in; but their dispute is concerning the equality of the persons, and chiefly for the reason above assigned; because they judge ill in their own cause; and also because each party thinks, that if they admit what is right in some particulars, they have done justice on the whole: thus, for instance, if some persons are unequal in riches, they suppose them unequal in the whole; or, on the contrary, if they are equal in liberty, they suppose them equal in the whole: but what is absolutely just they omit; for if civil society was founded for the sake of preserving and increasing property, every one's right in the city would be equal to his fortune; and then the reasoning of those who insist upon an oligarchy would be valid; for it would not be right that he who contributed one mina should have an equal share in the hundred along with him who brought in all the rest, either of the original money or what was afterwards acquired.
Nor was civil society founded merely to preserve the lives of its members; but that they might live well: for otherwise a state might be composed of slaves, or the animal creation: but this is not so; for these have no share in the happiness of it; nor do they live after their own choice; nor is it an alliance mutually to defend each other from injuries, or for a commercial intercourse: for then the Tyrrhenians and Carthaginians, and all other nations between whom treaties of commerce subsist, would be citizens of one city; for they have articles to regulate their exports and imports, and engagements for mutual protection, and alliances for mutual defence; but yet they have not all the same magistrates established among them, but they are different among the different people; nor does the one take any care, that the morals of the other should be as they ought, or that none of those who have entered into the common agreements should be unjust, or in any degree vicious, only that they do not injure any member of the confederacy. But whosoever endeavours to establish wholesome laws in a state, attends to the virtues and the vices of each individual who composes it; from whence it is evident, that the first care of him who would found a city, truly deserving that name, and not nominally so, must be to have his citizens virtuous; for otherwise it is merely an alliance for self-defence; differing from those of the same cast which are made between different people only in place: for law is an agreement and a pledge, as the sophist Lycophron says, between the citizens of their intending to do justice to each other, though not sufficient to make all the citizens just and good: and that this is faact is evident, for could any one bring different places together, as, for instance, enclose Megara and Corinth in a wall, yet they would not be one city, not even if the inhabitants intermarried with each other, though this inter-community contributes much to make a place one city. Besides, could we suppose a set of people to live separate from each other, but within such a distance as would admit of an intercourse, and that there were laws subsisting between each party, to prevent their injuring one another in their mutual dealings, supposing one a carpenter, another a husbandman, shoemaker, and the like, and that their numbers were ten thousand, still all that they would have together in common would be a tariff for trade, or an alliance for mutual defence, but not the same city. And why? not because their mutual intercourse is not near enough, for even if persons so situated should come to one place, and every one should live in his own house as in his native city, and there should be alliances subsisting between each party to mutually assist and prevent any injury being done to the other, still they would not be admitted to be a city by those who think correctly, if they preserved the same customs when they were together as when they were separate.
It is evident, then, that a city is not a community of place; nor established for the sake of mutual safety or traffic with each other; but that these things are the necessary consequences of a city, although they may all exist where there is no city: but a city is a society of people joining together with their families and their children to live agreeably for the sake of having their lives as happy and as independent as possible: and for this purpose it is necessary that they should live in one place and intermarry with each other: hence in all cities there are family-meetings, clubs, sacrifices, and public entertainments to promote friendship; for a love of sociability is friendship itself; so that the end then for which a city is established is, that the inhabitants of it may live happy, and these things are conducive to that end: for it is a community of families and villages for the sake of a perfect independent life; that is, as we have already said, for the sake of living well and happily. It is not therefore founded for the purpose of men's merely living together, but for their living as men ought; for which reason those who contribute most to this end deserve to have greater power in the city than those who are their equals in family and freedom, but their inferiors in civil virtue, or those who excel them in wealth but are below them in worth. It is evident from what has been said, that in all disputes upon government each party says something that is just.
But with respect to citizens there is a doubt remaining, whether those only are truly so who are allowed to share in the government, or whether the mechanics also are to be considered as such? for if those who are not permitted to rule are to be reckoned among them, it is impossible that the virtue of all the citizens should be the same, for these also are citizens; and if none of them are admitted to be citizens, where shall they be ranked? for they are neither sojourners nor foreigners? or shall we say that there will no inconvenience arise from their not being citizens, as they are neither slaves nor freedmen: for this is certainly true, that all those are not citizens who are necessary to the existence of a city, as boys are not citizens in the same manner that men are, for those are perfectly so, the others under some conditions; for they are citizens, though imperfect ones: for in former times among some people the mechanics were either slaves or foreigners, for which reason many of them are so now: and indeed the best regulated states will not permit a mechanic to be a citizen; but if it be allowed them, we cannot then attribute the virtue we have described to every citizen or freeman, but to those only who are disengaged from servile offices. Now those who are employed by one person in them are slaves; those who do them for money are mechanics and hired servants: hence it is evident on the least reflection what is their situation, for what I have said is fully explained by appearances. Since the number of communities is very great, it follows necessarily that there will be many different sorts of citizens, particularly of those who are governed by others, so that in one state it may be necessary to admit mechanics and hired servants to be citizens, but in others it may be impossible; as particularly in an aristocracy, where honours are bestowed on virtue and dignity: for it is impossible for one who lives the life of a mechanic or hired servant to acquire the practice of virtue. In an oligarchy also hired servants are not admitted to be citizens; because there a man's right to bear any office is regulated by his fortune; but mechanics are, for many citizens are very rich.
There was a law at Thebes that no one could have a share in the government till he had been ten years out of trade. In many states the law invites strangers to accept the freedom of the city; and in some democracies the son of a free-woman is himself free. The same is also observed in many others with respect to natural children; but it is through want of citizens regularly born that they admit such: for these laws are always made in consequence of a scarcity of inhabitants; so, as their numbers increase, they first deprive the children of a male or female slave of this privilege, next the child of a free-woman, and last of all they will admit none but those whose fathers and mothers were both free.
That there are many sorts of citizens, and that he may be said to be as completely who shares the honours of the state, is evident from what has been already said. Thus Achilles, in Homer, complains of Agamemnon's treating him like an unhonoured stranger; for a stranger or sojourner is one who does not partake of the honours of the state: and whenever the right to the freedom of the city is kept obscure, it is for the sake of the inhabitants. From what has been said it is plain whether the virtue of a good man and an excellent citizen is the same or different: and we find that in some states it is the same, in others not; and also that this is not true of each citizen, but of those only who take the lead, or are capable of taking the lead, in public affairs, either alone or in conjunction with others.
Having established these points, we proceed next to consider whether one form of government only should be established, or more than one; and if more, how many, and of what sort, and what are the differences between them. The form of government is the ordering and regulating of the city, and all the offices in it, particularly those wherein the supreme power is lodged; and this power is always possessed by the administration; but the administration itself is that particular form of government which is established in any state: thus in a democracy the supreme power is lodged in the whole people; on the contrary, in an oligarchy it is in the hands of a few. We say then, that the form of government in these states is different, and we shall find the same thing hold good in others. Let us first determine for whose sake a city is established; and point out the different species of rule which man may submit to in social life.
I have already mentioned in my treatise on the management of a family, and the power of the master, that man is an animal naturally formed for society, and that therefore, when he does not want any foreign assistance, he will of his own accord desire to live with others; not but that mutual advantage induces them to it, as far as it enables each person to live more agreeably; and this is indeed the great object not only to all in general, but also to each individual: but it is not merely matter of choice, but they join in society also, even that they may be able to live, which probably is not without some share of merit, and they also support civil society, even for the sake of preserving life, without they are grievously overwhelmed with the miseries of it: for it is very evident that men will endure many calamities for the sake of living, as being something naturally sweet and desirable. It is easy to point out the different modes of government, and we have already settled them in our exoteric discourses. The power of the master, though by nature equally serviceable, both to the master and to the slave, yet nevertheless has for its object the benefit of the master, while the benefit of the slave arises accidentally; for if the slave is destroyed, the power of the master is at an end: but the authority which a man has over his wife, and children, and his family, which we call domestic government, is either for the benefit of those who are under subjection, or else for the common benefit of the whole: but its particular object is the benefit of the governed, as we see in other arts; in physic, for instance, and the gymnastic exercises, wherein, if any benefit arise to the master, it is accidental; for nothing forbids the master of the exercises from sometimes being himself one of those who exercises, as the steersman is always one of the sailors; but both the master of the exercises and the steersman consider the good of those who are under their government. Whatever good may happen to the steersman when he is a sailor, or to the master of the exercises when he himself makes one at the games, is not intentional, or the object of their power; thus in all political governments which are established to preserve and defend the equality of the citizens it is held right to rule by turns. Formerly, as was natural, every one expected that each of his fellow-citizens should in his turn serve the public, and thus administer to his private good, as he himself when in office had done for others; but now every one is desirous of being continually in power, that he may enjoy the advantage which he makes of public business and being in office; as if places were a never-failing remedy for every complaint, and were on that account so eagerly sought after.
It is evident, then, that all those governments which have a common good in view are rightly established and strictly just, but those who have in view only the good of the rulers are all founded on wrong principles, and are widely different from what a government ought to be, for they are tyranny over slaves, whereas a city is a community of freemen.
Having established these particulars, we come to consider next the different number of governments which there are, and what they are; and first, what are their excellencies: for when we have determined this, their defects will be evident enough.
It is evident that every form of government or administration, for the words are of the same import, must contain a supreme power over the whole state, and this supreme power must necessarily be in the hands of one person, or a few, or many; and when either of these apply their power for the common good, such states are well governed; but when the interest of the one, the few, or the many who enjoy this power is alone consulted, then ill; for you must either affirm that those who make up the community are not citizens, or else let these share in the advantages of government. We usually call a state which is governed by one person for the common good, a kingdom; one that is governed by more than one, but by a few only, an aristocracy; either because the government is in the hands of the most worthy citizens, or because it is the best form for the city and its inhabitants. When the citizens at large govern for the public good, it is called a state; which is also a common name for all other governments, and these distinctions are consonant to reason; for it will not be difficult to find one person, or a very few, of very distinguished abilities, but almost impossible to meet with the majority of a people eminent for every virtue; but if there is one common to a whole nation it is valour; for this is created and supported by numbers: for which reason in such a state the profession of arms will always have the greatest share in the government.
Now the corruptions attending each of these governments are these; a kingdom may degenerate into a tyranny, an aristocracy into an oligarchy, and a state into a democracy. Now a tyranny is a monarchy where the good of one man only is the object of government, an oligarchy considers only the rich, and a democracy only the poor; but neither of them have a common good in view.
It will be necessary to enlarge a little more upon the nature of each of these states, which is not without some difficulty, for he who would enter into a philosophical inquiry into the principles of them, and not content himself with a superficial view of their outward conduct, must pass over and omit nothing, but explain the true spirit of each of them. A tyranny then is, as has been said, a monarchy, where one person has an absolute and despotic power over the whole community and every member therein: an oligarchy, where the supreme power of the state is lodged with the rich: a democracy, on the contrary, is where those have it who are worth little or nothing. But the first difficulty that arises from the distinctions which we have laid down is this, should it happen that the majority of the inhabitants who possess the power of the state (for this is a democracy) should be rich, the question is, how does this agree with what we have said? The same difficulty occurs, should it ever happen that the poor compose a smaller part of the people than the rich, but from their superior abilities acquire the supreme power; for this is what they call an oligarchy; it should seem then that our definition of the different states was not correct: nay, moreover, could any one suppose that the majority of the people were poor, and the minority rich, and then describe the state in this manner, that an oligarchy was a government in which the rich, being few in number, possessed the supreme power, and that a democracy was a state in which the poor, being many in number, possessed it, still there will be another difficulty; for what name shall we give to those states we have been describing? I mean, that in which the greater number are rich, and that in which the lesser number are poor (where each of these possess the supreme power), if there are no other states than those we have described. It seems therefore evident to reason, that whether the supreme power is vested in the hands of many or few may be a matter of accident; but that it is clear enough, that when it is in the hands of the few, it will be a government of the rich; when in the hands of the many, it will be a government of the poor; since in all countries there are many poor and few rich: it is not therefore the cause that has been already assigned (namely, the number of people in power) that makes the difference between the two governments; but an oligarchy and democracy differ in this from each other, in the poverty of those who govern in the one, and the riches I28oa of those who govern in the other; for when the government is in the hands of the rich, be they few or be they more, it is an oligarchy; when it is in the hands of the poor, it is a democracy: but, as we have already said, the one will be always few, the other numerous, but both will enjoy liberty; and from the claims of wealth and liberty will arise continual disputes with each other for the lead in public affairs.
It may also be a doubt where the supreme power ought to be lodged. Shall it be with the majority, or the wealthy, with a number of proper persons, or one better than the rest, or with a tyrant? But whichever of these we prefer some difficulty will arise. For what? shall the poor have it because they are the majority? they may then divide among themselves, what belongs to the rich: nor is this unjust; because truly it has been so judged by the supreme power. But what avails it to point out what is the height of injustice if this is not? Again, if the many seize into their own hands everything which belongs to the few, it is evident that the city will be at an end. But virtue will never destroy what is virtuous; nor can what is right be the ruin of the state: therefore such a law can never be right, nor can the acts of a tyrant ever be wrong, for of necessity they must all be just; for he, from his unlimited power, compels every one to obey his command, as the multitude oppress the rich. Is it right then that the rich, the few, should have the supreme power? and what if they be guilty of the same rapine and plunder the possessions of the majority, that will be as right as the other: but that all things of this sort are wrong and unjust is evident. Well then, these of the better sort shall have it: but must not then all the other citizens live unhonoured, without sharing the offices of the city; for the offices of a city are its honours, and if one set of men are always in power, it is evident that the rest must be without honour. Well then, let it be with one person of all others the fittest for it: but by this means the power will be still more contracted, and a greater number than before continue unhonoured. But some one may say, that it is wrong to let man have the supreme power and not the law, as his soul is subject to so many passions. But if this law appoints an aristocracy, or a democracy, how will it help us in our present doubts? for those things will happen which we have already mentioned.
Other particulars we will consider separately; but it seems proper to prove, that the supreme power ought to be lodged with the many, rather than with those of the better sort, who are few; and also to explain what doubts (and probably just ones) may arise: now, though not one individual of the many may himself be fit for the supreme power, yet when these many are joined together, it does not follow but they may be better qualified for it than those; and this not separately, but as a collective body; as the public suppers exceed those which are given at one person's private expense: for, as they are many, each person brings in his share of virtue and wisdom; and thus, coming together, they are like one man made up of a multitude, with many feet, many hands, and many intelligences: thus is it with respect to the manners and understandings of the multitude taken together; for which reason the public are the best judges of music and poetry; for some understand one part, some another, and all collectively the whole; and in this particular men of consequence differ from each of the many; as they say those who are beautiful do from those who are not so, and as fine pictures excel any natural objects, by collecting the several beautiful parts which were dispersed among different originals into one, although the separate parts, as the eye or any other, might be handsomer than in the picture.
But if this distinction is to be made between every people and every general assembly, and some few men of consequence, it may be doubtful whether it is true; nay, it is clear enough that, with respect to a few, it is not; since the same conclusion might be applied even to brutes: and indeed wherein do some men differ from brutes? Not but that nothing prevents what I have said being true of the people in some states. The doubt then which we have lately proposed, with all its consequences, may be settled in this manner; it is necessary that the freemen who compose the bulk of the people should have absolute power in some things; but as they are neither men of property, nor act uniformly upon principles of virtue, it is not safe to trust them with the first offices in the state, both on account of their iniquity and their ignorance; from the one of which they will do what is wrong, from the other they will mistake: and yet it is dangerous to allow them no power or share in the government; for when there are many poor people who are incapable of acquiring the honours of their country, the state must necessarily have many enemies in it; let them then be permitted to vote in the public assemblies and to determine causes; for which reason Socrates, and some other legislators, gave them the power of electing the officers of the state, and also of inquiring into their conduct when they came out of office, and only prevented their being magistrates by themselves; for the multitude when they are collected together have all of them sufficient understanding for these purposes, and, mixing among those of higher rank, are serviceable to the city, as some things, which alone are improper for food, when mixed with others make the whole more wholesome than a few of them would be.
But there is a difficulty attending this form of government, for it seems, that the person who himself was capable of curing any one who was then sick, must be the best judge whom to employ as a physician; but such a one must be himself a physician; and the same holds true in every other practice and art: and as a physician ought to give an account of his practice to a physician, so ought it to be in other arts: those whose business is physic may be divided into three sorts, the first of these is he who makes up the medicines; the second prescribes, and is to the other as the architect is to the mason; the third is he who understands the science, but never practises it: now these three distinctions may be found in those who understand all other arts; nor have we less opinion of their judgment who are only instructed in the principles of the art than of those who practise it: and with respect to elections the same method of proceeding seems right; for to elect a proper person in any science is the business of those who are skilful therein; as in geometry, of geometricians; in steering, of steersmen: but if some individuals should know something of particular arts and works, they do not know more than the professors of them: so that even upon this principle neither the election of magistrates, nor the censure of their conduct, should be entrusted to the many.
But probably all that has been here said may not be right; for, to resume the argument I lately used, if the people are not very brutal indeed, although we allow that each individual knows less of these affairs than those who have given particular attention to them, yet when they come together they will know them better, or at least not worse; besides, in some particular arts it is not the workman only who is the best judge; namely, in those the works of which are understood by those who do not profess them: thus he who builds a house is not the only judge of it, for the master of the family who inhabits it is a better; thus also a steersman is a better judge of a tiller than he who made it; and he who gives an entertainment than the cook. What has been said seems a sufficient solution of this difficulty; but there is another that follows: for it seems absurd that the power of the state should be lodged with those who are but of indifferent morals, instead of those who are of excellent characters. Now the power of election and censure are of the utmost consequence, and this, as has been said, in some states they entrust to the people; for the general assembly is the supreme court of all, and they have a voice in this, and deliberate in all public affairs, and try all causes, without any objection to the meanness of their circumstances, and at any age: but their treasurers, generals, and other great officers of state are taken from men of great fortune and worth. This difficulty also may be solved upon the same principle; and here too they may be right, for the power is not in the man who is member of the assembly, or council, but the assembly itself, and the council, and the people, of which each individual of the whole community are the parts, I mean as senator, adviser, or judge; for which reason it is very right, that the many should have the greatest powers in their own hands; for the people, the council, and the judges are composed of them, and the property of all these collectively is more than the property of any person or a few who fill the great offices of the state: and thus I determine these points.
The first question that we stated shows plainly, that the supreme power should be lodged in laws duly made and that the magistrate or magistrates, either one or more, should be authorised to determine those cases which the laws cannot particularly speak to, as it is impossible for them, in general language, to explain themselves upon everything that may arise: but what these laws are which are established upon the best foundations has not been yet explained, but still remains a matter of some question: but the laws of every state will necessarily be like every state, either trifling or excellent, just or unjust; for it is evident, that the laws must be framed correspondent to the constitution of the government; and, if so, it is plain, that a well-formed government will have good laws, a bad one, bad ones.
Since in every art and science the end aimed at is always good, so particularly in this, which is the most excellent of all, the founding of civil society, the good wherein aimed at is justice; for it is this which is for the benefit of all. Now, it is the common opinion, that justice is a certain equality; and in this point all the philosophers are agreed when they treat of morals: for they say what is just, and to whom; and that equals ought to receive equal: but we should know how we are to determine what things are equal and what unequal; and in this there is some difficulty, which calls for the philosophy of the politician. Some persons will probably say, that the employments of the state ought to be given according to every particular excellence of each citizen, if there is no other difference between them and the rest of the community, but they are in every respect else alike: for justice attributes different things to persons differing from each other in their character, according to their respective merits. But if this is admitted to be true, complexion, or height, or any such advantage will be a claim for a greater share of the public rights. But that this is evidently absurd is clear from other arts and sciences; for with respect to musicians who play on the flute together, the best flute is not given to him who is of the best family, for he will play never the better for that, but the best instrument ought to be given to him who is the best artist.
If what is now said does not make this clear, we will explain it still further: if there should be any one, a very excellent player on the flute, but very deficient in family and beauty, though each of them are more valuable endowments than a skill in music, and excel this art in a higher degree than that player excels others, yet the best flutes ought to be given to him; for the superiority in beauty and fortune should have a reference to the business in hand; but these have none. Moreover, according to this reasoning, every possible excellence might come in comparison with every other; for if bodily strength might dispute the point with riches or liberty, even any bodily strength might do it; so that if one person excelled in size more than another did in virtue, and his size was to qualify him to take place of the other's virtue, everything must then admit of a comparison with each other; for if such a size is greater than virtue by so much, it is evident another must be equal to it: but, since this is impossible, it is plain that it would be contrary to common sense to dispute a right to any office in the state from every superiority whatsoever: for if one person is slow and the other swift, neither is the one better qualified nor the other worse on that account, though in the gymnastic races a difference in these particulars would gain the prize; but a pretension to the offices of the state should be founded on a superiority in those qualifications which are useful to it: for which reason those of family, independency, and fortune, with great propriety, contend with each other for them; for these are the fit persons to fill them: for a city can no more consist of all poor men than it can of all slaves But if such persons are requisite, it is evident that those also who are just and valiant are equally so; for without justice and valour no state can be supported, the former being necessary for its existence, the latter for its happiness.
It seems, then, requisite for the establishment of a state, that all, or at least many of these particulars should be well canvassed and inquired into; and that virtue and education may most justly claim the right of being considered as the necessary means of making the citizens happy, as we have already said. As those who are equal in one particular are not therefore equal in all, and those who are unequal in one particular are not therefore unequal in all, it follows that all those governments which are established upon a principle which supposes they are, are erroneous.
We have already said, that all the members of the community will dispute with each other for the offices of the state; and in some particulars justly, but not so in general; the rich, for instance, because they have the greatest landed property, and the ultimate right to the soil is vested in the community; and also because their fidelity is in general most to be depended on. The freemen and men of family will dispute the point with each other, as nearly on an equality; for these latter have a right to a higher regard as citizens than obscure persons, for honourable descent is everywhere of great esteem: nor is it an improper conclusion, that the descendants of men of worth will be men of worth themselves; for noble birth is the fountain of virtue to men of family: for the same reason also we justly say, that virtue has a right to put in her pretensions. Justice, for instance, is a virtue, and so necessary to society, that all others must yield her the precedence.
Let us now see what the many have to urge on their side against the few; and they may say, that if, when collectively taken, they are compared with them, they are stronger, richer, and better than they are. But should it ever happen that all these should inhabit the same city, I mean the good, the rich, the noble, as well as the many, such as usually make up the community, I ask, will there then be any reason to dispute concerning who shall govern, or will there not? for in every community which we have mentioned there is no dispute where the supreme power should be placed; for as these differ from each other, so do those in whom that is placed; for in one state the rich enjoy it, in others the meritorious, and thus each according to their separate manners. Let us however consider what is to be done when all these happen at the same time to inhabit the same city. If the virtuous should be very few in number, how then shall we act? shall we prefer the virtuous on account of their abilities, if they are capable of governing the city? or should they be so many as almost entirely to compose the state?
There is also a doubt concerning the pretensions of all those who claim the honours of government: for those who found them either on fortune or family have nothing which they can justly say in their defence; since it is evident upon their principle, that if any one person can be found richer than all the rest, the right of governing all these will be justly vested in this one person. In the same manner, one man who is of the best family will claim it from those who dispute the point upon family merit: and probably in an aristocracy the same dispute might arise on the score of virtue, if there is one man better than all the other men of worth who are in the same community; it seems just, by the same reasoning, that he should enjoy the supreme power. And upon this principle also, while the many suppose they ought to have the supreme command, as being more powerful than the few, if one or more than one, though a small number should be found stronger than themselves, these ought rather to have it than they.
All these things seem to make it plain, that none of these principles are justly founded on which these persons would establish their right to the supreme power; and that all men whatsoever ought to obey them: for with respect to those who claim it as due to their virtue or their fortune, they might have justly some objection to make; for nothing hinders but that it may sometimes happen, that the many may be better or richer than the few, not as individuals, but in their collective capacity.
As to the doubt which some persons have proposed and objected, we may answer it in this manner; it is this, whether a legislator, who would establish the most perfect system of laws, should calculate them for the use of the better part of the citizens, or the many, in the circumstances we have already mentioned? The rectitude of anything consists in its equality; that therefore which is equally right will be advantageous to the whole state, and to every member of it in common.
Now, in general, a citizen is one who both shares in the government and also in his turn submits to be governed; their condition, it is true, is different in different states: the best is that in which a man is enabled to choose and to persevere in a course of virtue during his whole life, both in his public and private state. But should there be one person, or a very few, eminent for an uncommon degree of virtue, though not enough to make up a civil state, so that the virtue of the many, or their political abilities, should be too inferior to come in comparison with theirs, if more than one; or if but one, with his only; such are not to be considered as part of the city; for it would be doing them injustice to rate them on a level with those who are so far their inferiors in virtue and political abilities, that they appear to them like a god amongst men. From whence it is evident, that a system of laws must be calculated for those who are equal to each other in nature and power. Such men, therefore, are not the object of law; for they are themselves a law: and it would be ridiculous in any one to endeavour to include them in the penalties of a law: for probably they might say what Antisthenes tells us the lions did to the hares when they demanded to be admitted to an equal share with them in the government. And it is on this account that democratic states have established the ostracism; for an equality seems the principal object of their government. For which reason they compel all those who are very eminent for their power, their fortune, their friendships, or any other cause which may give them too great weight in the government, to submit to the ostracism, and leave the city for a stated time; as the fabulous histories relate the Argonauts served Hercules, for they refused to take him with them in the ship Argo on account of his superior valour. For which reason those who hate a tyranny and find fault with the advice which Periander gave to Thrasybulus, must not think there was nothing to be said in its defence; for the story goes, that Periander said nothing to the messenger in answer to the business he was consulted about, but striking off those ears of corn which were higher than the rest, reduced the whole crop to a level; so that the messenger, without knowing the cause of what was done, related the fact to Thrasybulus, who understood by it that he must take off all the principal men in the city. Nor is this serviceable to tyrants only; nor is it tyrants only who do it; for the same thing is practised both in oligarchies and democracies: for the ostracism has in a manner nearly the same power, by restraining and banishing those who are too great; and what is done in one city is done also by those who have the supreme power in separate states; as the Athenians with respect to the Samians, the Chians, and the Lesbians; for when they suddenly acquired the superiority over all Greece, they brought the other states into subjection, contrary to the treaties which subsisted between them. The King of Persia also very often reduces the Medes and Babylonians when they assume upon their former power: and this is a principle which all governments whatsoever keep in their eye; even those which are best administered, as well as those which are not, do it; these for the sake of private utility, the others for the public good.
The same thing is to be perceived in the other arts and sciences; for a painter would not represent an animal with a foot disproportionally large, though he had drawn it remarkably beautiful; nor would the shipwright make the prow or any other part of the vessel larger than it ought to be; nor will the master of the band permit any who sings louder and better than the rest to sing in concert with them. There is therefore no reason that a monarch should not act in agreement with free states, to support his own power, if they do the same thing for the benefit of their respective communities; upon which account when there is any acknowledged difference in the power of the citizens, the reason upon which the ostracism is founded will be politically just; but it is better for the legislator so to establish his state at the beginning as not to want this remedy: but if in course of time such an inconvenience should arise, to endeavour to amend it by some such correction. Not that this was the use it was put to: for many did not regard the benefit of their respective communities, but made the ostracism a weapon in the hand of sedition.
It is evident, then, that in corrupt governments it is partly just and useful to the individual, though probably it is as clear that it is not entirely just: for in a well-governed state there may be great doubts about the use of it, not on account of the pre-eminence which one may have in strength, riches, or connection: but when the pre-eminence is virtue, what then is to be done? for it seems not right to turn out and banish such a one; neither does it seem right to govern him, for that would be like desiring to share the power with Jupiter and to govern him: nothing then remains but what indeed seems natural, and that is for all persons quietly to submit to the government of those who are thus eminently virtuous, and let them be perpetually kings in the separate states.
What has been now said, it seems proper to change our subject and to inquire into the nature of monarchies; for we have already admitted them to be one of those species of government which are properly founded. And here let us consider whether a kingly government is proper for a city or a country whose principal object is the happiness of the inhabitants, or rather some other. But let us first determine whether this is of one kind only, or more; and it is easy to know that it consists of many different species, and that the forms of government are not the same in all: for at Sparta the kingly power seems chiefly regulated by the laws; for it is not supreme in all circumstances; but when the king quits the territories of the state he is their general in war; and all religious affairs are entrusted to him: indeed the kingly power with them is chiefly that of a general who cannot be called to an account for his conduct, and whose command is for life: for he has not the power of life and death, except as a general; as they frequently had in their expeditions by martial law, which we learn from Homer; for when Agamemnon is affronted in council, he restrains his resentment, but when he is in the field and armed with this power, he tells the Greeks:
<<<
"Whoe'er I know shall shun th' impending fight, To dogs and vultures soon shall be a prey; For death is mine...."
<<<
This, then, is one species of monarchical government in which the kingly power is in a general for life; and is sometimes hereditary, sometimes elective: besides, there is also another, which is to be met with among some of the barbarians, in which the kings are invested with powers nearly equal to a tyranny, yet are, in some respects, bound by the laws and the customs of their country; for as the barbarians are by nature more prone to slavery than the Greeks, and those in Asia more than those in Europe, they endure without murmuring a despotic government; for this reason their governments are tyrannies; but yet not liable to be overthrown, as being customary and according to law. Their guards also are such as are used in a kingly government, not a despotic one; for the guards of their kings are his citizens, but a tyrant's are foreigners. The one commands, in the manner the law directs, those who willingly obey; the other, arbitrarily, those who consent not. The one, therefore, is guarded by the citizens, the other against them.
These, then, are the two different sorts of these monarchies, and another is that which in ancient Greece they called <i>aesumnetes</i>; which is nothing more than an elective tyranny; and its difference from that which is to be found amongst the barbarians consists not in its not being according to law, but only in its not being according to the ancient customs of the country. Some persons possessed this power for life, others only for a particular time or particular purpose, as the people of Mitylene elected Pittacus to oppose the exiles, who were headed by Antimenides and Alcaeus the poet, as we learn from a poem of his; for he upbraids the Mitylenians for having chosen Pittacus for their tyrant, and with one voice extolling him to the skies who was the ruin of a rash and devoted people. These sorts of government then are, and ever were, despotic, on account of their being tyrannies; but inasmuch as they are elective, and over a free people, they are also kingly.
A fourth species of kingly government is that which was in use in the heroic times, when a free people submitted to a kingly government, according to the laws and customs of their country. For those who were at first of benefit to mankind, either in arts or arms, or by collecting them into civil society, or procuring them an establishment, became the kings of a willing people, and established an hereditary monarchy. They were particularly their generals in war, and presided over their sacrifices, excepting such only as belonged to the priests: they were also the supreme judges over the people; and in this case some of them took an oath, others did not; they did, the form of swearing was by their sceptre held out.
In ancient times the power of the kings extended to everything whatsoever, both civil, domestic, and foreign; but in after-times they relinquished some of their privileges, and others the people assumed, so that, in some states, they left their kings only the right of presiding over the sacrifices; and even those whom it were worth while to call by that name had only the right of being commander-in-chief in their foreign wars.
These, then, are the four sorts of kingdoms: the first is that of the heroic times; which was a government over a free people, with its rights in some particulars marked out; for the king was their general, their judge, and their high priest. The second, that of the barbarians; which is an hereditary despotic government regulated by laws: the third is that which they call aesumnetic, which is an elective tyranny. The fourth is the Lacedaemonian; and this, in few words, is nothing more than an hereditary generalship: and in these particulars they differ from each other. There is a fifth species of kingly government, which is when one person has a supreme power over all things whatsoever, in the manner that every state and every city has over those things which belong to the public: for as the master of a family is king in his own house, so such a king is master of a family in his own city or state.
But the different sorts of kingly governments may, if I may so say, be reduced to two; which we will consider more particularly. The last spoken of, and the Lacedaemonian, for the chief of the others are placed between these, which are as it were at the extremities, they having less power than an absolute government, and yet more than the Lacedaemonians; so that the whole matter in question may be reduced to these two points; the one is, whether it is advantageous to the citizens to have the office of general continue in one person for life, and whether it should be confined to any particular families or whether every one should be eligible: the other, whether it is advantageous for one person to have the supreme power over everything or not. But to enter into the particulars concerning the office of a Lacedaemonian general would be rather to frame laws for a state than to consider the nature and utility of its constitution, since we know that the appointing of a general is what is done in every state. Passing over this question then, we will proceed to consider the other part of their government, which is the polity of the state; and this it will be necessary to examine particularly into, and to go through such questions as may arise.
Now the first thing which presents itself to our consideration is this, whether it is best to be governed by a good man, or by good laws? Those who prefer a kingly government think that laws can only speak a general language, but cannot adapt themselves to particular circumstances; for which reason it is absurd in any science to follow written rule; and even in Egypt the physician was allowed to alter the mode of cure which the law prescribed to him, after the fourth day; but if he did it sooner it was at his own peril: from whence it is evident, on the very same account, that a government of written laws is not the best; and yet general reasoning is necessary to all those who are to govern, and it will be much more perfect in those who are entirely free from passions than in those to whom they are natural. But now this is a quality which laws possess; while the other is natural to the human soul. But some one will say in answer to this, that man will be a better judge of particulars. It will be necessary, then, for a king to be a lawgiver, and that his laws should be published, but that those should have no authority which are absurd, as those which are not, should. But whether is it better for the community that those things which cannot possibly come under the cognisance of the law either at all or properly should be under the government of every worthy citizen, as the present method is, when the public community, in their general assemblies, act as judges and counsellors, where all their determinations are upon particular cases, for one individual, be he who he will, will be found, upon comparison, inferior to a whole people taken collectively: but this is what a city is, as a public entertainment is better than one man's portion: for this reason the multitude judge of many things better than any one single person. They are also less liable to corruption from their numbers, as water is from its quantity: besides, the judgment of an individual must necessarily be perverted if he is overcome by anger or any other passion; but it would be hard indeed if the whole community should be misled by anger. Moreover, let the people be free, and they will do nothing but in conformity to the law, except only in those cases which the law cannot speak to. But though what I am going to propose may not easily be met with, yet if the majority of the state should happen to be good men, should they prefer one uncorrupt governor or many equally good, is it not evident that they should choose the many? But there may be divisions among these which cannot happen when there is but one. In answer to this it may be replied that all their souls will be as much animated with virtue as this one man's.
If then a government of many, and all of them good men, compose an aristocracy, and the government of one a kingly power, it is evident that the people should rather choose the first than the last; and this whether the state is powerful or not, if many such persons so alike can be met with: and for this reason probable it was, that the first governments were generally monarchies; because it was difficult to find a number of persons eminently virtuous, more particularly as the world was then divided into small communities; besides, kings were appointed in return for the benefits they had conferred on mankind; but such actions are peculiar to good men: but when many persons equal in virtue appeared at the time, they brooked not a superiority, but sought after an equality and established a free state; but after this, when they degenerated, they made a property of the public; which probably gave rise to oligarchies; for they made wealth meritorious, and the honours of government were reserved for the rich: and these afterwards turned to tyrannies and these in their turn gave rise to democracies; for the power of the tyrants continually decreasing, on account of their rapacious avarice, the people grew powerful enough to frame and establish democracies: and as cities after that happened to increase, probably it was not easy for them to be under any other government than a democracy. But if any person prefers a kingly government in a state, what is to be done with the king's children? Is the family also to reign? But should they have such children as some persons usually have, it will be very detrimental. It may be said, that then the king who has it in his power will never permit such children to succeed to his kingdom. But it is not easy to trust to that; for it is very hard and requires greater virtue than is to be met with in human nature. There is also a doubt concerning the power with which a king should be entrusted: whether he should be allowed force sufficient to compel those who do not choose to be obedient to the laws, and how he is to support his government? for if he is to govern according to law and do nothing of his own will which is contrary thereunto, at the same time it will be necessary to protect that power with which he guards the law, This matter however may not be very difficult to determine; for he ought to have a proper power, and such a one is that which will be sufficient to make the king superior to any one person or even a large part of the community, but inferior to the whole, as the ancients always appointed guards for that person whom they created aesumnetes or tyrant; and some one advised the Syracusians, when Dionysius asked for guards, to allow him such.
We will next consider the absolute monarch that we have just mentioned, who does everything according to his own will: for a king governing under the direction of laws which he is obliged to follow does not of himself create any particular species of government, as we have already said: for in every state whatsoever, either aristocracy or democracy, it is easy to appoint a general for life; and there are many who entrust the administration of affairs to one person only; such is the government at Dyrrachium, and nearly the same at Opus. As for an absolute monarchy as it is called, that is to say, when the whole state is wholly subject to the will of one person, namely the king, it seems to many that it is unnatural that one man should have the entire rule over his fellow-citizens when the state consists of equals: for nature requires that the same right and the same rank should necessarily take place amongst all those who are equal by nature: for as it would be hurtful to the body for those who are of different constitutions to observe the same regimen, either of diet or clothing, so is it with respect to the honours of the state as hurtful, that those who are equal in merit should be unequal in rank; for which reason it is as much a man's duty to submit to command as to assume it, and this also by rotation; for this is law, for order is law; and it is more proper that law should govern than any one of the citizens: upon the same principle, if it is advantageous to place the supreme power in some particular persons, they should be appointed to be only guardians, and the servants of the laws, for the supreme power must be placed somewhere; but they say, that it is unjust that where all are equal one person should continually enjoy it. But it seems unlikely that man should be able to adjust that which the law cannot determine; it may be replied, that the law having laid down the best rules possible, leaves the adjustment and application of particulars to the discretion of the magistrate; besides, it allows anything to be altered which experience proves may be better established. Moreover, he who would place the supreme power in mind, would place it in God and the laws; but he who entrusts man with it, gives it to a wild beast, for such his appetites sometimes make him; for passion influences those who are in power, even the very best of men: for which reason law is reason without desire.
The instance taken from the arts seems fallacious: wherein it is said to be wrong for a sick person to apply for a remedy to books, but that it would be far more eligible to employ those who are skilful in physic; for these do nothing contrary to reason from motives of friendship but earn their money by curing the sick, whereas those who have the management of public affairs do many things through hatred or favour. And, as a proof of what we have advanced, it may be observed, that whenever a sick person suspects that his physician has been persuaded by his enemies to be guilty of any foul practice to him in his profession, he then rather chooses to apply to books for his cure: and not only this but even physicians themselves when they are ill call in other physicians: and those who teach others the gymnastic exercises, exercise with those of the same profession, as being incapable from self-partiality to form a proper judgment of what concerns themselves. From whence it is evident, that those who seek for what is just, seek for a mean; now law is a mean. Moreover; the moral law is far superior and conversant with far superior objects than the written law; for the supreme magistrate is safer to be trusted to than the one, though he is inferior to the other. But as it is impossible that one person should have an eye to everything himself, it will be necessary that the supreme magistrate should employ several subordinate ones under him; why then should not this be done at first, instead of appointing one person in this manner? Besides, if, according to what has been already said, the man of worth is on that account fit to govern, two men of worth are certainly better than one: as, for instance, in Homer, "Let two together go:" and also Agamemnon's wish; "Were ten such faithful counsel mine!" Not but that there are even now some particular magistrates invested with supreme power to decide, as judges, those things which the law cannot, as being one of those cases which comes not properly under its jurisdiction; for of those which can there is no doubt: since then laws comprehend some things, but not all, it is necessary to enquire and consider which of the two is preferable, that the best man or the best law should govern; for to reduce every subject which can come under the deliberation of man into a law is impossible.
No one then denies, that it is necessary that there should be some person to decide those cases which cannot come under the cognisance of a written law: but we say, that it is better to have many than one; for though every one who decides according to the principles of the law decides justly; yet surely it seems absurd to suppose, that one person can see better with two eyes, and hear better with two ears, or do better with two hands and two feet, than many can do with many: for we see that absolute monarchs now furnish themselves with many eyes and ears and hands and feet; for they entrust those who are friends to them and their government with part of their power; for if they are not friends to the monarch, they will not do what he chooses; but if they are friends to him, they are friends also to his government: but a friend is an equal and like his friend: if then he thinks that such should govern, he thinks that his equal also should govern. These are nearly the objections which are usually made to a kingly power.
Probably what we have said may be true of some persons, but not of others; for some men are by nature formed to be under the government of a master; others, of a king; others, to be the citizens of a free state, just and useful; but a tyranny is not according to nature, nor the other perverted forms of government; for they are contrary to it. But it is evident from what has been said, that among equals it is neither advantageous nor right that one person should be lord over all where there are no established laws, but his will is the law; or where there are; nor is it right that one who is good should have it over those who are good; or one who is not good over those who are not good; nor one who is superior to the rest in worth, except in a particular manner, which shall be described, though indeed it has been already mentioned. But let us next determine what people are best qualified for a kingly government, what for an aristocratic, and what for a democratic. And, first, for a kingly; and it should be those who are accustomed by nature to submit the civil government of themselves to a family eminent for virtue: for an aristocracy, those who are naturally framed to bear the rule of free men, whose superior virtue makes them worthy of the management of others: for a free state, a war-like people, formed by nature both to govern and be governed by laws which admit the poorest citizen to share the honours of the commonwealth according to his worth. But whenever a whole family or any one of another shall happen so far to excel in virtue as to exceed all other persons in the community, then it is right that the kingly power should be in them, or if it is an individual who does so, that he should be king and lord of all; for this, as we have just mentioned, is not only correspondent to that principle of right which all founders of all states, whether aristocracies, oligarchies, or democracies, have a regard to (for in placing the supreme power they all think it right to fix it to excellence, though not the same); but it is also agreeable to what has been already said; as it would not be right to kill, or banish, or ostracise such a one for his superior merit. Nor would it be proper to let him have the supreme power only in turn; for it is contrary to nature that what is highest should ever be lowest: but this would be the case should such a one ever be governed by others. So that there can nothing else be done but to submit, and permit him continually to enjoy the supreme power. And thus much with respect to kingly power in different states, and whether it is or is not advantageous to them, and to what, and in what manner.
Since then we have said that there are three sorts of regular governments, and of these the best must necessarily be that which is administered by the best men (and this must be that which happens to have one man, or one family, or a number of persons excelling all the rest in virtue, who are able to govern and be governed in such a manner as will make life most agreeable, and we have already shown that the virtue of a good man and of a citizen in the most perfect government will be the same), it is evident, that in the same manner, and for those very qualities which would procure a man the character of good, any one would say, that the government of a state was a well-established aristocracy or kingdom; so that it will be found to be education and morals that are almost the whole which go to make a good man, and the same qualities will make a good citizen or good king.
These particulars being treated of, we will now proceed to consider what sort of government is best, how it naturally arises, and how it is established; for it is necessary to make a proper inquiry concerning this.
---
!!![[CHAPTER I|ELLIS: BOOK IV: CHAPTER I]]
{{ELLIS: BOOK IV: CHAPTER I}}
---
!!![[CHAPTER II|ELLIS: BOOK IV: CHAPTER II]]
{{ELLIS: BOOK IV: CHAPTER II}}
---
!!![[CHAPTER III|ELLIS: BOOK IV: CHAPTER III]]
{{ELLIS: BOOK IV: CHAPTER III}}
---
!!![[CHAPTER IV|ELLIS: BOOK IV: CHAPTER IV]]
{{ELLIS: BOOK IV: CHAPTER IV}}
---
!!![[CHAPTER V|ELLIS: BOOK IV: CHAPTER V]]
{{ELLIS: BOOK IV: CHAPTER V}}
---
!!![[CHAPTER VI|ELLIS: BOOK IV: CHAPTER VI]]
{{ELLIS: BOOK IV: CHAPTER VI}}
---
!!![[CHAPTER VII|ELLIS: BOOK IV: CHAPTER VII]]
{{ELLIS: BOOK IV: CHAPTER VII}}
---
!!![[CHAPTER VIII|ELLIS: BOOK IV: CHAPTER VIII]]
{{ELLIS: BOOK IV: CHAPTER VIII}}
---
!!![[CHAPTER IX|ELLIS: BOOK IV: CHAPTER IX]]
{{ELLIS: BOOK IV: CHAPTER IX}}
---
!!![[CHAPTER X|ELLIS: BOOK IV: CHAPTER X]]
{{ELLIS: BOOK IV: CHAPTER X}}
---
!!![[CHAPTER XI|ELLIS: BOOK IV: CHAPTER XI]]
{{ELLIS: BOOK IV: CHAPTER XI}}
---
!!![[CHAPTER XII|ELLIS: BOOK IV: CHAPTER XII]]
{{ELLIS: BOOK IV: CHAPTER XII}}
---
!!![[CHAPTER XIII|ELLIS: BOOK IV: CHAPTER XIII]]
{{ELLIS: BOOK IV: CHAPTER XIII}}
---
!!![[CHAPTER XIV|ELLIS: BOOK IV: CHAPTER XIV]]
{{ELLIS: BOOK IV: CHAPTER XIV}}
---
!!![[CHAPTER XV|ELLIS: BOOK IV: CHAPTER XV]]
{{ELLIS: BOOK IV: CHAPTER XV}}
---
!!![[CHAPTER XVI|ELLIS: BOOK IV: CHAPTER XVI]]
{{ELLIS: BOOK IV: CHAPTER XVI}}
In every art and science which is not conversant in parts but in some one genus in which it is complete, it is the business of that art alone to determine what is fitted to its particular genus; as what particular exercise is fitted to a certain particular body, and suits it best: for that body which is formed by nature the most perfect and superior to others necessarily requires the best exercise-and also of what one kind that must be which will suit the generality; and this is the business of the gymnastic arts: and although any one should not desire to acquire an exact knowledge and skill in these exercises, yet it is not, on that account, the less necessary that he who professes to be a master and instruct the youth in them should be perfect therein: and we see that this is what equally befalls the healing, shipbuilding, cloth-making, and indeed all other arts; so that it evidently belongs to the same art to find out what kind of government is best, and would of all others be most correspondent to our wish, while it received no molestation from without: and what particular species of it is adapted to particular persons; for there are many who probably are incapable of enjoying the best form: so that the legislator, and he who is truly a politician, ought to be acquainted not only with that which is most perfect imaginable, but also that which is the best suited to any given circumstances. There is, moreover, a third sort, an imaginary one, and he ought, if such a one should be presented to his consideration, to be able to discern what sort of one it would be at the beginning; and, when once established, what would be the proper means to preserve it a long time. I mean, for instance, if a state should happen not to have the best form of government, or be deficient in what was necessary, or not receive every advantage possible, but something less. And, besides all this, it is necessary to know what sort of government is best fitting for all cities: for most of those writers who have treated this subject, however speciously they may handle other parts of it, have failed in describing the practical parts: for it is not enough to be able to perceive what is best without it is what can be put in practice. It should also be simple, and easy for all to attain to. But some seek only the most subtile forms of government. Others again, choosing rather to treat of what is common, censure those under which they live, and extol the excellence of a particular state, as the Lacedaemonian, or some other: but every legislator ought to establish such a form of government as from the present state and disposition of the people who are to receive it they will most readily submit to and persuade the community to partake of: for it is not a business of less trouble to correct the mistakes of an established government than to form a new one; as it is as difficult to recover what we have forgot as to learn anything afresh. He, therefore, who aspires to the character of a legislator, ought, besides all we have already said, to be able to correct the mistakes of a government already established, as we have before mentioned. But this is impossible to be done by him who does not know how many different forms of government there are: some persons think that there is only one species both of democracy and oligarchy; but this is not true: so that every one should be acquainted with the difference of these governments, how great they are, and whence they arise; and should have equal knowledge to perceive what laws are best, and what are most suitable to each particular government: for all laws are, and ought to be, framed agreeable to the state that is to be governed by them, and not the state to the laws: for government is a certain ordering in a state which particularly respects the magistrates in what manner they shall be regulated, and where the supreme power shall be placed; and what shall be the final object which each community shall have in view; but the laws are something different from what regulates and expresses the form of the constitution-it is their office to direct the conduct of the magistrate in the execution of his office and the punishment of offenders. From whence it is evident, that the founders of laws should attend both to the number and the different sorts of government; for it is impossible that the same laws should be calculated for all sorts of oligarchies and all sorts of democracies, for of both these governments there are many species, not one only.
Since, then, according to our first method in treating of the different forms of government, we have divided those which are regular into three sorts, the kingly, the aristocratical, the free states, and shown the three excesses which these are liable to: the kingly, of becoming tyrannical; the aristocratical, oligarchical; and the free state, democratical: and as we have already treated of the aristocratical and kingly; for to enter into an inquiry what sort of government is best is the same thing as to treat of these two expressly; for each of them desires to be established upon the principles of virtue: and as, moreover, we have already determined wherein a kingly power and an aristocracy differ from each other, and when a state may be said to be governed by a king, it now remains that we examine into a free state, and also these other governments, an oligarchy, a democracy, and a tyranny; and it is evident of these three excesses which must be the worst of all, and which next to it; for, of course, the excesses of the best and most holy must be the worst; for it must necessarily happen either that the name of king only will remain, or else that the king will assume more power than belongs to him, from whence tyranny will arise, the worst excess imaginable, a government the most contrary possible to a free state. The excess next hurtful is an oligarchy; for an aristocracy differs much from this sort of government: that which is least so is a democracy. This subject has been already treated of by one of those writers who have gone before me, though his sentiments are not the same as mine: for he thought, that of all excellent constitutions, as a good oligarchy or the like, a democracy was the worst, but of all bad ones, the best.
Now I affirm, that all these states have, without exception, fallen into excess; and also that he should not have said that one oligarchy was better than another, but that it was not quite so bad. But this question we shall not enter into at present. We shall first inquire how many different sorts of free states there are; since there are many species of democracies and oligarchies; and which of them is the most comprehensive, and most desirable after the best form of government; or if there is any other like an aristocracy, well established; and also which of these is best adapted to most cities, and which of them is preferable for particular persons: for, probably, some may suit better with an oligarchy than a democracy, and others better with a democracy than an oligarchy; and afterwards in what manner any one ought to proceed who desires to establish either of these states, I mean every species of democracy, and also of oligarchy. And to conclude, when we shall have briefly gone through everything that is necessary, we will endeavour to point out the sources of corruption, and stability, in government, as well those which are common to all as those which are peculiar to each state, and from what causes they chiefly arise.
The reason for there being many different sorts of governments is this, that each state consists of a great number of parts; for, in the first place, we see that all cities are made up of families: and again, of the multitude of these some must be rich, some poor, and others in the middle station; and that, both of the rich and poor, some will be used to arms, others not. We see also, that some of the common people are husbandmen, others attend the market, and others are artificers. There is also a difference between the nobles in their wealth, and the dignity in which they live: for instance, in the number of horses they breed; for this cannot be supported without a large fortune: for which reason, in former times, those cities whose strength consisted in horse became by that means oligarchies; and they used horse in their expeditions against the neighbouring cities; as the Eretrians the Chalcidians, the Magnetians, who lived near the river Meander, and many others in Asia. Moreover, besides the difference of fortune, there is that which arises from family and merit; or, if there are any other distinctions which make part of the city, they have been already mentioned in treating of an aristocracy, for there we considered how many parts each city must necessarily be composed of; and sometimes each of these have a share in the government, sometimes a few, sometimes more.
It is evident then, that there must be many forms of government, differing from each other in their particular constitution: for the parts of which they are composed each differ from the other. For government is the ordering of the magistracies of the state; and these the community share between themselves, either as they can attain them by force, or according to some common equality which there is amongst them, as poverty, wealth, or something which they both partake of. There must therefore necessarily be as many different forms of governments as there are different ranks in the society, arising from the superiority of some over others, and their different situations. And these seem chiefly to be two, as they say, of the winds: namely, the north and the south; and all the others are declinations from these. And thus in politics, there is the government of the many and the government of the few; or a democracy and an oligarchy: for an aristocracy may be considered as a species of oligarchy, as being also a government of the few; and what we call a free state may be considered as a democracy: as in the winds they consider the west as part of the north, and the east as part of the south: and thus it is in music, according to some, who say there are only two species of it, the Doric and the Phrygian, and all other species of composition they call after one of these names; and many people are accustomed to consider the nature of government in the same light; but it is both more convenient and more correspondent to truth to distinguish governments as I have done, into two species: one, of those which are established upon proper principles; of which there may be one or two sorts: the other, which includes all the different excesses of these; so that we may compare the best form of government to the most harmonious piece of music; the oligarchic and despotic to the more violent tunes; and the democratic to the soft and gentle airs.
We ought not to define a democracy as some do, who say simply, that it is a government where the supreme power is lodged in the people; for even in oligarchies the supreme power is in the majority. Nor should they define an oligarchy a government where the supreme power is in the hands of a few: for let us suppose the number of a people to be thirteen hundred, and that of these one thousand were rich, who would not permit the three hundred poor to have any share in the government, although they were free, and their equal in everything else; no one would say, that this government was a democracy. In like manner, if the poor, when few in number, should acquire the power over the rich, though more than themselves, no one would say, that this was an oligarchy; nor this, when the rest who are rich have no share in the administration. We should rather say, that a democracy is when the supreme power is in the hands of the freemen; an oligarchy, when it is in the hands of the rich: it happens indeed that in the one case the many will possess it, in the other the few; because there are many poor and few rich. And if the power of the state was to be distributed according to the size of the citizens, as they say it is in Ethiopia, or according to their beauty, it would be an oligarchy: for the number of those who are large and beautiful is small.
Nor are those things which we have already mentioned alone sufficient to describe these states; for since there are many species both of a democracy and an oligarchy, the matter requires further consideration; as we cannot admit, that if a few persons who are free possess the supreme power over the many who are not free, that this government is a democracy: as in Apollonia, in Ionia, and in Thera: for in each of these cities the honours of the state belong to some few particular families, who first founded the colonies. Nor would the rich, because they are superior in numbers, form a democracy, as formerly at Colophon; for there the majority had large possessions before the Lydian war: but a democracy is a state where the freemen and the poor, being the majority, are invested with the power of the state. An oligarchy is a state where the rich and those of noble families, being few, possess it.
We have now proved that there are various forms of government and have assigned a reason for it; and shall proceed to show that there are even more than these, and what they are, and why; setting out with the principle we have already laid down. We admit that every city consists not of one, but many parts: thus, if we should endeavour to comprehend the different species of animals we should first of all note those parts which every animal must have, as a certain sensorium, and also what is necessary to acquire and retain food, as a mouth and a belly; besides certain parts to enable it to move from place to place. If, then, these are the only parts of an animal and there are differences between them; namely, in their various sorts of stomachs, bellies, and sensoriums: to which we must add their motive powers; the number of the combinations of all these must necessarily make up the different species of animals. For it is not possible that the same kind of animal should have any very great difference in its mouth or ears; so that when all these are collected, who happen to have these things similar in all, they make up a species of animals of which there are as many as there are of these general combinations of necessary parts.
The same thing is true of what are called states; for a city is not made of one but many parts, as has already been often said; one of which is those who supply it with provisions, called husbandmen, another called mechanics, whose employment is in the manual arts, without which the city could not be inhabited; of these some are busied about what is absolutely necessary, others in what contribute to the elegancies and pleasures of life; the third sort are your exchange-men, I mean by these your buyers, sellers, merchants, and victuallers; the fourth are your hired labourers or workmen; the fifth are the men-at-arms, a rank not less useful than the other, without you would have the community slaves to every invader; but what cannot defend itself is unworthy of the name of a city; for a city is self-sufficient, a slave not. So that when Socrates, in Plato's Republic, says that a city is necessarily composed of four sorts of people, he speaks elegantly but not correctly, and these are, according to him, weavers, husbandmen, shoe-makers, and builders; he then adds, as if these were not sufficient, smiths, herdsmen for what cattle are necessary, and also merchants and victuallers, and these are by way of appendix to his first list; as if a city was established for necessity, and not happiness, or as if a shoe-maker and a husbandman were equally useful. He reckons not the military a part before the increase of territory and joining to the borders of the neighbouring powers will make war necessary: and even amongst them who compose his four divisions, or whoever have any connection with each other, it will be necessary to have some one to distribute justice, and determine between man and man. If, then, the mind is a more valuable part of man than the body, every one would wish to have those things more regarded in his city which tend to the advantage of these than common matters, such are war and justice; to which may be added council, which is the business of civil wisdom (nor is it of any consequence whether these different employments are filled by different persons or one, as the same man is oftentimes both a soldier and a husbandman): so that if both the judge and the senator are parts of the city, it necessarily follows that the soldier must be so also. The seventh sort are those who serve the public in expensive employments at their own charge: these are called the rich. The eighth are those who execute the different offices of the state, and without these it could not possibly subsist: it is therefore necessary that there should be some persons capable of governing and filling the places in the city; and this either for life or in rotation: the office of senator, and judge, of which we have already sufficiently treated, are the only ones remaining. If, then, these things are necessary for a state, that it may be happy and just, it follows that the citizens who engage in public affairs should be men of abilities therein. Several persons think, that different employments may be allotted to the same person; as a soldier's, a husbandman's, and an artificer's; as also that others may be both senators and judges.
Besides, every one supposes himself a man of political abilities, and that he is qualified for almost every department in the state. But the same person cannot at once be poor and rich: for which reason the most obvious division of the city is into two parts, the poor and rich; moreover, since for the generality the one are few, the other many, they seem of all the parts of a city most contrary to each other; so that as the one or the other prevail they form different states; and these are the democracy and the oligarchy.
But that there are many different states, and from what causes they arise, has been already mentioned: and that there are also different species both of democracies and oligarchies we will now show. Though this indeed is evident from what we have already said: there are also many different sorts of common people, and also of those who are called gentlemen. Of the different sorts of the first are husbandmen, artificers, exchange-men, who are employed in buying and selling, seamen, of which some are engaged in war, some in traffic, some in carrying goods and passengers from place to place, others in fishing, and of each of these there are often many, as fishermen at Tarentum and Byzantium, masters of galleys at Athens, merchants at AEgina and Chios, those who let ships on freight at Tenedos; we may add to these those who live by their manual labour and have but little property; so that they cannot live without some employ: and also those who are not free-born on both sides, and whatever other sort of common people there may be. As for gentlemen, they are such as are distinguished either by their fortune, their birth, their abilities, or their education, or any such-like excellence which is attributed to them.
The most pure democracy is that which is so called principally from that equality which prevails in it: for this is what the law in that state directs; that the poor shall be in no greater subjection than the rich; nor that the supreme power shall be lodged with either of these, but that both shall share it. For if liberty and equality, as some persons suppose, are chiefly to be found in a democracy, it must be most so by every department of government being alike open to all; but as the people are the majority, and what they vote is law, it follows that such a state must be a democracy. This, then, is one species thereof. Another is, when the magistrates are elected by a certain census; but this should be but small, and every one who was included in it should be eligible, but as soon as he was below it should lose that right. Another sort is, in which every citizen who is not infamous has a share in the government, but where the government is in the laws. Another, where every citizen without exception has this right. Another is like these in other particulars, but there the people govern, and not the law: and this takes place when everything is determined by a majority of votes, and not by a law; which happens when the people are influenced by the demagogues: for where a democracy is governed by stated laws there is no room for them, but men of worth fill the first offices in the state: but where the power is not vested in the laws, there demagogues abound: for there the people rule with kingly power: the whole composing one body; for they are supreme, not as individuals but in their collective capacity.
Homer also discommends the government of many; but whether he means this we are speaking of, or where each person exercises his power separately, is uncertain. When the people possess this power they desire to be altogether absolute, that they may not be under the control of the law, and this is the time when flatterers are held in repute. Nor is there any difference between such a people and monarchs in a tyranny: for their manners are the same, and they both hold a despotic power over better persons than themselves. For their decrees are like the others' edicts; their demagogues like the others' flatterers: but their greatest resemblance consists in the mutual support they give to each other, the flatterer to the tyrant, the demagogue to the people: and to them it is owing that the supreme power is lodged in the votes of the people, and not in the laws; for they bring everything before them, as their influence is owing to their being supreme whose opinions they entirely direct; for these are they whom the multitude obey. Besides, those who accuse the magistrates insist upon it, that the right of determining on their conduct lies in the people, who gladly receive their complaints as the means of destroying all their offices.
Any one, therefore, may with great justice blame such a government as being a democracy, and not a free state; for where the government is not in the laws, then there is no free state, for the law ought to be supreme over all things; and particular incidents which arise should be determined by the magistrates or the state. If, therefore, a democracy is to be reckoned a free state, it is evident that any such establishment which centres all power in the votes of the people cannot, properly speaking, be a democracy: for their decrees cannot be general in their extent. Thus, then, we may describe the several species of democracies.
We shall next proceed to show how that government which is peculiarly called a state arises alongside of democracy and oligarchy, and how it ought to be established; and this will at the same time show what are the proper boundaries of both these governments, for we must mark out wherein they differ from one another, and then from both these compose a state of such parts of each of them as will show from whence they were taken.
There are three different ways in which two states may be blended and joined together; for, in the first place, all those rules may be adopted which the laws of each of them have ordered; as for instance in the judicial department, for in an oligarchy the rich are fined if they do not come to the court as jurymen, but the poor are not paid for their attendance; but in democracies they are, while the rich are not fined for their neglect. Now these things, as being common to both, are fit to be observed in a free state which is composed of both. This, then, is one way in which they may be joined together. In the second place, a medium may be taken between the different methods which each state observes; for instance, in a democracy the right to vote in the public assembly is either confined by no census at all, or limited by a very small one; in an oligarchy none enjoy it but those whose census is high: therefore, as these two practices are contrary to each other, a census between each may be established in such a state. In the third place, different laws of each community may be adopted; as, for instance, as it seems correspondent to the nature of a democracy, that the magistrates should be chosen by lot, but an aristocracy by vote, and in the one state according to a census, but not in the other: let, then, an aristocracy and a free state copy something from each of them; let them follow an oligarchy in choosing their magistrates by vote, but a democracy in not admitting of any census, and thus blend together the different customs of the two governments. But the best proof of a happy mixture of a democracy and an oligarchy is this, when a person may properly call the same state a democracy and an oligarchy. It is evident that those who speak of it in this manner are induced to it because both these governments are there well blended together: and indeed this is common to all mediums, that the extremes of each side should be discerned therein, as at Lacedaemon; for many affirm that it is a democracy from the many particulars in which it follows that form of government; as for instance, in the first place, in the bringing up of their children, for the rich and poor are brought up in the same manner; and their education is such that the children of the poor may partake of it; and the same rules are observed when they are youths and men, there is no distinction between a rich person and a poor one; and in their public tables the same provision is served to all. The rich also wear only such clothes as the poorest man is able to purchase. Moreover, with respect to two magistracies of the highest rank, one they have a right to elect to, the other to fill; namely, the senate and the ephori. Others consider it as an oligarchy, the principles of which it follows in many things, as in choosing all their officers by vote, and not by lot; in there being but a few who have a right to sit in judgment on capital causes and the like. Indeed, a state which is well composed of two others ought to resemble them both, and neither, Such a state ought to have its means of preservation in itself, and not without; and when I say in itself, I do not mean that it should owe this to the forbearance of their neighbours, for this may happen to a bad government, but to every member of the community's not being willing that there should be the least alteration in their constitution. Such is the method in which a free state or aristocracy ought to be established.
Of the different species of oligarchies one is, when the right to the offices is regulated by a certain census; so that the poor, although the majority, have no share in it; while all those who are included therein take part in the management of public affairs. Another sort is, when the magistrates are men of very small fortune, who upon any vacancy do themselves fill it up: and if they do this out of the community at large, the state approaches to an aristocracy; if out of any particular class of people, it will be an oligarchy. Another sort of oligarchy is, when the power is an hereditary nobility. The fourth is, when the power is in the same hands as the other, but not under the control of law; and this sort of oligarchy exactly corresponds to a tyranny in monarchies, and to that particular species of democracies which I last mentioned in treating of that state: this has the particular name of a dynasty. These are the different sorts of oligarchies and democracies.
It should also be known, that it often happens that a free state, where the supreme power is in the laws, may not be democratic, and yet in consequence of the established manners and customs of the people, may be governed as if it was; so, on the other hand, where the laws may countenance a more democratic form of government, these may make the state inclining to an oligarchy; and this chiefly happens when there has been any alteration in the government; for the people do not easily change, but love their own ancient customs; and it is by small degrees only that one thing takes place of another; so that the ancient laws will remain, while the power will be in the hands of those who have brought about a revolution in the state.
It is evident from what has been said, that there are as many different sorts of democracies and oligarchies as I have reckoned up: for, of necessity, either all ranks of the people which I have enumerated must have a share in the government, or some only, and others not; for when the husbandmen, and those only who possess moderate fortunes, have the supreme power, they will govern according to law; for as they must get their livings by their employs, they have but little leisure for public business: they will therefore establish proper laws, and never call public assemblies but when there is a necessity for them; and they will readily let every one partake with them in the administration of public affairs as soon as they possess that fortune which the law requires for their qualification: every one, therefore, who is qualified will have his share in the government: for to exclude any would be to make the government an oligarchy, and for all to have leisure to attend without they had a subsistence would be impossible: for these reasons, therefore, this government is a species of democracy. Another species is distinguished by the mode of electing their magistrates, in which every one is eligible, to whose birth there are no objections, provided he is supposed to have leisure to attend: for which reason in such a democracy the supreme power will be vested in the laws, as there will be nothing paid to those who go to the public assemblies. A third species is where every freeman has a right to a share in the government, which he will not accept for the cause already assigned; for which reason here also the supreme power will be in the law. The fourth species of democracy, the last which was established in order of time, arose when cities were greatly enlarged to what they were at first, and when the public revenue became something considerable; for then the populace, on account of their numbers, were admitted to share in the management of public affairs, for then even the poorest people were at leisure to attend to them, as they received wages for so doing; nay, they were more so than others, as they were not hindered by having anything of their own to mind, as the rich had; for which reason these last very often did not frequent the public assemblies and the courts of justice: thus the supreme power was lodged in the poor, and not in the laws. These are the different sorts of democracies, and such are the causes which necessarily gave birth to them.
The first species of oligarchy is, when the generality of the state are men of moderate and not too large property; for this gives them leisure for the management of public affairs: and, as they are a numerous body, it necessarily follows that the supreme power must be in the laws, and not in men; for as they are far removed from a monarchical government, and have not sufficient fortune to neglect their private affairs, while they are too many to be supported by the public, they will of course determine to be governed by the laws, and not by each other. But if the men of property in the state are but few, and their property is large, then an oligarchy of the second sort will take place; for those who have most power will think that they have a right to lord it over the others; and, to accomplish this, they will associate to themselves some who have an inclination for public affairs, and as they are not powerful enough to govern without law, they will make a law for that purpose. And if those few who have large fortunes should acquire still greater power, the oligarchy will then alter into one of the third sort; for they will get all the offices of the state into their own hands by a law which directs the son to succeed upon the death of his father; and, after that, when, by means of their increasing wealth and powerful connections, they extend still further their oppression, a monarchical dynasty will directly succeed wherein men will be supreme, and not the law; and this is the fourth species of an oligarchy correspondent to the last-mentioned class of democracies.
There are besides two other states, a democracy and an oligarchy, one of which all speak of, and it is always esteemed a species of the four sorts; and thus they reckon them up; a monarchy, an oligarchy, a democracy, and this fourth which they call an aristocracy. There is also a fifth, which bears a name that is also common to the other four, namely, a state: but as this is seldom to be met with, it has escaped those who have endeavoured to enumerate the different sorts of governments, which they fix at four only, as does Plato in his Republic.
An aristocracy, of which I have already treated in the first book, is rightly called so; for a state governed by the best men, upon the most virtuous principles, and not upon any hypothesis, which even good men may propose, has alone a right to be called an aristocracy, for it is there only that a man is at once a good man and a good citizen; while in other states men are good only relative to those states. Moreover, there are some other states which are called by the same name, that differ both from oligarchies and free states, wherein not only the rich but also the virtuous have a share in the administration; and have therefore acquired the name of aristocracies; for in those governments wherein virtue is not their common care, there are still men of worth and approved goodness. Whatever state, then, like the Carthaginians, favours the rich, the virtuous, and the citizens at large, is a sort of aristocracy: when only the two latter are held in esteem, as at Lacedaemon, and the state is jointly composed of these, it is a virtuous democracy. These are the two species of aristocracies after the first, which is the best of all governments. There is also a third, which is, whenever a free state inclines to the dominion of a few.
It now remains for us to treat of that government which is particularly called a free state, and also of a tyranny; and the reason for my choosing to place that free state here is, because this, as well as those aristocracies already mentioned, although they do not seem excesses, yet, to speak true, they have all departed from what a perfect government is. Nay, they are deviations both of them equally from other forms, as I said at the beginning. It is proper to mention a tyranny the last of all governments, for it is of all others the least like one: but as my intention is to treat of all governments in general, for this reason that also, as I have said, will be taken into consideration in its proper place.
I shall now inquire into a free state and show what it is; and we shall the better understand its positive nature as we have already described an oligarchy and a democracy; for a free state is indeed nothing more than a mixture of them, and it has been usual to call those which incline most to a democracy, a free state; those which incline most to an oligarchy, an aristocracy, because those who are rich are generally men of family and education; besides, they enjoy those things which others are often guilty of crimes to procure: for which reason they are regarded as men of worth and honour and note.
Since, then, it is the genius of an aristocracy to allot the larger part of the government to the best citizens, they therefore say, that an oligarchy is chiefly composed of those men who are worthy and honourable: now it seems impossible that where the government is in the hands of the good, there the laws should not be good, but bad; or, on the contrary, that where the government is in the hands of the bad, there the laws should be good; nor is a government well constituted because the laws are, without at the same time care is taken that they are observed; for to enforce obedience to the laws which it makes is one proof of a good constitution in the state-another is, to have laws well calculated for those who are to abide by them; for if they are improper they must be obeyed: and this may be done two ways, either by their being the best relative to the particular state, or the best absolutely. An aristocracy seems most likely to confer the honours of the state on the virtuous; for virtue is the object of an aristocracy, riches of an oligarchy, and liberty of a democracy; for what is approved of by the majority will prevail in all or in each of these three different states; and that which seems good to most of those who compose the community will prevail: for what is called a state prevails in many communities, which aim at a mixture of rich and poor, riches and liberty: as for the rich, they are usually supposed to take the place of the worthy and honourable. As there are three things which claim an equal rank in the state, freedom, riches, and virtue (for as for the fourth, rank, it is an attendant on two of the others, for virtue and riches are the origin of family), it is evident, that the conjuncture of the rich and the poor make up a free state; but that all three tend to an aristocracy more than any other, except that which is truly so, which holds the first rank.
We have already seen that there are governments different from a monarchy, a democracy, and an oligarchy; and what they are, and wherein they differ from each other; and also aristocracies and states properly so called, which are derived from them; and it is evident that these are not much unlike each other.
It now remains to treat of a tyranny; not that there is much to be said on that subject, but as it makes part of our plan, since we enumerated it amongst our different sorts of governments. In the beginning of this work we inquired into the nature of kingly government, and entered into a particular examination of what was most properly called so, and whether it was advantageous to a state or not, and what it should be, and how established; and we divided a tyranny into two pieces when we were upon this subject, because there is something analogous between this and a kingly government, for they are both of them established by law; for among some of the barbarians they elect a monarch with absolute power, and formerly among the Greeks there were some such, whom they called sesumnetes. Now these differ from each other; for some possess only kingly power regulated by law, and rule those who voluntarily submit to their government; others rule despotically according to their own will. There is a third species of tyranny, most properly so called, which is the very opposite to kingly power; for this is the government of one who rules over his equals and superiors without being accountable for his conduct, and whose object is his own advantage, and not the advantage of those he governs; for which reason he rules by compulsion, for no freemen will ever willingly submit to such a government. These are the different species of tyrannies, their principles, and their causes.
We proceed now to inquire what form of government and what manner of life is best for communities in general, not adapting it to that superior virtue which is above the reach of the vulgar, or that education which every advantage of nature and fortune only can furnish, nor to those imaginary plans which may be formed at pleasure; but to that mode of life which the greater part of mankind can attain to, and that government which most cities may establish: for as to those aristocracies which we have now mentioned, they are either too perfect for a state to support, or one so nearly alike to that state we now going to inquire into, that we shall treat of them both as one.
The opinions which we form upon these subjects must depend upon one common principle: for if what I have said in my treatise on Morals is true, a happy life must arise from an uninterrupted course of virtue; and if virtue consists in a certain medium, the middle life must certainly be the happiest; which medium is attainable by every one. The boundaries of virtue and vice in the state must also necessarily be the same as in a private person; for the form of government is the life of the city. In every city the people are divided into three sorts; the very rich, the very poor, and those who are between them. If this is universally admitted, that the mean is best, it is evident that even in point of fortune mediocrity is to be preferred; for that state is most submissive to reason; for those who are very handsome, or very strong, or very noble, or very rich; or, on the contrary; those who are very poor, or very weak, or very mean, with difficulty obey it; for the one are capricious and greatly flagitious, the other rascally and mean, the crimes of each arising from their different excesses: nor will they go through the different offices of the state; which is detrimental to it: besides, those who excel in strength, in riches, or friends, or the like, neither know how nor are willing to submit to command: and this begins at home when they are boys; for there they are brought up too delicately to be accustomed to obey their preceptors: as for the very poor, their general and excessive want of what the rich enjoy reduces them to a state too mean: so that the one know not how to command, but to be commanded as slaves, the others know not how to submit to any command, nor to command themselves but with despotic power.
A city composed of such men must therefore consist of slaves and masters, not freemen; where one party must hate, and the other despise, where there could be no possibility of friendship or political community: for community supposes affection; for we do not even on the road associate with our enemies. It is also the genius of a city to be composed as much as possible of equals; which will be most so when the inhabitants are in the middle state: from whence it follows, that that city must be best framed which is composed of those whom we say are naturally its proper members. It is men of this station also who will be best assured of safety and protection; for they will neither covet what belongs to others, as the poor do; nor will others covet what is theirs, as the poor do what belongs to the rich; and thus, without plotting against any one, or having any one plot against them, they will live free from danger: for which reason Phocylides wisely wishes for the middle state, as being most productive of happiness. It is plain, then, that the most perfect political community must be amongst those who are in the middle rank, and those states are best instituted wherein these are a larger and more respectable part, if possible, than both the other; or, if that cannot be, at least than either of them separate; so that being thrown into the balance it may prevent either scale from preponderating.
It is therefore the greatest happiness which the citizens can enjoy to possess a moderate and convenient fortune; for when some possess too much, and others nothing at all, the government must either be in the hands of the meanest rabble or else a pure oligarchy; or, from the excesses of both, a tyranny; for this arises from a headstrong democracy or an oligarchy, but very seldom when the members of the community are nearly on an equality with each other. We will assign a reason for this when we come to treat of the alterations which different states are likely to undergo. The middle state is therefore best, as being least liable to those seditions and insurrections which disturb the community; and for the same reason extensive governments are least liable to these inconveniences; for there those in a middle state are very numerous, whereas in small ones it is easy to pass to the two extremes, so as hardly to have any in a medium remaining, but the one half rich, the other poor: and from the same principle it is that democracies are more firmly established and of longer continuance than oligarchies; but even in those when there is a want of a proper number of men of middling fortune, the poor extend their power too far, abuses arise, and the government is soon at an end.
We ought to consider as a proof of what I now advance, that the best lawgivers themselves were those in the middle rank of life, amongst whom was Solon, as is evident from his poems, and Lycurgus, for he was not a king, and Charondas, and indeed most others. What has been said will show us why of so many free states some have changed to democracies, others to oligarchies: for whenever the number of those in the middle state has been too small, those who were the more numerous, whether the rich or the poor, always overpowered them and assumed to themselves the administration of public affairs; from hence arose either a democracy or an oligarchy. Moreover, when in consequence of their disputes and quarrels with each other, either the rich get the better of the poor, or the poor of the rich, neither of them will establish a free state; but, as the record of their victory, one which inclines to their own principles, and form either a democracy or an oligarchy.
Those who made conquests in Greece, having all of them an eye to the respective forms of government in their own cities, established either democracies or oligarchies, not considering what was serviceable to the state, but what was similar to their own; for which reason a government has never been established where the supreme power has been placed amongst those of the middling rank, or very seldom; and, amongst a few, one man only of those who have yet been conquerors has been persuaded to give the preference to this order of men: it is indeed an established custom with the inhabitants of most cities not to desire an equality, but either to aspire to govern, or when they are conquered, to submit.
Thus we have shown what the best state is, and why. It will not be difficult to perceive of the many states which there are, for we have seen that there are various forms both of democracies and oligarchies, to which we should give the first place, to which the second, and in the same manner the next also; and to observe what are the particular excellences and defects of each, after we have first described the best possible; for that must be the best which is nearest to this, that worst which is most distant from the medium, without any one has a particular plan of his own which he judges by. I mean by this, that it may happen, that although one form of government may be better than another, yet there is no reason to prevent another from being preferable thereunto in particular circumstances and for particular purposes.
After what has been said, it follows that we should now show what particular form of government is most suitable for particular persons; first laying this down as a general maxim, that that party which desires to support the actual administration of the state ought always to be superior to that which would alter it. Every city is made up of quality and quantity: by quality I mean liberty, riches, education, and family, and by quantity its relative populousness: now it may happen that quality may exist in one of those parts of which the city is composed, and quantity in another; thus the number of the ignoble may be greater than the number of those of family, the number of the poor than that of the rich; but not so that the quantity of the one shall overbalance the quality of the other; those must be properly adjusted to each other; for where the number of the poor exceeds the proportion we have mentioned, there a democracy will rise up, and if the husbandry should have more power than others, it will be a democracy of husbandmen; and the democracy will be a particular species according to that class of men which may happen to be most numerous: thus, should these be the husbandmen, it will be of these, and the best; if of mechanics and those who hire themselves out, the worst possible: in the same manner it may be of any other set between these two. But when the rich and the noble prevail more by their quality than they are deficient in quantity, there an oligarchy ensues; and this oligarchy may be of different species, according to the nature of the prevailing party. Every legislator in framing his constitution ought to have a particular regard to those in the middle rank of life; and if he intends an oligarchy, these should be the object of his laws; if a democracy, to these they should be entrusted; and whenever their number exceeds that of the two others, or at least one of them, they give stability to the constitution; for there is no fear that the rich and the poor should agree to conspire together against them, for neither of these will choose to serve the other. If any one would choose to fix the administration on the widest basis, he will find none preferable to this; for to rule by turns is what the rich and the poor will not submit to, on account of their hatred to each other. It is, moreover, allowed that an arbitrator is the most proper person for both parties to trust to; now this arbitrator is the middle rank.
Those who would establish aristocratical governments are mistaken not only in giving too much power to the rich, but also in deceiving the common people; for at last, instead of an imaginary good, they must feel a real evil, for the encroachments of the rich are more destructive to the state than those of the poor.
There are five particulars in which, under fair pretences, the rich craftily endeavour to undermine the rights of the people, these are their public assemblies, their offices of state, their courts of justice, their military power, and their gymnastic exercises. With respect to their public assemblies, in having them open to all, but in fining the rich only, or others very little, for not attending; with respect to offices, in permitting the poor to swear off, but not granting this indulgence to those who are within the census; with respect to their courts of justice, in fining the rich for non-attendance, but the poor not at all, or those a great deal, and these very little, as was done by the laws of Charondas. In some places every citizen who was enrolled had a right to attend the public assemblies and to try causes; which if they did not do, a very heavy fine was laid upon them; that through fear of the fine they might avoid being enrolled, as they were then obliged to do neither the one nor the other. The same spirit of legislation prevailed with respect to their bearing arms and their gymnastic exercises; for the poor are excused if they have no arms, but the rich are fined; the same method takes place if they do not attend their gymnastic exercises, there is no penalty on one, but there is on the other: the consequence of which is, that the fear of this penalty induces the rich to keep the one and attend the other, while the poor do neither. These are the deceitful contrivances of oligarchical legislators.
The contrary prevails in a democracy; for there they make the poor a proper allowance for attending the assemblies and the courts, but give the rich nothing for doing it: whence it is evident, that if any one would properly blend these customs together, they must extend both the pay and the fine to every member of the community, and then every one would share in it, whereas part only now do. The citizens of a free state ought to consist of those only who bear arms: with respect to their census it is not easy to determine exactly what it ought to be, but the rule that should direct upon this subject should be to make it as extensive as possible, so that those who are enrolled in it make up a greater part of the people than those who are not; for those who are poor, although they partake not of the offices of the state, are willing to live quiet, provided that no one disturbs them in their property: but this is not an easy matter; for it may not always happen, that those who are at the head of public affairs are of a humane behaviour. In time of war the poor are accustomed to show no alacrity without they have provisions found them; when they have, then indeed they are willing to fight.
In some governments the power is vested not only in those who bear arms, but also in those who have borne them. Among the Malienses the state was composed of these latter only, for all the officers were soldiers who had served their time. And the first states in Greece which succeeded those where kingly power was established, were governed by the military. First of all the horse, for at that time the strength and excellence of the army depended on the horse, for as to the heavy-armed foot they were useless without proper discipline; but the art of tactics was not known to the ancients, for which reason their strength lay in their horse: but when cities grew larger, and they depended more on their foot, greater numbers partook of the freedom of the city; for which reason what we call republics were formerly called democracies. The ancient governments were properly oligarchies or kingdoms; for on account of the few persons in each state, it would have been impossible to have found a sufficient number of the middle rank; so these being but few, and those used to subordination, they more easily submitted to be governed.
We have now shown why there are many sorts of governments, and others different from those we have treated of: for there are more species of democracies than one, and the like is true of other forms, and what are their differences, and whence they arise; and also of all others which is the best, at least in general; and which is best suited for particular people.
We will now proceed to make some general reflections upon the governments next in order, and also to consider each of them in particular; beginning with those principles which appertain to each: now there are three things in all states which a careful legislator ought well to consider, which are of great consequence to all, and which properly attended to the state must necessarily be happy; and according to the variation of which the one will differ from the other. The first of these is the public assembly; the second the officers of the state, that is, who they ought to be, and with what power they should be entrusted, and in what manner they should be appointed; the third, the judicial department.
Now it is the proper business of the public assembly to determine concerning war and peace, making or breaking off alliances, to enact laws, to sentence to death, banishment, or confiscation of goods, and to call the magistrates to account for their behaviour when in office. Now these powers must necessarily be entrusted to the citizens in general, or all of them to some; either to one magistrate or more; or some to one, and some to another, or some to all, but others to some: to entrust all to all is in the spirit of a democracy, for the people aim at equality. There are many methods of delegating these powers to the citizens at large, one of which is to let them execute them by turn, and not altogether, as was done by Tellecles, the Milesian, in his state. In others the supreme council is composed of the different magistrates, and they succeed to the offices of the community by proper divisions of tribes, wards, and other very small proportions, till every one in his turn goes through them: nor does the whole community ever meet together, without it is when new laws are enacted, or some national affair is debated, or to hear what the magistrates have to propose to them. Another method is for the people to meet in a collective body, but only for the purpose of holding the comitia, making laws, determining concerning war or peace, and inquiring into the conduct of their magistrates, while the remaining part of the public business is conducted by the magistrates, who have their separate departments, and are chosen out of the whole community either by vote or ballot. Another method is for the people in general to meet for the choice of the magistrates, and to examine into their conduct; and also to deliberate concerning war and alliances, and to leave other things to the magistrates, whoever happen to be chosen, whose particular employments are such as necessarily require persons well skilled therein. A fourth method is for every person to deliberate upon every subject in public assembly, where the magistrates can determine nothing of themselves, and have only the privilege of giving their opinions first; and this is the method of the most pure democracy, which is analogous to the proceedings in a dynastic oligarchy and a tyrannic monarchy.
These, then, are the methods in which public business is conducted in a democracy. When the power is in the hands of part of the community only, it is an oligarchy and this also admits of different customs; for whenever the officers of the state are chosen out of those who have a moderate fortune, and these from that circumstance are many, and when they depart not from that line which the law has laid down, but carefully follow it, and when all within the census are eligible, certainly it is then an oligarchy, but founded on true principles of government from its moderation. When the people in general do not partake of the deliberative power, but certain persons chosen for that purpose, who govern according to law; this also, like the first, is an oligarchy. When those who have the deliberative power elect each other, and the son succeeds to the father, and when they can supersede the laws, such a government is of necessity a strict oligarchy. When some persons determine on one thing, and others on another, as war and peace, and when all inquire into the conduct of their magistrates, and other things are left to different officers, elected either by vote or lot, then the government is an aristocracy or a free state. When some are chosen by vote and others by lot, and these either from the people in general, or from a certain number elected for that purpose, or if both the votes and the lots are open to all, such a state is partly an aristocracy, partly a free government itself. These are the different methods in which the deliberative power is vested in different states, all of whom follow some regulation here laid down. It is advantageous to a democracy, in the present sense of the word, by which I mean a state wherein the people at large have a supreme power, even over the laws, to hold frequent public assemblies; and it will be best in this particular to imitate the example of oligarchies in their courts of justice; for they fine those who are appointed to try causes if they do not attend, so should they reward the poor for coming to the public assemblies: and their counsels will be best when all advise with each other, the citizens with the nobles, the nobles with the citizens. It is also advisable when the council is to be composed of part of the citizens, to elect, either by vote or lot, an equal number of both ranks. It is also proper, if the common people in the state are very numerous, either not to pay every one for his attendance, but such a number only as will make them equal to the nobles, or to reject many of them by lot.
In an oligarchy they should either call up some of the common people to the council, or else establish a court, as is done in some other states, whom they call pre-advisers or guardians of the laws, whose business should be to propose first what they should afterwards enact. By this means the people would have a place in the administration of public affairs, without having it in their power to occasion any disorder in the government. Moreover, the people may be allowed to have a vote in whatever bill is proposed, but may not themselves propose anything contrary thereto; or they may give their advice, while the power of determining may be with the magistrates only. It is also necessary to follow a contrary practice to what is established in democracies, for the people should be allowed the power of pardoning, but not of condemning, for the cause should be referred back again to the magistrates: whereas the contrary takes place in republics; for the power of pardoning is with the few, but not of condemning, which is always referred to the people at large. And thus we determine concerning the deliberative power in any state, and in whose hands it shall be.
We now proceed to consider the choice of magistrates; for this branch of public business contains many different Parts, as how many there shall be, what shall be their particular office, and with respect to time how long each of them shall continue in place; for some make it six months, others shorter, others for a year, others for a much longer time; or whether they should be perpetual or for a long time, or neither; for the same person may fill the same office several times, or he may not be allowed to enjoy it even twice, but only once: and also with respect to the appointment of magistrates, who are to be eligible, who is to choose them, and in what manner; for in all these particulars we ought properly to distinguish the different ways which may be followed; and then to show which of these is best suited to such and such governments.
Now it is not easy to determine to whom we ought properly to give the name of magistrate, for a government requires many persons in office; but every one of those who is either chosen by vote or lot is not to be reckoned a magistrate. The priests, for instance, in the first place; for these are to be considered as very different from civil magistrates: to these we may add the choregi and heralds; nay, even ambassadors are elected: there are some civil employments which belong to the citizens; and these are either when they are all engaged in one thing, as when as soldiers they obey their general, or when part of them only are, as in governing the women or educating the youth; and also some economic, for they often elect corn-meters: others are servile, and in which, if they are rich, they employ slaves. But indeed they are most properly called magistrates, who are members of the deliberative council, or decide causes, or are in some command, the last more especially, for to command is peculiar to magistrates. But to speak truth, this question is of no great consequence, nor is it the province of the judges to decide between those who dispute about words; it may indeed be an object of speculative inquiry; but to inquire what officers are necessary in a state, and how many, and what, though not most necessary, may yet be advantageous in a well-established government, is a much more useful employment, and this with respect to all states in general, as well as to small cities.
In extensive governments it is proper to allot one employment to one person, as there are many to serve the public in so numerous a society, where some may be passed over for a long time, and others never be in office but once; and indeed everything is better done which has the whole attention of one person, than when that attention is divided amongst many; but in small states it is necessary that a few of the citizens should execute many employments; for their numbers are so small it will not be convenient to have many of them in office at the same time; for where shall we find others to succeed them in turn? Small states will sometimes want the same magistrates and the same laws as large ones; but the one will not want to employ them so often as the other; so that different charges may be intrusted to the same person without any inconvenience, for they will not interfere with each other, and for want of sufficient members in the community it will be necessary. If we could tell how many magistrates are necessary in every city, and how many, though not necessary, it is yet proper to have, we could then the better know how many different offices one might assign to one magistrate. It is also necessary to know what tribunals in different places should have different things under their jurisdiction, and also what things should always come under the cognisance of the same magistrate; as, for instance, decency of manners, shall the clerk of the market take cognisance of that if the cause arises in the market, and another magistrate in another place, or the same magistrate everywhere: or shall there be a distinction made of the fact, or the parties? as, for instance, in decency of manners, shall it be one cause when it relates to a man, another when it relates to a woman?
In different states shall the magistrates be different or the same? I mean, whether in a democracy, an oligarchy, an aristocracy, and a monarchy, the same persons shall have the same power? or shall it vary according to the different formation of the government? as in an aristocracy the offices of the state are allotted to those who are well educated; in an oligarchy to those who are rich; in a democracy to the freemen? Or shall the magistrates differ as the communities differ? For it may happen that the very same may be sometimes proper, sometimes otherwise: in this state it may be necessary that the magistrate have great powers, in that but small. There are also certain magistrates peculiar to certain states—as the pre-advisers are not proper in a democracy, but a senate is; for one such order is necessary, whose business shall be to consider beforehand and prepare those bills which shall be brought before the people that they may have leisure to attend to their own affairs; and when these are few in number the state inclines to an oligarchy. The pre-advisers indeed must always be few for they are peculiar to an oligarchy: and where there are both these offices in the same state, the pre-adviser's is superior to the senator's, the one having only a democratical power, the other an oligarchical: and indeed the power of the senate is lost in those democracies, in which the people, meeting in one public assembly, take all the business into their own hands; and this is likely to happen either when the community in general are in easy circumstances, or when they are paid for their attendance; for they are then at leisure often to meet together and determine everything for themselves. A magistrate whose business is to control the manners of the boys, or women, or who takes any department similar to this, is to be found in an aristocracy, not in a democracy; for who can forbid the wives of the poor from appearing in public? neither is such a one to be met with in an oligarchy; for the women there are too delicate to bear control. And thus much for this subject. Let us endeavour to treat at large of the establishment of magistrates, beginning from first principles. Now, they differ from each other in three ways, from which, blended together, all the varieties which can be imagined arise. The first of these differences is in those who appoint the magistrates, the second consists in those who are appointed, the third in the mode of appointment; and each of these three differ in three manners; for either all the citizens may appoint collectively, or some out of their whole body, or some out of a particular order in it, according to fortune, family, or virtue, or some other rule (as at Megara, where the right of election was amongst those who had returned together to their country, and had reinstated themselves by force of arms) and this either by vote or lot. Again, these several modes may be differently formed together, as some magistrates may be chosen by part of the community, others by the whole; some out of part, others out of the whole; some by vote, others by lot: and each of these different modes admit of a four-fold subdivision; for either all may elect all by vote or by lot; and when all elect, they may either proceed without any distinction, or they may elect by a certain division of tribes, wards, or companies, till they have gone through the whole community: and some magistrates may be elected one way, and others another. Again, if some magistrates are elected either by vote or lot of all the citizens, or by the vote of some and the lot of some, or some one way and some another; that is to say, some by the vote of all, others by the lot of all, there will then be twelve different methods of electing the magistrates, without blending the two together. Of these there are two adapted to a democracy; namely, to have all the magistrates chosen out of all the people, either by vote or lot, or both; that is to say, some of them by lot, some by vote. In a free state the whole community should not elect at the same time, but some out of the whole, or out of some particular rank; and this either by lot, or vote, or both: and they should elect either out of the whole community, or out of some particular persons in it, and this both by lot and vote. In an oligarchy it is proper to choose some magistrates out of the whole body of the citizens, some by vote, some by lot, others by both: by lot is most correspondent to that form of government. In a free aristocracy, some magistrates should be chosen out of the community in general, others out of a particular rank, or these by choice, those by lot. In a pure oligarchy, the magistrates should be chosen out of certain ranks, and by certain persons, and some of those by lot, others by both methods; but to choose them out of the whole community is not correspondent to the nature of this government. It is proper in an aristocracy for the whole community to elect their magistrates out of particular persons, and this by vote. These then are all the different ways of electing of magistrates; and they have been allotted according to the nature of the different communities; but what mode of proceeding is proper for different communities, or how the offices ought to be established, or with what powers shall be particularly explained. I mean by the powers of a magistrate, what should be his particular province, as the management of the finances or the laws of the state; for different magistrates have different powers, as that of the general of the army differs from the clerk of the market.
Of the three parts of which a government is formed, we now come to consider the judicial; and this also we shall divide in the same manner as we did the magisterial, into three parts. Of whom the judges shall consist, and for what causes, and how. When I say of whom, I mean whether they shall be the whole people, or some particulars; by for what causes I mean, how many different courts shall be appointed; by how, whether they shall be elected by vote or lot. Let us first determine how many different courts there ought to be. Now these are eight. The first of these is the court of inspection over the behaviour of the magistrates when they have quitted their office; the second is to punish those who have injured the public; the third is to take cognisance of those causes in which the state is a party; the fourth is to decide between magistrates and private persons, who appeal from a fine laid upon them; the fifth is to determine disputes which may arise concerning contracts of great value; the sixth is to judge between foreigners, and of murders, of which there are different species; and these may all be tried by the same judges or by different ones; for there are murders of malice prepense and of chance-medley; there is also justifiable homicide, where the fact is admitted, and the legality of it disputed.
There is also another court called at Athens the Court of Phreattae, which determines points relating to a murder committed by one who has run away, to decide whether he shall return; though such an affair happens but seldom, and in very large cities; the seventh, to determine causes wherein strangers are concerned, and this whether they are between stranger and stranger or between a stranger and a citizen. The eighth and last is for small actions, from one to five drachma's, or a little more; for these ought also to be legally determined, but not to be brought before the whole body of the judges. But without entering into any particulars concerning actions for murder, and those wherein strangers are the parties, let us particularly treat of those courts which have the jurisdiction of those matters which more particularly relate to the affairs of the community and which if not well conducted occasion seditions and commotions in the state. Now, of necessity, either all persons must have a right to judge of all these different causes, appointed for that purpose, either by vote or lot, or all of all, some of them by vote, and others by lot, or in some causes by vote, in others by lot. Thus there will be four sorts of judges. There will be just the same number also if they are chosen out of part of the people only; for either all the judges must be chosen out of that part either by vote or lot, or some by lot and some by vote, or the judges in particular causes must be chosen some by vote, others by lot; by which means there will be the same number of them also as was mentioned. Besides, different judges may be joined together; I mean those who are chosen out of the whole people or part of them or both; so that all three may sit together in the same court, and this either by vote, lot, or both. And thus much for the different sorts of judges. Of these appointments that which admits all the community to be judges in all causes is most suitable to a democracy; the second, which appoints that certain persons shall judge all causes, to an oligarchy; the third, which appoints the whole community to be judges in some causes, but particular persons in others, to an aristocracy or free state.
---
!!![[CHAPTER I|ELLIS: BOOK V: CHAPTER I]]
{{ELLIS: BOOK V: CHAPTER I}}
---
!!![[CHAPTER II|ELLIS: BOOK V: CHAPTER II]]
{{ELLIS: BOOK V: CHAPTER II}}
---
!!![[CHAPTER III|ELLIS: BOOK V: CHAPTER III]]
{{ELLIS: BOOK V: CHAPTER III}}
---
!!![[CHAPTER IV|ELLIS: BOOK V: CHAPTER IV]]
{{ELLIS: BOOK V: CHAPTER IV}}
---
!!![[CHAPTER V|ELLIS: BOOK V: CHAPTER V]]
{{ELLIS: BOOK V: CHAPTER V}}
---
!!![[CHAPTER VI|ELLIS: BOOK V: CHAPTER VI]]
{{ELLIS: BOOK V: CHAPTER VI}}
---
!!![[CHAPTER VII|ELLIS: BOOK V: CHAPTER VII]]
{{ELLIS: BOOK V: CHAPTER VII}}
---
!!![[CHAPTER VIII|ELLIS: BOOK V: CHAPTER VIII]]
{{ELLIS: BOOK V: CHAPTER VIII}}
---
!!![[CHAPTER IX|ELLIS: BOOK V: CHAPTER IX]]
{{ELLIS: BOOK V: CHAPTER IX}}
---
!!![[CHAPTER X|ELLIS: BOOK V: CHAPTER X]]
{{ELLIS: BOOK V: CHAPTER X}}
---
!!![[CHAPTER XI|ELLIS: BOOK V: CHAPTER XI]]
{{ELLIS: BOOK V: CHAPTER XI}}
---
!!![[CHAPTER XII|ELLIS: BOOK V: CHAPTER XII]]
{{ELLIS: BOOK V: CHAPTER XII}}
We have now gone through those particulars we proposed to speak of; it remains that we next consider from what causes and how alterations in government arise, and of what nature they are, and to what the destruction of each state is owing; and also to what form any form of polity is most likely to shift into, and what are the means to be used for the general preservation of governments, as well as what are applicable to any particular state; and also of the remedies which are to be applied either to all in general, or to any one considered separately, when they are in a state of corruption: and here we ought first to lay down this principle, that there are many governments, all of which approve of what is just and what is analogically equal; and yet have failed from attaining thereunto, as we have already mentioned; thus democracies have arisen from supposing that those who are equal in one thing are so in every other circumstance; as, because they are equal in liberty, they are equal in everything else; and oligarchies, from supposing that those who are unequal in one thing are unequal in all; that when men are so in point of fortune, that inequality extends to everything else. Hence it follows, that those who in some respects are equal with others think it right to endeavour to partake of an equality with them in everything; and those who are superior to others endeavour to get still more; and it is this more which is the inequality: thus most states, though they have some notion of what is just, yet are almost totally wrong; and, upon this account, when either party has not that share in the administration which answers to his expectations, he becomes seditious: but those who of all others have the greatest right to be so are the last that are; namely, those who excel in virtue; for they alone can be called generally superior. There are, too, some persons of distinguished families who, because they are so, disdain to be on an equality with others, for those esteem themselves noble who boast of their ancestors' merit and fortune: these, to speak truth, are the origin and fountain from whence seditions arise. The alterations which men may propose to make in governments are two; for either they may change the state already established into some other, as when they propose to erect an oligarchy where there is a democracy; or a democracy, or free state, where there is an oligarchy, or an aristocracy from these, or those from that; or else, when they have no objection to the established government, which they like very well, but choose to have the sole management in it themselves; either in the hands of a few or one only. They will also raise commotions concerning the degree in which they would have the established power; as if, for instance, the government is an oligarchy, to have it more purely so, and in the same manner if it is a democracy, or else to have it less so; and, in like manner, whatever may be the nature of the government, either to extend or contract its powers; or else to make some alterations in some parts of it; as to establish or abolish a particular magistracy, as some persons say Lysander endeavoured to abolish the kingly power in Sparta; and Pausanias that of the ephori. Thus in Epidamnus there was an alteration in one part of the constitution, for instead of the philarchi they established a senate. It is also necessary for all the magistrates at Athens; to attend in the court of the Helisea when any new magistrate is created: the power of the archon also in that state partakes of the nature of an oligarchy: inequality is always the occasion of sedition, but not when those who are unequal are treated in a different manner correspondent to that inequality. Thus kingly power is unequal when exercised over equals. Upon the whole, those who aim after an equality are the cause of seditions. Equality is twofold, either in number or value. Equality in number is when two things contain the same parts or the same quantity; equality in value is by proportion as two exceeds one, and three two by the same number-thus by proportion four exceeds two, and two one in the same degree, for two is the same part of four that one is of two; that is to say, half. Now, all agree in what is absolutely and simply just; but, as we have already said they dispute concerning proportionate value; for some persons, if they are equal in one respect, think themselves equal in all; others, if they are superior in one thing, think they may claim the superiority in all; from whence chiefly arise two sorts of governments, a democracy and an oligarchy; for nobility and virtue are to be found only amongst a few; the contrary amongst the many; there being in no place a hundred of the first to be met with, but enough of the last everywhere. But to establish a government entirely upon either of these equalities is wrong, and this the example of those so established makes evident, for none of them have been stable; and for this reason, that it is impossible that whatever is wrong at the first and in its principles should not at last meet with a bad end: for which reason in some things an equality of numbers ought to take place, in others an equality in value. However, a democracy is safer and less liable to sedition than an oligarchy; for in this latter it may arise from two causes, for either the few in power may conspire against each other or against the people; but in a democracy only one; namely, against the few who aim at exclusive power; but there is no instance worth speaking of, of a sedition of the people against themselves. Moreover, a government composed of men of moderate fortunes comes much nearer to a democracy than an oligarchy, and is the safest of all such states.
Since we are inquiring into the causes of seditions and revolutions in governments, we must begin entirely with the first principles from whence they arise. Now these, so to speak, are nearly three in number; which we must first distinguish in general from each other, and endeavour to show in what situation people are who begin a sedition; and for what causes; and thirdly, what are the beginnings of political troubles and mutual quarrels with each other. Now that cause which of all others most universally inclines men to desire to bring about a change in government is that which I have already mentioned; for those who aim at equality will be ever ready for sedition, if they see those whom they esteem their equals possess more than they do, as well as those also who are not content with equality but aim at superiority, if they think that while they deserve more than, they have only equal with, or less than, their inferiors. Now, what they aim at may be either just or unjust; just, when those who are inferior are seditious, that they may be equal; unjust, when those who are equal are so, that they may be superior. These, then, are the situations in which men will be seditious: the causes for which they will be so are profit and honour; and their contrary: for, to avoid dishonour or loss of fortune by mulcts, either on their own account or their friends, they will raise a commotion in the state. The original causes which dispose men to the things which I have mentioned are, taken in one manner, seven in number, in another they are more; two of which are the same with those that have been already mentioned: but influencing in a different manner; for profit and honour sharpen men against each other; not to get the possession of them for themselves (which was what I just now supposed), but when they see others, some justly, others unjustly, engrossing them. The other causes are haughtiness, fear, eminence, contempt, disproportionate increase in some part of the state. There are also other things which in a different manner will occasion revolutions in governments; as election intrigues, neglect, want of numbers, a too great dissimilarity of circumstances.
What influence ill-treatment and profit have for this purpose, and how they may be the causes of sedition, is almost self-evident; for when the magistrates are haughty and endeavour to make greater profits than their office gives them, they not only occasion seditions amongst each other, but against the state also who gave them their power; and this their avarice has two objects, either private property or the property of the state. What influence honours have, and how they may occasion sedition, is evident enough; for those who are themselves unhonoured while they see others honoured, will be ready for any disturbance: and these things are done unjustly when any one is either honoured or discarded contrary to their deserts, justly when they are according to them. Excessive honours are also a cause of sedition when one person or more are greater than the state and the power of the government can permit; for then a monarchy or a dynasty is usually established: on which account the ostracism was introduced in some places, as at Argos and Athens: though it is better to guard against such excesses in the founding of a state, than when they have been permitted to take place, to correct them afterward. Those who have been guilty of crimes will be the cause of sedition, through fear of punishment; as will those also who expect an injury, that they may prevent it; as was the case at Rhodes, when the nobles conspired against the people on account of the decrees they expected would pass against them. Contempt also is a cause of sedition and conspiracies; as in oligarchies, where there are many who have no share in the administration. The rich also even in democracies, despising the disorder and anarchy which will arise, hope to better themselves by the same means which happened at Thebes after the battle of Oenophyta, where, in consequence of bad administration, the democracy was destroyed; as it was at Megara, where the power of the people was lost through anarchy and disorder; the same thing happened at Syracuse before the tyranny of Gelon; and at Rhodes there was the same sedition before the popular government was overthrown. Revolutions in state will also arise from a disproportionate increase; for as the body consists of many parts, it ought to increase proportion-ably to preserve its symmetry, which would otherwise be destroyed; as if the foot was to be four cubits long, and the rest of the body but two palms; it might otherwise be changed into an animal of a different form, if it increase beyond proportion not only in quantity, but also in disposition of parts; so also a city consists of parts, some of which may often increase without notice, as the number of poor in democracies and free states. They will also sometimes happen by accident, as at Tarentum, a little after the Median war, where so many of the nobles were killed in a battle by the lapygi, that from a free state the government was turned into a democracy; and at Argos, where so many of the citizens were killed by Cleomenes the Spartan, that they were obliged to admit several husbandmen to the freedom of the state: and at Athens, through the unfortunate event of the infantry battles, the number of the nobles was reduced by the soldiers being chosen from the list of citizens in the Lacedaemonian wars. Revolutions also sometimes take place in a democracy, though seldomer; for where the rich grow numerous or properties increase, they become oligarchies or dynasties. Governments also sometimes alter without seditions by a combination of the meaner people; as at Hersea: for which purpose they changed the mode of election from votes to lots, and thus got themselves chosen: and by negligence, as when the citizens admit those who are not friends to the constitution into the chief offices of the state, which happened at Orus, when the oligarchy of the archons was put an end to at the election of Heracleodorus, who changed that form of government into a democratic free state. By little and little, I mean by this, that very often great alterations silently take place in the form of government from people's overlooking small matters; as at Ambracia, where the census was originally small, but at last became nothing at all, as if a little and nothing at all were nearly or entirely alike. That state also is liable to seditions which is composed of different nations, till their differences are blended together and undistinguishable; for as a city cannot be composed of every multitude, so neither can it in every given time; for which reason all those republics which have hitherto been originally composed of different people or afterwards admitted their neighbours to the freedom of their city, have been most liable to revolutions; as when the Achaeans joined with the Traezenians in founding Sybaris; for soon after, growing more powerful than the Traezenians, they expelled them from the city; from whence came the proverb of Sybarite wickedness: and again, disputes from a like cause happened at Thurium between the Sybarites and those who had joined with them in building the city; for they assuming upon these, on account of the country being their own, were driven out. And at Byzantium the new citizens, being detected in plots against the state, were driven out of the city by force of arms. The Antisseans also, having taken in those who were banished from Chios, afterwards did the same thing; and also the Zancleans, after having taken in the people of Samos. The Appolloniats, in the Euxine Sea, having admitted their sojourners to the freedom of their city, were troubled with seditions: and the Syracusians, after the expulsion of their tyrants, having enrolled strangers and mercenaries amongst their citizens, quarrelled with each other and came to an open rupture: and the people of Amphipolis, having taken in a colony of Chalcidians, were the greater part of them driven out of the city by them. Many persons occasion seditions in oligarchies because they think themselves ill-used in not sharing the honours of the state with their equals, as I have already mentioned; but in democracies the principal people do the same because they have not more than an equal share with others who are not equal to them. The situation of the place will also sometimes occasion disturbances in the state when the ground is not well adapted for one city; as at Clazomene, where the people who lived in that part of the town called Chytrum quarrelled with them who lived in the island, and the Colophonians with the Notians. At Athens too the disposition of the citizens is not the same, for those who live in the Piraeus are more attached to a popular government than those who live in the city properly so called; for as the interposition of a rivulet, however small, will occasion the line of the phalanx to fluctuate, so any trifling disagreement will be the cause of seditions; but they will not so soon flow from anything else as from the disagreement between virtue and vice, and next to that between poverty and riches, and so on in order, one cause having more influence than another; one of which that I last mentioned.
But seditions in government do not arise for little things, but from them; for their immediate cause is something of moment. Now, trifling quarrels are attended with the greatest consequences when they arise between persons of the first distinction in the state, as was the case with the Syracusians in a remote period; for a revolution in the government was brought about by a quarrel between two young men who were in office, upon a love affair; for one of them being absent, the other seduced his mistress; he in his turn, offended with this, persuaded his friend's wife to come and live with him; and upon this the whole city took part either with the one or the other, and the government was overturned: therefore every one at the beginning of such disputes ought to take care to avoid the consequences; and to smother up all quarrels which may happen to arise amongst those in power, for the mischief lies in the beginning; for the beginning is said to be half of the business, so that what was then but a little fault will be found afterwards to bear its full proportion to what follows. Moreover, disputes between men of note involve the whole city in their consequences; in Hestiaea, after the Median war: two brothers having a dispute about their paternal estate; he who was the poorer, from the other's having concealed part of the effects, and some money which his father had found, engaged the popular party on his side, while the other, who was rich, the men of fashion. And at Delphos, a quarrel about a wedding was the beginning of all the seditions that afterwards arose amongst them; for the bridegroom, being terrified by some unlucky omen upon waiting upon the bride, went away without marrying her; which her relations resenting, contrived secretly to convey some sacred money into his pocket while he was sacrificing, and then killed him as an impious person. At Mitylene also, a dispute, which arose concerning a right of heritage, was the beginning of great evils, and a war with the Athenians, in which Paches took their city, for Timophanes, a man of fortune, leaving two daughters, Doxander, who was circumvented in procuring them in marriage for his two sons, began a sedition, and excited the Athenians to attack them, being the host of that state. There was also a dispute at Phocea, concerning a right of inheritance, between Mnasis, the father of Mnasis, and Euthucrates, the father of Onomarchus, which brought on the Phoceans the sacred war. The government too of Epidamnus was changed from a quarrel that arose from an intended marriage; for a certain man having contracted his daughter in marriage, the father of the young person to whom she was contracted, being archon, punishes him, upon which account he, resenting the affront, associated himself with those who were excluded from any share in the government, and brought about a revolution. A government may be changed either into an oligarchy, democracy, or a free state; when the magistrates, or any part of the city acquire great credit, or are increased in power, as the court of Areopagus at Athens, having procured great credit during the Median war, added firmness to their administration; and, on the other hand, the maritime force, composed of the commonalty, having gained the victory at Salamis, by their power at sea, got the lead in the state, and strengthened the popular party: and at Argos, the nobles, having gained great credit by the battle of Mantinea against the Lacedaemonians, endeavoured to dissolve the democracy. And at Syracuse, the victory in their war with the Athenians being owing to the common people, they changed their free state into a democracy: and at Chalcis, the people having taken off the tyrant Phocis, together with the nobles, immediately seized the government: and at Ambracia also the people, having expelled the tyrant Periander, with his party, placed the supreme power in themselves. And this in general ought to be known, that whosoever has been the occasion of a state being powerful, whether private persons, or magistrates, a certain tribe, or any particular part of the citizens, or the multitude, be they who they will, will be the cause of disputes in the state. For either some persons, who envy them the honours they have acquired, will begin to be seditious, or they, on account of the dignity they have acquired, will not be content with their former equality. A state is also liable to commotions when those parts of it which seem to be opposite to each other approach to an equality, as the rich and the common people; so that the part which is between them both is either nothing at all, or too little to be noticed; for if one party is so much more powerful than the other, as to be evidently stronger, that other will not be willing to hazard the danger: for which reason those who are superior in excellence and virtue will never be the cause of seditions; for they will be too few for that purpose when compared to the many. In general, the beginning and the causes of seditions in all states are such as I have now described, and revolutions therein are brought about in two ways, either by violence or fraud: if by violence, either at first by compelling them to submit to the change when it is made. It may also be brought about by fraud in two different ways, either when the people, being at first deceived, willingly consent to an alteration in their government, and are afterwards obliged by force to abide by it: as, for instance, when the four hundred imposed upon the people by telling them that the king of Persia would supply them with money for the war against the Lacedaemonians; and after they had been guilty of this falsity, they endeavoured to keep possession of the supreme power; or when they are at first persuaded and afterwards consent to be governed: and by one of these methods which I have mentioned are all revolutions in governments brought about.
There are three qualifications necessary for those who fill the first departments in government; first of all, an affection for the established constitution; second place, abilities every way completely equal to the business of their office; in the third, virtue and justice correspondent to the nature of that particular state they are placed in; for if justice is not the same in all states, it is evident that there must be different species thereof. There may be some doubt, when all these qualifications do not in the same persons, in what manner the choice shall be made; as for instance, suppose that one person is an accomplished general, but a bad man and no friend to the constitution; another is just and a friend to it, which shall one prefer? we should then consider of two qualities, which of them the generality possess in a greater degree, which in a less; for which reason in the choice of a general we should regard his courage more than his virtue as the more uncommon quality; as there are fewer capable of conducting an army than there are good men: but, to protect the state or manage the finances, the contrary rule should be followed; for these require greater virtue than the generality are possessed of, but only that knowledge which is common to all. It may be asked, if a man has abilities equal to his appointment in the state, and is affectionate to the constitution, what occasion is there for being virtuous, since these two things alone are sufficient to enable him to be useful to the public? it is, because those who possess those qualities are often deficient in prudence; for, as they often neglect their own affairs, though they know them and love themselves, so nothing will prevent their serving the public in the same manner. In short, whatsoever the laws contain which we allow to be useful to the state contributes to its preservation: but its first and principal support is (as has been often insisted upon) to have the number of those who desire to preserve it greater than those who wish to destroy it. Above all things that ought not to be forgotten which many governments now corrupted neglect; namely, to preserve a mean. For many things seemingly favourable to a democracy destroy a democracy, and many things seemingly favourable to an oligarchy destroy an oligarchy. Those who think this the only virtue extend it to excess, not considering that as a nose which varies a little from perfect straightness, either towards a hook nose or a flat one, may yet be beautiful and agreeable to look at; but if this particularity is extended beyond measure, first of all the properties of the part is lost, but at last it can hardly be admitted to be a nose at all, on account of the excess of the rise or sinking: thus it is with other parts of the human body; so also the same thing is true with respect to states; for both an oligarchy and a democracy may something vary from their most perfect form and yet be well constituted; but if any one endeavours to extend either of them too far, at first he will make the government the worse for it, but at last there will be no government at all remaining. The lawgiver and the politician therefore should know well what preserves and what destroys a democracy or an oligarchy, for neither the one nor the other can possibly continue without rich and poor: but that whenever an entire equality of circumstances prevails, the state must necessarily become of another form; so that those who destroy these laws, which authorise an inequality in property, destroy the government. It is also an error in democracies for the demagogues to endeavour to make the common people superior to the laws; and thus by setting them at variance with the rich, dividing one city into two; whereas they ought rather to speak in favour of the rich. In oligarchies, on the contrary, it is wrong to support those who are in administration against the people. The oaths also which they take in an oligarchy ought to be contrary to what they now are; for, at present, in some places they swear, "I will be adverse to the common people, and contrive all I can against them;" whereas they ought rather to suppose and pretend the contrary; expressing in their oaths, that they will not injure the people. But of all things which I have mentioned, that which contributes most to preserve the state is, what is now most despised, to educate your children for the state; for the most useful laws, and most approved by every statesman, will be of no service if the citizens are not accustomed to and brought up in the principles of the constitution; of a democracy, if that is by law established; of an oligarchy, if that is; for if there are bad morals in one man, there are in the city. But to educate a child fit for the state, it must not be done in the manner which would please either those who have the power in an oligarchy or those who desire a democracy, but so as they may be able to conduct either of these forms of governments. But now the children of the magistrates in an oligarchy are brought up too delicately, and the children of the poor hardy with exercise and labour; so that they are both desirous of and able to promote innovations. In democracies of the purest form they pursue a method which is contrary to their welfare; the reason of which is, that they define liberty wrong: now, there are two things which seem to be the objects of a democracy, that the people in general should possess the supreme power, and all enjoy freedom; for that which is just seems to be equal, and what the people think equal, that is a law: now, their freedom and equality consists in every one's doing what they please: that is in such a democracy every one may live as he likes; "as his inclination guides," in the words of Euripides: but this is wrong, for no one ought to think it slavery to live in subjection to government, but protection. Thus I have mentioned the causes of corruption in different states, and the means of their preservation.
We ought now to inquire into those events which will arise from these causes in every species of government. Democracies will be most subject to revolutions from the dishonesty of their demagogues; for partly, by informing against men of property, they induce them to join together through self-defence, for a common fear will make the greatest enemies unite; and partly by setting the common people against them: and this is what any one may continually see practised in many states. In the island of Cos, for instance, the democracy was subverted by the wickedness of the demagogues, for the nobles entered into a combination with each other. And at Rhodes the demagogues, by distributing of bribes, prevented the people from paying the trierarchs what was owing to them, who were obliged by the number of actions they were harassed with to conspire together and destroy the popular state. The same thing was brought about at Heraclea, soon after the settlement of the city, by the same persons; for the citizens of note, being ill treated by them, quitted the city, but afterwards joining together they returned and overthrew the popular state. Just in the same manner the democracy was destroyed in Megara; for there the demagogues, to procure money by confiscations, drove out the nobles, till the number of those who were banished was considerable, who, returning, got the better of the people in a battle, and established an oligarchy. The like happened at Cume, during the time of the democracy, which Thrasymachus destroyed; and whoever considers what has happened in other states may perceive the same revolutions to have arisen from the same causes. The demagogues, to curry favour with the people, drive the nobles to conspire together, either by dividing their estates, or obliging them to spend them on public services, or by banishing them, that they may confiscate the fortunes of the wealthy. In former times, when the same person was both demagogue and general, the democracies were changed into tyrannies; and indeed most of the ancient tyrannies arose from those states: a reason for which then subsisted, but not now; for at that time the demagogues were of the soldiery; for they were not then powerful by their eloquence; but, now the art of oratory is cultivated, the able speakers are at present the demagogues; but, as they are unqualified to act in a military capacity, they cannot impose themselves on the people as tyrants, if we except in one or two trifling instances. Formerly, too, tyrannies were more common than now, on account of the very extensive powers with which some magistrates were entrusted: as the prytanes at Miletus; for they were supreme in many things of the last consequence; and also because at that time the cities were not of that very great extent, the people in general living in the country, and being employed in husbandry, which gave them, who took the lead in public affairs, an opportunity, if they had a turn for war, to make themselves tyrants; which they all did when they had gained the confidence of the people; and this confidence was their hatred to the rich. This was the case of Pisistratus at Athens, when he opposed the Pediaci: and of Theagenes in Megara, who slaughtered the cattle belonging to the rich, after he had seized those who kept them by the riverside. Dionysius also, for accusing Daphnseus and the rich, was thought worthy of being raised to a tyranny, from the confidence which the people had of his being a popular man in consequence of these enmities. A government shall also alter from its ancient and approved democratic form into one entirely new, if there is no census to regulate the election of magistrates; for, as the election is with the people, the demagogues who are desirous of being in office, to flatter them, will endeavour with all their power to make the people superior even to the laws. To prevent this entirely, or at least in a great measure, the magistrates should be elected by the tribes, and not by the people at large. These are nearly the revolutions to which democracies are liable, and also the causes from whence they arise.
There are two things which of all others most evidently occasion a revolution in an oligarchy; one is, when the people are ill used, for then every individual is ripe for sedition; more particularly if one of the oligarchy should happen to be their leader; as Lygdamis, at Naxus, who was afterwards tyrant of that island. Seditions also which arise from different causes will differ from each other; for sometimes a revolution is brought about by the rich who have no share in the administration, which is in the hands of a very few indeed: and this happened at Massilia, Ister, Heraclea, and other cities; for those who had no share in the government ceased not to raise disputes till they were admitted to it: first the elder brothers, and then the younger also: for in some places the father and son are never in office at the same time; in others the elder and younger brother: and where this is observed the oligarchy partakes something of a free state. At Ister it was changed into a democracy; in Heraclea, instead of being in the hands of a few, it consisted of six hundred. At Cnidus the oligarchy was destroyed by the nobles quarrelling with each other, because the government was in the hands of so few: for there, as we have just mentioned, if the father was in office, the son could not; or, if there were many brothers, the eldest only; for the people, taking advantage of their disputes, elected one of the nobles for their general, and got the victory: for where there are seditions government is weak. And formerly at Erithria, during the oligarchy of the Basilides, although the state flourished greatly under their excellent management, yet because the people were displeased that the power should be in the hands of so few, they changed the government. Oligarchies also are subject to revolutions, from those who are in office therein, from the quarrels of the demagogues with each other. The demagogues are of two sorts; one who flatter the few when they are in power: for even these have their demagogues; such was Charicles at Athens, who had great influence over the thirty; and, in the same manner, Phrynichus over the four hundred. The others are those demagogues who have a share in the oligarchy, and flatter the people: such were the state-guardians at Larissa, who flattered the people because they were elected by them. And this will always happen in every oligarchy where the magistrates do not elect themselves, but are chosen out of men either of great fortune or certain ranks, by the soldiers or by the people; as was the custom at Abydos. And when the judicial department is not in the hands of the supreme power, the demagogues, favouring the people in their causes, overturn the government; which happened at Heraclea in Pontus: and also when some desire to contract the power of the oligarchy into fewer hands; for those who endeavour to support an equality are obliged to apply to the people for assistance. An oligarchy is also subject to revolutions when the nobility spend their fortunes by luxury; for such persons are desirous of innovations, and either endeavour to be tyrants themselves or to support others in being so, as Hypparinus supported Dionysius of Syracuse. And at Amphipolis one Cleotimus collected a colony of Chalcidians, and when they came set them to quarrel with the rich: and at AEgina a certain person who brought an action against Chares attempted on that account to alter the government. Sometimes they will try to raise commotions, sometimes they will rob the public, and then quarrel with each other, or else fight with those who endeavour to detect them; which was the case at Apollonia in Pontus. But if the members of an oligarchy agree among themselves the state is not very easily destroyed without some external force. Pharsalus is a proof of this, where, though the place is small, yet the citizens have great power, from the prudent use they make of it. An oligarchy also will be destroyed when they create another oligarchy under it; that is, when the management of public affairs is in the hands of a few, and not equally, but when all of them do not partake of the supreme power, as happened once at Elis, where the supreme power in general was in the hands of a very few out of whom a senate was chosen, consisting but of ninety, who held their places for life; and their mode of election was calculated to preserve the power amongst each other's families, like the senators at Lacedaemon. An oligarchy is liable to a revolution both in time of war and peace; in war, because through a distrust in the citizens the government is obliged to employ mercenary troops, and he to whom they give the command of the army will very often assume the tyranny, as Timophanes did at Corinth; and if they appoint more than one general, they will very probably establish a dynasty: and sometimes, through fear of this, they are forced to let the people in general have some share in the government, because they are obliged to employ them. In peace, from their want of confidence in each other, they will entrust the guardianship of the state to mercenaries and their general, who will be an arbiter between them, and sometimes become master of both, which happened at Larissa, when Simos and the Aleuadae had the chief power. The same thing happened at Abydos, during the time of the political clubs, of which Iphiades' was one. Commotions also will happen in an oligarchy from one party's overbearing and insulting another, or from their quarrelling about their law-suits or marriages. How their marriages, for instance, will have that effect has been already shown: and in Eretria, Diagoras destroyed the oligarchy of the knights upon the same account. A sedition also arose at Heraclea, from a certain person being condemned by the court; and at Thebes, in consequence of a man's being guilty of adultery; the punishment indeed which Eurytion suffered at Heraclea was just, yet it was illegally executed: as was that at Thebes upon Archias; for their enemies endeavoured to have them publicly bound in the pillory. Many revolutions also have been brought about in oligarchies by those who could not brook the despotism which those persons assumed who were in power, as at Cnidus and Chios. Changes also may happen by accident in what we call a free state and in an oligarchy; wheresoever the senators, judges, and magistrates are chosen according to a certain census; for it often happens that the highest census is fixed at first; so that a few only could have a share in the government, in an oligarchy, or in a free state those of moderate fortunes only; when the city grows rich, through peace or some other happy cause, it becomes so little that every one's fortune is equal to the census, so that the whole community may partake of all the honours of government; and this change sometimes happens by little and little, and insensible approaches, sometimes quicker. These are the revolutions and seditions that arise in oligarchies, and the causes to which they are owing: and indeed both democracies and oligarchies sometimes alter, not into governments of a contrary form, but into those of the same government; as, for instance, from having the supreme power in the law to vest it in the ruling party, or the contrariwise.
Commotions also arise in aristocracies, from there being so few persons in power (as we have already observed they do in oligarchies, for in this particular an aristocracy is most near an oligarchy, for in both these states the administration of public affairs is in the hands of a few; not that this arises from the same cause in both, though herein they chiefly seem alike): and these will necessarily be most likely to happen when the generality of the people are high-spirited and think themselves equal to each other in merit; such were those at Lacedasmon, called the Partheniae (for these were, as well as others, descendants of citizens), who being detected in a conspiracy against the state, were sent to found Tarentum. They will happen also when some great men are disgraced by those who have received higher honours than themselves, to whom they are no ways inferior in abilities, as Lysander by the kings: or when an ambitious man cannot get into power, as Cinadon, who, in the reign of Agesilaus, was chief in a conspiracy against the Spartans: and also when some are too poor and others too rich, which will most frequently happen in time of war; as at Lacedaemon during the Messenian war, which is proved by a poem of Tyrtaeus, called "Eunomia;" for some persons being reduced thereby, desired that the lands might be divided: and also when some person of very high rank might still be higher if he could rule alone, which seemed to be Pausanias's intention at Lacedaemon, when he was their general in the Median war, and Anno's at Carthage. But free states and aristocracies are mostly destroyed from want of a fixed administration of public affairs; the cause of which evil arises at first from want of a due mixture of the democratic and the oligarchic parts in a free state; and in an aristocracy from the same causes, and also from virtue not being properly joined to power; but chiefly from the two first, I mean the undue mixture of the democratic and oligarchic parts; for these two are what all free states endeavour to blend together, and many of those which we call aristocracies, in this particular these states differ from each other, and on this account the one of them is less stable than the other, for that state which inclines most to an oligarchy is called an aristocracy, and that which inclines most to a democracy is called a free state; on which account this latter is more secure than the former, for the wider the foundation the securer the building, and it is ever best to live where equality prevails. But the rich, if the community gives them rank, very often endeavour to insult and tyrannise over others. On the whole, whichever way a government inclines, in that it will settle, each party supporting their own. Thus a free state will become a democracy; an aristocracy an oligarchy; or the contrary, an aristocracy may change into a democracy (for the poor, if they think themselves injured, directly take part with the contrary side) and a free state into an oligarchy. The only firm state is that where every one enjoys that equality he has a right to and fully possesses what is his own. And what I have been speaking of happened to the Thurians; for the magistrates being elected according to a very high census, it was altered to a lower, and they were subdivided into more courts, but in consequence of the nobles possessing all the land, contrary to law; the state was too much of an oligarchy, which gave them an opportunity of encroaching greatly on the rest of the people; but these, after they had been well inured to war, so far got the better of their guards as to expel every one out of the country who possessed more than he ought. Moreover, as all aristocracies are free oligarchies, the nobles therein endeavour to have rather too much power, as at Lacedaemon, where property is now in the hands of a few, and the nobles have too much liberty to do as they please and make such alliances as they please. Thus the city of the Locrians was ruined from an alliance with Dionysius; which state was neither a democracy nor well-tempered aristocracy. But an aristocracy chiefly approaches to a secret change by its being destroyed by degrees, as we have already said of all governments in general; and this happens from the cause of the alteration being trifling; for whenever anything which in the least regards the state is treated with contempt, after that something else, and this of a little more consequence, will be more easily altered, until the whole fabric of government is entirely subverted, which happened in the government of Thurium; for the law being that they should continue soldiers for five years, some young men of a martial disposition, who were in great esteem amongst their officers, despising those who had the management of public affairs, and imagining they could easily accomplish their intention, first endeavoured to abolish this law, with a view of having it lawful to continue the same person perpetually in the military, perceiving that the people would readily appoint them. Upon this, the magistrates who are called counselors first joined together with an intention to oppose it but were afterwards induced to agree to it, from a belief that if that law was not repealed they would permit the management of all other public affairs to remain in their hands; but afterwards, when they endeavoured to restrain some fresh alterations that were making, they found that they could do nothing, for the whole form of government was altered into a dynasty of those who first introduced the innovations. In short, all governments are liable to be destroyed either from within or from without; from without when they have for their neighbour a state whose policy is contrary to theirs, and indeed if it has great power the same thing will happen if it is not their neighbour; of which both the Athenians and the Lacedaemonians are a proof; for the one, when conquerors everywhere destroyed the oligarchies; the other the democracies. These are the chief causes of revolutions and dissensions in governments.
We are now to consider upon what the preservation of governments in general and of each state in particular depends; and, in the first place, it is evident that if we are right in the causes we have assigned for their destruction, we know also the means of their preservation; for things contrary produce contraries: but destruction and preservation are contrary to each other. In well-tempered governments it requires as much care as anything whatsoever, that nothing be done contrary to law: and this ought chiefly to be attended to in matters of small consequence; for an illegality that approaches insensibly, approaches secretly, as in a family small expenses continually repeated consume a man's income; for the understanding is deceived thereby, as by this false argument; if every part is little, then the whole is little: now, this in one sense is true, in another is false, for the whole and all the parts together are large, though made up of small parts. The first therefore of anything is what the state ought to guard against. In the next place, no credit ought to be given to those who endeavour to deceive the people with false pretences; for they will be confuted by facts. The different ways in which they will attempt to do this have been already mentioned. You may often perceive both aristocracies and oligarchies continuing firm, not from the stability of their forms of government, but from the wise conduct of the magistrates, both towards those who have a part in the management of public affairs, and those also who have not: towards those who have not, by never injuring them; and also introducing those who are of most consequence amongst them into office; nor disgracing those who are desirous of honour; or encroaching on the property of individuals; towards those who have, by behaving to each other upon an equality; for that equality which the favourers of a democracy desire to have established in the state is not only just, but convenient also, amongst those who are of the same rank: for which reason, if the administration is in the hands of many, those rules which are established in democracies will be very useful; as to let no one continue in office longer than six months: that all those who are of the same rank may have their turn; for between these there is a sort of democracy: for which reason demagogues are most likely to arise up amongst them, as we have already mentioned: besides, by this means both aristocracies and democracies will be the less liable to be corrupted into dynasties, because it will not be so easy for those who are magistrates for a little to do as much mischief as they could in a long time: for it is from hence that tyrannies arise in democracies and oligarchies; for either those who are most powerful in each state establish a tyranny, as the demagogues in the one, the dynasties in the other, or the chief magistrates who have been long in power. Governments are sometimes preserved not only by having the means of their corruption at a great distance, but also by its being very near them; for those who are alarmed at some impending evil keep a stricter hand over the state; for which reason it is necessary for those who have the guardianship of the constitution to be able to awaken the fears of the people, that they may preserve it, and not like a night-guard to be remiss in protecting the state, but to make the distant danger appear at hand. Great care ought also to be used to endeavour to restrain the quarrels and disputes of the nobles by laws, as well as to prevent those who are not already engaged in them from taking a part therein; for to perceive an evil at its very first approach is not the lot of every one, but of the politician. To prevent any alteration taking place in an oligarchy or free state on account of the census, if that happens to continue the same while the quantity of money is increased, it will be useful to take a general account of the whole amount of it in former times, to compare it with the present, and to do this every year in those cities where the census is yearly, in larger communities once in three or five years; and if the whole should be found much larger or much less than it was at the time when the census was first established in the state, let there be a law either to extend or contract it, doing both these according to its increase or decrease; if it increases making the census larger, if it decreases smaller: and if this latter is not done in oligarchies and free states, you will have a dynasty arise in the one, an oligarchy in the other: if the former is not, free states will be changed into democracies, and oligarchies into free states or democracies. It is a general maxim in democracies, oligarchies, monarchies, and indeed in all governments, not to let any one acquire a rank far superior to the rest of the community, but rather to endeavour to confer moderate honours for a continuance than great ones for a short time; for these latter spoil men, for it is not every one who can bear prosperity: but if this rule is not observed, let not those honours which were conferred all at once be all at once taken away, but rather by degrees. But, above all things, let this regulation be made by the law, that no one shall have too much power, either by means of his fortune or friends; but if he has, for his excess therein, let it be contrived that he shall quit the country. Now, as many persons promote innovations, that they may enjoy their own particular manner of living, there ought to be a particular officer to inspect the manners of every one, and see that these are not contrary to the genius of the state in which he lives, whether it may be an oligarchy, a democracy, or any other form of government; and, for the same reason, those should be guarded against who are most prosperous in the city: the means of doing which is by appointing those who are otherwise to the business and the offices of the state. I mean, to oppose men of account to the common people, the poor to the rich, and to blend both these into one body, and to increase the numbers of those who are in the middle rank; and this will prevent those seditions which arise from an inequality of condition. But above all, in every state it is necessary, both by the laws and every other method possible, to prevent those who are employed by the public from being venal, and this particularly in an oligarchy; for then the people will not be so much displeased from seeing themselves excluded from a share in the government (nay, they will rather be glad to have leisure to attend their private affairs) as at suspecting that the officers of the state steal the public money, then indeed they are afflicted with double concern, both because they are deprived of the honours of the state, and pillaged by those who enjoy them. There is one method of blending together a democracy and an aristocracy, if office brought no profit; by which means both the rich and the poor will enjoy what they desire; for to admit all to a share in the government is democratical; that the rich should be in office is aristocratical. This must be done by letting no public employment whatsoever be attended with any emolument; for the poor will not desire to be in office when they can get nothing by it, but had rather attend to their own affairs: but the rich will choose it, as they want nothing of the community. Thus the poor will increase their fortunes by being wholly employed in their own concerns; and the principal part of the people will not be governed by the lower sort. To prevent the exchequer from being defrauded, let all public money be delivered out openly in the face of the whole city, and let copies of the accounts be deposited in the different wards tribes, and divisions. But, as the magistrates are to execute their offices without any advantages, the law ought to provide proper honours for those who execute them well. In democracies also it is necessary that the rich should be protected, by not permitting their lands to be divided, nor even the produce of them, which in some states is done unperceivably. It would be also better if the people would prevent them when they offer to exhibit a number of unnecessary and yet expensive public entertainments of plays, music, processions, and the like. In an oligarchy it is necessary to take great care of the poor, and allot them public employments which are gainful; and, if any of the rich insult them, to let their punishment be severer than if they insulted one of their own rank; and to let estates pass by affinity, and not gift: nor to permit any person to have more than one; for by this means property will be more equally divided, and the greater part of the poor get into better circumstances. It is also serviceable in a democracy and an oligarchy to allot those who take no part in public affairs an equality or a preference in other things; the rich in a democracy, to the poor in an oligarchy: but still all the principal offices in the state to be filled only by those who are best qualified to discharge them.
It now remains that we speak of monarchies, their causes of corruption, and means of preservation; and indeed almost the same things which have been said of other governments happen to kingdoms and tyrannies; for a kingdom partakes of an aristocracy, a tyranny of the worst species of an oligarchy and democracy; for which reason it is the worst that man can submit to, as being composed of two, both of which are bad, and collectively retains all the corruptions and all the defects of both these states. These two species of monarchies arise from principles contrary to each other: a kingdom is formed to protect the better sort of people against the multitude, and kings are appointed out of those, who are chosen either for their superior virtue and actions flowing from virtuous principles, or else from their noble descent; but a tyrant is chosen out of the meanest populace; an enemy to the better sort, that the common people may not be oppressed by them. That this is true experience convinces us; for the generality of tyrants were indeed mere demagogues, who gained credit with the people by oppressing the nobles. Some tyrannies were established in this manner after the cities were considerably enlarged—others before that time, by kings who exceeded the power which their country allowed them, from a desire of governing despotically: others were founded by those who were elected to the superior offices in the state; for formerly the people appointed officers for life, who came to be at the head of civil and religious affairs, and these chose one out of their body in whom the supreme power over all the magistrates was placed. By all these means it was easy to establish a tyranny, if they chose it; for their power was ready at hand, either by their being kings, or else by enjoying the honours of the state; thus Phidon at Argos and other tyrants enjoyed originally the kingly power; Phalaris and others in Ionia, the honours of the state. Pansetius at Leontium, Cypselus at Corinth, Pisistratus at Athens, Dionysius at Syracuse, and others, acquired theirs by having been demagogues. A kingdom, as we have said, partakes much of the nature of an aristocracy, and is bestowed according to worth, as either virtue, family, beneficent actions, or these joined with power; for those who have been benefactors to cities and states, or have it in their powers to be so, have acquired this honour, and those who have prevented a people from falling into slavery by war, as Codrus, or those who have freed them from it, as Cyrus, or the founders of cities, or settlers of colonies, as the kings of Sparta, Macedon, and Molossus. A king desires to be the guardian of his people, that those who have property may be secure in the possession of it, and that the people in general meet with no injury; but a tyrant, as has been often said, has no regard to the common good, except for his own advantage; his only object is pleasure, but a king's is virtue: what a tyrant therefore is ambitious of engrossing is wealth, but a king rather honour. The guards too of a king are citizens, a tyrant's foreigners.
That a tyranny contains all that is bad both in a democracy and an oligarchy is evident; with an oligarchy it has for its end gain, as the only means of providing the tyrant with guards and the luxuries of life; like that it places no confidence in the people; and therefore deprives them of the use of arms: it is also common to them both to persecute the populace, to drive them out of the city and their own habitations. With a democracy it quarrels with the nobles, and destroys them both publicly and privately, or drives them into banishment, as rivals and an impediment to the government; hence naturally arise conspiracies both amongst those who desire to govern and those who desire not to be slaves; hence arose Periander's advice to Thrasybulus to take off the tallest stalks, hinting thereby, that it was necessary to make away with the eminent citizens. We ought then in reason, as has been already said, to account for the changes which arise in a monarchy from the same causes which produce them in other states: for, through injustice received, fear, and contempt, many of those who are under a monarchical government conspire against it; but of all species of injustice, injurious contempt has most influence on them for that purpose: sometimes it is owing to their being deprived of their private fortunes. The dissolution too of a kingdom and a tyranny are generally the same; for monarchs abound in wealth and honour, which all are desirous to obtain. Of plots: some aim at the life of those who govern, others at their government; the first arises from hatred to their persons; which hatred may be owing to many causes, either of which will be sufficient to excite their anger, and the generality of those who are under the influence of that passion will join in a conspiracy, not for the sake of their own advancement, but for revenge. Thus the plot against the children of Pisistratus arose from their injurious treatment of Harmodius's sister, and insulting him also; for Harmodius resenting the injury done to his sister, and Aristogiton the injury done to Harmodius. Periander the tyrant of Ambracia also lost his life by a conspiracy, for some improper liberties he took with a boy in his cups: and Philip was slain by Pausanias for neglecting to revenge him of the affront he had received from Attains; as was Amintas the Little by Darda, for insulting him on account of his age; and the eunuch by Evagoras the Cyprian in revenge for having taken his son's wife away from him....
Many also who have had their bodies scourged with stripes have, through resentment, either killed those who caused them to be inflicted or conspired against them, even when they had kingly power, as at Mitylene Megacles, joining with his friends, killed the Penthelidee, who used to go about striking those they met with clubs. Thus, in later times, Smendes killed Penthilus for whipping him and dragging him away from his wife. Decamnichus also was the chief cause of the conspiracy against Archelaus, for he urged others on: the occasion of his resentment was his having delivered him to Euripides the poet to be scourged; for Euripides was greatly offended with him for having said something of the foulness of his breath. And many others have been killed or conspired against on the same account. Fear too is a cause which produces the same effects, as well in monarchies as in other states: thus Artabanes conspired against Xerxes through fear of punishment for having hanged Darius according to his orders, whom he supposed he intended to pardon, as the order was given at supper-time. Some kings also have been dethroned and killed in consequence of the contempt they were held in by the people; as some one conspired against Sardanapalus, having seen him spinning with his wife, if what is related of him is true, or if not of him, it may very probably be true of some one else. Dion also conspired against Dionysius the Younger, seeing his subjects desirous of a conspiracy, and that he himself was always drunk: and even a man's friends will do this if they despise him; for from the confidence he places in them, they think that they shall not be found out. Those also who think they shall gain his throne will conspire against a king through contempt; for as they are powerful themselves, and despise the danger, on account of their own strength, they will readily attempt it. Thus a general at the head of his army will endeavour to dethrone the monarch, as Cyrus did Astyages, despising both his manner of life and his forces; his forces for want of action, his life for its effeminacy: thus Suthes, the Thracian, who was general to Amadocus, conspired against him. Sometimes more than one of these causes will excite men to enter into conspiracies, as contempt and desire of gain; as in the instance of Mithridates against Ariobarzanes. Those also who are of a bold disposition, and have gained military honours amongst kings, will of all others be most like to engage in sedition; for strength and courage united inspire great bravery: whenever, therefore, these join in one person, he will be very ready for conspiracies, as he will easily conquer. Those who conspire against a tyrant through love of glory and honour have a different motive in view from what I have already mentioned; for, like all others who embrace danger, they have only glory and honour in view, and think, not as some do, of the wealth and pomp they may acquire, but engage in this as they would in any other noble action, that they may be illustrious and distinguished, and destroy a tyrant, not to succeed in his tyranny, but to acquire renown. No doubt but the number of those who act upon this principle is small, for we must suppose they regard their own safety as nothing in case they should not succeed, and must embrace the opinion of Dion (which few can do) when he made war upon Dionysius with a very few troops; for he said, that let the advantage he made be ever so little it would satisfy him to have gained it; and that, should it be his lot to die the moment he had gained footing in his country, he should think his death sufficiently glorious. A tyranny also is exposed to the same destruction as all other states are, from too powerful neighbours: for it is evident, that an opposition of principles will make them desirous of subverting it; and what they desire, all who can, do: and there is a principle of opposition in one state to another, as a democracy against a tyranny, as says Hesiod, "a potter against a potter;" for the extreme of a democracy is a tyranny; a kingly power against an aristocracy, from their different forms of government—for which reason the Lacedaemonians destroyed many tyrannies; as did the Syracusians during the prosperity of their state. Nor are they only destroyed from without, but also from within, when those who have no share in the power bring about a revolution, as happened to Gelon, and lately to Dionysius; to the first, by means of Thrasybulus, the brother of Hiero, who nattered Gelon's son, and induced him to lead a life of pleasure, that he himself might govern; but the family joined together and endeavoured to support the tyranny and expel Thrasybulus; but those whom they made of their party seized the opportunity and expelled the whole family. Dion made war against his relation Dionysius, and being assisted by the people, first expelled and then killed him. As there are two causes which chiefly induce men to conspire against tyrants, hatred and contempt, one of these, namely hatred, seems inseparable from them. Contempt also is often the cause of their destruction: for though, for instance, those who raised themselves to the supreme power generally preserved it; but those who received it from them have, to speak truth, almost immediately all of them lost it; for, falling into an effeminate way of life, they soon grew despicable, and generally fell victims to conspiracies. Part of their hatred may be very fitly ascribed to anger; for in some cases this is their motive to action: for it is often a cause which impels them to act more powerfully than hatred, and they proceed with greater obstinacy against those whom they attack, as this passion is not under the direction of reason. Many persons also indulge this passion through contempt; which occasioned the fall of the Pisistratidae and many others. But hatred is more powerful than anger; for anger is accompanied with grief, which prevents the entrance of reason; but hatred is free from it. In short, whatever causes may be assigned as the destruction of a pure oligarchy unmixed with any other government and an extreme democracy, the same may be applied to a tyranny; for these are divided tyrannies.
Kingdoms are seldom destroyed by any outward attack; for which reason they are generally very stable; but they have many causes of subversion within; of which two are the principal; one is when those who are in power excite a sedition, the other when they endeavour to establish a tyranny by assuming greater power than the law gives them. A kingdom, indeed, is not what we ever see erected in our times, but rather monarchies and tyrannies; for a kingly government is one that is voluntarily submitted to, and its supreme power admitted upon great occasions: but where many are equal, and there are none in any respect so much better than another as to be qualified for the greatness and dignity of government over them, then these equals will not willingly submit to be commanded; but if any one assumes the government, either by force or fraud, this is a tyranny. To what we have already said we shall add, the causes of revolutions in an hereditary kingdom. One of these is, that many of those who enjoy it are naturally proper objects of contempt only: another is, that they are insolent while their power is not despotic; but they possess kingly honours only. Such a state is soon destroyed; for a king exists but while the people are willing to obey, as their submission to him is voluntary, but to a tyrant involuntary. These and such-like are the causes of the destruction of monarchies.
Monarchies, in a word, are preserved by means contrary to what I have already mentioned as the cause of their destruction; but to speak to each separately: the stability of a kingdom will depend upon the power of the king's being kept within moderate bounds; for by how much the less extensive his power is, by so much the longer will his government continue; for he will be less despotic and more upon an equality of condition with those he governs; who, on that account, will envy him the less.
It was on this account that the kingdom of the Molossi continued so long; and the Lacedaemonians from their government's being from the beginning divided into two parts, and also by the moderation introduced into the other parts of it by Theopompus, and his establishment of the ephori; for by taking something from the power he increased the duration of the kingdom, so that in some measure he made it not less, but bigger; as they say he replied to his wife, who asked him if he was not ashamed to deliver down his kingdom to his children reduced from what he received it from his ancestors? No, says he, I give it him more lasting. Tyrannies are preserved two ways most opposite to each other, one of which is when the power is delegated from one to the other, and in this manner many tyrants govern in their states. Report says that Periander founded many of these. There are also many of them to be met with amongst the Persians. What has been already mentioned is as conducive as anything can be to preserve a tyranny; namely, to keep down those who are of an aspiring disposition, to take off those who will not submit, to allow no public meals, no clubs, no education, nothing at all, but to guard against everything that gives rise to high spirits or mutual confidence; nor to suffer the learned meetings of those who are at leisure to hold conversation with each other; and to endeavour by every means possible to keep all the people strangers to each other; for knowledge increases mutual confidence; and to oblige all strangers to appear in public, and to live near the city-gate, that all their actions may be sufficiently seen; for those who are kept like slaves seldom entertain any noble thoughts: in short, to imitate everything which the Persians and barbarians do, for they all contribute to support slavery; and to endeavour to know what every one who is under their power does and says; and for this purpose to employ spies: such were those women whom the Syracusians called potagogides Hiero also used to send out listeners wherever there was any meeting or conversation; for the people dare not speak with freedom for fear of such persons; and if any one does, there is the less chance of its being concealed; and to endeavour that the whole community should mutually accuse and come to blows with each other, friend with friend, the commons with the nobles, and the rich with each other. It is also advantageous for a tyranny that all those who are under it should be oppressed with poverty, that they may not be able to compose a guard; and that, being employed in procuring their daily bread, they may have no leisure to conspire against their tyrants. The Pyramids of Egypt are a proof of this, and the votive edifices of the Cyposelidse, and the temple of Jupiter Olympus, built by the Pisistratidae, and the works of Polycrates at Samos; for all these produced one end, the keeping the people poor. It is necessary also to multiply taxes, as at Syracuse; where Dionysius in the space of five years collected all the private property of his subjects into his own coffers. A tyrant also should endeavour to engage his subjects in a war, that they may have employment and continually depend upon their general. A king is preserved by his friends, but a tyrant is of all persons the man who can place no confidence in friends, as every one has it in his desire and these chiefly in their power to destroy him. All these things also which are done in an extreme democracy should be done in a tyranny, as permitting great licentiousness to the women in the house, that they may reveal their husbands' secrets; and showing great indulgence to slaves also for the same reason; for slaves and women conspire not against tyrants: but when they are treated with kindness, both of them are abettors of tyrants, and extreme democracies also; and the people too in such a state desire to be despotic. For which reason flatterers are in repute in both these: the demagogue in the democracy, for he is the proper flatterer of the people; among tyrants, he who will servilely adapt himself to their humours; for this is the business of flatterers. And for this reason tyrants always love the worst of wretches, for they rejoice in being flattered, which no man of a liberal spirit will submit to; for they love the virtuous, but flatter none. Bad men too are fit for bad purposes; "like to like," as the proverb says. A tyrant also should show no favour to a man of worth or a freeman; for he should think, that no one deserved to be thought these but himself; for he who supports his dignity, and is a friend to freedom, encroaches upon the superiority and the despotism of the tyrant: such men, therefore, they naturally hate, as destructive to their government. A tyrant also should rather admit strangers to his table and familiarity than citizens, as these are his enemies, but the others have no design against him. These and such-like are the supports of a tyranny, for it comprehends whatsoever is wicked. But all these things may be comprehended in three divisions, for there are three objects which a tyranny has in view; one of which is, that the citizens should be of poor abject dispositions; for such men never propose to conspire against any one. The second is, that they should have no confidence in each other; for while they have not this, the tyrant is safe enough from destruction. For which reason they are always at enmity with those of merit, as hurtful to their government; not only as they scorn to be governed despotically, but also because they can rely upon each other's fidelity, and others can rely upon theirs, and because they will not inform against their associates, nor any one else. The third is, that they shall be totally without the means of doing anything; for no one undertakes what is impossible for him to perform: so that without power a tyranny can never be destroyed. These, then, are the three objects which the inclinations of tyrants desire to see accomplished; for all their tyrannical plans tend to promote one of these three ends, that their people may neither have mutual confidence, power, nor spirit. This, then, is one of the two methods of preserving tyrannies: the other proceeds in a way quite contrary to what has been already described, and which may be discerned from considering to what the destruction of a kingdom is owing; for as one cause of that is, making the government approach near to a tyranny, so the safety of a tyranny consists in making the government nearly kingly; preserving only one thing, namely power, that not only the willing, but the unwilling also, must be obliged to submit; for if this is once lost, the tyranny is at an end. This, then, as the foundation, must be preserved: in other particulars carefully do and affect to seem like a king; first, appear to pay a great attention to what belongs to the public; nor make such profuse presents as will offend the people; while they are to supply the money out of the hard labour of their own hands, and see it given in profusion to mistresses, foreigners, and fiddlers; keeping an exact account both of what you receive and pay; which is a practice some tyrants do actually follow, by which means they seem rather fathers of families than tyrants: nor need you ever fear the want of money while you have the supreme power of the state in your own hands. It is also much better for those tyrants who quit their kingdom to do this than to leave behind them money they have hoarded up; for their regents will be much less desirous of making innovations, and they are more to be dreaded by absent tyrants than the citizens; for such of them as he suspects he takes with him, but these regents must be left behind. He should also endeavour to appear to collect such taxes and require such services as the exigencies of the state demand, that whenever they are wanted they may be ready in time of war; and particularly to take care that he appear to collect and keep them not as his own property, but the public's. His appearance also should not be severe, but respectable, so that he should inspire those who approach him with veneration and not fear; but this will not be easily accomplished if he is despised. If, therefore, he will not take the pains to acquire any other, he ought to endeavour to be a man of political abilities, and to fix that opinion of himself in the judgment of his subjects. He should also take care not to appear to be guilty of the least offence against modesty, nor to suffer it in those under him: nor to permit the women of his family to treat others haughtily; for the haughtiness of women has been the ruin of many tyrants. With respect to the pleasures of sense, he ought to do directly contrary to the practice of some tyrants at present; for they do not only continually indulge themselves in them for many days together, but they seem also to desire to have other witnesses of it, that they may wonder at their happiness; whereas he ought really to be moderate in these, and, if not, to appear to others to avoid them-for it is not the sober man who is exposed either to plots or contempt, but the drunkard; not the early riser, but the sluggard. His conduct in general should also be contrary to what is reported of former tyrants; for he ought to improve and adorn his city, so as to seem a guardian and not a tyrant; and, moreover., always to seem particularly attentive to the worship of the gods; for from persons of such a character men entertain less fears of suffering anything illegal while they suppose that he who governs them is religious and reverences the gods; and they will be less inclined to raise insinuations against such a one, as being peculiarly under their protection: but this must be so done as to give no occasion for any suspicion of hypocrisy. He should also take care to show such respect to men of merit in every particular, that they should not think they could be treated with greater distinction by their fellow-citizens in a free state. He should also let all honours flow immediately from himself, but every censure from his subordinate officers and judges. It is also a common protection of all monarchies not to make one person too great, or, certainly, not many; for they will support each other: but, if it is necessary to entrust any large powers to one person, to take care that it is not one of an ardent spirit; for this disposition is upon every opportunity most ready for a revolution: and, if it should seem necessary to deprive any one of his power, to do it by degrees, and not reduce him all at once. It is also necessary to abstain from all kinds of insolence; more particularly from corporal punishment; which you must be most cautious never to exercise over those who have a delicate sense of honour; for, as those who love money are touched to the quick when anything affects their property, so are men of honour and principle when they receive any disgrace: therefore, either never employ personal punishment, or, if you do, let it be only in the manner in which a father would correct his son, and not with contempt; and, upon the whole, make amends for any seeming disgrace by bestowing greater honours. But of all persons who are most likely to entertain designs against the person of a tyrant, those are chiefly to be feared and guarded against who regard as nothing the loss of their own lives, so that they can but accomplish their purpose: be very careful therefore of those who either think themselves affronted, or those who are dear to them; for those who are excited by anger to revenge regard as nothing their own persons: for, as Heraclitus says, it is dangerous to fight with an angry man who will purchase with his life the thing he aims at. As all cities are composed of two sorts of persons, the rich and the poor, it is necessary that both these should find equal protection from him who governs them, and that the one party should not have it in their power to injure the other; but that the tyrant should attach to himself that party which is the most powerful; which, if he does, he will have no occasion either to make his slaves free, or to deprive citizens of their arms; for the strength of either of the parties added to his own forces will render him superior to any conspiracy. It would be superfluous to go through all particulars; for the rule of conduct which the tyrant ought to pursue is evident enough, and that is, to affect to appear not the tyrant, but the king; the guardian of those he governs, not their plunderer, but their protector, and to affect the middle rank in life, not one superior to all others: he should, therefore, associate his nobles with him and soothe his people; for his government will not only be necessarily more honourable and worthy of imitation, as it will be over men of worth, and not abject wretches who perpetually both hate and fear him; but it will be also more durable. Let him also frame his life so that his manners may be consentaneous to virtue, or at least let half of them be so, that he may not be altogether wicked, but only so in part.
Indeed an oligarchy and a tyranny are of all governments of the shortest duration. The tyranny of Orthagoras and his family at Sicyon, it is true, continued longer than any other: the reason for which was, that they used their power with moderation, and were in many particulars obedient to the laws; and, as Clisthenes was an able general, he never fell into contempt, and by the care he took that in many particulars his government should be popular. He is reported also to have presented a person with a crown who adjudged the victory to another; and some say that it is the statue of that judge which is placed in the forum.
They say also, that Pisistratus submitted to be summoned into the court of the Areopagites. The second that we shall mention is the tyranny of the Cypselidse, at Corinth, which continued seventy-seven years and six months; for Cypselus was tyrant there thirty years, Periander forty-four, and Psammetichus, the son of Georgias, three years; the reason for which was, that Cypselus was a popular man, and governed without guards. Periander indeed ruled like a tyrant, but then he was an able general. The third was that of the Pisistradidae at Athens; but it was not continual: for Pisistratus himself was twice expelled; so that out of thirty-three years he was only fifteen in power, and his son eighteen; so that the whole time was thirty-three years. Of the rest we shall mention that of Hiero, and Gelo at Syracuse; and this did not continue long, for both their reigns were only eighteen years; for Gelo died in the eighth year of his tyranny, and Hiero in his tenth. Thrasybulus fell in his eleventh month, and many other tyrannies have continued a very short time. We have now gone through the general cases of corruption and means of preservation both in free states and monarchies. In Plato's Republic, Socrates is introduced treating upon the changes which different governments are liable to: but his discourse is faulty; for he does not particularly mention what changes the best and first governments are liable to; for he only assigns the general cause, of nothing being immutable, but that in time everything will alter he conceives that nature will then produce bad men, who will not submit to education, and in this, probably, he is not wrong; for it is certain that there are some persons whom it is impossible by any education to make good men; but why should this change be more peculiar to what he calls the best-formed government, than to all other forms, and indeed to all other things that exist? and in respect to his assigned time, as the cause of the alteration of all things, we find that those which did not begin to exist at the same time cease to be at the same time; so that, if anything came into beginning the day before the solstice, it must alter at the same time. Besides, why should such a form of government be changed into the Lacedaemonian? for, in general, when governments alter, they alter into the contrary species to what they before were, and not into one like their former. And this reasoning holds true of other changes; for he says, that from the Lacedaemonian form it changes into an oligarchy, and from thence into a democracy, and from a democracy into a tyranny: and sometimes a contrary change takes place, as from a democracy into an oligarchy, rather than into a monarchy. With respect to a tyranny he neither says whether there will be any change in it; or if not, to what cause it will be owing; or if there is, into what other state it will alter: but the reason of this is, that a tyranny is an indeterminate government; and, according to him, every state ought to alter into the first, and most perfect, thus the continuity and circle would be preserved. But one tyranny often changed into another; as at Syria, from Myron's to Clisthenes'; or into an oligarchy, as was Antileo's at Chalcas; or into a democracy, as was Gelo's at Syracuse; or into an aristocracy, as was Charilaus's at Lacedaemon, and at Carthage. An oligarchy is also changed into a tyranny; such was the rise of most of the ancient tyrannies in Sicily; at Leontini, into the tyranny of Panaetius; at Gela, into that of Cleander; at Rhegium into that of Anaxilaus; and the like in many other cities. It is absurd also to suppose, that a state is changed into an oligarchy because those who are in power are avaricious and greedy of money, and not because those who are by far richer than their fellow citizens think it unfair that those who have nothing should have an equal share in the rule of the state with themselves, who possess so much-for in many oligarchies it is not allowable to be employed in money-getting, and there are many laws to prevent it. But in Carthage, which is a democracy, money-getting is creditable, and yet their form of government remains unaltered. It is also absurd to say, that in an oligarchy there are two cities, one of the poor and another of the rich; for why should this happen to them more than to the Lacedaemonians, or any other state where all possess not equal property, or where all are not equally good? for though no one member of the community should be poorer than he was before, yet a democracy might nevertheless change into an oligarchy; if the rich should be more powerful than the poor, and the one too negligent, and the other attentive: and though these changes are owing to many causes, yet he mentions but one only, that the citizens become poor by luxury, and paying interest-money; as if at first they were all rich, or the greater part of them: but this is not so, but when some of those who have the principal management of public affairs lose their fortunes, they will endeavour to bring about a revolution; but when others do, nothing of consequence will follow, nor when such states do alter is there any more reason for their altering into a democracy than any other. Besides, though some of the members of the community may not have spent their fortunes, yet if they share not in the honours of the state, or if they are ill-used and insulted, they will endeavour to raise seditions, and bring about a revolution, that they may be allowed to do as they like; which, Plato says, arises from too much liberty. Although there are many oligarchies and democracies, yet Socrates, when he is treating of the changes they may undergo, speaks of them as if there was but one of each sort.
---
!!![[CHAPTER I|ELLIS: BOOK VI: CHAPTER I]]
{{ELLIS: BOOK VI: CHAPTER I}}
---
!!![[CHAPTER II|ELLIS: BOOK VI: CHAPTER II]]
{{ELLIS: BOOK VI: CHAPTER II}}
---
!!![[CHAPTER III|ELLIS: BOOK VI: CHAPTER III]]
{{ELLIS: BOOK VI: CHAPTER III}}
---
!!![[CHAPTER IV|ELLIS: BOOK VI: CHAPTER IV]]
{{ELLIS: BOOK VI: CHAPTER IV}}
---
!!![[CHAPTER V|ELLIS: BOOK VI: CHAPTER V]]
{{ELLIS: BOOK VI: CHAPTER V}}
---
!!![[CHAPTER VI|ELLIS: BOOK VI: CHAPTER VI]]
{{ELLIS: BOOK VI: CHAPTER VI}}
---
!!![[CHAPTER VII|ELLIS: BOOK VI: CHAPTER VII]]
{{ELLIS: BOOK VI: CHAPTER VII}}
---
!!![[CHAPTER VIII|ELLIS: BOOK VI: CHAPTER VIII]]
{{ELLIS: BOOK VI: CHAPTER VIII}}
We have already shown what is the nature of the supreme council in the state, and wherein one may differ from another, and how the different magistrates should be regulated; and also the judicial department, and what is best suited to what state; and also to what causes both the destruction and preservation of governments are owing.
As there are very many species of democracies, as well as of other states, it will not be amiss to consider at the same time anything which we may have omitted to mention concerning either of them, and to allot to each that mode of conduct which is peculiar to and advantageous for them; and also to inquire into the combinations of all these different modes of government which we have mentioned; for as these are blended together the government is altered, as from an aristocracy to be an oligarchy, and from a free state to be a democracy. Now, I mean by those combinations of government (which I ought to examine into, but have not yet done), namely, whether the deliberative department and the election of magistrates is regulated in a manner correspondent to an oligarchy, or the judicial to an aristocracy, or the deliberative part only to an oligarchy, and the election of magistrates to an aristocracy, or whether, in any other manner, everything is not regulated according to the nature of the government. But we will first consider what particular sort of democracy is fitted to a particular city, and also what particular oligarchy to a particular people; and of other states, what is advantageous to what. It is also necessary to show clearly, not only which of these governments is best for a state, but also how it ought to be established there, and other things we will treat of briefly.
And first, we will speak of a democracy; and this will at the same time show clearly the nature of its opposite which some persons call an oligarchy; and in doing this we must examine into all the parts of a democracy, and everything that is connected therewith; for from the manner in which these are compounded together different species of democracies arise: and hence it is that they are more than one, and of various natures. Now, there are two causes which occasion there being so many democracies; one of which is that which we have already mentioned; namely, there being different sorts of people; for in one country the majority are husbandmen, in another mechanics, and hired servants; if the first of these is added to the second, and the third to both of them, the democracy will not only differ in the particular of better or worse, but in this, that it will be no longer the same government; the other is that which we will now speak of. The different things which are connected with democracies and seem to make part of these states, do, from their being joined to them, render them different from others: this attending a few, that more, and another all. It is necessary that he who would found any state which he may happen to approve of, or correct one, should be acquainted with all these particulars. All founders of states endeavour to comprehend within their own plan everything of nearly the same kind with it; but in doing this they err, in the manner I have already described in treating of the preservation and destruction of governments. I will now speak of these first principles and manners, and whatever else a democratical state requires.
Now the foundation of a democratical state is liberty, and people have been accustomed to say this as if here only liberty was to be found; for they affirm that this is the end proposed by every democracy. But one part of liberty is to govern and be governed alternately; for, according to democratical justice, equality is measured by numbers, and not by worth: and this being just, it is necessary that the supreme power should be vested in the people at large; and that what the majority determine should be final: so that in a democracy the poor ought to have more power than the rich, as being the greater number; for this is one mark of liberty which all framers of a democracy lay down as a criterion of that state; another is, to live as every one likes; for this, they say, is a right which liberty gives, since he is a slave who must live as he likes not. This, then, is another criterion of a democracy. Hence arises the claim to be under no command whatsoever to any one, upon any account, any otherwise than by rotation, and that just as far only as that person is, in his turn, under his also. This also is conducive to that equality which liberty demands. These things being premised, and such being the government, it follows that such rules as the following should be observed in it, that all the magistrates should be chosen out of all the people, and all to command each, and each in his turn all: that all the magistrates should be chosen by lot, except to those offices only which required some particular knowledge and skill: that no census, or a very small one, should be required to qualify a man for any office: that none should be in the same employment twice, or very few, and very seldom, except in the army: that all their appointments should be limited to a very short time, or at least as many as possible: that the whole community should be qualified to judge in all causes whatsoever, let the object be ever so extensive, ever so interesting, or of ever so high a nature; as at Athens, where the people at large judge the magistrates when they come out of office, and decide concerning public affairs as well as private contracts: that the supreme power should be in the public assembly; and that no magistrate should be allowed any discretionary power but in a few instances, and of no consequence to public business. Of all magistrates a senate is best suited to a democracy, where the whole community is not paid for giving their attendance; for in that case it loses its power; for then the people will bring all causes before them, by appeal, as we have already mentioned in a former book. In the next place, there should, if possible, be a fund to pay all the citizens—who have any share in the management of public affairs, either as members of the assembly, judges, and magistrates; but if this cannot be done, at least the magistrates, the judges the senators, and members of the supreme assembly, and also those officers who are obliged to eat at a common table ought to be paid. Moreover, as an oligarchy is said to be a government of men of family, fortune, and education; so, on the contrary, a democracy is a government in the hands of men of no birth, indigent circumstances, and mechanical employments. In this state also no office should be for life; and, if any such should remain after the government has been long changed into a democracy, they should endeavour by degrees to diminish the power; and also elect by lot instead of vote. These things, then, appertain to all democracies; namely, to be established on that principle of justice which is homogeneous to those governments; that is, that all the members of the state, by number, should enjoy an equality, which seems chiefly to constitute a democracy, or government of the people: for it seems perfectly equal that the rich should have no more share in the government than the poor, nor be alone in power; but that all should be equal, according to number; for thus, they think, the equality and liberty of the state best preserved.
In the next place we must inquire how this equality is to be procured. Shall the qualifications be divided so that five hundred rich should be equal to a thousand poor, or shall the thousand have equal power with the five hundred? or shall we not establish our equality in this manner? but divide indeed thus, and afterwards taking an equal number both out of the five hundred and the thousand, invest them with the power of creating the magistrates and judges. Is this state then established according to perfect democratical justice, or rather that which is guided by numbers only? For the defenders of a democracy say, that that is just which the majority approve of: but the favourers of an oligarchy say, that that is just which those who have most approve of; and that we ought to be directed by the value of property. Both the propositions are unjust; for if we agree with what the few propose we erect a tyranny: for if it should happen that an individual should have more than the rest who are rich, according to oligarchical justice, this man alone has a right to the supreme power; but if superiority of numbers is to prevail, injustice will then be done by confiscating the property of the rich, who are few, as we have already said. What then that equality is, which both parties will admit, must be collected from the definition of right which is common to them both; for they both say that what the majority of the state approves of ought to be established. Be it so; but not entirely: but since a city happens to be made up of two different ranks of people, the rich and the poor, let that be established which is approved of by both these, or the greater part: but should there be opposite sentiments, let that be established which shall be approved of by the greater part: but let this be according to the census; for instance, if there should be ten of the rich and twenty of the poor, and six of the first and fifteen of the last should agree upon any measure, and the remaining four of the rich should join with the remaining five of the poor in opposing it, that party whose census when added together should determine which opinion should be law, and should these happen to be equal, it should be regarded as a case similar to an assembly or court of justice dividing equally upon any question that comes before them, who either determine it by lot or some such method. But although, with respect to what is equal and just, it may be very difficult to establish the truth, yet it is much easier to do than to persuade those who have it in their power to encroach upon others to be guided thereby; for the weak always desire what is equal and just, but the powerful pay no regard thereunto.
There are four kinds of democracies. The best is that which is composed of those first in order, as we have already said, and this also is the most ancient of any. I call that the first which every one would place so, was he to divide the people; for the best part of these are the husbandmen. We see, then, that a democracy may be framed where the majority live by tillage or pasturage; for, as their property is but small, they will not be at leisure perpetually to hold public assemblies, but will be continually employed in following their own business, not having otherwise the means of living; nor will they be desirous of what another enjoys, but will rather like to follow their own business than meddle with state affairs and accept the offices of government, which will be attended with no great profit; for the major part of mankind are rather desirous of riches than honour (a proof of this is, that they submitted to the tyrannies in ancient times, and do now submit to the oligarchies, if no one hinders them in their usual occupations, or deprives them of their property; for some of them soon get rich, others are removed from poverty); besides, their having the right of election and calling their magistrates to account for their conduct when they come out of office, will satisfy their desire of honours, if any of them entertain that passion: for in some states, though the commonalty have not the right of electing the magistrates, yet it is vested in part of that body chosen to represent them: and it is sufficient for the people at large to possess the deliberative power: and this ought to be considered as a species of democracy; such was that formerly at Mantinsea: for which reason it is proper for the democracy we have been now treating of to have a power (and it has been usual for them to have it) of censuring their magistrates when out of office, and sitting in judgment upon all causes: but that the chief magistrates should be elected, and according to a certain census, which should vary with the rank of their office, or else not by a census, but according to their abilities for their respective appointments. A state thus constituted must be well constituted; for the magistracies will be always filled with the best men with the approbation of the people; who will not envy their superiors: and these and the nobles should be content with this part in the administration; for they will not be governed by their inferiors. They will be also careful to use their power with moderation, as there are others to whom full power is delegated to censure their conduct; for it is very serviceable to the state to have them dependent upon others, and not to be permitted to do whatsoever they choose; for with such a liberty there would be no check to that evil particle there is in every one: therefore it is necessary and most for the benefit of the state that the offices thereof should be filled by the principal persons in it, whose characters are unblemished, and that the people are not oppressed. It is now evident that this is the best species of democracy, and on what account; because the people are such and have such powers as they ought to have. To establish a democracy of husbandmen some of those laws which were observed in many ancient states are universally useful; as, for instance, on no account to permit any one to possess more than a certain quantity of land, or within a certain distance from the city. Formerly also, in some states, no one was allowed to sell their original lot of land. They also mention a law of one Oxylus, which forbade any one to add to their patrimony by usury. We ought also to follow the law of the Aphutaeans, as useful to direct us in this particular we are now speaking of; for they having but very little ground, while they were a numerous people, and at the same time were all husbandmen, did not include all their lands within the census, but divided them in such a manner that, according to the census, the poor had more power than the rich. Next to the commonalty of husbandmen is one of shepherds and herdsmen; for they have many things in common with them, and, by their way of life, are excellently qualified to make good soldiers, stout in body, and able to continue in the open air all night. The generality of the people of whom other democracies are composed are much worse than these; for their lives are wretched nor have they any business with virtue in anything they do; these are your mechanics, your exchange-men, and hired servants; as all these sorts of men frequent the exchange and the citadel, they can readily attend the public assembly; whereas the husbandmen, being more dispersed in the country, cannot so easily meet together; nor are they equally desirous of doing it with these others! When a country happens to be so situated that a great part of the land lies at a distance from the city, there it is easy to establish a good democracy or a free state for the people in general will be obliged to live in the country; so that it will be necessary in such a democracy, though there may be an exchange-mob at hand, never to allow a legal assembly without the inhabitants of the country attend. We have shown in what manner the first and best democracy ought to be established, and it will be equally evident as to the rest, for from these we should proceed as a guide, and always separate the meanest of the people from the rest. But the last and worst, which gives to every citizen without distinction a share in every part of the administration, is what few citizens can bear, nor is it easy to preserve for any long time, unless well supported by laws and manners. We have already noticed almost every cause that can destroy either this or any other state. Those who have taken the lead in such a democracy have endeavoured to support it, and make the people powerful by collecting together as many persons as they could and giving them their freedom, not only legitimately but naturally born, and also if either of their parents were citizens, that is to say, if either their father or mother; and this method is better suited to this state than any other: and thus the demagogues have usually managed. They ought, however, to take care, and do this no longer than the common people are superior to the nobles and those of the middle rank, and then stop; for, if they proceed still further, they will make the state disorderly, and the nobles will ill brook the power of the common people, and be full of resentment against it; which was the cause of an insurrection at Cyrene: for a little evil is overlooked, but when it becomes a great one it strikes the eye. It is, moreover, very-useful in such a state to do as Clisthenes did at Athens, when he was desirous of increasing the power of the people, and as those did who established the democracy in Cyrene; that is, to institute many tribes and fraternities, and to make the religious rites of private persons few, and those common; and every means is to be contrived to associate and blend the people together as much as possible; and that all former customs be broken through. Moreover, whatsoever is practised in a tyranny seems adapted to a democracy of this species; as, for instance, the licentiousness of the slaves, the women, and the children; for this to a certain degree is useful in such a state; and also to overlook every one's living as they choose; for many will support such a government: for it is more agreeable to many to live without any control than as prudence would direct.
It is also the business of the legislator and all those who would support a government of this sort not to make it too great a work, or too perfect; but to aim only to render it stable: for, let a state be constituted ever so badly, there is no difficulty in its continuing a few days: they should therefore endeavour to procure its safety by all those ways which we have described in assigning the causes of the preservation and destruction of governments; avoiding what is hurtful, and by framing such laws, written and unwritten, as contain those things which chiefly tend to the preservation of the state; nor to suppose that that is useful either for a democratic or an oligarchic form of government which contributes to make them more purely so, but what will contribute to their duration: but our demagogues at present, to flatter the people, occasion frequent confiscations in the courts; for which reason those who have the welfare of the state really at heart should act directly opposite to what they do, and enact a law to prevent forfeitures from being divided amongst the people or paid into the treasury, but to have them set apart for sacred uses: for those who are of a bad disposition would not then be the less cautious, as their punishment would be the same; and the community would not be so ready to condemn those whom they sat in judgment on when they were to get nothing by it: they should also take care that the causes which are brought before the public should be as few as possible, and punish with the utmost severity those who rashly brought an action against any one; for it is not the commons but the nobles who are generally prosecuted: for in all things the citizens of the same state ought to be affectionate to each other, at least not to treat those who have the chief power in it as their enemies. Now, as the democracies which have been lately established are very numerous, and it is difficult to get the common people to attend the public assemblies without they are paid for it, this, when there is not a sufficient public revenue, is fatal to the nobles; for the deficiencies therein must be necessarily made up by taxes, confiscations, and fines imposed by corrupt courts of justice: which things have already destroyed many democracies. Whenever, then, the revenues of the state are small, there should be but few public assemblies and but few courts of justice: these, however, should have very extensive jurisdictions, but should continue sitting a few days only, for by this means the rich would not fear the expense, although they should receive nothing for their attendance, though the poor did; and judgment also would be given much better; for the rich will not choose to be long absent from their own affairs, but will willingly be so for a short time: and, when there are sufficient revenues, a different conduct ought to be pursued from what the demagogues at present follow; for now they divide the surplus of the public money amongst the poor; these receive it and again want the same supply, while the giving it is like pouring water into a sieve: but the true patriot in a democracy ought to take care that the majority of the community are not too poor, for this is the cause of rapacity in that government; he therefore should endeavour that they may enjoy perpetual plenty; and as this also is advantageous to the rich, what can be saved out of the public money should be put by, and then divided at once amongst the poor, if possible, in such a quantity as may enable every one of them to purchase a little field, and, if that cannot be done, at least to give each of them enough to procure the implements of trade and husbandry; and if there is not enough for all to receive so much at once, then to divide it according to tribes or any other allotment. In the meantime let the rich pay them for necessary services, but not be obliged to find them in useless amusements. And something like this was the manner in which they managed at Carthage, and preserved the affections of the people; for by continually sending some of their community into colonies they procured plenty. It is also worthy of a sensible and generous nobility to divide the poor amongst them, and supplying them with what is necessary, induce them to work; or to imitate the conduct of the people at Tarentum: for they, permitting the poor to partake in common of everything which is needful for them, gain the affections of the commonalty. They have also two different ways of electing their magistrates; for some are chosen by vote, others by lot; by the last, that the people at large may have some share in the administration; by the former, that the state may be well governed: the same may be accomplished if of the same magistrates you choose some by vote, others by lot. And thus much for the manner in which democracies ought to be established.
What has been already said will almost of itself sufficiently show how an oligarchy ought to be founded; for he who would frame such a state should have in his view a democracy to oppose it; for every species of oligarchy should be founded on principles diametrically opposite to some species of democracy.
The first and best-framed oligarchy is that which approaches near to what we call a free state; in which there ought to be two different census, the one high, the other low: from those who are within the latter the ordinary officers of the state ought to be chosen; from the former the supreme magistrates: nor should any one be excluded from a part of the administration who was within the census; which should be so regulated that the commonalty who are included in it should by means thereof be superior to those who have no share in the government; for those who are to have the management of public affairs ought always to be chosen out of the better sort of the people. Much in the same manner ought that oligarchy to be established which is next in order: but as to that which is most opposite to a pure democracy, and approaches nearest to a dynasty and a tyranny, as it is of all others the worst, so it requires the greatest care and caution to preserve it: for as bodies of sound and healthy constitutions and ships which are well manned and well found for sailing can bear many injuries without perishing, while a diseased body or a leaky ship with an indifferent crew cannot support the least shock; so the worst-established governments want most looking after. A number of citizens is the preservation of a democracy; for these are opposed to those rights which are founded in rank: on the contrary, the preservation of an oligarchy depends upon the due regulation of the different orders in the society.
As the greater part of the community are divided into four sorts of people; husbandmen, mechanics, traders, and hired servants; and as those who are employed in war may likewise be divided into four; the horsemen, the heavy-armed soldier, the light-armed, and the sailor, where the nature of the country can admit a great number of horse; there a powerful oligarchy may be easily established: for the safety of the inhabitants depends upon a force of that sort; but those who can support the expense of horsemen must be persons of some considerable fortune. Where the troops are chiefly heavy-armed, there an oligarchy, inferior in power to the other, may be established; for the heavy-armed are rather made up of men of substance than the poor: but the light-armed and the sailors always contribute to support a democracy: but where the number of these is very great and a sedition arises, the other parts of the community fight at a disadvantage; but a remedy for this evil is to be learned from skilful generals, who always mix a proper number of light-armed soldiers with their horse and heavy-armed: for it is with those that the populace get the better of the men of fortune in an insurrection; for these being lighter are easily a match for the horse and the heavy-armed: so that for an oligarchy to form a body of troops from these is to form it against itself: but as a city is composed of persons of different ages, some young and some old, the fathers should teach their sons, while they were very young, a light and easy exercise; but, when they are grown up, they should be perfect in every warlike exercise. Now, the admission of the people to any share in the government should either be (as I said before) regulated by a census, or else, as at Thebes, allowed to those who for a certain time have ceased from any mechanic employment, or as at Massalia, where they are chosen according to their worth, whether citizens or foreigners. With respect to the magistrates of the highest rank which it may be necessary to have in a state, the services they are bound to do the public should be expressly laid down, to prevent the common people from being desirous of accepting their employments, and also to induce them to regard their magistrates with favour when they know what a price they pay for their honours. It is also necessary that the magistrates, upon entering into their offices, should make magnificent sacrifices and erect some public structure, that the people partaking of the entertainment, and seeing the city ornamented with votive gifts in their temples and public structures, may see with pleasure the stability of the government: add to this also, that the nobles will have their generosity recorded: but now this is not the conduct which those who are at present at the head of an oligarchy pursue, but the contrary; for they are not more desirous of honour than of gain; for which reason such oligarchies may more properly be called little democracies. Thus we have explained on what principles a democracy and an oligarchy ought to be established.
After what has been said I proceed next to treat particularly of the magistrates; of what nature they should be, how many, and for what purpose, as I have already mentioned: for without necessary magistrates no state can exist, nor without those which contribute to its dignity and good order can exist happily: now it is necessary that in small states the magistrates should be few; in a large one, many: also to know well what offices may be joined together, and what ought to be separated. The first thing necessary is to establish proper regulators in the markets; for which purpose a certain magistrate should be appointed to inspect their contracts and preserve good order; for of necessity, in almost every city there must be both buyers and sellers to supply each other's mutual wants: and this is what is most productive of the comforts of life; for the sake of which men seem to have joined together in one community. A second care, and nearly related to the first, is to have an eye both to the public and private edifices in the city, that they may be an ornament; and also to take care of all buildings which are likely to fall: and to see that the highways are kept in proper repair; and also that the landmarks between different estates are preserved, that there may be no disputes on that account; and all other business of the same nature. Now, this business may be divided into several branches, over each of which in populous cities they appoint a separate person; one to inspect the buildings, another the fountains, another the harbours; and they are called the inspectors of the city. A third, which is very like the last, and conversant nearly about the same objects, only in the country, is to take care of what is done out of the city. The officers who have this employment we call inspectors of the lands, or inspectors of the woods; but the business of all three of them is the same. There must also be other officers appointed to receive the public revenue and to deliver it out to those who are in the different departments of the state: these are called receivers or quaestors. There must also be another, before whom all private contracts and sentences of courts should be enrolled, as well as proceedings and declarations. Sometimes this employment is divided amongst many, but there is one supreme over the rest; these are called proctors, notaries, and the like. Next to these is an officer whose business is of all others the most necessary, and yet most difficult; namely, to take care that sentence is executed upon those who are condemned; and that every one pays the fines laid on him; and also to have the charge of those who are in prison. This office is very disagreeable on account of the odium attending it, so that no one will engage therein without it is made very profitable, or, if they do, will they be willing to execute it according to law; but it is most necessary, as it is of no service to pass judgment in any cause without that judgment is carried into execution: for without this human society could not subsist: for which reason it is best that this office should not be executed by one person, but by some of the magistrates of the other courts. In like manner, the taking care that those fines which are ordered by the judges are levied should be divided amongst different persons. And as different magistrates judge different causes, let the causes of the young be heard by the young: and as to those which are already brought to a hearing, let one person pass sentence, and another see it executed: as, for instance, let the magistrates who have the care of the public buildings execute the sentence which the inspectors of the markets have passed, and the like in other cases: for by so much the less odium attends those who carry the laws into execution, by so much the easier will they be properly put in force: therefore for the same persons to pass the sentence and to execute it will subject them to general hatred; and if they pass it upon all, they will be considered as the enemies of all. Thus one person has often the custody of the prisoner's body, while another sees the sentence against him executed, as the eleven did at Athens: for which reason it is prudent to separate these offices, and to give great attention thereunto as equally necessary with anything we have already mentioned; for it will certainly happen that men of character will decline accepting this office, and worthless persons cannot properly be entrusted with it, as having themselves rather an occasion for a guard than being qualified to guard others. This, therefore, ought by no means to be a separate office from others; nor should it be continually allotted to any individuals, but the young men; where there is a city-guard, the youths ought in turns to take these offices upon them. These, then, as the most necessary magistrates, ought to be first mentioned: next to these are others no less necessary, but of much higher rank, for they ought to be men of great skill and fidelity. These are they who have the guard of the city, and provide everything that is necessary for war; whose business it is, both in war and peace, to defend the walls and the gates, and to take care to muster and marshal the citizens. Over all these there are sometimes more officers, sometimes fewer: thus in little cities there is only one whom they call either general or polemarch; but where there are horse and light-armed troops, and bowmen, and sailors, they sometimes put distinct commanders over each of these; who again have others under them, according to their different divisions; all of which join together to make one military body: and thus much for this department. Since some of the magistrates, if not all, have business with the public money, it is necessary that there should be other officers, whose employment should be nothing else than to take an account of what they have, and correct any mismanagement therein. But besides all these magistrates there is one who is supreme over them all, who very often has in his own power the disposal of the public revenue and taxes; who presides over the people when the supreme power is in them; for there must be some magistrate who has a power to summon them together, and to preside as head of the state. These are sometimes called preadvisers; but where there are many, more properly a council. These are nearly the civil magistrates which are requisite to a government: but there are other persons whose business is confined to religion; as the priests, and those who are to take care of the temples, that they are kept in proper repair, or, if they fall down, that they may be rebuilt; and whatever else belongs to public worship. This charge is sometimes entrusted to one person, as in very small cities: in others it is delegated to many, and these distinct from the priesthood, as the builders or keepers of holy places, and officers of the sacred revenue. Next to these are those who are appointed to have the general care of all those public sacrifices to the tutelar god of the state, which the laws do not entrust to the priests: and these in different states have different appellations. To enumerate in few words the different departments of all those magistrates who are necessary: these are either religion, war, taxes, expenditures, markets, public buildings, harbours, highways. Belonging to the courts of justice there are scribes to enroll private contracts; and there must also be guards set over the prisoners, others to see the law is executed, council on either side, and also others to watch over the conduct of those who are to decide the causes. Amongst the magistrates also may finally be reckoned those who are to give their advice in public affairs. But separate states, who are peculiarly happy and have leisure to attend to more minute particulars, and are very attentive to good order, require particular magistrates for themselves; such as those who have the government of the women; who are to see the laws are executed; who take care of the boys and preside over their education. To these may be added those who have the care of their gymnastic exercises, their theatres, and every other public spectacle which there may happen to be. Some of these, however, are not of general use; as the governors of the women: for the poor are obliged to employ their wives and children in servile offices for want of slaves. As there are three magistrates to whom some states entrust the supreme power; namely, guardians of the laws, preadvisers, and senators; guardians of the laws suit best to an aristocracy, preadvisers to an oligarchy, and a senate to a democracy. And thus much briefly concerning all magistrates.
---
!!![[CHAPTER I|ELLIS: BOOK VII: CHAPTER I]]
{{ELLIS: BOOK VII: CHAPTER I}}
---
!!![[CHAPTER II|ELLIS: BOOK VII: CHAPTER II]]
{{ELLIS: BOOK VII: CHAPTER II}}
---
!!![[CHAPTER III|ELLIS: BOOK VII: CHAPTER III]]
{{ELLIS: BOOK VII: CHAPTER III}}
---
!!![[CHAPTER IV|ELLIS: BOOK VII: CHAPTER IV]]
{{ELLIS: BOOK VII: CHAPTER IV}}
---
!!![[CHAPTER V|ELLIS: BOOK VII: CHAPTER V]]
{{ELLIS: BOOK VII: CHAPTER V}}
---
!!![[CHAPTER VI|ELLIS: BOOK VII: CHAPTER VI]]
{{ELLIS: BOOK VII: CHAPTER VI}}
---
!!![[CHAPTER VII|ELLIS: BOOK VII: CHAPTER VII]]
{{ELLIS: BOOK VII: CHAPTER VII}}
---
!!![[CHAPTER VIII|ELLIS: BOOK VII: CHAPTER VIII]]
{{ELLIS: BOOK VII: CHAPTER VIII}}
---
!!![[CHAPTER IX|ELLIS: BOOK VII: CHAPTER IX]]
{{ELLIS: BOOK VII: CHAPTER IX}}
---
!!![[CHAPTER X|ELLIS: BOOK VII: CHAPTER X]]
{{ELLIS: BOOK VII: CHAPTER X}}
---
!!![[CHAPTER XI|ELLIS: BOOK VII: CHAPTER XI]]
{{ELLIS: BOOK VII: CHAPTER XI}}
---
!!![[CHAPTER XII|ELLIS: BOOK VII: CHAPTER XII]]
{{ELLIS: BOOK VII: CHAPTER XII}}
---
!!![[CHAPTER XIII|ELLIS: BOOK VII: CHAPTER XIII]]
{{ELLIS: BOOK VII: CHAPTER XIII}}
---
!!![[CHAPTER XIV|ELLIS: BOOK VII: CHAPTER XIV]]
{{ELLIS: BOOK VII: CHAPTER XIV}}
---
!!![[CHAPTER XV|ELLIS: BOOK VII: CHAPTER XV]]
{{ELLIS: BOOK VII: CHAPTER XV}}
---
!!![[CHAPTER XVI|ELLIS: BOOK VII: CHAPTER XVI]]
{{ELLIS: BOOK VII: CHAPTER XVI}}
---
!!![[CHAPTER XVII|ELLIS: BOOK VII: CHAPTER XVII]]
{{ELLIS: BOOK VII: CHAPTER XVII}}
He who proposes to make that inquiry which is necessary concerning what government is best, ought first to determine what manner of living is most eligible; for while this remains uncertain it will also be equally uncertain what government is best: for, provided no unexpected accidents interfere, it is highly probable, that those who enjoy the best government will live the most happily according to their circumstances; he ought, therefore, first to know what manner of life is most desirable for all; and afterwards whether this life is the same to the man and the citizen, or different. As I imagine that I have already sufficiently shown what sort of life is best in my popular discourses on that subject, I think I may very properly repeat the same here; as most certainly no one ever called in question the propriety of one of the divisions; namely, that as what is good, relative to man, may be divided into three sorts, what is external, what appertains to the body, and what to the soul, it is evident that all these must conspire to make a man happy: for no one would say that a man was happy who had no fortitude, no temperance, no justice, no prudence; but was afraid of the flies that flew round him: nor would abstain from the meanest theft if he was either hungry or dry, or would murder his dearest friend for a farthing; and also was in every particular as wanting in his understanding as an infant or an idiot. These truths are so evident that all must agree to them; though some may dispute about the quantity and the degree: for they may think, that a very little virtue is sufficient for happiness; but for riches, property, power, honour, and all such things, they endeavour to increase them without bounds: but to such we reply, that it is easy to prove from what experience teaches us in these cases, that these external goods produce not virtue, but virtue them. As to a happy life, whether it is to be found in pleasure or virtue or both, certain it is, that those whose morals are most pure, and whose understandings are best cultivated, will enjoy more of it, although their fortune is but moderate than those do who own an exuberance of wealth, are deficient in those; and this utility any one who reflects may easily convince himself of; for whatsoever is external has its boundary, as a machine, and whatsoever is useful in its excess is either necessarily hurtful, or at best useless to the possessor; but every good quality of the soul the higher it is in degree, so much the more useful it is, if it is permitted on this subject to use the word useful as well as noble. It is also very evident, that the accidents of each subject take place of each other, as the subjects themselves, of which we allow they are accidents, differ from each other in value; so that if the soul is more noble than any outward possession, as the body, both in itself and with respect to us, it must be admitted of course that the best accidents of each must follow the same analogy. Besides, it is for the sake of the soul that these things are desirable; and it is on this account that wise men should desire them, not the soul for them. Let us therefore be well assured, that every one enjoys as much happiness as he possesses virtue and wisdom, and acts according to their dictates; since for this we have the example of GOD Himself, <i>who is completely happy, not from any external good, but in Himself, and because such is His nature<i>. For good fortune is something different from happiness, as every good which depends not on the mind is owing to chance or fortune; but it is not from fortune that any one is wise and just: hence it follows, that that city is happiest which is the best and acts best: for no one can do well who acts not well; nor can the deeds either of man or city be praiseworthy without virtue and wisdom; for whatsoever is just, or wise, or prudent in a man, the same things are just, wise, and prudent in a city. </i></i>
Thus much by way of introduction; for I could not but just touch upon this subject, though I could not go through a complete investigation of it, as it properly belongs to another question: let us at present suppose so much, that a man's happiest life, both as an individual and as a citizen, is a life of virtue, accompanied with those enjoyments which virtue usually procures. If there are any who are not convinced by what I have said, their doubts shall be answered hereafter, at present we shall proceed according to our intended method.
It now remains for us to say whether the happiness of any individual man and the city is the same or different: but this also is evident; for whosoever supposes that riches will make a person happy, must place the happiness of the city in riches if it possesses them; those who prefer a life which enjoys a tyrannic power over others will also think, that the city which has many others under its command is most happy: thus also if any one approves a man for his virtue, he will think the most worthy city the happiest: but here there are two particulars which require consideration, one of which is, whether it is the most eligible life to be a member of the community and enjoy the rights of a citizen, or whether to live as a stranger, without interfering in public affairs; and also what form of government is to be preferred, and what disposition of the state is best; whether the whole community should be eligible to a share in the administration, or only the greater part, and some only: as this, therefore, is a subject of political examination and speculation, and not what concerns the individual, and the first of these is what we are at present engaged in, the one of these I am not obliged to speak to, the other is the proper business of my present design. It is evident that government must be the best which is so established, that every one therein may have it in his power to act virtuously and live happily: but some, who admit that a life of virtue is most eligible, still doubt which is preferable a public life of active virtue, or one entirely disengaged from what is without and spent in contemplation; which some say is the only one worthy of a philosopher; and one of these two different modes of life both now and formerly seem to have been chosen by all those who were the most virtuous men; I mean the public or philosophic. And yet it is of no little consequence on which side the truth lies; for a man of sense must naturally incline to the better choice; both as an individual and a citizen. Some think that a tyrannic government over those near us is the greatest injustice; but that a political one is not unjust: but that still is a restraint on the pleasures and tranquillity of life. Others hold the quite contrary opinion, and think that a public and active life is the only life for man: for that private persons have no opportunity of practising any one virtue, more than they have who are engaged in public life the management of the state. These are their sentiments; others say, that a tyrannical and despotical mode of government is the only happy one; for even amongst some free states the object of their laws seems to be to tyrannise over their neighbours: so that the generality of political institutions, wheresoever dispersed, if they have any one common object in view, have all of them this, to conquer and govern. It is evident, both from the laws of the Lacedaemonians and Cretans, as well as by the manner in which they educated their children, that all which they had in view was to make them soldiers: besides, among all nations, those who have power enough and reduce others to servitude are honoured on that account; as were the Scythians, Persians, Thracians, and Gauls: with some there are laws to heighten the virtue of courage; thus they tell us that at Carthage they allowed every person to wear as many rings for distinction as he had served campaigns. There was also a law in Macedonia, that a man who had not himself killed an enemy should be obliged to wear a halter; among the Scythians, at a festival, none were permitted to drink out of the cup was carried about who had not done the same thing. Among the Iberians, a warlike nation, they fixed as many columns upon a man's tomb as he had slain enemies: and among different nations different things of this sort prevail, some of them established by law, others by custom. Probably it may seem too absurd to those who are willing to take this subject into their consideration to inquire whether it is the business of a legislator to be able to point out by what means a state may govern and tyrannise over its neighbours, whether they will, or will not: for how can that belong either to the politician or legislator which is unlawful? for that cannot be lawful which is done not only justly, but unjustly also: for a conquest may be unjustly made. But we see nothing of this in the arts: for it is the business neither of the physician nor the pilot to use either persuasion or force, the one to his patients, the other to his passengers: and yet many seem to think a despotic government is a political one, and what they would not allow to be just or proper, if exercised over themselves, they will not blush to exercise over others; for they endeavour to be wisely governed themselves, but think it of no consequence whether others are so or not: but a despotic power is absurd, except only where nature has framed the one party for dominion, the other for subordination; and therefore no one ought to assume it over all in general, but those only which are the proper objects thereof: thus no one should hunt men either for food or sacrifice, but what is fit for those purposes, and these are wild animals which are eatable.
Now a city which is well governed might be very happy in itself while it enjoyed a good system of laws, although it should happen to be so situated as to have no connection with any other state, though its constitution should not be framed for war or conquest; for it would then have no occasion for these. It is evident therefore that the business of war is to be considered as commendable, not as a final end, but as the means of procuring it. It is the duty of a good legislator to examine carefully into his state; and the nature of the people, and how they may partake of every intercourse, of a good life, and of the happiness which results from it: and in this respect some laws and customs differ from others. It is also the duty of a legislator, if he has any neighbouring states to consider in what manner he shall oppose each of them, or what good offices he shall show them. But what should be the final end of the best governments will be considered hereafter.
We will now speak to those who, while they agree that a life of virtue is most eligible, yet differ in the use of it addressing ourselves to both these parties; for there are some who disapprove of all political governments, and think that the life of one who is really free is different from the life of a citizen, and of all others most eligible: others again think that the citizen is the best; and that it is impossible for him who does nothing to be well employed; but that virtuous activity and happiness are the same thing. Now both parties in some particulars say what is right, in others what is wrong, thus, that the life of a freeman is better than the life of a slave is true, for a slave, as a slave, is employed in nothing honourable; for the common servile employments which he is commanded to perform have nothing virtuous in them; but, on the other hand, it is not true that a submission to all sorts of governments is slavery; for the government of freemen differs not more from the government of slaves than slavery and freedom differ from each other in their nature; and how they do has been already mentioned. To prefer doing of nothing to virtuous activity is also wrong, for happiness consists in action, and many noble ends are produced by the actions of the just and wise. From what we have already determined on this subject, some one probably may think, that supreme power is of all things best, as that will enable a man to command very many useful services from others; so that he who can obtain this ought not to give it up to another, but rather to seize it: and, for this purpose, the father should have no attention or regard for the son, or the son for the father, or friend for friend; for what is best is most eligible: but to be a member of the community and be in felicity is best. What these persons advance might probably be true, if the supreme good was certainly theirs who plunder and use violence to others: but it is most unlikely that it should be so; for it is a mere supposition: for it does not follow that their actions are honourable who thus assume the supreme power over others, without they were by nature as superior to them as a man to a woman, a father to a child, a master to a slave: so that he who so far forsakes the paths of virtue can never return back from whence he departed from them: for amongst equals whatever is fair and just ought to be reciprocal; for this is equal and right; but that equals should not partake of what is equal, or like to like, is contrary to nature: but whatever is contrary to nature is not right; therefore, if there is any one superior to the rest of the community in virtue and abilities for active life, him it is proper to follow, him it is right to obey, but the one alone will not do, but must be joined to the other also: and, if we are right in what we have now said, it follows that happiness consists in virtuous activity, and that both with respect to the community as well as the individual an active life is the happiest: not that an active life must necessarily refer to other persons, as some think, or that those studies alone are practical which are pursued to teach others what to do; for those are much more so whose final object is in themselves, and to improve the judgment and understanding of the man; for virtuous activity has an end, therefore is something practical; nay, those who contrive the plan which others follow are more particularly said to act, and are superior to the workmen who execute their designs. But it is not necessary that states which choose to have no intercourse with others should remain inactive; for the several members thereof may have mutual intercourse with each other; for there are many opportunities for this among the different citizens; the same thing is true of every individual: for, was it otherwise, neither could the Deity nor the universe be perfect; to neither of whom can anything external separately exist. Hence it is evident that that very same life which is happy for each individual is happy also for the state and every member of it.
As I have now finished what was introductory to this subject, and considered at large the nature of other states, it now remains that I should first say what ought to be the establishment of a city which one should form according to one's wish; for no good state can exist without a moderate proportion of what is necessary. Many things therefore ought to be forethought of as desirable, but none of them such as are impossible: I mean relative to the number of citizens and the extent of the territory: for as other artificers, such as the weaver and the shipwright, ought to have such materials as are fit for their work, since so much the better they are, by so much superior will the work itself necessarily be; so also ought the legislator and politician endeavour to procure proper materials for the business they have in hand. Now the first and principal instrument of the politician is the number of the people; he should therefore know how many, and what they naturally ought to be: in like manner the country, how large, and what it is. Most persons think that it is necessary for a city to be large to be happy: but, should this be true, they cannot tell what is a large one and what a small one; for according to the multitude of the inhabitants they estimate the greatness of it; but they ought rather to consider its strength than its numbers; for a state has a certain object in view, and from the power which it has in itself of accomplishing it, its greatness ought to be estimated; as a person might say, that Hippocrates was a greater physician, though not a greater man, than one that exceeded him in the size of his body: but if it was proper to determine the strength of the city from the number of the inhabitants, it should never be collected from the multitude in general who may happen to be in it; for in a city there must necessarily be many slaves, sojourners, and foreigners; but from those who are really part of the city and properly constitute its members; a multitude of these is indeed a proof of a large city, but in a state where a large number of mechanics inhabit, and but few soldiers, such a state cannot be great; for the greatness of the city, and the number of men in it, are not the same thing. This too is evident from fact, that it is very difficult, if not impossible, to govern properly a very numerous body of men; for of all the states which appear well governed we find not one where the rights of a citizen are open to an indiscriminate multitude. And this is also evident from the nature of the thing; for as law is a certain order, so good law is of course a certain good order: but too large a multitude are incapable of this, unless under the government of that DIVINE POWER which comprehends the universe. Not but that, as quantity and variety are usually essential to beauty, the perfection of a city consists in the largeness of it as far as that largeness is consistent with that order already mentioned: but still there is a determinate size to all cities, as well as everything else, whether animals, plants, or machines, for each of these, if they are neither too little nor too big, have their proper powers; but when they have not their due growth, or are badly constructed, as a ship a span long is not properly a ship, nor one of two furlongs length, but when it is of a fit size; for either from its smallness or from its largeness it may be quite useless: so is it with a city; one that is too small has not in itself the power of self-defence, but this is essential to a city: one that is too large is capable of self-defence in what is necessary; but then it is a nation and not a city: for it will be very difficult to accommodate a form of government to it: for who would choose to be the general of such an unwieldy multitude, or who could be their herald but a stentor? The first thing therefore necessary is, that a city should consist of such numbers as will be sufficient to enable the inhabitants to live happily in their political community: and it follows, that the more the inhabitants exceed that necessary number the greater will the city be: but this must not be, as we have already said, without bounds; but what is its proper limit experience will easily show, and this experience is to be collected from the actions both of the governors and the governed. Now, as it belongs to the first to direct the inferior magistrates and to act as judges, it follows that they can neither determine causes with justice nor issue their orders with propriety without they know the characters of their fellow-citizens: so that whenever this happens not to be done in these two particulars, the state must of necessity be badly managed; for in both of them it is not right to determine too hastily and without proper knowledge, which must evidently be the case where the number of the citizens is too many: besides, it is more easy for strangers and sojourners to assume the rights of citizens, as they will easily escape detection in so great a multitude. It is evident, then, that the best boundary for a city is that wherein the numbers are the greatest possible, that they may be the better able to be sufficient in themselves, while at the same time they are not too large to be under the eye and government of the magistrates. And thus let us determine the extent of a city.
Having determined thus far, it remains that we consider whether all these different employments shall be open to all; for it is possible to continue the same persons always husbandmen, artificers, judges, or counsellors; or shall we appoint different persons to each of those employments which we have already mentioned; or shall some of them be appropriated to particulars, and others of course common to all? but this does not take place in every state, for, as we have already said, it is possible that all may be common to all, or not, but only common to some; and this is the difference between one government and another: for in democracies the whole community partakes of everything, but in oligarchies it is different.
Since we are inquiring what is the best government possible, and it is admitted to be that in which the citizens are happy; and that, as we have already said, it is impossible to obtain happiness without virtue; it follows, that in the best-governed states, where the citizens are really men of intrinsic and not relative goodness, none of them should be permitted to exercise any mechanic employment or follow merchandise, as being ignoble and destructive to virtue; neither should they be husband-men, that they may be at leisure to improve in virtue and perform the duty they owe to the state. With respect to the employments of a soldier, a senator, and a judge, which are evidently necessary to the community, shall they be allotted to different persons, or shall the same person execute both? This question, too, is easily answered: for in some cases the same persons may execute them, in others they should be different, where the different employments require different abilities, as when courage is wanting for one, judgment for the other, there they should be allotted to different persons; but when it is evident, that it is impossible to oblige those who have arms in their hands, and can insist on their own terms, to be always under command; there these different employments should be trusted to one person; for those who have arms in their hands have it in their option whether they will or will not assume the supreme power: to these two (namely, those who have courage and judgment) the government must be entrusted; but not in the same manner, but as nature directs; what requires courage to the young, what requires judgment to the old; for with the young is courage, with the old is wisdom: thus each will be allotted the part they are fit for according to their different merits. It is also necessary that the landed property should belong to these men; for it is necessary that the citizens should be rich, and these are the men proper for citizens; for no mechanic ought to be admitted to the rights of a citizen, nor any other sort of people whose employment is not entirely noble, honourable, and virtuous; this is evident from the principle we at first set out with; for to be happy it is necessary to be virtuous; and no one should say that a city is happy while he considers only one part of its citizens, but for that purpose he ought to examine into all of them. It is evident, therefore, that the landed property should belong to these, though it may be necessary for them to have husbandmen, either slaves, barbarians, or servants. There remains of the different classes of the people whom we have enumerated, the priests, for these evidently compose a rank by themselves; for neither are they to be reckoned amongst the husbandmen nor the mechanics; for reverence to the gods is highly becoming every state: and since the citizens have been divided into orders, the military and the council, and it is proper to offer due worship to the gods, and since it is necessary that those who are employed in their service should have nothing else to do, let the business of the priesthood be allotted to those who are in years. We have now shown what is necessary to the existence of a city, and of what parts it consists, and that husbandmen, mechanic, and mercenary servants are necessary to a city; but that the parts of it are soldiers and sailors, and that these are always different from those, but from each other only occasionally.
What we have said concerning a city may nearly be applied to a country; for as to what soil it should be, every one evidently will commend it if it is such as is sufficient in itself to furnish what will make the inhabitants happy; for which purpose it must be able to supply them with all the necessaries of life; for it is the having these in plenty, without any want, which makes them content. As to its extent, it should be such as may enable the inhabitants to live at their ease with freedom and temperance. Whether we have done right or wrong in fixing this limit to the territory shall be considered more minutely hereafter, when we come particularly to inquire into property, and what fortune is requisite for a man to live on, and how and in what manner they ought to employ it; for there are many doubts upon this question, while each party insists upon their own plan of life being carried to an excess, the one of severity, the other of indulgence. What the situation of the country should be it is not difficult to determine, in some particulars respecting that we ought to be advised by those who are skilful in military affairs. It should be difficult of access to an enemy, but easy to the inhabitants: and as we said, that the number of inhabitants ought to be such as can come under the eye of the magistrate, so should it be with the country; for then it is easily defended. As to the position of the city, if one could place it to one's wish, it is convenient to fix it on the seaside: with respect to the country, one situation which it ought to have has been already mentioned, namely, that it should be so placed as easily to give assistance to all places, and also to receive the necessaries of life from all parts, and also wood, or any other materials which may happen to be in the country.
But with respect to placing a city in the neighbourhood of the sea, there are some who have many doubts whether it is serviceable or hurtful to a well-regulated state; for they say, that the resort of persons brought up under a different system of government is disserviceable to the state, as well by impeding the laws as by their numbers; for a multitude of merchants must necessarily arise from their trafficking backward and forward upon the seas, which will hinder the well-governing of the city: but if this inconvenience should not arise, it is evident that it is better, both on account of safety and also for the easier acquisition of the necessaries of life, that both the city and the country should be near the sea; for it is necessary that those who are to sustain the attack of the enemy should be ready with their assistance both by land and by sea, and to oppose any inroad, both ways if possible but if not, at least where they are most powerful, which they may do while they possess both. A maritime situation is also useful for receiving from others what your own country will not produce, and exporting those necessaries of your own growth which are more than you have occasion for; but a city ought to traffic to supply its own wants, and not the wants of others; for those who themselves furnish an open market for every one, do it for the sake of gain; which it is not proper for a well-established state to do, neither should they encourage such a commerce. Now, as we see that many places and cities have docks and harbours lying very convenient for the city, while those who frequent them have no communication with the citadel, and yet they are not too far off, but are surrounded by walls and such-like fortifications, it is evident, that if any good arises from such an intercourse the city will receive it, but if anything hurtful, it will be easy to restrain it by a law declaring and deputing whom the state will allow to have an intercourse with each other, and whom not. As to a naval power, it is by no means doubtful that it is necessary to have one to a certain degree; and this not only for the sake of the city itself, but also because it may be necessary to appear formidable to some of the neighbouring states, or to be able to assist them as well by sea as by land; but to know how great that force should be, the health of the state should be inquired into, and if that appears vigorous and enables her to take the lead of other communities, it is necessary that her force should correspond with her actions. As for that multitude of people which a maritime power creates, they are by no means necessary to a state, nor ought they to make a part of the citizens; for the mariners and infantry, who have the command, are freemen, and upon these depends a naval engagement: but when there are many servants and husbandmen, there they will always have a number of sailors, as we now see happens to some states, as in Heraclea, where they man many triremes, though the extent of their city is much inferior to some others. And thus we determine concerning the country, the port, the city, the sea, and a maritime power: as to the number of the citizens, what that ought to be we have already said.
We now proceed to point out what natural disposition the members of the community ought to be of: but this any one will easily perceive who will cast his eye over the states of Greece, of all others the most celebrated, and also the other different nations of this habitable world. Those who live in cold countries, as the north of Europe, are full of courage, but wanting in understanding and the arts: therefore they are very tenacious of their liberty; but, not being politicians, they cannot reduce their neighbours under their power: but the Asiatics, whose understandings are quick, and who are conversant in the arts, are deficient in courage; and therefore are always conquered and the slaves of others: but the Grecians, placed as it were between these two boundaries, so partake of them both as to be at the same time both courageous and sensible; for which reason Greece continues free, and governed in the best manner possible, and capable of commanding the whole world, could they agree upon one system of policy. Now this is the difference between the Grecians and other nations, that the latter have but one of these qualities, whereas in the former they are both happily blended together. Hence it is evident, that those persons ought to be both sensible and courageous who will readily obey a legislator, the object of whose laws is virtue. As to what some persons say, that the military must be mild and tender to those they know, but severe and cruel to those they know not, it is courage which makes any one lovely; for that is the faculty of the soul which we most admire: as a proof of this, our resentment rises higher against our friends and acquaintance than against those we know not: for which reason Archilaus accusing his friends says very properly to himself, Shall my friends insult me? The spirit of freedom and command also is what all inherit who are of this disposition for courage is commanding and invincible. It also is not right for any one to say, that you should be severe to those you know not; for this behaviour is proper for no one: nor are those who are of a noble disposition harsh in their manners, excepting only to the wicked; and when they are particularly so, it is, as has been already said, against their friends, when they think they have injured them; which is agreeable to reason: for when those who think they ought to receive a favour from any one do not receive it, beside the injury done them, they consider what they are deprived of: hence the saying, "Cruel are the wars of brothers;" and this, "Those who have greatly loved do greatly hate." And thus we have nearly determined how many the inhabitants of a city ought to be, and what their natural disposition, and also the country how large, and of what sort is necessary; I say nearly, because it is needless to endeavour at as great accuracy in those things which are the objects of the senses as in those which are inquired into by the understanding only.
As in natural bodies those things are not admitted to be parts of them without which the whole would not exist, so also it is evident that in a political state everything that is necessary thereunto is not to be considered as a part of it, nor any other community from whence one whole is made; for one thing ought to be common and the same to the community, whether they partake of it equally or unequally, as, for instance, food, land, or the like; but when one thing is for the benefit of one person, and another for the benefit of another, in this there is nothing like a community, excepting that one makes it and the other uses it; as, for instance, between any instrument employed in making any work, and the workmen, as there is nothing common between the house and the builder, but the art of the builder is employed on the house. Thus property is necessary for states, but property is no part of the state, though many species of it have life; but a city is a community of equals, for the purpose of enjoying the best life possible: but the happiest life is the best which consists in the perfect practice of virtuous energies: as therefore some persons have great, others little or no opportunity of being employed in these, it is evident that this is the cause of the difference there is between the different cities and communities there are to be found; for while each of these endeavour to acquire what is best by various and different means, they give rise to different modes of living and different forms of government. We are now to consider what those things are without which a city cannot possibly exist; for what we call parts of the city must of necessity inhere in it: and this we shall plainly understand, if we know the number of things necessary to a city: first, the inhabitants must have food: secondly, arts, for many instruments are necessary in life: thirdly, arms, for it is necessary that the community should have an armed force within themselves, both to support their government against those of their own body who might refuse obedience to it, and also to defend it from those who might attempt to attack it from without: fourthly, a certain revenue, as well for the internal necessities of the state as for the business of war: fifthly, which is indeed the chief concern, a religious establishment: sixthly in order, but first of all in necessity, a court to determine both criminal and civil causes. These things are absolutely necessary, so to speak, in every state; for a city is a number of people not accidentally met together, but with a purpose of ensuring to themselves sufficient independency and self-protection; and if anything necessary for these purposes is wanting, it is impossible that in such a situation these ends can be obtained. It is necessary therefore that a city should be capable of acquiring all these things: for this purpose a proper number of husbandmen are necessary to procure food, also artificers and soldiers, and rich men, and priests and judges, to determine what is right and proper.
It seems neither now nor very lately to have been known to those philosophers who have made politics their study, that a city ought to be divided by families into different orders of men; and that the husbandmen and soldiers should be kept separate from each other; which custom is even to this day preserved in Egypt and in Crete; also Sesostris having founded it in Egypt, Minos in Crete. Common meals seem also to have been an ancient regulation, and to have been established in Crete during the reign of Minos, and in a still more remote period in Italy; for those who are the best judges in that country say that one Italus being king of AEnotria., from whom the people, changing their names, were called Italians instead of AEnotrians, and that part of Europe was called Italy which is bounded by the Scylletic Gulf on the one side and the Lametic on the other, the distance between which is about half a day's journey. This Italus, they relate, made the AEnotrians, who were formerly shepherds, husbandmen, and gave them different laws from what they had before, and to have been the first who established common meals, for which reason some of his descendants still use them, and observe some of his laws. The Opici inhabit that part which lies towards the Tyrrhenian Sea, who both now are and formerly were called Ausonians. The Chones inhabited the part toward Iapigia and the Ionian Sea which is called Syrtis. These Chones were descended from the AEnotrians. Hence arose the custom of common meals, but the separation of the citizens into different families from Egypt: for the reign of Sesostris is of much higher antiquity than that of Minos. As we ought to think that most other things were found out in a long, nay, even in a boundless time (reason teaching us that want would make us first invent that which was necessary, and, when that was obtained, then those things which were requisite for the conveniences and ornament of life), so should we conclude the same with respect to a political state; now everything in Egypt bears the marks of the most remote antiquity, for these people seem to be the most ancient of all others, and to have acquired laws and political order; we should therefore make a proper use of what is told us of them, and endeavour to find out what they have omitted. We have already said, that the landed property ought to belong to the military and those who partake of the government of the state; and that therefore the husbandmen should be a separate order of people; and how large and of what nature the country ought to be: we will first treat of the division of the land, and of the husbandmen, how many and of what sort they ought to be; since we by no means hold that property ought to be common, as some persons have said, only thus far, in friendship, it should be their custom to let no citizen want subsistence. As to common meals, it is in general agreed that they are proper in well-regulated cities; my reasons for approving of them shall be mentioned hereafter: they are what all the citizens ought to partake of; but it will not be easy for the poor, out of what is their own, to furnish as much as they are ordered to do, and supply their own house besides. The expense also of religious worship should be defrayed by the whole state. Of necessity therefore the land ought to be divided into two parts, one of which should belong to the community in general, the other to the individuals separately; and each of these parts should again be subdivided into two: half of that which belongs to the public should be appropriated to maintain the worship of the gods, the other half to support the common meals. Half of that which belongs to the individuals should be at the extremity of the country, the other half near the city, so that these two portions being allotted to each person, all would partake of land in both places, which would be both equal and right; and induce them to act in concert with greater harmony in any war with their neighbours: for when the land is not divided in this manner, one party neglects the inroads of the enemy on the borders, the other makes it a matter of too much consequence and more than is necessary; for which reason in some places there is a law which forbids the inhabitants of the borders to have any vote in the council when they are debating upon a war which is made against them as their private interest might prevent their voting impartially. Thus therefore the country ought to be divided and for the reasons before mentioned. Could one have one's choice, the husbandmen should by all means be slaves, not of the same nation, or men of any spirit; for thus they would be laborious in their business, and safe from attempting any novelties: next to these barbarian servants are to be preferred, similar in natural disposition to these we have already mentioned. Of these, let those who are to cultivate the private property of the individual belong to that individual, and those who are to cultivate the public territory belong to the public. In what manner these slaves ought to be used, and for what reason it is very proper that they should have the promise of their liberty made them, as a reward for their services, shall be mentioned hereafter.
We have already mentioned, that both the city and all the country should communicate both with the sea and the continent as much as possible. There are these four things which we should be particularly desirous of in the position of the city with respect to itself: in the first place, health is to be consulted as the first thing necessary: now a city which fronts the east and receives the winds which blow from thence is esteemed most healthful; next to this that which has a northern position is to be preferred, as best in winter. It should next be contrived that it may have a proper situation for the business of government and for defence in war: that in war the citizens may have easy access to it; but that it may be difficult of access to, and hardly to be taken by, the enemy. In the next place particularly, that there may be plenty of water, and rivers near at hand: but if those cannot be found, very large cisterns must be prepared to save rain-water, so that there may be no want of it in case they should be driven into the town in time of war. And as great care should be taken of the health of the inhabitants, the first thing to be attended to is, that the city should have a good situation and a good position; the second is, that they may have good water to drink; and this not be negligently taken care of; for what we chiefly and most frequently use for the support of the body must principally influence the health of it; and this influence is what the air and water naturally have: for which reason in all wise governments the waters ought to be appropriated to different purposes, and if they are not equally good, and if there is not a plenty of necessary water, that which is to drink should be separated from that which is for other uses. As to fortified places, what is proper for some governments is not proper for all; as, for instance, a lofty citadel is proper for a monarchy and an oligarchy; a city built upon a plain suits a democracy; neither of these for an aristocracy, but rather many strong places. As to the form of private houses, those are thought to be best and most useful for their different purposes which are distinct and separate from each other, and built in the modern manner, after the plan of Hippodamus: but for safety in time of war, on the contrary, they should be built as they formerly were; for they were such that strangers could not easily find their way out of them, and the method of access to them such as an enemy could with difficulty find out if he proposed to besiege them. A city therefore should have both these sorts of buildings, which may easily be contrived if any one will so regulate them as the planters do their rows of vines; not that the buildings throughout the city should be detached from each other, only in some parts of it; thus elegance and safety will be equally consulted. With respect to walls, those who say that a courageous people ought not to have any, pay too much respect to obsolete notions; particularly as we may see those who pride themselves therein continually confuted by facts. It is indeed disreputable for those who are equal, or nearly so, to the enemy, to endeavour to take refuge within their walls—but since it very often happens, that those who make the attack are too powerful for the bravery and courage of those few who oppose them to resist, if you would not suffer the calamities of war and the insolence of the enemy, it must be thought the part of a good soldier to seek for safety under the shelter and protection of walls more especially since so many missile weapons and machines have been most ingeniously invented to besiege cities with. Indeed to neglect surrounding a city with a wall would be similar to choosing a country which is easy of access to an enemy, or levelling the eminences of it; or as if an individual should not have a wall to his house lest it should be thought that the owner of it was a coward: nor should this be left unconsidered, that those who have a city surrounded with walls may act both ways, either as if it had or as if it had not; but where it has not they cannot do this. If this is true, it is not only necessary to have walls, but care must be taken that they may be a proper ornament to the city, as well as a defence in time of war; not only according to the old methods, but the modern improvements also: for as those who make offensive war endeavour by every way possible to gain advantages over their adversaries, so should those who are upon the defensive employ all the means already known, and such new ones as philosophy can invent, to defend themselves: for those who are well prepared are seldom first attacked.
As the citizens in general are to eat at public tables in certain companies, and it is necessary that the walls should have bulwarks and towers in proper places and at proper distances, it is evident that it will be very necessary to have some of these in the towers; let the buildings for this purpose be made the ornaments of the walls. As to temples for public worship, and the hall for the public tables of the chief magistrates, they ought to be built in proper places, and contiguous to each other, except those temples which the law or the oracle orders to be separate from all other buildings; and let these be in such a conspicuous eminence, that they may have every advantage of situation, and in the neighbourhood of that part of the city which is best fortified. Adjoining to this place there ought to be a large square, like that which they call in Thessaly The Square of Freedom, in which nothing is permitted to be bought or sold; into which no mechanic nor husbandman, nor any such person, should be permitted to enter, unless commanded by the magistrates. It will also be an ornament to this place if the gymnastic exercises of the elders are performed in it. It is also proper, that for performing these exercises the citizens should be divided into distinct classes, according to their ages, and that the young persons should have proper officers to be with them, and that the seniors should be with the magistrates; for having them before their eyes would greatly inspire true modesty and ingenuous fear. There ought to be another square separate from this for buying and selling, which should be so situated as to be commodious for the reception of goods both by sea and land. As the citizens may be divided into magistrates and priests, it is proper that the public tables of the priests should be in buildings near the temples. Those of the magistrates who preside over contracts, indictments, and such-like, and also over the markets, and the public streets near the square, or some public way, I mean the square where things are bought and sold; for I intended the other for those who are at leisure, and this for necessary business. The same order which I have directed here should be observed also in the country; for there also their magistrates such as the surveyors of the woods and overseers of the grounds, must necessarily have their common tables and their towers, for the purpose of protection against an enemy. There ought also to be temples erected at proper places, both to the gods and the heroes; but it is unnecessary to dwell longer and most minutely on these particulars—for it is by no means difficult to plan these things, it is rather so to carry them into execution; for the theory is the child of our wishes, but the practical part must depend upon fortune; for which reason we shall decline saying anything farther upon these subjects.
We will now show of what numbers and of what sort of people a government ought to consist, that the state may be happy and well administered. As there are two particulars on which the excellence and perfection of everything depend, one of these is, that the object and end proposed should be proper; the other, that the means to accomplish it should be adapted to that purpose; for it may happen that these may either agree or disagree with each other; for the end we propose may be good, but in taking the means to obtain it we may err; at other times we may have the right and proper means in our power, but the end may be bad, and sometimes we may mistake in both; as in the art of medicine the physician does not sometimes know in what situation the body ought to be, to be healthy; nor what to do to procure the end he aims at. In every art and science, therefore, we should be master of this knowledge, namely, the proper end, and the means to obtain it. Now it is evident that all persons are desirous to live well and be happy; but that some have the means thereof in their own power, others not; and this either through nature or fortune; for many ingredients are necessary to a happy life; but fewer to those who are of a good than to those who are of a bad disposition. There are others who continually have the means of happiness in their own power, but do not rightly apply them. Since we propose to inquire what government is best, namely, that by which a state may be best administered, and that state is best administered where the people are the happiest, it is evident that happiness is a thing we should not be unacquainted with. Now, I have already said in my treatise on Morals (if I may here make any use of what I have there shown), that happiness consists in the energy and perfect practice of virtue; and this not relatively, but simply; I mean by relatively, what is necessary in some certain circumstances; by simply, what is good and fair in itself: of the first sort are just punishments, and restraints in a just cause; for they arise from virtue and are necessary, and on that account are virtuous; though it is more desirable that neither any state nor any individual should stand in need of them; but those actions which are intended either to procure honour or wealth are simply good; the others eligible only to remove an evil; these, on the contrary, are the foundation and means of relative good. A worthy man indeed will bear poverty, disease, and other unfortunate accidents with a noble mind; but happiness consists in the contrary to these (now we have already determined in our treatise on Morals, that he is a man of worth who considers what is good because it is virtuous as what is simply good; it is evident, therefore, that all the actions of such a one must be worthy and simply good): this has led some persons to conclude, that the cause of happiness was external goods; which would be as if any one should suppose that the playing well upon the lyre was owing to the instrument, and not to the art. It necessarily follows from what has been said, that some things should be ready at hand and others procured by the legislator; for which reason in founding a city we earnestly wish that there may be plenty of those things which are supposed to be under the dominion of fortune (for some things we admit her to be mistress over); but for a state to be worthy and great is not only the work of fortune but of knowledge and judgment also. But for a state to be worthy it is necessary that those citizens which are in the administration should be worthy also; but as in our city every citizen is to be so, we must consider how this may be accomplished; for if this is what every one could be, and not some individuals only, it would be more desirable; for then it would follow, that what might be done by one might be done by all. Men are worthy and good three ways; by nature, by custom, by reason. In the first place, a man ought to be born a man, and not any other animal; that is to say, he ought to have both a body and soul; but it avails not to be only born with some things, for custom makes great alterations; for there are some things in nature capable of alteration either way which are fixed by custom, either for the better or the worse. Now, other animals live chiefly a life of nature; and in very few things according to custom; but man lives according to reason also, which he alone is endowed with; wherefore he ought to make all these accord with each other; for if men followed reason, and were persuaded that it was best to obey her, they would act in many respects contrary to nature and custom. What men ought naturally to be, to make good members of a community, I have already determined; the rest of this discourse therefore shall be upon education; for some things are acquired by habit, others by hearing them.
As every political community consists of those who govern and of those who are governed, let us consider whether during the continuance of their lives they ought to be the same persons or different; for it is evident that the mode of education should be adapted to this distinction. Now, if one man differed from another as much, as we believe, the gods and heroes differ from men: in the first place, being far their superiors in body; and, secondly, in the soul: so that the superiority of the governors over the governed might be evident beyond a doubt, it is certain that it would be better for the one always to govern, the other always to be governed: but, as this is not easy to obtain, and kings are not so superior to those they govern as Scylax informs us they are in India, it is evident that for many reasons it is necessary that all in their turns should both govern and be governed: for it is just that those who are equal should have everything alike; and it is difficult for a state to continue which is founded in injustice; for all those in the country who are desirous of innovation will apply themselves to those who are under the government of the rest, and such will be their numbers in the state, that it will be impossible for the magistrates to get the better of them. But that the governors ought to excel the governed is beyond a doubt; the legislator therefore ought to consider how this shall be, and how it may be contrived that all shall have their equal share in the administration. Now, with respect to this it will be first said, that nature herself has directed us in our choice, laying down the selfsame thing when she has made some young, others old: the first of whom it becomes to obey, the latter to command; for no one when he is young is offended at his being under government, or thinks himself too good for it; more especially when he considers that he himself shall receive the same honours which he pays when he shall arrive at a proper age. In some respects it must be acknowledged that the governors and the governed are the same, in others they are different; it is therefore necessary that their education should be in some respect the same, in others different: as they say, that he will be a good governor who has first learnt to obey. Now of governments, as we have already said, some are instituted for the sake of him who commands; others for him who obeys: of the first sort is that of the master over the servant; of the latter, that of freemen over each other. Now some things which are commanded differ from others; not in the business, but in the end proposed thereby: for which reason many works, even of a servile nature, are not disgraceful for young freemen to perform; for many things which are ordered to be done are not honourable or dishonourable so much in their own nature as in the end which is proposed, and the reason for which they are undertaken. Since then we have determined, that the virtue of a good citizen and good governor is the same as of a good man; and that every one before he commands should have first obeyed, it is the business of the legislator to consider how his citizens may be good men, what education is necessary to that purpose, and what is the final object of a good life. The soul of man may be divided into two parts; that which has reason in itself, and that which hath not, but is capable of obeying its dictates: and according to the virtues of these two parts a man is said to be good: but of those virtues which are the ends, it will not be difficult for those to determine who adopt the division I have already given; for the inferior is always for the sake of the superior; and this is equally evident both in the works of art as well as in those of nature; but that is superior which has reason. Reason itself also is divided into two parts, in the manner we usually divide it; the theoretic and the practical; which division therefore seems necessary for this part also: the same analogy holds good with respect to actions; of which those which are of a superior nature ought always to be chosen by those who have it in their power; for that is always most eligible to every one which will procure the best ends. Now life is divided into labour and rest, war and peace; and of what we do the objects are partly necessary and useful, partly noble: and we should give the same preference to these that we do to the different parts of the soul and its actions, as war to procure peace; labour, rest; and the useful, the noble. The politician, therefore, who composes a body of laws ought to extend his views to everything; the different parts of the soul and their actions; more particularly to those things which are of a superior nature and ends; and, in the same manner, to the lives of men and their different actions.
They ought to be fitted both for labour and war, but rather for rest and peace; and also to do what is necessary and useful, but rather what is fair and noble. It is to those objects that the education of the children ought to tend, and of all the youths who want instruction. All the Grecian states which now seem best governed, and the legislators who founded those states, appear not to have framed their polity with a view to the best end, or to every virtue, in their laws and education; but eagerly to have attended to what is useful and productive of gain: and nearly of the same opinion with these are some persons who have written lately, who, by praising the Lacedaemonian state, show they approve of the intention of the legislator in making war and victory the end of his government. But how contrary to reason this is, is easily proved by argument, and has already been proved by facts (but as the generality of men desire to have an extensive command, that they may have everything desirable in the greater abundance; so Thibron and others who have written on that state seem to approve of their legislator for having procured them an extensive command by continually enuring them to all sorts of dangers and hardships): for it is evident, since the Lacedemonians have now no hope that the supreme power will be in their own hand, that neither are they happy nor was their legislator wise. This also is ridiculous, that while they preserved an obedience to their laws, and no one opposed their being governed by them, they lost the means of being honourable: but these people understand not rightly what sort of government it is which ought to reflect honour on the legislator; for a government of freemen is nobler than despotic power, and more consonant to virtue. Moreover, neither should a city be thought happy, nor should a legislator be commended, because he has so trained the people as to conquer their neighbours; for in this there is a great inconvenience: since it is evident that upon this principle every citizen who can will endeavour to procure the supreme power in his own city; which crime the Lacedaemonians accuse Pausanias of, though he enjoyed such great honours.
Such reasoning and such laws are neither political, useful nor true: but a legislator ought to instil those laws on the minds of men which are most useful for them, both in their public and private capacities. The rendering a people fit for war, that they may enslave their inferiors ought not to be the care of the legislator; but that they may not themselves be reduced to slavery by others. In the next place, he should take care that the object of his government is the safety of those who are under it, and not a despotism over all: in the third place, that those only are slaves who are fit to be only so. Reason indeed concurs with experience in showing that all the attention which the legislator pays to the business of war, and all other rules which he lays down, should have for their object rest and peace; since most of those states (which we usually see) are preserved by war; but, after they have acquired a supreme power over those around them, are ruined; for during peace, like a sword, they lose their brightness: the fault of which lies in the legislator, who never taught them how to be at rest.
As there is one end common to a man both as an individual and a citizen, it is evident that a good man and a good citizen must have the same object in view; it is evident that all the virtues which lead to rest are necessary; for, as we have often said, the end of war is peace, of labour, rest; but those virtues whose object is rest, and those also whose object is labour, are necessary for a liberal life and rest; for we want a supply of many necessary things that we may be at rest. A city therefore ought to be temperate, brave, and patient; for, according to the proverb, "Rest is not for slaves;" but those who cannot bravely face danger are the slaves of those who attack them. Bravery, therefore, and patience are necessary for labour, philosophy for rest, and temperance and justice in both; but these chiefly in time of peace and rest; for war obliges men to be just and temperate; but the enjoyment of pleasure, with the rest of peace, is more apt to produce insolence; those indeed who are easy in their circumstances, and enjoy everything that can make them happy, have great occasion for the virtues of temperance and justice. Thus if there are, as the poets tell us, any inhabitants in the happy isles, to these a higher degree of philosophy, temperance, and justice will be necessary, as they live at their ease in the full plenty of every sensual pleasure. It is evident, therefore, that these virtues are necessary in every state that would be happy or worthy; for he who is worthless can never enjoy real good, much less is he qualified to be at rest; but can appear good only by labour and being at war, but in peace and at rest the meanest of creatures. For which reason virtue should not be cultivated as the Lacedaemonians did; for they did not differ from others in their opinion concerning the supreme good, but in imagining this good was to be procured by a particular virtue; but since there are greater goods than those of war, it is evident that the enjoyment of those which are valuable in themselves should be desired, rather than those virtues which are useful in war; but how and by what means this is to be acquired is now to be considered. We have already assigned three causes on which it will depend; nature, custom, and reason, arid shown what sort of men nature must produce for this purpose; it remains then that we determine which we shall first begin by in education, reason or custom, for these ought always to preserve the most entire harmony with each other; for it may happen that reason may err from the end proposed, and be corrected by custom. In the first place, it is evident that in this as in other things, its beginning or production arises from some principle, and its end also arises from another principle, which is itself an end. Now, with us, reason and intelligence are the end of nature; our production, therefore, and our manners ought to be accommodated to both these. In the next place, as the soul and the body are two distinct things, so also we see that the soul is divided into two parts, the reasoning and not-reasoning, with their habits which are two in number, one belonging to each, namely appetite and intelligence; and as the body is in production before the soul, so is the not-reasoning part of the soul before the reasoning; and this is evident; for anger, will and desire are to be seen in children nearly as soon as they are born; but reason and intelligence spring up as they grow to maturity. The body, therefore, necessarily demands our care before the soul; next the appetites for the sake of the mind; the body for the sake of the soul.
If then the legislator ought to take care that the bodies of the children are as perfect as possible, his first attention ought to be given to matrimony; at what time and in what situation it is proper that the citizens should engage in the nuptial contract. Now, with respect to this alliance, the legislator ought both to consider the parties and their time of life, that they may grow old at the same part of time, and that their bodily powers may not be different; that is to say, the man being able to have children, but the woman too old to bear them; or, on the contrary, the woman be young enough to produce children, but the man too old to be a father; for from such a situation discords and disputes continually arise. In the next place, with respect to the succession of children, there ought not to be too great an interval of time between them and their parents; for when there is, the parent can receive no benefit from his child's affection, or the child any advantage from his father's protection; neither should the difference in years be too little, as great inconveniences may arise from it; as it prevents that proper reverence being shown to a father by a boy who considers him as nearly his equal in age, and also from the disputes it occasions in the economy of the family. But, to return from this digression, care ought to be taken that the bodies of the children may be such as will answer the expectations of the legislator; this also will be affected by the same means. Since season for the production of children is determined (not exactly, but to speak in general), namely, for the man till seventy years, and the woman till fifty, the entering into the marriage state, as far as time is concerned, should be regulated by these periods. It is extremely bad for the children when the father is too young; for in all animals whatsoever the parts of the young are imperfect, and are more likely to be productive of females than males, and diminutive also in size; the same thing of course necessarily holds true in men; as a proof of this you may see in those cities where the men and women usually marry very young, the people in general are very small and ill framed; in child-birth also the women suffer more, and many of them die. And thus some persons tell us the oracle of Traezenium should be explained, as if it referred to the many women who were destroyed by too early marriages, and not their gathering their fruits too soon. It is also conducive to temperance not to marry too soon; for women who do so are apt to be intemperate. It also prevents the bodies of men from acquiring their full size if they marry before their growth is completed; for this is the determinate period, which prevents any further increase; for which reason the proper time for a woman to marry is eighteen, for a man thirty-seven, a little more or less; for when they marry at that time their bodies are in perfection, and they will also cease to have children at a proper time; and moreover with respect to the succession of the children, if they have them at the time which may reasonably be expected, they will be just arriving into perfection when their parents are sinking down under the load of seventy years. And thus much for the time which is proper for marriage; but moreover a proper season of the year should be observed, as many persons do now, and appropriate the winter for this business. The married couple ought also to regard the precepts of physicians and naturalists, each of whom have treated on these subjects. What is the fit disposition of the body will be better mentioned when we come to speak of the education of the child; we will just slightly mention a few particulars. Now, there is no occasion that any one should have the habit of body of a wrestler to be either a good citizen, or to enjoy a good constitution, or to be the father of healthy children; neither should he be infirm or too much dispirited by misfortunes, but between both these. He ought to have a habit of labour, but not of too violent labour; nor should that be confined to one object only, as the wrestler's is; but to such things as are proper for freemen. These things are equally necessary both for men and women. Women with child should also take care that their diet is not too sparing, and that they use sufficient exercise; which it will be easy for the legislator to effect if he commands them once every day to repair to the worship of the gods who are supposed to preside over matrimony. But, contrary to what is proper for the body, the mind ought to be kept as tranquil as possible; for as plants partake of the nature of the soil, so does the child receive much of the disposition of the mother. With respect to the exposing or bringing up of children, let it be a law, that nothing imperfect or maimed shall be brought up,.......... As the proper time has been pointed out for a man and a woman to enter into the marriage state, so also let us determine how long it is advantageous for the community that they should have children; for as the children of those who are too young are imperfect both in body and mind, so also those whose parents are too old are weak in both: while therefore the body continues in perfection, which (as some poets say, who reckon the different periods of life by sevens) is till fifty years, or four or five more, the children may be equally perfect; but when the parents are past that age it is better they should have no more. With respect to any connection between a man and a woman, or a woman and a man, when either of the parties are betrothed, let it be held in utter detestation on any pretext whatsoever; but should any one be guilty of such a thing after the marriage is consummated, let his infamy be as great as his guilt deserves.
When a child is born it must be supposed that the strength of its body will depend greatly upon the quality of its food. Now whoever will examine into the nature of animals, and also observe those people who are very desirous their children should acquire a warlike habit, will find that they feed them chiefly with milk, as being best accommodated to their bodies, but without wine, to prevent any distempers: those motions also which are natural to their age are very serviceable; and to prevent any of their limbs from being crooked, on account of their extreme ductility, some people even now use particular machines that their bodies may not be distorted. It is also useful to enure them to the cold when they are very little; for this is very serviceable for their health; and also to enure them to the business of war; for which reason it is customary with many of the barbarians to dip their children in rivers when the water is cold; with others to clothe them very slightly, as among the Celts; for whatever it is possible to accustom children to, it is best to accustom them to it at first, but to do it by degrees: besides, boys have naturally a habit of loving the cold, on account of the heat. These, then, and such-like things ought to be the first object of our attention: the next age to this continues till the child is five years old; during which time it is best to teach him nothing at all, not even necessary labour, lest it should hinder his growth; but he should be accustomed to use so much motion as not to acquire a lazy habit of body; which he will get by various means and by play also: his play also ought to be neither illiberal nor too laborious nor lazy. Their governors and preceptors also should take care what sort of tales and stories it may be proper for them to hear; for all these ought to pave the way for their future instruction: for which reason the generality of their play should be imitations of what they are afterwards to do seriously. They too do wrong who forbid by laws the disputes between boys and their quarrels, for they contribute to increase their growth—as they are a sort of exercise to the body: for the struggles of the heart and the compression of the spirits give strength to those who labour, which happens to boys in their disputes. The preceptors also ought to have an eye upon their manner of life, and those with whom they converse; and to take care that they are never in the company of slaves. At this time and till they are seven years old it is necessary that they should be educated at home. It is also very proper to banish, both from their hearing and sight, everything which is illiberal and the like. Indeed it is as much the business of the legislator as anything else, to banish every indecent expression out of the state: for from a permission to speak whatever is shameful, very quickly arises the doing it, and this particularly with young people: for which reason let them never speak nor hear any such thing: but if it appears that any freeman has done or said anything that is forbidden before he is of age to be thought fit to partake of the common meals, let him be punished by disgrace and stripes; but if a person above that age does so, let him be treated as you would a slave, on account of his being infamous. Since we forbid his speaking everything which is forbidden, it is necessary that he neither sees obscene stories nor pictures; the magistrates therefore are to take care that there are no statues or pictures of anything of this nature, except only to those gods to whom the law permits them, and to which the law allows persons of a certain age to pay their devotions, for themselves, their wives, and children. It should also be illegal for young persons to be present either at iambics or comedies before they are arrived at that age when they are allowed to partake of the pleasures of the table: indeed a good education will preserve them from all the evils which attend on these things. We have at present just touched upon this subject; it will be our business hereafter, when we properly come to it, to determine whether this care of children is unnecessary, or, if necessary, in what manner it must be done; at present we have only mentioned it as necessary. Probably the saying of Theodoras, the tragic actor, was not a bad one: That he would permit no one, not even the meanest actor, to go upon the stage before him, that he might first engage the ear of the audience. The same thing happens both in our connections with men and things: what we meet with first pleases best; for which reason children should be kept strangers to everything which is bad, more particularly whatsoever is loose and offensive to good manners. When five years are accomplished, the two next may be very properly employed in being spectators of those exercises they will afterwards have to learn. There are two periods into which education ought to be divided, according to the age of the child; the one is from his being seven years of age to the time of puberty; the other from thence till he is one-and-twenty: for those who divide ages by the number seven are in general wrong: it is much better to follow the division of nature; for every art and every instruction is intended to complete what nature has left defective: we must first consider if any regulation whatsoever is requisite for children; in the next place, if it is advantageous to make it a common care, or that every one should act therein as he pleases, which is the general practice in most cities; in the third place, what it ought to be.
---
!!![[CHAPTER I|ELLIS: BOOK VIII: CHAPTER I]]
{{ELLIS: BOOK VIII: CHAPTER I}}
---
!!![[CHAPTER II|ELLIS: BOOK VIII: CHAPTER II]]
{{ELLIS: BOOK VIII: CHAPTER II}}
---
!!![[CHAPTER III|ELLIS: BOOK VIII: CHAPTER III]]
{{ELLIS: BOOK VIII: CHAPTER III}}
---
!!![[CHAPTER IV|ELLIS: BOOK VIII: CHAPTER IV]]
{{ELLIS: BOOK VIII: CHAPTER IV}}
---
!!![[CHAPTER V|ELLIS: BOOK VIII: CHAPTER V]]
{{ELLIS: BOOK VIII: CHAPTER V}}
---
!!![[CHAPTER VI|ELLIS: BOOK VIII: CHAPTER VI]]
{{ELLIS: BOOK VIII: CHAPTER VI}}
---
!!![[CHAPTER VII|ELLIS: BOOK VIII: CHAPTER VII]]
{{ELLIS: BOOK VIII: CHAPTER VII}}
No one can doubt that the magistrate ought greatly to interest himself in the care of youth; for where it is neglected it is hurtful to the city, for every state ought to be governed according to its particular nature; for the form and manners of each government are peculiar to itself; and these, as they originally established it, so they usually still preserve it. For instance, democratic forms and manners a democracy; oligarchic, an oligarchy: but, universally, the best manners produce the best government. Besides, as in every business and art there are some things which men are to learn first and be made accustomed to, which are necessary to perform their several works; so it is evident that the same thing is necessary in the practice of virtue. As there is one end in view in every city, it is evident that education ought to be one and the same in each; and that this should be a common care, and not the individual's, as it now is, when every one takes care of his own children separately; and their instructions are particular also, each person teaching them as they please; but what ought to be engaged in ought to be common to all. Besides, no one ought to think that any citizen belongs to him in particular, but to the state in general; for each one is a part of the state, and it is the natural duty of each part to regard the good of the whole: and for this the Lacedaemonians may be praised; for they give the greatest attention to education, and make it public. It is evident, then, that there should be laws concerning education, and that it should be public.
What education is, and how children ought to be instructed, is what should be well known; for there are doubts concerning the business of it, as all people do not agree in those things they would have a child taught, both with respect to their improvement in virtue and a happy life: nor is it clear whether the object of it should be to improve the reason or rectify the morals. From the present mode of education we cannot determine with certainty to which men incline, whether to instruct a child in what will be useful to him in life; or what tends to virtue, and what is excellent: for all these things have their separate defenders. As to virtue, there is no particular in which they all agree: for as all do not equally esteem all virtues, it reasonably follows that they will not cultivate the same. It is evident that what is necessary ought to be taught to all: but that which is necessary for one is not necessary for all; for there ought to be a distinction between the employment of a freeman and a slave. The first of these should be taught everything useful which will not make those who know it mean. Every work is to be esteemed mean, and every art and every discipline which renders the body, the mind, or the understanding of freemen unfit for the habit and practice of virtue: for which reason all those arts which tend to deform the body are called mean, and all those employments which are exercised for gain; for they take off from the freedom of the mind and render it sordid. There are also some liberal arts which are not improper for freemen to apply to in a certain degree; but to endeavour to acquire a perfect skill in them is exposed to the faults I have just mentioned; for there is a great deal of difference in the reason for which any one does or learns anything: for it is not illiberal to engage in it for one's self, one's friend, or in the cause of virtue; while, at the same time, to do it for the sake of another may seem to be acting the part of a servant and a slave. The mode of instruction which now prevails seems to partake of both parts.
There are four things which it is usual to teach children—reading, gymnastic exercises, and music, to which (in the fourth place) some add painting. Reading and painting are both of them of singular use in life, and gymnastic exercises, as productive of courage. As to music, some persons may doubt, as most persons now use it for the sake of pleasure: but those who originally made it part of education did it because, as has been already said, nature requires that we should not only be properly employed, but to be able to enjoy leisure honourably: for this (to repeat what I have already said) is of all things the principal. But, though both labour and rest are necessary, yet the latter is preferable to the first; and by all means we ought to learn what we should do when at rest: for we ought not to employ that time at play; for then play would be the necessary business of our lives. But if this cannot be, play is more necessary for those who labour than those who are at rest: for he who labours requires relaxation; which play will supply: for as labour is attended with pain and continued exertion, it is necessary that play should be introduced, under proper regulations, as a medicine: for such an employment of the mind is a relaxation to it, and eases with pleasure. Now rest itself seems to partake of pleasure, of happiness, and an agreeable life: but this cannot be theirs who labour, but theirs who are at rest; for he who labours, labours for the sake of some end which he has not: but happiness is an end which all persons think is attended with pleasure and not with pain: but all persons do not agree in making this pleasure consist in the same thing; for each one has his particular standard, correspondent to his own habits; but the best man proposes the best pleasure, and that which arises from the noblest actions. But it is evident, that to live a life of rest there are some things which a man must learn and be instructed in; and that the object of this learning and this instruction centres in their acquisition: but the learning and instruction which is given for labour has for its object other things; for which reason the ancients made music a part of education; not as a thing necessary, for it is not of that nature, nor as a thing useful, as reading, in the common course of life, or for managing of a family, or for learning anything as useful in public life. Painting also seems useful to enable a man to judge more accurately of the productions of the finer arts: nor is it like the gymnastic exercises, which contribute to health and strength; for neither of these things do we see produced by music; there remains for it then to be the employment of our rest, which they had in view who introduced it; and, thinking it a proper employment for freemen, to them they allotted it; as Homer sings:
<<<
"How right to call Thalia to the feast:"
<<<
and of some others he says:
<<<
"The bard was call'd, to ravish every ear:"
<<<
and, in another place, he makes Ulysses say the happiest part of man's life is
<<<
"When at the festal board, in order plac'd, They hear the song."
<<<
It is evident, then, that there is a certain education in which a child may be instructed, not as useful nor as necessary, but as noble and liberal: but whether this is one or more than one, and of what sort they are, and how to be taught, shall be considered hereafter: we are now got so far on our way as to show that we have the testimony of the ancients in our favour, by what they have delivered down upon education—for music makes this plain. Moreover, it is necessary to instruct children in what is useful, not only on account of its being useful in itself, as, for instance, to learn to read, but also as the means of acquiring other different sorts of instruction: thus they should be instructed in painting, not only to prevent their being mistaken in purchasing pictures, or in buying or selling of vases, but rather as it makes them judges of the beauties of the human form; for to be always hunting after the profitable ill agrees with great and freeborn souls. As it is evident whether a boy should be first taught morals or reasoning, and whether his body or his understanding should be first cultivated, it is plain that boys should be first put under the care of the different masters of the gymnastic arts, both to form their bodies and teach them their exercises.
Now those states which seem to take the greatest care of their children's education, bestow their chief attention on wrestling, though it both prevents the increase of the body and hurts the form of it. This fault the Lacedaemonians did not fall into, for they made their children fierce by painful labour, as chiefly useful to inspire them with courage: though, as we have already often said, this is neither the only thing nor the principal thing necessary to attend to; and even with respect to this they may not thus attain their end; for we do not find either in other animals, or other nations, that courage necessarily attends the most cruel, but rather the milder, and those who have the dispositions of lions: for there are many people who are eager both to kill men and to devour human flesh, as the Achaeans and Heniochi in Pontus, and many others in Asia, some of whom are as bad, others worse than these, who indeed live by tyranny, but are men of no courage. Nay, we know that the Lacedaemonians themselves, while they continued those painful labours, and were superior to all others (though now they are inferior to many, both in war and gymnastic exercises), did not acquire their superiority by training their youth to these exercises, but because those who were disciplined opposed those who were not disciplined at all. What is fair and honourable ought then to take place in education of what is fierce and cruel: for it is not a wolf, nor any other wild beast, which will brave any noble danger, but rather a good man. So that those who permit boys to engage too earnestly in these exercises, while they do not take care to instruct them in what is necessary to do, to speak the real truth, render them mean and vile, accomplished only in one duty of a citizen, and in every other respect, as reason evinces, good for nothing. Nor should we form our judgments from past events, but from what we see at present: for now they have rivals in their mode of education, whereas formerly they had not. That gymnastic exercises are useful, and in what manner, is admitted; for during youth it is very proper to go through a course of those which are most gentle, omitting that violent diet and those painful exercises which are prescribed as necessary; that they may not prevent the growth of the body: and it is no small proof that they have this effect, that amongst the Olympic candidates we can scarce find two or three who have gained a victory both when boys and men: because the necessary exercises they went through when young deprived them of their strength. When they have allotted three years from the time of puberty to other parts of education, they are then of a proper age to submit to labour and a regulated diet; for it is impossible for the mind and body both to labour at the same time, as they are productive of contrary evils to each other; the labour of the body preventing the progress of the mind, and the mind of the body.
With respect to music we have already spoken a little in a doubtful manner upon this subject. It will be proper to go over again more particularly what we then said, which may serve as an introduction to what any other person may choose to offer thereon; for it is no easy matter to distinctly point out what power it has, nor on what accounts one should apply it, whether as an amusement and refreshment, as sleep or wine; as these are nothing serious, but pleasing, and the killers of care, as Euripides says; for which reason they class in the same order and use for the same purpose all these, namely, sleep, wine, and music, to which some add dancing; or shall we rather suppose that music tends to be productive of virtue, having a power, as the gymnastic exercises have to form the body in a certain way, to influence the manners so as to accustom its professors to rejoice rightly? or shall we say, that it is of any service in the conduct of life, and an assistant to prudence? for this also is a third property which has been attributed to it. Now that boys are not to be instructed in it as play is evident; for those who learn don't play, for to learn is rather troublesome; neither is it proper to permit boys at their age to enjoy perfect leisure; for to cease to improve is by no means fit for what is as yet imperfect; but it may be thought that the earnest attention of boys in this art is for the sake of that amusement they will enjoy when they come to be men and completely formed; but, if this is the case, why are they themselves to learn it, and not follow the practice of the kings of the Medes and Persians, who enjoy the pleasure of music by hearing others play, and being shown its beauties by them; for of necessity those must be better skilled therein who make this science their particular study and business, than those who have only spent so much time at it as was sufficient just to learn the principles of it. But if this is a reason for a child's being taught anything, they ought also to learn the art of cookery, but this is absurd. The same doubt occurs if music has a power of improving the manners; for why should they on this account themselves learn it, and not reap every advantage of regulating the passions or forming a judgment on the merits of the performance by hearing others, as the Lacedaemonians; for they, without having ever learnt music, are yet able to judge accurately what is good and what is bad; the same reasoning may be applied if music is supposed to be the amusement of those who live an elegant and easy life, why should they learn themselves, and not rather enjoy the benefit of others' skill. Let us here consider what is our belief of the immortal gods in this particular. Now we find the poets never represent Jupiter himself as singing and playing; nay, we ourselves treat the professors of these arts as mean people, and say that no one would practise them but a drunkard or a buffoon. But probably we may consider this subject more at large hereafter. The first question is, whether music is or is not to make a part of education? and of those three things which have been assigned as its proper employment, which is the right? Is it to instruct, to amuse, or to employ the vacant hours of those who live at rest? or may not all three be properly allotted to it? for it appears to partake of them all; for play is necessary for relaxation, and relaxation pleasant, as it is a medicine for that uneasiness which arises from labour. It is admitted also that a happy life must be an honourable one, and a pleasant one too, since happiness consists in both these; and we all agree that music is one of the most pleasing things, whether alone or accompanied with a voice; as Musseus says, "Music's the sweetest joy of man;" for which reason it is justly admitted into every company and every happy life, as having the power of inspiring joy. So that from this any one may suppose that it is necessary to instruct young persons in it; for all those pleasures which are harmless are not only conducive to the final end of life, but serve also as relaxations; and, as men are but rarely in the attainment of that final end, they often cease from their labour and apply to amusement, with no further view than to acquire the pleasure attending it. It is therefore useful to enjoy such pleasures as these. There are some persons who make play and amusement their end, and probably that end has some pleasure annexed to it, but not what should be; but while men seek the one they accept the other for it; because there is some likeness in human actions to the end; for the end is pursued for the sake of nothing else that attends it; but for itself only; and pleasures like these are sought for, not on account of what follows them, but on account of what has gone before them, as labour and grief; for which reason they seek for happiness in these sort of pleasures; and that this is the reason any one may easily perceive. That music should be pursued, not on this account only, but also as it is very serviceable during the hours of relaxation from labour, probably no one doubts; we should also inquire whether besides this use it may not also have another of nobler nature—and we ought not only to partake of the common pleasure arising from it (which all have the sensation of, for music naturally gives pleasure, therefore the use of it is agreeable to all ages and all dispositions); but also to examine if it tends anything to improve our manners and our souls. And this will be easily known if we feel our dispositions any way influenced thereby; and that they are so is evident from many other instances, as well as the music at the Olympic games; and this confessedly fills the soul with enthusiasm; but enthusiasm is an affection of the soul which strongly agitates the disposition. Besides, all those who hear any imitations sympathise therewith; and this when they are conveyed even without rhythm or verse. Moreover, as music is one of those things which are pleasant, and as virtue itself consists in rightly enjoying, loving, and hating, it is evident that we ought not to learn or accustom ourselves to anything so much as to judge right and rejoice in honourable manners and noble actions. But anger and mildness, courage and modesty, and their contraries, as well as all other dispositions of the mind, are most naturally imitated by music and poetry; which is plain by experience, for when we hear these our very soul is altered; and he who is affected either with joy or grief by the imitation of any objects, is in very nearly the same situation as if he was affected by the objects themselves; thus, if any person is pleased with seeing a statue of any one on no other account but its beauty, it is evident that the sight of the original from whence it was taken would also be pleasing; now it happens in the other senses there is no imitation of manners; that is to say, in the touch and the taste; in the objects of sight, a very little; for these are merely representations of things, and the perceptions which they excite are in a manner common to all. Besides, statues and paintings are not properly imitations of manners, but rather signs and marks which show the body is affected by some passion. However, the difference is not great, yet young men ought not to view the paintings of Pauso, but of Polygnotus, or any other painter or statuary who expresses manners. But in poetry and music there are imitations of manners; and this is evident, for different harmonies differ from each other so much by nature, that those who hear them are differently affected, and are not in the same disposition of mind when one is performed as when another is; the one, for instance, occasions grief 13406 and contracts the soul, as the mixed Lydian: others soften the mind, and as it were dissolve the heart: others fix it in a firm and settled state, such is the power of the Doric music only; while the Phrygian fills the soul with enthusiasm, as has been well described by those who have written philosophically upon this part of education; for they bring examples of what they advance from the things themselves. The same holds true with respect to rhythm; some fix the disposition, others occasion a change in it; some act more violently, others more liberally. From what has been said it is evident what an influence music has over the disposition of the mind, and how variously it can fascinate it: and if it can do this, most certainly it is what youth ought to be instructed in. And indeed the learning of music is particularly adapted to their disposition; for at their time of life they do not willingly attend to anything which is not agreeable; but music is naturally one of the most agreeable things; and there seems to be a certain connection between harmony and rhythm; for which reason some wise men held the soul itself to be harmony; others, that it contains it.
We will now determine whether it is proper that children should be taught to sing, and play upon any instrument, which we have before made a matter of doubt. Now, it is well known that it makes a great deal of difference when you would qualify any one in any art, for the person himself to learn the practical part of it; for it is a thing very difficult, if not impossible, for a man to be a good judge of what he himself cannot do. It is also very necessary that children should have some employment which will amuse them; for which reason the rattle of Archytas seems well contrived, which they give children to play with, to prevent their breaking those things which are about the house; for at their age they cannot sit still: this therefore is well adapted to infants, as instruction ought to be their rattle as they grow up; hence it is evident that they should be so taught music as to be able to practise it. Nor is it difficult to say what is becoming or unbecoming of their age, or to answer the objections which some make to this employment as mean and low. In the first place, it is necessary for them to practise, that they may be judges of the art: for which reason this should be done when they are young; but when they are grown older the practical part may be dropped; while they will still continue judges of what is excellent in the art, and take a proper pleasure therein, from the knowledge they acquired of it in their youth. As to the censure which some persons throw upon music, as something mean and low, it is not difficult to answer that, if we will but consider how far we propose those who are to be educated so as to become good citizens should be instructed in this art, and what music and what rhythms they should be acquainted with; and also what instruments they should play upon; for in these there is probably a difference. Such then is the proper answer to that censure: for it must be admitted, that in some cases nothing can prevent music being attended, to a certain degree, with the bad effects which are ascribed to it; it is therefore clear that the learning of it should never prevent the business of riper years; nor render the body effeminate, and unfit for the business of war or the state; but it should be practised by the young, judged of by the old. That children may learn music properly, it is necessary that they should not be employed in those parts of it which are the objects of dispute between the masters in that science; nor should they perform such pieces as are wondered at from the difficulty of their execution; and which, from being first exhibited in the public games, are now become a part of education; but let them learn so much of it as to be able to receive proper pleasure from excellent music and rhythms; and not that only which music must make all animals feel, and also slaves and boys, but more. It is therefore plain what instruments they should use; thus, they should never be taught to play upon the flute, or any other instrument which requires great skill, as the harp or the like, but on such as will make them good judges of music, or any other instruction: besides, the flute is not a moral instrument, but rather one that will inflame the passions, and is therefore rather to be used when the soul is to be animated than when instruction is intended. Let me add also, that there is something therein which is quite contrary to what education requires; as the player on the flute is prevented from speaking: for which reason our forefathers very properly forbade the use of it to youth and freemen, though they themselves at first used it; for when their riches procured them greater leisure, they grew more animated in the cause of virtue; and both before and after the Median war their noble actions so exalted their minds that they attended to every part of education; selecting no one in particular, but endeavouring to collect the whole: for which reason they introduced the flute also, as one of the instruments they were to learn to play on. At Lacedaemon the choregus himself played on the flute; and it was so common at Athens that almost every freeman understood it, as is evident from the tablet which Thrasippus dedicated when he was choregus; but afterwards they rejected it as dangerous; having become better judges of what tended to promote virtue and what did not. For the same reason many of the ancient instruments were thrown aside, as the dulcimer and the lyre; as also those which were to inspire those who played on them with pleasure, and which required a nice finger and great skill to play well on. What the ancients tell us, by way of fable, of the flute is indeed very rational; namely, that after Minerva had found it, she threw it away: nor are they wrong who say that the goddess disliked it for deforming the face of him who played thereon: not but that it is more probable that she rejected it as the knowledge thereof contributed nothing to the improvement of the mind. Now, we regard Minerva as the inventress of arts and sciences. As we disapprove of a child's being taught to understand instruments, and to play like a master (which we would have confined to those who are candidates for the prize in that science; for they play not to improve themselves in virtue, but to please those who hear them, and gratify their importunity); therefore we think the practice of it unfit for freemen; but then it should be confined to those who are paid for doing it; for it usually gives people sordid notions, for the end they have in view is bad: for the impertinent spectator is accustomed to make them change their music; so that the artists who attend to him regulate their bodies according to his motions.
We are now to enter into an inquiry concerning harmony and rhythm; whether all sorts of these are to be employed in education, or whether some peculiar ones are to be selected; and also whether we should give the same directions to those who are engaged in music as part of education, or whether there is something different from these two. Now, as all music consists in melody and rhythm, we ought not to be unacquainted with the power which each of these has in education; and whether we should rather choose music in which melody prevails, or rhythm: but when I consider how many things have been well written upon these subjects, not only by some musicians of the present age, but also by some philosophers who are perfectly skilled in that part of music which belongs to education; we will refer those who desire a very particular knowledge therein to those writers, and shall only treat of it in general terms, without descending to particulars. Melody is divided by some philosophers, whose notions we approve of, into moral, practical, and that which fills the mind with enthusiasm: they also allot to each of these a particular kind of harmony which naturally corresponds therewith: and we say that music should not be applied to one purpose only, but many; both for instruction and purifying the soul (now I use the word purifying at present without any explanation, but shall speak more at large of it in my Poetics); and, in the third place, as an agreeable manner of spending the time and a relaxation from the uneasiness of the mind. It is evident that all harmonies are to be used; but not for all purposes; but the most moral in education: but to please the ear, when others play, the most active and enthusiastic; for that passion which is to be found very strong in some souls is to be met with also in all; but the difference in different persons consists in its being in a less or greater degree, as pity, fear, and enthusiasm also; which latter is so powerful in some as to overpower the soul: and yet we see those persons, by the application of sacred music to soothe their mind, rendered as sedate and composed as if they had employed the art of the physician: and this must necessarily happen to the compassionate, the fearful, and all those who are subdued by their passions: nay, all persons, as far as they are affected with those passions, admit of the same cure, and are restored to tranquillity with pleasure. In the same manner, all music which has the power of purifying the soul affords a harmless pleasure to man. Such, therefore, should be the harmony and such the music which those who contend with each other in the theatre should exhibit: but as the audience is composed of two sorts of people, the free and the well-instructed, the rude the mean mechanics, and hired servants, and a long collection of the like, there must be some music and some spectacles to please and soothe them; for as their minds are as it were perverted from their natural habits, so also is there an unnatural harmony, and overcharged music which is accommodated to their taste: but what is according to nature gives pleasure to every one, therefore those who are to contend upon the theatre should be allowed to use this species of music. But in education ethic melody and ethic harmony should be used, which is the Doric, as we have already said, or any other which those philosophers who are skilful in that music which is to be employed in education shall approve of. But Socrates, in Plato's Republic, is very wrong when he permits only the Phrygian music to be used as well as the Doric, particularly as amongst other instruments he banishes the flute; for the Phrygian music has the same power in harmony as the flute has amongst the instruments; for they are both pathetic and raise the mind: and this the practice of the poets proves; for in their bacchanal songs, or whenever they describe any violent emotions of the mind, the flute is the instrument they chiefly use: and the Phrygian harmony is most suitable to these subjects. Now, that the dithyrambic measure is Phrygian is allowed by general consent; and those who are conversant in studies of this sort bring many proofs of it; as, for instance, when Philoxenus endeavoured to compose dithyrambic music for Doric harmony, he naturally fell back again into Phrygian, as being fittest for that purpose; as every one indeed agrees, that the Doric music is most serious, and fittest to inspire courage: and, as we always commend the middle as being between the two extremes, and the Doric has this relation with respect to other harmonies, it is evident that is what the youth ought to be instructed in. There are two things to be taken into consideration, both what is possible and what is proper; every one then should chiefly endeavour to attain those things which contain both these qualities: but this is to be regulated by different times of life; for instance, it is not easy for those who are advanced in years to sing such pieces of music as require very high notes, for nature points out to them those which are gentle and require little strength of voice (for which reason some who are skilful in music justly find fault with Socrates for forbidding the youth to be instructed in gentle harmony; as if, like wine, it would make them drunk, whereas the effect of that is to render men bacchanals, and not make them languid): these therefore are what should employ those who are grown old. Moreover, if there is any harmony which is proper for a child's age, as being at the same time elegant and instructive, as the Lydian of all others seems chiefly to be-These then are as it were the three boundaries of education, moderation, possibility, and decorum.
The Politics of Aristotle is the second part of a treatise of which the Ethics is the first part. It looks back to the Ethics as the Ethics looks forward to the Politics. For Aristotle did not separate, as we are inclined to do, the spheres of the statesman and the moralist. In the Ethics he has described the character necessary for the good life, but that life is for him essentially to be lived in society, and when in the last chapters of the Ethics he comes to the practical application of his inquiries, that finds expression not in moral exhortations addressed to the individual but in a description of the legislative opportunities of the statesman. It is the legislator's task to frame a society which shall make the good life possible. Politics for Aristotle is not a struggle between individuals or classes for power, nor a device for getting done such elementary tasks as the maintenance of order and security without too great encroachments on individual liberty. The state is "a community of well-being in families and aggregations of families for the sake of a perfect and self-sufficing life." The legislator is a craftsman whose material is society and whose aim is the good life.
In an early dialogue of Plato's, the Protagoras, Socrates asks Protagoras why it is not as easy to find teachers of virtue as it is to find teachers of swordsmanship, riding, or any other art. Protagoras' answer is that there are no special teachers of virtue, because virtue is taught by the whole community. Plato and Aristotle both accept the view of moral education implied in this answer. In a passage of the Republic (492 b) Plato repudiates the notion that the sophists have a corrupting moral influence upon young men. The public themselves, he says, are the real sophists and the most complete and thorough educators. No private education can hold out against the irresistible force of public opinion and the ordinary moral standards of society. But that makes it all the more essential that public opinion and social environment should not be left to grow up at haphazard as they ordinarily do, but should be made by the wise legislator the expression of the good and be informed in all their details by his knowledge. The legislator is the only possible teacher of virtue.
Such a programme for a treatise on government might lead us to expect in the Politics mainly a description of a Utopia or ideal state which might inspire poets or philosophers but have little direct effect upon political institutions. Plato's Republic is obviously impracticable, for its author had turned away in despair from existing politics. He has no proposals, in that dialogue at least, for making the best of things as they are. The first lesson his philosopher has to learn is to turn away from this world of becoming and decay, and to look upon the unchanging eternal world of ideas. Thus his ideal city is, as he says, a pattern laid up in heaven by which the just man may rule his life, a pattern therefore in the meantime for the individual and not for the statesman. It is a city, he admits in the Laws, for gods or the children of gods, not for men as they are.
Aristotle has none of the high enthusiasm or poetic imagination of Plato. He is even unduly impatient of Plato's idealism, as is shown by the criticisms in the second book. But he has a power to see the possibilities of good in things that are imperfect, and the patience of the true politician who has learned that if he would make men what they ought to be, he must take them as he finds them. His ideal is constructed not of pure reason or poetry, but from careful and sympathetic study of a wide range of facts. His criticism of Plato in the light of history, in Book II. chap, v., though as a criticism it is curiously inept, reveals his own attitude admirably: "Let us remember that we should not disregard the experience of ages; in the multitude of years, these things, if they were good, would certainly not have been unknown; for almost everything has been found out, although sometimes they are not put together; in other cases men do not use the knowledge which they have." Aristotle in his Constitutions had made a study of one hundred and fifty-eight constitutions of the states of his day, and the fruits of that study are seen in the continual reference to concrete political experience, which makes the Politics in some respects a critical history of the workings of the institutions of the Greek city state. In Books IV., V., and VI. the ideal state seems far away, and we find a dispassionate survey of imperfect states, the best ways of preserving them, and an analysis of the causes of their instability. It is as though Aristotle were saying: "I have shown you the proper and normal type of constitution, but if you will not have it and insist on living under a perverted form, you may as well know how to make the best of it." In this way the Politics, though it defines the state in the light of its ideal, discusses states and institutions as they are. Ostensibly it is merely a continuation of the Ethics, but it comes to treat political questions from a purely political standpoint.
This combination of idealism and respect for the teachings of experience constitutes in some ways the strength and value of the Politics, but it also makes it harder to follow. The large nation states to which we are accustomed make it difficult for us to think that the state could be constructed and modelled to express the good life. We can appreciate Aristotle's critical analysis of constitutions, but find it hard to take seriously his advice to the legislator. Moreover, the idealism and the empiricism of the Politics are never really reconciled by Aristotle himself.
It may help to an understanding of the Politics if something is said on those two points.
We are accustomed since the growth of the historical method to the belief that states are "not made but grow," and are apt to be impatient with the belief which Aristotle and Plato show in the powers of the lawgiver. But however true the maxim may be of the modern nation state, it was not true of the much smaller and more self-conscious Greek city. When Aristotle talks of the legislator, he is not talking in the air. Students of the Academy had been actually called on to give new constitutions to Greek states. For the Greeks the constitution was not merely as it is so often with us, a matter of political machinery. It was regarded as a way of life. Further, the constitution within the framework of which the ordinary process of administration and passing of decrees went on, was always regarded as the work of a special man or body of men, the lawgivers. If we study Greek history, we find that the position of the legislator corresponds to that assigned to him by Plato and Aristotle. All Greek states, except those perversions which Aristotle criticises as being "above law," worked under rigid constitutions, and the constitution was only changed when the whole people gave a commission to a lawgiver to draw up a new one. Such was the position of the AEsumnetes, whom Aristotle describes in Book III. chap, xiv., in earlier times, and of the pupils of the Academy in the fourth century. The lawgiver was not an ordinary politician. He was a state doctor, called in to prescribe for an ailing constitution. So Herodotus recounts that when the people of Cyrene asked the oracle of Delphi to help them in their dissensions, the oracle told them to go to Mantinea, and the Mantineans lent them Demonax, who acted as a "setter straight" and drew up a new constitution for Cyrene. So again the Milesians, Herodotus tells us, were long troubled by civil discord, till they asked help from Paros, and the Parians sent ten commissioners who gave Miletus a new constitution. So the Athenians, when they were founding their model new colony at Thurii, employed Hippodamus of Miletus, whom Aristotle mentions in Book II, as the best expert in town-planning, to plan the streets of the city, and Protagoras as the best expert in law-making, to give the city its laws. In the Laws Plato represents one of the persons of the dialogue as having been asked by the people of Gortyna to draw up laws for a colony which they were founding. The situation described must have occurred frequently in actual life. The Greeks thought administration should be democratic and law-making the work of experts. We think more naturally of law-making as the special right of the people and administration as necessarily confined to experts.
Aristotle's Politics, then, is a handbook for the legislator, the expert who is to be called in when a state wants help. We have called him a state doctor. It is one of the most marked characteristics of Greek political theory that Plato and Aristotle think of the statesman as one who has knowledge of what ought to be done, and can help those who call him in to prescribe for them, rather than one who has power to control the forces of society. The desire of society for the statesman's advice is taken for granted, Plato in the Republic says that a good constitution is only possible when the ruler does not want to rule; where men contend for power, where they have not learnt to distinguish between the art of getting hold of the helm of state and the art of steering, which alone is statesmanship, true politics is impossible.
With this position much that Aristotle has to say about government is in agreement. He assumes the characteristic Platonic view that all men seek the good, and go wrong through ignorance, not through evil will, and so he naturally regards the state as a community which exists for the sake of the good life. It is in the state that that common seeking after the good which is the profoundest truth about men and nature becomes explicit and knows itself. The state is for Aristotle prior to the family and the village, although it succeeds them in time, for only when the state with its conscious organisation is reached can man understand the secret of his past struggles after something he knew not what. If primitive society is understood in the light of the state, the state is understood in the light of its most perfect form, when the good after which all societies are seeking is realised in its perfection. Hence for Aristotle as for Plato, the natural state or the state as such is the ideal state, and the ideal state is the starting-point of political inquiry.
In accordance with the same line of thought, imperfect states, although called perversions, are regarded by Aristotle as the result rather of misconception and ignorance than of perverse will. They all represent, he says, some kind of justice. Oligarchs and democrats go wrong in their conception of the good. They have come short of the perfect state through misunderstanding of the end or through ignorance of the proper means to the end. But if they are states at all, they embody some common conception of the good, some common aspirations of all their members.
The Greek doctrine that the essence of the state consists in community of purpose is the counterpart of the notion often held in modern times that the essence of the state is force. The existence of force is for Plato and Aristotle a sign not of the state but of the state's failure. It comes from the struggle between conflicting misconceptions of the good. In so far as men conceive the good rightly they are united. The state represents their common agreement, force their failure to make that agreement complete. The cure, therefore, of political ills is knowledge of the good life, and the statesman is he who has such knowledge, for that alone can give men what they are always seeking.
If the state is the organisation of men seeking a common good, power and political position must be given to those who can forward this end. This is the principle expressed in Aristotle's account of political justice, the principle of "tools to those who can use them." As the aim of the state is differently conceived, the qualifications for government will vary. In the ideal state power will be given to the man with most knowledge of the good; in other states to the men who are most truly capable of achieving that end which the citizens have set themselves to pursue. The justest distribution of political power is that in which there is least waste of political ability.
Further, the belief that the constitution of a state is only the outward expression of the common aspirations and beliefs of its members, explains the paramount political importance which Aristotle assigns to education. It is the great instrument by which the legislator can ensure that the future citizens of his state will share those common beliefs which make the state possible. The Greeks with their small states had a far clearer apprehension than we can have of the dependence of a constitution upon the people who have to work it.
Such is in brief the attitude in which Aristotle approaches political problems, but in working out its application to men and institutions as they are, Aristotle admits certain compromises which are not really consistent with it.
1. Aristotle thinks of membership of a state as community in pursuit of the good. He wishes to confine membership in it to those who are capable of that pursuit in the highest and most explicit manner. His citizens, therefore, must be men of leisure, capable of rational thought upon the end of life. He does not recognise the significance of that less conscious but deep-seated membership of the state which finds its expression in loyalty and patriotism. His definition of citizen includes only a small part of the population of any Greek city. He is forced to admit that the state is not possible without the co-operation of men whom he will not admit to membership in it, either because they are not capable of sufficient rational appreciation of political ends, like the barbarians whom he thought were natural slaves, or because the leisure necessary for citizenship can only be gained by the work of the artisans who by that very work make themselves incapable of the life which they make possible for others. "The artisan only attains excellence in proportion as he becomes a slave," and the slave is only a living instrument of the good life. He exists for the state, but the state does not exist for him.
2. Aristotle in his account of the ideal state seems to waver between two ideals. There is the ideal of an aristocracy and the ideal of what he calls constitutional government, a mixed constitution. The principle of "tools to those who can use them" ought to lead him, as it does Plato, to an aristocracy. Those who have complete knowledge of the good must be few, and therefore Plato gave entire power in his state into the hands of the small minority of philosopher guardians. It is in accordance with this principle that Aristotle holds that kingship is the proper form of government when there is in the state one man of transcendent virtue. At the same time, Aristotle always holds that absolute government is not properly political, that government is not like the rule of a shepherd over his sheep, but the rule of equals over equals. He admits that the democrats are right in insisting that equality is a necessary element in the state, though he thinks they do not admit the importance of other equally necessary elements. Hence he comes to say that ruling and being ruled over by turns is an essential feature of constitutional government, which he admits as an alternative to aristocracy. The end of the state, which is to be the standard of the distribution of political power, is conceived sometimes as a good for the apprehension and attainment of which "virtue" is necessary and sufficient (this is the principle of aristocracy), and sometimes as a more complex good, which needs for its attainment not only "virtue" but wealth and equality. This latter conception is the principle on which the mixed constitution is based. This in its distribution of political power gives some weight to "virtue," some to wealth, and some to mere number. But the principle of "ruling and being ruled by turns" is not really compatible with an unmodified principle of "tools to those who can use them." Aristotle is right in seeing that political government demands equality, not in the sense that all members of the state should be equal in ability or should have equal power, but in the sense that none of them can properly be regarded simply as tools with which the legislator works, that each has a right to say what will be made of his own life. The analogy between the legislator and the craftsman on which Plato insists, breaks down because the legislator is dealing with men like himself, men who can to some extent conceive their own end in life and cannot be treated merely as means to the end of the legislator. The sense of the value of "ruling and being ruled in turn" is derived from the experience that the ruler may use his power to subordinate the lives of the citizens of the state not to the common good but to his own private purposes. In modern terms, it is a simple, rough-and-ready attempt to solve that constant problem of politics, how efficient government is to be combined with popular control. This problem arises from the imperfection of human nature, apparent in rulers as well as in ruled, and if the principle which attempts to solve it be admitted as a principle of importance in the formation of the best constitution, then the starting-point of politics will be man's actual imperfection, not his ideal nature. Instead, then, of beginning with a state which would express man's ideal nature, and adapting it as well as may be to man's actual shortcomings from that ideal, we must recognise that the state and all political machinery are as much the expression of man's weakness as of his ideal possibilities. The state is possible only because men have common aspirations, but government, and political power, the existence of officials who are given authority to act in the name of the whole state, are necessary because men's community is imperfect, because man's social nature expresses itself in conflicting ways, in the clash of interests, the rivalry of parties, and the struggle of classes, instead of in the united seeking after a common good. Plato and Aristotle were familiar with the legislator who was called in by the whole people, and they tended therefore to take the general will or common consent of the people for granted. Most political questions are concerned with the construction and expression of the general will, and with attempts to ensure that the political machinery made to express the general will shall not be exploited for private or sectional ends.
Aristotle's mixed constitution springs from a recognition of sectional interests in the state. For the proper relation between the claims of "virtue," wealth, and numbers is to be based not upon their relative importance in the good life, but upon the strength of the parties which they represent. The mixed constitution is practicable in a state where the middle class is strong, as only the middle class can mediate between the rich and the poor. The mixed constitution will be stable if it represents the actual balance of power between different classes in the state. When we come to Aristotle's analysis of existing constitutions, we find that while he regards them as imperfect approximations to the ideal, he also thinks of them as the result of the struggle between classes. Democracy, he explains, is the government not of the many but of the poor; oligarchy a government not of the few but of the rich. And each class is thought of, not as trying to express an ideal, but as struggling to acquire power or maintain its position. If ever the class existed in unredeemed nakedness, it was in the Greek cities of the fourth century, and its existence is abundantly recognised by Aristotle. His account of the causes of revolutions in Book V. shows how far were the existing states of Greece from the ideal with which he starts. His analysis of the facts forces him to look upon them as the scene of struggling factions. The causes of revolutions are not described as primarily changes in the conception of the common good, but changes in the military or economic power of the several classes in the state. The aim which he sets before oligarchs or democracies is not the good life, but simple stability or permanence of the existing constitution.
With this spirit of realism which pervades Books IV., V., and VI. the idealism of Books I., II., VII., and VIII. is never reconciled. Aristotle is content to call existing constitutions perversions of the true form. But we cannot read the Politics without recognising and profiting from the insight into the nature of the state which is revealed throughout. Aristotle's failure does not lie in this, that he is both idealist and realist, but that he keeps these two tendencies too far apart. He thinks too much of his ideal state, as something to be reached once for all by knowledge, as a fixed type to which actual states approximate or from which they are perversions. But if we are to think of actual politics as intelligible in the light of the ideal, we must think of that ideal as progressively revealed in history, not as something to be discovered by turning our back on experience and having recourse to abstract reasoning. If we stretch forward from what exists to an ideal, it is to a better which may be in its turn transcended, not to a single immutable best. Aristotle found in the society of his time men who were not capable of political reflection, and who, as he thought, did their best work under superintendence. He therefore called them natural slaves. For, according to Aristotle, that is a man's natural condition in which he does his best work. But Aristotle also thinks of nature as something fixed and immutable; and therefore sanctions the institution of slavery, which assumes that what men are that they will always be, and sets up an artificial barrier to their ever becoming anything else. We see in Aristotle's defence of slavery how the conception of nature as the ideal can have a debasing influence upon views of practical politics. His high ideal of citizenship offers to those who can satisfy its claims the prospect of a fair life; those who fall short are deemed to be different in nature and shut out entirely from approach to the ideal.
A. D. LINDSAY.
Politics: Personal Wiki by [[David Fisco|http://www.davidfisco.com]]
* [[ Politics Personal Wiki Homepage|http://personal-wikis.davidfisco.com/politics]]
* [[Note on Tiddler Titles]]
* Feedback: [[Email David Fisco|mailto:bulkmail@davidfisco.com?subject= Politics+Personal+Wiki+Feedback]]
* [[TiddlyWiki Homepage|http://tiddlywiki.com/]]
* [[TiddlyWiki Markdown|http://tiddlywiki.com/#WikiText]]
---
!!![[Chapter I|Jowett: Book Eight: Chapter I]]
{{Jowett: Book Eight: Chapter I}}
---
!!![[Chapter II|Jowett: Book Eight: Chapter II]]
{{Jowett: Book Eight: Chapter II}}
---
!!![[Chapter III|Jowett: Book Eight: Chapter III]]
{{Jowett: Book Eight: Chapter III}}
---
!!![[Chapter IV|Jowett: Book Eight: Chapter IV]]
{{Jowett: Book Eight: Chapter IV}}
---
!!![[Chapter V|Jowett: Book Eight: Chapter V]]
{{Jowett: Book Eight: Chapter V}}
---
!!![[Chapter VI|Jowett: Book Eight: Chapter VI]]
{{Jowett: Book Eight: Chapter VI}}
---
!!![[Chapter VII|Jowett: Book Eight: Chapter VII]]
{{Jowett: Book Eight: Chapter VII}}
NO one will doubt that the legislator should direct his attention above all to the education of youth; for the neglect of education does harm to the constitution The citizen should be molded to suit the form of government under which he lives. For each government has a peculiar character which originally formed and which continues to preserve it. The character of democracy creates democracy, and the character of oligarchy creates oligarchy; and always the better the character, the better the government.
Again, for the exercise of any faculty or art a previous training and habituation are required; clearly therefore for the practice of virtue. And since the whole city has one end, it is manifest that education should be one and the same for all, and that it should be public, and not private — not as at present, when every one looks after his own children separately, and gives them separate instruction of the sort which he thinks best; the training in things which are of common interest should be the same for all. Neither must we suppose that any one of the citizens belongs to himself, for they all belong to the state, and are each of them a part of the state, and the care of each part is inseparable from the care of the whole. In this particular as in some others the Lacedaemonians are to be praised, for they take the greatest pains about their children, and make education the business of the state.
That education should be regulated by law and should be an affair of state is not to be denied, but what should be the character of this public education, and how young persons should be educated, are questions which remain to be considered. As things are, there is disagreement about the subjects. For mankind are by no means agreed about the things to be taught, whether we look to virtue or the best life. Neither is it clear whether education is more concerned with intellectual or with moral virtue. The existing practice is perplexing; no one knows on what principle we should proceed — should the useful in life, or should virtue, or should the higher knowledge, be the aim of our training; all three opinions have been entertained. Again, about the means there is no agreement; for different persons, starting with different ideas about the nature of virtue, naturally disagree about the practice of it. There can be no doubt that children should be taught those useful things which are really necessary, but not all useful things; for occupations are divided into liberal and illiberal; and to young children should be imparted only such kinds of knowledge as will be useful to them without vulgarizing them. And any occupation, art, or science, which makes the body or soul or mind of the freeman less fit for the practice or exercise of virtue, is vulgar; wherefore we call those arts vulgar which tend to deform the body, and likewise all paid employments, for they absorb and degrade the mind. There are also some liberal arts quite proper for a freeman to acquire, but only in a certain degree, and if he attend to them too closely, in order to attain perfection in them, the same evil effects will follow. The object also which a man sets before him makes a great difference; if he does or learns anything for his own sake or for the sake of his friends, or with a view to excellence the action will not appear illiberal; but if done for the sake of others, the very same action will be thought menial and servile. The received subjects of instruction, as I have already remarked, are partly of a liberal and party of an illiberal character.
The customary branches of education are in number four; they are —(1) reading and writing, (2) gymnastic exercises, (3) music, to which is sometimes added (4) drawing. Of these, reading and writing and drawing are regarded as useful for the purposes of life in a variety of ways, and gymnastic exercises are thought to infuse courage. concerning music a doubt may be raised — in our own day most men cultivate it for the sake of pleasure, but originally it was included in education, because nature herself, as has been often said, requires that we should be able, not only to work well, but to use leisure well; for, as I must repeat once again, the first principle of all action is leisure. Both are required, but leisure is better than occupation and is its end; and therefore the question must be asked, what ought we to do when at leisure? Clearly we ought not to be amusing ourselves, for then amusement would be the end of life. But if this is inconceivable, and amusement is needed more amid serious occupations than at other times (for he who is hard at work has need of relaxation, and amusement gives relaxation, whereas occupation is always accompanied with exertion and effort), we should introduce amusements only at suitable times, and they should be our medicines, for the emotion which they create in the soul is a relaxation, and from the pleasure we obtain rest. But leisure of itself gives pleasure and happiness and enjoyment of life, which are experienced, not by the busy man, but by those who have leisure. For he who is occupied has in view some end which he has not attained; but happiness is an end, since all men deem it to be accompanied with pleasure and not with pain. This pleasure, however, is regarded differently by different persons, and varies according to the habit of individuals; the pleasure of the best man is the best, and springs from the noblest sources. It is clear then that there are branches of learning and education which we must study merely with a view to leisure spent in intellectual activity, and these are to be valued for their own sake; whereas those kinds of knowledge which are useful in business are to be deemed necessary, and exist for the sake of other things. And therefore our fathers admitted music into education, not on the ground either of its necessity or utility, for it is not necessary, nor indeed useful in the same manner as reading and writing, which are useful in money-making, in the management of a household, in the acquisition of knowledge and in political life, nor like drawing, useful for a more correct judgment of the works of artists, nor again like gymnastic, which gives health and strength; for neither of these is to be gained from music. There remains, then, the use of music for intellectual enjoyment in leisure; which is in fact evidently the reason of its introduction, this being one of the ways in which it is thought that a freeman should pass his leisure; as Homer says,
<<<
But he who alone should be called to the pleasant feast,
<<<
and afterwards he speaks of others whom he describes as inviting
<<<
The bard who would delight them all.
<<<
And in another place Odysseus says there is no better way of passing life than when men’s hearts are merry and
The banqueters in the hall, sitting in order, hear the voice of the minstrel.
It is evident, then, that there is a sort of education in which parents should train their sons, not as being useful or necessary, but because it is liberal or noble. Whether this is of one kind only, or of more than one, and if so, what they are, and how they are to be imparted, must hereafter be determined. Thus much we are now in a position to say, that the ancients witness to us; for their opinion may be gathered from the fact that music is one of the received and traditional branches of education. Further, it is clear that children should be instructed in some useful things — for example, in reading and writing — not only for their usefulness, but also because many other sorts of knowledge are acquired through them. With a like view they may be taught drawing, not to prevent their making mistakes in their own purchases, or in order that they may not be imposed upon in the buying or selling of articles, but perhaps rather because it makes them judges of the beauty of the human form. To be always seeking after the useful does not become free and exalted souls. Now it is clear that in education practice must be used before theory, and the body be trained before the mind; and therefore boys should be handed over to the trainer, who creates in them the roper habit of body, and to the wrestling-master, who teaches them their exercises.
Of those states which in our own day seem to take the greatest care of children, some aim at producing in them an athletic habit, but they only injure their forms and stunt their growth. Although the Lacedaemonians have not fallen into this mistake, yet they brutalize their children by laborious exercises which they think will make them courageous. But in truth, as we have often repeated, education should not be exclusively, or principally, directed to this end. And even if we suppose the Lacedaemonians to be right in their end, they do not attain it. For among barbarians and among animals courage is found associated, not with the greatest ferocity, but with a gentle and lion like temper. There are many races who are ready enough to kill and eat men, such as the Achaeans and Heniochi, who both live about the Black Sea; and there are other mainland tribes, as bad or worse, who all live by plunder, but have no courage. It is notorious that the Lacedaemonians themselves, while they alone were assiduous in their laborious drill, were superior to others, but now they are beaten both in war and gymnastic exercises. For their ancient superiority did not depend on their mode of training their youth, but only on the circumstance that they trained them when their only rivals did not. Hence we may infer that what is noble, not what is brutal, should have the first place; no wolf or other wild animal will face a really noble danger; such dangers are for the brave man. And parents who devote their children to gymnastics while they neglect their necessary education, in reality vulgarize them; for they make them useful to the art of statesmanship in one quality only, and even in this the argument proves them to be inferior to others. We should judge the Lacedaemonians not from what they have been, but from what they are; for now they have rivals who compete with their education; formerly they had none.
It is an admitted principle, that gymnastic exercises should be employed in education, and that for children they should be of a lighter kind, avoiding severe diet or painful toil, lest the growth of the body be impaired. The evil of excessive training in early years is strikingly proved by the example of the Olympic victors; for not more than two or three of them have gained a prize both as boys and as men; their early training and severe gymnastic exercises exhausted their constitutions. When boyhood is over, three years should be spent in other studies; the period of life which follows may then be devoted to hard exercise and strict diet. Men ought not to labor at the same time with their minds and with their bodies; for the two kinds of labor are opposed to one another; the labor of the body impedes the mind, and the labor of the mind the body.
Concerning music there are some questions which we have already raised; these we may now resume and carry further; and our remarks will serve as a prelude to this or any other discussion of the subject. It is not easy to determine the nature of music, or why any one should have a knowledge of it. Shall we say, for the sake of amusement and relaxation, like sleep or drinking, which are not good in themselves, but are pleasant, and at the same time ‘care to cease,’ as Euripides says? And for this end men also appoint music, and make use of all three alike — sleep, drinking, music — to which some add dancing. Or shall we argue that music conduces to virtue, on the ground that it can form our minds and habituate us to true pleasures as our bodies are made by gymnastic to be of a certain character? Or shall we say that it contributes to the enjoyment of leisure and mental cultivation, which is a third alternative? Now obviously youths are not to be instructed with a view to their amusement, for learning is no amusement, but is accompanied with pain. Neither is intellectual enjoyment suitable to boys of that age, for it is the end, and that which is imperfect cannot attain the perfect or end. But perhaps it may be said that boys learn music for the sake of the amusement which they will have when they are grown up. If so, why should they learn themselves, and not, like the Persian and Median kings, enjoy the pleasure and instruction which is derived from hearing others? (for surely persons who have made music the business and profession of their lives will be better performers than those who practice only long enough to learn). If they must learn music, on the same principle they should learn cookery, which is absurd. And even granting that music may form the character, the objection still holds: why should we learn ourselves? Why cannot we attain true pleasure and form a correct judgment from hearing others, like the Lacedaemonians? — for they, without learning music, nevertheless can correctly judge, as they say, of good and bad melodies. Or again, if music should be used to promote cheerfulness and refined intellectual enjoyment, the objection still remains — why should we learn ourselves instead of enjoying the performances of others? We may illustrate what we are saying by our conception of the Gods; for in the poets Zeus does not himself sing or play on the lyre. Nay, we call professional performers vulgar; no freeman would play or sing unless he were intoxicated or in jest. But these matters may be left for the present.
The first question is whether music is or is not to be a part of education. Of the three things mentioned in our discussion, which does it produce? — education or amusement or intellectual enjoyment, for it may be reckoned under all three, and seems to share in the nature of all of them. Amusement is for the sake of relaxation, and relaxation is of necessity sweet, for it is the remedy of pain caused by toil; and intellectual enjoyment is universally acknowledged to contain an element not only of the noble but of the pleasant, for happiness is made up of both. All men agree that music is one of the pleasantest things, whether with or without songs; as Musaeus says:
<<<
Song to mortals of all things the sweetest.
<<<
Hence and with good reason it is introduced into social gatherings and entertainments, because it makes the hearts of men glad: so that on this ground alone we may assume that the young ought to be trained in it. For innocent pleasures are not only in harmony with the perfect end of life, but they also provide relaxation. And whereas men rarely attain the end, but often rest by the way and amuse themselves, not only with a view to a further end, but also for the pleasure’s sake, it may be well at times to let them find a refreshment in music. It sometimes happens that men make amusement the end, for the end probably contains some element of pleasure, though not any ordinary or lower pleasure; but they mistake the lower for the higher, and in seeking for the one find the other, since every pleasure has a likeness to the end of action. For the end is not eligible for the sake of any future good, nor do the pleasures which we have described exist for the sake of any future good but of the past, that is to say, they are the alleviation of past toils and pains. And we may infer this to be the reason why men seek happiness from these pleasures.
But music is pursued, not only as an alleviation of past toil, but also as providing recreation. And who can say whether, having this use, it may not also have a nobler one? In addition to this common pleasure, felt and shared in by all (for the pleasure given by music is natural, and therefore adapted to all ages and characters), may it not have also some influence over the character and the soul? It must have such an influence if characters are affected by it. And that they are so affected is proved in many ways, and not least by the power which the songs of Olympus exercise; for beyond question they inspire enthusiasm, and enthusiasm is an emotion of the ethical part of the soul. Besides, when men hear imitations, even apart from the rhythms and tunes themselves, their feelings move in sympathy. Since then music is a pleasure, and virtue consists in rejoicing and loving and hating aright, there is clearly nothing which we are so much concerned to acquire and to cultivate as the power of forming right judgments, and of taking delight in good dispositions and noble actions. Rhythm and melody supply imitations of anger and gentleness, and also of courage and temperance, and of all the qualities contrary to these, and of the other qualities of character, which hardly fall short of the actual affections, as we know from our own experience, for in listening to such strains our souls undergo a change. The habit of feeling pleasure or pain at mere representations is not far removed from the same feeling about realities; for example, if any one delights in the sight of a statue for its beauty only, it necessarily follows that the sight of the original will be pleasant to him. The objects of no other sense, such as taste or touch, have any resemblance to moral qualities; in visible objects there is only a little, for there are figures which are of a moral character, but only to a slight extent, and all do not participate in the feeling about them. Again, figures and colors are not imitations, but signs, of moral habits, indications which the body gives of states of feeling. The connection of them with morals is slight, but in so far as there is any, young men should be taught to look, not at the works of Pauson, but at those of Polygnotus, or any other painter or sculptor who expresses moral ideas. On the other hand, even in mere melodies there is an imitation of character, for the musical modes differ essentially from one another, and those who hear them are differently affected by each. Some of them make men sad and grave, like the so-called Mixolydian, others enfeeble the mind, like the relaxed modes, another, again, produces a moderate and settled temper, which appears to be the peculiar effect of the Dorian; the Phrygian inspires enthusiasm. The whole subject has been well treated by philosophical writers on this branch of education, and they confirm their arguments by facts. The same principles apply to rhythms; some have a character of rest, others of motion, and of these latter again, some have a more vulgar, others a nobler movement. Enough has been said to show that music has a power of forming the character, and should therefore be introduced into the education of the young. The study is suited to the stage of youth, for young persons will not, if they can help, endure anything which is not sweetened by pleasure, and music has a natural sweetness. There seems to be in us a sort of affinity to musical modes and rhythms, which makes some philosophers say that the soul is a tuning, others, that it possesses tuning.
And now we have to determine the question which has been already raised, whether children should be themselves taught to sing and play or not. Clearly there is a considerable difference made in the character by the actual practice of the art. It is difficult, if not impossible, for those who do not perform to be good judges of the performance of others. Besides, children should have something to do, and the rattle of Archytas, which people give to their children in order to amuse them and prevent them from breaking anything in the house, was a capital invention, for a young thing cannot be quiet. The rattle is a toy suited to the infant mind, and education is a rattle or toy for children of a larger growth. We conclude then that they should be taught music in such a way as to become not only critics but performers.
The question what is or is not suitable for different ages may be easily answered; nor is there any difficulty in meeting the objection of those who say that the study of music is vulgar. We reply (1) in the first place, that they who are to be judges must also be performers, and that they should begin to practice early, although when they are older they may be spared the execution; they must have learned to appreciate what is good and to delight in it, thanks to the knowledge which they acquired in their youth. As to (2) the vulgarizing effect which music is supposed to exercise, this is a question which we shall have no difficulty in determining, when we have considered to what extent freemen who are being trained to political virtue should pursue the art, what melodies and what rhythms they should be allowed to use, and what instruments should be employed in teaching them to play; for even the instrument makes a difference. The answer to the objection turns upon these distinctions; for it is quite possible that certain methods of teaching and learning music do really have a degrading effect. It is evident then that the learning of music ought not to impede the business of riper years, or to degrade the body or render it unfit for civil or military training, whether for bodily exercises at the time or for later studies.
The right measure will be attained if students of music stop short of the arts which are practiced in professional contests, and do not seek to acquire those fantastic marvels of execution which are now the fashion in such contests, and from these have passed into education. Let the young practice even such music as we have prescribed, only until they are able to feel delight in noble melodies and rhythms, and not merely in that common part of music in which every slave or child and even some animals find pleasure.
From these principles we may also infer what instruments should be used. The flute, or any other instrument which requires great skill, as for example the harp, ought not to be admitted into education, but only such as will make intelligent students of music or of the other parts of education. Besides, the flute is not an instrument which is expressive of moral character; it is too exciting. The proper time for using it is when the performance aims not at instruction, but at the relief of the passions. And there is a further objection; the impediment which the flute presents to the use of the voice detracts from its educational value. The ancients therefore were right in forbidding the flute to youths and freemen, although they had once allowed it. For when their wealth gave them a greater inclination to leisure, and they had loftier notions of excellence, being also elated with their success, both before and after the Persian War, with more zeal than discernment they pursued every kind of knowledge, and so they introduced the flute into education. At Lacedaemon there was a choragus who led the chorus with a flute, and at Athens the instrument became so popular that most freemen could play upon it. The popularity is shown by the tablet which Thrasippus dedicated when he furnished the chorus to Ecphantides. Later experience enabled men to judge what was or was not really conducive to virtue, and they rejected both the flute and several other old-fashioned instruments, such as the Lydian harp, the many-stringed lyre, the ‘heptagon,’ ‘triangle,’ ‘sambuca,’ the like — which are intended only to give pleasure to the hearer, and require extraordinary skill of hand. There is a meaning also in the myth of the ancients, which tells how Athene invented the flute and then threw it away. It was not a bad idea of theirs, that the Goddess disliked the instrument because it made the face ugly; but with still more reason may we say that she rejected it because the acquirement of flute-playing contributes nothing to the mind, since to Athene we ascribe both knowledge and art.
Thus then we reject the professional instruments and also the professional mode of education in music (and by professional we mean that which is adopted in contests), for in this the performer practices the art, not for the sake of his own improvement, but in order to give pleasure, and that of a vulgar sort, to his hearers. For this reason the execution of such music is not the part of a freeman but of a paid performer, and the result is that the performers are vulgarized, for the end at which they aim is bad. The vulgarity of the spectator tends to lower the character of the music and therefore of the performers; they look to him — he makes them what they are, and fashions even their bodies by the movements which he expects them to exhibit.
We have also to consider rhythms and modes, and their use in education. Shall we use them all or make a distinction? and shall the same distinction be made for those who practice music with a view to education, or shall it be some other? Now we see that music is produced by melody and rhythm, and we ought to know what influence these have respectively on education, and whether we should prefer excellence in melody or excellence in rhythm. But as the subject has been very well treated by many musicians of the present day, and also by philosophers who have had considerable experience of musical education, to these we would refer the more exact student of the subject; we shall only speak of it now after the manner of the legislator, stating the general principles.
We accept the division of melodies proposed by certain philosophers into ethical melodies, melodies of action, and passionate or inspiring melodies, each having, as they say, a mode corresponding to it. But we maintain further that music should be studied, not for the sake of one, but of many benefits, that is to say, with a view to (1) education, (2) purgation (the word ‘purgation’ we use at present without explanation, but when hereafter we speak of poetry, we will treat the subject with more precision); music may also serve (3) for for enjoyment, for relaxation, and for recreation after exertion. It is clear, therefore, that all the modes must be employed by us, but not all of them in the same manner. In education the most ethical modes are to be preferred, but in listening to the performances of others we may admit the modes of action and passion also. For feelings such as pity and fear, or, again, enthusiasm, exist very strongly in some souls, and have more or less influence over all. Some persons fall into a religious frenzy, whom we see as a result of the sacred melodies — when they have used the melodies that excite the soul to mystic frenzy — restored as though they had found healing and purgation. Those who are influenced by pity or fear, and every emotional nature, must have a like experience, and others in so far as each is susceptible to such emotions, and all are in a manner purged and their souls lightened and delighted. The purgative melodies likewise give an innocent pleasure to mankind. Such are the modes and the melodies in which those who perform music at the theater should be invited to compete. But since the spectators are of two kinds — the one free and educated, and the other a vulgar crowd composed of mechanics, laborers, and the like — there ought to be contests and exhibitions instituted for the relaxation of the second class also. And the music will correspond to their minds; for as their minds are perverted from the natural state, so there are perverted modes and highly strung and unnaturally colored melodies. A man receives pleasure from what is natural to him, and therefore professional musicians may be allowed to practice this lower sort of music before an audience of a lower type. But, for the purposes of education, as I have already said, those modes and melodies should be employed which are ethical, such as the Dorian, as we said before; though we may include any others which are approved by philosophers who have had a musical education. The Socrates of the Republic is wrong in retaining only the Phrygian mode along with the Dorian, and the more so because he rejects the flute; for the Phrygian is to the modes what the flute is to musical instruments — both of them are exciting and emotional. Poetry proves this, for Bacchic frenzy and all similar emotions are most suitably expressed by the flute, and are better set to the Phrygian than to any other mode. The dithyramb, for example, is acknowledged to be Phrygian, a fact of which the connoisseurs of music offer many proofs, saying, among other things, that Philoxenus, having attempted to compose his Mysians as a dithyramb in the Dorian mode, found it impossible, and fell back by the very nature of things into the more appropriate Phrygian. All men agree that the Dorian music is the gravest and manliest. And whereas we say that the extremes should be avoided and the mean followed, and whereas the Dorian is a mean between the other modes, it is evident that our youth should be taught the Dorian music.
Two principles have to be kept in view, what is possible, what is becoming: at these every man ought to aim. But even these are relative to age; the old, who have lost their powers, cannot very well sing the high-strung modes, and nature herself seems to suggest that their songs should be of the more relaxed kind. Wherefore the musicians likewise blame Socrates, and with justice, for rejecting the relaxed modes in education under the idea that they are intoxicating, not in the ordinary sense of intoxication (for wine rather tends to excite men), but because they have no strength in them. And so, with a view also to the time of life when men begin to grow old, they ought to practice the gentler modes and melodies as well as the others, and, further, any mode, such as the Lydian above all others appears to be, which is suited to children of tender age, and possesses the elements both of order and of education. Thus it is clear that education should be based upon three principles — the mean, the possible, the becoming, these three.
---
!!![[Chapter I|Jowett: Book Five: Chapter I]]
{{Jowett: Book Five: Chapter I}}
---
!!![[Chapter II|Jowett: Book Five: Chapter II]]
{{Jowett: Book Five: Chapter II}}
---
!!![[Chapter III|Jowett: Book Five: Chapter III]]
{{Jowett: Book Five: Chapter III}}
---
!!![[Chapter IV|Jowett: Book Five: Chapter IV]]
{{Jowett: Book Five: Chapter IV}}
---
!!![[Chapter V|Jowett: Book Five: Chapter V]]
{{Jowett: Book Five: Chapter V}}
---
!!![[Chapter VI|Jowett: Book Five: Chapter VI]]
{{Jowett: Book Five: Chapter VI}}
---
!!![[Chapter VII|Jowett: Book Five: Chapter VII]]
{{Jowett: Book Five: Chapter VII}}
---
!!![[Chapter VIII|Jowett: Book Five: Chapter VIII]]
{{Jowett: Book Five: Chapter VIII}}
---
!!![[Chapter IX|Jowett: Book Five: Chapter IX]]
{{Jowett: Book Five: Chapter IX}}
---
!!![[Chapter X|Jowett: Book Five: Chapter X]]
{{Jowett: Book Five: Chapter X}}
---
!!![[Chapter XI|Jowett: Book Five: Chapter XI]]
{{Jowett: Book Five: Chapter XI}}
---
!!![[Chapter XII|Jowett: Book Five: Chapter XII]]
{{Jowett: Book Five: Chapter XII}}
THE design which we proposed to ourselves is now nearly completed. Next in order follow the causes of revolution in states, how many, and of what nature they are; what modes of destruction apply to particular states, and out of what, and into what they mostly change; also what are the modes of preservation in states generally, or in a particular state, and by what means each state may be best preserved: these questions remain to be considered.
In the first place we must assume as our starting-point that in the many forms of government which have sprung up there has always been an acknowledgment of justice and proportionate equality, although mankind fail attaining them, as I have already explained. Democracy, for example, arises out of the notion that those who are equal in any respect are equal in all respects; because men are equally free, they claim to be absolutely equal. Oligarchy is based on the notion that those who are unequal in one respect are in all respects unequal; being unequal, that is, in property, they suppose themselves to be unequal absolutely. The democrats think that as they are equal they ought to be equal in all things; while the oligarchs, under the idea that they are unequal, claim too much, which is one form of inequality. All these forms of government have a kind of justice, but, tried by an absolute standard, they are faulty; and, therefore, both parties, whenever their share in the government does not accord with their preconceived ideas, stir up revolution. Those who excel in virtue have the best right of all to rebel (for they alone can with reason be deemed absolutely unequal), but then they are of all men the least inclined to do so. There is also a superiority which is claimed by men of rank; for they are thought noble because they spring from wealthy and virtuous ancestors. Here then, so to speak, are opened the very springs and fountains of revolution; and hence arise two sorts of changes in governments; the one affecting the constitution, when men seek to change from an existing form into some other, for example, from democracy into oligarchy, and from oligarchy into democracy, or from either of them into constitutional government or aristocracy, and conversely; the other not affecting the constitution, when, without disturbing the form of government, whether oligarchy, or monarchy, or any other, they try to get the administration into their own hands. Further, there is a question of degree; an oligarchy, for example, may become more or less oligarchical, and a democracy more or less democratical; and in like manner the characteristics of the other forms of government may be more or less strictly maintained. Or the revolution may be directed against a portion of the constitution only, e.g., the establishment or overthrow of a particular office: as at Sparta it is said that Lysander attempted to overthrow the monarchy, and King Pausanias, the Ephoralty. At Epidamnus, too, the change was partial. For instead of phylarchs or heads of tribes, a council was appointed; but to this day the magistrates are the only members of the ruling class who are compelled to go to the Heliaea when an election takes place, and the office of the single archon was another oligarchical feature. Everywhere inequality is a cause of revolution, but an inequality in which there is no proportion — for instance, a perpetual monarchy among equals; and always it is the desire of equality which rises in rebellion.
Now equality is of two kinds, numerical and proportional; by the first I mean sameness or equality in number or size; by the second, equality of ratios. For example, the excess of three over two is numerically equal to the excess of two over one; whereas four exceeds two in the same ratio in which two exceeds one, for two is the same part of four that one is of two, namely, the half. As I was saying before, men agree that justice in the abstract is proportion, but they differ in that some think that if they are equal in any respect they are equal absolutely, others that if they are unequal in any respect they should be unequal in all. Hence there are two principal forms of government, democracy and oligarchy; for good birth and virtue are rare, but wealth and numbers are more common. In what city shall we find a hundred persons of good birth and of virtue? whereas the rich everywhere abound. That a state should be ordered, simply and wholly, according to either kind of equality, is not a good thing; the proof is the fact that such forms of government never last. They are originally based on a mistake, and, as they begin badly, cannot fall to end badly. The inference is that both kinds of equality should be employed; numerical in some cases, and proportionate in others.
Still democracy appears to be safer and less liable to revolution than oligarchy. For in oligarchies there is the double danger of the oligarchs falling out among themselves and also with the people; but in democracies there is only the danger of a quarrel with the oligarchs. No dissension worth mentioning arises among the people themselves. And we may further remark that a government which is composed of the middle class more nearly approximates to democracy than to oligarchy, and is the safest of the imperfect forms of government.
In considering how dissensions and poltical revolutions arise, we must first of all ascertain the beginnings and causes of them which affect constitutions generally. They may be said to be three in number; and we have now to give an outline of each. We want to know (1) what is the feeling? (2) what are the motives of those who make them? (3) whence arise political disturbances and quarrels? The universal and chief cause of this revolutionary feeling has been already mentioned; viz., the desire of equality, when men think that they are equal to others who have more than themselves; or, again, the desire of inequality and superiority, when conceiving themselves to be superior they think that they have not more but the same or less than their inferiors; pretensions which may and may not be just. Inferiors revolt in order that they may be equal, and equals that they may be superior. Such is the state of mind which creates revolutions. The motives for making them are the desire of gain and honor, or the fear of dishonor and loss; the authors of them want to divert punishment or dishonor from themselves or their friends. The causes and reasons of revolutions, whereby men are themselves affected in the way described, and about the things which I have mentioned, viewed in one way may be regarded as seven, and in another as more than seven. Two of them have been already noticed; but they act in a different manner, for men are excited against one another by the love of gain and honor — not, as in the case which I have just supposed, in order to obtain them for themselves, but at seeing others, justly or unjustly, engrossing them. Other causes are insolence, fear, excessive predominance, contempt, disproportionate increase in some part of the state; causes of another sort are election intrigues, carelessness, neglect about trifles, dissimilarity of elements.
What share insolence and avarice have in creating revolutions, and how they work, is plain enough. When the magistrates are insolent and grasping they conspire against one another and also against the constitution from which they derive their power, making their gains either at the expense of individuals or of the public. It is evident, again, what an influence honor exerts and how it is a cause of revolution. Men who are themselves dishonored and who see others obtaining honors rise in rebellion; the honor or dishonor when undeserved is unjust; and just when awarded according to merit.
Again, superiority is a cause of revolution when one or more persons have a power which is too much for the state and the power of the government; this is a condition of affairs out of which there arises a monarchy, or a family oligarchy. And therefore, in some places, as at Athens and Argos, they have recourse to ostracism. But how much better to provide from the first that there should be no such pre-eminent individuals instead of letting them come into existence and then finding a remedy.
Another cause of revolution is fear. Either men have committed wrong, and are afraid of punishment, or they are expecting to suffer wrong and are desirous of anticipating their enemy. Thus at Rhodes the notables conspired against the people through fear of the suits that were brought against them. Contempt is also a cause of insurrection and revolution; for example, in oligarchies — when those who have no share in the state are the majority, they revolt, because they think that they are the stronger. Or, again, in democracies, the rich despise the disorder and anarchy of the state; at Thebes, for example, where, after the battle of Oenophyta, the bad administration of the democracy led to its ruin. At Megara the fall of the democracy was due to a defeat occasioned by disorder and anarchy. And at Syracuse the democracy aroused contempt before the tyranny of Gelo arose; at Rhodes, before the insurrection.
Political revolutions also spring from a disproportionate increase in any part of the state. For as a body is made up of many members, and every member ought to grow in proportion, that symmetry may be preserved; but loses its nature if the foot be four cubits long and the rest of the body two spans; and, should the abnormal increase be one of quality as well as of quantity, may even take the form of another animal: even so a state has many parts, of which some one may often grow imperceptibly; for example, the number of poor in democracies and in constitutional states. And this disproportion may sometimes happen by an accident, as at Tarentum, from a defeat in which many of the notables were slain in a battle with the Iapygians just after the Persian War, the constitutional government in consequence becoming a democracy; or as was the case at Argos, where the Argives, after their army had been cut to pieces on the seventh day of the month by Cleomenes the Lacedaemonian, were compelled to admit to citizen some of their Perioeci; and at Athens, when, after frequent defeats of their infantry at the time of the Peloponnesian War, the notables were reduced in number, because the soldiers had to be taken from the roll of citizens. Revolutions arise from this cause as well, in democracies as in other forms of government, but not to so great an extent. When the rich grow numerous or properties increase, the form of government changes into an oligarchy or a government of families. Forms of government also change — sometimes even without revolution, owing to election contests, as at Heraea (where, instead of electing their magistrates, they took them by lot, because the electors were in the habit of choosing their own partisans); or owing to carelessness, when disloyal persons are allowed to find their way into the highest offices, as at Oreum, where, upon the accession of Heracleodorus to office, the oligarchy was overthrown, and changed by him into a constitutional and democratical government.
Again, the revolution may be facilitated by the slightness of the change; I mean that a great change may sometimes slip into the constitution through neglect of a small matter; at Ambracia, for instance, the qualification for office, small at first, was eventually reduced to nothing. For the Ambraciots thought that a small qualification was much the same as none at all.
Another cause of revolution is difference of races which do not at once acquire a common spirit; for a state is not the growth of a day, any more than it grows out of a multitude brought together by accident. Hence the reception of strangers in colonies, either at the time of their foundation or afterwards, has generally produced revolution; for example, the Achaeans who joined the Troezenians in the foundation of Sybaris, becoming later the more numerous, expelled them; hence the curse fell upon Sybaris. At Thurii the Sybarites quarrelled with their fellow-colonists; thinking that the land belonged to them, they wanted too much of it and were driven out. At Byzantium the new colonists were detected in a conspiracy, and were expelled by force of arms; the people of Antissa, who had received the Chian exiles, fought with them, and drove them out; and the Zancleans, after having received the Samians, were driven by them out of their own city. The citizens of Apollonia on the Euxine, after the introduction of a fresh body of colonists, had a revolution; the Syracusans, after the expulsion of their tyrants, having admitted strangers and mercenaries to the rights of citizenship, quarrelled and came to blows; the people of Amphipolis, having received Chalcidian colonists, were nearly all expelled by them.
Now, in oligarchies the masses make revolution under the idea that they are unjustly treated, because, as I said before, they are equals, and have not an equal share, and in democracies the notables revolt, because they are not equals, and yet have only an equal share.
Again, the situation of cities is a cause of revolution when the country is not naturally adapted to preserve the unity of the state. For example, the Chytians at Clazomenae did not agree with the people of the island; and the people of Colophon quarrelled with the Notians; at Athens too, the inhabitants of the Piraeus are more democratic than those who live in the city. For just as in war the impediment of a ditch, though ever so small, may break a regiment, so every cause of difference, however slight, makes a breach in a city. The greatest opposition is confessedly that of virtue and vice; next comes that of wealth and poverty; and there are other antagonistic elements, greater or less, of which one is this difference of place.
In revolutions the occasions may be trifling, but great interests are at stake. Even trifles are most important when they concern the rulers, as was the case of old at Syracuse; for the Syracusan constitution was once changed by a love-quarrel of two young men, who were in the government. The story is that while one of them was away from home his beloved was gained over by his companion, and he to revenge himself seduced the other’s wife. They then drew the members of the ruling class into their quarrel and so split all the people into portions. We learn from this story that we should be on our guard against the beginnings of such evils, and should put an end to the quarrels of chiefs and mighty men. The mistake lies in the beginning — as the proverb says —‘Well begun is half done’; so an error at the beginning, though quite small, bears the same ratio to the errors in the other parts. In general, when the notables quarrel, the whole city is involved, as happened in Hesdaea after the Persian War. The occasion was the division of an inheritance; one of two brothers refused to give an account of their father’s property and the treasure which he had found: so the poorer of the two quarrelled with him and enlisted in his cause the popular party, the other, who was very rich, the wealthy classes.
At Delphi, again, a quarrel about a marriage was the beginning of all the troubles which followed. In this case the bridegroom, fancying some occurrence to be of evil omen, came to the bride, and went away without taking her. Whereupon her relations, thinking that they were insulted by him, put some of the sacred treasure among his offerings while he was sacrificing, and then slew him, pretending that he had been robbing the temple. At Mytilene, too, a dispute about heiresses was the beginning of many misfortunes, and led to the war with the Athenians in which Paches took their city. A wealthy citizen, named Timophanes, left two daughters; Dexander, another citizen, wanted to obtain them for his sons; but he was rejected in his suit, whereupon he stirred up a revolution, and instigated the Athenians (of whom he was proxenus) to interfere. A similar quarrel about an heiress arose at Phocis between Mnaseas the father of Mnason, and Euthycrates the father of Onomarchus; this was the beginning of the Sacred War. A marriage-quarrel was also the cause of a change in the government of Epidamnus. A certain man betrothed his daughter to a person whose father, having been made a magistrate, fined the father of the girl, and the latter, stung by the insult, conspired with the unenfranchised classes to overthrow the state.
Governments also change into oligarchy or into democracy or into a constitutional government because the magistrates, or some other section of the state, increase in power or renown. Thus at Athens the reputation gained by the court of the Areopagus, in the Persian War, seemed to tighten the reins of government. On the other hand, the victory of Salamis, which was gained by the common people who served in the fleet, and won for the Athenians the empire due to command of the sea, strengthened the democracy. At Argos, the notables, having distinguished themselves against the Lacedaemonians in the battle of Mantinea, attempted to put down the democracy. At Syracuse, the people, having been the chief authors of the victory in the war with the Athenians, changed the constitutional government into democracy. At Chalcis, the people, uniting with the notables, killed Phoxus the tyrant, and then seized the government. At Ambracia, the people, in like manner, having joined with the conspirators in expelling the tyrant Periander, transferred the government to themselves. And generally it should be remembered that those who have secured power to the state, whether private citizens, or magistrates, or tribes, or any other part or section of the state, are apt to cause revolutions. For either envy of their greatness draws others into rebellion, or they themselves, in their pride of superiority, are unwilling to remain on a level with others.
Revolutions also break out when opposite parties, e.g., the rich and the people, are equally balanced, and there is little or no middle class; for, if either party were manifestly superior, the other would not risk an attack upon them. And, for this reason, those who are eminent in virtue usually do not stir up insurrections, always being a minority. Such are the beginnings and causes of the disturbances and revolutions to which every form of government is liable.
Revolutions are effected in two ways, by force and by fraud. Force may be applied either at the time of making the revolution or afterwards. Fraud, again, is of two kinds; for (1) sometimes the citizens are deceived into acquiescing in a change of government, and afterwards they are held in subjection against their will. This was what happened in the case of the Four Hundred, who deceived the people by telling them that the king would provide money for the war against the Lacedaemonians, and, having cheated the people, still endeavored to retain the government. (2) In other cases the people are persuaded at first, and afterwards, by a repetition of the persuasion, their goodwill and allegiance are retained. The revolutions which effect constitutions generally spring from the above-mentioned causes.
There are three qualifications required in those who have to fill the highest offices —(1) first of all, loyalty to the established constitution; (2) the greatest administrative capacity; (3) virtue and justice of the kind proper to each form of government; for, if what is just is not the same in all governments, the quality of justice must also differ. There may be a doubt, however, when all these qualities do not meet in the same person, how the selection is to be made; suppose, for example, a good general is a bad man and not a friend to the constitution, and another man is loyal and just, which should we choose? In making the election ought we not to consider two points? what qualities are common, and what are rare. Thus in the choice of a general, we should regard his skill rather than his virtue; for few have military skill, but many have virtue. In any office of trust or stewardship, on the other hand, the opposite rule should be observed; for more virtue than ordinary is required in the holder of such an office, but the necessary knowledge is of a sort which all men possess.
It may, however, be asked what a man wants with virtue if he have political ability and is loyal, since these two qualities alone will make him do what is for the public interest. But may not men have both of them and yet be deficient in self-control? If, knowing and loving their own interests, they do not always attend to them, may they not be equally negligent of the interests of the public?
Speaking generally, we may say that whatever legal enactments are held to be for the interest of various constitutions, all these preserve them. And the great preserving principle is the one which has been repeatedly mentioned — to have a care that the loyal citizen should be stronger than the disloyal. Neither should we forget the mean, which at the present day is lost sight of in perverted forms of government; for many practices which appear to be democratical are the ruin of democracies, and many which appear to be oligarchical are the ruin of oligarchies. Those who think that all virtue is to be found in their own party principles push matters to extremes; they do not consider that disproportion destroys a state. A nose which varies from the ideal of straightness to a hook or snub may still be of good shape and agreeable to the eye; but if the excess be very great, all symmetry is lost, and the nose at last ceases to be a nose at all on account of some excess in one direction or defect in the other; and this is true of every other part of the human body. The same law of proportion equally holds in states. Oligarchy or democracy, although a departure from the most perfect form, may yet be a good enough government, but if any one attempts to push the principles of either to an extreme, he will begin by spoiling the government and end by having none at all. Wherefore the legislator and the statesman ought to know what democratical measures save and what destroy a democracy, and what oligarchical measures save or destroy an oligarchy. For neither the one nor the other can exist or continue to exist unless both rich and poor are included in it. If equality of property is introduced, the state must of necessity take another form; for when by laws carried to excess one or other element in the state is ruined, the constitution is ruined.
There is an error common both to oligarchies and to democracies: in the latter the demagogues, when the multitude are above the law, are always cutting the city in two by quarrels with the rich, whereas they should always profess to be maintaining their cause; just as in oligarchies the oligarchs should profess to maintaining the cause of the people, and should take oaths the opposite of those which they now take. For there are cities in which they swear —‘I will be an enemy to the people, and will devise all the harm against them which I can’; but they ought to exhibit and to entertain the very opposite feeling; in the form of their oath there should be an express declaration —‘I will do no wrong to the people.’
But of all the things which I have mentioned that which most contributes to the permanence of constitutions is the adaptation of education to the form of government, and yet in our own day this principle is universally neglected. The best laws, though sanctioned by every citizen of the state, will be of no avail unless the young are trained by habit and education in the spirit of the constitution, if the laws are democratical, democratically or oligarchically, if the laws are oligarchical. For there may be a want of self-discipline in states as well as in individuals. Now, to have been educated in the spirit of the constitution is not to perform the actions in which oligarchs or democrats delight, but those by which the existence of an oligarchy or of a democracy is made possible. Whereas among ourselves the sons of the ruling class in an oligarchy live in luxury, but the sons of the poor are hardened by exercise and toil, and hence they are both more inclined and better able to make a revolution. And in democracies of the more extreme type there has arisen a false idea of freedom which is contradictory to the true interests of the state. For two principles are characteristic of democracy, the government of the majority and freedom. Men think that what is just is equal; and that equality is the supremacy of the popular will; and that freedom means the doing what a man likes. In such democracies every one lives as he pleases, or in the words of Euripides, ‘according to his fancy.’ But this is all wrong; men should not think it slavery to live according to the rule of the constitution; for it is their salvation.
I have now discussed generally the causes of the revolution and destruction of states, and the means of their preservation and continuance.
And now, taking each constitution separately, we must see what follows from the principles already laid down.
Revolutions in democracies are generally caused by the intemperance of demagogues, who either in their private capacity lay information against rich men until they compel them to combine (for a common danger unites even the bitterest enemies), or coming forward in public stir up the people against them. The truth of this remark is proved by a variety of examples. At Cos the democracy was overthrown because wicked demagogues arose, and the notables combined. At Rhodes the demagogues not only provided pay for the multitude, but prevented them from making good to the trierarchs the sums which had been expended by them; and they, in consequence of the suits which were brought against them, were compelled to combine and put down the democracy. The democracy at Heraclea was overthrown shortly after the foundation of the colony by the injustice of the demagogues, which drove out the notables, who came back in a body and put an end to the democracy. Much in the same manner the democracy at Megara was overturned; there the demagogues drove out many of the notables in order that they might be able to confiscate their property. At length the exiles, becoming numerous, returned, and, engaging and defeating the people, established the oligarchy. The same thing happened with the democracy of Cyme, which was overthrown by Thrasymachus. And we may observe that in most states the changes have been of this character. For sometimes the demagogues, in order to curry favor with the people, wrong the notables and so force them to combine; either they make a division of their property, or diminish their incomes by the imposition of public services, and sometimes they bring accusations against the rich that they may have their wealth to confiscate.
Of old, the demagogue was also a general, and then democracies changed into tyrannies. Most of the ancient tyrants were originally demagogues. They are not so now, but they were then; and the reason is that they were generals and not orators, for oratory had not yet come into fashion. Whereas in our day, when the art of rhetoric has made such progress, the orators lead the people, but their ignorance of military matters prevents them from usurping power; at any rate instances to the contrary are few and slight. Tyrannies were more common formerly than now, for this reason also, that great power was placed in the hands of individuals; thus a tyranny arose at Miletus out of the office of the Prytanis, who had supreme authority in many important matters. Moreover, in those days, when cities were not large, the people dwelt in the fields, busy at their work; and their chiefs, if they possessed any military talent, seized the opportunity, and winning the confidence of the masses by professing their hatred of the wealthy, they succeeded in obtaining the tyranny. Thus at Athens Peisistratus led a faction against the men of the plain, and Theagenes at Megara slaughtered the cattle of the wealthy, which he found by the river side, where they had put them to graze in land not their own. Dionysius, again, was thought worthy of the tyranny because he denounced Daphnaeus and the rich; his enmity to the notables won for him the confidence of the people. Changes also take place from the ancient to the latest form of democracy; for where there is a popular election of the magistrates and no property qualification, the aspirants for office get hold of the people, and contrive at last even to set them above the laws. A more or less complete cure for this state of things is for the separate tribes, and not the whole people, to elect the magistrates.
These are the principal causes of revolutions in democracies.
There are two patent causes of revolutions in oligarchies: (1) First, when the oligarchs oppress the people, for then anybody is good enough to be their champion, especially if he be himself a member of the oligarchy, as Lygdamis at Naxos, who afterwards came to be tyrant. But revolutions which commence outside the governing class may be further subdivided. Sometimes, when the government is very exclusive, the revolution is brought about by persons of the wealthy class who are excluded, as happened at Massalia and Istros and Heraclea, and other cities. Those who had no share in the government created a disturbance, until first the elder brothers, and then the younger, were admitted; for in some places father and son, in others elder and younger brothers, do not hold office together. At Massalia the oligarchy became more like a constitutional government, but at Istros ended in a democracy, and at Heraclea was enlarged to 600. At Cnidos, again, the oligarchy underwent a considerable change. For the notables fell out among themselves, because only a few shared in the government; there existed among them the rule already mentioned, that father and son not hold office together, and, if there were several brothers, only the eldest was admitted. The people took advantage of the quarrel, and choosing one of the notables to be their leader, attacked and conquered the oligarchs, who were divided, and division is always a source of weakness. The city of Erythrae, too, in old times was ruled, and ruled well, by the Basilidae, but the people took offense at the narrowness of the oligarchy and changed the constitution.
(2) Of internal causes of revolutions in oligarchies one is the personal rivalry of the oligarchs, which leads them to play the demagogue. Now, the oligarchical demagogue is of two sorts: either (a) he practices upon the oligarchs themselves (for, although the oligarchy are quite a small number, there may be a demagogue among them, as at Athens Charicles’ party won power by courting the Thirty, that of Phrynichus by courting the Four Hundred); or (b) the oligarchs may play the demagogue with the people. This was the case at Larissa, where the guardians of the citizens endeavored to gain over the people because they were elected by them; and such is the fate of all oligarchies in which the magistrates are elected, as at Abydos, not by the class to which they belong, but by the heavy-armed or by the people, although they may be required to have a high qualification, or to be members of a political club; or, again, where the law-courts are composed of persons outside the government, the oligarchs flatter the people in order to obtain a decision in their own favor, and so they change the constitution; this happened at Heraclea in Pontus. Again, oligarchies change whenever any attempt is made to narrow them; for then those who desire equal rights are compelled to call in the people. Changes in the oligarchy also occur when the oligarchs waste their private property by extravagant living; for then they want to innovate, and either try to make themselves tyrants, or install some one else in the tyranny, as Hipparinus did Dionysius at Syracuse, and as at Amphipolis a man named Cleotimus introduced Chalcidian colonists, and when they arrived, stirred them up against the rich. For a like reason in Aegina the person who carried on the negotiation with Chares endeavored to revolutionize the state. Sometimes a party among the oligarchs try directly to create a political change; sometimes they rob the treasury, and then either the thieves or, as happened at Apollonia in Pontus, those who resist them in their thieving quarrel with the rulers. But an oligarchy which is at unity with itself is not easily destroyed from within; of this we may see an example at Pharsalus, for there, although the rulers are few in number, they govern a large city, because they have a good understanding among themselves.
Oligarchies, again, are overthrown when another oligarchy is created within the original one, that is to say, when the whole governing body is small and yet they do not all share in the highest offices. Thus at Elis the governing body was a small senate; and very few ever found their way into it, because the senators were only ninety in number, and were elected for life and out of certain families in a manner similar to the Lacedaemonian elders. Oligarchy is liable to revolutions alike in war and in peace; in war because, not being able to trust the people, the oligarchs are compelled to hire mercenaries, and the general who is in command of them often ends in becoming a tyrant, as Timophanes did at Corinth; or if there are more generals than one they make themselves into a company of tyrants. Sometimes the oligarchs, fearing this danger, give the people a share in the government because their services are necessary to them. And in time of peace, from mutual distrust, the two parties hand over the defense of the state to the army and to an arbiter between the two factions, who often ends the master of both. This happened at Larissa when Simos the Aleuad had the government, and at Abydos in the days of Iphiades and the political clubs. Revolutions also arise out of marriages or lawsuits which lead to the overthrow of one party among the oligarchs by another. Of quarrels about marriages I have already mentioned some instances; another occurred at Eretria, where Diagoras overturned the oligarchy of the knights because he had been wronged about a marriage. A revolution at Heraclea, and another at Thebes, both arose out of decisions of law-courts upon a charge of adultery; in both cases the punishment was just, but executed in the spirit of party, at Heraclea upon Eurytion, and at Thebes upon Archias; for their enemies were jealous of them and so had them pilloried in the agora. Many oligarchies have been destroyed by some members of the ruling class taking offense at their excessive despotism; for example, the oligarchy at Cnidus and at Chios.
Changes of constitutional governments, and also of oligarchies which limit the office of counselor, judge, or other magistrate to persons having a certain money qualification, often occur by accident. The qualification may have been originally fixed according to the circumstances of the time, in such a manner as to include in an oligarchy a few only, or in a constitutional government the middle class. But after a time of prosperity, whether arising from peace or some other good fortune, the same property becomes many times as valuable, and then everybody participates in every office; this happens sometimes gradually and insensibly, and sometimes quickly. These are the causes of changes and revolutions in oligarchies.
We must remark generally both of democracies and oligarchies, that they sometimes change, not into the opposite forms of government, but only into another variety of the same class; I mean to say, from those forms of democracy and oligarchy which are regulated by law into those which are arbitrary, and conversely.
In aristocracies revolutions are stirred up when a few only share in the honors of the state; a cause which has been already shown to affect oligarchies; for an aristocracy is a sort of oligarchy, and, like an oligarchy, is the government of a few, although few not for the same reason; hence the two are often confounded. And revolutions will be most likely to happen, and must happen, when the mass of the people are of the high-spirited kind, and have a notion that they are as good as their rulers. Thus at Lacedaemon the so-called Partheniae, who were the [illegitimate] sons of the Spartan peers, attempted a revolution, and, being detected, were sent away to colonize Tarentum. Again, revolutions occur when great men who are at least of equal merit are dishonored by those higher in office, as Lysander was by the kings of Sparta; or, when a brave man is excluded from the honors of the state, like Cinadon, who conspired against the Spartans in the reign of Agesilaus; or, again, when some are very poor and others very rich, a state of society which is most often the result of war, as at Lacedaemon in the days of the Messenian War; this is proved from the poem of Tyrtaeus, entitled ‘Good Order’; for he speaks of certain citizens who were ruined by the war and wanted to have a redistribution of the land. Again, revolutions arise when an individual who is great, and might be greater, wants to rule alone, as, at Lacedaemon, Pausanias, who was general in the Persian War, or like Hanno at Carthage.
Constitutional governments and aristocracies are commonly overthrown owing to some deviation from justice in the constitution itself; the cause of the downfall is, in the former, the ill-mingling of the two elements, democracy and oligarchy; in the latter, of the three elements, democracy, oligarchy, and virtue, but especially democracy and oligarchy. For to combine these is the endeavor of constitutional governments; and most of the so-called aristocracies have a like aim, but differ from polities in the mode of combination; hence some of them are more and some less permanent. Those which incline more to oligarchy are called aristocracies, and those which incline to democracy constitutional governments. And therefore the latter are the safer of the two; for the greater the number, the greater the strength, and when men are equal they are contented. But the rich, if the constitution gives them power, are apt to be insolent and avaricious; and, in general, whichever way the constitution inclines, in that direction it changes as either party gains strength, a constitutional government becoming a democracy, an aristocracy an oligarchy. But the process may be reversed, and aristocracy may change into democracy. This happens when the poor, under the idea that they are being wronged, force the constitution to take an opposite form. In like manner constitutional governments change into oligarchies. The only stable principle of government is equality according to proportion, and for every man to enjoy his own.
What I have just mentioned actually happened at Thurii, where the qualification for office, at first high, was therefore reduced, and the magistrates increased in number. The notables had previously acquired the whole of the land contrary to law; for the government tended to oligarchy, and they were able to encroach. . . . But the people, who had been trained by war, soon got the better of the guards kept by the oligarchs, until those who had too much gave up their land.
Again, since all aristocratical governments incline to oligarchy, the notables are apt to be grasping; thus at Lacedaemon, where property tends to pass into few hands, the notables can do too much as they like, and are allowed to marry whom they please. The city of Locri was ruined by a marriage connection with Dionysius, but such a thing could never have happened in a democracy, or in a wellbalanced aristocracy.
I have already remarked that in all states revolutions are occasioned by trifles. In aristocracies, above all, they are of a gradual and imperceptible nature. The citizens begin by giving up some part of the constitution, and so with greater ease the government change something else which is a little more important, until they have undermined the whole fabric of the state. At Thurii there was a law that generals should only be re-elected after an interval of five years, and some young men who were popular with the soldiers of the guard for their military prowess, despising the magistrates and thinking that they would easily gain their purpose, wanted to abolish this law and allow their generals to hold perpetual commands; for they well knew that the people would be glad enough to elect them. Whereupon the magistrates who had charge of these matters, and who are called councillors, at first determined to resist, but they afterwards consented, thinking that, if only this one law was changed, no further inroad would be made on the constitution. But other changes soon followed which they in vain attempted to oppose; and the state passed into the hands of the revolutionists, who established a dynastic oligarchy.
All constitutions are overthrown either from within or from without; the latter, when there is some government close at hand having an opposite interest, or at a distance, but powerful. This was exemplified in the old times of the Athenians and the Lacedaemonians; the Athenians everywhere put down the oligarchies, and the Lacedaemonians the democracies.
I have now explained what are the chief causes of revolutions and dissensions in states.
We have next to consider what means there are of preserving constitutions in general, and in particular cases. In the first place it is evident that if we know the causes which destroy constitutions, we also know the causes which preserve them; for opposites produce opposites, and destruction is the opposite of preservation.
In all well-attempered governments there is nothing which should be more jealously maintained than the spirit of obedience to law, more especially in small matters; for transgression creeps in unperceived and at last ruins the state, just as the constant recurrence of small expenses in time eats up a fortune. The expense does not take place at once, and therefore is not observed; the mind is deceived, as in the fallacy which says that ‘if each part is little, then the whole is little.’ this is true in one way, but not in another, for the whole and the all are not little, although they are made up of littles.
In the first place, then, men should guard against the beginning of change, and in the second place they should not rely upon the political devices of which I have already spoken invented only to deceive the people, for they are proved by experience to be useless. Further, we note that oligarchies as well as aristocracies may last, not from any inherent stability in such forms of government, but because the rulers are on good terms both with the unenfranchised and with the governing classes, not maltreating any who are excluded from the government, but introducing into it the leading spirits among them. They should never wrong the ambitious in a matter of honor, or the common people in a matter of money; and they should treat one another and their fellow citizen in a spirit of equality. The equality which the friends of democracy seek to establish for the multitude is not only just but likewise expedient among equals. Hence, if the governing class are numerous, many democratic institutions are useful; for example, the restriction of the tenure of offices to six months, that all those who are of equal rank may share in them. Indeed, equals or peers when they are numerous become a kind of democracy, and therefore demagogues are very likely to arise among them, as I have already remarked. The short tenure of office prevents oligarchies and aristocracies from falling into the hands of families; it is not easy for a person to do any great harm when his tenure of office is short, whereas long possession begets tyranny in oligarchies and democracies. For the aspirants to tyranny are either the principal men of the state, who in democracies are demagogues and in oligarchies members of ruling houses, or those who hold great offices, and have a long tenure of them.
Constitutions are preserved when their destroyers are at a distance, and sometimes also because they are near, for the fear of them makes the government keep in hand the constitution. Wherefore the ruler who has a care of the constitution should invent terrors, and bring distant dangers near, in order that the citizens may be on their guard, and, like sentinels in a night watch, never relax their attention. He should endeavor too by help of the laws to control the contentions and quarrels of the notables, and to prevent those who have not hitherto taken part in them from catching the spirit of contention. No ordinary man can discern the beginning of evil, but only the true statesman.
As to the change produced in oligarchies and constitutional governments by the alteration of the qualification, when this arises, not out of any variation in the qualification but only out of the increase of money, it is well to compare the general valuation of property with that of past years, annually in those cities in which the census is taken annually and in larger cities every third or fifth year. If the whole is many times greater or many times less than when the ratings recognized by the constitution were fixed, there should be power given by law to raise or lower the qualification as the amount is greater or less. Where this is not done a constitutional government passes into an oligarchy, and an oligarchy is narrowed to a rule of families; or in the opposite case constitutional government becomes democracy, and oligarchy either constitutional government or democracy.
It is a principle common to democracy, oligarchy, and every other form of government not to allow the disproportionate increase of any citizen but to give moderate honor for a long time rather than great honor for a short time. For men are easily spoilt; not every one can bear prosperity. But if this rule is not observed, at any rate the honors which are given all at once should be taken away by degrees and not all at once. Especially should the laws provide against any one having too much power, whether derived from friends or money; if he has, he should be sent clean out of the country. And since innovations creep in through the private life of individuals also, there ought to be a magistracy which will have an eye to those whose life is not in harmony with the government, whether oligarchy or democracy or any other. And for a like reason an increase of prosperity in any part of the state should be carefully watched. The proper remedy for this evil is always to give the management of affairs and offices of state to opposite elements; such opposites are the virtuous and the many, or the rich and the poor. Another way is to combine the poor and the rich in one body, or to increase the middle class: thus an end will be put to the revolutions which arise from inequality.
But above all every state should be so administered and so regulated by law that its magistrates cannot possibly make money. In oligarchies special precautions should be used against this evil. For the people do not take any great offense at being kept out of the government — indeed they are rather pleased than otherwise at having leisure for their private business — but what irritates them is to think that their rulers are stealing the public money; then they are doubly annoyed; for they lose both honor and profit. If office brought no profit, then and then only could democracy and aristocracy be combined; for both notables and people might have their wishes gratified. All would be able to hold office, which is the aim of democracy, and the notables would be magistrates, which is the aim of aristocracy. And this result may be accomplished when there is no possibility of making money out of the offices; for the poor will not want to have them when there is nothing to be gained from them — they would rather be attending to their own concerns; and the rich, who do not want money from the public treasury, will be able to take them; and so the poor will keep to their work and grow rich, and the notables will not be governed by the lower class. In order to avoid peculation of the public money, the transfer of the revenue should be made at a general assembly of the citizens, and duplicates of the accounts deposited with the different brotherhoods, companies, and tribes. And honors should be given by law to magistrates who have the reputation of being incorruptible. In democracies the rich should be spared; not only should their property not be divided, but their incomes also, which in some states are taken from them imperceptibly, should be protected. It is a good thing to prevent the wealthy citizens, even if they are willing from undertaking expensive and useless public services, such as the giving of choruses, torch-races, and the like. In an oligarchy, on the other hand, great care should be taken of the poor, and lucrative offices should go to them; if any of the wealthy classes insult them, the offender should be punished more severely than if he had wronged one of his own class. Provision should be made that estates pass by inheritance and not by gift, and no person should have more than one inheritance; for in this way properties will be equalized, and more of the poor rise to competency. It is also expedient both in a democracy and in an oligarchy to assign to those who have less share in the government (i.e., to the rich in a democracy and to the poor in an oligarchy) an equality or preference in all but the principal offices of state. The latter should be entrusted chiefly or only to members of the governing class.
I have still to speak of monarchy, and the causes of its destruction and preservation. What I have said already respecting forms of constitutional government applies almost equally to royal and to tyrannical rule. For royal rule is of the nature of an aristocracy, and a tyranny is a compound of oligarchy and democracy in their most extreme forms; it is therefore most injurious to its subjects, being made up of two evil forms of government, and having the perversions and errors of both. These two forms of monarchy are contrary in their very origin. The appointment of a king is the resource of the better classes against the people, and he is elected by them out of their own number, because either he himself or his family excel in virtue and virtuous actions; whereas a tyrant is chosen from the people to be their protector against the notables, and in order to prevent them from being injured. History shows that almost all tyrants have been demagogues who gained the favor of the people by their accusation of the notables. At any rate this was the manner in which the tyrannies arose in the days when cities had increased in power. Others which were older originated in the ambition of kings wanting to overstep the limits of their hereditary power and become despots. Others again grew out of the class which were chosen to be chief magistrates; for in ancient times the people who elected them gave the magistrates, whether civil or religious, a long tenure. Others arose out of the custom which oligarchies had of making some individual supreme over the highest offices. In any of these ways an ambitious man had no difficulty, if he desired, in creating a tyranny, since he had the power in his hands already, either as king or as one of the officers of state. Thus Pheidon at Argos and several others were originally kings, and ended by becoming tyrants; Phalaris, on the other hand, and the Ionian tyrants, acquired the tyranny by holding great offices. Whereas Panaetius at Leontini, Cypselus at Corinth, Peisistratus at Athens, Dionysius at Syracuse, and several others who afterwards became tyrants, were at first demagogues.
And so, as I was saying, royalty ranks with aristocracy, for it is based upon merit, whether of the individual or of his family, or on benefits conferred, or on these claims with power added to them. For all who have obtained this honor have benefited, or had in their power to benefit, states and nations; some, like Codrus, have prevented the state from being enslaved in war; others, like Cyrus, have given their country freedom, or have settled or gained a territory, like the Lacedaemonian, Macedonian, and Molossian kings. The idea of a king is to be a protector of the rich against unjust treatment, of the people against insult and oppression. Whereas a tyrant, as has often been repeated, has no regard to any public interest, except as conducive to his private ends; his aim is pleasure, the aim of a king, honor. Wherefore also in their desires they differ; the tyrant is desirous of riches, the king, of what brings honor. And the guards of a king are citizens, but of a tyrant mercenaries.
That tyranny has all the vices both of democracy and oligarchy is evident. As of oligarchy so of tyranny, the end is wealth; (for by wealth only can the tyrant maintain either his guard or his luxury). Both mistrust the people, and therefore deprive them of their arms. Both agree too in injuring the people and driving them out of the city and dispersing them. From democracy tyrants have borrowed the art of making war upon the notables and destroying them secretly or openly, or of exiling them because they are rivals and stand in the way of their power; and also because plots against them are contrived by men of this dass, who either want to rule or to escape subjection. Hence Periander advised Thrasybulus by cutting off the tops of the tallest ears of corn, meaning that he must always put out of the way the citizens who overtop the rest. And so, as I have already intimated, the beginnings of change are the same in monarchies as in forms of constitutional government; subjects attack their sovereigns out of fear or contempt, or because they have been unjustly treated by them. And of injustice, the most common form is insult, another is confiscation of property.
The ends sought by conspiracies against monarchies, whether tyrannies or royalties, are the same as the ends sought by conspiracies against other forms of government. Monarchs have great wealth and honor, which are objects of desire to all mankind. The attacks are made sometimes against their lives, sometimes against the office; where the sense of insult is the motive, against their lives. Any sort of insult (and there are many) may stir up anger, and when men are angry, they commonly act out of revenge, and not from ambition. For example, the attempt made upon the Peisistratidae arose out of the public dishonor offered to the sister of Harmodius and the insult to himself. He attacked the tyrant for his sister’s sake, and Aristogeiton joined in the attack for the sake of Harmodius. A conspiracy was also formed against Periander, the tyrant of Ambracia, because, when drinking with a favorite youth, he asked him whether by this time he was not with child by him. Philip, too, was attacked by Pausanias because he permitted him to be insulted by Attalus and his friends, and Amyntas the little, by Derdas, because he boasted of having enjoyed his youth. Evagoras of Cyprus, again, was slain by the eunuch to revenge an insult; for his wife had been carried off by Evagoras’s son. Many conspiracies have originated in shameful attempts made by sovereigns on the persons of their subjects. Such was the attack of Crataeas upon Archelaus; he had always hated the connection with him, and so, when Archelaus, having promised him one of his two daughters in marriage, did not give him either of them, but broke his word and married the elder to the king of Elymeia, when he was hard pressed in a war against Sirrhas and Arrhabaeus, and the younger to his own son Amyntas, under the idea that Amyntas would then be less likely to quarrel with his son by Cleopatra — Crataeas made this slight a pretext for attacking Archelaus, though even a less reason would have sufficed, for the real cause of the estrangement was the disgust which he felt at his connection with the king. And from a like motive Hellonocrates of Larissa conspired with him; for when Archelaus, who was his lover, did not fulfill his promise of restoring him to his country, he thought that the connection between them had originated, not in affection, but in the wantonness of power. Pytho, too, and Heracleides of Aenos, slew Cotys in order to avenge their father, and Adamas revolted from Cotys in revenge for the wanton outrage which he had committed in mutilating him when a child.
Many, too, irritated at blows inflicted on the person which they deemed an insult, have either killed or attempted to kill officers of state and royal princes by whom they have been injured. Thus, at Mytilene, Megacles and his friends attacked and slew the Penthilidae, as they were going about and striking people with clubs. At a later date Smerdis, who had been beaten and torn away from his wife by Penthilus, slew him. In the conspiracy against Archelaus, Decamnichus stimulated the fury of the assassins and led the attack; he was enraged because Archelaus had delivered him to Euripides to be scourged; for the poet had been irritated at some remark made by Decamnichus on the foulness of his breath. Many other examples might be cited of murders and conspiracies which have arisen from similar causes.
Fear is another motive which, as we have said, has caused conspiracies as well in monarchies as in more popular forms of government. Thus Artapanes conspired against Xerxes and slew him, fearing that he would be accused of hanging Darius against his orders-he having been under the impression that Xerxes would forget what he had said in the middle of a meal, and that the offense would be forgiven.
Another motive is contempt, as in the case of Sardanapalus, whom some one saw carding wool with his women, if the storytellers say truly; and the tale may be true, if not of him, of some one else. Dion attacked the younger Dionysius because he despised him, and saw that he was equally despised by his own subjects, and that he was always drunk. Even the friends of a tyrant will sometimes attack him out of contempt; for the confidence which he reposes in them breeds contempt, and they think that they will not be found out. The expectation of success is likewise a sort of contempt; the assailants are ready to strike, and think nothing of the danger, because they seem to have the power in their hands. Thus generals of armies attack monarchs; as, for example, Cyrus attacked Astyages, despising the effeminacy of his life, and believing that his power was worn out. Thus again, Seuthes the Thracian conspired against Amadocus, whose general he was.
And sometimes men are actuated by more than one motive, like Mithridates, who conspired against Ariobarzanes, partly out of contempt and partly from the love of gain.
Bold natures, placed by their sovereigns in a high military position, are most likely to make the attempt in the expectation of success; for courage is emboldened by power, and the union of the two inspires them with the hope of an easy victory.
Attempts of which the motive is ambition arise in a different way as well as in those already mentioned. There are men who will not risk their lives in the hope of gains and honors however great, but who nevertheless regard the killing of a tyrant simply as an extraordinary action which will make them famous and honorable in the world; they wish to acquire, not a kingdom, but a name. It is rare, however, to find such men; he who would kill a tyrant must be prepared to lose his life if he fail. He must have the resolution of Dion, who, when he made war upon Dionysius, took with him very few troops, saying ‘that whatever measure of success he might attain would be enough for him, even if he were to die the moment he landed; such a death would be welcome to him.’ this is a temper to which few can attain.
Once more, tyrannies, like all other governments, are destroyed from without by some opposite and more powerful form of government. That such a government will have the will to attack them is clear; for the two are opposed in principle; and all men, if they can, do what they will. Democracy is antagonistic to tyranny, on the principle of Hesiod, ‘Potter hates Potter,’ because they are nearly akin, for the extreme form of democracy is tyranny; and royalty and aristocracy are both alike opposed to tyranny, because they are constitutions of a different type. And therefore the Lacedaemonians put down most of the tyrannies, and so did the Syracusans during the time when they were well governed.
Again, tyrannies are destroyed from within, when the reigning family are divided among themselves, as that of Gelo was, and more recently that of Dionysius; in the case of Gelo because Thrasybulus, the brother of Hiero, flattered the son of Gelo and led him into excesses in order that he might rule in his name. Whereupon the family got together a party to get rid of Thrasybulus and save the tyranny; but those of the people who conspired with them seized the opportunity and drove them all out. In the case of Dionysius, Dion, his own relative, attacked and expelled him with the assistance of the people; he afterwards perished himself.
There are two chief motives which induce men to attack tyrannies — hatred and contempt. Hatred of tyrants is inevitable, and contempt is also a frequent cause of their destruction. Thus we see that most of those who have acquired, have retained their power, but those who have inherited, have lost it, almost at once; for, living in luxurious ease, they have become contemptible, and offer many opportunities to their assailants. Anger, too, must be included under hatred, and produces the same effects. It is often times even more ready to strike — the angry are more impetuous in making an attack, for they do not follow rational principle. And men are very apt to give way to their passions when they are insulted. To this cause is to be attributed the fall of the Peisistratidae and of many others. Hatred is more reasonable, for anger is accompanied by pain, which is an impediment to reason, whereas hatred is painless.
In a word, all the causes which I have mentioned as destroying the last and most unmixed form of oligarchy, and the extreme form of democracy, may be assumed to affect tyranny; indeed the extreme forms of both are only tyrannies distributed among several persons. Kingly rule is little affected by external causes, and is therefore lasting; it is generally destroyed from within. And there are two ways in which the destruction may come about; (1) when the members of the royal family quarrel among themselves, and (2) when the kings attempt to administer the state too much after the fashion of a tyranny, and to extend their authority contrary to the law. Royalties do not now come into existence; where such forms of government arise, they are rather monarchies or tyrannies. For the rule of a king is over voluntary subjects, and he is supreme in all important matters; but in our own day men are more upon an equality, and no one is so immeasurably superior to others as to represent adequately the greatness and dignity of the office. Hence mankind will not, if they can help, endure it, and any one who obtains power by force or fraud is at once thought to be a tyrant. In hereditary monarchies a further cause of destruction is the fact that kings often fall into contempt, and, although possessing not tyrannical power, but only royal dignity, are apt to outrage others. Their overthrow is then readily effected; for there is an end to the king when his subjects do not want to have him, but the tyrant lasts, whether they like him or not.
The destruction of monarchies is to be attributed to these and the like causes.
And they are preserved, to speak generally, by the opposite causes; or, if we consider them separately, (1) royalty is preserved by the limitation of its powers. The more restricted the functions of kings, the longer their power will last unimpaired; for then they are more moderate and not so despotic in their ways; and they are less envied by their subjects. This is the reason why the kingly office has lasted so long among the Molossians. And for a similar reason it has continued among the Lacedaemonians, because there it was always divided between two, and afterwards further limited by Theopompus in various respects, more particularly by the establishment of the Ephoralty. He diminished the power of the kings, but established on a more lasting basis the kingly office, which was thus made in a certain sense not less, but greater. There is a story that when his wife once asked him whether he was not ashamed to leave to his sons a royal power which was less than he had inherited from his father, ‘No indeed,’ he replied, ‘for the power which I leave to them will be more lasting.’
As to (2) tyrannies, they are preserved in two most opposite ways. One of them is the old traditional method in which most tyrants administer their government. Of such arts Periander of Corinth is said to have been the great master, and many similar devices may be gathered from the Persians in the administration of their government. There are firstly the prescriptions mentioned some distance back, for the preservation of a tyranny, in so far as this is possible; viz., that the tyrant should lop off those who are too high; he must put to death men of spirit; he must not allow common meals, clubs, education, and the like; he must be upon his guard against anything which is likely to inspire either courage or confidence among his subjects; he must prohibit literary assemblies or other meetings for discussion, and he must take every means to prevent people from knowing one another (for acquaintance begets mutual confidence). Further, he must compel all persons staying in the city to appear in public and live at his gates; then he will know what they are doing: if they are always kept under, they will learn to be humble. In short, he should practice these and the like Persian and barbaric arts, which all have the same object. A tyrant should also endeavor to know what each of his subjects says or does, and should employ spies, like the ‘female detectives’ at Syracuse, and the eavesdroppers whom Hiero was in the habit of sending to any place of resort or meeting; for the fear of informers prevents people from speaking their minds, and if they do, they are more easily found out. Another art of the tyrant is to sow quarrels among the citizens; friends should be embroiled with friends, the people with the notables, and the rich with one another. Also he should impoverish his subjects; he thus provides against the maintenance of a guard by the citizen and the people, having to keep hard at work, are prevented from conspiring. The Pyramids of Egypt afford an example of this policy; also the offerings of the family of Cypselus, and the building of the temple of Olympian Zeus by the Peisistratidae, and the great Polycratean monuments at Samos; all these works were alike intended to occupy the people and keep them poor. Another practice of tyrants is to multiply taxes, after the manner of Dionysius at Syracuse, who contrived that within five years his subjects should bring into the treasury their whole property. The tyrant is also fond of making war in order that his subjects may have something to do and be always in want of a leader. And whereas the power of a king is preserved by his friends, the characteristic of a tyrant is to distrust his friends, because he knows that all men want to overthrow him, and they above all have the power.
Again, the evil practices of the last and worst form of democracy are all found in tyrannies. Such are the power given to women in their families in the hope that they will inform against their husbands, and the license which is allowed to slaves in order that they may betray their masters; for slaves and women do not conspire against tyrants; and they are of course friendly to tyrannies and also to democracies, since under them they have a good time. For the people too would fain be a monarch, and therefore by them, as well as by the tyrant, the flatterer is held in honor; in democracies he is the demagogue; and the tyrant also has those who associate with him in a humble spirit, which is a work of flattery.
Hence tyrants are always fond of bad men, because they love to be flattered, but no man who has the spirit of a freeman in him will lower himself by flattery; good men love others, or at any rate do not flatter them. Moreover, the bad are useful for bad purposes; ‘nail knocks out nail,’ as the proverb says. It is characteristic of a tyrant to dislike every one who has dignity or independence; he wants to be alone in his glory, but any one who claims a like dignity or asserts his independence encroaches upon his prerogative, and is hated by him as an enemy to his power. Another mark of a tyrant is that he likes foreigners better than citizens, and lives with them and invites them to his table; for the one are enemies, but the Others enter into no rivalry with him.
Such are the notes of the tyrant and the arts by which he preserves his power; there is no wickedness too great for him. All that we have said may be summed up under three heads, which answer to the three aims of the tyrant. These are, (1) the humiliation of his subjects; he knows that a mean-spirited man will not conspire against anybody; (2) the creation of mistrust among them; for a tyrant is not overthrown until men begin to have confidence in one another; and this is the reason why tyrants are at war with the good; they are under the idea that their power is endangered by them, not only because they would not be ruled despotically but also because they are loyal to one another, and to other men, and do not inform against one another or against other men; (3) the tyrant desires that his subjects shall be incapable of action, for no one attempts what is impossible, and they will not attempt to overthrow a tyranny, if they are powerless. Under these three heads the whole policy of a tyrant may be summed up, and to one or other of them all his ideas may be referred: (1) he sows distrust among his subjects; (2) he takes away their power; (3) he humbles them.
This then is one of the two methods by which tyrannies are preserved; and there is another which proceeds upon an almost opposite principle of action. The nature of this latter method may be gathered from a comparison of the causes which destroy kingdoms, for as one mode of destroying kingly power is to make the office of king more tyrannical, so the salvation of a tyranny is to make it more like the rule of a king. But of one thing the tyrant must be careful; he must keep power enough to rule over his subjects, whether they like him or not, for if he once gives this up he gives up his tyranny. But though power must be retained as the foundation, in all else the tyrant should act or appear to act in the character of a king. In the first place he should pretend a care of the public revenues, and not waste money in making presents of a sort at which the common people get excited when they see their hard-won earnings snatched from them and lavished on courtesans and strangers and artists. He should give an account of what he receives and of what he spends (a practice which has been adopted by some tyrants); for then he will seem to be a steward of the public rather than a tyrant; nor need he fear that, while he is the lord of the city, he will ever be in want of money. Such a policy is at all events much more advantageous for the tyrant when he goes from home, than to leave behind him a hoard, for then the garrison who remain in the city will be less likely to attack his power; and a tyrant, when he is absent from home, has more reason to fear the guardians of his treasure than the citizens, for the one accompany him, but the others remain behind. In the second place, he should be seen to collect taxes and to require public services only for state purposes, and that he may form a fund in case of war, and generally he ought to make himself the guardian and treasurer of them, as if they belonged, not to him, but to the public. He should appear, not harsh, but dignified, and when men meet him they should look upon him with reverence, and not with fear. Yet it is hard for him to be respected if he inspires no respect, and therefore whatever virtues he may neglect, at least he should maintain the character of a great soldier, and produce the impression that he is one. Neither he nor any of his associates should ever be guilty of the least offense against modesty towards the young of either sex who are his subjects, and the women of his family should observe a like self-control towards other women; the insolence of women has ruined many tyrannies. In the indulgence of pleasures he should be the opposite of our modern tyrants, who not only begin at dawn and pass whole days in sensuality, but want other men to see them, that they may admire their happy and blessed lot. In these things a tyrant should if possible be moderate, or at any rate should not parade his vices to the world; for a drunken and drowsy tyrant is soon despised and attacked; not so he who is temperate and wide awake. His conduct should be the very reverse of nearly everything which has been said before about tyrants. He ought to adorn and improve his city, as though he were not a tyrant, but the guardian of the state. Also he should appear to be particularly earnest in the service of the Gods; for if men think that a ruler is religious and has a reverence for the Gods, they are less afraid of suffering injustice at his hands, and they are less disposed to conspire against him, because they believe him to have the very Gods fighting on his side. At the same time his religion must not be thought foolish. And he should honor men of merit, and make them think that they would not be held in more honor by the citizens if they had a free government. The honor he should distribute himself, but the punishment should be inflicted by officers and courts of law. It is a precaution which is taken by all monarchs not to make one person great; but if one, then two or more should be raised, that they may look sharply after one another. If after all some one has to be made great, he should not be a man of bold spirit; for such dispositions are ever most inclined to strike. And if any one is to be deprived of his power, let it be diminished gradually, not taken from him all at once. The tyrant should abstain from all outrage; in particular from personal violence and from wanton conduct towards the young. He should be especially careful of his behavior to men who are lovers of honor; for as the lovers of money are offended when their property is touched, so are the lovers of honor and the virtuous when their honor is affected. Therefore a tyrant ought either not to commit such acts at all; or he should be thought only to employ fatherly correction, and not to trample upon others — and his acquaintance with youth should be supposed to arise from affection, and not from the insolence of power, and in general he should compensate the appearance of dishonor by the increase of honor.
Of those who attempt assassination they are the most dangerous, and require to be most carefully watched, who do not care to survive, if they effect their purpose. Therefore special precaution should be taken about any who think that either they or those for whom they care have been insulted; for when men are led away by passion to assault others they are regardless of themselves. As Heracleitus says, ‘It is difficult to fight against anger; for a man will buy revenge with his soul.’
And whereas states consist of two classes, of poor men and of rich, the tyrant should lead both to imagine that they are preserved and prevented from harming one another by his rule, and whichever of the two is stronger he should attach to his government; for, having this advantage, he has no need either to emancipate slaves or to disarm the citizens; either party added to the force which he already has, will make him stronger than his assailants.
But enough of these details; what should be the general policy of the tyrant is obvious. He ought to show himself to his subjects in the light, not of a tyrant, but of a steward and a king. He should not appropriate what is theirs, but should be their guardian; he should be moderate, not extravagant in his way of life; he should win the notables by companionship, and the multitude by flattery. For then his rule will of necessity be nobler and happier, because he will rule over better men whose spirits are not crushed, over men to whom he himself is not an object of hatred, and of whom he is not afraid. His power too will be more lasting. His disposition will be virtuous, or at least half virtuous; and he will not be wicked, but half wicked only.
Yet no forms of government are so short-lived as oligarchy and tyranny. The tyranny which lasted longest was that of Orthagoras and his sons at Sicyon; this continued for a hundred years. The reason was that they treated their subjects with moderation, and to a great extent observed the laws; and in various ways gained the favor of the people by the care which they took of them. Cleisthenes, in particular, was respected for his military ability. If report may be believed, he crowned the judge who decided against him in the games; and, as some say, the sitting statue in the Agora of Sicyon is the likeness of this person. (A similar story is told of Peisistratus, who is said on one occasion to have allowed himself to be summoned and tried before the Areopagus.)
Next in duration to the tyranny of Orthagoras was that of the Cypselidae at Corinth, which lasted seventy-three years and six months: Cypselus reigned thirty years, Periander forty and a half, and Psammetichus the son of Gorgus three. Their continuance was due to similar causes: Cypselus was a popular man, who during the whole time of his rule never had a bodyguard; and Periander, although he was a tyrant, was a great soldier. Third in duration was the rule of the Peisistratidae at Athens, but it was interrupted; for Peisistratus was twice driven out, so that during three and thirty years he reigned only seventeen; and his sons reigned eighteen-altogether thirty-five years. Of other tyrannies, that of Hiero and Gelo at Syracuse was the most lasting. Even this, however, was short, not more than eighteen years in all; for Gelo continued tyrant for seven years, and died in the eighth; Hiero reigned for ten years, and Thrasybulus was driven out in the eleventh month. In fact, tyrannies generally have been of quite short duration.
I have now gone through almost all the causes by which constitutional governments and monarchies are either destroyed or preserved.
In the Republic of Plato, Socrates treats of revolutions, but not well, for he mentions no cause of change which peculiarly affects the first, or perfect state. He only says that the cause is that nothing is abiding, but all things change in a certain cycle; and that the origin of the change consists in those numbers ‘of which 4 and 3, married with 5, furnish two harmonies’ (he means when the number of this figure becomes solid); he conceives that nature at certain times produces bad men who will not submit to education; in which latter particular he may very likely be not far wrong, for there may well be some men who cannot be educated and made virtuous. But why is such a cause of change peculiar to his ideal state, and not rather common to all states, nay, to everything which comes into being at all? And is it by the agency of time, which, as he declares, makes all things change, that things which did not begin together, change together? For example, if something has come into being the day before the completion of the cycle, will it change with things that came into being before? Further, why should the perfect state change into the Spartan? For governments more often take an opposite form than one akin to them. The same remark is applicable to the other changes; he says that the Spartan constitution changes into an oligarchy, and this into a democracy, and this again into a tyranny. And yet the contrary happens quite as often; for a democracy is even more likely to change into an oligarchy than into a monarchy. Further, he never says whether tyranny is, or is not, liable to revolutions, and if it is, what is the cause of them, or into what form it changes. And the reason is, that he could not very well have told: for there is no rule; according to him it should revert to the first and best, and then there would be a complete cycle. But in point of fact a tyranny often changes into a tyranny, as that at Sicyon changed from the tyranny of Myron into that of Cleisthenes; into oligarchy, as the tyranny of Antileon did at Chalcis; into democracy, as that of Gelo’s family did at Syracuse; into aristocracy, as at Carthage, and the tyranny of Charilaus at Lacedaemon. Often an oligarchy changes into a tyranny, like most of the ancient oligarchies in Sicily; for example, the oligarchy at Leontini changed into the tyranny of Panaetius; that at Gela into the tyranny of Cleander; that at Rhegium into the tyranny of Anaxilaus; the same thing has happened in many other states. And it is absurd to suppose that the state changes into oligarchy merely because the ruling class are lovers and makers of money, and not because the very rich think it unfair that the very poor should have an equal share in the government with themselves. Moreover, in many oligarchies there are laws against making money in trade. But at Carthage, which is a democracy. there is no such prohibition; and yet to this day the Carthaginians have never had a revolution. It is absurd too for him to say that an oligarchy is two cities, one of the rich, and the other of the poor. Is not this just as much the case in the Spartan constitution, or in any other in which either all do not possess equal property, or all are not equally good men? Nobody need be any poorer than he was before, and yet the oligarchy may change an the same into a democracy, if the poor form the majority; and a democracy may change into an oligarchy, if the wealthy class are stronger than the people, and the one are energetic, the other indifferent. Once more, although the causes of the change are very numerous, he mentions only one, which is, that the citizens become poor through dissipation and debt, as though he thought that all, or the majority of them, were originally rich. This is not true: though it is true that when any of the leaders lose their property they are ripe for revolution; but, when anybody else, it is no great matter, and an oligarchy does not even then more often pass into a democracy than into any other form of government. Again, if men are deprived of the honors of state, and are wronged, and insulted, they make revolutions, and change forms of government, even although they have not wasted their substance because they might do what they liked — of which extravagance he declares excessive freedom to be the cause.
Finally, although there are many forms of oligarchies and democracies, Socrates speaks of their revolutions as though there were only one form of either of them.
---
!!![[Chapter I|Jowett: Book Four: Chapter I]]
{{Jowett: Book Four: Chapter I}}
---
!!![[Chapter II|Jowett: Book Four: Chapter II]]
{{Jowett: Book Four: Chapter II}}
---
!!![[Chapter III|Jowett: Book Four: Chapter III]]
{{Jowett: Book Four: Chapter III}}
---
!!![[Chapter IV|Jowett: Book Four: Chapter IV]]
{{Jowett: Book Four: Chapter IV}}
---
!!![[Chapter V|Jowett: Book Four: Chapter V]]
{{Jowett: Book Four: Chapter V}}
---
!!![[Chapter VI|Jowett: Book Four: Chapter VI]]
{{Jowett: Book Four: Chapter VI}}
---
!!![[Chapter VII|Jowett: Book Four: Chapter VII]]
{{Jowett: Book Four: Chapter VII}}
---
!!![[Chapter VIII|Jowett: Book Four: Chapter VIII]]
{{Jowett: Book Four: Chapter VIII}}
---
!!![[Chapter IX|Jowett: Book Four: Chapter IX]]
{{Jowett: Book Four: Chapter IX}}
---
!!![[Chapter X|Jowett: Book Four: Chapter X]]
{{Jowett: Book Four: Chapter X}}
---
!!![[Chapter XI|Jowett: Book Four: Chapter XI]]
{{Jowett: Book Four: Chapter XI}}
---
!!![[Chapter XII|Jowett: Book Four: Chapter XII]]
{{Jowett: Book Four: Chapter XII}}
---
!!![[Chapter XIII|Jowett: Book Four: Chapter XIII]]
{{Jowett: Book Four: Chapter XIII}}
---
!!![[Chapter XIV|Jowett: Book Four: Chapter XIV]]
{{Jowett: Book Four: Chapter XIV}}
---
!!![[Chapter XV|Jowett: Book Four: Chapter XV]]
{{Jowett: Book Four: Chapter XV}}
---
!!![[Chapter XVI|Jowett: Book Four: Chapter XVI]]
{{Jowett: Book Four: Chapter XVI}}
IN all arts and sciences which embrace the whole of any subject, and do not come into being in a fragmentary way, it is the province of a single art or science to consider all that appertains to a single subject. For example, the art of gymnastic considers not only the suitableness of different modes of training to different bodies (2), but what sort is absolutely the best (1); (for the absolutely best must suit that which is by nature best and best furnished with the means of life), and also what common form of training is adapted to the great majority of men (4). And if a man does not desire the best habit of body, or the greatest skill in gymnastics, which might be attained by him, still the trainer or the teacher of gymnastic should be able to impart any lower degree of either (3). The same principle equally holds in medicine and shipbuilding, and the making of clothes, and in the arts generally.
Hence it is obvious that government too is the subject of a single science, which has to consider what government is best and of what sort it must be, to be most in accordance with our aspirations, if there were no external impediment, and also what kind of government is adapted to particular states. For the best is often unattainable, and therefore the true legislator and statesman ought to be acquainted, not only with (1) that which is best in the abstract, but also with (2) that which is best relatively to circumstances. We should be able further to say how a state may be constituted under any given conditions (3); both how it is originally formed and, when formed, how it may be longest preserved; the supposed state being so far from having the best constitution that it is unprovided even with the conditions necessary for the best; neither is it the best under the circumstances, but of an inferior type.
He ought, moreover, to know (4) the form of government which is best suited to states in general; for political writers, although they have excellent ideas, are often unpractical. We should consider, not only what form of government is best, but also what is possible and what is easily attainable by all. There are some who would have none but the most perfect; for this many natural advantages are required. Others, again, speak of a more attainable form, and, although they reject the constitution under which they are living, they extol some one in particular, for example the Lacedaemonian. Any change of government which has to be introduced should be one which men, starting from their existing constitutions, will be both willing and able to adopt, since there is quite as much trouble in the reformation of an old constitution as in the establishment of a new one, just as to unlearn is as hard as to learn. And therefore, in addition to the qualifications of the statesman already mentioned, he should be able to find remedies for the defects of existing constitutions, as has been said before. This he cannot do unless he knows how many forms of government there are. It is often supposed that there is only one kind of democracy and one of oligarchy. But this is a mistake; and, in order to avoid such mistakes, we must ascertain what differences there are in the constitutions of states, and in how many ways they are combined. The same political insight will enable a man to know which laws are the best, and which are suited to different constitutions; for the laws are, and ought to be, relative to the constitution, and not the constitution to the laws. A constitution is the organization of offices in a state, and determines what is to be the governing body, and what is the end of each community. But laws are not to be confounded with the principles of the constitution; they are the rules according to which the magistrates should administer the state, and proceed against offenders. So that we must know the varieties, and the number of varieties, of each form of government, if only with a view to making laws. For the same laws cannot be equally suited to all oligarchies or to all democracies, since there is certainly more than one form both of democracy and of oligarchy.
In our original discussion about governments we divided them into three true forms: kingly rule, aristocracy, and constitutional government, and three corresponding perversions — tyranny, oligarchy, and democracy. Of kingly rule and of aristocracy, we have already spoken, for the inquiry into the perfect state is the same thing with the discussion of the two forms thus named, since both imply a principle of virtue provided with external means. We have already determined in what aristocracy and kingly rule differ from one another, and when the latter should be established. In what follows we have to describe the so-called constitutional government, which bears the common name of all constitutions, and the other forms, tyranny, oligarchy, and democracy.
It is obvious which of the three perversions is the worst, and which is the next in badness. That which is the perversion of the first and most divine is necessarily the worst. And just as a royal rule, if not a mere name, must exist by virtue of some great personal superiority in the king, so tyranny, which is the worst of governments, is necessarily the farthest removed from a well-constituted form; oligarchy is little better, for it is a long way from aristocracy, and democracy is the most tolerable of the three.
A writer who preceded me has already made these distinctions, but his point of view is not the same as mine. For he lays down the principle that when all the constitutions are good (the oligarchy and the rest being virtuous), democracy is the worst, but the best when all are bad. Whereas we maintain that they are in any case defective, and that one oligarchy is not to be accounted better than another, but only less bad.
Not to pursue this question further at present, let us begin by determining (1) how many varieties of constitution there are (since of democracy and oligarchy there are several): (2) what constitution is the most generally acceptable, and what is eligible in the next degree after the perfect state; and besides this what other there is which is aristocratical and well-constituted, and at the same time adapted to states in general; (3) of the other forms of government to whom each is suited. For democracy may meet the needs of some better than oligarchy, and conversely. In the next place (4) we have to consider in what manner a man ought to proceed who desires to establish some one among these various forms, whether of democracy or of oligarchy; and lastly, (5) having briefly discussed these subjects to the best of our power, we will endeavor to ascertain the modes of ruin and preservation both of constitutions generally and of each separately, and to what causes they are to be attributed.
The reason why there are many forms of government is that every state contains many elements. In the first place we see that all states are made up of families, and in the multitude of citizen there must be some rich and some poor, and some in a middle condition; the rich are heavy-armed, and the poor not. Of the common people, some are husbandmen, and some traders, and some artisans. There are also among the notables differences of wealth and property — for example, in the number of horses which they keep, for they cannot afford to keep them unless they are rich. And therefore in old times the cities whose strength lay in their cavalry were oligarchies, and they used cavalry in wars against their neighbors; as was the practice of the Eretrians and Chalcidians, and also of the Magnesians on the river Maeander, and of other peoples in Asia. Besides differences of wealth there are differences of rank and merit, and there are some other elements which were mentioned by us when in treating of aristocracy we enumerated the essentials of a state. Of these elements, sometimes all, sometimes the lesser and sometimes the greater number, have a share in the government. It is evident then that there must be many forms of government, differing in kind, since the parts of which they are composed differ from each other in kind. For a constitution is an organization of offices, which all the citizens distribute among themselves, according to the power which different classes possess, for example the rich or the poor, or according to some principle of equality which includes both. There must therefore be as many forms of government as there are modes of arranging the offices, according to the superiorities and differences of the parts of the state.
There are generally thought to be two principal forms: as men say of the winds that there are but two — north and south, and that the rest of them are only variations of these, so of governments there are said to be only two forms — democracy and oligarchy. For aristocracy is considered to be a kind of oligarchy, as being the rule of a few, and the so-called constitutional government to be really a democracy, just as among the winds we make the west a variation of the north, and the east of the south wind. Similarly of musical modes there are said to be two kinds, the Dorian and the Phrygian; the other arrangements of the scale are comprehended under one or other of these two. About forms of government this is a very favorite notion. But in either case the better and more exact way is to distinguish, as I have done, the one or two which are true forms, and to regard the others as perversions, whether of the most perfectly attempered mode or of the best form of government: we may compare the severer and more overpowering modes to the oligarchical forms, and the more relaxed and gentler ones to the democratic.
It must not be assumed, as some are fond of saying, that democracy is simply that form of government in which the greater number are sovereign, for in oligarchies, and indeed in every government, the majority rules; nor again is oligarchy that form of government in which a few are sovereign. Suppose the whole population of a city to be 1300, and that of these 1000 are rich, and do not allow the remaining 300 who are poor, but free, and in an other respects their equals, a share of the government — no one will say that this is a democracy. In like manner, if the poor were few and the masters of the rich who outnumber them, no one would ever call such a government, in which the rich majority have no share of office, an oligarchy. Therefore we should rather say that democracy is the form of government in which the free are rulers, and oligarchy in which the rich; it is only an accident that the free are the many and the rich are the few. Otherwise a government in which the offices were given according to stature, as is said to be the case in Ethiopia, or according to beauty, would be an oligarchy; for the number of tall or good-looking men is small. And yet oligarchy and democracy are not sufficiently distinguished merely by these two characteristics of wealth and freedom. Both of them contain many other elements, and therefore we must carry our analysis further, and say that the government is not a democracy in which the freemen, being few in number, rule over the many who are not free, as at Apollonia, on the Ionian Gulf, and at Thera; (for in each of these states the nobles, who were also the earliest settlers, were held in chief honor, although they were but a few out of many). Neither is it a democracy when the rich have the government because they exceed in number; as was the case formerly at Colophon, where the bulk of the inhabitants were possessed of large property before the Lydian War. But the form of government is a democracy when the free, who are also poor and the majority, govern, and an oligarchy when the rich and the noble govern, they being at the same time few in number.
I have said that there are many forms of government, and have explained to what causes the variety is due. Why there are more than those already mentioned, and what they are, and whence they arise, I will now proceed to consider, starting from the principle already admitted, which is that every state consists, not of one, but of many parts. If we were going to speak of the different species of animals, we should first of all determine the organs which are indispensable to every animal, as for example some organs of sense and the instruments of receiving and digesting food, such as the mouth and the stomach, besides organs of locomotion. Assuming now that there are only so many kinds of organs, but that there may be differences in them — I mean different kinds of mouths, and stomachs, and perceptive and locomotive organs — the possible combinations of these differences will necessarily furnish many variedes of animals. (For animals cannot be the same which have different kinds of mouths or of ears.) And when all the combinations are exhausted, there will be as many sorts of animals as there are combinations of the necessary organs. The same, then, is true of the forms of government which have been described; states, as I have repeatedly said, are composed, not of one, but of many elements. One element is the food-producing class, who are called husbandmen; a second, the class of mechanics who practice the arts without which a city cannot exist; of these arts some are absolutely necessary, others contribute to luxury or to the grace of life. The third class is that of traders, and by traders I mean those who are engaged in buying and selling, whether in commerce or in retail trade. A fourth class is that of the serfs or laborers. The warriors make up the fifth class, and they are as necessary as any of the others, if the country is not to be the slave of every invader. For how can a state which has any title to the name be of a slavish nature? The state is independent and self-sufficing, but a slave is the reverse of independent. Hence we see that this subject, though ingeniously, has not been satisfactorily treated in the Republic. Socrates says that a state is made up of four sorts of people who are absolutely necessary; these are a weaver, a husbandman, a shoemaker, and a builder; afterwards, finding that they are not enough, he adds a smith, and again a herdsman, to look after the necessary animals; then a merchant, and then a retail trader. All these together form the complement of the first state, as if a state were established merely to supply the necessaries of life, rather than for the sake of the good, or stood equally in need of shoemakers and of husbandmen. But he does not admit into the state a military class until the country has increased in size, and is beginning to encroach on its neighbor’s land, whereupon they go to war. Yet even amongst his four original citizens, or whatever be the number of those whom he associates in the state, there must be some one who will dispense justice and determine what is just. And as the soul may be said to be more truly part of an animal than the body, so the higher parts of states, that is to say, the warrior class, the class engaged in the administration of justice, and that engaged in deliberation, which is the special business of political common sense-these are more essential to the state than the parts which minister to the necessaries of life. Whether their several functions are the functions of different citizens, or of the same — for it may often happen that the same persons are both warriors and husbandmen — is immaterial to the argument. The higher as well as the lower elements are to be equally considered parts of the state, and if so, the military element at any rate must be included. There are also the wealthy who minister to the state with their property; these form the seventh class. The eighth class is that of magistrates and of officers; for the state cannot exist without rulers. And therefore some must be able to take office and to serve the state, either always or in turn. There only remains the class of those who deliberate and who judge between disputants; we were just now distinguishing them. If presence of all these elements, and their fair and equitable organization, is necessary to states, then there must also be persons who have the ability of statesmen. Different functions appear to be often combined in the same individual; for example, the warrior may also be a husbandman, or an artisan; or, again, the councillor a judge. And all claim to possess political ability, and think that they are quite competent to fill most offices. But the same persons cannot be rich and poor at the same time. For this reason the rich and the poor are regarded in an especial sense as parts of a state. Again, because the rich are generally few in number, while the poor are many, they appear to be antagonistic, and as the one or the other prevails they form the government. Hence arises the common opinion that there are two kinds of government — democracy and oligarchy.
I have already explained that there are many forms of constitution, and to what causes the variety is due. Let me now show that there are different forms both of democracy and oligarchy, as will indeed be evident from what has preceded. For both in the common people and in the notables various classes are included; of the common people, one class are husbandmen, another artisans; another traders, who are employed in buying and selling; another are the seafaring class, whether engaged in war or in trade, as ferrymen or as fishermen. (In many places any one of these classes forms quite a large population; for example, fishermen at Tarentum and Byzantium, crews of triremes at Athens, merchant seamen at Aegina and Chios, ferrymen at Tenedos.) To the classes already mentioned may be added day-laborers, and those who, owing to their needy circumstances, have no leisure, or those who are not of free birth on both sides; and there may be other classes as well. The notables again may be divided according to their wealth, birth, virtue, education, and similar differences.
Of forms of democracy first comes that which is said to be based strictly on equality. In such a democracy the law says that it is just for the poor to have no more advantage than the rich; and that neither should be masters, but both equal. For if liberty and equality, as is thought by some, are chiefly to be found in democracy, they will be best attained when all persons alike share in the government to the utmost. And since the people are the majority, and the opinion of the majority is decisive, such a government must necessarily be a democracy. Here then is one sort of democracy. There is another, in which the magistrates are elected according to a certain property qualification, but a low one; he who has the required amount of property has a share in the government, but he who loses his property loses his rights. Another kind is that in which all the citizens who are under no disqualification share in the government, but still the law is supreme. In another, everybody, if he be only a citizen, is admitted to the government, but the law is supreme as before. A fifth form of democracy, in other respects the same, is that in which, not the law, but the multitude, have the supreme power, and supersede the law by their decrees. This is a state of affairs brought about by the demagogues. For in democracies which are subject to the law the best citizens hold the first place, and there are no demagogues; but where the laws are not supreme, there demagogues spring up. For the people becomes a monarch, and is many in one; and the many have the power in their hands, not as individuals, but collectively. Homer says that ‘it is not good to have a rule of many,’ but whether he means this corporate rule, or the rule of many individuals, is uncertain. At all events this sort of democracy, which is now a monarch, and no longer under the control of law, seeks to exercise monarchical sway, and grows into a despot; the flatterer is held in honor; this sort of democracy being relatively to other democracies what tyranny is to other forms of monarchy. The spirit of both is the same, and they alike exercise a despotic rule over the better citizens. The decrees of the demos correspond to the edicts of the tyrant; and the demagogue is to the one what the flatterer is to the other. Both have great power; the flatterer with the tyrant, the demagogue with democracies of the kind which we are describing. The demagogues make the decrees of the people override the laws, by referring all things to the popular assembly. And therefore they grow great, because the people have an things in their hands, and they hold in their hands the votes of the people, who are too ready to listen to them. Further, those who have any complaint to bring against the magistrates say, ‘Let the people be judges’; the people are too happy to accept the invitation; and so the authority of every office is undermined. Such a democracy is fairly open to the objection that it is not a constitution at all; for where the laws have no authority, there is no constitution. The law ought to be supreme over all, and the magistracies should judge of particulars, and only this should be considered a constitution. So that if democracy be a real form of government, the sort of system in which all things are regulated by decrees is clearly not even a democracy in the true sense of the word, for decrees relate only to particulars.
These then are the different kinds of democracy.
Next we have to consider how by the side of oligarchy and democracy the so-called polity or constitutional government springs up, and how it should be organized. The nature of it will be at once understood from a comparison of oligarchy and democracy; we must ascertain their different characteristics, and taking a portion from each, put the two together, like the parts of an indenture. Now there are three modes in which fusions of government may be affected. In the first mode we must combine the laws made by both governments, say concerning the administration of justice. In oligarchies they impose a fine on the rich if they do not serve as judges, and to the poor they give no pay; but in democracies they give pay to the poor and do not fine the rich. Now (1) the union of these two modes is a common or middle term between them, and is therefore characteristic of a constitutional government, for it is a combination of both. This is one mode of uniting the two elements. Or (2) a mean may be taken between the enactments of the two: thus democracies require no property qualification, or only a small one, from members of the assembly, oligarchies a high one; here neither of these is the common term, but a mean between them. (3) There is a third mode, in which something is borrowed from the oligarchical and something from the democratical principle. For example, the appointment of magistrates by lot is thought to be democratical, and the election of them oligarchical; democratical again when there is no property qualification, oligarchical when there is. In the aristocratical or constitutional state, one element will be taken from each — from oligarchy the principle of electing to offices, from democracy the disregard of qualification. Such are the various modes of combination.
There is a true union of oligarchy and democracy when the same state may be termed either a democracy or an oligarchy; those who use both names evidently feel that the fusion is complete. Such a fusion there is also in the mean; for both extremes appear in it. The Lacedaemonian constitution, for example, is often described as a democracy, because it has many democratical features. In the first place the youth receive a democratical education. For the sons of the poor are brought up with with the sons of the rich, who are educated in such a manner as to make it possible for the sons of the poor to be educated by them. A similar equality prevails in the following period of life, and when the citizens are grown up to manhood the same rule is observed; there is no distinction between the rich and poor. In like manner they all have the same food at their public tables, and the rich wear only such clothing as any poor man can afford. Again, the people elect to one of the two greatest offices of state, and in the other they share; for they elect the Senators and share in the Ephoralty. By others the Spartan constitution is said to be an oligarchy, because it has many oligarchical elements. That all offices are filled by election and none by lot, is one of these oligarchical characteristics; that the power of inflicting death or banishment rests with a few persons is another; and there are others. In a well attempted polity there should appear to be both elements and yet neither; also the government should rely on itself, and not on foreign aid, and on itself not through the good will of a majority — they might be equally well-disposed when there is a vicious form of government — but through the general willingness of all classes in the state to maintain the constitution.
Enough of the manner in which a constitutional government, and in which the so-called aristocracies ought to be framed.
Of oligarchies, too, there are different kinds: one where the property qualification for office is such that the poor, although they form the majority, have no share in the government, yet he who acquires a qualification may obtain a share. Another sort is when there is a qualification for office, but a high one, and the vacancies in the governing body are fired by co-optation. If the election is made out of all the qualified persons, a constitution of this kind inclines to an aristocracy, if out of a privileged class, to an oligarchy. Another sort of oligarchy is when the son succeeds the father. There is a fourth form, likewise hereditary, in which the magistrates are supreme and not the law. Among oligarchies this is what tyranny is among monarchies, and the last-mentioned form of democracy among democracies; and in fact this sort of oligarchy receives the name of a dynasty (or rule of powerful families).
These are the different sorts of oligarchies and democracies. It should, however, be remembered that in many states the constitution which is established by law, although not democratic, owing to the education and habits of the people may be administered democratically, and conversely in other states the established constitution may incline to democracy, but may be administered in an oligarchical spirit. This most often happens after a revolution: for governments do not change at once; at first the dominant party are content with encroaching a little upon their opponents. The laws which existed previously continue in force, but the authors of the revolution have the power in their hands.
From what has been already said we may safely infer that there are so many different kinds of democracies and of oligarchies. For it is evident that either all the classes whom we mentioned must share in the government, or some only and not others. When the class of husbandmen and of those who possess moderate fortunes have the supreme power, the government is administered according to law. For the citizens being compelled to live by their labor have no leisure; and so they set up the authority of the law, and attend assemblies only when necessary. They all obtain a share in the government when they have acquired the qualification which is fixed by the law — the absolute exclusion of any class would be a step towards oligarchy; hence all who have acquired the property qualification are admitted to a share in the constitution. But leisure cannot be provided for them unless there are revenues to support them. This is one sort of democracy, and these are the causes which give birth to it. Another kind is based on the distinction which naturally comes next in order; in this, every one to whose birth there is no objection is eligible, but actually shares in the government only if he can find leisure. Hence in such a democracy the supreme power is vested in the laws, because the state has no means of paying the citizens. A third kind is when all freemen have a right to share in the government, but do not actually share, for the reason which has been already given; so that in this form again the law must rule. A fourth kind of democracy is that which comes latest in the history of states. In our own day, when cities have far outgrown their original size, and their revenues have increased, all the citizens have a place in the government, through the great preponderance of the multitude; and they all, including the poor who receive pay, and therefore have leisure to exercise their rights, share in the administration. Indeed, when they are paid, the common people have the most leisure, for they are not hindered by the care of their property, which often fetters the rich, who are thereby prevented from taking part in the assembly or in the courts, and so the state is governed by the poor, who are a majority, and not by the laws.
So many kinds of democracies there are, and they grow out of these necessary causes.
Of oligarchies, one form is that in which the majority of the citizens have some property, but not very much; and this is the first form, which allows to any one who obtains the required amount the right of sharing in the government. The sharers in the government being a numerous body, it follows that the law must govern, and not individuals. For in proportion as they are further removed from a monarchical form of government, and in respect of property have neither so much as to be able to live without attending to business, nor so little as to need state support, they must admit the rule of law and not claim to rule themselves. But if the men of property in the state are fewer than in the former case, and own more property, there arises a second form of oligarchy. For the stronger they are, the more power they claim, and having this object in view, they themselves select those of the other classes who are to be admitted to the government; but, not being as yet strong enough to rule without the law, they make the law represent their wishes. When this power is intensified by a further diminution of their numbers and increase of their property, there arises a third and further stage of oligarchy, in which the governing class keep the offices in their own hands, and the law ordains that the son shall succeed the father. When, again, the rulers have great wealth and numerous friends, this sort of family despotism approaches a monarchy; individuals rule and not the law. This is the fourth sort of oligarchy, and is analogous to the last sort of democracy.
There are still two forms besides democracy and oligarchy; one of them is universally recognized and included among the four principal forms of government, which are said to be (1) monarchy, (2) oligarchy, (3) democracy, and (4) the so-called aristocracy or government of the best. But there is also a fifth, which retains the generic name of polity or constitutional government; this is not common, and therefore has not been noticed by writers who attempt to enumerate the different kinds of government; like Plato, in their books about the state, they recognize four only. The term ‘aristocracy’ is rightly applied to the form of government which is described in the first part of our treatise; for that only can be rightly called aristocracy which is a government formed of the best men absolutely, and not merely of men who are good when tried by any given standard. In the perfect state the good man is absolutely the same as the good citizen; whereas in other states the good citizen is only good relatively to his own form of government. But there are some states differing from oligarchies and also differing from the so-called polity or constitutional government; these are termed aristocracies, and in them the magistrates are certainly chosen, both according to their wealth and according to their merit. Such a form of government differs from each of the two just now mentioned, and is termed an aristocracy. For indeed in states which do not make virtue the aim of the community, men of merit and reputation for virtue may be found. And so where a government has regard to wealth, virtue, and numbers, as at Carthage, that is aristocracy; and also where it has regard only to two out of the three, as at Lacedaemon, to virtue and numbers, and the two principles of democracy and virtue temper each other. There are these two forms of aristocracy in addition to the first and perfect state, and there is a third form, viz., the constitutions which incline more than the so-called polity towards oligarchy.
I have yet to speak of the so-called polity and of tyranny. I put them in this order, not because a polity or constitutional government is to be regarded as a perversion any more than the above mentioned aristocracies. The truth is, that they an fall short of the most perfect form of government, and so they are reckoned among perversions, and the really perverted forms are perversions of these, as I said in the original discussion. Last of all I will speak of tyranny, which I place last in the series because I am inquiring into the constitutions of states, and this is the very reverse of a constitution
Having explained why I have adopted this order, I will proceed to consider constitutional government; of which the nature will be clearer now that oligarchy and democracy have been defined. For polity or constitutional government may be described generally as a fusion of oligarchy and democracy; but the term is usually applied to those forms of government which incline towards democracy, and the term aristocracy to those which incline towards oligarchy, because birth and education are commonly the accompaniments of wealth. Moreover, the rich already possess the external advantages the want of which is a temptation to crime, and hence they are called noblemen and gentlemen. And inasmuch as aristocracy seeks to give predominance to the best of the citizens, people say also of oligarchies that they are composed of noblemen and gentlemen. Now it appears to be an impossible thing that the state which is governed not by the best citizens but by the worst should be well-governed, and equally impossible that the state which is ill-governed should be governed by the best. But we must remember that good laws, if they are not obeyed, do not constitute good government. Hence there are two parts of good government; one is the actual obedience of citizens to the laws, the other part is the goodness of the laws which they obey; they may obey bad laws as well as good. And there may be a further subdivision; they may obey either the best laws which are attainable to them, or the best absolutely.
The distribution of offices according to merit is a special characteristic of aristocracy, for the principle of an aristocracy is virtue, as wealth is of an oligarchy, and freedom of a democracy. In all of them there of course exists the right of the majority, and whatever seems good to the majority of those who share in the government has authority. Now in most states the form called polity exists, for the fusion goes no further than the attempt to unite the freedom of the poor and the wealth of the rich, who commonly take the place of the noble. But as there are three grounds on which men claim an equal share in the government, freedom, wealth, and virtue (for the fourth or good birth is the result of the two last, being only ancient wealth and virtue), it is clear that the admixture of the two elements, that is to say, of the rich and poor, is to be called a polity or constitutional government; and the union of the three is to be called aristocracy or the government of the best, and more than any other form of government, except the true and ideal, has a right to this name.
Thus far I have shown the existence of forms of states other than monarchy, democracy, and oligarchy, and what they are, and in what aristocracies differ from one another, and polities from aristocracies — that the two latter are not very unlike is obvious.
Of the nature of tyranny I have still to speak, in order that it may have its place in our inquiry (since even tyranny is reckoned by us to be a form of government), although there is not much to be said about it. I have already in the former part of this treatise discussed royalty or kingship according to the most usual meaning of the term, and considered whether it is or is not advantageous to states, and what kind of royalty should be established, and from what source, and how.
When speaking of royalty we also spoke of two forms of tyranny, which are both according to law, and therefore easily pass into royalty. Among barbarians there are elected monarchs who exercise a despotic power; despotic rulers were also elected in ancient Hellas, called Aesymnetes or Dictators. These monarchies, when compared with one another, exhibit certain differences. And they are, as I said before, royal, in so far as the monarch rules according to law over willing subjects; but they are tyrannical in so far as he is despotic and rules according to his own fancy. There is also a third kind of tyranny, which is the most typical form, and is the counterpart of the perfect monarchy. This tyranny is just that arbitrary power of an individual which is responsible to no one, and governs all alike, whether equals or better, with a view to its own advantage, not to that of its subjects, and therefore against their will. No freeman, if he can escape from it, will endure such a government.
The kinds of tyranny are such and so many, and for the reasons which I have given.
We have now to inquire what is the best constitution for most states, and the best life for most men, neither assuming a standard of virtue which is above ordinary persons, nor an education which is exceptionally favored by nature and circumstances, nor yet an ideal state which is an aspiration only, but having regard to the life in which the majority are able to share, and to the form of government which states in general can attain. As to those aristocracies, as they are called, of which we were just now speaking, they either lie beyond the possibilities of the greater number of states, or they approximate to the so-called constitutional government, and therefore need no separate discussion. And in fact the conclusion at which we arrive respecting all these forms rests upon the same grounds. For if what was said in the Ethics is true, that the happy life is the life according to virtue lived without impediment, and that virtue is a mean, then the life which is in a mean, and in a mean attainable by every one, must be the best. And the same the same principles of virtue and vice are characteristic of cities and of constitutions; for the constitution is in a figure the life of the city.
Now in all states there are three elements: one class is very rich, another very poor, and a third in a mean. It is admitted that moderation and the mean are best, and therefore it will clearly be best to possess the gifts of fortune in moderation; for in that condition of life men are most ready to follow rational principle. But he who greatly excels in beauty, strength, birth, or wealth, or on the other hand who is very poor, or very weak, or very much disgraced, finds it difficult to follow rational principle. Of these two the one sort grow into violent and great criminals, the others into rogues and petty rascals. And two sorts of offenses correspond to them, the one committed from violence, the other from roguery. Again, the middle class is least likely to shrink from rule, or to be over-ambitious for it; both of which are injuries to the state. Again, those who have too much of the goods of fortune, strength, wealth, friends, and the like, are neither willing nor able to submit to authority. The evil begins at home; for when they are boys, by reason of the luxury in which they are brought up, they never learn, even at school, the habit of obedience. On the other hand, the very poor, who are in the opposite extreme, are too degraded. So that the one class cannot obey, and can only rule despotically; the other knows not how to command and must be ruled like slaves. Thus arises a city, not of freemen, but of masters and slaves, the one despising, the other envying; and nothing can be more fatal to friendship and good fellowship in states than this: for good fellowship springs from friendship; when men are at enmity with one another, they would rather not even share the same path. But a city ought to be composed, as far as possible, of equals and similars; and these are generally the middle classes. Wherefore the city which is composed of middle-class citizens is necessarily best constituted in respect of the elements of which we say the fabric of the state naturally consists. And this is the class of citizens which is most secure in a state, for they do not, like the poor, covet their neighbors’ goods; nor do others covet theirs, as the poor covet the goods of the rich; and as they neither plot against others, nor are themselves plotted against, they pass through life safely. Wisely then did Phocylides pray —‘Many things are best in the mean; I desire to be of a middle condition in my city.’
Thus it is manifest that the best political community is formed by citizens of the middle class, and that those states are likely to be well-administered in which the middle class is large, and stronger if possible than both the other classes, or at any rate than either singly; for the addition of the middle class turns the scale, and prevents either of the extremes from being dominant. Great then is the good fortune of a state in which the citizens have a moderate and sufficient property; for where some possess much, and the others nothing, there may arise an extreme democracy, or a pure oligarchy; or a tyranny may grow out of either extreme — either out of the most rampant democracy, or out of an oligarchy; but it is not so likely to arise out of the middle constitutions and those akin to them. I will explain the reason of this hereafter, when I speak of the revolutions of states. The mean condition of states is clearly best, for no other is free from faction; and where the middle class is large, there are least likely to be factions and dissensions. For a similar reason large states are less liable to faction than small ones, because in them the middle class is large; whereas in small states it is easy to divide all the citizens into two classes who are either rich or poor, and to leave nothing in the middle. And democracies are safer and more permanent than oligarchies, because they have a middle class which is more numerous and has a greater share in the government; for when there is no middle class, and the poor greatly exceed in number, troubles arise, and the state soon comes to an end. A proof of the superiority of the middle dass is that the best legislators have been of a middle condition; for example, Solon, as his own verses testify; and Lycurgus, for he was not a king; and Charondas, and almost all legislators.
These considerations will help us to understand why most governments are either democratical or oligarchical. The reason is that the middle class is seldom numerous in them, and whichever party, whether the rich or the common people, transgresses the mean and predominates, draws the constitution its own way, and thus arises either oligarchy or democracy. There is another reason — the poor and the rich quarrel with one another, and whichever side gets the better, instead of establishing a just or popular government, regards political supremacy as the prize of victory, and the one party sets up a democracy and the other an oligarchy. Further, both the parties which had the supremacy in Hellas looked only to the interest of their own form of government, and established in states, the one, democracies, and the other, oligarchies; they thought of their own advantage, of the public not at all. For these reasons the middle form of government has rarely, if ever, existed, and among a very few only. One man alone of all who ever ruled in Hellas was induced to give this middle constitution to states. But it has now become a habit among the citizens of states, not even to care about equality; all men are seeking for dominion, or, if conquered, are willing to submit.
What then is the best form of government, and what makes it the best, is evident; and of other constitutions, since we say that there are many kinds of democracy and many of oligarchy, it is not difficult to see which has the first and which the second or any other place in the order of excellence, now that we have determined which is the best. For that which is nearest to the best must of necessity be better, and that which is furthest from it worse, if we are judging absolutely and not relatively to given conditions: I say ‘relatively to given conditions,’ since a particular government may be preferable, but another form may be better for some people.
We have now to consider what and what kind of government is suitable to what and what kind of men. I may begin by assuming, as a general principle common to all governments, that the portion of the state which desires the permanence of the constitution ought to be stronger than that which desires the reverse. Now every city is composed of quality and quantity. By quality I mean freedom, wealth, education, good birth, and by quantity, superiority of numbers. Quality may exist in one of the classes which make up the state, and quantity in the other. For example, the meanly-born may be more in number than the well-born, or the poor than the rich, yet they may not so much exceed in quantity as they fall short in quality; and therefore there must be a comparison of quantity and quality. Where the number of the poor is more than proportioned to the wealth of the rich, there will naturally be a democracy, varying in form with the sort of people who compose it in each case. If, for example, the husbandmen exceed in number, the first form of democracy will then arise; if the artisans and laboring class, the last; and so with the intermediate forms. But where the rich and the notables exceed in quality more than they fall short in quantity, there oligarchy arises, similarly assuming various forms according to the kind of superiority possessed by the oligarchs.
The legislator should always include the middle class in his government; if he makes his laws oligarchical, to the middle class let him look; if he makes them democratical, he should equally by his laws try to attach this class to the state. There only can the government ever be stable where the middle class exceeds one or both of the others, and in that case there will be no fear that the rich will unite with the poor against the rulers. For neither of them will ever be willing to serve the other, and if they look for some form of government more suitable to both, they will find none better than this, for the rich and the poor will never consent to rule in turn, because they mistrust one another. The arbiter is always the one trusted, and he who is in the middle is an arbiter. The more perfect the admixture of the political elements, the more lasting will be the constitution. Many even of those who desire to form aristocratical governments make a mistake, not only in giving too much power to the rich, but in attempting to overreach the people. There comes a time when out of a false good there arises a true evil, since the encroachments of the rich are more destructive to the constitution than those of the people.
The devices by which oligarchies deceive the people are five in number; they relate to (1) the assembly; (2) the magistracies; (3) the courts of law; (4) the use of arms; (5) gymnastic exercises. (1) The assemblies are thrown open to all, but either the rich only are fined for non-attendance, or a much larger fine is inflicted upon them. (2) to the magistracies, those who are qualified by property cannot decline office upon oath, but the poor may. (3) In the law courts the rich, and the rich only, are fined if they do not serve, the poor are let off with impunity, or, as in the laws of Charondas, a larger fine is inflicted on the rich, and a smaller one on the poor. In some states all citizen who have registered themselves are allowed to attend the assembly and to try causes; but if after registration they do not attend either in the assembly or at the courts, heavy fines are imposed upon them. The intention is that through fear of the fines they may avoid registering themselves, and then they cannot sit in the law-courts or in the assembly. concerning (4) the possession of arms, and (5) gymnastic exercises, they legislate in a similar spirit. For the poor are not obliged to have arms, but the rich are fined for not having them; and in like manner no penalty is inflicted on the poor for non-attendance at the gymnasium, and consequently, having nothing to fear, they do not attend, whereas the rich are liable to a fine, and therefore they take care to attend.
These are the devices of oligarchical legislators, and in democracies they have counter devices. They pay the poor for attending the assemblies and the law-courts, and they inflict no penalty on the rich for non-attendance. It is obvious that he who would duly mix the two principles should combine the practice of both, and provide that the poor should be paid to attend, and the rich fined if they do not attend, for then all will take part; if there is no such combination, power will be in the hands of one party only. The government should be confined to those who carry arms. As to the property qualification, no absolute rule can be laid down, but we must see what is the highest qualification sufficiently comprehensive to secure that the number of those who have the rights of citizens exceeds the number of those excluded. Even if they have no share in office, the poor, provided only that they are not outraged or deprived of their property, will be quiet enough.
But to secure gentle treatment for the poor is not an easy thing, since a ruling class is not always humane. And in time of war the poor are apt to hesitate unless they are fed; when fed, they are willing enough to fight. In some states the government is vested, not only in those who are actually serving, but also in those who have served; among the Malians, for example, the governing body consisted of the latter, while the magistrates were chosen from those actually on service. And the earliest government which existed among the Hellenes, after the overthrow of the kingly power, grew up out of the warrior class, and was originally taken from the knights (for strength and superiority in war at that time depended on cavalry; indeed, without discipline, infantry are useless, and in ancient times there was no military knowledge or tactics, and therefore the strength of armies lay in their cavalry). But when cities increased and the heavy armed grew in strength, more had a share in the government; and this is the reason why the states which we call constitutional governments have been hitherto called democracies. Ancient constitutions, as might be expected, were oligarchical and royal; their population being small they had no considerable middle class; the people were weak in numbers and organization, and were therefore more contented to be governed.
I have explained why there are various forms of government, and why there are more than is generally supposed; for democracy, as well as other constitutions, has more than one form: also what their differences are, and whence they arise, and what is the best form of government, speaking generally and to whom the various forms of government are best suited; all this has now been explained.
Having thus gained an appropriate basis of discussion, we will proceed to speak of the points which follow next in order. We will consider the subject not only in general but with reference to particular constitutions. All constitutions have three elements, concerning which the good lawgiver has to regard what is expedient for each constitution. When they are well-ordered, the constitution is well-ordered, and as they differ from one another, constitutions differ. There is (1) one element which deliberates about public affairs; secondly (2) that concerned with the magistrates — the question being, what they should be, over what they should exercise authority, and what should be the mode of electing to them; and thirdly (3) that which has judicial power.
The deliberative element has authority in matters of war and peace, in making and unmaking alliances; it passes laws, inflicts death, exile, confiscation, elects magistrates and audits their accounts. These powers must be assigned either all to all the citizens or an to some of them (for example, to one or more magistracies, or different causes to different magistracies), or some of them to all, and others of them only to some. That all things should be decided by all is characteristic of democracy; this is the sort of equality which the people desire. But there are various ways in which all may share in the government; they may deliberate, not all in one body, but by turns, as in the constitution of Telecles the Milesian. There are other constitutions in which the boards of magistrates meet and deliberate, but come into office by turns, and are elected out of the tribes and the very smallest divisions of the state, until every one has obtained office in his turn. The citizens, on the other hand, are assembled only for the purposes of legislation, and to consult about the constitution, and to hear the edicts of the magistrates. In another variety of democracy the citizen form one assembly, but meet only to elect magistrates, to pass laws, to advise about war and peace, and to make scrutinies. Other matters are referred severally to special magistrates, who are elected by vote or by lot out of all the citizens Or again, the citizens meet about election to offices and about scrutinies, and deliberate concerning war or alliances while other matters are administered by the magistrates, who, as far as is possible, are elected by vote. I am speaking of those magistracies in which special knowledge is required. A fourth form of democracy is when all the citizens meet to deliberate about everything, and the magistrates decide nothing, but only make the preliminary inquiries; and that is the way in which the last and worst form of democracy, corresponding, as we maintain, to the close family oligarchy and to tyranny, is at present administered. All these modes are democratical.
On the other hand, that some should deliberate about all is oligarchical. This again is a mode which, like the democratical has many forms. When the deliberative class being elected out of those who have a moderate qualification are numerous and they respect and obey the prohibitions of the law without altering it, and any one who has the required qualification shares in the government, then, just because of this moderation, the oligarchy inclines towards polity. But when only selected individuals and not the whole people share in the deliberations of the state, then, although, as in the former case, they observe the law, the government is a pure oligarchy. Or, again, when those who have the power of deliberation are self-elected, and son succeeds father, and they and not the laws are supreme — the government is of necessity oligarchical. Where, again, particular persons have authority in particular matters — for example, when the whole people decide about peace and war and hold scrutinies, but the magistrates regulate everything else, and they are elected by vote — there the government is an aristocracy. And if some questions are decided by magistrates elected by vote, and others by magistrates elected by lot, either absolutely or out of select candidates, or elected partly by vote, partly by lot — these practices are partly characteristic of an aristocratical government, and party of a pure constitutional government.
These are the various forms of the deliberative body; they correspond to the various forms of government. And the government of each state is administered according to one or other of the principles which have been laid down. Now it is for the interest of democracy, according to the most prevalent notion of it (I am speaking of that extreme form of democracy in which the people are supreme even over the laws), with a view to better deliberation to adopt the custom of oligarchies respecting courts of law. For in oligarchies the rich who are wanted to be judges are compelled to attend under pain of a fine, whereas in deinocracies the poor are paid to attend. And this practice of oligarchies should be adopted by democracies in their public assemblies, for they will advise better if they all deliberate together — the people with the notables and the notables with the people. It is also a good plan that those who deliberate should be elected by vote or by lot in equal numbers out of the different classes; and that if the people greatly exceed in number those who have political training, pay should not be given to all, but only to as many as would balance the number of the notables, or that the number in excess should be eliminated by lot. But in oligarchies either certain persons should be co-opted from the mass, or a class of officers should be appointed such as exist in some states who are termed probuli and guardians of the law; and the citizens should occupy themselves exclusively with matters on which these have previously deliberated; for so the people will have a share in the deliberations of the state, but will not be able to disturb the principles of the constitution. Again, in oligarchies either the people ought to accept the measures of the government, or not to pass anything contrary to them; or, if all are allowed to share in counsel, the decision should rest with the magistrates. The opposite of what is done in constitutional governments should be the rule in oligarchies; the veto of the majority should be final, their assent not final, but the proposal should be referred back to the magistrates. Whereas in constitutional governments they take the contrary course; the few have the negative, not the affirmative power; the affirmation of everything rests with the multitude.
These, then, are our conclusions respecting the deliberative, that is, the supreme element in states.
Next we will proceed to consider the distribution of offices; this too, being a part of politics concerning which many questions arise: What shall their number be? Over what shall they preside, and what shall be their duration? Sometimes they last for six months, sometimes for less; sometimes they are annual, while in other cases offices are held for still longer periods. Shall they be for life or for a long term of years; or, if for a short term only, shall the same persons hold them over and over again, or once only? Also about the appointment to them — from whom are they to be chosen, by whom, and how? We should first be in a position to say what are the possible varieties of them, and then we may proceed to determine which are suited to different forms of government. But what are to be included under the term ‘offices’? That is a question not quite so easily answered. For a political community requires many officers; and not every one who is chosen by vote or by lot is to be regarded as a ruler. In the first place there are the priests, who must be distinguished from political officers; masters of choruses and heralds, even ambassadors, are elected by vote. Some duties of superintendence again are political, extending either to all the citizens in a single sphere of action, like the office of the general who superintends them when they are in the field, or to a section of them only, like the inspectorships of women or of youth. Other offices are concerned with household management, like that of the corn measurers who exist in many states and are elected officers. There are also menial offices which the rich have executed by their slaves. Speaking generally, those are to be called offices to which the duties are assigned of deliberating about certain measures and ofjudging and commanding, especially the last; for to command is the especial duty of a magistrate. But the question is not of any importance in practice; no one has ever brought into court the meaning of the word, although such problems have a speculative interest.
What kinds of offices, and how many, are necessary to the existence of a state, and which, if not necessary, yet conduce to its well being are much more important considerations, affecting all constitutions, but more especially small states. For in great states it is possible, and indeed necessary, that every office should have a special function; where the citizens are numerous, many may hold office. And so it happens that some offices a man holds a second time only after a long interval, and others he holds once only; and certainly every work is better done which receives the sole, and not the divided attention of the worker. But in small states it is necessary to combine many offices in a few hands, since the small number of citizens does not admit of many holding office: for who will there be to succeed them? And yet small states at times require the same offices and laws as large ones; the difference is that the one want them often, the others only after long intervals. Hence there is no reason why the care of many offices should not be imposed on the same person, for they will not interfere with each other. When the population is small, offices should be like the spits which also serve to hold a lamp. We must first ascertain how many magistrates are necessary in every state, and also how many are not exactly necessary, but are nevertheless useful, and then there will be no difficulty in seeing what offices can be combined in one. We should also know over which matters several local tribunals are to have jurisdiction, and in which authority should be centralized: for example, should one person keep order in the market and another in some other place, or should the same person be responsible everywhere? Again, should offices be divided according to the subjects with which they deal, or according to the persons with whom they deal: I mean to say, should one person see to good order in general, or one look after the boys, another after the women, and so on? Further, under different constitutions, should the magistrates be the same or different? For example, in democracy, oligarchy, aristocracy, monarchy, should there be the same magistrates, although they are elected, not out of equal or similar classes of citizen but differently under different constitutions — in aristocracies, for example, they are chosen from the educated, in oligarchies from the wealthy, and in democracies from the free — or are there certain differences in the offices answering to them as well, and may the same be suitable to some, but different offices to others? For in some states it may be convenient that the same office should have a more extensive, in other states a narrower sphere. Special offices are peculiar to certain forms of government: for example that of probuli, which is not a democratic office, although a bule or council is. There must be some body of men whose duty is to prepare measures for the people in order that they may not be diverted from their business; when these are few in number, the state inclines to an oligarchy: or rather the probuli must always be few, and are therefore an oligarchical element. But when both institutions exist in a state, the probuli are a check on the council; for the counselors is a democratic element, but the probuli are oligarchical. Even the power of the council disappears when democracy has taken that extreme form in which the people themselves are always meeting and deliberating about everything. This is the case when the members of the assembly receive abundant pay; for they have nothing to do and are always holding assemblies and deciding everything for themselves. A magistracy which controls the boys or the women, or any similar office, is suited to an aristocracy rather than to a democracy; for how can the magistrates prevent the wives of the poor from going out of doors? Neither is it an oligarchical office; for the wives of the oligarchs are too fine to be controlled.
Enough of these matters. I will now inquire into appointments to offices. The varieties depend on three terms, and the combinations of these give all possible modes: first, who appoints? secondly, from whom? and thirdly, how? Each of these three admits of three varieties: (A) All the citizens, or (B) only some, appoint. Either (1) the magistrates are chosen out of all or (2) out of some who are distinguished either by a property qualification, or by birth, or merit, or for some special reason, as at Megara only those were eligible who had returned from exile and fought together against the democracy. They may be appointed either (a) by vote or (b) by lot. Again, these several varieties may be coupled, I mean that (C) some officers may be elected by some, others by all, and (3) some again out of some, and others out of all, and (c) some by vote and others by lot. Each variety of these terms admits of four modes.
For either (A 1 a) all may appoint from all by vote, or (A 1 b) all from all by lot, or (A 2 a) all from some by vote, or (A 2 b) all from some by lot (and from all, either by sections, as, for example, by tribes, and wards, and phratries, until all the citizens have been gone through; or the citizens may be in all cases eligible indiscriminately); or again (A 1 c, A 2 c) to some offices in the one way, to some in the other. Again, if it is only some that appoint, they may do so either (B 1 a) from all by vote, or (B 1 b) from all by lot, or (B 2 a) from some by vote, or (B 2 b) from some by lot, or to some offices in the one way, to others in the other, i.e., (B 1 c) from all, to some offices by vote, to some by lot, and (B 2 C) from some, to some offices by vote, to some by lot. Thus the modes that arise, apart from two (C, 3) out of the three couplings, number twelve. Of these systems two are popular, that all should appoint from all (A 1 a) by vote or (A 1 b) by lot — or (A 1 c) by both. That all should not appoint at once, but should appoint from all or from some either by lot or by vote or by both, or appoint to some offices from all and to others from some (’by both’ meaning to some offices by lot, to others by vote), is characteristic of a polity. And (B 1 c) that some should appoint from all, to some offices by vote, to others by lot, is also characteristic of a polity, but more oligarchical than the former method. And (A 3 a, b, c, B 3 a, b, c) to appoint from both, to some offices from all, to others from some, is characteristic of a polity with a leaning towards aristocracy. That (B 2) some should appoint from some is oligarchical — even (B 2 b) that some should appoint from some by lot (and if this does not actually occur, it is none the less oligarchical in character), or (B 2 C) that some should appoint from some by both. (B 1 a) that some should appoint from all, and (A 2 a) that all should appoint from some, by vote, is aristocratic.
These are the different modes of constituting magistrates, and these correspond to different forms of government: which are proper to which, or how they ought to be established, will be evident when we determine the nature of their powers. By powers I mean such powers as a magistrate exercises over the revenue or in defense of the country; for there are various kinds of power: the power of the general, for example, is not the same with that which regulates contracts in the market.
Of the three parts of government, the judicial remains to be considered, and this we shall divide on the same principle. There are three points on which the variedes of law-courts depend: The persons from whom they are appointed, the matters with which they are concerned, and the manner of their appointment. I mean, (1) are the judges taken from all, or from some only? (2) how many kinds of law-courts are there? (3) are the judges chosen by vote or by lot?
First, let me determine how many kinds of law-courts there are. There are eight in number: One is the court of audits or scrutinies; a second takes cognizance of ordinary offenses against the state; a third is concerned with treason against the constitution; the fourth determines disputes respecting penalties, whether raised by magistrates or by private persons; the fifth decides the more important civil cases; the sixth tries cases of homicide, which are of various kinds, (a) premeditated, (b) involuntary, (c) cases in which the guilt is confessed but the justice is disputed; and there may be a fourth court (d) in which murderers who have fled from justice are tried after their return; such as the Court of Phreatto is said to be at Athens. But cases of this sort rarely happen at all even in large cities. The different kinds of homicide may be tried either by the same or by different courts. (7) There are courts for strangers: of these there are two subdivisions, (a) for the settlement of their disputes with one another, (b) for the settlement of disputes between them and the citizens. And besides all these there must be (8) courts for small suits about sums of a drachma up to five drachmas, or a little more, which have to be determined, but they do not require many judges.
Nothing more need be said of these small suits, nor of the courts for homicide and for strangers: I would rather speak of political cases, which, when mismanaged, create division and disturbances in constitutions.
Now if all the citizens judge, in all the different cases which I have distinguished, they may be appointed by vote or by lot, or sometimes by lot and sometimes by vote. Or when a single class of causes are tried, the judges who decide them may be appointed, some by vote, and some by lot. These then are the four modes of appointing judges from the whole people, and there will be likewise four modes, if they are elected from a part only; for they may be appointed from some by vote and judge in all causes; or they may be appointed from some by lot and judge in all causes; or they may be elected in some cases by vote, and in some cases taken by lot, or some courts, even when judging the same causes, may be composed of members some appointed by vote and some by lot. These modes, then, as was said, answer to those previously mentioned.
Once more, the modes of appointment may be combined; I mean, that some may be chosen out of the whole people, others out of some, some out of both; for example, the same tribunal may be composed of some who were elected out of all, and of others who were elected out of some, either by vote or by lot or by both.
In how many forms law-courts can be established has now been considered. The first form, viz., that in which the judges are taken from all the citizens, and in which all causes are tried, is democratical; the second, which is composed of a few only who try all causes, oligarchical; the third, in which some courts are taken from all classes, and some from certain classes only, aristocratical and constitutional.
---
!!!Chapter I
{{Jowett: Book One: Chapter I}}
---
!!!Chapter II
{{Jowett: Book One: Chapter II}}
---
!!!Chapter III
{{Jowett: Book One: Chapter III}}
---
!!!Chapter IV
{{Jowett: Book One: Chapter IV}}
---
!!!Chapter V
{{Jowett: Book One: Chapter V}}
---
!!!Chapter VI
{{Jowett: Book One: Chapter VI}}
---
!!!Chapter VII
{{Jowett: Book One: Chapter VII}}
---
!!!Chapter VIII
{{Jowett: Book One: Chapter VIII}}
---
!!!Chapter IX
{{Jowett: Book One: Chapter IX}}
---
!!!Chapter X
{{Jowett: Book One: Chapter X}}
---
!!!Chapter XI
{{Jowett: Book One: Chapter XI}}
---
!!!Chapter XII
{{Jowett: Book One: Chapter XII}}
---
!!!Chapter XIII
{{Jowett: Book One: Chapter XIII}}
EVERY state is a community of some kind, and every community is established with a view to some good; for mankind always act in order to obtain that which they think good. But, if all communities aim at some good, the state or political community, which is the highest of all, and which embraces all the rest, aims at good in a greater degree than any other, and at the highest good.
Some people think that the qualifications of a statesman, king, householder, and master are the same, and that they differ, not in kind, but only in the number of their subjects. For example, the ruler over a few is called a master; over more, the manager of a household; over a still larger number, a statesman or king, as if there were no difference between a great household and a small state. The distinction which is made between the king and the statesman is as follows: When the government is personal, the ruler is a king; when, according to the rules of the political science, the citizens rule and are ruled in turn, then he is called a statesman.
But all this is a mistake; for governments differ in kind, as will be evident to any one who considers the matter according to the method which has hitherto guided us. As in other departments of science, so in politics, the compound should always be resolved into the simple elements or least parts of the whole. We must therefore look at the elements of which the state is composed, in order that we may see in what the different kinds of rule differ from one another, and whether any scientific result can be attained about each one of them.
He who thus considers things in their first growth and origin, whether a state or anything else, will obtain the clearest view of them. In the first place there must be a union of those who cannot exist without each other; namely, of male and female, that the race may continue (and this is a union which is formed, not of deliberate purpose, but because, in common with other animals and with plants, mankind have a natural desire to leave behind them an image of themselves), and of natural ruler and subject, that both may be preserved. For that which can foresee by the exercise of mind is by nature intended to be lord and master, and that which can with its body give effect to such foresight is a subject, and by nature a slave; hence master and slave have the same interest. Now nature has distinguished between the female and the slave. For she is not niggardly, like the smith who fashions the Delphian knife for many uses; she makes each thing for a single use, and every instrument is best made when intended for one and not for many uses. But among barbarians no distinction is made between women and slaves, because there is no natural ruler among them: they are a community of slaves, male and female. Wherefore the poets say,
<<<
It is meet that Hellenes should rule over barbarians;
<<<
as if they thought that the barbarian and the slave were by nature one.
Out of these two relationships between man and woman, master and slave, the first thing to arise is the family, and Hesiod is right when he says,
<<<
First house and wife and an ox for the plough,
<<<
for the ox is the poor man’s slave. The family is the association established by nature for the supply of men’s everyday wants, and the members of it are called by Charondas ‘companions of the cupboard,’ and by Epimenides the Cretan, ‘companions of the manger.’ But when several families are united, and the association aims at something more than the supply of daily needs, the first society to be formed is the village. And the most natural form of the village appears to be that of a colony from the family, composed of the children and grandchildren, who are said to be suckled ‘with the same milk.’ And this is the reason why Hellenic states were originally governed by kings; because the Hellenes were under royal rule before they came together, as the barbarians still are. Every family is ruled by the eldest, and therefore in the colonies of the family the kingly form of government prevailed because they were of the same blood. As Homer says:
<<<
Each one gives law to his children and to his wives.
<<<
For they lived dispersedly, as was the manner in ancient times. Wherefore men say that the Gods have a king, because they themselves either are or were in ancient times under the rule of a king. For they imagine, not only the forms of the Gods, but their ways of life to be like their own.
When several villages are united in a single complete community, large enough to be nearly or quite self-sufficing, the state comes into existence, originating in the bare needs of life, and continuing in existence for the sake of a good life. And therefore, if the earlier forms of society are natural, so is the state, for it is the end of them, and the nature of a thing is its end. For what each thing is when fully developed, we call its nature, whether we are speaking of a man, a horse, or a family. Besides, the final cause and end of a thing is the best, and to be self-sufficing is the end and the best.
Hence it is evident that the state is a creation of nature, and that man is by nature a political animal. And he who by nature and not by mere accident is without a state, is either a bad man or above humanity; he is like the
<<<
Tribeless, lawless, hearthless one,
<<<
whom Homer denounces — the natural outcast is forthwith a lover of war; he may be compared to an isolated piece at draughts.
Now, that man is more of a political animal than bees or any other gregarious animals is evident. Nature, as we often say, makes nothing in vain, and man is the only animal whom she has endowed with the gift of speech. And whereas mere voice is but an indication of pleasure or pain, and is therefore found in other animals (for their nature attains to the perception of pleasure and pain and the intimation of them to one another, and no further), the power of speech is intended to set forth the expedient and inexpedient, and therefore likewise the just and the unjust. And it is a characteristic of man that he alone has any sense of good and evil, of just and unjust, and the like, and the association of living beings who have this sense makes a family and a state.
Further, the state is by nature clearly prior to the family and to the individual, since the whole is of necessity prior to the part; for example, if the whole body be destroyed, there will be no foot or hand, except in an equivocal sense, as we might speak of a stone hand; for when destroyed the hand will be no better than that. But things are defined by their working and power; and we ought not to say that they are the same when they no longer have their proper quality, but only that they have the same name. The proof that the state is a creation of nature and prior to the individual is that the individual, when isolated, is not self-sufficing; and therefore he is like a part in relation to the whole. But he who is unable to live in society, or who has no need because he is sufficient for himself, must be either a beast or a god: he is no part of a state. A social instinct is implanted in all men by nature, and yet he who first founded the state was the greatest of benefactors. For man, when perfected, is the best of animals, but, when separated from law and justice, he is the worst of all; since armed injustice is the more dangerous, and he is equipped at birth with arms, meant to be used by intelligence and virtue, which he may use for the worst ends. Wherefore, if he have not virtue, he is the most unholy and the most savage of animals, and the most full of lust and gluttony. But justice is the bond of men in states, for the administration of justice, which is the determination of what is just, is the principle of order in political society.
Seeing then that the state is made up of households, before speaking of the state we must speak of the management of the household. The parts of household management correspond to the persons who compose the household, and a complete household consists of slaves and freemen. Now we should begin by examining everything in its fewest possible elements; and the first and fewest possible parts of a family are master and slave, husband and wife, father and children. We have therefore to consider what each of these three relations is and ought to be: I mean the relation of master and servant, the marriage relation (the conjunction of man and wife has no name of its own), and thirdly, the procreative relation (this also has no proper name). And there is another element of a household, the so-called art of getting wealth, which, according to some, is identical with household management, according to others, a principal part of it; the nature of this art will also have to be considered by us.
Let us first speak of master and slave, looking to the needs of practical life and also seeking to attain some better theory of their relation than exists at present. For some are of opinion that the rule of a master is a science, and that the management of a household, and the mastership of slaves, and the political and royal rule, as I was saying at the outset, are all the same. Others affirm that the rule of a master over slaves is contrary to nature, and that the distinction between slave and freeman exists by law only, and not by nature; and being an interference with nature is therefore unjust.
Property is a part of the household, and the art of acquiring property is a part of the art of managing the household; for no man can live well, or indeed live at all, unless he be provided with necessaries. And as in the arts which have a definite sphere the workers must have their own proper instruments for the accomplishment of their work, so it is in the management of a household. Now instruments are of various sorts; some are living, others lifeless; in the rudder, the pilot of a ship has a lifeless, in the look-out man, a living instrument; for in the arts the servant is a kind of instrument. Thus, too, a possession is an instrument for maintaining life. And so, in the arrangement of the family, a slave is a living possession, and property a number of such instruments; and the servant is himself an instrument which takes precedence of all other instruments. For if every instrument could accomplish its own work, obeying or anticipating the will of others, like the statues of Daedalus, or the tripods of Hephaestus, which, says the poet,
<<<
of their own accord entered the assembly of the Gods;
<<<
if, in like manner, the shuttle would weave and the plectrum touch the lyre without a hand to guide them, chief workmen would not want servants, nor masters slaves. Here, however, another distinction must be drawn; the instruments commonly so called are instruments of production, whilst a possession is an instrument of action. The shuttle, for example, is not only of use; but something else is made by it, whereas of a garment or of a bed there is only the use. Further, as production and action are different in kind, and both require instruments, the instruments which they employ must likewise differ in kind. But life is action and not production, and therefore the slave is the minister of action. Again, a possession is spoken of as a part is spoken of; for the part is not only a part of something else, but wholly belongs to it; and this is also true of a possession. The master is only the master of the slave; he does not belong to him, whereas the slave is not only the slave of his master, but wholly belongs to him. Hence we see what is the nature and office of a slave; he who is by nature not his own but another’s man, is by nature a slave; and he may be said to be another’s man who, being a human being, is also a possession. And a possession may be defined as an instrument of action, separable from the possessor.
There is another variety of the art of acquisition which is commonly and rightly called an art of wealth-getting, and has in fact suggested the notion that riches and property have no limit. Being nearly connected with the preceding, it is often identified with it. But though they are not very different, neither are they the same. The kind already described is given by nature, the other is gained by experience and art.
Let us begin our discussion of the question with the following considerations:
Of everything which we possess there are two uses: both belong to the thing as such, but not in the same manner, for one is the proper, and the other the improper or secondary use of it. For example, a shoe is used for wear, and is used for exchange; both are uses of the shoe. He who gives a shoe in exchange for money or food to him who wants one, does indeed use the shoe as a shoe, but this is not its proper or primary purpose, for a shoe is not made to be an object of barter. The same may be said of all possessions, for the art of exchange extends to all of them, and it arises at first from what is natural, from the circumstance that some have too little, others too much. Hence we may infer that retail trade is not a natural part of the art of getting wealth; had it been so, men would have ceased to exchange when they had enough. In the first community, indeed, which is the family, this art is obviously of no use, but it begins to be useful when the society increases. For the members of the family originally had all things in common; later, when the family divided into parts, the parts shared in many things, and different parts in different things, which they had to give in exchange for what they wanted, a kind of barter which is still practiced among barbarous nations who exchange with one another the necessaries of life and nothing more; giving and receiving wine, for example, in exchange for coin, and the like. This sort of barter is not part of the wealth-getting art and is not contrary to nature, but is needed for the satisfaction of men’s natural wants. The other or more complex form of exchange grew, as might have been inferred, out of the simpler. When the inhabitants of one country became more dependent on those of another, and they imported what they needed, and exported what they had too much of, money necessarily came into use. For the various necessaries of life are not easily carried about, and hence men agreed to employ in their dealings with each other something which was intrinsically useful and easily applicable to the purposes of life, for example, iron, silver, and the like. Of this the value was at first measured simply by size and weight, but in process of time they put a stamp upon it, to save the trouble of weighing and to mark the value.
When the use of coin had once been discovered, out of the barter of necessary articles arose the other art of wealth getting, namely, retail trade; which was at first probably a simple matter, but became more complicated as soon as men learned by experience whence and by what exchanges the greatest profit might be made. Originating in the use of coin, the art of getting wealth is generally thought to be chiefly concerned with it, and to be the art which produces riches and wealth; having to consider how they may be accumulated. Indeed, riches is assumed by many to be only a quantity of coin, because the arts of getting wealth and retail trade are concerned with coin. Others maintain that coined money is a mere sham, a thing not natural, but conventional only, because, if the users substitute another commodity for it, it is worthless, and because it is not useful as a means to any of the necessities of life, and, indeed, he who is rich in coin may often be in want of necessary food. But how can that be wealth of which a man may have a great abundance and yet perish with hunger, like Midas in the fable, whose insatiable prayer turned everything that was set before him into gold?
Hence men seek after a better notion of riches and of the art of getting wealth than the mere acquisition of coin, and they are right. For natural riches and the natural art of wealth-getting are a different thing; in their true form they are part of the management of a household; whereas retail trade is the art of producing wealth, not in every way, but by exchange. And it is thought to be concerned with coin; for coin is the unit of exchange and the measure or limit of it. And there is no bound to the riches which spring from this art of wealth getting. As in the art of medicine there is no limit to the pursuit of health, and as in the other arts there is no limit to the pursuit of their several ends, for they aim at accomplishing their ends to the uttermost (but of the means there is a limit, for the end is always the limit), so, too, in this art of wealth-getting there is no limit of the end, which is riches of the spurious kind, and the acquisition of wealth. But the art of wealth-getting which consists in household management, on the other hand, has a limit; the unlimited acquisition of wealth is not its business. And, therefore, in one point of view, all riches must have a limit; nevertheless, as a matter of fact, we find the opposite to be the case; for all getters of wealth increase their hoard of coin without limit. The source of the confusion is the near connection between the two kinds of wealth-getting; in either, the instrument is the same, although the use is different, and so they pass into one another; for each is a use of the same property, but with a difference: accumulation is the end in the one case, but there is a further end in the other. Hence some persons are led to believe that getting wealth is the object of household management, and the whole idea of their lives is that they ought either to increase their money without limit, or at any rate not to lose it. The origin of this disposition in men is that they are intent upon living only, and not upon living well; and, as their desires are unlimited they also desire that the means of gratifying them should be without limit. Those who do aim at a good life seek the means of obtaining bodily pleasures; and, since the enjoyment of these appears to depend on property, they are absorbed in getting wealth: and so there arises the second species of wealth-getting. For, as their enjoyment is in excess, they seek an art which produces the excess of enjoyment; and, if they are not able to supply their pleasures by the art of getting wealth, they try other arts, using in turn every faculty in a manner contrary to nature. The quality of courage, for example, is not intended to make wealth, but to inspire confidence; neither is this the aim of the general’s or of the physician’s art; but the one aims at victory and the other at health. Nevertheless, some men turn every quality or art into a means of getting wealth; this they conceive to be the end, and to the promotion of the end they think all things must contribute.
Thus, then, we have considered the art of wealth-getting which is unnecessary, and why men want it; and also the necessary art of wealth-getting, which we have seen to be different from the other, and to be a natural part of the art of managing a household, concerned with the provision of food, not, however, like the former kind, unlimited, but having a limit.
But is there any one thus intended by nature to be a slave, and for whom such a condition is expedient and right, or rather is not all slavery a violation of nature?
There is no difficulty in answering this question, on grounds both of reason and of fact. For that some should rule and others be ruled is a thing not only necessary, but expedient; from the hour of their birth, some are marked out for subjection, others for rule.
And there are many kinds both of rulers and subjects (and that rule is the better which is exercised over better subjects — for example, to rule over men is better than to rule over wild beasts; for the work is better which is executed by better workmen, and where one man rules and another is ruled, they may be said to have a work); for in all things which form a composite whole and which are made up of parts, whether continuous or discrete, a distinction between the ruling and the subject element comes to fight. Such a duality exists in living creatures, but not in them only; it originates in the constitution of the universe; even in things which have no life there is a ruling principle, as in a musical mode. But we are wandering from the subject. We will therefore restrict ourselves to the living creature, which, in the first place, consists of soul and body: and of these two, the one is by nature the ruler, and the other the subject. But then we must look for the intentions of nature in things which retain their nature, and not in things which are corrupted. And therefore we must study the man who is in the most perfect state both of body and soul, for in him we shall see the true relation of the two; although in bad or corrupted natures the body will often appear to rule over the soul, because they are in an evil and unnatural condition. At all events we may firstly observe in living creatures both a despotical and a constitutional rule; for the soul rules the body with a despotical rule, whereas the intellect rules the appetites with a constitutional and royal rule. And it is clear that the rule of the soul over the body, and of the mind and the rational element over the passionate, is natural and expedient; whereas the equality of the two or the rule of the inferior is always hurtful. The same holds good of animals in relation to men; for tame animals have a better nature than wild, and all tame animals are better off when they are ruled by man; for then they are preserved. Again, the male is by nature superior, and the female inferior; and the one rules, and the other is ruled; this principle, of necessity, extends to all mankind.
Where then there is such a difference as that between soul and body, or between men and animals (as in the case of those whose business is to use their body, and who can do nothing better), the lower sort are by nature slaves, and it is better for them as for all inferiors that they should be under the rule of a master. For he who can be, and therefore is, another’s and he who participates in rational principle enough to apprehend, but not to have, such a principle, is a slave by nature. Whereas the lower animals cannot even apprehend a principle; they obey their instincts. And indeed the use made of slaves and of tame animals is not very different; for both with their bodies minister to the needs of life. Nature would like to distinguish between the bodies of freemen and slaves, making the one strong for servile labor, the other upright, and although useless for such services, useful for political life in the arts both of war and peace. But the opposite often happens — that some have the souls and others have the bodies of freemen. And doubtless if men differed from one another in the mere forms of their bodies as much as the statues of the Gods do from men, all would acknowledge that the inferior class should be slaves of the superior. And if this is true of the body, how much more just that a similar distinction should exist in the soul? but the beauty of the body is seen, whereas the beauty of the soul is not seen. It is clear, then, that some men are by nature free, and others slaves, and that for these latter slavery is both expedient and right.
But that those who take the opposite view have in a certain way right on their side, may be easily seen. For the words slavery and slave are used in two senses. There is a slave or slavery by law as well as by nature. The law of which I speak is a sort of convention — the law by which whatever is taken in war is supposed to belong to the victors. But this right many jurists impeach, as they would an orator who brought forward an unconstitutional measure: they detest the notion that, because one man has the power of doing violence and is superior in brute strength, another shall be his slave and subject. Even among philosophers there is a difference of opinion. The origin of the dispute, and what makes the views invade each other’s territory, is as follows: in some sense virtue, when furnished with means, has actually the greatest power of exercising force; and as superior power is only found where there is superior excellence of some kind, power seems to imply virtue, and the dispute to be simply one about justice (for it is due to one party identifying justice with goodwill while the other identifies it with the mere rule of the stronger). If these views are thus set out separately, the other views have no force or plausibility against the view that the superior in virtue ought to rule, or be master. Others, clinging, as they think, simply to a principle of justice (for law and custom are a sort of justice), assume that slavery in accordance with the custom of war is justified by law, but at the same moment they deny this. For what if the cause of the war be unjust? And again, no one would ever say he is a slave who is unworthy to be a slave. Were this the case, men of the highest rank would be slaves and the children of slaves if they or their parents chance to have been taken captive and sold. Wherefore Hellenes do not like to call Hellenes slaves, but confine the term to barbarians. Yet, in using this language, they really mean the natural slave of whom we spoke at first; for it must be admitted that some are slaves everywhere, others nowhere. The same principle applies to nobility. Hellenes regard themselves as noble everywhere, and not only in their own country, but they deem the barbarians noble only when at home, thereby implying that there are two sorts of nobility and freedom, the one absolute, the other relative. The Helen of Theodectes says:
<<<
Who would presume to call me servant who am on both sides
sprung from the stem of the Gods?
<<<
What does this mean but that they distinguish freedom and slavery, noble and humble birth, by the two principles of good and evil? They think that as men and animals beget men and animals, so from good men a good man springs. But this is what nature, though she may intend it, cannot always accomplish.
We see then that there is some foundation for this difference of opinion, and that all are not either slaves by nature or freemen by nature, and also that there is in some cases a marked distinction between the two classes, rendering it expedient and right for the one to be slaves and the others to be masters: the one practicing obedience, the others exercising the authority and lordship which nature intended them to have. The abuse of this authority is injurious to both; for the interests of part and whole, of body and soul, are the same, and the slave is a part of the master, a living but separated part of his bodily frame. Hence, where the relation of master and slave between them is natural they are friends and have a common interest, but where it rests merely on law and force the reverse is true.
The previous remarks are quite enough to show that the rule of a master is not a constitutional rule, and that all the different kinds of rule are not, as some affirm, the same with each other. For there is one rule exercised over subjects who are by nature free, another over subjects who are by nature slaves. The rule of a household is a monarchy, for every house is under one head: whereas constitutional rule is a government of freemen and equals. The master is not called a master because he has science, but because he is of a certain character, and the same remark applies to the slave and the freeman. Still there may be a science for the master and science for the slave. The science of the slave would be such as the man of Syracuse taught, who made money by instructing slaves in their ordinary duties. And such a knowledge may be carried further, so as to include cookery and similar menial arts. For some duties are of the more necessary, others of the more honorable sort; as the proverb says, ‘slave before slave, master before master.’ But all such branches of knowledge are servile. There is likewise a science of the master, which teaches the use of slaves; for the master as such is concerned, not with the acquisition, but with the use of them. Yet this so-called science is not anything great or wonderful; for the master need only know how to order that which the slave must know how to execute. Hence those who are in a position which places them above toil have stewards who attend to their households while they occupy themselves with philosophy or with politics. But the art of acquiring slaves, I mean of justly acquiring them, differs both from the art of the master and the art of the slave, being a species of hunting or war. Enough of the distinction between master and slave.
Let us now inquire into property generally, and into the art of getting wealth, in accordance with our usual method, for a slave has been shown to be a part of property. The first question is whether the art of getting wealth is the same with the art of managing a household or a part of it, or instrumental to it; and if the last, whether in the way that the art of making shuttles is instrumental to the art of weaving, or in the way that the casting of bronze is instrumental to the art of the statuary, for they are not instrumental in the same way, but the one provides tools and the other material; and by material I mean the substratum out of which any work is made; thus wool is the material of the weaver, bronze of the statuary. Now it is easy to see that the art of household management is not identical with the art of getting wealth, for the one uses the material which the other provides. For the art which uses household stores can be no other than the art of household management. There is, however, a doubt whether the art of getting wealth is a part of household management or a distinct art. If the getter of wealth has to consider whence wealth and property can be procured, but there are many sorts of property and riches, then are husbandry, and the care and provision of food in general, parts of the wealth-getting art or distinct arts? Again, there are many sorts of food, and therefore there are many kinds of lives both of animals and men; they must all have food, and the differences in their food have made differences in their ways of life. For of beasts, some are gregarious, others are solitary; they live in the way which is best adapted to sustain them, accordingly as they are carnivorous or herbivorous or omnivorous: and their habits are determined for them by nature in such a manner that they may obtain with greater facility the food of their choice. But, as different species have different tastes, the same things are not naturally pleasant to all of them; and therefore the lives of carnivorous or herbivorous animals further differ among themselves. In the lives of men too there is a great difference. The laziest are shepherds, who lead an idle life, and get their subsistence without trouble from tame animals; their flocks having to wander from place to place in search of pasture, they are compelled to follow them, cultivating a sort of living farm. Others support themselves by hunting, which is of different kinds. Some, for example, are brigands, others, who dwell near lakes or marshes or rivers or a sea in which there are fish, are fishermen, and others live by the pursuit of birds or wild beasts. The greater number obtain a living from the cultivated fruits of the soil. Such are the modes of subsistence which prevail among those whose industry springs up of itself, and whose food is not acquired by exchange and retail trade — there is the shepherd, the husbandman, the brigand, the fisherman, the hunter. Some gain a comfortable maintenance out of two employments, eking out the deficiencies of one of them by another: thus the life of a shepherd may be combined with that of a brigand, the life of a farmer with that of a hunter. Other modes of life are similarly combined in any way which the needs of men may require. Property, in the sense of a bare livelihood, seems to be given by nature herself to all, both when they are first born, and when they are grown up. For some animals bring forth, together with their offspring, so much food as will last until they are able to supply themselves; of this the vermiparous or oviparous animals are an instance; and the viviparous animals have up to a certain time a supply of food for their young in themselves, which is called milk. In like manner we may infer that, after the birth of animals, plants exist for their sake, and that the other animals exist for the sake of man, the tame for use and food, the wild, if not all at least the greater part of them, for food, and for the provision of clothing and various instruments. Now if nature makes nothing incomplete, and nothing in vain, the inference must be that she has made all animals for the sake of man. And so, in one point of view, the art of war is a natural art of acquisition, for the art of acquisition includes hunting, an art which we ought to practice against wild beasts, and against men who, though intended by nature to be governed, will not submit; for war of such a kind is naturally just.
Of the art of acquisition then there is one kind which by nature is a part of the management of a household, in so far as the art of household management must either find ready to hand, or itself provide, such things necessary to life, and useful for the community of the family or state, as can be stored. They are the elements of true riches; for the amount of property which is needed for a good life is not unlimited, although Solon in one of his poems says that
<<<
No bound to riches has been fixed for man.
<<<
But there is a boundary fixed, just as there is in the other arts; for the instruments of any art are never unlimited, either in number or size, and riches may be defined as a number of instruments to be used in a household or in a state. And so we see that there is a natural art of acquisition which is practiced by managers of households and by statesmen, and what is the reason of this.
And we have found the answer to our original question, Whether the art of getting wealth is the business of the manager of a household and of the statesman or not their business? viz., that wealth is presupposed by them. For as political science does not make men, but takes them from nature and uses them, so too nature provides them with earth or sea or the like as a source of food. At this stage begins the duty of the manager of a household, who has to order the things which nature supplies; he may be compared to the weaver who has not to make but to use wool, and to know, too, what sort of wool is good and serviceable or bad and unserviceable. Were this otherwise, it would be difficult to see why the art of getting wealth is a part of the management of a household and the art of medicine not; for surely the members of a household must have health just as they must have life or any other necessary. The answer is that as from one point of view the master of the house and the ruler of the state have to consider about health, from another point of view not they but the physician; so in one way the art of household management, in another way the subordinate art, has to consider about wealth. But, strictly speaking, as I have already said, the means of life must be provided beforehand by nature; for the business of nature is to furnish food to that which is born, and the food of the offspring is always what remains over of that from which it is produced. Wherefore the art of getting wealth out of fruits and animals is always natural.
There are two sorts of wealth-getting, as I have said; one is a part of household management, the other is retail trade: the former necessary and honorable, while that which consists in exchange is justly censured; for it is unnatural, and a mode by which men gain from one another. The most hated sort, and with the greatest reason, is usury, which makes a gain out of money itself, and not from the natural object of it. For money was intended to be used in exchange, but not to increase at interest. And this term interest, which means the birth of money from money, is applied to the breeding of money because the offspring resembles the parent. Wherefore of an modes of getting wealth this is the most unnatural.
Enough has been said about the theory of wealth-getting; we will now proceed to the practical part. The discussion of such matters is not unworthy of philosophy, but to be engaged in them practically is illiberal and irksome. The useful parts of wealth-getting are, first, the knowledge of livestock — which are most profitable, and where, and how — as, for example, what sort of horses or sheep or oxen or any other animals are most likely to give a return. A man ought to know which of these pay better than others, and which pay best in particular places, for some do better in one place and some in another. Secondly, husbandry, which may be either tillage or planting, and the keeping of bees and of fish, or fowl, or of any animals which may be useful to man. These are the divisions of the true or proper art of wealth-getting and come first. Of the other, which consists in exchange, the first and most important division is commerce (of which there are three kinds — the provision of a ship, the conveyance of goods, exposure for sale — these again differing as they are safer or more profitable), the second is usury, the third, service for hire — of this, one kind is employed in the mechanical arts, the other in unskilled and bodily labor. There is still a third sort of wealth getting intermediate between this and the first or natural mode which is partly natural, but is also concerned with exchange, viz., the industries that make their profit from the earth, and from things growing from the earth which, although they bear no fruit, are nevertheless profitable; for example, the cutting of timber and all mining. The art of mining, by which minerals are obtained, itself has many branches, for there are various kinds of things dug out of the earth. Of the several divisions of wealth-getting I now speak generally; a minute consideration of them might be useful in practice, but it would be tiresome to dwell upon them at greater length now.
Those occupations are most truly arts in which there is the least element of chance; they are the meanest in which the body is most deteriorated, the most servile in which there is the greatest use of the body, and the most illiberal in which there is the least need of excellence.
Works have been written upon these subjects by various persons; for example, by Chares the Parian, and Apollodorus the Lemnian, who have treated of Tillage and Planting, while others have treated of other branches; any one who cares for such matters may refer to their writings. It would be well also to collect the scattered stories of the ways in which individuals have succeeded in amassing a fortune; for all this is useful to persons who value the art of getting wealth. There is the anecdote of Thales the Milesian and his financial device, which involves a principle of universal application, but is attributed to him on account of his reputation for wisdom. He was reproached for his poverty, which was supposed to show that philosophy was of no use. According to the story, he knew by his skill in the stars while it was yet winter that there would be a great harvest of olives in the coming year; so, having a little money, he gave deposits for the use of all the olive-presses in Chios and Miletus, which he hired at a low price because no one bid against him. When the harvest-time came, and many were wanted all at once and of a sudden, he let them out at any rate which he pleased, and made a quantity of money. Thus he showed the world that philosophers can easily be rich if they like, but that their ambition is of another sort. He is supposed to have given a striking proof of his wisdom, but, as I was saying, his device for getting wealth is of universal application, and is nothing but the creation of a monopoly. It is an art often practiced by cities when they are want of money; they make a monopoly of provisions.
There was a man of Sicily, who, having money deposited with him, bought up an the iron from the iron mines; afterwards, when the merchants from their various markets came to buy, he was the only seller, and without much increasing the price he gained 200 per cent. Which when Dionysius heard, he told him that he might take away his money, but that he must not remain at Syracuse, for he thought that the man had discovered a way of making money which was injurious to his own interests. He made the same discovery as Thales; they both contrived to create a monopoly for themselves. And statesmen as well ought to know these things; for a state is often as much in want of money and of such devices for obtaining it as a household, or even more so; hence some public men devote themselves entirely to finance.
Of household management we have seen that there are three parts — one is the rule of a master over slaves, which has been discussed already, another of a father, and the third of a husband. A husband and father, we saw, rules over wife and children, both free, but the rule differs, the rule over his children being a royal, over his wife a constitutional rule. For although there may be exceptions to the order of nature, the male is by nature fitter for command than the female, just as the elder and full-grown is superior to the younger and more immature. But in most constitutional states the citizens rule and are ruled by turns, for the idea of a constitutional state implies that the natures of the citizens are equal, and do not differ at all. Nevertheless, when one rules and the other is ruled we endeavor to create a difference of outward forms and names and titles of respect, which may be illustrated by the saying of Amasis about his foot-pan. The relation of the male to the female is of this kind, but there the inequality is permanent. The rule of a father over his children is royal, for he rules by virtue both of love and of the respect due to age, exercising a kind of royal power. And therefore Homer has appropriately called Zeus ‘father of Gods and men,’ because he is the king of them all. For a king is the natural superior of his subjects, but he should be of the same kin or kind with them, and such is the relation of elder and younger, of father and son.
Thus it is clear that household management attends more to men than to the acquisition of inanimate things, and to human excellence more than to the excellence of property which we call wealth, and to the virtue of freemen more than to the virtue of slaves. A question may indeed be raised, whether there is any excellence at all in a slave beyond and higher than merely instrumental and ministerial qualities — whether he can have the virtues of temperance, courage, justice, and the like; or whether slaves possess only bodily and ministerial qualities. And, whichever way we answer the question, a difficulty arises; for, if they have virtue, in what will they differ from freemen? On the other hand, since they are men and share in rational principle, it seems absurd to say that they have no virtue. A similar question may be raised about women and children, whether they too have virtues: ought a woman to be temperate and brave and just, and is a child to be called temperate, and intemperate, or note So in general we may ask about the natural ruler, and the natural subject, whether they have the same or different virtues. For if a noble nature is equally required in both, why should one of them always rule, and the other always be ruled? Nor can we say that this is a question of degree, for the difference between ruler and subject is a difference of kind, which the difference of more and less never is. Yet how strange is the supposition that the one ought, and that the other ought not, to have virtue! For if the ruler is intemperate and unjust, how can he rule well? If the subject, how can he obey well? If he be licentious and cowardly, he will certainly not do his duty. It is evident, therefore, that both of them must have a share of virtue, but varying as natural subjects also vary among themselves. Here the very constitution of the soul has shown us the way; in it one part naturally rules, and the other is subject, and the virtue of the ruler we in maintain to be different from that of the subject; the one being the virtue of the rational, and the other of the irrational part. Now, it is obvious that the same principle applies generally, and therefore almost all things rule and are ruled according to nature. But the kind of rule differs; the freeman rules over the slave after another manner from that in which the male rules over the female, or the man over the child; although the parts of the soul are present in an of them, they are present in different degrees. For the slave has no deliberative faculty at all; the woman has, but it is without authority, and the child has, but it is immature. So it must necessarily be supposed to be with the moral virtues also; all should partake of them, but only in such manner and degree as is required by each for the fulfillment of his duty. Hence the ruler ought to have moral virtue in perfection, for his function, taken absolutely, demands a master artificer, and rational principle is such an artificer; the subjects, oil the other hand, require only that measure of virtue which is proper to each of them. Clearly, then, moral virtue belongs to all of them; but the temperance of a man and of a woman, or the courage and justice of a man and of a woman, are not, as Socrates maintained, the same; the courage of a man is shown in commanding, of a woman in obeying. And this holds of all other virtues, as will be more clearly seen if we look at them in detail, for those who say generally that virtue consists in a good disposition of the soul, or in doing rightly, or the like, only deceive themselves. Far better than such definitions is their mode of speaking, who, like Gorgias, enumerate the virtues. All classes must be deemed to have their special attributes; as the poet says of women,
<<<
Silence is a woman’s glory,
<<<
but this is not equally the glory of man. The child is imperfect, and therefore obviously his virtue is not relative to himself alone, but to the perfect man and to his teacher, and in like manner the virtue of the slave is relative to a master. Now we determined that a slave is useful for the wants of life, and therefore he will obviously require only so much virtue as will prevent him from failing in his duty through cowardice or lack of self-control. Some one will ask whether, if what we are saying is true, virtue will not be required also in the artisans, for they often fail in their work through the lack of self control? But is there not a great difference in the two cases? For the slave shares in his master’s life; the artisan is less closely connected with him, and only attains excellence in proportion as he becomes a slave. The meaner sort of mechanic has a special and separate slavery; and whereas the slave exists by nature, not so the shoemaker or other artisan. It is manifest, then, that the master ought to be the source of such excellence in the slave, and not a mere possessor of the art of mastership which trains the slave in his duties. Wherefore they are mistaken who forbid us to converse with slaves and say that we should employ command only, for slaves stand even more in need of admonition than children.
So much for this subject; the relations of husband and wife, parent and child, their several virtues, what in their intercourse with one another is good, and what is evil, and how we may pursue the good and good and escape the evil, will have to be discussed when we speak of the different forms of government. For, inasmuch as every family is a part of a state, and these relationships are the parts of a family, and the virtue of the part must have regard to the virtue of the whole, women and children must be trained by education with an eye to the constitution, if the virtues of either of them are supposed to make any difference in the virtues of the state. And they must make a difference: for the children grow up to be citizens, and half the free persons in a state are women.
Of these matters, enough has been said; of what remains, let us speak at another time. Regarding, then, our present inquiry as complete, we will make a new beginning. And, first, let us examine the various theories of a perfect state.
---
!!![[Chapter I|Jowett: Book Seven: Chapter I]]
{{Jowett: Book Seven: Chapter I}}
---
!!![[Chapter II|Jowett: Book Seven: Chapter II]]
{{Jowett: Book Seven: Chapter II}}
---
!!![[Chapter III|Jowett: Book Seven: Chapter III]]
{{Jowett: Book Seven: Chapter III}}
---
!!![[Chapter IV|Jowett: Book Seven: Chapter IV]]
{{Jowett: Book Seven: Chapter IV}}
---
!!![[Chapter V|Jowett: Book Seven: Chapter V]]
{{Jowett: Book Seven: Chapter V}}
---
!!![[Chapter VI|Jowett: Book Seven: Chapter VI]]
{{Jowett: Book Seven: Chapter VI}}
---
!!![[Chapter VII|Jowett: Book Seven: Chapter VII]]
{{Jowett: Book Seven: Chapter VII}}
---
!!![[Chapter VIII|Jowett: Book Seven: Chapter VIII]]
{{Jowett: Book Seven: Chapter VIII}}
---
!!![[Chapter IX|Jowett: Book Seven: Chapter IX]]
{{Jowett: Book Seven: Chapter IX}}
---
!!![[Chapter X|Jowett: Book Seven: Chapter X]]
{{Jowett: Book Seven: Chapter X}}
---
!!![[Chapter XI|Jowett: Book Seven: Chapter XI]]
{{Jowett: Book Seven: Chapter XI}}
---
!!![[Chapter XII|Jowett: Book Seven: Chapter XII]]
{{Jowett: Book Seven: Chapter XII}}
---
!!![[Chapter XIII|Jowett: Book Seven: Chapter XIII]]
{{Jowett: Book Seven: Chapter XIII}}
---
!!![[Chapter XIV|Jowett: Book Seven: Chapter XIV]]
{{Jowett: Book Seven: Chapter XIV}}
---
!!![[Chapter XV|Jowett: Book Seven: Chapter XV]]
{{Jowett: Book Seven: Chapter XV}}
---
!!![[Chapter XVI|Jowett: Book Seven: Chapter XVI]]
{{Jowett: Book Seven: Chapter XVI}}
---
!!![[Chapter XVII|Jowett: Book Seven: Chapter XVII]]
{{Jowett: Book Seven: Chapter XVII}}
HE who would duly inquire about the best form of a state ought first to determine which is the most eligible life; while this remains uncertain the best form of the state must also be uncertain; for, in the natural order of things, those may be expected to lead the best life who are governed in the best manner of which their circumstances admit. We ought therefore to ascertain, first of all, which is the most generally eligible life, and then whether the same life is or is not best for the state and for individuals.
Assuming that enough has been already said in discussions outside the school concerning the best life, we will now only repeat what is contained in them. Certainly no one will dispute the propriety of that partition of goods which separates them into three classes, viz., external goods, goods of the body, and goods of the soul, or deny that the happy man must have all three. For no one would maintain that he is happy who has not in him a particle of courage or temperance or justice or prudence, who is afraid of every insect which flutters past him, and will commit any crime, however great, in order to gratify his lust of meat or drink, who will sacrifice his dearest friend for the sake of half-a-farthing, and is as feeble and false in mind as a child or a madman. These propositions are almost universally acknowledged as soon as they are uttered, but men differ about the degree or relative superiority of this or that good. Some think that a very moderate amount of virtue is enough, but set no limit to their desires of wealth, property, power, reputation, and the like. To whom we reply by an appeal to facts, which easily prove that mankind do not acquire or preserve virtue by the help of external goods, but external goods by the help of virtue, and that happiness, whether consisting in pleasure or virtue, or both, is more often found with those who are most highly cultivated in their mind and in their character, and have only a moderate share of external goods, than among those who possess external goods to a useless extent but are deficient in higher qualities; and this is not only matter of experience, but, if reflected upon, will easily appear to be in accordance with reason. For, whereas external goods have a limit, like any other instrument, and all things useful are of such a nature that where there is too much of them they must either do harm, or at any rate be of no use, to their possessors, every good of the soul, the greater it is, is also of greater use, if the epithet useful as well as noble is appropriate to such subjects. No proof is required to show that the best state of one thing in relation to another corresponds in degree of excellence to the interval between the natures of which we say that these very states are states: so that, if the soul is more noble than our possessions or our bodies, both absolutely and in relation to us, it must be admitted that the best state of either has a similar ratio to the other. Again, it is for the sake of the soul that goods external and goods of the body are eligible at all, and all wise men ought to choose them for the sake of the soul, and not the soul for the sake of them.
Let us acknowledge then that each one has just so much of happiness as he has of virtue and wisdom, and of virtuous and wise action. God is a witness to us of this truth, for he is happy and blessed, not by reason of any external good, but in himself and by reason of his own nature. And herein of necessity lies the difference between good fortune and happiness; for external goods come of themselves, and chance is the author of them, but no one is just or temperate by or through chance. In like manner, and by a similar train of argument, the happy state may be shown to be that which is best and which acts rightly; and rightly it cannot act without doing right actions, and neither individual nor state can do right actions without virtue and wisdom. Thus the courage, justice, and wisdom of a state have the same form and nature as the qualities which give the individual who possesses them the name of just, wise, or temperate.
Thus much may suffice by way of preface: for I could not avoid touching upon these questions, neither could I go through all the arguments affecting them; these are the business of another science.
Let us assume then that the best life, both for individuals and states, is the life of virtue, when virtue has external goods enough for the performance of good actions. If there are any who controvert our assertion, we will in this treatise pass them over, and consider their objections hereafter.
There remains to be discussed the question whether the happiness of the individual is the same as that of the state, or different. Here again there can be no doubt — no one denies that they are the same. For those who hold that the well-being of the individual consists in his wealth, also think that riches make the happiness of the whole state, and those who value most highly the life of a tyrant deem that city the happiest which rules over the greatest number; while they who approve an individual for his virtue say that the more virtuous a city is, the happier it is. Two points here present themselves for consideration: first (1), which is the more eligible life, that of a citizen who is a member of a state, or that of an alien who has no political ties; and again (2), which is the best form of constitution or the best condition of a state, either on the supposition that political privileges are desirable for all, or for a majority only? Since the good of the state and not of the individual is the proper subject of political thought and speculation, and we are engaged in a political discussion, while the first of these two points has a secondary interest for us, the latter will be the main subject of our inquiry.
Now it is evident that the form of government is best in which every man, whoever he is, can act best and live happily. But even those who agree in thinking that the life of virtue is the most eligible raise a question, whether the life of business and politics is or is not more eligible than one which is wholly independent of external goods, I mean than a contemplative life, which by some is maintained to be the only one worthy of a philosopher. For these two lives — the life of the philosopher and the life of the statesman — appear to have been preferred by those who have been most keen in the pursuit of virtue, both in our own and in other ages. Which is the better is a question of no small moment; for the wise man, like the wise state, will necessarily regulate his life according to the best end. There are some who think that while a despotic rule over others is the greatest injustice, to exercise a constitutional rule over them, even though not unjust, is a great impediment to a man’s individual wellbeing. Others take an opposite view; they maintain that the true life of man is the practical and political, and that every virtue admits of being practiced, quite as much by statesmen and rulers as by private individuals. Others, again, are of opinion that arbitrary and tyrannical rule alone consists with happiness; indeed, in some states the entire aim both of the laws and of the constitution is to give men despotic power over their neighbors. And, therefore, although in most cities the laws may be said generally to be in a chaotic state, still, if they aim at anything, they aim at the maintenance of power: thus in Lacedaemon and Crete the system of education and the greater part of the of the laws are framed with a view to war. And in all nations which are able to gratify their ambition military power is held in esteem, for example among the Scythians and Persians and Thracians and Celts.
In some nations there are even laws tending to stimulate the warlike virtues, as at Carthage, where we are told that men obtain the honor of wearing as many armlets as they have served campaigns. There was once a law in Macedonia that he who had not killed an enemy should wear a halter, and among the Scythians no one who had not slain his man was allowed to drink out of the cup which was handed round at a certain feast. Among the Iberians, a warlike nation, the number of enemies whom a man has slain is indicated by the number of obelisks which are fixed in the earth round his tomb; and there are numerous practices among other nations of a like kind, some of them established by law and others by custom. Yet to a reflecting mind it must appear very strange that the statesman should be always considering how he can dominate and tyrannize over others, whether they will or not. How can that which is not even lawful be the business of the statesman or the legislator? Unlawful it certainly is to rule without regard to justice, for there may be might where there is no right. The other arts and sciences offer no parallel a physician is not expected to persuade or coerce his patients, nor a pilot the passengers in his ship. Yet most men appear to think that the art of despotic government is statesmanship, and what men affirm to be unjust and inexpedient in their own case they are not ashamed of practicing towards others; they demand just rule for themselves, but where other men are concerned they care nothing about it. Such behavior is irrational; unless the one party is, and the other is not, born to serve, in which case men have a right to command, not indeed all their fellows, but only those who are intended to be subjects; just as we ought not to hunt mankind, whether for food or sacrifice, but only the animals which may be hunted for food or sacrifice, this is to say, such wild animals as are eatable. And surely there may be a city happy in isolation, which we will assume to be well-governed (for it is quite possible that a city thus isolated might be well-administered and have good laws); but such a city would not be constituted with any view to war or the conquest of enemies — all that sort of thing must be excluded. Hence we see very plainly that warlike pursuits, although generally to be deemed honorable, are not the supreme end of all things, but only means. And the good lawgiver should inquire how states and races of men and communities may participate in a good life, and in the happiness which is attainable by them. His enactments will not be always the same; and where there are neighbors he will have to see what sort of studies should be practiced in relation to their several characters, or how the measures appropriate in relation to each are to be adopted. The end at which the best form of government should aim may be properly made a matter of future consideration.
Let us now address those who, while they agree that the life of virtue is the most eligible, differ about the manner of practicing it. For some renounce political power, and think that the life of the freeman is different from the life of the statesman and the best of all; but others think the life of the statesman best. The argument of the latter is that he who does nothing cannot do well, and that virtuous activity is identical with happiness. To both we say: ‘you are partly right and partly wrong.’ first class are right in affirming that the life of the freeman is better than the life of the despot; for there is nothing grand or noble in having the use of a slave, in so far as he is a slave; or in issuing commands about necessary things. But it is an error to suppose that every sort of rule is despotic like that of a master over slaves, for there is as great a difference between the rule over freemen and the rule over slaves as there is between slavery by nature and freedom by nature, about which I have said enough at the commencement of this treatise. And it is equally a mistake to place inactivity above action, for happiness is activity, and the actions of the just and wise are the realization of much that is noble.
But perhaps some one, accepting these premises, may still maintain that supreme power is the best of all things, because the possessors of it are able to perform the greatest number of noble actions. if so, the man who is able to rule, instead of giving up anything to his neighbor, ought rather to take away his power; and the father should make no account of his son, nor the son of his father, nor friend of friend; they should not bestow a thought on one another in comparison with this higher object, for the best is the most eligible and ‘doing eligible’ and ‘doing well’ is the best. There might be some truth in such a view if we assume that robbers and plunderers attain the chief good. But this can never be; their hypothesis is false. For the actions of a ruler cannot really be honorable, unless he is as much superior to other men as a husband is to a wife, or a father to his children, or a master to his slaves. And therefore he who violates the law can never recover by any success, however great, what he has already lost in departing from virtue. For equals the honorable and the just consist in sharing alike, as is just and equal. But that the unequal should be given to equals, and the unlike to those who are like, is contrary to nature, and nothing which is contrary to nature is good. If, therefore, there is any one superior in virtue and in the power of performing the best actions, him we ought to follow and obey, but he must have the capacity for action as well as virtue.
If we are right in our view, and happiness is assumed to be virtuous activity, the active life will be the best, both for every city collectively, and for individuals. Not that a life of action must necessarily have relation to others, as some persons think, nor are those ideas only to be regarded as practical which are pursued for the sake of practical results, but much more the thoughts and contemplations which are independent and complete in themselves; since virtuous activity, and therefore a certain kind of action, is an end, and even in the case of external actions the directing mind is most truly said to act. Neither, again, is it necessary that states which are cut off from others and choose to live alone should be inactive; for activity, as well as other things, may take place by sections; there are many ways in which the sections of a state act upon one another. The same thing is equally true of every individual. If this were otherwise, God and the universe, who have no external actions over and above their own energies, would be far enough from perfection. Hence it is evident that the same life is best for each individual, and for states and for mankind collectively
Thus far by way of introduction. In what has preceded I have discussed other forms of government; in what remains the first point to be considered is what should be the conditions of the ideal or perfect state; for the perfect state cannot exist without a due supply of the means of life. And therefore we must presuppose many purely imaginary conditions, but nothing impossible. There will be a certain number of citizens, a country in which to place them, and the like. As the weaver or shipbuilder or any other artisan must have the material proper for his work (and in proportion as this is better prepared, so will the result of his art be nobler), so the statesman or legislator must also have the materials suited to him.
First among the materials required by the statesman is population: he will consider what should be the number and character of the citizens, and then what should be the size and character of the country. Most persons think that a state in order to be happy ought to be large; but even if they are right, they have no idea what is a large and what a small state. For they judge of the size of the city by the number of the inhabitants; whereas they ought to regard, not their number, but their power. A city too, like an individual, has a work to do; and that city which is best adapted to the fulfillment of its work is to be deemed greatest, in the same sense of the word great in which Hippocrates might be called greater, not as a man, but as a physician, than some one else who was taller And even if we reckon greatness by numbers, we ought not to include everybody, for there must always be in cities a multitude of slaves and sojourners and foreigners; but we should include those only who are members of the state, and who form an essential part of it. The number of the latter is a proof of the greatness of a city; but a city which produces numerous artisans and comparatively few soldiers cannot be great, for a great city is not to be confounded with a populous one. Moreover, experience shows that a very populous city can rarely, if ever, be well governed; since all cities which have a reputation for good government have a limit of population. We may argue on grounds of reason, and the same result will follow. For law is order, and good law is good order; but a very great multitude cannot be orderly: to introduce order into the unlimited is the work of a divine power — of such a power as holds together the universe. Beauty is realized in number and magnitude, and the state which combines magnitude with good order must necessarily be the most beautiful. To the size of states there is a limit, as there is to other things, plants, animals, implements; for none of these retain their natural power when they are too large or too small, but they either wholly lose their nature, or are spoiled. For example, a ship which is only a span long will not be a ship at all, nor a ship a quarter of a mile long; yet there may be a ship of a certain size, either too large or too small, which will still be a ship, but bad for sailing. In like manner a state when composed of too few is not, as a state ought to be, self-sufficing; when of too many, though self-sufficing in all mere necessaries, as a nation may be, it is not a state, being almost incapable of constitutional government. For who can be the general of such a vast multitude, or who the herald, unless he have the voice of a Stentor?
A state, then, only begins to exist when it has attained a population sufficient for a good life in the political community: it may indeed, if it somewhat exceed this number, be a greater state. But, as I was saying, there must be a limit. What should be the limit will be easily ascertained by experience. For both governors and governed have duties to perform; the special functions of a governor to command and to judge. But if the citizens of a state are to judge and to distribute offices according to merit, then they must know each other’s characters; where they do not possess this knowledge, both the election to offices and the decision of lawsuits will go wrong. When the population is very large they are manifestly settled at haphazard, which clearly ought not to be. Besides, in an over-populous state foreigners and metics will readily acquire the rights of citizens, for who will find them out? Clearly then the best limit of the population of a state is the largest number which suffices for the purposes of life, and can be taken in at a single view. Enough concerning the size of a state.
Having determined these points, we have in the next place to consider whether all ought to share in every sort of occupation. Shall every man be at once husbandman, artisan, councillor, judge, or shall we suppose the several occupations just mentioned assigned to different persons? or, thirdly, shall some employments be assigned to individuals and others common to all? The same arrangement, however, does not occur in every constitution; as we were saying, all may be shared by all, or not all by all, but only by some; and hence arise the differences of constitutions, for in democracies all share in all, in oligarchies the opposite practice prevails. Now, since we are here speaking of the best form of government, i.e., that under which the state will be most happy (and happiness, as has been already said, cannot exist without virtue), it clearly follows that in the state which is best governed and possesses men who are just absolutely, and not merely relatively to the principle of the constitution, the citizens must not lead the life of mechanics or tradesmen, for such a life is ignoble, and inimical to virtue. Neither must they be husbandmen, since leisure is necessary both for the development of virtue and the performance of political duties.
Again, there is in a state a class of warriors, and another of councillors, who advise about the expedient and determine matters of law, and these seem in an especial manner parts of a state. Now, should these two classes be distinguished, or are both functions to be assigned to the same persons? Here again there is no difficulty in seeing that both functions will in one way belong to the same, in another, to different persons. To different persons in so far as these i.e., the physical and the employments are suited to different primes of life, for the one requires mental wisdom and the other strength. But on the other hand, since it is an impossible thing that those who are able to use or to resist force should be willing to remain always in subjection, from this point of view the persons are the same; for those who carry arms can always determine the fate of the constitution. It remains therefore that both functions should be entrusted by the ideal constitution to the same persons, not, however, at the same time, but in the order prescribed by nature, who has given to young men strength and to older men wisdom. Such a distribution of duties will be expedient and also just, and is founded upon a principle of conformity to merit. Besides, the ruling class should be the owners of property, for they are citizens, and the citizens of a state should be in good circumstances; whereas mechanics or any other class which is not a producer of virtue have no share in the state. This follows from our first principle, for happiness cannot exist without virtue, and a city is not to be termed happy in regard to a portion of the citizens, but in regard to them all. And clearly property should be in their hands, since the husbandmen will of necessity be slaves or barbarian Perioeci.
Of the classes enumerated there remain only the priests, and the manner in which their office is to be regulated is obvious. No husbandman or mechanic should be appointed to it; for the Gods should receive honor from the citizens only. Now since the body of the citizen is divided into two classes, the warriors and the councillors and it is beseeming that the worship of the Gods should be duly performed, and also a rest provided in their service for those who from age have given up active life, to the old men of these two classes should be assigned the duties of the priesthood.
We have shown what are the necessary conditions, and what the parts of a state: husbandmen, craftsmen, and laborers of an kinds are necessary to the existence of states, but the parts of the state are the warriors and councillors. And these are distinguished severally from one another, the distinction being in some cases permanent, in others not.
Much the same principle will apply to the territory of the state: every one would agree in praising the territory which is most entirely self-sufficing; and that must be the territory which is all-producing, for to have all things and to want nothing is sufficiency. In size and extent it should be such as may enable the inhabitants to live at once temperately and liberally in the enjoyment of leisure. Whether we are right or wrong in laying down this limit we will inquire more precisely hereafter, when we have occasion to consider what is the right use of property and wealth: a matter which is much disputed, because men are inclined to rush into one of two extremes, some into meanness, others into luxury.
It is not difficult to determine the general character of the territory which is required (there are, however, some points on which military authorities should be heard); it should be difficult of access to the enemy, and easy of egress to the inhabitants. Further, we require that the land as well as the inhabitants of whom we were just now speaking should be taken in at a single view, for a country which is easily seen can be easily protected. As to the position of the city, if we could have what we wish, it should be well situated in regard both to sea and land. This then is one principle, that it should be a convenient center for the protection of the whole country: the other is, that it should be suitable for receiving the fruits of the soil, and also for the bringing in of timber and any other products that are easily transported.
Whether a communication with the sea is beneficial to a well-ordered state or not is a question which has often been asked. It is argued that the introduction of strangers brought up under other laws, and the increase of population, will be adverse to good order; the increase arises from their using the sea and having a crowd of merchants coming and going, and is inimical to good government. Apart from these considerations, it would be undoubtedly better, both with a view to safety and to the provision of necessaries, that the city and territory should be connected with the sea; the defenders of a country, if they are to maintain themselves against an enemy, should be easily relieved both by land and by sea; and even if they are not able to attack by sea and land at once, they will have less difficulty in doing mischief to their assailants on one element, if they themselves can use both. Moreover, it is necessary that they should import from abroad what is not found in their own country, and that they should export what they have in excess; for a city ought to be a market, not indeed for others, but for herself.
Those who make themselves a market for the world only do so for the sake of revenue, and if a state ought not to desire profit of this kind it ought not to have such an emporium. Nowadays we often see in countries and cities dockyards and harbors very conveniently placed outside the city, but not too far off; and they are kept in dependence by walls and similar fortifications. Cities thus situated manifestly reap the benefit of intercourse with their ports; and any harm which is likely to accrue may be easily guarded against by the laws, which will pronounce and determine who may hold communication with one another, and who may not.
There can be no doubt that the possession of a moderate naval force is advantageous to a city; the city should be formidable not only to its own citizens but to some of its neighbors, or, if necessary, able to assist them by sea as well as by land. The proper number or magnitude of this naval force is relative to the character of the state; for if her function is to take a leading part in politics, her naval power should be commensurate with the scale of her enterprises. The population of the state need not be much increased, since there is no necessity that the sailors should be citizens: the marines who have the control and command will be freemen, and belong also to the infantry; and wherever there is a dense population of Perioeci and husbandmen, there will always be sailors more than enough. Of this we see instances at the present day. The city of Heraclea, for example, although small in comparison with many others, can man a considerable fleet. Such are our conclusions respecting the territory of the state, its harbors, its towns, its relations to the sea, and its maritime power.
Having spoken of the number of the citizens, we will proceed to speak of what should be their character. This is a subject which can be easily understood by any one who casts his eye on the more celebrated states of Hellas, and generally on the distribution of races in the habitable world. Those who live in a cold climate and in Europe are full of spirit, but wanting in intelligence and skill; and therefore they retain comparative freedom, but have no political organization, and are incapable of ruling over others. Whereas the natives of Asia are intelligent and inventive, but they are wanting in spirit, and therefore they are always in a state of subjection and slavery. But the Hellenic race, which is situated between them, is likewise intermediate in character, being high-spirited and also intelligent. Hence it continues free, and is the best-governed of any nation, and, if it could be formed into one state, would be able to rule the world. There are also similar differences in the different tribes of Hellas; for some of them are of a one-sided nature, and are intelligent or courageous only, while in others there is a happy combination of both qualities. And clearly those whom the legislator will most easily lead to virtue may be expected to be both intelligent and courageous. Some say that the guardians should be friendly towards those whom they know, fierce towards those whom they do not know. Now, passion is the quality of the soul which begets friendship and enables us to love; notably the spirit within us is more stirred against our friends and acquaintances than against those who are unknown to us, when we think that we are despised by them; for which reason Archilochus, complaining of his friends, very naturally addresses his soul in these words:
<<<
For surely thou art plagued on account of friends.
<<<
The power of command and the love of freedom are in all men based upon this quality, for passion is commanding and invincible. Nor is it right to say that the guardians should be fierce towards those whom they do not know, for we ought not to be out of temper with any one; and a lofty spirit is not fierce by nature, but only when excited against evil-doers. And this, as I was saying before, is a feeling which men show most strongly towards their friends if they think they have received a wrong at their hands: as indeed is reasonable; for, besides the actual injury, they seem to be deprived of a benefit by those who owe them one. Hence the saying:
<<<
Cruel is the strife of brethren,
<<<
and again:
<<<
They who love in excess also hate in excess.
<<<
Thus we have nearly determined the number and character of the citizens of our state, and also the size and nature of their territory. I say ‘nearly,’ for we ought not to require the same minuteness in theory as in the facts given by perception.
As in other natural compounds the conditions of a composite whole are not necessarily organic parts of it, so in a state or in any other combination forming a unity not everything is a part, which is a necessary condition. The members of an association have necessarily some one thing the same and common to all, in which they share equally or unequally for example, food or land or any other thing. But where there are two things of which one is a means and the other an end, they have nothing in common except that the one receives what the other produces. Such, for example, is the relation which workmen and tools stand to their work; the house and the builder have nothing in common, but the art of the builder is for the sake of the house. And so states require property, but property, even though living beings are included in it, is no part of a state; for a state is not a community of living beings only, but a community of equals, aiming at the best life possible. Now, whereas happiness is the highest good, being a realization and perfect practice of virtue, which some can attain, while others have little or none of it, the various qualities of men are clearly the reason why there are various kinds of states and many forms of government; for different men seek after happiness in different ways and by different means, and so make for themselves different modes of life and forms of government. We must see also how many things are indispensable to the existence of a state, for what we call the parts of a state will be found among the indispensables. Let us then enumerate the functions of a state, and we shall easily elicit what we want:
First, there must be food; secondly, arts, for life requires many instruments; thirdly, there must be arms, for the members of a community have need of them, and in their own hands, too, in order to maintain authority both against disobedient subjects and against external assailants; fourthly, there must be a certain amount of revenue, both for internal needs, and for the purposes of war; fifthly, or rather first, there must be a care of religion which is commonly called worship; sixthly, and most necessary of all there must be a power of deciding what is for the public interest, and what is just in men’s dealings with one another.
These are the services which every state may be said to need. For a state is not a mere aggregate of persons, but a union of them sufficing for the purposes of life; and if any of these things be wanting, it is as we maintain impossible that the community can be absolutely self-sufficing. A state then should be framed with a view to the fulfillment of these functions. There must be husbandmen to procure food, and artisans, and a warlike and a wealthy class, and priests, and judges to decide what is necessary and expedient.
It is not a new or recent discovery of political philosophers that the state ought to be divided into classes, and that the warriors should be separated from the husbandmen. The system has continued in Egypt and in Crete to this day, and was established, as tradition says, by a law of Sesostris in Egypt and of Minos in Crete. The institution of common tables also appears to be of ancient date, being in Crete as old as the reign of Minos, and in Italy far older. The Italian historians say that there was a certain Italus, king of Oenotria, from whom the Oenotrians were called Italians, and who gave the name of Italy to the promontory of Europe lying within the Scylletic and Lametic Gulfs, which are distant from one another only half a day’s journey. They say that this Italus converted the Oenotrians from shepherds into husbandmen, and besides other laws which he gave them, was the founder of their common meals; even in our day some who are derived from him retain this institution and certain other laws of his. On the side of Italy towards Tyrrhenia dwelt the Opici, who are now, as of old, called Ausones; and on the side towards Iapygia and the Ionian Gulf, in the district called Siritis, the Chones, who are likewise of Oenotrian race. From this part of the world originally came the institution of common tables; the separation into castes from Egypt, for the reign of Sesostris is of far greater antiquity than that of Minos. It is true indeed that these and many other things have been invented several times over in the course of ages, or rather times without number; for necessity may be supposed to have taught men the inventions which were absolutely required, and when these were provided, it was natural that other things which would adorn and enrich life should grow up by degrees. And we may infer that in political institutions the same rule holds. Egypt witnesses to the antiquity of all these things, for the Egyptians appear to be of all people the most ancient; and they have laws and a regular constitution existing from time immemorial. We should therefore make the best use of what has been already discovered, and try to supply defects.
I have already remarked that the land ought to belong to those who possess arms and have a share in the government, and that the husbandmen ought to be a class distinct from them; and I have determined what should be the extent and nature of the territory. Let me proceed to discuss the distribution of the land, and the character of the agricultural class; for I do not think that property ought to be common, as some maintain, but only that by friendly consent there should be a common use of it; and that no citizen should be in want of subsistence.
As to common meals, there is a general agreement that a well ordered city should have them; and we will hereafter explain what are our own reasons for taking this view. They ought, however, to be open to all the citizens. And yet it is not easy for the poor to contribute the requisite sum out of their private means, and to provide also for their household. The expense of religious worship should likewise be a public charge. The land must therefore be divided into two parts, one public and the other private, and each part should be subdivided, part of the public land being appropriated to the service of the Gods, and the other part used to defray the cost of the common meals; while of the private land, part should be near the border, and the other near the city, so that, each citizen having two lots, they may all of them have land in both places; there is justice and fairness in such a division, and it tends to inspire unanimity among the people in their border wars. Where there is not this arrangement some of them are too ready to come to blows with their neighbors, while others are so cautious that they quite lose the sense of honor. Wherefore there is a law in some places which forbids those who dwell near the border to take part in public deliberations about wars with neighbors, on the ground that their interests will pervert their judgment. For the reasons already mentioned, then, the land should be divided in the manner described. The very best thing of all would be that the husbandmen should be slaves taken from among men who are not all of the same race and not spirited, for if they have no spirit they will be better suited for their work, and there will be no danger of their making a revolution. The next best thing would be that they should be Perioeci of foreign race, and of a like inferior nature; some of them should be the slaves of individuals, and employed in the private estates of men of property, the remainder should be the property of the state and employed on the common land. I will hereafter explain what is the proper treatment of slaves, and why it is expedient that liberty should be always held out to them as the reward of their services.
We have already said that the city should be open to the land and to the sea, and to the whole country as far as possible. In respect of the place itself our wish would be that its situation should be fortunate in four things. The first, health — this is a necessity: cities which lie towards the east, and are blown upon by winds coming from the east, are the healthiest; next in healthfulness are those which are sheltered from the north wind, for they have a milder winter. The site of the city should likewise be convenient both for political administration and for war. With a view to the latter it should afford easy egress to the citizens, and at the same time be inaccessible and difficult of capture to enemies. There should be a natural abundance of springs and fountains in the town, or, if there is a deficiency of them, great reservoirs may be established for the collection of rainwater, such as will not fail when the inhabitants are cut off from the country by by war. Special care should be taken of the health of the inhabitants, which will depend chiefly on the healthiness of the locality and of the quarter to which they are exposed, and secondly, on the use of pure water; this latter point is by no means a secondary consideration. For the elements which we use most and oftenest for the support of the body contribute most to health, and among these are water and air. Wherefore, in all wise states, if there is a want of pure water, and the supply is not all equally good, the drinking water ought to be separated from that which is used for other purposes.
As to strongholds, what is suitable to different forms of government varies: thus an acropolis is suited to an oligarchy or a monarchy, but a plain to a democracy; neither to an aristocracy, but rather a number of strong places. The arrangement of private houses is considered to be more agreeable and generally more convenient, if the streets are regularly laid out after the modern fashion which Hippodamus introduced, but for security in war the antiquated mode of building, which made it difficult for strangers to get out of a town and for assailants to find their way in, is preferable. A city should therefore adopt both plans of building: it is possible to arrange the houses irregularly, as husbandmen plant their vines in what are called ‘clumps.’ The whole town should not be laid out in straight lines, but only certain quarters and regions; thus security and beauty will be combined.
As to walls, those who say that cities making any pretension to military virtue should not have them, are quite out of date in their notions; and they may see the cities which prided themselves on this fancy confuted by facts. True, there is little courage shown in seeking for safety behind a rampart when an enemy is similar in character and not much superior in number; but the superiority of the besiegers may be and often is too much both for ordinary human valor and for that which is found only in a few; and if they are to be saved and to escape defeat and outrage, the strongest wall will be the truest soldierly precaution, more especially now that missiles and siege engines have been brought to such perfection. To have no walls would be as foolish as to choose a site for a town in an exposed country, and to level the heights; or as if an individual were to leave his house unwalled, lest the inmates should become cowards. Nor must we forget that those who have their cities surrounded by walls may either take advantage of them or not, but cities which are unwalled have no choice.
If our conclusions are just, not only should cities have walls, but care should be taken to make them ornamental, as well as useful for warlike purposes, and adapted to resist modern inventions. For as the assailants of a city do all they can to gain an advantage, so the defenders should make use of any means of defense which have been already discovered, and should devise and invent others, for when men are well prepared no enemy even thinks of attacking them.
As the walls are to be divided by guardhouses and towers built at suitable intervals, and the body of citizens must be distributed at common tables, the idea will naturally occur that we should establish some of the common tables in the guardhouses. These might be arranged as has been suggested; while the principal common tables of the magistrates will occupy a suitable place, and there also will be the buildings appropriated to religious worship except in the case of those rites which the law or the Pythian oracle has restricted to a special locality. The site should be a spot seen far and wide, which gives due elevation to virtue and towers over the neighborhood. Below this spot should be established an agora, such as that which the Thessalians call the ‘freemen’s agora’; from this all trade should be excluded, and no mechanic, husbandman, or any such person allowed to enter, unless he be summoned by the magistrates. It would be a charming use of the place, if the gymnastic exercises of the elder men were performed there. For in this noble practice different ages should be separated, and some of the magistrates should stay with the boys, while the grown-up men remain with the magistrates; for the presence of the magistrates is the best mode of inspiring true modesty and ingenuous fear. There should also be a traders’ agora, distinct and apart from the other, in a situation which is convenient for the reception of goods both by sea and land.
But in speaking of the magistrates we must not forget another section of the citizens, viz., the priests, for whom public tables should likewise be provided in their proper place near the temples. The magistrates who deal with contracts, indictments, summonses, and the like, and those who have the care of the agora and of the city, respectively, ought to be established near an agora and some public place of meeting; the neighborhood of the traders’ agora will be a suitable spot; the upper agora we devote to the life of leisure, the other is intended for the necessities of trade.
The same order should prevail in the country, for there too the magistrates, called by some ‘Inspectors of Forests’ and by others ‘Wardens of the Country,’ must have guardhouses and common tables while they are on duty; temples should also be scattered throughout the country, dedicated, some to Gods, and some to heroes.
But it would be a waste of time for us to linger over details like these. The difficulty is not in imagining but in carrying them out. We may talk about them as much as we like, but the execution of them will depend upon fortune. Wherefore let us say no more about these matters for the present.
Returning to the constitution itself, let us seek to determine out of what and what sort of elements the state which is to be happy and well-governed should be composed. There are two things in which all which all well-being consists: one of them is the choice of a right end and aim of action, and the other the discovery of the actions which are means towards it; for the means and the end may agree or disagree. Sometimes the right end is set before men, but in practice they fail to attain it; in other cases they are successful in all the means, but they propose to themselves a bad end; and sometimes they fail in both. Take, for example, the art of medicine; physicians do not always understand the nature of health, and also the means which they use may not effect the desired end. In all arts and sciences both the end and the means should be equally within our control.
The happiness and well-being which all men manifestly desire, some have the power of attaining, but to others, from some accident or defect of nature, the attainment of them is not granted; for a good life requires a supply of external goods, in a less degree when men are in a good state, in a greater degree when they are in a lower state. Others again, who possess the conditions of happiness, go utterly wrong from the first in the pursuit of it. But since our object is to discover the best form of government, that, namely, under which a city will be best governed, and since the city is best governed which has the greatest opportunity of obtaining happiness, it is evident that we must clearly ascertain the nature of happiness.
We maintain, and have said in the Ethics, if the arguments there adduced are of any value, that happiness is the realization and perfect exercise of virtue, and this not conditional, but absolute. And I used the term ‘conditional’ to express that which is indispensable, and ‘absolute’ to express that which is good in itself. Take the case of just actions; just punishments and chastisements do indeed spring from a good principle, but they are good only because we cannot do without them — it would be better that neither individuals nor states should need anything of the sort — but actions which aim at honor and advantage are absolutely the best. The conditional action is only the choice of a lesser evil; whereas these are the foundation and creation of good. A good man may make the best even of poverty and disease, and the other ills of life; but he can only attain happiness under the opposite conditions (for this also has been determined in accordance with ethical arguments, that the good man is he for whom, because he is virtuous, the things that are absolutely good are good; it is also plain that his use of these goods must be virtuous and in the absolute sense good). This makes men fancy that external goods are the cause of happiness, yet we might as well say that a brilliant performance on the lyre was to be attributed to the instrument and not to the skill of the performer.
It follows then from what has been said that some things the legislator must find ready to his hand in a state, others he must provide. And therefore we can only say: May our state be constituted in such a manner as to be blessed with the goods of which fortune disposes (for we acknowledge her power): whereas virtue and goodness in the state are not a matter of chance but the result of knowledge and purpose. A city can be virtuous only when the citizens who have a share in the government are virtuous, and in our state all the citizens share in the government; let us then inquire how a man becomes virtuous. For even if we could suppose the citizen body to be virtuous, without each of them being so, yet the latter would be better, for in the virtue of each the virtue of all is involved.
There are three things which make men good and virtuous; these are nature, habit, rational principle. In the first place, every one must be born a man and not some other animal; so, too, he must have a certain character, both of body and soul. But some qualities there is no use in having at birth, for they are altered by habit, and there are some gifts which by nature are made to be turned by habit to good or bad. Animals lead for the most part a life of nature, although in lesser particulars some are influenced by habit as well. Man has rational principle, in addition, and man only. Wherefore nature, habit, rational principle must be in harmony with one another; for they do not always agree; men do many things against habit and nature, if rational principle persuades them that they ought. We have already determined what natures are likely to be most easily molded by the hands of the legislator. An else is the work of education; we learn some things by habit and some by instruction.
Since every political society is composed of rulers and subjects let us consider whether the relations of one to the other should interchange or be permanent. For the education of the citizens will necessarily vary with the answer given to this question. Now, if some men excelled others in the same degree in which gods and heroes are supposed to excel mankind in general (having in the first place a great advantage even in their bodies, and secondly in their minds), so that the superiority of the governors was undisputed and patent to their subjects, it would clearly be better that once for an the one class should rule and the other serve. But since this is unattainable, and kings have no marked superiority over their subjects, such as Scylax affirms to be found among the Indians, it is obviously necessary on many grounds that all the citizens alike should take their turn of governing and being governed. Equality consists in the same treatment of similar persons, and no government can stand which is not founded upon justice. For if the government be unjust every one in the country unites with the governed in the desire to have a revolution, and it is an impossibility that the members of the government can be so numerous as to be stronger than all their enemies put together. Yet that governors should excel their subjects is undeniable. How all this is to be effected, and in what way they will respectively share in the government, the legislator has to consider. The subject has been already mentioned. Nature herself has provided the distinction when she made a difference between old and young within the same species, of whom she fitted the one to govern and the other to be governed. No one takes offense at being governed when he is young, nor does he think himself better than his governors, especially if he will enjoy the same privilege when he reaches the required age.
We conclude that from one point of view governors and governed are identical, and from another different. And therefore their education must be the same and also different. For he who would learn to command well must, as men say, first of all learn to obey. As I observed in the first part of this treatise, there is one rule which is for the sake of the rulers and another rule which is for the sake of the ruled; the former is a despotic, the latter a free government. Some commands differ not in the thing commanded, but in the intention with which they are imposed. Wherefore, many apparently menial offices are an honor to the free youth by whom they are performed; for actions do not differ as honorable or dishonorable in themselves so much as in the end and intention of them. But since we say that the virtue of the citizen and ruler is the same as that of the good man, and that the same person must first be a subject and then a ruler, the legislator has to see that they become good men, and by what means this may be accomplished, and what is the end of the perfect life.
Now the soul of man is divided into two parts, one of which has a rational principle in itself, and the other, not having a rational principle in itself, is able to obey such a principle. And we call a man in any way good because he has the virtues of these two parts. In which of them the end is more likely to be found is no matter of doubt to those who adopt our division; for in the world both of nature and of art the inferior always exists for the sake of the better or superior, and the better or superior is that which has a rational principle. This principle, too, in our ordinary way of speaking, is divided into two kinds, for there is a practical and a speculative principle. This part, then, must evidently be similarly divided. And there must be a corresponding division of actions; the actions of the naturally better part are to be preferred by those who have it in their power to attain to two out of the three or to all, for that is always to every one the most eligible which is the highest attainable by him. The whole of life is further divided into two parts, business and leisure, war and peace, and of actions some aim at what is necessary and useful, and some at what is honorable. And the preference given to one or the other class of actions must necessarily be like the preference given to one or other part of the soul and its actions over the other; there must be war for the sake of peace, business for the sake of leisure, things useful and necessary for the sake of things honorable. All these points the statesman should keep in view when he frames his laws; he should consider the parts of the soul and their functions, and above all the better and the end; he should also remember the diversities of human lives and actions. For men must be able to engage in business and go to war, but leisure and peace are better; they must do what is necessary and indeed what is useful, but what is honorable is better. On such principles children and persons of every age which requires education should be trained. Whereas even the Hellenes of the present day who are reputed to be best governed, and the legislators who gave them their constitutions, do not appear to have framed their governments with a regard to the best end, or to have given them laws and education with a view to all the virtues, but in a vulgar spirit have fallen back on those which promised to be more useful and profitable. Many modern writers have taken a similar view: they commend the Lacedaemonian constitution, and praise the legislator for making conquest and war his sole aim, a doctrine which may be refuted by argument and has long ago been refuted by facts. For most men desire empire in the hope of accumulating the goods of fortune; and on this ground Thibron and all those who have written about the Lacedaemonian constitution have praised their legislator, because the Lacedaemonians, by being trained to meet dangers, gained great power. But surely they are not a happy people now that their empire has passed away, nor was their legislator right. How ridiculous is the result, if, when they are continuing in the observance of his laws and no one interferes with them, they have lost the better part of life! These writers further err about the sort of government which the legislator should approve, for the government of freemen is nobler and implies more virtue than despotic government. Neither is a city to be deemed happy or a legislator to be praised because he trains his citizens to conquer and obtain dominion over their neighbors, for there is great evil in this. On a similar principle any citizen who could, should obviously try to obtain the power in his own state — the crime which the Lacedaemonians accuse king Pausanias of attempting, although he had so great honor already. No such principle and no law having this object is either statesmanlike or useful or right. For the same things are best both for individuals and for states, and these are the things which the legislator ought to implant in the minds of his citizens.
Neither should men study war with a view to the enslavement of those who do not deserve to be enslaved; but first of all they should provide against their own enslavement, and in the second place obtain empire for the good of the governed, and not for the sake of exercising a general despotism, and in the third place they should seek to be masters only over those who deserve to be slaves. Facts, as well as arguments, prove that the legislator should direct all his military and other measures to the provision of leisure and the establishment of peace. For most of these military states are safe only while they are at war, but fall when they have acquired their empire; like unused iron they lose their temper in time of peace. And for this the legislator is to blame, he never having taught them how to lead the life of peace.
Since the end of individuals and of states is the same, the end of the best man and of the best constitution must also be the same; it is therefore evident that there ought to exist in both of them the virtues of leisure; for peace, as has been often repeated, is the end of war, and leisure of toil. But leisure and cultivation may be promoted, not only by those virtues which are practiced in leisure, but also by some of those which are useful to business. For many necessaries of life have to be supplied before we can have leisure. Therefore a city must be temperate and brave, and able to endure: for truly, as the proverb says, ‘There is no leisure for slaves,’ and those who cannot face danger like men are the slaves of any invader. Courage and endurance are required for business and philosophy for leisure, temperance and justice for both, and more especially in times of peace and leisure, for war compels men to be just and temperate, whereas the enjoyment of good fortune and the leisure which comes with peace tend to make them insolent. Those then who seem to be the best-off and to be in the possession of every good, have special need of justice and temperance — for example, those (if such there be, as the poets say) who dwell in the Islands of the Blest; they above all will need philosophy and temperance and justice, and all the more the more leisure they have, living in the midst of abundance. There is no difficulty in seeing why the state that would be happy and good ought to have these virtues. If it be disgraceful in men not to be able to use the goods of life, it is peculiarly disgraceful not to be able to use them in time of leisure — to show excellent qualities in action and war, and when they have peace and leisure to be no better than slaves. Wherefore we should not practice virtue after the manner of the Lacedaemonians. For they, while agreeing with other men in their conception of the highest goods, differ from the rest of mankind in thinking that they are to be obtained by the practice of a single virtue. And since they think these goods and the enjoyment of them greater than the enjoyment derived from the virtues . . . and that it should be practiced for its own sake, is evident from what has been said; we must now consider how and by what means it is to be attained.
We have already determined that nature and habit and rational principle are required, and, of these, the proper nature of the citizens has also been defined by us. But we have still to consider whether the training of early life is to be that of rational principle or habit, for these two must accord, and when in accord they will then form the best of harmonies. The rational principle may be mistaken and fail in attaining the highest ideal of life, and there may be a like evil influence of habit. Thus much is clear in the first place, that, as in all other things, birth implies an antecedent beginning, and that there are beginnings whose end is relative to a further end. Now, in men rational principle and mind are the end towards which nature strives, so that the birth and moral discipline of the citizens ought to be ordered with a view to them. In the second place, as the soul and body are two, we see also that there are two parts of the soul, the rational and the irrational, and two corresponding states — reason and appetite. And as the body is prior in order of generation to the soul, so the irrational is prior to the rational. The proof is that anger and wishing and desire are implanted in children from their very birth, but reason and understanding are developed as they grow older. Wherefore, the care of the body ought to precede that of the soul, and the training of the appetitive part should follow: none the less our care of it must be for the sake of the reason, and our care of the body for the sake of the soul.
Since the legislator should begin by considering how the frames of the children whom he is rearing may be as good as possible, his first care will be about marriage — at what age should his citizens marry, and who are fit to marry? In legislating on this subject he ought to consider the persons and the length of their life, that their procreative life may terminate at the same period, and that they may not differ in their bodily powers, as will be the case if the man is still able to beget children while the woman is unable to bear them, or the woman able to bear while the man is unable to beget, for from these causes arise quarrels and differences between married persons. Secondly, he must consider the time at which the children will succeed to their parents; there ought not to be too great an interval of age, for then the parents will be too old to derive any pleasure from their affection, or to be of any use to them. Nor ought they to be too nearly of an age; to youthful marriages there are many objections — the children will be wanting in respect to the parents, who will seem to be their contemporaries, and disputes will arise in the management of the household. Thirdly, and this is the point from which we digressed, the legislator must mold to his will the frames of newly-born children. Almost all these objects may be secured by attention to one point. Since the time of generation is commonly limited within the age of seventy years in the case of a man, and of fifty in the case of a woman, the commencement of the union should conform to these periods. The union of male and female when too young is bad for the procreation of children; in all other animals the offspring of the young are small and in-developed, and with a tendency to produce female children, and therefore also in man, as is proved by the fact that in those cities in which men and women are accustomed to marry young, the people are small and weak; in childbirth also younger women suffer more, and more of them die; some persons say that this was the meaning of the response once given to the Troezenians — the oracle really meant that many died because they married too young; it had nothing to do with the ingathering of the harvest. It also conduces to temperance not to marry too soon; for women who marry early are apt to be wanton; and in men too the bodily frame is stunted if they marry while the seed is growing (for there is a time when the growth of the seed, also, ceases, or continues to but a slight extent). Women should marry when they are about eighteen years of age, and men at seven and thirty; then they are in the prime of life, and the decline in the powers of both will coincide. Further, the children, if their birth takes place soon, as may reasonably be expected, will succeed in the beginning of their prime, when the fathers are already in the decline of life, and have nearly reached their term of three-score years and ten.
Thus much of the age proper for marriage: the season of the year should also be considered; according to our present custom, people generally limit marriage to the season of winter, and they are right. The precepts of physicians and natural philosophers about generation should also be studied by the parents themselves; the physicians give good advice about the favorable conditions of the body, and the natural philosophers about the winds; of which they prefer the north to the south.
What constitution in the parent is most advantageous to the offspring is a subject which we will consider more carefully when we speak of the education of children, and we will only make a few general remarks at present. The constitution of an athlete is not suited to the life of a citizen, or to health, or to the procreation of children, any more than the valetudinarian or exhausted constitution, but one which is in a mean between them. A man’s constitution should be inured to labor, but not to labor which is excessive or of one sort only, such as is practiced by athletes; he should be capable of all the actions of a freeman. These remarks apply equally to both parents.
Women who are with child should be careful of themselves; they should take exercise and have a nourishing diet. The first of these prescriptions the legislator will easily carry into effect by requiring that they shall take a walk daily to some temple, where they can worship the gods who preside over birth. Their minds, however, unlike their bodies, they ought to keep quiet, for the offspring derive their natures from their mothers as plants do from the earth.
As to the exposure and rearing of children, let there be a law that no deformed child shall live, but that on the ground of an excess in the number of children, if the established customs of the state forbid this (for in our state population has a limit), no child is to be exposed, but when couples have children in excess, let abortion be procured before sense and life have begun; what may or may not be lawfully done in these cases depends on the question of life and sensation.
And now, having determined at what ages men and women are to begin their union, let us also determine how long they shall continue to beget and bear offspring for the state; men who are too old, like men who are too young, produce children who are defective in body and mind; the children of very old men are weakly. The limit then, should be the age which is the prime of their intelligence, and this in most persons, according to the notion of some poets who measure life by periods of seven years, is about fifty; at four or five years or later, they should cease from having families; and from that time forward only cohabit with one another for the sake of health; or for some similar reason.
As to adultery, let it be held disgraceful, in general, for any man or woman to be found in any way unfaithful when they are married, and called husband and wife. If during the time of bearing children anything of the sort occur, let the guilty person be punished with a loss of privileges in proportion to the offense.
After the children have been born, the manner of rearing them may be supposed to have a great effect on their bodily strength. It would appear from the example of animals, and of those nations who desire to create the military habit, that the food which has most milk in it is best suited to human beings; but the less wine the better, if they would escape diseases. Also all the motions to which children can be subjected at their early age are very useful. But in order to preserve their tender limbs from distortion, some nations have had recourse to mechanical appliances which straighten their bodies. To accustom children to the cold from their earliest years is also an excellent practice, which greatly conduces to health, and hardens them for military service. Hence many barbarians have a custom of plunging their children at birth into a cold stream; others, like the Celts, clothe them in a light wrapper only. For human nature should be early habituated to endure all which by habit it can be made to endure; but the process must be gradual. And children, from their natural warmth, may be easily trained to bear cold. Such care should attend them in the first stage of life.
The next period lasts to the age of five; during this no demand should be made upon the child for study or labor, lest its growth be impeded; and there should be sufficient motion to prevent the limbs from being inactive. This can be secured, among other ways, by amusement, but the amusement should not be vulgar or tiring or effeminate. The Directors of Education, as they are termed, should be careful what tales or stories the children hear, for all such things are designed to prepare the way for the business of later life, and should be for the most part imitations of the occupations which they will hereafter pursue in earnest. Those are wrong who in their laws attempt to check the loud crying and screaming of children, for these contribute towards their growth, and, in a manner, exercise their bodies. Straining the voice has a strengthening effect similar to that produced by the retention of the breath in violent exertions. The Directors of Education should have an eye to their bringing up, and in particular should take care that they are left as little as possible with slaves. For until they are seven years old they must five at home; and therefore, even at this early age, it is to be expected that they should acquire a taint of meanness from what they hear and see. Indeed, there is nothing which the legislator should be more careful to drive away than indecency of speech; for the light utterance of shameful words leads soon to shameful actions. The young especially should never be allowed to repeat or hear anything of the sort. A freeman who is found saying or doing what is forbidden, if he be too young as yet to have the privilege of reclining at the public tables, should be disgraced and beaten, and an elder person degraded as his slavish conduct deserves. And since we do not allow improper language, clearly we should also banish pictures or speeches from the stage which are indecent. Let the rulers take care that there be no image or picture representing unseemly actions, except in the temples of those Gods at whose festivals the law permits even ribaldry, and whom the law also permits to be worshipped by persons of mature age on behalf of themselves, their children, and their wives. But the legislator should not allow youth to be spectators of iambi or of comedy until they are of an age to sit at the public tables and to drink strong wine; by that time education will have armed them against the evil influences of such representations.
We have made these remarks in a cursory manner — they are enough for the present occasion; but hereafter we will return to the subject and after a fuller discussion determine whether such liberty should or should not be granted, and in what way granted, if at all. Theodorus, the tragic actor, was quite right in saying that he would not allow any other actor, not even if he were quite second-rate, to enter before himself, because the spectators grew fond of the voices which they first heard. And the same principle applies universally to association with things as well as with persons, for we always like best whatever comes first. And therefore youth should be kept strangers to all that is bad, and especially to things which suggest vice or hate. When the five years have passed away, during the two following years they must look on at the pursuits which they are hereafter to learn. There are two periods of life with reference to which education has to be divided, from seven to the age of puberty, and onwards to the age of one and twenty. The poets who divide ages by sevens are in the main right: but we should observe the divisions actually made by nature; for the deficiencies of nature are what art and education seek to fill up.
Let us then first inquire if any regulations are to be laid down about children, and secondly, whether the care of them should be the concern of the state or of private individuals, which latter is in our own day the common custom, and in the third place, what these regulations should be.
---
!!![[Chapter I|Jowett: Book Six: Chapter I]]
{{Jowett: Book Six: Chapter I}}
---
!!![[Chapter II|Jowett: Book Six: Chapter II]]
{{Jowett: Book Six: Chapter II}}
---
!!![[Chapter III|Jowett: Book Six: Chapter III]]
{{Jowett: Book Six: Chapter III}}
---
!!![[Chapter IV|Jowett: Book Six: Chapter IV]]
{{Jowett: Book Six: Chapter IV}}
---
!!![[Chapter V|Jowett: Book Six: Chapter V]]
{{Jowett: Book Six: Chapter V}}
---
!!![[Chapter VI|Jowett: Book Six: Chapter VI]]
{{Jowett: Book Six: Chapter VI}}
---
!!![[Chapter VII|Jowett: Book Six: Chapter VII]]
{{Jowett: Book Six: Chapter VII}}
---
!!![[Chapter VIII|Jowett: Book Six: Chapter VIII]]
{{Jowett: Book Six: Chapter VIII}}
WE have now considered the varieties of the deliberative or supreme power in states, and the various arrangements of law-courts and state offices, and which of them are adapted to different forms of government. We have also spoken of the destruction and preservation of constitutions, how and from what causes they arise.
Of democracy and all other forms of government there are many kinds; and it will be well to assign to them severally the modes of organization which are proper and advantageous to each, adding what remains to be said about them. Moreover, we ought to consider the various combinations of these modes themselves; for such combinations make constitutions overlap one another, so that aristocracies have an oligarchical character, and constitutional governments incline to democracies.
When I speak of the combinations which remain to be considered, and thus far have not been considered by us, I mean such as these: when the deliberative part of the government and the election of officers is constituted oligarchically, and the law-courts aristocratically, or when the courts and the deliberative part of the state are oligarchical, and the election to office aristocratical, or when in any other way there is a want of harmony in the composition of a state.
I have shown already what forms of democracy are suited to particular cities, and what of oligarchy to particular peoples, and to whom each of the other forms of government is suited. Further, we must not only show which of these governments is the best for each state, but also briefly proceed to consider how these and other forms of government are to be established.
First of all let us speak of democracy, which will also bring to light the opposite form of government commonly called oligarchy. For the purposes of this inquiry we need to ascertain all the elements and characteristics of democracy, since from the combinations of these the varieties of democratic government arise. There are several of these differing from each other, and the difference is due to two causes. One (1) has been already mentioned — differences of population; for the popular element may consist of husbandmen, or of mechanics, or of laborers, and if the first of these be added to the second, or the third to the two others, not only does the democracy become better or worse, but its very nature is changed. A second cause (2) remains to be mentioned: the various properties and characteristics of democracy, when variously combined, make a difference. For one democracy will have less and another will have more, and another will have all of these characteristics. There is an advantage in knowing them all, whether a man wishes to establish some new form of democracy, or only to remodel an existing one. Founders of states try to bring together all the elements which accord with the ideas of the several constitutions; but this is a mistake of theirs, as I have already remarked when speaking of the destruction and preservation of states. We will now set forth the principles, characteristics, and aims of such states.
The basis of a democratic state is liberty; which, according to the common opinion of men, can only be enjoyed in such a state; this they affirm to be the great end of every democracy. One principle of liberty is for all to rule and be ruled in turn, and indeed democratic justice is the application of numerical not proportionate equality; whence it follows that the majority must be supreme, and that whatever the majority approve must be the end and the just. Every citizen, it is said, must have equality, and therefore in a democracy the poor have more power than the rich, because there are more of them, and the will of the majority is supreme. This, then, is one note of liberty which all democrats affirm to be the principle of their state. Another is that a man should live as he likes. This, they say, is the privilege of a freeman, since, on the other hand, not to live as a man likes is the mark of a slave. This is the second characteristic of democracy, whence has arisen the claim of men to be ruled by none, if possible, or, if this is impossible, to rule and be ruled in turns; and so it contributes to the freedom based upon equality.
Such being our foundation and such the principle from which we start, the characteristics of democracy are as follows the election of officers by all out of all; and that all should rule over each, and each in his turn over all; that the appointment to all offices, or to all but those which require experience and skill, should be made by lot; that no property qualification should be required for offices, or only a very low one; that a man should not hold the same office twice, or not often, or in the case of few except military offices: that the tenure of all offices, or of as many as possible, should be brief, that all men should sit in judgment, or that judges selected out of all should judge, in all matters, or in most and in the greatest and most important — such as the scrutiny of accounts, the constitution, and private contracts; that the assembly should be supreme over all causes, or at any rate over the most important, and the magistrates over none or only over a very few. Of all magistracies, a council is the most democratic when there is not the means of paying all the citizens, but when they are paid even this is robbed of its power; for the people then draw all cases to themselves, as I said in the previous discussion. The next characteristic of democracy is payment for services; assembly, law courts, magistrates, everybody receives pay, when it is to be had; or when it is not to be had for all, then it is given to the law-courts and to the stated assemblies, to the council and to the magistrates, or at least to any of them who are compelled to have their meals together. And whereas oligarchy is characterized by birth, wealth, and education, the notes of democracy appear to be the opposite of these — low birth, poverty, mean employment. Another note is that no magistracy is perpetual, but if any such have survived some ancient change in the constitution it should be stripped of its power, and the holders should be elected by lot and no longer by vote. These are the points common to all democracies; but democracy and demos in their truest form are based upon the recognized principle of democratic justice, that all should count equally; for equality implies that the poor should have no more share in the government than the rich, and should not be the only rulers, but that all should rule equally according to their numbers. And in this way men think that they will secure equality and freedom in their state.
Next comes the question, how is this equality to be obtained? Are we to assign to a thousand poor men the property qualifications of five hundred rich men? and shall we give the thousand a power equal to that of the five hundred? or, if this is not to be the mode, ought we, still retaining the same ratio, to take equal numbers from each and give them the control of the elections and of the courts? — Which, according to the democratical notion, is the juster form of the constitution — this or one based on numbers only? Democrats say that justice is that to which the majority agree, oligarchs that to which the wealthier class; in their opinion the decision should be given according to the amount of property. In both principles there is some inequality and injustice. For if justice is the will of the few, any one person who has more wealth than all the rest of the rich put together, ought, upon the oligarchical principle, to have the sole power — but this would be tyranny; or if justice is the will of the majority, as I was before saying, they will unjustly confiscate the property of the wealthy minority. To find a principle of equality which they both agree we must inquire into their respective ideas of justice.
Now they agree in saying that whatever is decided by the majority of the citizens is to be deemed law. Granted: but not without some reserve; since there are two classes out of which a state is composed — the poor and the rich — that is to be deemed law, on which both or the greater part of both agree; and if they disagree, that which is approved by the greater number, and by those who have the higher qualification. For example, suppose that there are ten rich and twenty poor, and some measure is approved by six of the rich and is disapproved by fifteen of the poor, and the remaining four of the rich join with the party of the poor, and the remaining five of the poor with that of the rich; in such a case the will of those whose qualifications, when both sides are added up, are the greatest, should prevail. If they turn out to be equal, there is no greater difficulty than at present, when, if the assembly or the courts are divided, recourse is had to the lot, or to some similar expedient. But, although it may be difficult in theory to know what is just and equal, the practical difficulty of inducing those to forbear who can, if they like, encroach, is far greater, for the weaker are always asking for equality and justice, but the stronger care for none of these things.
Of the four kinds of democracy, as was said in the in the previous discussion, the best is that which comes first in order; it is also the oldest of them all. I am speaking of them according to the natural classification of their inhabitants. For the best material of democracy is an agricultural population; there is no difficulty in forming a democracy where the mass of the people live by agriculture or tending of cattle. Being poor, they have no leisure, and therefore do not often attend the assembly, and not having the necessaries of life they are always at work, and do not covet the property of others. Indeed, they find their employment pleasanter than the cares of government or office where no great gains can be made out of them, for the many are more desirous of gain than of honor. A proof is that even the ancient tyrannies were patiently endured by them, as they still endure oligarchies, if they are allowed to work and are not deprived of their property; for some of them grow quickly rich and the others are well enough off. Moreover, they have the power of electing the magistrates and calling them to account; their ambition, if they have any, is thus satisfied; and in some democracies, although they do not all share in the appointment of offices, except through representatives elected in turn out of the whole people, as at Mantinea; yet, if they have the power of deliberating, the many are contented. Even this form of government may be regarded as a democracy, and was such at Mantinea. Hence it is both expedient and customary in the aforementioned type of democracy that all should elect to offices, and conduct scrutinies, and sit in the law-courts, but that the great offices should be filled up by election and from persons having a qualification; the greater requiring a greater qualification, or, if there be no offices for which a qualification is required, then those who are marked out by special ability should be appointed. Under such a form of government the citizens are sure to be governed well (for the offices will always be held by the best persons; the people are willing enough to elect them and are not jealous of the good). The good and the notables will then be satisfied, for they will not be governed by men who are their inferiors, and the persons elected will rule justly, because others will call them to account. Every man should be responsible to others, nor should any one be allowed to do just as he pleases; for where absolute freedom is allowed, there is nothing to restrain the evil which is inherent in every man. But the principle of responsibility secures that which is the greatest good in states; the right persons rule and are prevented from doing wrong, and the people have their due. It is evident that this is the best kind of democracy, and why? Because the people are drawn from a certain class. Some of the ancient laws of most states were, all of them, useful with a view to making the people husbandmen. They provided either that no one should possess more than a certain quantity of land, or that, if he did, the land should not be within a certain distance from the town or the acropolis. Formerly in many states there was a law forbidding any one to sell his original allotment of land. There is a similar law attributed to Oxylus, which is to the effect that there should be a certain portion of every man’s land on which he could not borrow money. A useful corrective to the evil of which I am speaking would be the law of the Aphytaeans, who, although they are numerous, and do not possess much land, are all of them husbandmen. For their properties are reckoned in the census; not entire, but only in such small portions that even the poor may have more than the amount required.
Next best to an agricultural, and in many respects similar, are a pastoral people, who live by their flocks; they are the best trained of any for war, robust in body and able to camp out. The people of whom other democracies consist are far inferior to them, for their life is inferior; there is no room for moral excellence in any of their employments, whether they be mechanics or traders or laborers. Besides, people of this class can readily come to the assembly, because they are continually moving about in the city and in the agora; whereas husbandmen are scattered over the country and do not meet, or equally feel the want of assembling together. Where the territory also happens to extend to a distance from the city, there is no difficulty in making an excellent democracy or constitutional government; for the people are compelled to settle in the country, and even if there is a town population the assembly ought not to meet, in democracies, when the country people cannot come. We have thus explained how the first and best form of democracy should be constituted; it is clear that the other or inferior sorts will deviate in a regular order, and the population which is excluded will at each stage be of a lower kind.
The last form of democracy, that in which all share alike, is one which cannot be borne by all states, and will not last long unless well regulated by laws and customs. The more general causes which tend to destroy this or other kinds of government have been pretty fully considered. In order to constitute such a democracy and strengthen the people, the leaders have been in the habit including as many as they can, and making citizens not only of those who are legitimate, but even of the illegitimate, and of those who have only one parent a citizen, whether father or mother; for nothing of this sort comes amiss to such a democracy. This is the way in which demagogues proceed. Whereas the right thing would be to make no more additions when the number of the commonalty exceeds that of the notables and of the middle class — beyond this not to go. When in excess of this point, the constitution becomes disorderly, and the notables grow excited and impatient of the democracy, as in the insurrection at Cyrene; for no notice is taken of a little evil, but when it increases it strikes the eye. Measures like those which Cleisthenes passed when he wanted to increase the power of the democracy at Athens, or such as were taken by the founders of popular government at Cyrene, are useful in the extreme form of democracy. Fresh tribes and brotherhoods should be established; the private rites of families should be restricted and converted into public ones; in short, every contrivance should be adopted which will mingle the citizens with one another and get rid of old connections. Again, the measures which are taken by tyrants appear all of them to be democratic; such, for instance, as the license permitted to slaves (which may be to a certain extent advantageous) and also that of women and children, and the aflowing everybody to live as he likes. Such a government will have many supporters, for most persons would rather live in a disorderly than in a sober manner.
The mere establishment of a democracy is not the only or principal business of the legislator, or of those who wish to create such a state, for any state, however badly constituted, may last one, two, or three days; a far greater difficulty is the preservation of it. The legislator should therefore endeavor to have a firm foundation according to the principles already laid down concerning the preservation and destruction of states; he should guard against the destructive elements, and should make laws, whether written or unwritten, which will contain all the preservatives of states. He must not think the truly democratical or oligarchical measure to be that which will give the greatest amount of democracy or oligarchy, but that which will make them last longest. The demagogues of our own day often get property confiscated in the law-courts in order to please the people. But those who have the welfare of the state at heart should counteract them, and make a law that the property of the condemned should not be public and go into the treasury but be sacred. Thus offenders will be as much afraid, for they will be punished all the same, and the people, having nothing to gain, will not be so ready to condemn the accused. Care should also be taken that state trials are as few as possible, and heavy penalties should be inflicted on those who bring groundless accusations; for it is the practice to indict, not members of the popular party, but the notables, although the citizens ought to be all attached to the constitution as well, or at any rate should not regard their rulers as enemies.
Now, since in the last and worst form of democracy the citizens are very numerous, and can hardly be made to assemble unless they are paid, and to pay them when there are no revenues presses hardly upon the notables (for the money must be obtained by a property tax and confiscations and corrupt practices of the courts, things which have before now overthrown many democracies); where, I say, there are no revenues, the government should hold few assemblies, and the law-courts should consist of many persons, but sit for a few days only. This system has two advantages: first, the rich do not fear the expense, even although they are unpaid themselves when the poor are paid; and secondly, causes are better tried, for wealthy persons, although they do not like to be long absent from their own affairs, do not mind going for a few days to the law-courts. Where there are revenues the demagogues should not be allowed after their manner to distribute the surplus; the poor are always receiving and always wanting more and more, for such help is like water poured into a leaky cask. Yet the true friend of the people should see that they be not too poor, for extreme poverty lowers the character of the democracy; measures therefore should be taken which will give them lasting prosperity; and as this is equally the interest of all classes, the proceeds of the public revenues should be accumulated and distributed among its poor, if possible, in such quantities as may enable them to purchase a little farm, or, at any rate, make a beginning in trade or husbandry. And if this benevolence cannot be extended to all, money should be distributed in turn according to tribes or other divisions, and in the meantime the rich should pay the fee for the attendance of the poor at the necessary assemblies; and should in return be excused from useless public services. By administering the state in this spirit the Carthaginians retain the affections of the people; their policy is from time to time to send some of them into their dependent towns, where they grow rich. It is also worthy of a generous and sensible nobility to divide the poor amongst them, and give them the means of going to work. The example of the people of Tarentum is also well deserving of imitation, for, by sharing the use of their own property with the poor, they gain their good will. Moreover, they divide all their offices into two classes, some of them being elected by vote, the others by lot; the latter, that the people may participate in them, and the former, that the state may be better administered. A like result may be gained by dividing the same offices, so as to have two classes of magistrates, one chosen by vote, the other by lot.
Enough has been said of the manner in which democracies ought to be constituted.
From these considerations there will be no difficulty in seeing what should be the constitution of oligarchies. We have only to reason from opposites and compare each form of oligarchy with the corresponding form of democracy.
The first and best attempered of oligarchies is akin to a constitutional government. In this there ought to be two standards of qualification; the one high, the other low — the lower qualifying for the humbler yet indispensable offices and the higher for the superior ones. He who acquires the prescribed qualification should have the rights of citizenship. The number of those admitted should be such as will make the entire governing body stronger than those who are excluded, and the new citizen should be always taken out of the better class of the people. The principle, narrowed a little, gives another form of oligarchy; until at length we reach the most cliquish and tyrannical of them all, answering to the extreme democracy, which, being the worst, requires vigilance in proportion to its badness. For as healthy bodies and ships well provided with sailors may undergo many mishaps and survive them, whereas sickly constitutions and rotten ill-manned ships are ruined by the very least mistake, so do the worst forms of government require the greatest care. The populousness of democracies generally preserves them (for e state need not be much increased,since there is no necessity tha number is to democracy in the place of justice based on proportion); whereas the preservation of an oligarchy clearly depends on an opposite principle, viz., good order.
As there are four chief divisions of the common people — husbandmen, mechanics, retail traders, laborers; so also there are four kinds of military forces — the cavalry, the heavy infantry, the light armed troops, the navy. When the country is adapted for cavalry, then a strong oligarchy is likely to be established. For the security of the inhabitants depends upon a force of this sort, and only rich men can afford to keep horses. The second form of oligarchy prevails when the country is adapted to heavy infantry; for this service is better suited to the rich than to the poor. But the light-armed and the naval element are wholly democratic; and nowadays, where they are numerous, if the two parties quarrel, the oligarchy are often worsted by them in the struggle. A remedy for this state of things may be found in the practice of generals who combine a proper contingent of light-armed troops with cavalry and heavy-armed. And this is the way in which the poor get the better of the rich in civil contests; being lightly armed, they fight with advantage against cavalry and heavy being lightly armed, they fight with advantage against cavalry and heavy infantry. An oligarchy which raises such a force out of the lower classes raises a power against itself. And therefore, since the ages of the citizens vary and some are older and some younger, the fathers should have their own sons, while they are still young, taught the agile movements of light-armed troops; and these, when they have been taken out of the ranks of the youth, should become light-armed warriors in reality. The oligarchy should also yield a share in the government to the people, either, as I said before, to those who have a property qualification, or, as in the case of Thebes, to those who have abstained for a certain number of years from mean employments, or, as at Massalia, to men of merit who are selected for their worthiness, whether previously citizens or not. The magistracies of the highest rank, which ought to be in the hands of the governing body, should have expensive duties attached to them, and then the people will not desire them and will take no offense at the privileges of their rulers when they see that they pay a heavy fine for their dignity. It is fitting also that the magistrates on entering office should offer magnificent sacrifices or erect some public edifice, and then the people who participate in the entertainments, and see the city decorated with votive offerings and buildings, will not desire an alteration in the government, and the notables will have memorials of their munificence. This, however, is anything but the fashion of our modern oligarchs, who are as covetous of gain as they are of honor; oligarchies like theirs may be well described as petty democracies. Enough of the manner in which democracies and oligarchies should be organized.
Next in order follows the right distribution of offices, their number, their nature, their duties, of which indeed we have already spoken. No state can exist not having the necessary offices, and no state can be well administered not having the offices which tend to preserve harmony and good order. In small states, as we have already remarked, there must not be many of them, but in larger there must be a larger number, and we should carefully consider which offices may properly be united and which separated.
First among necessary offices is that which has the care of the market; a magistrate should be appointed to inspect contracts and to maintain order. For in every state there must inevitably be buyers and sellers who will supply one another’s wants; this is the readiest way to make a state self-sufficing and so fulfill the purpose for which men come together into one state. A second office of a similar kind undertakes the supervision and embellishment of public and private buildings, the maintaining and repairing of houses and roads, the prevention of disputes about boundaries, and other concerns of a like nature. This is commonly called the office of City Warden, and has various departments, which, in more populous towns, are shared among different persons, one, for example, taking charge of the walls, another of the fountains, a third of harbors. There is another equally necessary office, and of a similar kind, having to do with the same matters without the walls and in the country — the magistrates who hold this office are called Wardens of the country, or Inspectors of the woods. Besides these three there is a fourth office of receivers of taxes, who have under their charge the revenue which is distributed among the various departments; these are called Receivers or Treasurers. Another officer registers all private contracts, and decisions of the courts, all public indictments, and also all preliminary proceedings. This office again is sometimes subdivided, in which case one officer is appointed over all the rest. These officers are called Recorders or Sacred Recorders, Presidents, and the like.
Next to these comes an office of which the duties are the most necessary and also the most difficult, viz., that to which is committed the execution of punishments, or the exaction of fines from those who are posted up according to the registers; and also the custody of prisoners. The difficulty of this office arises out of the odium which is attached to it; no one will undertake it unless great profits are to be made, and any one who does is loath to execute the law. Still the office is necessary; for judicial decisions are useless if they take no effect; and if society cannot exist without them, neither can it exist without the execution of them. It is an office which, being so unpopular, should not be entrusted to one person, but divided among several taken from different courts. In like manner an effort should be made to distribute among different persons the writing up of those who are on the register of public debtors. Some sentences should be executed by the magistrates also, and in particular penalties due to the outgoing magistrates should be exacted by the incoming ones; and as regards those due to magistrates already in office, when one court has given judgement, another should exact the penalty; for example, the wardens of the city should exact the fines imposed by the wardens of the agora, and others again should exact the fines imposed by them. For penalties are more likely to be exacted when less odium attaches to the exaction of them; but a double odium is incurred when the judges who have passed also execute the sentence, and if they are always the executioners, they will be the enemies of all.
In many places, while one magistracy executes the sentence, another has the custody of the prisoners, as, for example, ‘the Eleven’ at Athens. It is well to separate off the jailorship also, and try by some device to render the office less unpopular. For it is quite as necessary as that of the executioners; but good men do all they can to avoid it, and worthless persons cannot safely be trusted with it; for they themselves require a guard, and are not fit to guard others. There ought not therefore to be a single or permanent officer set apart for this duty; but it should be entrusted to the young, wherever they are organized into a band or guard, and different magistrates acting in turn should take charge of it.
These are the indispensable officers, and should be ranked first; next in order follow others, equally necessary, but of higher rank, and requiring great experience and fidelity. Such are the officers to which are committed the guard of the city, and other military functions. Not only in time of war but of peace their duty will be to defend the walls and gates, and to muster and marshal the citizens. In some states there are many such offices; in others there are a few only, while small states are content with one; these officers are called generals or commanders. Again, if a state has cavalry or light-armed troops or archers or a naval force, it will sometimes happen that each of these departments has separate officers, who are called admirals, or generals of cavalry or of light-armed troops. And there are subordinate officers called naval captains, and captains of light-armed troops and of horse; having others under them: all these are included in the department of war. Thus much of military command.
But since many, not to say all, of these offices handle the public money, there must of necessity be another office which examines and audits them, and has no other functions. Such officers are called by various names — Scrutineers, Auditors, Accountants, Controllers. Besides all these offices there is another which is supreme over them, and to this is often entrusted both the introduction and the ratification of measures, or at all events it presides, in a democracy, over the assembly. For there must be a body which convenes the supreme authority in the state. In some places they are called ‘probuli,’ because they hold previous deliberations, but in a democracy more commonly ‘councillors.’ These are the chief political offices.
Another set of officers is concerned with the maintenance of religion priests and guardians see to the preservation and repair of the temples of the Gods and to other matters of religion. One office of this sort may be enough in small places, but in larger ones there are a great many besides the priesthood; for example, superintendents of public worship, guardians of shrines, treasurers of the sacred revenues. Nearly connected with these there are also the officers appointed for the performance of the public sacrifices, except any which the law assigns to the priests; such sacrifices derive their dignity from the public hearth of the city. They are sometimes called archons, sometimes kings, and sometimes prytanes.
These, then, are the necessary offices, which may be summed up as follows: offices concerned with matters of religion, with war, with the revenue and expenditure, with the market, with the city, with the harbors, with the country; also with the courts of law, with the records of contracts, with execution of sentences, with custody of prisoners, with audits and scrutinies and accounts of magistrates; lastly, there are those which preside over the public deliberations of the state. There are likewise magistracies characteristic of states which are peaceful and prosperous, and at the same time have a regard to good order: such as the offices of guardians of women, guardians of the law, guardians of children, and directors of gymnastics; also superintendents of gymnastic and Dionysiac contests, and of other similar spectacles. Some of these are clearly not democratic offices; for example, the guardianships of women and children — the poor, not having any slaves, must employ both their women and children as servants.
Once more: there are three offices according to whose directions the highest magistrates are chosen in certain states — guardians of the law, probuli, councillors — of these, the guardians of the law are an aristocratical, the probuli an oligarchical, the council a democratical institution. Enough of the different kinds of offices.
---
!!![[Chapter I|Jowett: Book Three: Chapter I]]
{{Jowett: Book Three: Chapter I}}
---
!!![[Chapter II|Jowett: Book Three: Chapter II]]
{{Jowett: Book Three: Chapter II}}
---
!!![[Chapter III|Jowett: Book Three: Chapter III]]
{{Jowett: Book Three: Chapter III}}
---
!!![[Chapter IV|Jowett: Book Three: Chapter IV]]
{{Jowett: Book Three: Chapter IV}}
---
!!![[Chapter V|Jowett: Book Three: Chapter V]]
{{Jowett: Book Three: Chapter V}}
---
!!![[Chapter VI|Jowett: Book Three: Chapter VI]]
{{Jowett: Book Three: Chapter VI}}
---
!!![[Chapter VII|Jowett: Book Three: Chapter VII]]
{{Jowett: Book Three: Chapter VII}}
---
!!![[Chapter VIII|Jowett: Book Three: Chapter VIII]]
{{Jowett: Book Three: Chapter VIII}}
---
!!![[Chapter IX|Jowett: Book Three: Chapter IX]]
{{Jowett: Book Three: Chapter IX}}
---
!!![[Chapter X|Jowett: Book Three: Chapter X]]
{{Jowett: Book Three: Chapter X}}
---
!!![[Chapter XI|Jowett: Book Three: Chapter XI]]
{{Jowett: Book Three: Chapter XI}}
---
!!![[Chapter XII|Jowett: Book Three: Chapter XII]]
{{Jowett: Book Three: Chapter XII}}
---
!!![[Chapter XIII|Jowett: Book Three: Chapter XIII]]
{{Jowett: Book Three: Chapter XIII}}
---
!!![[Chapter XIV|Jowett: Book Three: Chapter XIV]]
{{Jowett: Book Three: Chapter XIV}}
---
!!![[Chapter XV|Jowett: Book Three: Chapter XV]]
{{Jowett: Book Three: Chapter XV}}
---
!!![[Chapter XVI|Jowett: Book Three: Chapter XVI]]
{{Jowett: Book Three: Chapter XVI}}
---
!!![[Chapter XVII|Jowett: Book Three: Chapter XVII]]
{{Jowett: Book Three: Chapter XVII}}
---
!!![[Chapter XVIII|Jowett: Book Three: Chapter XVIII]]
{{Jowett: Book Three: Chapter XVIII}}
HE who would inquire into the essence and attributes of various kinds of governments must first of all determine ‘What is a state?’ At present this is a disputed question. Some say that the state has done a certain act; others, no, not the state, but the oligarchy or the tyrant. And the legislator or statesman is concerned entirely with the state; a constitution or government being an arrangement of the inhabitants of a state. But a state is composite, like any other whole made up of many parts; these are the citizens, who compose it. It is evident, therefore, that we must begin by asking, Who is the citizen, and what is the meaning of the term? For here again there may be a difference of opinion. He who is a citizen in a democracy will often not be a citizen in an oligarchy. Leaving out of consideration those who have been made citizens, or who have obtained the name of citizen any other accidental manner, we may say, first, that a citizen is not a citizen because he lives in a certain place, for resident aliens and slaves share in the place; nor is he a citizen who has no legal right except that of suing and being sued; for this right may be enjoyed under the provisions of a treaty. Nay, resident aliens in many places do not possess even such rights completely, for they are obliged to have a patron, so that they do but imperfectly participate in citizenship, and we call them citizens only in a qualified sense, as we might apply the term to children who are too young to be on the register, or to old men who have been relieved from state duties. Of these we do not say quite simply that they are citizens, but add in the one case that they are not of age, and in the other, that they are past the age, or something of that sort; the precise expression is immaterial, for our meaning is clear. Similar difficulties to those which I have mentioned may be raised and answered about deprived citizens and about exiles. But the citizen whom we are seeking to define is a citizen in the strictest sense, against whom no such exception can be taken, and his special characteristic is that he shares in the administration of justice, and in offices. Now of offices some are discontinuous, and the same persons are not allowed to hold them twice, or can only hold them after a fixed interval; others have no limit of time — for example, the office of a dicast or ecclesiast. It may, indeed, be argued that these are not magistrates at all, and that their functions give them no share in the government. But surely it is ridiculous to say that those who have the power do not govern. Let us not dwell further upon this, which is a purely verbal question; what we want is a common term including both dicast and ecclesiast. Let us, for the sake of distinction, call it ‘indefinite office,’ and we will assume that those who share in such office are citizens. This is the most comprehensive definition of a citizen, and best suits all those who are generally so called.
But we must not forget that things of which the underlying principles differ in kind, one of them being first, another second, another third, have, when regarded in this relation, nothing, or hardly anything, worth mentioning in common. Now we see that governments differ in kind, and that some of them are prior and that others are posterior; those which are faulty or perverted are necessarily posterior to those which are perfect. (What we mean by perversion will be hereafter explained.) The citizen then of necessity differs under each form of government; and our definition is best adapted to the citizen of a democracy; but not necessarily to other states. For in some states the people are not acknowledged, nor have they any regular assembly, but only extraordinary ones; and suits are distributed by sections among the magistrates. At Lacedaemon, for instance, the Ephors determine suits about contracts, which they distribute among themselves, while the elders are judges of homicide, and other causes are decided by other magistrates. A similar principle prevails at Carthage; there certain magistrates decide all causes. We may, indeed, modify our definition of the citizen so as to include these states. In them it is the holder of a definite, not of an indefinite office, who legislates and judges, and to some or all such holders of definite offices is reserved the right of deliberating or judging about some things or about all things. The conception of the citizen now begins to clear up.
He who has the power to take part in the deliberative or judicial administration of any state is said by us to be a citizens of that state; and, speaking generally, a state is a body of citizens sufficing for the purposes of life.
But in practice a citizen is defined to be one of whom both the parents are citizens; others insist on going further back; say to two or three or more ancestors. This is a short and practical definition but there are some who raise the further question: How this third or fourth ancestor came to be a citizen? Gorgias of Leontini, partly because he was in a difficulty, partly in irony, said —‘Mortars are what is made by the mortar-makers, and the citizens of Larissa are those who are made by the magistrates; for it is their trade to make Larissaeans.’ Yet the question is really simple, for, if according to the definition just given they shared in the government, they were citizens. This is a better definition than the other. For the words, ‘born of a father or mother who is a citizen,’ cannot possibly apply to the first inhabitants or founders of a state.
There is a greater difficulty in the case of those who have been made citizens after a revolution, as by Cleisthenes at Athens after the expulsion of the tyrants, for he enrolled in tribes many metics, both strangers and slaves. The doubt in these cases is, not who is, but whether he who is ought to be a citizen; and there will still be a furthering the state, whether a certain act is or is not an act of the state; for what ought not to be is what is false. Now, there are some who hold office, and yet ought not to hold office, whom we describe as ruling, but ruling unjustly. And the citizen was defined by the fact of his holding some kind of rule or office — he who holds a judicial or legislative office fulfills our definition of a citizen. It is evident, therefore, that the citizens about whom the doubt has arisen must be called citizens.
Whether they ought to be so or not is a question which is bound up with the previous inquiry. For a parallel question is raised respecting the state, whether a certain act is or is not an act of the state; for example, in the transition from an oligarchy or a tyranny to a democracy. In such cases persons refuse to fulfill their contracts or any other obligations, on the ground that the tyrant, and not the state, contracted them; they argue that some constitutions are established by force, and not for the sake of the common good. But this would apply equally to democracies, for they too may be founded on violence, and then the acts of the democracy will be neither more nor less acts of the state in question than those of an oligarchy or of a tyranny. This question runs up into another: on what principle shall we ever say that the state is the same, or different? It would be a very superficial view which considered only the place and the inhabitants (for the soil and the population may be separated, and some of the inhabitants may live in one place and some in another). This, however, is not a very serious difficulty; we need only remark that the word ‘state’ is ambiguous.
It is further asked: When are men, living in the same place, to be regarded as a single city — what is the limit? Certainly not the wall of the city, for you might surround all Peloponnesus with a wall. Like this, we may say, is Babylon, and every city that has the compass of a nation rather than a city; Babylon, they say, had been taken for three days before some part of the inhabitants became aware of the fact. This difficulty may, however, with advantage be deferred to another occasion; the statesman has to consider the size of the state, and whether it should consist of more than one nation or not.
Again, shall we say that while the race of inhabitants, as well as their place of abode, remain the same, the city is also the same, although the citizens are always dying and being born, as we call rivers and fountains the same, although the water is always flowing away and coming again Or shall we say that the generations of men, like the rivers, are the same, but that the state changes? For, since the state is a partnership, and is a partnership of citizens in a constitution, when the form of government changes, and becomes different, then it may be supposed that the state is no longer the same, just as a tragic differs from a comic chorus, although the members of both may be identical. And in this manner we speak of every union or composition of elements as different when the form of their composition alters; for example, a scale containing the same sounds is said to be different, accordingly as the Dorian or the Phrygian mode is employed. And if this is true it is evident that the sameness of the state consists chiefly in the sameness of the constitution, and it may be called or not called by the same name, whether the inhabitants are the same or entirely different. It is quite another question, whether a state ought or ought not to fulfill engagements when the form of government changes.
There is a point nearly allied to the preceding: Whether the virtue of a good man and a good citizen is the same or not. But, before entering on this discussion, we must certainly first obtain some general notion of the virtue of the citizen. Like the sailor, the citizen is a member of a community. Now, sailors have different functions, for one of them is a rower, another a pilot, and a third a look-out man, a fourth is described by some similar term; and while the precise definition of each individual’s virtue applies exclusively to him, there is, at the same time, a common definition applicable to them all. For they have all of them a common object, which is safety in navigation. Similarly, one citizen differs from another, but the salvation of the community is the common business of them all. This community is the constitution; the virtue of the citizen must therefore be relative to the constitution of which he is a member. If, then, there are many forms of government, it is evident that there is not one single virtue of the good citizen which is perfect virtue. But we say that the good man is he who has one single virtue which is perfect virtue. Hence it is evident that the good citizen need not of necessity possess the virtue which makes a good man.
The same question may also be approached by another road, from a consideration of the best constitution. If the state cannot be entirely composed of good men, and yet each citizen is expected to do his own business well, and must therefore have virtue, still inasmuch as all the citizens cannot be alike, the virtue of the citizen and of the good man cannot coincide. All must have the virtue of the good citizen — thus, and thus only, can the state be perfect; but they will not have the virtue of a good man, unless we assume that in the good state all the citizens must be good.
Again, the state, as composed of unlikes, may be compared to the living being: as the first elements into which a living being is resolved are soul and body, as soul is made up of rational principle and appetite, the family of husband and wife, property of master and slave, so of all these, as well as other dissimilar elements, the state is composed; and, therefore, the virtue of all the citizens cannot possibly be the same, any more than the excellence of the leader of a chorus is the same as that of the performer who stands by his side. I have said enough to show why the two kinds of virtue cannot be absolutely and always the same.
But will there then be no case in which the virtue of the good citizen and the virtue of the good man coincide? To this we answer that the good ruler is a good and wise man, and that he who would be a statesman must be a wise man. And some persons say that even the education of the ruler should be of a special kind; for are not the children of kings instructed in riding and military exercises? As Euripides says:
<<<
No subtle arts for me, but what the state requires.
<<<
As though there were a special education needed by a ruler. If then the virtue of a good ruler is the same as that of a good man, and we assume further that the subject is a citizen as well as the ruler, the virtue of the good citizen and the virtue of the good man cannot be absolutely the same, although in some cases they may; for the virtue of a ruler differs from that of a citizen. It was the sense of this difference which made Jason say that ‘he felt hungry when he was not a tyrant,’ meaning that he could not endure to live in a private station. But, on the other hand, it may be argued that men are praised for knowing both how to rule and how to obey, and he is said to be a citizen of approved virtue who is able to do both. Now if we suppose the virtue of a good man to be that which rules, and the virtue of the citizen to include ruling and obeying, it cannot be said that they are equally worthy of praise. Since, then, it is sometimes thought that the ruler and the ruled must learn different things and not the same, but that the citizen must know and share in them both, the inference is obvious. There is, indeed, the rule of a master, which is concerned with menial offices — the master need not know how to perform these, but may employ others in the execution of them: the other would be degrading; and by the other I mean the power actually to do menial duties, which vary much in character and are executed by various classes of slaves, such, for example, as handicraftsmen, who, as their name signifies, live by the labor of their hands: under these the mechanic is included. Hence in ancient times, and among some nations, the working classes had no share in the government — a privilege which they only acquired under the extreme democracy. Certainly the good man and the statesman and the good citizen ought not to learn the crafts of inferiors except for their own occasional use; if they habitually practice them, there will cease to be a distinction between master and slave.
This is not the rule of which we are speaking; but there is a rule of another kind, which is exercised over freemen and equals by birth -a constitutional rule, which the ruler must learn by obeying, as he would learn the duties of a general of cavalry by being under the orders of a general of cavalry, or the duties of a general of infantry by being under the orders of a general of infantry, and by having had the command of a regiment and of a company. It has been well said that ‘he who has never learned to obey cannot be a good commander.’ The two are not the same, but the good citizen ought to be capable of both; he should know how to govern like a freeman, and how to obey like a freeman — these are the virtues of a citizen. And, although the temperance and justice of a ruler are distinct from those of a subject, the virtue of a good man will include both; for the virtue of the good man who is free and also a subject, e.g., his justice, will not be one but will comprise distinct kinds, the one qualifying him to rule, the other to obey, and differing as the temperance and courage of men and women differ. For a man would be thought a coward if he had no more courage than a courageous woman, and a woman would be thought loquacious if she imposed no more restraint on her conversation than the good man; and indeed their part in the management of the household is different, for the duty of the one is to acquire, and of the other to preserve. Practical wisdom only is characteristic of the ruler: it would seem that all other virtues must equally belong to ruler and subject. The virtue of the subject is certainly not wisdom, but only true opinion; he may be compared to the maker of the flute, while his master is like the flute-player or user of the flute.
From these considerations may be gathered the answer to the question, whether the virtue of the good man is the same as that of the good citizen, or different, and how far the same, and how far different.
Let us begin by considering the common definitions of oligarchy and democracy, and what is justice oligarchical and democratical. For all men cling to justice of some kind, but their conceptions are imperfect and they do not express the whole idea. For example, justice is thought by them to be, and is, equality, not. however, for however, for but only for equals. And inequality is thought to be, and is, justice; neither is this for all, but only for unequals. When the persons are omitted, then men judge erroneously. The reason is that they are passing judgment on themselves, and most people are bad judges in their own case. And whereas justice implies a relation to persons as well as to things, and a just distribution, as I have already said in the Ethics, implies the same ratio between the persons and between the things, they agree about the equality of the things, but dispute about the equality of the persons, chiefly for the reason which I have just given — because they are bad judges in their own affairs; and secondly, because both the parties to the argument are speaking of a limited and partial justice, but imagine themselves to be speaking of absolute justice. For the one party, if they are unequal in one respect, for example wealth, consider themselves to be unequal in all; and the other party, if they are equal in one respect, for example free birth, consider themselves to be equal in all. But they leave out the capital point. For if men met and associated out of regard to wealth only, their share in the state would be proportioned to their property, and the oligarchical doctrine would then seem to carry the day. It would not be just that he who paid one mina should have the same share of a hundred minae, whether of the principal or of the profits, as he who paid the remaining ninety-nine. But a state exists for the sake of a good life, and not for the sake of life only: if life only were the object, slaves and brute animals might form a state, but they cannot, for they have no share in happiness or in a life of free choice. Nor does a state exist for the sake of alliance and security from injustice, nor yet for the sake of exchange and mutual intercourse; for then the Tyrrhenians and the Carthaginians, and all who have commercial treaties with one another, would be the citizens of one state. True, they have agreements about imports, and engagements that they will do no wrong to one another, and written articles of alliance. But there are no magistrates common to the contracting parties who will enforce their engagements; different states have each their own magistracies. Nor does one state take care that the citizens of the other are such as they ought to be, nor see that those who come under the terms of the treaty do no wrong or wickedness at an, but only that they do no injustice to one another. Whereas, those who care for good government take into consideration virtue and vice in states. Whence it may be further inferred that virtue must be the care of a state which is truly so called, and not merely enjoys the name: for without this end the community becomes a mere alliance which differs only in place from alliances of which the members live apart; and law is only a convention, ‘a surety to one another of justice,’ as the sophist Lycophron says, and has no real power to make the citizens
This is obvious; for suppose distinct places, such as Corinth and Megara, to be brought together so that their walls touched, still they would not be one city, not even if the citizens had the right to intermarry, which is one of the rights peculiarly characteristic of states. Again, if men dwelt at a distance from one another, but not so far off as to have no intercourse, and there were laws among them that they should not wrong each other in their exchanges, neither would this be a state. Let us suppose that one man is a carpenter, another a husbandman, another a shoemaker, and so on, and that their number is ten thousand: nevertheless, if they have nothing in common but exchange, alliance, and the like, that would not constitute a state. Why is this? Surely not because they are at a distance from one another: for even supposing that such a community were to meet in one place, but that each man had a house of his own, which was in a manner his state, and that they made alliance with one another, but only against evil-doers; still an accurate thinker would not deem this to be a state, if their intercourse with one another was of the same character after as before their union. It is clear then that a state is not a mere society, having a common place, established for the prevention of mutual crime and for the sake of exchange. These are conditions without which a state cannot exist; but all of them together do not constitute a state, which is a community of families and aggregations of families in well-being, for the sake of a perfect and self-sufficing life. Such a community can only be established among those who live in the same place and intermarry. Hence arise in cities family connections, brotherhoods, common sacrifices, amusements which draw men together. But these are created by friendship, for the will to live together is friendship. The end of the state is the good life, and these are the means towards it. And the state is the union of families and villages in a perfect and self-sufficing life, by which we mean a happy and honorable life.
Our conclusion, then, is that political society exists for the sake of noble actions, and not of mere companionship. Hence they who contribute most to such a society have a greater share in it than those who have the same or a greater freedom or nobility of birth but are inferior to them in political virtue; or than those who exceed them in wealth but are surpassed by them in virtue.
From what has been said it will be clearly seen that all the partisans of different forms of government speak of a part of justice only.
There still remains one more question about the citizen: Is he only a true citizen who has a share of office, or is the mechanic to be included? If they who hold no office are to be deemed citizens, not every citizen can have this virtue of ruling and obeying; for this man is a citizen And if none of the lower class are citizens, in which part of the state are they to be placed? For they are not resident aliens, and they are not foreigners. May we not reply, that as far as this objection goes there is no more absurdity in excluding them than in excluding slaves and freedmen from any of the above-mentioned classes? It must be admitted that we cannot consider all those to be citizens who are necessary to the existence of the state; for example, children are not citizen equally with grown-up men, who are citizens absolutely, but children, not being grown up, are only citizens on a certain assumption. Nay, in ancient times, and among some nations the artisan class were slaves or foreigners, and therefore the majority of them are so now. The best form of state will not admit them to citizenship; but if they are admitted, then our definition of the virtue of a citizen will not apply to every citizen nor to every free man as such, but only to those who are freed from necessary services. The necessary people are either slaves who minister to the wants of individuals, or mechanics and laborers who are the servants of the community. These reflections carried a little further will explain their position; and indeed what has been said already is of itself, when understood, explanation enough.
Since there are many forms of government there must be many varieties of citizen and especially of citizens who are subjects; so that under some governments the mechanic and the laborer will be citizens, but not in others, as, for example, in aristocracy or the so-called government of the best (if there be such an one), in which honors are given according to virtue and merit; for no man can practice virtue who is living the life of a mechanic or laborer. In oligarchies the qualification for office is high, and therefore no laborer can ever be a citizen; but a mechanic may, for an actual majority of them are rich. At Thebes there was a law that no man could hold office who had not retired from business for ten years. But in many states the law goes to the length of admitting aliens; for in some democracies a man is a citizen though his mother only be a citizen; and a similar principle is applied to illegitimate children; the law is relaxed when there is a dearth of population. But when the number of citizens increases, first the children of a male or a female slave are excluded; then those whose mothers only are citizens; and at last the right of citizenship is confined to those whose fathers and mothers are both citizens.
Hence, as is evident, there are different kinds of citizens; and he is a citizen in the highest sense who shares in the honors of the state. Compare Homer’s words, ‘like some dishonored stranger’; he who is excluded from the honors of the state is no better than an alien. But when his exclusion is concealed, then the object is that the privileged class may deceive their fellow inhabitants.
As to the question whether the virtue of the good man is the same as that of the good citizen, the considerations already adduced prove that in some states the good man and the good citizen are the same, and in others different. When they are the same it is not every citizen who is a good man, but only the statesman and those who have or may have, alone or in conjunction with others, the conduct of public affairs.
Having determined these questions, we have next to consider whether there is only one form of government or many, and if many, what they are, and how many, and what are the differences between them.
A constitution is the arrangement of magistracies in a state, especially of the highest of all. The government is everywhere sovereign in the state, and the constitution is in fact the government. For example, in democracies the people are supreme, but in oligarchies, the few; and, therefore, we say that these two forms of government also are different: and so in other cases.
First, let us consider what is the purpose of a state, and how many forms of government there are by which human society is regulated. We have already said, in the first part of this treatise, when discussing household management and the rule of a master, that man is by nature a political animal. And therefore, men, even when they do not require one another’s help, desire to live together; not but that they are also brought together by their common interests in proportion as they severally attain to any measure of well-being. This is certainly the chief end, both of individuals and of states. And also for the sake of mere life (in which there is possibly some noble element so long as the evils of existence do not greatly overbalance the good) mankind meet together and maintain the political community. And we all see that men cling to life even at the cost of enduring great misfortune, seeming to find in life a natural sweetness and happiness.
There is no difficulty in distinguishing the various kinds of authority; they have been often defined already in discussions outside the school. The rule of a master, although the slave by nature and the master by nature have in reality the same interests, is nevertheless exercised primarily with a view to the interest of the master, but accidentally considers the slave, since, if the slave perish, the rule of the master perishes with him. On the other hand, the government of a wife and children and of a household, which we have called household management, is exercised in the first instance for the good of the governed or for the common good of both parties, but essentially for the good of the governed, as we see to be the case in medicine, gymnastic, and the arts in general, which are only accidentally concerned with the good of the artists themselves. For there is no reason why the trainer may not sometimes practice gymnastics, and the helmsman is always one of the crew. The trainer or the helmsman considers the good of those committed to his care. But, when he is one of the persons taken care of, he accidentally participates in the advantage, for the helmsman is also a sailor, and the trainer becomes one of those in training. And so in politics: when the state is framed upon the principle of equality and likeness, the citizens think that they ought to hold office by turns. Formerly, as is natural, every one would take his turn of service; and then again, somebody else would look after his interest, just as he, while in office, had looked after theirs. But nowadays, for the sake of the advantage which is to be gained from the public revenues and from office, men want to be always in office. One might imagine that the rulers, being sickly, were only kept in health while they continued in office; in that case we may be sure that they would be hunting after places. The conclusion is evident: that governments which have a regard to the common interest are constituted in accordance with strict principles of justice, and are therefore true forms; but those which regard only the interest of the rulers are all defective and perverted forms, for they are despotic, whereas a state is a community of freemen.
Having determined these points, we have next to consider how many forms of government there are, and what they are; and in the first place what are the true forms, for when they are determined the perversions of them will at once be apparent. The words constitution and government have the same meaning, and the government, which is the supreme authority in states, must be in the hands of one, or of a few, or of the many. The true forms of government, therefore, are those in which the one, or the few, or the many, govern with a view to the common interest; but governments which rule with a view to the private interest, whether of the one or of the few, or of the many, are perversions. For the members of a state, if they are truly citizens, ought to participate in its advantages. Of forms of government in which one rules, we call that which regards the common interests, kingship or royalty; that in which more than one, but not many, rule, aristocracy; and it is so called, either because the rulers are the best men, or because they have at heart the best interests of the state and of the citizens. But when the citizens at large administer the state for the common interest, the government is called by the generic name — a constitution. And there is a reason for this use of language. One man or a few may excel in virtue; but as the number increases it becomes more difficult for them to attain perfection in every kind of virtue, though they may in military virtue, for this is found in the masses. Hence in a constitutional government the fighting-men have the supreme power, and those who possess arms are the citizens.
Of the above-mentioned forms, the perversions are as follows: of royalty, tyranny; of aristocracy, oligarchy; of constitutional government, democracy. For tyranny is a kind of monarchy which has in view the interest of the monarch only; oligarchy has in view the interest of the wealthy; democracy, of the needy: none of them the common good of all.
But there are difficulties about these forms of government, and it will therefore be necessary to state a little more at length the nature of each of them. For he who would make a philosophical study of the various sciences, and does not regard practice only, ought not to overlook or omit anything, but to set forth the truth in every particular. Tyranny, as I was saying, is monarchy exercising the rule of a master over the political society; oligarchy is when men of property have the government in their hands; democracy, the opposite, when the indigent, and not the men of property, are the rulers. And here arises the first of our difficulties, and it relates to the distinction drawn. For democracy is said to be the government of the many. But what if the many are men of property and have the power in their hands? In like manner oligarchy is said to be the government of the few; but what if the poor are fewer than the rich, and have the power in their hands because they are stronger? In these cases the distinction which we have drawn between these different forms of government would no longer hold good.
Suppose, once more, that we add wealth to the few and poverty to the many, and name the governments accordingly — an oligarchy is said to be that in which the few and the wealthy, and a democracy that in which the many and the poor are the rulers — there will still be a difficulty. For, if the only forms of government are the ones already mentioned, how shall we describe those other governments also just mentioned by us, in which the rich are the more numerous and the poor are the fewer, and both govern in their respective states?
The argument seems to show that, whether in oligarchies or in democracies, the number of the governing body, whether the greater number, as in a democracy, or the smaller number, as in an oligarchy, is an accident due to the fact that the rich everywhere are few, and the poor numerous. But if so, there is a misapprehension of the causes of the difference between them. For the real difference between democracy and oligarchy is poverty and wealth. Wherever men rule by reason of their wealth, whether they be few or many, that is an oligarchy, and where the poor rule, that is a democracy. But as a fact the rich are few and the poor many; for few are well-to-do, whereas freedom is enjoyed by an, and wealth and freedom are the grounds on which the oligarchical and democratical parties respectively claim power in the state.
There is also a doubt as to what is to be the supreme power in the state: Is it the multitude? Or the wealthy? Or the good? Or the one best man? Or a tyrant? Any of these alternatives seems to involve disagreeable consequences. If the poor, for example, because they are more in number, divide among themselves the property of the rich — is not this unjust? No, by heaven (will be the reply), for the supreme authority justly willed it. But if this is not injustice, pray what is? Again, when in the first division all has been taken, and the majority divide anew the property of the minority, is it not evident, if this goes on, that they will ruin the state? Yet surely, virtue is not the ruin of those who possess her, nor is justice destructive of a state; and therefore this law of confiscation clearly cannot be just. If it were, all the acts of a tyrant must of necessity be just; for he only coerces other men by superior power, just as the multitude coerce the rich. But is it just then that the few and the wealthy should be the rulers? And what if they, in like manner, rob and plunder the people — is this just? if so, the other case will likewise be just. But there can be no doubt that all these things are wrong and unjust.
Then ought the good to rule and have supreme power? But in that case everybody else, being excluded from power, will be dishonored. For the offices of a state are posts of honor; and if one set of men always holds them, the rest must be deprived of them. Then will it be well that the one best man should rule? Nay, that is still more oligarchical, for the number of those who are dishonored is thereby increased. Some one may say that it is bad in any case for a man, subject as he is to all the accidents of human passion, to have the supreme power, rather than the law. But what if the law itself be democratical or oligarchical, how will that help us out of our difficulties? Not at all; the same consequences will follow.
Most of these questions may be reserved for another occasion. The principle that the multitude ought to be supreme rather than the few best is one that is maintained, and, though not free from difficulty, yet seems to contain an element of truth. For the many, of whom each individual is but an ordinary person, when they meet together may very likely be better than the few good, if regarded not individually but collectively, just as a feast to which many contribute is better than a dinner provided out of a single purse. For each individual among the many has a share of virtue and prudence, and when they meet together, they become in a manner one man, who has many feet, and hands, and senses; that is a figure of their mind and disposition. Hence the many are better judges than a single man of music and poetry; for some understand one part, and some another, and among them they understand the whole. There is a similar combination of qualities in good men, who differ from any individual of the many, as the beautiful are said to differ from those who are not beautiful, and works of art from realities, because in them the scattered elements are combined, although, if taken separately, the eye of one person or some other feature in another person would be fairer than in the picture. Whether this principle can apply to every democracy, and to all bodies of men, is not clear. Or rather, by heaven, in some cases it is impossible of application; for the argument would equally hold about brutes; and wherein, it will be asked, do some men differ from brutes? But there may be bodies of men about whom our statement is nevertheless true. And if so, the difficulty which has been already raised, and also another which is akin to it — viz., what power should be assigned to the mass of freemen and citizens, who are not rich and have no personal merit — are both solved. There is still a danger in aflowing them to share the great offices of state, for their folly will lead them into error, and their dishonesty into crime. But there is a danger also in not letting them share, for a state in which many poor men are excluded from office will necessarily be full of enemies. The only way of escape is to assign to them some deliberative and judicial functions. For this reason Solon and certain other legislators give them the power of electing to offices, and of calling the magistrates to account, but they do not allow them to hold office singly. When they meet together their perceptions are quite good enough, and combined with the better class they are useful to the state (just as impure food when mixed with what is pure sometimes makes the entire mass more wholesome than a small quantity of the pure would be), but each individual, left to himself, forms an imperfect judgment. On the other hand, the popular form of government involves certain difficulties. In the first place, it might be objected that he who can judge of the healing of a sick man would be one who could himself heal his disease, and make him whole — that is, in other words, the physician; and so in all professions and arts. As, then, the physician ought to be called to account by physicians, so ought men in general to be called to account by their peers. But physicians are of three kinds: there is the ordinary practitioner, and there is the physician of the higher class, and thirdly the intelligent man who has studied the art: in all arts there is such a class; and we attribute the power of judging to them quite as much as to professors of the art. Secondly, does not the same principle apply to elections? For a right election can only be made by those who have knowledge; those who know geometry, for example, will choose a geometrician rightly, and those who know how to steer, a pilot; and, even if there be some occupations and arts in which private persons share in the ability to choose, they certainly cannot choose better than those who know. So that, according to this argument, neither the election of magistrates, nor the calling of them to account, should be entrusted to the many. Yet possibly these objections are to a great extent met by our old answer, that if the people are not utterly degraded, although individually they may be worse judges than those who have special knowledge — as a body they are as good or better. Moreover, there are some arts whose products are not judged of solely, or best, by the artists themselves, namely those arts whose products are recognized even by those who do not possess the art; for example, the knowledge of the house is not limited to the builder only; the user, or, in other words, the master, of the house will be even a better judge than the builder, just as the pilot will judge better of a rudder than the carpenter, and the guest will judge better of a feast than the cook.
This difficulty seems now to be sufficiently answered, but there is another akin to it. That inferior persons should have authority in greater matters than the good would appear to be a strange thing, yet the election and calling to account of the magistrates is the greatest of all. And these, as I was saying, are functions which in some states are assigned to the people, for the assembly is supreme in all such matters. Yet persons of any age, and having but a small property qualification, sit in the assembly and deliberate and judge, although for the great officers of state, such as treasurers and generals, a high qualification is required. This difficulty may be solved in the same manner as the preceding, and the present practice of democracies may be really defensible. For the power does not reside in the dicast, or senator, or ecclesiast, but in the court, and the senate, and the assembly, of which individual senators, or ecclesiasts, or dicasts, are only parts or members. And for this reason the many may claim to have a higher authority than the few; for the people, and the senate, and the courts consist of many persons, and their property collectively is greater than the property of one or of a few individuals holding great offices. But enough of this.
The discussion of the first question shows nothing so clearly as that laws, when good, should be supreme; and that the magistrate or magistrates should regulate those matters only on which the laws are unable to speak with precision owing to the difficulty of any general principle embracing all particulars. But what are good laws has not yet been clearly explained; the old difficulty remains. The goodness or badness, justice or injustice, of laws varies of necessity with the constitutions of states. This, however, is clear, that the laws must be adapted to the constitutions. But if so, true forms of government will of necessity have just laws, and perverted forms of government will have unjust laws.
In all sciences and arts the end is a good, and the greatest good and in the highest degree a good in the most authoritative of all — this is the political science of which the good is justice, in other words, the common interest. All men think justice to be a sort of equality; and to a certain extent they agree in the philosophical distinctions which have been laid down by us about Ethics. For they admit that justice is a thing and has a relation to persons, and that equals ought to have equality. But there still remains a question: equality or inequality of what? Here is a difficulty which calls for political speculation. For very likely some persons will say that offices of state ought to be unequally distributed according to superior excellence, in whatever respect, of the citizen, although there is no other difference between him and the rest of the community; for that those who differ in any one respect have different rights and claims. But, surely, if this is true, the complexion or height of a man, or any other advantage, will be a reason for his obtaining a greater share of political rights. The error here lies upon the surface, and may be illustrated from the other arts and sciences. When a number of flute players are equal in their art, there is no reason why those of them who are better born should have better flutes given to them; for they will not play any better on the flute, and the superior instrument should be reserved for him who is the superior artist. If what I am saying is still obscure, it will be made clearer as we proceed. For if there were a superior flute-player who was far inferior in birth and beauty, although either of these may be a greater good than the art of flute-playing, and may excel flute-playing in a greater ratio than he excels the others in his art, still he ought to have the best flutes given to him, unless the advantages of wealth and birth contribute to excellence in flute-playing, which they do not. Moreover, upon this principle any good may be compared with any other. For if a given height may be measured wealth and against freedom, height in general may be so measured. Thus if A excels in height more than B in virtue, even if virtue in general excels height still more, all goods will be commensurable; for if a certain amount is better than some other, it is clear that some other will be equal. But since no such comparison can be made, it is evident that there is good reason why in politics men do not ground their claim to office on every sort of inequality any more than in the arts. For if some be slow, and others swift, that is no reason why the one should have little and the others much; it is in gymnastics contests that such excellence is rewarded. Whereas the rival claims of candidates for office can only be based on the possession of elements which enter into the composition of a state. And therefore the noble, or free-born, or rich, may with good reason claim office; for holders of offices must be freemen and taxpayers: a state can be no more composed entirely of poor men than entirely of slaves. But if wealth and freedom are necessary elements, justice and valor are equally so; for without the former qualities a state cannot exist at all, without the latter not well.
If the existence of the state is alone to be considered, then it would seem that all, or some at least, of these claims are just; but, if we take into account a good life, then, as I have already said, education and virtue have superior claims. As, however, those who are equal in one thing ought not to have an equal share in all, nor those who are unequal in one thing to have an unequal share in all, it is certain that all forms of government which rest on either of these principles are perversions. All men have a claim in a certain sense, as I have already admitted, but all have not an absolute claim. The rich claim because they have a greater share in the land, and land is the common element of the state; also they are generally more trustworthy in contracts. The free claim under the same tide as the noble; for they are nearly akin. For the noble are citizens in a truer sense than the ignoble, and good birth is always valued in a man’s own home and country. Another reason is, that those who are sprung from better ancestors are likely to be better men, for nobility is excellence of race. Virtue, too, may be truly said to have a claim, for justice has been acknowledged by us to be a social virtue, and it implies all others. Again, the many may urge their claim against the few; for, when taken collectively, and compared with the few, they are stronger and richer and better. But, what if the good, the rich, the noble, and the other classes who make up a state, are all living together in the same city, Will there, or will there not, be any doubt who shall rule? No doubt at all in determining who ought to rule in each of the above-mentioned forms of government. For states are characterized by differences in their governing bodies-one of them has a government of the rich, another of the virtuous, and so on. But a difficulty arises when all these elements co-exist. How are we to decide? Suppose the virtuous to be very few in number: may we consider their numbers in relation to their duties, and ask whether they are enough to administer the state, or so many as will make up a state? Objections may be urged against all the aspirants to political power. For those who found their claims on wealth or family might be thought to have no basis of justice; on this principle, if any one person were richer than all the rest, it is clear that he ought to be ruler of them. In like manner he who is very distinguished by his birth ought to have the superiority over all those who claim on the ground that they are freeborn. In an aristocracy, or government of the best, a like difficulty occurs about virtue; for if one citizen be better than the other members of the government, however good they may be, he too, upon the same principle of justice, should rule over them. And if the people are to be supreme because they are stronger than the few, then if one man, or more than one, but not a majority, is stronger than the many, they ought to rule, and not the many.
All these considerations appear to show that none of the principles on which men claim to rule and to hold all other men in subjection to them are strictly right. To those who claim to be masters of the government on the ground of their virtue or their wealth, the many might fairly answer that they themselves are often better and richer than the few — I do not say individually, but collectively. And another ingenious objection which is sometimes put forward may be met in a similar manner. Some persons doubt whether the legislator who desires to make the justest laws ought to legislate with a view to the good of the higher classes or of the many, when the case which we have mentioned occurs. Now what is just or right is to be interpreted in the sense of ‘what is equal’; and that which is right in the sense of being equal is to be considered with reference to the advantage of the state, and the common good of the citizens. And a citizen is one who shares in governing and being governed. He differs under different forms of government, but in the best state he is one who is able and willing to be governed and to govern with a view to the life of virtue.
If, however, there be some one person, or more than one, although not enough to make up the full complement of a state, whose virtue is so pre-eminent that the virtues or the political capacity of all the rest admit of no comparison with his or theirs, he or they can be no longer regarded as part of a state; for justice will not be done to the superior, if he is reckoned only as the equal of those who are so far inferior to him in virtue and in political capacity. Such an one may truly be deemed a God among men. Hence we see that legislation is necessarily concerned only with those who are equal in birth and in capacity; and that for men of pre-eminent virtue there is no law — they are themselves a law. Any would be ridiculous who attempted to make laws for them: they would probably retort what, in the fable of Antisthenes, the lions said to the hares, when in the council of the beasts the latter began haranguing and claiming equality for all. And for this reason democratic states have instituted ostracism; equality is above all things their aim, and therefore they ostracized and banished from the city for a time those who seemed to predominate too much through their wealth, or the number of their friends, or through any other political influence. Mythology tells us that the Argonauts left Heracles behind for a similar reason; the ship Argo would not take him because she feared that he would have been too much for the rest of the crew. Wherefore those who denounce tyranny and blame the counsel which Periander gave to Thrasybulus cannot be held altogether just in their censure. The story is that Periander, when the herald was sent to ask counsel of him, said nothing, but only cut off the tallest ears of corn till he had brought the field to a level. The herald did not know the meaning of the action, but came and reported what he had seen to Thrasybulus, who understood that he was to cut off the principal men in the state; and this is a policy not only expedient for tyrants or in practice confined to them, but equally necessary in oligarchies and democracies. Ostracism is a measure of the same kind, which acts by disabling and banishing the most prominent citizens. Great powers do the same to whole cities and nations, as the Athenians did to the Samians, Chians, and Lesbians; no sooner had they obtained a firm grasp of the empire, than they humbled their allies contrary to treaty; and the Persian king has repeatedly crushed the Medes, Babylonians, and other nations, when their spirit has been stirred by the recollection of their former greatness.
The problem is a universal one, and equally concerns all forms of government, true as well as false; for, although perverted forms with a view to their own interests may adopt this policy, those which seek the common interest do so likewise. The same thing may be observed in the arts and sciences; for the painter will not allow the figure to have a foot which, however beautiful, is not in proportion, nor will the shipbuilder allow the stem or any other part of the vessel to be unduly large, any more than the chorus-master will allow any one who sings louder or better than all the rest to sing in the choir. Monarchs, too, may practice compulsion and still live in harmony with their cities, if their own government is for the interest of the state. Hence where there is an acknowledged superiority the argument in favor of ostracism is based upon a kind of political justice. It would certainly be better that the legislator should from the first so order his state as to have no need of such a remedy. But if the need arises, the next best thing is that he should endeavor to correct the evil by this or some similar measure. The principle, however, has not been fairly applied in states; for, instead of looking to the good of their own constitution, they have used ostracism for factious purposes. It is true that under perverted forms of government, and from their special point of view, such a measure is just and expedient, but it is also clear that it is not absolutely just. In the perfect state there would be great doubts about the use of it, not when applied to excess in strength, wealth, popularity, or the like, but when used against some one who is pre-eminent in virtue — what is to be done with him? Mankind will not say that such an one is to be expelled and exiled; on the other hand, he ought not to be a subject — that would be as if mankind should claim to rule over Zeus, dividing his offices among them. The only alternative is that all should joyfully obey such a ruler, according to what seems to be the order of nature, and that men like him should be kings in their state for life.
The preceding discussion, by a natural transition, leads to the consideration of royalty, which we admit to be one of the true forms of government. Let us see whether in order to be well governed a state or country should be under the rule of a king or under some other form of government; and whether monarchy, although good for some, may not be bad for others. But first we must determine whether there is one species of royalty or many. It is easy to see that there are many, and that the manner of government is not the same in all of them.
Of royalties according to law, (1) the Lacedaemonian is thought to answer best to the true pattern; but there the royal power is not absolute, except when the kings go on an expedition, and then they take the command. Matters of religion are likewise committed to them. The kingly office is in truth a kind of generalship, irresponsible and perpetual. The king has not the power of life and death, except in a specified case, as for instance, in ancient times, he had it when upon a campaign, by right of force. This custom is described in Homer. For Agamemnon is patient when he is attacked in the assembly, but when the army goes out to battle he has the power even of life and death. Does he not say —‘When I find a man skulking apart from the battle, nothing shall save him from the dogs and vultures, for in my hands is death’?
This, then, is one form of royalty-a generalship for life: and of such royalties some are hereditary and others elective.
(2) There is another sort of monarchy not uncommon among the barbarians, which nearly resembles tyranny. But this is both legal and hereditary. For barbarians, being more servile in character than Hellenes, and Asiadics than Europeans, do not rebel against a despotic government. Such royalties have the nature of tyrannies because the people are by nature slaves; but there is no danger of their being overthrown, for they are hereditary and legal. Wherefore also their guards are such as a king and not such as a tyrant would employ, that is to say, they are composed of citizens, whereas the guards of tyrants are mercenaries. For kings rule according to law over voluntary subjects, but tyrants over involuntary; and the one are guarded by their fellow-citizens the others are guarded against them.
These are two forms of monarchy, and there was a third (3) which existed in ancient Hellas, called an Aesymnetia or dictatorship. This may be defined generally as an elective tyranny, which, like the barbarian monarchy, is legal, but differs from it in not being hereditary. Sometimes the office was held for life, sometimes for a term of years, or until certain duties had been performed. For example, the Mytilenaeans elected Pittacus leader against the exiles, who were headed by Antimenides and Alcaeus the poet. And Alcaeus himself shows in one of his banquet odes that they chose Pittacus tyrant, for he reproaches his fellow-citizens for ‘having made the low-born Pittacus tyrant of the spiritless and ill-fated city, with one voice shouting his praises.’
These forms of government have always had the character of tyrannies, because they possess despotic power; but inasmuch as they are elective and acquiesced in by their subjects, they are kingly.
(4) There is a fourth species of kingly rule — that of the heroic times — which was hereditary and legal, and was exercised over willing subjects. For the first chiefs were benefactors of the people in arts or arms; they either gathered them into a community, or procured land for them; and thus they became kings of voluntary subjects, and their power was inherited by their descendants. They took the command in war and presided over the sacrifices, except those which required a priest. They also decided causes either with or without an oath; and when they swore, the form of the oath was the stretching out of their sceptre. In ancient times their power extended continuously to all things whatsoever, in city and country, as well as in foreign parts; but at a later date they relinquished several of these privileges, and others the people took from them, until in some states nothing was left to them but the sacrifices; and where they retained more of the reality they had only the right of leadership in war beyond the border.
These, then, are the four kinds of royalty. First the monarchy of the heroic ages; this was exercised over voluntary subjects, but limited to certain functions; the king was a general and a judge, and had the control of religion The second is that of the barbarians, which is a hereditary despotic government in accordance with law. A third is the power of the so-called Aesynmete or Dictator; this is an elective tyranny. The fourth is the Lacedaemonian, which is in fact a generalship, hereditary and perpetual. These four forms differ from one another in the manner which I have described.
(5) There is a fifth form of kingly rule in which one has the disposal of all, just as each nation or each state has the disposal of public matters; this form corresponds to the control of a household. For as household management is the kingly rule of a house, so kingly rule is the household management of a city, or of a nation, or of many nations.
Of these forms we need only consider two, the Lacedaemonian and the absolute royalty; for most of the others he in a region between them, having less power than the last, and more than the first. Thus the inquiry is reduced to two points: first, is it advantageous to the state that there should be a perpetual general, and if so, should the office be confined to one family, or open to the citizens in turn? Secondly, is it well that a single man should have the supreme power in all things? The first question falls under the head of laws rather than of constitutions; for perpetual generalship might equally exist under any form of government, so that this matter may be dismissed for the present. The other kind of royalty is a sort of constitution; this we have now to consider, and briefly to run over the difficulties involved in it. We will begin by inquiring whether it is more advantageous to be ruled by the best man or by the best laws.
The advocates of royalty maintain that the laws speak only in general terms, and cannot provide for circumstances; and that for any science to abide by written rules is absurd. In Egypt the physician is allowed to alter his treatment after the fourth day, but if sooner, he takes the risk. Hence it is clear that a government acting according to written laws is plainly not the best. Yet surely the ruler cannot dispense with the general principle which exists in law; and this is a better ruler which is free from passion than that in which it is innate. Whereas the law is passionless, passion must ever sway the heart of man. Yes, it may be replied, but then on the other hand an individual will be better able to deliberate in particular cases.
The best man, then, must legislate, and laws must be passed, but these laws will have no authority when they miss the mark, though in all other cases retaining their authority. But when the law cannot determine a point at all, or not well, should the one best man or should all decide? According to our present practice assemblies meet, sit in judgment, deliberate, and decide, and their judgments an relate to individual cases. Now any member of the assembly, taken separately, is certainly inferior to the wise man. But the state is made up of many individuals. And as a feast to which all the guests contribute is better than a banquet furnished by a single man, so a multitude is a better judge of many things than any individual.
Again, the many are more incorruptible than the few; they are like the greater quantity of water which is less easily corrupted than a little. The individual is liable to be overcome by anger or by some other passion, and then his judgment is necessarily perverted; but it is hardly to be supposed that a great number of persons would all get into a passion and go wrong at the same moment. Let us assume that they are the freemen, and that they never act in violation of the law, but fill up the gaps which the law is obliged to leave. Or, if such virtue is scarcely attainable by the multitude, we need only suppose that the majority are good men and good citizens, and ask which will be the more incorruptible, the one good ruler, or the many who are all good? Will not the many? But, you will say, there may be parties among them, whereas the one man is not divided against himself. To which we may answer that their character is as good as his. If we call the rule of many men, who are all of them good, aristocracy, and the rule of one man royalty, then aristocracy will be better for states than royalty, whether the government is supported by force or not, provided only that a number of men equal in virtue can be found.
The first governments were kingships, probably for this reason, because of old, when cities were small, men of eminent virtue were few. Further, they were made kings because they were benefactors, and benefits can only be bestowed by good men. But when many persons equal in merit arose, no longer enduring the pre-eminence of one, they desired to have a commonwealth, and set up a constitution. The ruling class soon deteriorated and enriched themselves out of the public treasury; riches became the path to honor, and so oligarchies naturally grew up. These passed into tyrannies and tyrannies into democracies; for love of gain in the ruling classes was always tending to diminish their number, and so to strengthen the masses, who in the end set upon their masters and established democracies. Since cities have increased in size, no other form of government appears to be any longer even easy to establish.
Even supposing the principle to be maintained that kingly power is the best thing for states, how about the family of the king? Are his children to succeed him? If they are no better than anybody else, that will be mischievous. But, says the lover of royalty, the king, though he might, will not hand on his power to his children. That, however, is hardly to be expected, and is too much to ask of human nature. There is also a difficulty about the force which he is to employ; should a king have guards about him by whose aid he may be able to coerce the refractory? If not, how will he administer his kingdom? Even if he be the lawful sovereign who does nothing arbitrarily or contrary to law, still he must have some force wherewith to maintain the law. In the case of a limited monarchy there is not much difficulty in answering this question; the king must have such force as will be more than a match for one or more individuals, but not so great as that of the people. The ancients observe this principle when they have guards to any one whom they appointed dictator or tyrant. Thus, when Dionysius asked the Syracusans to allow him guards, somebody advised that they should give him only such a number.
At this place in the discussion there impends the inquiry respecting the king who acts solely according to his own will he has now to be considered. The so-called limited monarchy, or kingship according to law, as I have already remarked, is not a distinct form of government, for under all governments, as, for example, in a democracy or aristocracy, there may be a general holding office for life, and one person is often made supreme over the administration of a state. A magistracy of this kind exists at Epidamnus, and also at Opus, but in the latter city has a more limited power. Now, absolute monarchy, or the arbitrary rule of a sovereign over an the citizens, in a city which consists of equals, is thought by some to be quite contrary to nature; it is argued that those who are by nature equals must have the same natural right and worth, and that for unequals to have an equal share, or for equals to have an uneven share, in the offices of state, is as bad as for different bodily constitutions to have the same food and clothing. Wherefore it is thought to be just that among equals every one be ruled as well as rule, and therefore that an should have their turn. We thus arrive at law; for an order of succession implies law. And the rule of the law, it is argued, is preferable to that of any individual. On the same principle, even if it be better for certain individuals to govern, they should be made only guardians and ministers of the law. For magistrates there must be — this is admitted; but then men say that to give authority to any one man when all are equal is unjust. Nay, there may indeed be cases which the law seems unable to determine, but in such cases can a man? Nay, it will be replied, the law trains officers for this express purpose, and appoints them to determine matters which are left undecided by it, to the best of their judgment. Further, it permits them to make any amendment of the existing laws which experience suggests. Therefore he who bids the law rule may be deemed to bid God and Reason alone rule, but he who bids man rule adds an element of the beast; for desire is a wild beast, and passion perverts the minds of rulers, even when they are the best of men. The law is reason unaffected by desire. We are told that a patient should call in a physician; he will not get better if he is doctored out of a book. But the parallel of the arts is clearly not in point; for the physician does nothing contrary to rule from motives of friendship; he only cures a patient and takes a fee; whereas magistrates do many things from spite and partiality. And, indeed, if a man suspected the physician of being in league with his enemies to destroy him for a bribe, he would rather have recourse to the book. But certainly physicians, when they are sick, call in other physicians, and training-masters, when they are in training, other training-masters, as if they could not judge judge truly about their own case and might be influenced by their feelings. Hence it is evident that in seeking for justice men seek for the mean or neutral, for the law is the mean. Again, customary laws have more weight, and relate to more important matters, than written laws, and a man may be a safer ruler than the written law, but not safer than the customary law.
Again, it is by no means easy for one man to superintend many things; he will have to appoint a number of subordinates, and what difference does it make whether these subordinates always existed or were appointed by him because he needed theme If, as I said before, the good man has a right to rule because he is better, still two good men are better than one: this is the old saying, two going together, and the prayer of Agamemnon,
<<<
Would that I had ten such councillors!
<<<
And at this day there are magistrates, for example judges, who have authority to decide some matters which the law is unable to determine, since no one doubts that the law would command and decide in the best manner whatever it could. But some things can, and other things cannot, be comprehended under the law, and this is the origin of the nexted question whether the best law or the best man should rule. For matters of detail about which men deliberate cannot be included in legislation. Nor does any one deny that the decision of such matters must be left to man, but it is argued that there should be many judges, and not one only. For every ruler who has been trained by the law judges well; and it would surely seem strange that a person should see better with two eyes, or hear better with two ears, or act better with two hands or feet, than many with many; indeed, it is already the practice of kings to make to themselves many eyes and ears and hands and feet. For they make colleagues of those who are the friends of themselves and their governments. They must be friends of the monarch and of his government; if not his friends, they will not do what he wants; but friendship implies likeness and equality; and, therefore, if he thinks that his friends ought to rule, he must think that those who are equal to himself and like himself ought to rule equally with himself. These are the principal controversies relating to monarchy.
But may not all this be true in some cases and not in others? for there is by nature both a justice and an advantage appropriate to the rule of a master, another to kingly rule, another to constitutional rule; but there is none naturally appropriate to tyranny, or to any other perverted form of government; for these come into being contrary to nature. Now, to judge at least from what has been said, it is manifest that, where men are alike and equal, it is neither expedient nor just that one man should be lord of all, whether there are laws, or whether there are no laws, but he himself is in the place of law. Neither should a good man be lord over good men, nor a bad man over bad; nor, even if he excels in virtue, should he have a right to rule, unless in a particular case, at which I have already hinted, and to which I will once more recur. But first of all, I must determine what natures are suited for government by a king, and what for an aristocracy, and what for a constitutional government.
A people who are by nature capable of producing a race superior in the virtue needed for political rule are fitted for kingly government; and a people submitting to be ruled as freemen by men whose virtue renders them capable of political command are adapted for an aristocracy; while the people who are suited for constitutional freedom are those among whom there naturally exists a warlike multitude able to rule and to obey in turn by a law which gives office to the well-to-do according to their desert. But when a whole family or some individual, happens to be so pre-eminent in virtue as to surpass all others, then it is just that they should be the royal family and supreme over all, or that this one citizen should be king of the whole nation. For, as I said before, to give them authority is not only agreeable to that ground of right which the founders of all states, whether aristocratical, or oligarchical, or again democratical, are accustomed to put forward (for these all recognize the claim of excellence, although not the same excellence), but accords with the principle already laid down. For surely it would not be right to kill, or ostracize, or exile such a person, or require that he should take his turn in being governed. The whole is naturally superior to the part, and he who has this pre-eminence is in the relation of a whole to a part. But if so, the only alternative is that he should have the supreme power, and that mankind should obey him, not in turn, but always. These are the conclusions at which we arrive respecting royalty and its various forms, and this is the answer to the question, whether it is or is not advantageous to states, and to which, and how.
We maintain that the true forms of government are three, and that the best must be that which is administered by the best, and in which there is one man, or a whole family, or many persons, excelling all the others together in virtue, and both rulers and subjects are fitted, the one to rule, the others to be ruled, in such a manner as to attain the most eligible life. We showed at the commencement of our inquiry that the virtue of the good man is necessarily the same as the virtue of the citizen of the perfect state. Clearly then in the same manner, and by the same means through which a man becomes truly good, he will frame a state that is to be ruled by an aristocracy or by a king, and the same education and the same habits will be found to make a good man and a man fit to be a statesman or a king.
Having arrived at these conclusions, we must proceed to speak of the perfect state, and describe how it comes into being and is established.
---
!!![[Chapter I|Jowett: Book Two: Chapter I]]
{{Jowett: Book Two: Chapter I}}
---
!!![[Chapter II|Jowett: Book Two: Chapter II]]
{{Jowett: Book Two: Chapter II}}
---
!!![[Chapter III|Jowett: Book Two: Chapter III]]
{{Jowett: Book Two: Chapter III}}
---
!!![[Chapter IV|Jowett: Book Two: Chapter IV]]
{{Jowett: Book Two: Chapter IV}}
---
!!![[Chapter V|Jowett: Book Two: Chapter V]]
{{Jowett: Book Two: Chapter V}}
---
!!![[Chapter VI|Jowett: Book Two: Chapter VI]]
{{Jowett: Book Two: Chapter VI}}
---
!!![[Chapter VII|Jowett: Book Two: Chapter VII]]
{{Jowett: Book Two: Chapter VII}}
---
!!![[Chapter VIII|Jowett: Book Two: Chapter VIII]]
{{Jowett: Book Two: Chapter VIII}}
---
!!![[Chapter IX|Jowett: Book Two: Chapter IX]]
{{Jowett: Book Two: Chapter IX}}
---
!!![[Chapter X|Jowett: Book Two: Chapter X]]
{{Jowett: Book Two: Chapter X}}
---
!!![[Chapter XI|Jowett: Book Two: Chapter XI]]
{{Jowett: Book Two: Chapter XI}}
---
!!![[Chapter XII|Jowett: Book Two: Chapter XII]]
{{Jowett: Book Two: Chapter XII}}
OUR purpose is to consider what form of political community is best of all for those who are most able to realize their ideal of life. We must therefore examine not only this but other constitutions, both such as actually exist in well-governed states, and any theoretical forms which are held in esteem; that what is good and useful may be brought to light. And let no one suppose that in seeking for something beyond them we are anxious to make a sophistical display at any cost; we only undertake this inquiry because all the constitutions with which we are acquainted are faulty.
We will begin with the natural beginning of the subject. Three alternatives are conceivable: The members of a state must either have (1) all things or (2) nothing in common, or (3) some things in common and some not. That they should have nothing in common is clearly impossible, for the constitution is a community, and must at any rate have a common place — one city will be in one place, and the citizens are those who share in that one city. But should a well ordered state have all things, as far as may be, in common, or some only and not others? For the citizens might conceivably have wives and children and property in common, as Socrates proposes in the Republic of Plato. Which is better, our present condition, or the proposed new order of society.
There are many difficulties in the community of women. And the principle on which Socrates rests the necessity of such an institution evidently is not established by his arguments. Further, as a means to the end which he ascribes to the state, the scheme, taken literally is impracticable, and how we are to interpret it is nowhere precisely stated. I am speaking of the premise from which the argument of Socrates proceeds, ‘that the greater the unity of the state the better.’ Is it not obvious that a state may at length attain such a degree of unity as to be no longer a state? since the nature of a state is to be a plurality, and in tending to greater unity, from being a state, it becomes a family, and from being a family, an individual; for the family may be said to be more than the state, and the individual than the family. So that we ought not to attain this greatest unity even if we could, for it would be the destruction of the state. Again, a state is not made up only of so many men, but of different kinds of men; for similars do not constitute a state. It is not like a military alliance The usefulness of the latter depends upon its quantity even where there is no difference in quality (for mutual protection is the end aimed at), just as a greater weight of anything is more useful than a less (in like manner, a state differs from a nation, when the nation has not its population organized in villages, but lives an Arcadian sort of life); but the elements out of which a unity is to be formed differ in kind. Wherefore the principle of compensation, as I have already remarked in the Ethics, is the salvation of states. Even among freemen and equals this is a principle which must be maintained, for they cannot an rule together, but must change at the end of a year or some other period of time or in some order of succession. The result is that upon this plan they all govern; just as if shoemakers and carpenters were to exchange their occupations, and the same persons did not always continue shoemakers and carpenters. And since it is better that this should be so in politics as well, it is clear that while there should be continuance of the same persons in power where this is possible, yet where this is not possible by reason of the natural equality of the citizens, and at the same time it is just that an should share in the government (whether to govern be a good thing or a bad), an approximation to this is that equals should in turn retire from office and should, apart from official position, be treated alike. Thus the one party rule and the others are ruled in turn, as if they were no longer the same persons. In like manner when they hold office there is a variety in the offices held. Hence it is evident that a city is not by nature one in that sense which some persons affirm; and that what is said to be the greatest good of cities is in reality their destruction; but surely the good of things must be that which preserves them. Again, in another point of view, this extreme unification of the state is clearly not good; for a family is more self-sufficing than an individual, and a city than a family, and a city only comes into being when the community is large enough to be self-sufficing. If then self-sufficiency is to be desired, the lesser degree of unity is more desirable than the greater.
But, even supposing that it were best for the community to have the greatest degree of unity, this unity is by no means proved to follow from the fact ‘of all men saying “mine” and “not mine” at the same instant of time,’ which, according to Socrates, is the sign of perfect unity in a state. For the word ‘all’ is ambiguous. If the meaning be that every individual says ‘mine’ and ‘not mine’ at the same time, then perhaps the result at which Socrates aims may be in some degree accomplished; each man will call the same person his own son and the same person his wife, and so of his property and of all that falls to his lot. This, however, is not the way in which people would speak who had their had their wives and children in common; they would say ‘all’ but not ‘each.’ In like manner their property would be described as belonging to them, not severally but collectively. There is an obvious fallacy in the term ‘all’: like some other words, ‘both,’ ‘odd,’ ‘even,’ it is ambiguous, and even in abstract argument becomes a source of logical puzzles. That all persons call the same thing mine in the sense in which each does so may be a fine thing, but it is impracticable; or if the words are taken in the other sense, such a unity in no way conduces to harmony. And there is another objection to the proposal. For that which is common to the greatest number has the least care bestowed upon it. Every one thinks chiefly of his own, hardly at all of the common interest; and only when he is himself concerned as an individual. For besides other considerations, everybody is more inclined to neglect the duty which he expects another to fulfill; as in families many attendants are often less useful than a few. Each citizen will have a thousand sons who will not be his sons individually but anybody will be equally the son of anybody, and will therefore be neglected by all alike. Further, upon this principle, every one will use the word ‘mine’ of one who is prospering or the reverse, however small a fraction he may himself be of the whole number; the same boy will be ‘so and so’s son,’ the son of each of the thousand, or whatever be the number of the citizens; and even about this he will not be positive; for it is impossible to know who chanced to have a child, or whether, if one came into existence, it has survived. But which is better — for each to say ‘mine’ in this way, making a man the same relation to two thousand or ten thousand citizens, or to use the word ‘mine’ in the ordinary and more restricted sense? For usually the same person is called by one man his own son whom another calls his own brother or cousin or kinsman — blood relation or connection by marriage either of himself or of some relation of his, and yet another his clansman or tribesman; and how much better is it to be the real cousin of somebody than to be a son after Plato’s fashion! Nor is there any way of preventing brothers and children and fathers and mothers from sometimes recognizing one another; for children are born like their parents, and they will necessarily be finding indications of their relationship to one another. Geographers declare such to be the fact; they say that in part of Upper Libya, where the women are common, nevertheless the children who are born are assigned to their respective fathers on the ground of their likeness. And some women, like the females of other animals — for example, mares and cows — have a strong tendency to produce offspring resembling their parents, as was the case with the Pharsalian mare called Honest.
Other evils, against which it is not easy for the authors of such a community to guard, will be assaults and homicides, voluntary as well as involuntary, quarrels and slanders, all which are most unholy acts when committed against fathers and mothers and near relations, but not equally unholy when there is no relationship. Moreover, they are much more likely to occur if the relationship is unknown, and, when they have occurred, the customary expiations of them cannot be made. Again, how strange it is that Socrates, after having made the children common, should hinder lovers from carnal intercourse only, but should permit love and familiarities between father and son or between brother and brother, than which nothing can be more unseemly, since even without them love of this sort is improper. How strange, too, to forbid intercourse for no other reason than the violence of the pleasure, as though the relationship of father and son or of brothers with one another made no difference.
This community of wives and children seems better suited to the husbandmen than to the guardians, for if they have wives and children in common, they will be bound to one another by weaker ties, as a subject class should be, and they will remain obedient and not rebel. In a word, the result of such a law would be just the opposite of which good laws ought to have, and the intention of Socrates in making these regulations about women and children would defeat itself. For friendship we believe to be the greatest good of states and the preservative of them against revolutions; neither is there anything which Socrates so greatly lauds as the unity of the state which he and all the world declare to be created by friendship. But the unity which he commends would be like that of the lovers in the Symposium, who, as Aristophanes says, desire to grow together in the excess of their affection, and from being two to become one, in which case one or both would certainly perish. Whereas in a state having women and children common, love will be watery; and the father will certainly not say ‘my son,’ or the son ‘my father.’ As a little sweet wine mingled with a great deal of water is imperceptible in the mixture, so, in this sort of community, the idea of relationship which is based upon these names will be lost; there is no reason why the so-called father should care about the son, or the son about the father, or brothers about one another. Of the two qualities which chiefly inspire regard and affection — that a thing is your own and that it is your only one-neither can exist in such a state as this.
Again, the transfer of children as soon as they are born from the rank of husbandmen or of artisans to that of guardians, and from the rank of guardians into a lower rank, will be very difficult to arrange; the givers or transferrers cannot but know whom they are giving and transferring, and to whom. And the previously mentioned evils, such as assaults, unlawful loves, homicides, will happen more often amongst those who are transferred to the lower classes, or who have a place assigned to them among the guardians; for they will no longer call the members of the class they have left brothers, and children, and fathers, and mothers, and will not, therefore, be afraid of committing any crimes by reason of consanguinity. Touching the community of wives and children, let this be our conclusion.
In the governments of Lacedaemon and Crete, and indeed in all governments, two points have to be considered: first, whether any particular law is good or bad, when compared with the perfect state; secondly, whether it is or is not consistent with the idea and character which the lawgiver has set before his citizens. That in a well-ordered state the citizens should have leisure and not have to provide for their daily wants is generally acknowledged, but there is a difficulty in seeing how this leisure is to be attained. The Thessalian Penestae have often risen against their masters, and the Helots in like manner against the Lacedaemonians, for whose misfortunes they are always lying in wait. Nothing, however, of this kind has as yet happened to the Cretans; the reason probably is that the neighboring cities, even when at war with one another, never form an alliance with rebellious serfs, rebellions not being for their interest, since they themselves have a dependent population. Whereas all the neighbors of the Lacedaemonians, whether Argives, Messenians, or Arcadians, were their enemies. In Thessaly, again, the original revolt of the slaves occurred because the Thessalians were still at war with the neighboring Achaeans, Perrhaebians, and Magnesians. Besides, if there were no other difficulty, the treatment or management of slaves is a troublesome affair; for, if not kept in hand, they are insolent, and think that they are as good as their masters, and, if harshly treated, they hate and conspire against them. Now it is clear that when these are the results the citizens of a state have not found out the secret of managing their subject population.
Again, the license of the Lacedaemonian women defeats the intention of the Spartan constitution, and is adverse to the happiness of the state. For, a husband and wife being each a part of every family, the state may be considered as about equally divided into men and women; and, therefore, in those states in which the condition of the women is bad, half the city may be regarded as having no laws. And this is what has actually happened at Sparta; the legislator wanted to make the whole state hardy and temperate, and he has carried out his intention in the case of the men, but he has neglected the women, who live in every sort of intemperance and luxury. The consequence is that in such a state wealth is too highly valued, especially if the citizen fall under the dominion of their wives, after the manner of most warlike races, except the Celts and a few others who openly approve of male loves. The old mythologer would seem to have been right in uniting Ares and Aphrodite, for all warlike races are prone to the love either of men or of women. This was exemplified among the Spartans in the days of their greatness; many things were managed by their women. But what difference does it make whether women rule, or the rulers are ruled by women? The result is the same. Even in regard to courage, which is of no use in daily life, and is needed only in war, the influence of the Lacedaemonian women has been most mischievous. The evil showed itself in the Theban invasion, when, unlike the women other cities, they were utterly useless and caused more confusion than the enemy. This license of the Lacedaemonian women existed from the earliest times, and was only what might be expected. For, during the wars of the Lacedaemonians, first against the Argives, and afterwards against the Arcadians and Messenians, the men were long away from home, and, on the return of peace, they gave themselves into the legislator’s hand, already prepared by the discipline of a soldier’s life (in which there are many elements of virtue), to receive his enactments. But, when Lycurgus, as tradition says, wanted to bring the women under his laws, they resisted, and he gave up the attempt. These then are the causes of what then happened, and this defect in the constitution is clearly to be attributed to them. We are not, however, considering what is or is not to be excused, but what is right or wrong, and the disorder of the women, as I have already said, not only gives an air of indecorum to the constitution considered in itself, but tends in a measure to foster avarice.
The mention of avarice naturally suggests a criticism on the inequality of property. While some of the Spartan citizen have quite small properties, others have very large ones; hence the land has passed into the hands of a few. And this is due also to faulty laws; for, although the legislator rightly holds up to shame the sale or purchase of an inheritance, he allows anybody who likes to give or bequeath it. Yet both practices lead to the same result. And nearly two-fifths of the whole country are held by women; this is owing to the number of heiresses and to the large dowries which are customary. It would surely have been better to have given no dowries at all, or, if any, but small or moderate ones. As the law now stands, a man may bestow his heiress on any one whom he pleases, and, if he die intestate, the privilege of giving her away descends to his heir. Hence, although the country is able to maintain 1500 cavalry and 30,000 hoplites, the whole number of Spartan citizens fell below 1000. The result proves the faulty nature of their laws respecting property; for the city sank under a single defeat; the want of men was their ruin. There is a tradition that, in the days of their ancient kings, they were in the habit of giving the rights of citizenship to strangers, and therefore, in spite of their long wars, no lack of population was experienced by them; indeed, at one time Sparta is said to have numbered not less than 10,000 citizens Whether this statement is true or not, it would certainly have been better to have maintained their numbers by the equalization of property. Again, the law which relates to the procreation of children is adverse to the correction of this inequality. For the legislator, wanting to have as many Spartans as he could, encouraged the citizens to have large families; and there is a law at Sparta that the father of three sons shall be exempt from military service, and he who has four from all the burdens of the state. Yet it is obvious that, if there were many children, the land being distributed as it is, many of them must necessarily fall into poverty.
The Lacedaemonian constitution is defective in another point; I mean the Ephoralty. This magistracy has authority in the highest matters, but the Ephors are chosen from the whole people, and so the office is apt to fall into the hands of very poor men, who, being badly off, are open to bribes. There have been many examples at Sparta of this evil in former times; and quite recently, in the matter of the Andrians, certain of the Ephors who were bribed did their best to ruin the state. And so great and tyrannical is their power, that even the kings have been compelled to court them, so that, in this way as well together with the royal office, the whole constitution has deteriorated, and from being an aristocracy has turned into a democracy. The Ephoralty certainly does keep the state together; for the people are contented when they have a share in the highest office, and the result, whether due to the legislator or to chance, has been advantageous. For if a constitution is to be permanent, all the parts of the state must wish that it should exist and the same arrangements be maintained. This is the case at Sparta, where the kings desire its permanence because they have due honor in their own persons; the nobles because they are represented in the council of elders (for the office of elder is a reward of virtue); and the people, because all are eligible to the Ephoralty. The election of Ephors out of the whole people is perfectly right, but ought not to be carried on in the present fashion, which is too childish. Again, they have the decision of great causes, although they are quite ordinary men, and therefore they should not determine them merely on their own judgment, but according to written rules, and to the laws. Their way of life, too, is not in accordance with the spirit of the constitution — they have a deal too much license; whereas, in the case of the other citizens, the excess of strictness is so intolerable that they run away from the law into the secret indulgence of sensual pleasures.
Again, the council of elders is not free from defects. It may be said that the elders are good men and well trained in manly virtue; and that, therefore, there is an advantage to the state in having them. But that judges of important causes should hold office for life is a disputable thing, for the mind grows old as well as the body. And when men have been educated in such a manner that even the legislator himself cannot trust them, there is real danger. Many of the elders are well known to have taken bribes and to have been guilty of partiality in public affairs. And therefore they ought not to be irresponsible; yet at Sparta they are so. But (it may be replied), ‘All magistracies are accountable to the Ephors.’ Yes, but this prerogative is too great for them, and we maintain that the control should be exercised in some other manner. Further, the mode in which the Spartans elect their elders is childish; and it is improper that the person to be elected should canvass for the office; the worthiest should be appointed, whether he chooses or not. And here the legislator clearly indicates the same intention which appears in other parts of his constitution; he would have his citizens ambitious, and he has reckoned upon this quality in the election of the elders; for no one would ask to be elected if he were not. Yet ambition and avarice, almost more than any other passions, are the motives of crime.
Whether kings are or are not an advantage to states, I will consider at another time; they should at any rate be chosen, not as they are now, but with regard to their personal life and conduct. The legislator himself obviously did not suppose that he could make them really good men; at least he shows a great distrust of their virtue. For this reason the Spartans used to join enemies with them in the same embassy, and the quarrels between the kings were held to be conservative of the state.
Neither did the first introducer of the common meals, called ‘phiditia,’ regulate them well. The entertainment ought to have been provided at the public cost, as in Crete; but among the Lacedaemonians every one is expected to contribute, and some of them are too poor to afford the expense; thus the intention of the legislator is frustrated. The common meals were meant to be a popular institution, but the existing manner of regulating them is the reverse of popular. For the very poor can scarcely take part in them; and, according to ancient custom, those who cannot contribute are not allowed to retain their rights of citizenship.
The law about the Spartan admirals has often been censured, and with justice; it is a source of dissension, for the kings are perpetual generals, and this office of admiral is but the setting up of another king.
The charge which Plato brings, in the Laws, against the intention of the legislator, is likewise justified; the whole constitution has regard to one part of virtue only — the virtue of the soldier, which gives victory in war. So long as they were at war, therefore, their power was preserved, but when they had attained empire they fell for of the arts of peace they knew nothing, and had never engaged in any employment higher than war. There is another error, equally great, into which they have fallen. Although they truly think that the goods for which men contend are to be acquired by virtue rather than by vice, they err in supposing that these goods are to be preferred to the virtue which gains them.
Once more: the revenues of the state are ill-managed; there is no money in the treasury, although they are obliged to carry on great wars, and they are unwilling to pay taxes. The greater part of the land being in the hands of the Spartans, they do not look closely into one another’s contributions. The result which the legislator has produced is the reverse of beneficial; for he has made his city poor, and his citizens greedy.
Enough respecting the Spartan constitution, of which these are the principal defects.
Next let us consider what should be our arrangements about property: should the citizens of the perfect state have their possessions in common or not? This question may be discussed separately from the enactments about women and children. Even supposing that the women and children belong to individuals, according to the custom which is at present universal, may there not be an advantage in having and using possessions in common? Three cases are possible: (1) the soil may be appropriated, but the produce may be thrown for consumption into the common stock; and this is the practice of some nations. Or (2), the soil may be common, and may be cultivated in common, but the produce divided among individuals for their private use; this is a form of common property which is said to exist among certain barbarians. Or (3), the soil and the produce may be alike common.
When the husbandmen are not the owners, the case will be different and easier to deal with; but when they till the ground for themselves the question of ownership will give a world of trouble. If they do not share equally enjoyments and toils, those who labor much and get little will necessarily complain of those who labor little and receive or consume much. But indeed there is always a difficulty in men living together and having all human relations in common, but especially in their having common property. The partnerships of fellow-travelers are an example to the point; for they generally fall out over everyday matters and quarrel about any trifle which turns up. So with servants: we are most able to take offense at those with whom we most we most frequently come into contact in daily life.
These are only some of the disadvantages which attend the community of property; the present arrangement, if improved as it might be by good customs and laws, would be far better, and would have the advantages of both systems. Property should be in a certain sense common, but, as a general rule, private; for, when everyone has a distinct interest, men will not complain of one another, and they will make more progress, because every one will be attending to his own business. And yet by reason of goodness, and in respect of use, ‘Friends,’ as the proverb says, ‘will have all things common.’ Even now there are traces of such a principle, showing that it is not impracticable, but, in well-ordered states, exists already to a certain extent and may be carried further. For, although every man has his own property, some things he will place at the disposal of his friends, while of others he shares the use with them. The Lacedaemonians, for example, use one another’s slaves, and horses, and dogs, as if they were their own; and when they lack provisions on a journey, they appropriate what they find in the fields throughout the country. It is clearly better that property should be private, but the use of it common; and the special business of the legislator is to create in men this benevolent disposition. Again, how immeasurably greater is the pleasure, when a man feels a thing to be his own; for surely the love of self is a feeling implanted by nature and not given in vain, although selfishness is rightly censured; this, however, is not the mere love of self, but the love of self in excess, like the miser’s love of money; for all, or almost all, men love money and other such objects in a measure. And further, there is the greatest pleasure in doing a kindness or service to friends or guests or companions, which can only be rendered when a man has private property. These advantages are lost by excessive unification of the state. The exhibition of two virtues, besides, is visibly annihilated in such a state: first, temperance towards women (for it is an honorable action to abstain from another’s wife for temperance’ sake); secondly, liberality in the matter of property. No one, when men have all things in common, will any longer set an example of liberality or do any liberal action; for liberality consists in the use which is made of property.
Such legislation may have a specious appearance of benevolence; men readily listen to it, and are easily induced to believe that in some wonderful manner everybody will become everybody’s friend, especially when some one is heard denouncing the evils now existing in states, suits about contracts, convictions for perjury, flatteries of rich men and the like, which are said to arise out of the possession of private property. These evils, however, are due to a very different cause — the wickedness of human nature. Indeed, we see that there is much more quarrelling among those who have all things in common, though there are not many of them when compared with the vast numbers who have private property.
Again, we ought to reckon, not only the evils from which the citizens will be saved, but also the advantages which they will lose. The life which they are to lead appears to be quite impracticable. The error of Socrates must be attributed to the false notion of unity from which he starts. Unity there should be, both of the family and of the state, but in some respects only. For there is a point at which a state may attain such a degree of unity as to be no longer a state, or at which, without actually ceasing to exist, it will become an inferior state, like harmony passing into unison, or rhythm which has been reduced to a single foot. The state, as I was saying, is a plurality which should be united and made into a community by education; and it is strange that the author of a system of education which he thinks will make the state virtuous, should expect to improve his citizens by regulations of this sort, and not by philosophy or by customs and laws, like those which prevail at Sparta and Crete respecting common meals, whereby the legislator has made property common. Let us remember that we should not disregard the experience of ages; in the multitude of years these things, if they were good, would certainly not have been unknown; for almost everything has been found out, although sometimes they are not put together; in other cases men do not use the knowledge which they have. Great light would be thrown on this subject if we could see such a form of government in the actual process of construction; for the legislator could not form a state at all without distributing and dividing its constituents into associations for common meals, and into phratries and tribes. But all this legislation ends only in forbidding agriculture to the guardians, a prohibition which the Lacedaemonians try to enforce already.
But, indeed, Socrates has not said, nor is it easy to decide, what in such a community will be the general form of the state. The citizens who are not guardians are the majority, and about them nothing has been determined: are the husbandmen, too, to have their property in common? Or is each individual to have his own? And are the wives and children to be individual or common. If, like the guardians, they are to have all things in common, what do they differ from them, or what will they gain by submitting to their government? Or, upon what principle would they submit, unless indeed the governing class adopt the ingenious policy of the Cretans, who give their slaves the same institutions as their own, but forbid them gymnastic exercises and the possession of arms. If, on the other hand, the inferior classes are to be like other cities in respect of marriage and property, what will be the form of the community? Must it not contain two states in one, each hostile to the other He makes the guardians into a mere occupying garrison, while the husbandmen and artisans and the rest are the real citizens. But if so the suits and quarrels, and all the evils which Socrates affirms to exist in other states, will exist equally among them. He says indeed that, having so good an education, the citizens will not need many laws, for example laws about the city or about the markets; but then he confines his education to the guardians. Again, he makes the husbandmen owners of the property upon condition of their paying a tribute. But in that case they are likely to be much more unmanageable and conceited than the Helots, or Penestae, or slaves in general. And whether community of wives and property be necessary for the lower equally with the higher class or not, and the questions akin to this, what will be the education, form of government, laws of the lower class, Socrates has nowhere determined: neither is it easy to discover this, nor is their character of small importance if the common life of the guardians is to be maintained.
Again, if Socrates makes the women common, and retains private property, the men will see to the fields, but who will see to the house? And who will do so if the agricultural class have both their property and their wives in common? Once more: it is absurd to argue, from the analogy of the animals, that men and women should follow the same pursuits, for animals have not to manage a household. The government, too, as constituted by Socrates, contains elements of danger; for he makes the same persons always rule. And if this is often a cause of disturbance among the meaner sort, how much more among high-spirited warriors? But that the persons whom he makes rulers must be the same is evident; for the gold which the God mingles in the souls of men is not at one time given to one, at another time to another, but always to the same: as he says, ‘God mingles gold in some, and silver in others, from their very birth; but brass and iron in those who are meant to be artisans and husbandmen.’ Again, he deprives the guardians even of happiness, and says that the legislator ought to make the whole state happy. But the whole cannot be happy unless most, or all, or some of its parts enjoy happiness. In this respect happiness is not like the even principle in numbers, which may exist only in the whole, but in neither of the parts; not so happiness. And if the guardians are not happy, who are? Surely not the artisans, or the common people. The Republic of which Socrates discourses has all these difficulties, and others quite as great.
The same, or nearly the same, objections apply to Plato’s later work, the Laws, and therefore we had better examine briefly the constitution which is therein described. In the Republic, Socrates has definitely settled in all a few questions only; such as the community of women and children, the community of property, and the constitution of the state. The population is divided into two classes — one of husbandmen, and the other of warriors; from this latter is taken a third class of counselors and rulers of the state. But Socrates has not determined whether the husbandmen and artisans are to have a share in the government, and whether they, too, are to carry arms and share in military service, or not. He certainly thinks that the women ought to share in the education of the guardians, and to fight by their side. The remainder of the work is filled up with digressions foreign to the main subject, and with discussions about the education of the guardians. In the Laws there is hardly anything but laws; not much is said about the constitution. This, which he had intended to make more of the ordinary type, he gradually brings round to the other or ideal form. For with the exception of the community of women and property, he supposes everything to be the same in both states; there is to be the same education; the citizens of both are to live free from servile occupations, and there are to be common meals in both. The only difference is that in the Laws, the common meals are extended to women, and the warriors number 5000, but in the Republic only 1000.
The discourses of Socrates are never commonplace; they always exhibit grace and originality and thought; but perfection in everything can hardly be expected. We must not overlook the fact that the number of 5000 citizens, just now mentioned, will require a territory as large as Babylon, or some other huge site, if so many persons are to be supported in idleness, together with their women and attendants, who will be a multitude many times as great. In framing an ideal we may assume what we wish, but should avoid impossibilities.
It is said that the legislator ought to have his eye directed to two points — the people and the country. But neighboring countries also must not be forgotten by him, firstly because the state for which he legislates is to have a political and not an isolated life. For a state must have such a military force as will be serviceable against her neighbors, and not merely useful at home. Even if the life of action is not admitted to be the best, either for individuals or states, still a city should be formidable to enemies, whether invading or retreating.
There is another point: Should not the amount of property be defined in some way which differs from this by being clearer? For Socrates says that a man should have so much property as will enable him to live temperately, which is only a way of saying ‘to live well’; this is too general a conception. Further, a man may live temperately and yet miserably. A better definition would be that a man must have so much property as will enable him to live not only temperately but liberally; if the two are parted, liberally will combine with luxury; temperance will be associated with toil. For liberality and temperance are the only eligible qualities which have to do with the use of property. A man cannot use property with mildness or courage, but temperately and liberally he may; and therefore the practice of these virtues is inseparable from property. There is an inconsistency, too, in too, in equalizing the property and not regulating the number of the citizens; the population is to remain unlimited, and he thinks that it will be sufficiently equalized by a certain number of marriages being unfruitful, however many are born to others, because he finds this to be the case in existing states. But greater care will be required than now; for among ourselves, whatever may be the number of citizens, the property is always distributed among them, and therefore no one is in want; but, if the property were incapable of division as in the Laws, the supernumeraries, whether few or many, would get nothing. One would have thought that it was even more necessary to limit population than property; and that the limit should be fixed by calculating the chances of mortality in the children, and of sterility in married persons. The neglect of this subject, which in existing states is so common, is a never-failing cause of poverty among the citizens; and poverty is the parent of revolution and crime. Pheidon the Corinthian, who was one of the most ardent legislators, thought that the families and the number of citizens ought to remain the same, although originally all the lots may have been of different sizes: but in the Laws the opposite principle is maintained. What in our opinion is the right arrangement will have to be explained hereafter.
There is another omission in the Laws: Socrates does not tell us how the rulers differ from their subjects; he only says that they should be related as the warp and the woof, which are made out of different wools. He allows that a man’s whole property may be increased fivefold, but why should not his land also increase to a certain extent? Again, will the good management of a household be promoted by his arrangement of homesteads? For he assigns to each individual two homesteads in separate places, and it is difficult to live in two houses.
The whole system of government tends to be neither democracy nor oligarchy, but something in a mean between them, which is usually called a polity, and is composed of the heavy-armed soldiers. Now, if he intended to frame a constitution which would suit the greatest number of states, he was very likely right, but not if he meant to say that this constitutional form came nearest to his first or ideal state; for many would prefer the Lacedaemonian, or, possibly, some other more aristocratic government. Some, indeed, say that the best constitution is a combination of all existing forms, and they praise the Lacedaemonian because it is made up of oligarchy, monarchy, and democracy, the king forming the monarchy, and the council of elders the oligarchy while the democratic element is represented by the Ephors; for the Ephors are selected from the people. Others, however, declare the Ephoralty to be a tyranny, and find the element of democracy in the common meals and in the habits of daily life. In the Laws it is maintained that the best constitution is made up of democracy and tyranny, which are either not constitutions at all, or are the worst of all. But they are nearer the truth who combine many forms; for the constitution is better which is made up of more numerous elements. The constitution proposed in the Laws has no element of monarchy at all; it is nothing but oligarchy and democracy, leaning rather to oligarchy. This is seen in the mode of appointing magistrates; for although the appointment of them by lot from among those who have been already selected combines both elements, the way in which the rich are compelled by law to attend the assembly and vote for magistrates or discharge other political duties, while the rest may do as they like, and the endeavor to have the greater number of the magistrates appointed out of the richer classes and the highest officers selected from those who have the greatest incomes, both these are oligarchical features. The oligarchical principle prevails also in the choice of the council, for all are compelled to choose, but the compulsion extends only to the choice out of the first class, and of an equal number out of the second class and out of the third class, but not in this latter case to all the voters but to those of the first three classes; and the selection of candidates out of the fourth class is only compulsory on the first and second. Then, from the persons so chosen, he says that there ought to be an equal number of each class selected. Thus a preponderance will be given to the better sort of people, who have the larger incomes, because many of the lower classes, not being compelled will not vote. These considerations, and others which will be adduced when the time comes for examining similar polities, tend to show that states like Plato’s should not be composed of democracy and monarchy. There is also a danger in electing the magistrates out of a body who are themselves elected; for, if but a small number choose to combine, the elections will always go as they desire. Such is the constitution which is described in the Laws.
Other constitutions have been proposed; some by private persons, others by philosophers and statesmen, which all come nearer to established or existing ones than either of Plato’s. No one else has introduced such novelties as the community of women and children, or public tables for women: other legislators begin with what is necessary. In the opinion of some, the regulation of property is the chief point of all, that being the question upon which all revolutions turn. This danger was recognized by Phaleas of Chalcedon, who was the first to affirm that the citizens of a state ought to have equal possessions. He thought that in a new colony the equalization might be accomplished without difficulty, not so easily when a state was already established; and that then the shortest way of compassing the desired end would be for the rich to give and not to receive marriage portions, and for the poor not to give but to receive them.
Plato in the Laws was of opinion that, to a certain extent, accumulation should be allowed, forbidding, as I have already observed, any citizen to possess more than five times the minimum qualification But those who make such laws should remember what they are apt to forget — that the legislator who fixes the amount of property should also fix the number of children; for, if the children are too many for the property, the law must be broken. And, besides the violation of the law, it is a bad thing that many from being rich should become poor; for men of ruined fortunes are sure to stir up revolutions. That the equalization of property exercises an influence on political society was clearly understood even by some of the old legislators. Laws were made by Solon and others prohibiting an individual from possessing as much land as he pleased; and there are other laws in states which forbid the sale of property: among the Locrians, for example, there is a law that a man is not to sell his property unless he can prove unmistakably that some misfortune has befallen him. Again, there have been laws which enjoin the preservation of the original lots. Such a law existed in the island of Leucas, and the abrogation of it made the constitution too democratic, for the rulers no longer had the prescribed qualification. Again, where there is equality of property, the amount may be either too large or too small, and the possessor may be living either in luxury or penury. Clearly, then, the legislator ought not only to aim at the equalization of properties, but at moderation in their amount. Further, if he prescribe this moderate amount equally to all, he will be no nearer the mark; for it is not the possessions but the desires of mankind which require to be equalized, and this is impossible, unless a sufficient education is provided by the laws. But Phaleas will probably reply that this is precisely what he means; and that, in his opinion, there ought to be in states, not only equal property, but equal education. Still he should tell precisely what he means; and that, in his opinion, there ought to be in be in having one and the same for all, if it is of a sort that predisposes men to avarice, or ambition, or both. Moreover, civil troubles arise, not only out of the inequality of property, but out of the inequality of honor, though in opposite ways. For the common people quarrel about the inequality of property, the higher class about the equality of honor; as the poet says,
<<<
The bad and good alike in honor share.
<<<
There are crimes of which the motive is want; and for these Phaleas expects to find a cure in the equalization of property, which will take away from a man the temptation to be a highwayman, because he is hungry or cold. But want is not the sole incentive to crime; men also wish to enjoy themselves and not to be in a state of desire — they wish to cure some desire, going beyond the necessities of life, which preys upon them; nay, this is not the only reason — they may desire superfluities in order to enjoy pleasures unaccompanied with pain, and therefore they commit crimes.
Now what is the cure of these three disorders? Of the first, moderate possessions and occupation; of the second, habits of temperance; as to the third, if any desire pleasures which depend on themselves, they will find the satisfaction of their desires nowhere but in philosophy; for all other pleasures we are dependent on others. The fact is that the greatest crimes are caused by excess and not by necessity. Men do not become tyrants in order that they may not suffer cold; and hence great is the honor bestowed, not on him who kills a thief, but on him who kills a tyrant. Thus we see that the institutions of Phaleas avail only against petty crimes.
There is another objection to them. They are chiefly designed to promote the internal welfare of the state. But the legislator should consider also its relation to neighboring nations, and to all who are outside of it. The government must be organized with a view to military strength; and of this he has said not a word. And so with respect to property: there should not only be enough to supply the internal wants of the state, but also to meet dangers coming from without. The property of the state should not be so large that more powerful neighbors may be tempted by it, while the owners are unable to repel the invaders; nor yet so small that the state is unable to maintain a war even against states of equal power, and of the same character. Phaleas has not laid down any rule; but we should bear in mind that abundance of wealth is an advantage. The best limit will probably be, that a more powerful neighbor must have no inducement to go to war with you by reason of the excess of your wealth, but only such as he would have had if you had possessed less. There is a story that Eubulus, when Autophradates was going to besiege Atarneus, told him to consider how long the operation would take, and then reckon up the cost which would be incurred in the time. ‘For,’ said he, ‘I am willing for a smaller sum than that to leave Atarneus at once.’ These words of Eubulus made an impression on Autophradates, and he desisted from the siege.
The equalization of property is one of the things that tend to prevent the citizens from quarrelling. Not that the gain in this direction is very great. For the nobles will be dissatisfied because they think themselves worthy of more than an equal share of honors; and this is often found to be a cause of sedition and revolution. And the avarice of mankind is insatiable; at one time two obols was pay enough; but now, when this sum has become customary, men always want more and more without end; for it is of the nature of desire not to be satisfied, and most men live only for the gratification of it. The beginning of reform is not so much to equalize property as to train the nobler sort of natures not to desire more, and to prevent the lower from getting more; that is to say, they must be kept down, but not ill-treated. Besides, the equalization proposed by Phaleas is imperfect; for he only equalizes land, whereas a man may be rich also in slaves, and cattle, and money, and in the abundance of what are called his movables. Now either all these things must be equalized, or some limit must be imposed on them, or they must an be let alone. It would appear that Phaleas is legislating for a small city only, if, as he supposes, all the artisans are to be public slaves and not to form a supplementary part of the body of citizens. But if there is a law that artisans are to be public slaves, it should only apply to those engaged on public works, as at Epidamnus, or at Athens on the plan which Diophantus once introduced.
From these observations any one may judge how far Phaleas was wrong or right in his ideas.
Hippodamus, the son of Euryphon, a native of Miletus, the same who invented the art of planning cities, and who also laid out the Piraeus — a strange man, whose fondness for distinction led him into a general eccentricity of life, which made some think him affected (for he would wear flowing hair and expensive ornaments; but these were worn on a cheap but warm garment both in winter and summer); he, besides aspiring to be an adept in the knowledge of nature, was the first person not a statesman who made inquiries about the best form of government.
The city of Hippodamus was composed of 10,000 citizens divided into three parts — one of artisans, one of husbandmen, and a third of armed defenders of the state. He also divided the land into three parts, one sacred, one public, the third private: the first was set apart to maintain the customary worship of the Gods, the second was to support the warriors, the third was the property of the husbandmen. He also divided laws into three classes, and no more, for he maintained that there are three subjects of lawsuits — insult, injury, and homicide. He likewise instituted a single final court of appeal, to which all causes seeming to have been improperly decided might be referred; this court he formed of elders chosen for the purpose. He was further of opinion that the decisions of the courts ought not to be given by the use of a voting pebble, but that every one should have a tablet on which he might not only write a simple condemnation, or leave the tablet blank for a simple acquittal; but, if he partly acquitted and partly condemned, he was to distinguish accordingly. To the existing law he objected that it obliged the judges to be guilty of perjury, whichever way they voted. He also enacted that those who discovered anything for the good of the state should be honored; and he provided that the children of citizens who died in battle should be maintained at the public expense, as if such an enactment had never been heard of before, yet it actually exists at Athens and in other places. As to the magistrates, he would have them all elected by the people, that is, by the three classes already mentioned, and those who were elected were to watch over the interests of the public, of strangers, and of orphans. These are the most striking points in the constitution of Hippodamus. There is not much else.
The first of these proposals to which objection may be taken is the threefold division of the citizens. The artisans, and the husbandmen, and the warriors, all have a share in the government. But the husbandmen have no arms, and the artisans neither arms nor land, and therefore they become all but slaves of the warrior class. That they should share in all the offices is an impossibility; for generals and guardians of the citizens, and nearly all the principal magistrates, must be taken from the class of those who carry arms. Yet, if the two other classes have no share in the government, how can they be loyal citizens? It may be said that those who have arms must necessarily be masters of both the other classes, but this is not so easily accomplished unless they are numerous; and if they are, why should the other classes share in the government at all, or have power to appoint magistrates? Further, what use are farmers to the city? Artisans there must be, for these are wanted in every city, and they can live by their craft, as elsewhere; and the husbandmen too, if they really provided the warriors with food, might fairly have a share in the government. But in the republic of Hippodamus they are supposed to have land of their own, which they cultivate for their private benefit. Again, as to this common land out of which the soldiers are maintained, if they are themselves to be the cultivators of it, the warrior class will be identical with the husbandmen, although the legislator intended to make a distinction between them. If, again, there are to be other cultivators distinct both from the husbandmen, who have land of their own, and from the warriors, they will make a fourth class, which has no place in the state and no share in anything. Or, if the same persons are to cultivate their own lands, and those of the public as well, they will have difficulty in supplying the quantity of produce which will maintain two households: and why, in this case, should there be any division, for they might find food themselves and give to the warriors from the same land and the same lots? There is surely a great confusion in all this.
Neither is the law to commended which says that the judges, when a simple issue is laid before them, should distinguish in their judgement; for the judge is thus converted into an arbitrator. Now, in an arbitration, although the arbitrators are many, they confer with one another about the decision, and therefore they can distinguish; but in courts of law this is impossible, and, indeed, most legislators take pains to prevent the judges from holding any communication with one another. Again, will there not be confusion if the judge thinks that damages should be given, but not so much as the suitor demands? He asks, say, for twenty minae, and the judge allows him ten minae (or in general the suitor asks for more and the judge allows less), while another judge allows five, another four minae. In this way they will go on splitting up the damages, and some will grant the whole and others nothing: how is the final reckoning to be taken? Again, no one contends that he who votes for a simple acquittal or condemnation perjures himself, if the indictment has been laid in an unqualified form; and this is just, for the judge who acquits does not decide that the defendant owes nothing, but that he does not owe the twenty minae. He only is guilty of perjury who thinks that the defendant ought not to pay twenty minae, and yet condemns him.
To honor those who discover anything which is useful to the state is a proposal which has a specious sound, but cannot safely be enacted by law, for it may encourage informers, and perhaps even lead to political commotions. This question involves another. It has been doubted whether it is or is not expedient to make any changes in the laws of a country, even if another law be better. Now, if an changes are inexpedient, we can hardly assent to the proposal of Hippodamus; for, under pretense of doing a public service, a man may introduce measures which are really destructive to the laws or to the constitution. But, since we have touched upon this subject, perhaps we had better go a little into detail, for, as I was saying, there is a difference of opinion, and it may sometimes seem desirable to make changes. Such changes in the other arts and sciences have certainly been beneficial; medicine, for example, and gymnastic, and every other art and craft have departed from traditional usage. And, if politics be an art, change must be necessary in this as in any other art. That improvement has occurred is shown by the fact that old customs are exceedingly simple and barbarous. For the ancient Hellenes went about armed and bought their brides of each other. The remains of ancient laws which have come down to us are quite absurd; for example, at Cumae there is a law about murder, to the effect that if the accuser produce a certain number of witnesses from among his own kinsmen, the accused shall be held guilty. Again, men in general desire the good, and not merely what their fathers had. But the primeval inhabitants, whether they were born of the earth or were the survivors of some destruction, may be supposed to have been no better than ordinary or even foolish people among ourselves (such is certainly the tradition concerning the earth-born men); and it would be ridiculous to rest contented with their notions. Even when laws have been written down, they ought not always to remain unaltered. As in other sciences, so in politics, it is impossible that all things should be precisely set down in writing; for enactments must be universal, but actions are concerned with particulars. Hence we infer that sometimes and in certain cases laws may be changed; but when we look at the matter from another point of view, great caution would seem to be required. For the habit of lightly changing the laws is an evil, and, when the advantage is small, some errors both of lawgivers and rulers had better be left; the citizen will not gain so much by making the change as he will lose by the habit of disobedience. The analogy of the arts is false; a change in a law is a very different thing from a change in an art. For the law has no power to command obedience except that of habit, which can only be given by time, so that a readiness to change from old to new laws enfeebles the power of the law. Even if we admit that the laws are to be changed, are they all to be changed, and in every state? And are they to be changed by anybody who likes, or only by certain persons? These are very important questions; and therefore we had better reserve the discussion of them to a more suitable occasion.
The Cretan constitution nearly resembles the Spartan, and in some few points is quite as good; but for the most part less perfect in form. The older constitutions are generally less elaborate than the later, and the Lacedaemonian is said to be, and probably is, in a very great measure, a copy of the Cretan. According to tradition, Lycurgus, when he ceased to be the guardian of King Charillus, went abroad and spent most of his time in Crete. For the two countries are nearly connected; the Lyctians are a colony of the Lacedaemonians, and the colonists, when they came to Crete, adopted the constitution which they found existing among the inhabitants. Even to this day the Perioeci, or subject population of Crete, are governed by the original laws which Minos is supposed to have enacted. The island seems to be intended by nature for dominion in Hellas, and to be well situated; it extends right across the sea, around which nearly all the Hellenes are settled; and while one end is not far from the Peloponnese, the other almost reaches to the region of Asia about Triopium and Rhodes. Hence Minos acquired the empire of the sea, subduing some of the islands and colonizing others; at last he invaded Sicily, where he died near Camicus.
The Cretan institutions resemble the Lacedaemonian. The Helots are the husbandmen of the one, the Perioeci of the other, and both Cretans and Lacedaemonians have common meals, which were anciently called by the Lacedaemonians not ‘phiditia’ but ‘andria’; and the Cretans have the same word, the use of which proves that the common meals originally came from Crete. Further, the two constitutions are similar; for the office of the Ephors is the same as that of the Cretan Cosmi, the only difference being that whereas the Ephors are five, the Cosmi are ten in number. The elders, too, answer to the elders in Crete, who are termed by the Cretans the council. And the kingly office once existed in Crete, but was abolished, and the Cosmi have now the duty of leading them in war. All classes share in the ecclesia, but it can only ratify the decrees of the elders and the Cosmi.
The common meals of Crete are certainly better managed than the Lacedaemonian; for in Lacedaemon every one pays so much per head, or, if he fails, the law, as I have already explained, forbids him to exercise the rights of citizenship. But in Crete they are of a more popular character. There, of all the fruits of the earth and cattle raised on the public lands, and of the tribute which is paid by the Perioeci, one portion is assigned to the Gods and to the service of the state, and another to the common meals, so that men, women, and children are all supported out of a common stock. The legislator has many ingenious ways of securing moderation in eating, which he conceives to be a gain; he likewise encourages the separation of men from women, lest they should have too many children, and the companionship of men with one another — whether this is a good or bad thing I shall have an opportunity of considering at another time. But that the Cretan common meals are better ordered than the Lacedaemonian there can be no doubt.
On the other hand, the Cosmi are even a worse institution than the Ephors, of which they have all the evils without the good. Like the Ephors, they are any chance persons, but in Crete this is not counterbalanced by a corresponding political advantage. At Sparta every one is eligible, and the body of the people, having a share in the highest office, want the constitution to be permanent. But in Crete the Cosmi are elected out of certain families, and not out of the whole people, and the elders out of those who have been Cosmi.
The same criticism may be made about the Cretan, which has been already made about the Lacedaemonian elders. Their irresponsibility and life tenure is too great a privilege, and their arbitrary power of acting upon their own judgment, and dispensing with written law, is dangerous. It is no proof of the goodness of the institution that the people are not discontented at being excluded from it. For there is no profit to be made out of the office as out of the Ephoralty, since, unlike the Ephors, the Cosmi, being in an island, are removed from temptation.
The remedy by which they correct the evil of this institution is an extraordinary one, suited rather to a close oligarchy than to a constitutional state. For the Cosmi are often expelled by a conspiracy of their own colleagues, or of private individuals; and they are allowed also to resign before their term of office has expired. Surely all matters of this kind are better regulated by law than by the will of man, which is a very unsafe rule. Worst of all is the suspension of the office of Cosmi, a device to which the nobles often have recourse when they will not submit to justice. This shows that the Cretan government, although possessing some of the characteristics of a constitutional state, is really a close oligarchy.
The nobles have a habit, too, of setting up a chief; they get together a party among the common people and their own friends and then quarrel and fight with one another. What is this but the temporary destruction of the state and dissolution of society? A city is in a dangerous condition when those who are willing are also able to attack her. But, as I have already said, the island of Crete is saved by her situation; distance has the same effect as the Lacedaemonian prohibition of strangers; and the Cretans have no foreign dominions. This is the reason why the Perioeci are contented in Crete, whereas the Helots are perpetually revolting. But when lately foreign invaders found their way into the island, the weakness of the Cretan constitution was revealed. Enough of the government of Crete.
The Carthaginians are also considered to have an excellent form of government, which differs from that of any other state in several respects, though it is in some very like the Lacedaemonian. Indeed, all three states — the Lacedaemonian, the Cretan, and the Carthaginian — nearly resemble one another, and are very different from any others. Many of the Carthaginian institutions are excellent The superiority of their constitution is proved by the fact that the common people remain loyal to the constitution the Carthaginians have never had any rebellion worth speaking of, and have never been under the rule of a tyrant.
Among the points in which the Carthaginian constitution resembles the Lacedaemonian are the following: The common tables of the clubs answer to the Spartan phiditia, and their magistracy of the 104 to the Ephors; but, whereas the Ephors are any chance persons, the magistrates of the Carthaginians are elected according to merit — this is an improvement. They have also their kings and their gerusia, or council of elders, who correspond to the kings and elders of Sparta. Their kings, unlike the Spartan, are not always of the same family, nor that an ordinary one, but if there is some distinguished family they are selected out of it and not appointed by senority — this is far better. Such officers have great power, and therefore, if they are persons of little worth, do a great deal of harm, and they have already done harm at Lacedaemon.
Most of the defects or deviations from the perfect state, for which the Carthaginian constitution would be censured, apply equally to all the forms of government which we have mentioned. But of the deflections from aristocracy and constitutional government, some incline more to democracy and some to oligarchy. The kings and elders, if unanimous, may determine whether they will or will not bring a matter before the people, but when they are not unanimous, the people decide on such matters as well. And whatever the kings and elders bring before the people is not only heard but also determined by them, and any one who likes may oppose it; now this is not permitted in Sparta and Crete. That the magistrates of five who have under them many important matters should be co-opted, that they should choose the supreme council of 100, and should hold office longer than other magistrates (for they are virtually rulers both before and after they hold office)— these are oligarchical features; their being without salary and not elected by lot, and any similar points, such as the practice of having all suits tried by the magistrates, and not some by one class of judges or jurors and some by another, as at Lacedaemon, are characteristic of aristocracy. The Carthaginian constitution deviates from aristocracy and inclines to oligarchy, chiefly on a point where popular opinion is on their side. For men in general think that magistrates should be chosen not only for their merit, but for their wealth: a man, they say, who is poor cannot rule well — he has not the leisure. If, then, election of magistrates for their wealth be characteristic of oligarchy, and election for merit of aristocracy, there will be a third form under which the constitution of Carthage is comprehended; for the Carthaginians choose their magistrates, and particularly the highest of them — their kings and generals — with an eye both to merit and to wealth.
But we must acknowledge that, in thus deviating from aristocracy, the legislator has committed an error. Nothing is more absolutely necessary than to provide that the highest class, not only when in office, but when out of office, should have leisure and not disgrace themselves in any way; and to this his attention should be first directed. Even if you must have regard to wealth, in order to secure leisure, yet it is surely a bad thing that the greatest offices, such as those of kings and generals, should be bought. The law which allows this abuse makes wealth of more account than virtue, and the whole state becomes avaricious. For, whenever the chiefs of the state deem anything honorable, the other citizens are sure to follow their example; and, where virtue has not the first place, their aristocracy cannot be firmly established. Those who have been at the expense of purchasing their places will be in the habit of repaying themselves; and it is absurd to suppose that a poor and honest man will be wanting to make gains, and that a lower stamp of man who has incurred a great expense will not. Wherefore they should rule who are able to rule best. And even if the legislator does not care to protect the good from poverty, he should at any rate secure leisure for them when in office.
It would seem also to be a bad principle that the same person should hold many offices, which is a favorite practice among the Carthaginians, for one business is better done by one man. The legislator should see to this and should not appoint the same person to be a flute-player and a shoemaker. Hence, where the state is large, it is more in accordance both with constitutional and with democratic principles that the offices of state should be distributed among many persons. For, as I said, this arrangement is fairer to all, and any action familiarized by repetition is better and sooner performed. We have a proof in military and naval matters; the duties of command and of obedience in both these services extend to all.
The government of the Carthaginians is oligarchical, but they successfully escape the evils of oligarchy by enriching one portion of the people after another by sending them to their colonies. This is their panacea and the means by which they give stability to the state. Accident favors them, but the legislator should be able to provide against revolution without trusting to accidents. As things are, if any misfortune occurred, and the bulk of the subjects revolted, there would be no way of restoring peace by legal methods.
Such is the character of the Lacedaemonian, Cretan, and Carthaginian constitutions, which are justly celebrated.
Of those who have treated of governments, some have never taken any part at all in public affairs, but have passed their lives in a private station; about most of them, what was worth telling has been already told. Others have been lawgivers, either in their own or in foreign cities, whose affairs they have administered; and of these some have only made laws, others have framed constitutions; for example, Lycurgus and Solon did both. Of the Lacedaemonian constitution I have already spoken. As to Solon, he is thought by some to have been a good legislator, who put an end to the exclusiveness of the oligarchy, emancipated the people, established the ancient Athenian democracy, and harmonized the different elements of the state. According to their view, the council of Areopagus was an oligarchical element, the elected magistracy, aristocratical, and the courts of law, democratical. The truth seems to be that the council and the elected magistracy existed before the time of Solon, and were retained by him, but that he formed the courts of law out of an the citizens, thus creating the democracy, which is the very reason why he is sometimes blamed. For in giving the supreme power to the law courts, which are elected by lot, he is thought to have destroyed the non-democratic element. When the law courts grew powerful, to please the people who were now playing the tyrant the old constitution was changed into the existing democracy. Ephialtes and Pericles curtailed the power of the Areopagus; Pericles also instituted the payment of the juries, and thus every demagogue in turn increased the power of the democracy until it became what we now see. All this is true; it seems, however, to be the result of circumstances, and not to have been intended by Solon. For the people, having been instrumental in gaining the empire of the sea in the Persian War, began to get a notion of itself, and followed worthless demagogues, whom the better class opposed. Solon, himself, appears to have given the Athenians only that power of electing to offices and calling to account the magistrates which was absolutely necessary; for without it they would have been in a state of slavery and enmity to the government. All the magistrates he appointed from the notables and the men of wealth, that is to say, from the pentacosio-medimni, or from the class called zeugitae, or from a third class of so-called knights or cavalry. The fourth class were laborers who had no share in any magistracy.
Mere legislators were Zaleucus, who gave laws to the Epizephyrian Locrians, and Charondas, who legislated for his own city of Catana, and for the other Chalcidian cities in Italy and Sicily. Some people attempt to make out that Onomacritus was the first person who had any special skill in legislation, and that he, although a Locrian by birth, was trained in Crete, where he lived in the exercise of his prophetic art; that Thales was his companion, and that Lycurgus and Zaleucus were disciples of Thales, as Charondas was of Zaleucus. But their account is quite inconsistent with chronology.
There was also Philolaus, the Corinthian, who gave laws to the Thebans. This Philolaus was one of the family of the Bacchiadae, and a lover of Diocles, the Olympic victor, who left Corinth in horror of the incestuous passion which his mother Halcyone had conceived for him, and retired to Thebes, where the two friends together ended their days. The inhabitants still point out their tombs, which are in full view of one another, but one is visible from the Corinthian territory, the other not. Tradition says the two friends arranged them thus, Diocles out of horror at his misfortunes, so that the land of Corinth might not be visible from his tomb; Philolaus that it might. This is the reason why they settled at Thebes, and so Philolaus legislated for the Thebans, and, besides some other enactments, gave them laws about the procreation of children, which they call the ‘Laws of Adoption.’ These laws were peculiar to him, and were intended to preserve the number of the lots.
In the legislation of Charondas there is nothing remarkable, except the suits against false witnesses. He is the first who instituted denunciation for perjury. His laws are more exact and more precisely expressed than even those of our modern legislators.
(Characteristic of Phaleas is the equalization of property; of Plato, the community of women, children, and property, the common meals of women, and the law about drinking, that the sober shall be masters of the feast; also the training of soldiers to acquire by practice equal skill with both hands, so that one should be as useful as the other.)
Draco has left laws, but he adapted them to a constitution which already existed, and there is no peculiarity in them which is worth mentioning, except the greatness and severity of the punishments.
Pittacus, too, was only a lawgiver, and not the author of a constitution; he has a law which is peculiar to him, that, if a drunken man do something wrong, he shall be more heavily punished than if he were sober; he looked not to the excuse which might be offered for the drunkard, but only to expediency, for drunken more often than sober people commit acts of violence.
Androdamas of Rhegium gave laws to the Chalcidians of Thrace. Some of them relate to homicide, and to heiresses; but there is nothing remarkable in them.
And here let us conclude our inquiry into the various constitutions which either actually exist, or have been devised by theorists.
Do not change the titles of the tiddlers provided with this ~TiddyWiki. If you do, you will experience problems with navigation.
The tiddlers provided with this ~TiddlyWiki are tagged with "preserve title" to remind you not to change their titles, but the software will not prevent you from changing them.
!!Translated by Benjamin Jowett
[[scanned version|https://archive.org/stream/politicsaristot05arisgoog#page/n12/mode/2up]]
[[Book One|Jowett: Book One]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|Jowett: Book One: Chapter I]]
* [[Chapter II|Jowett: Book One: Chapter II]]
* [[Chapter III|Jowett: Book One: Chapter III]]
* [[Chapter IV|Jowett: Book One: Chapter IV]]
* [[Chapter V|Jowett: Book One: Chapter V]]
* [[Chapter VI|Jowett: Book One: Chapter VI]]
* [[Chapter VII|Jowett: Book One: Chapter VII]]
* [[Chapter VIII|Jowett: Book One: Chapter VIII]]
* [[Chapter IX|Jowett: Book One: Chapter IX]]
* [[Chapter X|Jowett: Book One: Chapter X]]
* [[Chapter XI|Jowett: Book One: Chapter XI]]
* [[Chapter XII|Jowett: Book One: Chapter XII]]
* [[Chapter XIII|Jowett: Book One: Chapter XIII]]
@@
[[Book Two|Jowett: Book Two]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|Jowett: Book Two: Chapter I]]
* [[Chapter II|Jowett: Book Two: Chapter II]]
* [[Chapter III|Jowett: Book Two: Chapter III]]
* [[Chapter IV|Jowett: Book Two: Chapter IV]]
* [[Chapter V|Jowett: Book Two: Chapter V]]
* [[Chapter VI|Jowett: Book Two: Chapter VI]]
* [[Chapter VII|Jowett: Book Two: Chapter VII]]
* [[Chapter VIII|Jowett: Book Two: Chapter VIII]]
* [[Chapter IX|Jowett: Book Two: Chapter IX]]
* [[Chapter X|Jowett: Book Two: Chapter X]]
* [[Chapter XI|Jowett: Book Two: Chapter XI]]
* [[Chapter XII|Jowett: Book Two: Chapter XII]]
@@
[[Book Three|Jowett: Book Three]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|Jowett: Book Three: Chapter I]]
* [[Chapter II|Jowett: Book Three: Chapter II]]
* [[Chapter III|Jowett: Book Three: Chapter III]]
* [[Chapter IV|Jowett: Book Three: Chapter IV]]
* [[Chapter V|Jowett: Book Three: Chapter V]]
* [[Chapter VI|Jowett: Book Three: Chapter VI]]
* [[Chapter VII|Jowett: Book Three: Chapter VII]]
* [[Chapter VIII|Jowett: Book Three: Chapter VIII]]
* [[Chapter IX|Jowett: Book Three: Chapter IX]]
* [[Chapter X|Jowett: Book Three: Chapter X]]
* [[Chapter XI|Jowett: Book Three: Chapter XI]]
* [[Chapter XII|Jowett: Book Three: Chapter XII]]
* [[Chapter XIII|Jowett: Book Three: Chapter XIII]]
* [[Chapter XIV|Jowett: Book Three: Chapter XIV]]
* [[Chapter XV|Jowett: Book Three: Chapter XV]]
* [[Chapter XVI|Jowett: Book Three: Chapter XVI]]
* [[Chapter XVII|Jowett: Book Three: Chapter XVII]]
* [[Chapter XVIII|Jowett: Book Three: Chapter XVIII]]
@@
[[Book Four|Jowett: Book Four]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|Jowett: Book Four: Chapter I]]
* [[Chapter II|Jowett: Book Four: Chapter II]]
* [[Chapter III|Jowett: Book Four: Chapter III]]
* [[Chapter IV|Jowett: Book Four: Chapter IV]]
* [[Chapter V|Jowett: Book Four: Chapter V]]
* [[Chapter VI|Jowett: Book Four: Chapter VI]]
* [[Chapter VII|Jowett: Book Four: Chapter VII]]
* [[Chapter VIII|Jowett: Book Four: Chapter VIII]]
* [[Chapter IX|Jowett: Book Four: Chapter IX]]
* [[Chapter X|Jowett: Book Four: Chapter X]]
* [[Chapter XI|Jowett: Book Four: Chapter XI]]
* [[Chapter XII|Jowett: Book Four: Chapter XII]]
* [[Chapter XIII|Jowett: Book Four: Chapter XIII]]
* [[Chapter XIV|Jowett: Book Four: Chapter XIV]]
* [[Chapter XV|Jowett: Book Four: Chapter XV]]
* [[Chapter XVI|Jowett: Book Four: Chapter XVI]]
@@
[[Book Five|Jowett: Book Five]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|Jowett: Book Five: Chapter I]]
* [[Chapter II|Jowett: Book Five: Chapter II]]
* [[Chapter III|Jowett: Book Five: Chapter III]]
* [[Chapter IV|Jowett: Book Five: Chapter IV]]
* [[Chapter V|Jowett: Book Five: Chapter V]]
* [[Chapter VI|Jowett: Book Five: Chapter VI]]
* [[Chapter VII|Jowett: Book Five: Chapter VII]]
* [[Chapter VIII|Jowett: Book Five: Chapter VIII]]
* [[Chapter IX|Jowett: Book Five: Chapter IX]]
* [[Chapter X|Jowett: Book Five: Chapter X]]
* [[Chapter XI|Jowett: Book Five: Chapter XI]]
* [[Chapter XII|Jowett: Book Five: Chapter XII]]
@@
[[Book Six|Jowett: Book Six]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|Jowett: Book Six: Chapter I]]
* [[Chapter II|Jowett: Book Six: Chapter II]]
* [[Chapter III|Jowett: Book Six: Chapter III]]
* [[Chapter IV|Jowett: Book Six: Chapter IV]]
* [[Chapter V|Jowett: Book Six: Chapter V]]
* [[Chapter VI|Jowett: Book Six: Chapter VI]]
* [[Chapter VII|Jowett: Book Six: Chapter VII]]
* [[Chapter VIII|Jowett: Book Six: Chapter VIII]]
@@
[[Book Seven|Jowett: Book Seven]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|Jowett: Book Seven: Chapter I]]
* [[Chapter II|Jowett: Book Seven: Chapter II]]
* [[Chapter III|Jowett: Book Seven: Chapter III]]
* [[Chapter IV|Jowett: Book Seven: Chapter IV]]
* [[Chapter V|Jowett: Book Seven: Chapter V]]
* [[Chapter VI|Jowett: Book Seven: Chapter VI]]
* [[Chapter VII|Jowett: Book Seven: Chapter VII]]
* [[Chapter VIII|Jowett: Book Seven: Chapter VIII]]
* [[Chapter IX|Jowett: Book Seven: Chapter IX]]
* [[Chapter X|Jowett: Book Seven: Chapter X]]
* [[Chapter XI|Jowett: Book Seven: Chapter XI]]
* [[Chapter XII|Jowett: Book Seven: Chapter XII]]
* [[Chapter XIII|Jowett: Book Seven: Chapter XIII]]
* [[Chapter XIV|Jowett: Book Seven: Chapter XIV]]
* [[Chapter XV|Jowett: Book Seven: Chapter XV]]
* [[Chapter XVI|Jowett: Book Seven: Chapter XVI]]
* [[Chapter XVII|Jowett: Book Seven: Chapter XVII]]
@@
[[Book Eight|Jowett: Book Eight]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|Jowett: Book Eight: Chapter I]]
* [[Chapter II|Jowett: Book Eight: Chapter II]]
* [[Chapter III|Jowett: Book Eight: Chapter III]]
* [[Chapter IV|Jowett: Book Eight: Chapter IV]]
* [[Chapter V|Jowett: Book Eight: Chapter V]]
* [[Chapter VI|Jowett: Book Eight: Chapter VI]]
* [[Chapter VII|Jowett: Book Eight: Chapter VII]]
@@
---
!!Translated by William Ellis.
"""
Published By J M Dent & Sons Ltd. in London and Toronto
Published by E. P. Dutton & Co in New York
First Issue Of This Edition: 1912
Reprinted: 1919, 1923, 1928
"""
[[Introduction|ELLIS: INTRODUCTION]]
[[Book I|ELLIS: BOOK I]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|ELLIS: BOOK I: CHAPTER I]]
* [[Chapter II|ELLIS: BOOK I: CHAPTER II]]
* [[Chapter III|ELLIS: BOOK I: CHAPTER III]]
* [[Chapter IV|ELLIS: BOOK I: CHAPTER IV]]
* [[Chapter V|ELLIS: BOOK I: CHAPTER V]]
* [[Chapter VI|ELLIS: BOOK I: CHAPTER VI]]
* [[Chapter VII|ELLIS: BOOK I: CHAPTER VII]]
* [[Chapter VIII|ELLIS: BOOK I: CHAPTER VIII]]
* [[Chapter IX|ELLIS: BOOK I: CHAPTER IX]]
* [[Chapter X|ELLIS: BOOK I: CHAPTER X]]
* [[Chapter XI|ELLIS: BOOK I: CHAPTER XI]]
* [[Chapter XII|ELLIS: BOOK I: CHAPTER XII]]
* [[Chapter XIII|ELLIS: BOOK I: CHAPTER XIII]]
@@
[[Book II|ELLIS: BOOK II]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|ELLIS: BOOK II: CHAPTER I]]
* [[Chapter II|ELLIS: BOOK II: CHAPTER II]]
* [[Chapter III|ELLIS: BOOK II: CHAPTER III]]
* [[Chapter IV|ELLIS: BOOK II: CHAPTER IV]]
* [[Chapter V|ELLIS: BOOK II: CHAPTER V]]
* [[Chapter VI|ELLIS: BOOK II: CHAPTER VI]]
* [[Chapter VII|ELLIS: BOOK II: CHAPTER VII]]
* [[Chapter VIII|ELLIS: BOOK II: CHAPTER VIII]]
* [[Chapter IX|ELLIS: BOOK II: CHAPTER IX]]
* [[Chapter X|ELLIS: BOOK II: CHAPTER X]]
* [[Chapter XI|ELLIS: BOOK II: CHAPTER XI]]
* [[Chapter XII|ELLIS: BOOK II: CHAPTER XII]]
@@
[[Book III|ELLIS: BOOK III]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|ELLIS: BOOK III: CHAPTER I]]
* [[Chapter II|ELLIS: BOOK III: CHAPTER II]]
* [[Chapter III|ELLIS: BOOK III: CHAPTER III]]
* [[Chapter IV|ELLIS: BOOK III: CHAPTER IV]]
* [[Chapter V|ELLIS: BOOK III: CHAPTER V]]
* [[Chapter VI|ELLIS: BOOK III: CHAPTER VI]]
* [[Chapter VII|ELLIS: BOOK III: CHAPTER VII]]
* [[Chapter VIII|ELLIS: BOOK III: CHAPTER VIII]]
* [[Chapter IX|ELLIS: BOOK III: CHAPTER IX]]
* [[Chapter X|ELLIS: BOOK III: CHAPTER X]]
* [[Chapter XI|ELLIS: BOOK III: CHAPTER XI]]
* [[Chapter XII|ELLIS: BOOK III: CHAPTER XII]]
* [[Chapter XIII|ELLIS: BOOK III: CHAPTER XIII]]
* [[Chapter XIV|ELLIS: BOOK III: CHAPTER XIV]]
* [[Chapter XV|ELLIS: BOOK III: CHAPTER XV]]
* [[Chapter XVI|ELLIS: BOOK III: CHAPTER XVI]]
* [[Chapter XVII|ELLIS: BOOK III: CHAPTER XVII]]
* [[Chapter XVIII|ELLIS: BOOK III: CHAPTER XVIII]]
@@
[[Book IV|ELLIS: BOOK IV]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|ELLIS: BOOK IV: CHAPTER I]]
* [[Chapter II|ELLIS: BOOK IV: CHAPTER II]]
* [[Chapter III|ELLIS: BOOK IV: CHAPTER III]]
* [[Chapter IV|ELLIS: BOOK IV: CHAPTER IV]]
* [[Chapter V|ELLIS: BOOK IV: CHAPTER V]]
* [[Chapter VI|ELLIS: BOOK IV: CHAPTER VI]]
* [[Chapter VII|ELLIS: BOOK IV: CHAPTER VII]]
* [[Chapter VIII|ELLIS: BOOK IV: CHAPTER VIII]]
* [[Chapter IX|ELLIS: BOOK IV: CHAPTER IX]]
* [[Chapter X|ELLIS: BOOK IV: CHAPTER X]]
* [[Chapter XI|ELLIS: BOOK IV: CHAPTER XI]]
* [[Chapter XII|ELLIS: BOOK IV: CHAPTER XII]]
* [[Chapter XIII|ELLIS: BOOK IV: CHAPTER XIII]]
* [[Chapter XIV|ELLIS: BOOK IV: CHAPTER XIV]]
* [[Chapter XV|ELLIS: BOOK IV: CHAPTER XV]]
* [[Chapter XVI|ELLIS: BOOK IV: CHAPTER XVI]]
@@
[[Book V|ELLIS: BOOK V]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|ELLIS: BOOK V: CHAPTER I]]
* [[Chapter II|ELLIS: BOOK V: CHAPTER II]]
* [[Chapter III|ELLIS: BOOK V: CHAPTER III]]
* [[Chapter IV|ELLIS: BOOK V: CHAPTER IV]]
* [[Chapter V|ELLIS: BOOK V: CHAPTER V]]
* [[Chapter VI|ELLIS: BOOK V: CHAPTER VI]]
* [[Chapter VII|ELLIS: BOOK V: CHAPTER VII]]
* [[Chapter VIII|ELLIS: BOOK V: CHAPTER VIII]]
* [[Chapter IX|ELLIS: BOOK V: CHAPTER IX]]
* [[Chapter X|ELLIS: BOOK V: CHAPTER X]]
* [[Chapter XI|ELLIS: BOOK V: CHAPTER XI]]
* [[Chapter XII|ELLIS: BOOK V: CHAPTER XII]]
@@
[[Book VI|ELLIS: BOOK VI]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|ELLIS: BOOK VI: CHAPTER I]]
* [[Chapter II|ELLIS: BOOK VI: CHAPTER II]]
* [[Chapter III|ELLIS: BOOK VI: CHAPTER III]]
* [[Chapter IV|ELLIS: BOOK VI: CHAPTER IV]]
* [[Chapter V|ELLIS: BOOK VI: CHAPTER V]]
* [[Chapter VI|ELLIS: BOOK VI: CHAPTER VI]]
* [[Chapter VII|ELLIS: BOOK VI: CHAPTER VII]]
* [[Chapter VIII|ELLIS: BOOK VI: CHAPTER VIII]]
@@
[[Book VII|ELLIS: BOOK VII]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|ELLIS: BOOK VII: CHAPTER I]]
* [[Chapter II|ELLIS: BOOK VII: CHAPTER II]]
* [[Chapter III|ELLIS: BOOK VII: CHAPTER III]]
* [[Chapter IV|ELLIS: BOOK VII: CHAPTER IV]]
* [[Chapter V|ELLIS: BOOK VII: CHAPTER V]]
* [[Chapter VI|ELLIS: BOOK VII: CHAPTER VI]]
* [[Chapter VII|ELLIS: BOOK VII: CHAPTER VII]]
* [[Chapter VIII|ELLIS: BOOK VII: CHAPTER VIII]]
* [[Chapter IX|ELLIS: BOOK VII: CHAPTER IX]]
* [[Chapter X|ELLIS: BOOK VII: CHAPTER X]]
* [[Chapter XI|ELLIS: BOOK VII: CHAPTER XI]]
* [[Chapter XII|ELLIS: BOOK VII: CHAPTER XII]]
* [[Chapter XIII|ELLIS: BOOK VII: CHAPTER XIII]]
* [[Chapter XIV|ELLIS: BOOK VII: CHAPTER XIV]]
* [[Chapter XV|ELLIS: BOOK VII: CHAPTER XV]]
* [[Chapter XVI|ELLIS: BOOK VII: CHAPTER XVI]]
* [[Chapter XVII|ELLIS: BOOK VII: CHAPTER XVII]]
@@
[[Book VIII|ELLIS: BOOK VIII]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[Chapter I|ELLIS: BOOK VIII: CHAPTER I]]
* [[Chapter II|ELLIS: BOOK VIII: CHAPTER II]]
* [[Chapter III|ELLIS: BOOK VIII: CHAPTER III]]
* [[Chapter IV|ELLIS: BOOK VIII: CHAPTER IV]]
* [[Chapter V|ELLIS: BOOK VIII: CHAPTER V]]
* [[Chapter VI|ELLIS: BOOK VIII: CHAPTER VI]]
* [[Chapter VII|ELLIS: BOOK VIII: CHAPTER VII]]
@@
[[Bibliography|ELLIS: BIBLIOGRAPHY]]
---
!!Translated by H. Rackham
//The text for this translation was obtained from the [[Perseus Digital Library|http://www.perseus.tufts.edu/hopper/]] at [[Tufts University|https://www.tufts.edu/]]. It is licensed under a [[Creative Commons Attribution-ShareAlike 3.0 United States License|http://creativecommons.org/licenses/by-sa/3.0/us/]].//
[[Book: 1|Rackham: Book: 1]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[1252a|Rackham: Book: 1, Section: 1252a]]
* [[1252b|Rackham: Book: 1, Section: 1252b]]
* [[1253a|Rackham: Book: 1, Section: 1253a]]
* [[1253b|Rackham: Book: 1, Section: 1253b]]
* [[1254a|Rackham: Book: 1, Section: 1254a]]
* [[1254b|Rackham: Book: 1, Section: 1254b]]
* [[1255a|Rackham: Book: 1, Section: 1255a]]
* [[1255b|Rackham: Book: 1, Section: 1255b]]
* [[1256a|Rackham: Book: 1, Section: 1256a]]
* [[1256b|Rackham: Book: 1, Section: 1256b]]
* [[1257a|Rackham: Book: 1, Section: 1257a]]
* [[1257b|Rackham: Book: 1, Section: 1257b]]
* [[1258a|Rackham: Book: 1, Section: 1258a]]
* [[1258b|Rackham: Book: 1, Section: 1258b]]
* [[1259a|Rackham: Book: 1, Section: 1259a]]
* [[1259b|Rackham: Book: 1, Section: 1259b]]
* [[1260a|Rackham: Book: 1, Section: 1260a]]
* [[1260b|Rackham: Book: 1, Section: 1260b]]
@@
[[Book: 2|Rackham: Book: 2]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[1260b|Rackham: Book: 2, Section: 1260b]]
* [[1261a|Rackham: Book: 2, Section: 1261a]]
* [[1261b|Rackham: Book: 2, Section: 1261b]]
* [[1262a|Rackham: Book: 2, Section: 1262a]]
* [[1262b|Rackham: Book: 2, Section: 1262b]]
* [[1263a|Rackham: Book: 2, Section: 1263a]]
* [[1263b|Rackham: Book: 2, Section: 1263b]]
* [[1264a|Rackham: Book: 2, Section: 1264a]]
* [[1264b|Rackham: Book: 2, Section: 1264b]]
* [[1265a|Rackham: Book: 2, Section: 1265a]]
* [[1265b|Rackham: Book: 2, Section: 1265b]]
* [[1266a|Rackham: Book: 2, Section: 1266a]]
* [[1266b|Rackham: Book: 2, Section: 1266b]]
* [[1267a|Rackham: Book: 2, Section: 1267a]]
* [[1267b|Rackham: Book: 2, Section: 1267b]]
* [[1268a|Rackham: Book: 2, Section: 1268a]]
* [[1268b|Rackham: Book: 2, Section: 1268b]]
* [[1269a|Rackham: Book: 2, Section: 1269a]]
* [[1269b|Rackham: Book: 2, Section: 1269b]]
* [[1270a|Rackham: Book: 2, Section: 1270a]]
* [[1270b|Rackham: Book: 2, Section: 1270b]]
* [[1271a|Rackham: Book: 2, Section: 1271a]]
* [[1271b|Rackham: Book: 2, Section: 1271b]]
* [[1272a|Rackham: Book: 2, Section: 1272a]]
* [[1272b|Rackham: Book: 2, Section: 1272b]]
* [[1273a|Rackham: Book: 2, Section: 1273a]]
* [[1273b|Rackham: Book: 2, Section: 1273b]]
* [[1274a|Rackham: Book: 2, Section: 1274a]]
* [[1274b|Rackham: Book: 2, Section: 1274b]]
@@
[[Book: 3|Rackham: Book: 3]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[1274b|Rackham: Book: 3, Section: 1274b]]
* [[1275a|Rackham: Book: 3, Section: 1275a]]
* [[1275b|Rackham: Book: 3, Section: 1275b]]
* [[1276a|Rackham: Book: 3, Section: 1276a]]
* [[1276b|Rackham: Book: 3, Section: 1276b]]
* [[1277a|Rackham: Book: 3, Section: 1277a]]
* [[1277b|Rackham: Book: 3, Section: 1277b]]
* [[1278a|Rackham: Book: 3, Section: 1278a]]
* [[1278b|Rackham: Book: 3, Section: 1278b]]
* [[1279a|Rackham: Book: 3, Section: 1279a]]
* [[1279b|Rackham: Book: 3, Section: 1279b]]
* [[1280a|Rackham: Book: 3, Section: 1280a]]
* [[1280b|Rackham: Book: 3, Section: 1280b]]
* [[1281a|Rackham: Book: 3, Section: 1281a]]
* [[1281b|Rackham: Book: 3, Section: 1281b]]
* [[1282a|Rackham: Book: 3, Section: 1282a]]
* [[1282b|Rackham: Book: 3, Section: 1282b]]
* [[1283a|Rackham: Book: 3, Section: 1283a]]
* [[1283b|Rackham: Book: 3, Section: 1283b]]
* [[1284a|Rackham: Book: 3, Section: 1284a]]
* [[1284b|Rackham: Book: 3, Section: 1284b]]
* [[1285a|Rackham: Book: 3, Section: 1285a]]
* [[1285b|Rackham: Book: 3, Section: 1285b]]
* [[1286a|Rackham: Book: 3, Section: 1286a]]
* [[1286b|Rackham: Book: 3, Section: 1286b]]
* [[1287a|Rackham: Book: 3, Section: 1287a]]
* [[1287b|Rackham: Book: 3, Section: 1287b]]
* [[1288a|Rackham: Book: 3, Section: 1288a]]
* [[1288b|Rackham: Book: 3, Section: 1288b]]
@@
[[Book: 4|Rackham: Book: 4]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[1288b|Rackham: Book: 4, Section: 1288b]]
* [[1289a|Rackham: Book: 4, Section: 1289a]]
* [[1289b|Rackham: Book: 4, Section: 1289b]]
* [[1290a|Rackham: Book: 4, Section: 1290a]]
* [[1290b|Rackham: Book: 4, Section: 1290b]]
* [[1291a|Rackham: Book: 4, Section: 1291a]]
* [[1291b|Rackham: Book: 4, Section: 1291b]]
* [[1292a|Rackham: Book: 4, Section: 1292a]]
* [[1292b|Rackham: Book: 4, Section: 1292b]]
* [[1293a|Rackham: Book: 4, Section: 1293a]]
* [[1293b|Rackham: Book: 4, Section: 1293b]]
* [[1294a|Rackham: Book: 4, Section: 1294a]]
* [[1294b|Rackham: Book: 4, Section: 1294b]]
* [[1295a|Rackham: Book: 4, Section: 1295a]]
* [[1295b|Rackham: Book: 4, Section: 1295b]]
* [[1296a|Rackham: Book: 4, Section: 1296a]]
* [[1296b|Rackham: Book: 4, Section: 1296b]]
* [[1297a|Rackham: Book: 4, Section: 1297a]]
* [[1297b|Rackham: Book: 4, Section: 1297b]]
* [[1298a|Rackham: Book: 4, Section: 1298a]]
* [[1298b|Rackham: Book: 4, Section: 1298b]]
* [[1299a|Rackham: Book: 4, Section: 1299a]]
* [[1299b|Rackham: Book: 4, Section: 1299b]]
* [[1300a|Rackham: Book: 4, Section: 1300a]]
* [[1300b|Rackham: Book: 4, Section: 1300b]]
* [[1301a|Rackham: Book: 4, Section: 1301a]]
@@
[[Book: 5|Rackham: Book: 5]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[1301a|Rackham: Book: 5, Section: 1301a]]
* [[1301b|Rackham: Book: 5, Section: 1301b]]
* [[1302a|Rackham: Book: 5, Section: 1302a]]
* [[1302b|Rackham: Book: 5, Section: 1302b]]
* [[1303a|Rackham: Book: 5, Section: 1303a]]
* [[1303b|Rackham: Book: 5, Section: 1303b]]
* [[1304a|Rackham: Book: 5, Section: 1304a]]
* [[1304b|Rackham: Book: 5, Section: 1304b]]
* [[1305a|Rackham: Book: 5, Section: 1305a]]
* [[1305b|Rackham: Book: 5, Section: 1305b]]
* [[1306a|Rackham: Book: 5, Section: 1306a]]
* [[1306b|Rackham: Book: 5, Section: 1306b]]
* [[1307a|Rackham: Book: 5, Section: 1307a]]
* [[1307b|Rackham: Book: 5, Section: 1307b]]
* [[1308a|Rackham: Book: 5, Section: 1308a]]
* [[1308b|Rackham: Book: 5, Section: 1308b]]
* [[1309a|Rackham: Book: 5, Section: 1309a]]
* [[1309b|Rackham: Book: 5, Section: 1309b]]
* [[1310a|Rackham: Book: 5, Section: 1310a]]
* [[1310b|Rackham: Book: 5, Section: 1310b]]
* [[1311a|Rackham: Book: 5, Section: 1311a]]
* [[1311b|Rackham: Book: 5, Section: 1311b]]
* [[1312a|Rackham: Book: 5, Section: 1312a]]
* [[1312b|Rackham: Book: 5, Section: 1312b]]
* [[1313a|Rackham: Book: 5, Section: 1313a]]
* [[1313b|Rackham: Book: 5, Section: 1313b]]
* [[1314a|Rackham: Book: 5, Section: 1314a]]
* [[1314b|Rackham: Book: 5, Section: 1314b]]
* [[1315a|Rackham: Book: 5, Section: 1315a]]
* [[1315b|Rackham: Book: 5, Section: 1315b]]
* [[1316a|Rackham: Book: 5, Section: 1316a]]
* [[1316b|Rackham: Book: 5, Section: 1316b]]
@@
[[Book: 6|Rackham: Book: 6]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[1316b|Rackham: Book: 6, Section: 1316b]]
* [[1317a|Rackham: Book: 6, Section: 1317a]]
* [[1317b|Rackham: Book: 6, Section: 1317b]]
* [[1318a|Rackham: Book: 6, Section: 1318a]]
* [[1318b|Rackham: Book: 6, Section: 1318b]]
* [[1319a|Rackham: Book: 6, Section: 1319a]]
* [[1319b|Rackham: Book: 6, Section: 1319b]]
* [[1320a|Rackham: Book: 6, Section: 1320a]]
* [[1320b|Rackham: Book: 6, Section: 1320b]]
* [[1321a|Rackham: Book: 6, Section: 1321a]]
* [[1321b|Rackham: Book: 6, Section: 1321b]]
* [[1322a|Rackham: Book: 6, Section: 1322a]]
* [[1322b|Rackham: Book: 6, Section: 1322b]]
* [[1323a|Rackham: Book: 6, Section: 1323a]]
@@
[[Book: 7|Rackham: Book: 7]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[1323a|Rackham: Book: 7, Section: 1323a]]
* [[1323b|Rackham: Book: 7, Section: 1323b]]
* [[1324a|Rackham: Book: 7, Section: 1324a]]
* [[1324b|Rackham: Book: 7, Section: 1324b]]
* [[1325a|Rackham: Book: 7, Section: 1325a]]
* [[1325b|Rackham: Book: 7, Section: 1325b]]
* [[1326a|Rackham: Book: 7, Section: 1326a]]
* [[1326b|Rackham: Book: 7, Section: 1326b]]
* [[1327a|Rackham: Book: 7, Section: 1327a]]
* [[1327b|Rackham: Book: 7, Section: 1327b]]
* [[1328a|Rackham: Book: 7, Section: 1328a]]
* [[1328b|Rackham: Book: 7, Section: 1328b]]
* [[1329a|Rackham: Book: 7, Section: 1329a]]
* [[1329b|Rackham: Book: 7, Section: 1329b]]
* [[1330a|Rackham: Book: 7, Section: 1330a]]
* [[1330b|Rackham: Book: 7, Section: 1330b]]
* [[1331a|Rackham: Book: 7, Section: 1331a]]
* [[1331b|Rackham: Book: 7, Section: 1331b]]
* [[1332a|Rackham: Book: 7, Section: 1332a]]
* [[1332b|Rackham: Book: 7, Section: 1332b]]
* [[1333a|Rackham: Book: 7, Section: 1333a]]
* [[1333b|Rackham: Book: 7, Section: 1333b]]
* [[1334a|Rackham: Book: 7, Section: 1334a]]
* [[1334b|Rackham: Book: 7, Section: 1334b]]
* [[1335a|Rackham: Book: 7, Section: 1335a]]
* [[1335b|Rackham: Book: 7, Section: 1335b]]
* [[1336a|Rackham: Book: 7, Section: 1336a]]
* [[1336b|Rackham: Book: 7, Section: 1336b]]
* [[1337a|Rackham: Book: 7, Section: 1337a]]
@@
[[Book: 8|Rackham: Book: 8]]
@@list-style-type:none;columns:2;-webkit-columns:2;-moz-columns:2;
* [[1337a|Rackham: Book: 8, Section: 1337a]]
* [[1337b|Rackham: Book: 8, Section: 1337b]]
* [[1338a|Rackham: Book: 8, Section: 1338a]]
* [[1338b|Rackham: Book: 8, Section: 1338b]]
* [[1339a|Rackham: Book: 8, Section: 1339a]]
* [[1339b|Rackham: Book: 8, Section: 1339b]]
* [[1340a|Rackham: Book: 8, Section: 1340a]]
* [[1340b|Rackham: Book: 8, Section: 1340b]]
* [[1341a|Rackham: Book: 8, Section: 1341a]]
* [[1341b|Rackham: Book: 8, Section: 1341b]]
* [[1342a|Rackham: Book: 8, Section: 1342a]]
* [[1342b|Rackham: Book: 8, Section: 1342b]]
@@
---
!!![[Section: 1252a|Rackham: Book: 1, Section: 1252a]]
{{Rackham: Book: 1, Section: 1252a}}
---
!!![[Section: 1252b|Rackham: Book: 1, Section: 1252b]]
{{Rackham: Book: 1, Section: 1252b}}
---
!!![[Section: 1253a|Rackham: Book: 1, Section: 1253a]]
{{Rackham: Book: 1, Section: 1253a}}
---
!!![[Section: 1253b|Rackham: Book: 1, Section: 1253b]]
{{Rackham: Book: 1, Section: 1253b}}
---
!!![[Section: 1254a|Rackham: Book: 1, Section: 1254a]]
{{Rackham: Book: 1, Section: 1254a}}
---
!!![[Section: 1254b|Rackham: Book: 1, Section: 1254b]]
{{Rackham: Book: 1, Section: 1254b}}
---
!!![[Section: 1255a|Rackham: Book: 1, Section: 1255a]]
{{Rackham: Book: 1, Section: 1255a}}
---
!!![[Section: 1255b|Rackham: Book: 1, Section: 1255b]]
{{Rackham: Book: 1, Section: 1255b}}
---
!!![[Section: 1256a|Rackham: Book: 1, Section: 1256a]]
{{Rackham: Book: 1, Section: 1256a}}
---
!!![[Section: 1256b|Rackham: Book: 1, Section: 1256b]]
{{Rackham: Book: 1, Section: 1256b}}
---
!!![[Section: 1257a|Rackham: Book: 1, Section: 1257a]]
{{Rackham: Book: 1, Section: 1257a}}
---
!!![[Section: 1257b|Rackham: Book: 1, Section: 1257b]]
{{Rackham: Book: 1, Section: 1257b}}
---
!!![[Section: 1258a|Rackham: Book: 1, Section: 1258a]]
{{Rackham: Book: 1, Section: 1258a}}
---
!!![[Section: 1258b|Rackham: Book: 1, Section: 1258b]]
{{Rackham: Book: 1, Section: 1258b}}
---
!!![[Section: 1259a|Rackham: Book: 1, Section: 1259a]]
{{Rackham: Book: 1, Section: 1259a}}
---
!!![[Section: 1259b|Rackham: Book: 1, Section: 1259b]]
{{Rackham: Book: 1, Section: 1259b}}
---
!!![[Section: 1260a|Rackham: Book: 1, Section: 1260a]]
{{Rackham: Book: 1, Section: 1260a}}
---
!!![[Section: 1260b|Rackham: Book: 1, Section: 1260b]]
{{Rackham: Book: 1, Section: 1260b}}
Every state is as we see a sort of partnership,^^[[1|Rackham: Book: 1, Section: 1252a, Note: 1]]^^ and every partnership is formed with a view to some good (since all the actions of all mankind are done with a view to what they think to be good). It is therefore evident that, while all partnerships aim at some good the partnership that is the most supreme of all and includes all the others does so most of all, and aims at the most supreme of all goods; and this is the partnership entitled the state, the political association. Those then who think that the natures of the statesman, the royal ruler, the head of an estate^^[[2|Rackham: Book: 1, Section: 1252a, Note: 2]]^^ and the master of a family are the same, are mistaken (they imagine that the difference between these various forms of authority is one of greater and smaller numbers, not a difference in the kind—that is, that the ruler over a few people is a master, over more the head of an estate, over more still a statesman or royal ruler, as if there were no difference between a large household and a small city; and also as to the statesman and the royal ruler, they think that one who governs as sole head is royal, and one who, while the government follows the principles of the science of royalty, takes turns to govern and be governed is a statesman; but these views are not true). And a proof that these people are mistaken will appear if we examine the question in accordance with our regular method of investigation. In every other matter it is necessary to analyze the composite whole down to its uncompounded elements (for these are the smallest parts of the whole); so too with the state, by examining the elements of which it is composed we shall better discern in relation to these different kinds of rulers what is the difference between them, and whether it is possible to obtain any scientific precision in regard to the various statements made above.
In this subject as in others the best method of investigation is to study things in the process of development from the beginning. The first coupling together of persons then to which necessity gives rise is that between those who are unable to exist without one another: for instance the union of female and male for the continuance of the species (and this not of deliberate purpose, but with man as with the other animals and with plants there is a natural instinct to desire to leave behind one another being of the same sort as oneself); and the union of natural ruler and natural subject for the sake of security (for he that can foresee with his mind is naturally ruler and naturally master, and he that can do these things^^[[3|Rackham: Book: 1, Section: 1252a, Note: 3]]^^ with his body is subject and naturally a slave; so that master and slave have the same interest).
The Greek word had not acquired a specially political connotation as the English word ‘community’ has.
οἰκονόμος denoting a higher grade than δεσπότης is unusual. For their ordinary use see 2.1 fin.
A probable emendation gives ‘that can carry out labor.’
Thus the female and the slave are by nature distinct (for nature makes nothing as the cutlers make the Delphic knife,^^[[1|Rackham: Book: 1, Section: 1252b, Note: 1]]^^ in a niggardly way, but one thing for one purpose; for so each tool will be turned out in the finest perfection, if it serves not many uses but one). Yet among barbarians the female and the slave have the same rank; and the cause of this is that barbarians have no class of natural rulers, but with them the conjugal partnership is a partnership of female slave and male slave. Hence the saying of the poets^^[[2|Rackham: Book: 1, Section: 1252b, Note: 2]]^^—
<<<
'Tis meet that Greeks should rule barbarians,—
<<<
implying that barbarian and slave are the same in nature. From these two partnerships then is first composed the household, and Hesiod^^[[3|Rackham: Book: 1, Section: 1252b, Note: 3]]^^ was right when he wrote
<<<
First and foremost a house and a wife and an ox for the ploughing—
<<<
for the ox serves instead of a servant for the poor. The partnership therefore that comes about in the course of nature for everyday purposes is the ‘house,’ the persons whom Charondas^^[[4|Rackham: Book: 1, Section: 1252b, Note: 4]]^^ speaks of as ‘meal-tub-fellows’ and the Cretan Epimenides^^[[5|Rackham: Book: 1, Section: 1252b, Note: 5]]^^ as ‘manger-fellows.’^^[[6|Rackham: Book: 1, Section: 1252b, Note: 6]]^^
On the other hand the primary partnership made up of several households for the satisfaction of not mere daily needs is the village. The village according to the most natural account seems to be a colony from^^[[7|Rackham: Book: 1, Section: 1252b, Note: 7]]^^ a household, formed of those whom some people speak of as ‘fellow-sucklings,’ sons and sons' sons.^^[[8|Rackham: Book: 1, Section: 1252b, Note: 8]]^^ It is owing to this that our cities were at first under royal sway and that foreign races are so still,because they were made up of parts that were under royal rule; for every household is under the royal rule of its eldest member, so that the colonies from the household were so too, because of the kinship of their members. And this is what Homer^^[[9|Rackham: Book: 1, Section: 1252b, Note: 9]]^^ means:
<<<
And each one giveth law
To sons and eke to spouses—
<<<
for his Cyclopes live in scattered families; and that is the way in which people used to live in early times. Also this explains why all races speak of the gods as ruled by a king, because they themselves too are some of them actually now so ruled and in other cases used to be of old; and as men imagine the gods in human form, so also they suppose their manner of life to be like their own.
The partnership finally composed of several villages is the city-state; it has at last attained the limit of virtually complete self-sufficiency, and thus, while it comes into existence for the sake of life, it exists for the good life. Hence every city-state exists by nature, inasmuch as the first partnerships so exist; for the city-state is the end of the other partnerships, and nature is an end, since that which each thing is when its growth is completed we speak of as being the nature of each thing, for instance of a man, a horse, a household. Again, the object for which a thing exists, its end, is its chief good;
Uncertain: possibly a dagger and a carving-knife in one.
http://www.perseus.tufts.edu/hopper/text?doc=Eur.%20IA%201400&lang=original.
http://www.perseus.tufts.edu/hopper/text?doc=Hes.%20WD%20405&lang=original.
A law-giver of Catana in Sicily, 6th century B.C. or earlier.
A poet and prophet invited to Athens 596 B.C. to purify it of plague.
The variant reading ὁμοκάπνους, ‘smoke-sharers,’ seems to mean ‘hearth-fellows.’
Perhaps the Greek should be altered to give ‘consists of colonies from.’
The words ‘sons and sons' sons’ are probably an interpolated note.
http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Od.%209.114&lang=original on the Cyclopes.
and self-sufficiency is an end, and a chief good. From these things therefore it is clear that the city-state is a natural growth, and that man is by nature a political animal, and a man that is by nature and not merely by fortune citiless is either low in the scale of humanity or above it (like the
<<<
clanless, lawless, hearthless
<<<
man reviled by Homer,^^[[1|Rackham: Book: 1, Section: 1253a, Note: 1]]^^ for one by nature unsocial is also ‘a lover of war’) inasmuch as he is solitary, like an isolated piece at draughts. And why man is a political animal in a greater measure than any bee or any gregarious animal is clear. For nature, as we declare, does nothing without purpose; and man alone of the animals possesses speech. The mere voice, it is true, can indicate pain and pleasure, and therefore is possessed by the other animals as well (for their nature has been developed so far as to have sensations of what is painful and pleasant and to indicate those sensations to one another), but speech is designed to indicate the advantageous and the harmful, and therefore also the right and the wrong; for it is the special property of man in distinction from the other animals that he alone has perception of good and bad and right and wrong and the other moral qualities, and it is partnership in these things that makes a household and a city-state.
Thus also the city-state is prior in nature to the household and to each of us individually.For the whole must necessarily be prior to the part; since when the whole body is destroyed, foot or hand will not exist except in an equivocal sense, like the sense in which one speaks of a hand sculptured in stone as a hand; because a hand in those circumstances will be a hand spoiled, and all things are defined by their function and capacity, so that when they are no longer such as to perform their function they must not be said to be the same things, but to bear their names in an equivocal sense. It is clear therefore that the state is also prior by nature to the individual; for if each individual when separate is not self-sufficient, he must be related to the whole state as other parts are to their whole, while a man who is incapable of entering into partnership, or who is so self-sufficing that he has no need to do so, is no part of a state, so that he must be either a lower animal or a god.
Therefore the impulse to form a partnership of this kind is present in all men by nature; but the man who first united people in such a partnership was the greatest of benefactors. For as man is the best of the animals when perfected, so he is the worst of all when sundered from law and justice. For unrighteousness is most pernicious when possessed of weapons, and man is born possessing weapons for the use of wisdom and virtue, which it is possible to employ entirely for the opposite ends. Hence when devoid of virtue man is the most unholy and savage of animals, and the worst in regard to sexual indulgence and gluttony. Justice on the other hand is an element of the state; for judicial procedure, which means the decision of what is just, is the regulation of the political partnership.
http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%209.63&lang=original; the passage goes on: ἐστὶν ἐκεῖνος ι ὃς πολέμου ἔραται.
And now that it is clear what are the component parts of the state, we have first of all to discuss household management; for every state is composed of households. Household management falls into departments corresponding to the parts of which the household in its turn is composed; and the household in its perfect form consists of slaves and freemen. The investigation of everything should begin with its smallest parts, and the primary and smallest parts of the household are master and slave, husband and wife, father and children; we ought therefore to examine the proper constitution and character of each of these three relationships, I mean that of mastership, that of marriage^^[[1|Rackham: Book: 1, Section: 1253b, Note: 1]]^^ (there is no exact term denoting the relation uniting wife and husband), and thirdly the progenitive relationship (this too has not been designated by a special name). Let us then accept these three relationships that we have mentioned. There is also a department which some people consider the same as household management and others the most important part of it, and the true position of which we shall have to consider: I mean what is called the art of getting wealth.^^[[2|Rackham: Book: 1, Section: 1253b, Note: 2]]^^
Let us begin by discussing the relation of master and slave, in order to observe the facts that have a bearing on practical utility, and also in the hope that we may be able to obtain something better than the notions at present entertained, with a view to a theoretic knowledge of the subject. For some thinkers hold the function of the master to be a definite science, and moreover think that household management, mastership, statesmanship and monarchy are the same thing,as we said at the beginning of the treatise; others however maintain that for one man to be another man's master is contrary to nature, because it is only convention that makes the one a slave and the other a freeman and there is no difference between them by nature, and that therefore it is unjust, for it is based on force.
Since therefore property is a part of a household and the art of acquiring property a part of household management (for without the necessaries even life, as well as the good life,^^[[3|Rackham: Book: 1, Section: 1253b, Note: 3]]^^ is impossible), and since, just as for the particular arts it would be necessary for the proper tools to be forthcoming if their work is to be accomplished, so also the manager of a household must have his tools, and of tools some are lifeless and others living (for example, for a helmsman the rudder is a lifeless tool and the look-out man a live tool—for an assistant in the arts belongs to the class of tools), so also an article of property is a tool for the purpose of life, and property generally is a collection of tools, and a slave is a live article of property. And every assistant is as it were a tool that serves for several tools; for if every tool could perform its own work when ordered, or by seeing what to do in advance, like the statues of Daedalus in the story,^^[[4|Rackham: Book: 1, Section: 1253b, Note: 4]]^^ or the tripods of Hephaestus which the poet says ‘enter self-moved the company divine,’^^[[5|Rackham: Book: 1, Section: 1253b, Note: 5]]^^—if thus shuttles wove and quills played harps of themselves, master-craftsmen would have no need of assistants and masters no need of slaves.
The Greek word properly denotes the marriage ceremony, not the married state.
No English word covers all the associations of the Greek, which means ‘dealing in χρήματα,’ ‘things,’—goods, property, money—and so ‘business.’
‘As well as the good life’ is probably an interpolation.
This legendary sculptor first represented the eyes as open and the limbs as in motion, so his statues had to be chained to prevent them from running away (http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Meno%2097d&lang=original).
http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%2018.369&lang=original
Now the tools mentioned are instruments of production, whereas an article of property is an instrument of action^^[[1|Rackham: Book: 1, Section: 1254a, Note: 1]]^^; for from a shuttle we get something else beside the mere use of the shuttle, but from a garment or a bed we get only their use. And also inasmuch as there is a difference in kind between production and action, and both need tools, it follows that those tools also must possess the same difference. But life is doing things, not making things; hence the slave is an assistant in the class of instruments of action.
And the term ‘article of property’ is used in the same way as the term ‘part’: a thing that is a part is not only a part of another thing but absolutely belongs to another thing, and so also does an article of property. Hence whereas the master is merely the slave's master and does not belong to the slave, the slave is not merely the slave of the master but wholly belongs to the master. These considerations therefore make clear the nature of the slave and his essential quality: one who is a human being belonging by nature not to himself but to another is by nature a slave, and a person is a human being belonging to another if being a man he is an article of property, and an article of property is an instrument for action separable from its owner. But we must next consider whether or not anyone exists who is by nature of this character, and whether it is advantageous and just for anyone to be a slave, or whether on the contrary all slavery is against nature.And it is not difficult either to discern the answer by theory or to learn it empirically. Authority and subordination are conditions not only inevitable but also expedient; in some cases things are marked out from the moment of birth to rule or to be ruled. And there are many varieties both of rulers and of subjects (and the higher the type of the subjects, the loftier is the nature of the authority exercised over them, for example to control a human being is a higher thing than to tame a wild beast; for the higher the type of the parties to the performance of a function, the higher is the function, and when one party rules and another is ruled, there is a function performed between them)—because in every composite thing, where a plurality of parts, whether continuous or discrete, is combined to make a single common whole, there is always found a ruling and a subject factor, and this characteristic of living things is present in them as an outcome of the whole of nature, since even in things that do not partake of life there is a ruling principle, as in the case of a musical scale.^^[[2|Rackham: Book: 1, Section: 1254a, Note: 2]]^^ However, this matter perhaps belongs to an investigation lying somewhat outside our subject; but an animal consists primarily of soul and body, of which the former is by nature the ruling and the latter the subject factor. And to discover what is natural we must study it preferably in things that are in a natural state, and not in specimens that are degenerate. Hence in studying man we must consider a man that is in the best possible condition in regard to both body and soul, and in him the principle stated will clearly appear,—
i.e. with it we do not ''make'' something but ''do'' something (e.g. wear a dress, lie in a bed).
Each ‘mode’ (Dorian, the modern minor scale, Phrygian and Lydian, two forms of major) was ruled by its key-note.
since in those that are bad or in a bad condition it might be thought that the body often rules the soul because of its vicious and unnatural condition. But to resume—it is in a living creature, as we say, that it is first possible to discern the rule both of master and of statesman the soul rules the body with the sway of a master, the intelligence rules the appetites with that of a statesman or a king and in these examples it is manifest that it is natural and expedient for the body to be governed by the soul and for the emotional part to be governed by the intellect, the part possessing reason, whereas for the two parties to be on an equal footing or in the contrary positions is harmful in all cases. Again, the same holds good between man and the other animals: tame animals are superior in their nature to wild animals, yet for all the former it is advantageous to be ruled by man, since this gives them security. Again, as between the sexes, the male is by nature superior and the female inferior, the male ruler and the female subject. And the same must also necessarily apply in the case of mankind as a whole; therefore all men that differ as widely as the soul does from the body and the human being from the lower animal (and this is the condition of those whose function is the use of the body and from whom this is the best that is forthcoming) these are by nature slaves, for whom to be governed by this kind of authorityis advantageous, inasmuch as it is advantageous to the subject things already mentioned. For he is by nature a slave who is capable of belonging to another (and that is why he does so belong), and who participates in reason so far as to apprehend it but not to possess it; for the animals other than man are subservient not to reason, by apprehending it, but to feelings. And also the usefulness of slaves diverges little from that of animals; bodily service for the necessities of life is forthcoming from both, from slaves and from domestic animals alike. The intention of nature therefore is to make the bodies also of freemen and of slaves different—the latter strong for necessary service, the former erect and unserviceable for such occupations, but serviceable for a life of citizenship (and that again divides into the employments of war and those of peace); but as a matter of fact often the very opposite comes about—some persons have the bodies of free men and others the souls; since this is certainly clear, that if persons were born as distinguished only in body as are the statues of the gods, everyone would say that those who were inferior deserved to be these men's slaves. And if this is true in the case of the body, there is far juster reason for this rule being laid down in the case of the soul; but beauty of soul is not so easy to see as beauty of body.
It is manifest therefore that there are cases of people of whom some are freemen and the others slaves by nature, and for these slavery is an institution both expedient and just. But at the same time it is not difficult to see that those who assert the opposite are also right in a manner. The fact is that the terms ‘slavery’ and ‘slave’ are ambiguous; for there is also such a thing as a slave or a man that is in slavery by law, for the law is a sort of agreement under which the things conquered in war are said to belong to their conquerors. Now this conventional right is arraigned by many jurists just as a statesman is impeached for proposing an unconstitutional measure; they say that it is monstrous if the person powerful enough to use force, and superior in power, is to have the victim of his force as his slave and subject; and even among the learned some hold this view, though others hold the other. But the reason of this dispute and what makes the theories overlap is the fact that in a certain manner virtue when it obtains resources has in fact very great power to use force, and the stronger party always possesses superiority in something that is good,^^[[1|Rackham: Book: 1, Section: 1255a, Note: 1]]^^ so that it is thought that force cannot be devoid of goodness, but that the dispute is merely about the justice of the matter (for it is due to the one party holding that the justification of authority is good-will, while the other identifies justice with the mere rule of the stronger); because obviously if these theories be separated apart,the other theories have no force or plausibility at all, implying that the superior in goodness has no claim to rule and be master. But some persons, simply clinging, as they think, to principle of justice (for the law is a principle of justice), assert that the enslavement of prisoners of war is just; yet at the same time they deny the assertion, for there is the possibility that wars may be unjust in their origin and one would by no means admit that a man that does not deserve slavery can be really a slave—otherwise we shall have the result that persons reputed of the highest nobility are slaves and the descendants of slaves if they happen to be taken prisoners of war and sold. Therefore they do not mean to assert that Greeks themselves if taken prisoners are slaves, but that barbarians are. Yet when they say this, they are merely seeking for the principles of natural slavery of which we spoke at the outset; for they are compelled to say that there exist certain persons who are essentially slaves everywhere and certain others who are so nowhere. And the same applies also about nobility: our nobles consider themselves noble not only in their own country but everywhere, but they think that barbarian noblemen are only noble in their own country—which implies that there are two kinds of nobility and of freedom, one absolute and the other relative, as Helen says in Theodectes^^[[2|Rackham: Book: 1, Section: 1255a, Note: 2]]^^:
<<<
But who would dare to call me menial,
The scion of a twofold stock divine?
<<<
Yet in so speaking they make nothing but virtue and vice the distinction between slave and free, the noble and the base-born;
The difficulty turns on the ambiguity of ἀρετή, (a) moral goodness, virtue, (b) goodness of any kind, e.g. strength.
A tragic poet, a friend of Aristotle.
for they assume that just as from a man springs a man and from brutes a brute, so also from good parents comes a good son but as a matter of fact nature frequently while intending to do this is unable to bring it about.
It is clear therefore that there is some reason for this dispute, and that in some instances it is not the case that one set are slaves and the other freemen by nature; and also that in some instances such a distinction does exist, when slavery for the one and mastership for the other are advantageous and just, and it is proper for the one party to be governed and for the other to govern by the form of government for which they are by nature fitted, and therefore by the exercise of mastership, while to govern badly is to govern disadvantageously for both parties (for the same thing is advantageous for a part and for the whole body or the whole soul, and the slave is a part of the master—he is, as it were, a part of the body, alive but yet separated from it; hence there is a certain community of interest and friendship between slave and master in cases when they have been qualified by nature for those positions, although when they do not hold them in that way but by law and by constraint of force the opposite is the case).
And even from these considerations it is clear that the authority of a master over slaves is not the same as the authority of a magistrate in a republic, nor are all forms of government the same, as some assert. Republican government controls men who are by nature free, the master's authority men who are by nature slaves; and the government of a household is monarchy (since every house is governed by a single ruler),whereas statesmanship is the government of men free and equal. The term ‘master’ therefore denotes the possession not of a certain branch of knowledge but of a certain character, and similarly also the terms ‘slave’ and ‘freeman.’ Yet there might be a science of mastership and a slave's science—the latter being the sort of knowledge that used to be imparted by the professor at Syracuse (for there used to be a man there who for a fee gave lessons to servants in their ordinary duties); and indeed there might be more advanced scientific study of such matters, for instance a science of cookery and the other such kinds of domestic service—for different servants have different functions, some more honorable and some more menial, and as the proverb says,
<<<
Slave before slave and master before master.^^[[1|Rackham: Book: 1, Section: 1255b, Note: 1]]^^
<<<
The slave's sciences then are all the various branches of domestic work; the master's science is the science of employing slaves—for the master's function consists not in acquiring slaves but in employing them. This science however is one of no particular importance or dignity: the master must know how to direct the tasks which the slave must know how to execute. Therefore all people rich enough to be able to avoid personal trouble have a steward who takes this office, while they themselves engage in politics or philosophy. The science of acquiring slaves is different both from their ownership and their direction—that is, the just acquiring of slaves, which is akin to the art of war or that of the chase. Let this then stand as our definition of slave and master.
Probably from a comedy of Aristotle's contemporary Philemon.
But let us follow our normal method and investigate generally the nature of all kinds of property and the art of getting wealth, inasmuch as we saw the slave to be one division of property. In the first place therefore one might raise the question whether the art of getting wealth is the same as that of household management, or a part of it, or subsidiary to it; and if subsidiary, whether it is so in the sense in which the art of making shuttles is subsidiary to the art of weaving or in that in which the art of casting bronze is subsidiary to the making of statues (for the two are not subsidiary in the same way, but shuttle-making supplies tools whereas bronze-founding supplies material—and by material I mean the substance out of which certain work is produced, for example fleeces are material for a weaver and bronze for a statuary). Now it is clear that wealth-getting is not the same art as household management, for the function of the former is to provide and that of the latter to use—for what will be the art that will use the contents of the house if not the art of household management? but whether wealth-getting is a part of the art of household management, or a different sort of science, is open to debate. For if it is the function of the getter of wealth to study the source from which money and property are to be procured, . . .^^[[1|Rackham: Book: 1, Section: 1256a, Note: 1]]^^ But property and riches comprise many divisions; hence first of all is husbandry a division of the household art, or is it a different kind of science? and so in general of the superintendence and acquisition of articles of food. But furthermore, there are many sorts of food,owing to which both animals and men have many modes of life; for it is impossible to live without food, so that the differences of food have made the lives of animals different. Among wild animals some are nomadic and others solitary, according to whichever habit is advantageous for their supply of food, because some of them are carnivorous, others graminivorous, and others eat all kinds of food; so that nature has differentiated their modes of life to suit their facilities and their predilection for those articles of food. And as different kinds of animals by nature relish different sorts of food, and not each kind the same, even within the classes of carnivorous and graminivorous animals their modes of life differ from one another. And similarly in the human race also, for there are wide differences of life among mankind. The idlest men are nomads (for to procure food from domesticated animals involves no toil or industry, but as it is necessary for the herds to move from place to place because of the pastures, the people themselves are forced to follow along with them, as though they were farming a live farm). Other men live from hunting, and different people from different kinds of hunting, for instance some from brigandage,^^[[2|Rackham: Book: 1, Section: 1256a, Note: 2]]^^ others from fishing—these are those that dwell on the banks of lakes, marshes and rivers or of a sea suitable for fishing,—and others live on wild birds and animals. But the largest class of men live from the land and the fruits of cultivation. This then virtually completes the list of the various modes of life, those at least that have their industry sprung from themselves and do not procure their food by barter and trade—
Some words seem to have fallen out in the Greek.
Perhaps ‘slave-raiding,’ cf. 3.9, the appropriation of the ‘live tools’ that are a part of nature's supplies; but http://www.perseus.tufts.edu/hopper/text?doc=Thuc.%201.5&lang=original speaks of brigandage and piracy as common in earlier times, and as still deemed respectable professions in Northern Greece.
the lives of the herdsman, the brigand, the fisherman, the hunter, the husband-man. Others also live pleasantly by combining some of these pursuits, supplementing the more deficient life where it happens to fall short in regard to being self-sufficing: for instance, some combine a pastoral life and brigandage, others husbandry and hunting, and similarly with the others—they pass their time in such a combination of pursuits as their need compels. Property of this sort then seems to be bestowed by nature herself upon all, as immediately upon their first coming into existence, so also when they have reached maturity. For even at the original coming into existence of the young some kinds of animals bring forth with them at birth enough sustenance to suffice until the offspring can provide for itself, for example all the species that bear their young in the form of larvae or in eggs. The viviparous species have sustenance for their offspring inside themselves for a certain period, the substance called milk. So that clearly we must suppose that nature also provides for them in a similar way when grown up, and that plants exist for the sake of animals and the other animals for the good of man, the domestic species both for his service and for his food, and if not all at all events most of the wild ones for the sake of his food and of his supplies of other kinds, in order thatthey may furnish him both with clothing and with other appliances. If therefore nature makes nothing without purpose or in vain, it follows that nature has made all the animals for the sake of men. Hence even the art of war will by nature be in a manner an art of acquisition (for the art of hunting is a part of it) that is properly employed both against wild animals and against such of mankind as though designed by nature for subjection refuse to submit to it, inasmuch as this warfare is by nature just.
One kind of acquisition therefore in the order of nature is a part of the household art,^^[[1|Rackham: Book: 1, Section: 1256b, Note: 1]]^^ in accordance with which either there must be forthcoming or else that art must procure to be forthcoming a supply of those goods, capable of accumulation, which are necessary for life and useful for the community of city or household. And it is of these goods that riches in the true sense at all events seem to consist. For the amount of such property sufficient in itself for a good life is not unlimited, as Solon^^[[2|Rackham: Book: 1, Section: 1256b, Note: 2]]^^ says that it is in the verse
<<<
But of riches no bound has been fixed or revealed to men;
<<<
for a limit has been fixed, as with the other arts, since no tool belonging to any art is without a limit whether in number or in size, and riches are a collection of tools for the householder and the statesman. Therefore that there is a certain art of acquisition belonging in the order of nature to householders and to statesmen, and for what reason this is so, is clear. But there is another kind of acquisition that is specially called wealth-getting, and that is so called with justice and to this kind it is due that there is thought to be no limit to riches and property.
Rassow would transpose the clause (with a slight alteration) to give ‘of the household art, that is, the acquisition of those goods capable of accumulation that are necessary for life and useful for the community of city and household, a supply of which must be forthcoming or else the art must procure it to be forthcoming.’
http://www.perseus.tufts.edu/hopper/text?doc=Sol.%20Fr.%2013.71&lang=original.
Owing to its affinity to the art of acquisition of which we spoke, it is supposed by many people to be one and the same as that; and as a matter of fact, while it is not the same as the acquisition spoken of, it is not far removed from it. One of them is natural, the other is not natural, but carried on rather by means of a certain acquired skill or art. We may take our starting-point for its study from the following consideration: with every article of property there is a double way of using it; both uses are related to the article itself, but not related to it in the same manner—one is peculiar to the thing and the other is not peculiar to it. Take for example a shoe—there is its wear as a shoe and there is its use as an article of exchange; for both are ways of using a shoe, inasmuch as even he that barters a shoe for money or food with the customer that wants a shoe uses it as a shoe, though not for the use peculiar to a shoe, since shoes have not come into existence for the purpose of barter. And the same also holds good about the other articles of property; for all of them have an art of exchange related to them, which began in the first instance from the natural order of things, because men had more than enough of some things and less than enough of others. This consideration also shows that the art of trade is not by nature a part of the art of wealth-getting^^[[1|Rackham: Book: 1, Section: 1257a, Note: 1]]^^; for the practice of barter was necessary only so far as to satisfy men's own needs. In the primaryassociation therefore (I mean the household) there is no function for trade, but it only arises after the association has become more numerous. For the members of the primitive household used to share commodities that were all their own, whereas on the contrary a group divided into several households participated also in a number of commodities belonging to their neighbors, according to their needs for which they were forced to make their interchanges by way of barter, as also many barbarian tribes do still; for such tribes do not go beyond exchanging actual commodities for actual commodities, for example giving and taking wine for corn, and so with the various other things of the sort. Exchange on these lines therefore is not contrary to nature, nor is it any branch of the art of wealth-getting, for it existed for the replenishment of natural self-sufficiency; yet out of it the art of business in due course arose. For when they had come to supply themselves more from abroad by importing things in which they were deficient and exporting those of which they had a surplus, the employment of money necessarily came to be devised. For the natural necessaries are not in every case readily portable; hence for the purpose of barter men made a mutual compact to give and accept some substance of such a sort as being itself a useful commodity was easy to handle in use for general life, iron for instance, silver and other metals, at the first stage defined merely by size and weight, but finally also by impressing on it a stamp in order that this might relieve them of having to measure it; for the stamp was put on as a token of the amount.
Perhaps Aristotle wrote ‘of the art of exchange’: Bernays suggests μεταβλητικῆς for χρηματιστικῆς.
So when currency had been now invented as an outcome of the necessary interchange of goods, there came into existence the other form of wealth-getting, trade, which at first no doubt went on in a simple form, but later became more highly organized as experience discovered the sources and methods of exchange that would cause most profit. Hence arises the idea that the art of wealth-getting deals specially with money, and that its function is to be able to discern from what source a large supply can be procured, as this art is supposed to be creative of riches and wealth; indeed riches are often assumed to consist of a quantity of money, because money is the thing with which the art of business and of trade deals. But at other times, on the contrary, it is thought that money is nonsense, and nothing by nature but entirely a convention, because when those who use it have changed the currency it is worth nothing, and because it is of no use for any of the necessary needs of life and a man well supplied with money may often^^[[1|Rackham: Book: 1, Section: 1257b, Note: 1]]^^ be destitute of the bare necessities of subsistence, yet it is anomalous that wealth should be of such a kind that a man may be well supplied with it and yet die of hunger, like the famous Midas in the legend, when owing to the insatiable covetousness of his prayer all the viands served up to him turned into gold. Hence people seek for a different definition of riches and the art of getting wealth, and rightly; for natural wealth-getting and natural riches are different:natural wealth-getting belongs to household management, whereas the other kind belongs to trade, producing goods not in every way but only by the method of exchanging goods. It is this art of wealth-getting that is thought to be concerned with money, for money is the first principle and limit of commerce. And these riches, that are derived from this art of wealth-getting, are truly unlimited^^[[2|Rackham: Book: 1, Section: 1257b, Note: 2]]^^; for just as the art of medicine is without limit in respect of health, and each of the arts is without limit in respect of its end (for they desire to produce that in the highest degree possible), whereas they are not without limit as regards the means to their end (for with all of them the end is a limit to the means), so also this wealth-getting has no limit in respect of its end, and its end is riches and the acquisition of goods in the commercial sense. But the household branch of wealth-getting has a limit, since the acquisition of commercial riches is not the function of household management. Hence from this point of view it appears necessary that there should be a limit to all riches, yet in actual fact we observe that the opposite takes place; for all men engaged in wealth-getting try to increase their money to an unlimited amount. The reason of this is the close affinity of the two branches of the art of business. Their common ground is that the thing that each makes use of is the same; they use the same property, although not in the same way—the one has another end in view, the aim of the other is the increase of the property. Consequently some people suppose that it is the function of household management to increase property, and they are continually under the idea that it is their duty to be either safeguarding their substance in money or increasing it to an unlimited amount. The cause of this state of mind is that their interests are set upon life but not upon the good life;
i.e. a trader cannot get too much of his goods, any more than a doctor can make his patient too healthy.
as therefore the desire for life is unlimited, they also desire without limit the means productive of life. And even those who fix their aim on the good life seek the good life as measured by bodily enjoyments, so that inasmuch as this also seems to be found in the possession of property, all their energies are occupied in the business of getting wealth; and owing to this the second kind of the art of wealth-getting has arisen. For as their enjoyment is in excess, they try to discover the art that is productive of enjoyable excess; and if they cannot procure it by the art of wealth-getting, they try to do so by some other means, employing each of the faculties in an unnatural way. For it is not the function of courage to produce wealth, but to inspire daring; nor is it the function of the military art nor of the medical art, but it belongs to the former to bring victory and to the latter to cause health. Yet these people make all these faculties means for the business of providing wealth, in the belief that wealth is the end and that everything must be directed to the end.
We have therefore discussed both the unnecessary branch of wealth-getting, defining it and also explaining the cause why we require it, and the necessary branch, showing that this branch which has to do with food is different from the unnecessary branch and is by nature a part of household management, not being like that branch unlimited but having a limit. And we can also see the answer to the question raised at the beginning,^^[[1|Rackham: Book: 1, Section: 1258a, Note: 1]]^^ whetherthe art of wealth-getting belongs to the householder and the statesman, or whether on the contrary supplies ought to be provided already (for just as statesmanship does not create human beings but having received them from nature makes use of them, so also it is necessary for nature to bestow food by bestowing land or sea or something else), and the task of the householder is, starting with these supplies given, to dispose of them in the proper way. For it does not belong to the art of weaving to make fleeces, but to use them, and also to know what sort of fleece is good and suitable or bad and unsuitable. In fact the question might be raised, why the getting of wealth is a part of the household art whereas the art of medicine is not a part of it, although the members of the household ought to be healthy, just as they must be alive or fulfil any of the other essential conditions. But inasmuch as although in a way it does belong to the householder and the ruler to see even to health, yet in a way it does not belong to them but to the physician, so also with regard to wealth, although in a way it is the affair of the house-holder, in a way it is not, but is a matter for the subsidiary art. But best of all, as has been said before, this provision ought to be made in advance by nature. For it is the work of nature to supply nourishment for her offspring, since every creature has for nourishment the residue of the substance from which it springs.^^[[2|Rackham: Book: 1, Section: 1258a, Note: 2]]^^ Hence the business of drawing provision from the fruits of the soil and from animals is natural to all. But, as we said, this art is twofold, one branch being of the nature of trade while the other belongs to the household art; and the latter branch is necessary and in good esteem, but the branch connected with exchange is justly discredited
i.e. animals are made of earth and water and live on the products of earth and water.
(for it is not in accordance with nature, but involves men's taking things from one another). As this is so, usury is most reasonably hated, because its gain comes from money itself and not from that for the sake of which money was invented. For money was brought into existence for the purpose of exchange, but interest increases the amount of the money itself (and this is the actual origin of the Greek word: offspring resembles parent, and interest is money born of money); consequently this form of the business of getting wealth is of all forms the most contrary to nature. And since we have adequately defined the scientific side of the subject, we ought to discuss it from the point of view of practice; although, whereas the theory of such matters is a liberal study, the practical pursuit of them is narrowing. The practically useful branches of the art of wealth-getting are first, an expert knowledge of stock, what breeds are most profitable and in what localities and under what conditions, for instance what particular stock in horses or cattle or sheep, and similarly of the other animals also (for the farmer must be an expert as to which of these animals are most profitable compared with one another, and also as to what breeds are most profitable on what sorts of land, since different breeds flourish in different places); secondly, the subject of agriculture, and this again is divided into corn-growing and fruit-farming; also bee-keeping, and the breeding of the other creatures finned and featheredwhich can be used to furnish supplies. These then are the branches and primary parts of wealth-getting in the most proper sense. Of the kind that deals with exchange, the largest branch is commerce (which has three departments, ship-owning, transport and marketing: these departments differ from each other in the fact that some are safer and others carry larger profits); the second branch is money-lending, and the third labor for hire, one department of which is that of the mechanic^^[[1|Rackham: Book: 1, Section: 1258b, Note: 1]]^^ arts and the other that of unskilled laborers who are useful only for bodily service. And there is a third form of wealth-getting that lies between the latter and the one placed first, since it possesses mediate an element both of natural wealth-getting and of the sort that employs exchange; it deals with all the commodities that are obtained from the earth and from those fruitless but useful things that come from the earth—examples are the felling of timber^^[[2|Rackham: Book: 1, Section: 1258b, Note: 2]]^^ and all sorts of mining; and of mining itself there are many classes, since there are many sorts of metals obtained out of the earth. The^^[[3|Rackham: Book: 1, Section: 1258b, Note: 3]]^^ most scientific of these industries are those which involve the smallest element of chance, the most mechanic those in which the operatives undergo the greatest amount of bodily degradation, the most servile those in which the most uses are made of the body, and the most ignoble those in which there is the least requirement of virtue as an accessory. But while we have even now given a general description of these various branches, yet a detailed and particular account of them, though useful for the practice of the industries, would be illiberal as a subject of prolonged study. There are books on these subjects by certain authors, for example Charetides^^[[4|Rackham: Book: 1, Section: 1258b, Note: 4]]^^ of Paros
βάναυσος(said to be from βαῦνος‘furnace,’ αὔω‘to dry’), ‘artisan’ (ranged with farmers, traders, and laborers, as forming the common people 1321a 6); it acquires the senses of ‘cramped in body’ (1341a 7) and ‘vulgar in taste’ (1337b 8).
a very probable variant gives ‘the quarrying of stone.’
In the mss. this sentence follows the next one.
and Apollodorus^^[[1|Rackham: Book: 1, Section: 1259a, Note: 1]]^^ of Lemnos have written about both agriculture and fruit-farming, and similarly others also on other topics, so these subjects may be studied from these authors by anybody concerned to do so; but in addition a collection ought also to be made^^[[2|Rackham: Book: 1, Section: 1259a, Note: 2]]^^ of the scattered accounts of methods that have brought success in business to certain individuals. All these methods are serviceable for those who value wealth-getting, for example the plan of Thales^^[[3|Rackham: Book: 1, Section: 1259a, Note: 3]]^^ of Miletus, which is a device for the business of getting wealth, but which, though it is attributed to him because of his wisdom, is really of universal application. Thales, so the story goes, because of his poverty was taunted with the uselessness of philosophy; but from his knowledge of astronomy he had observed while it was still winter that there was going to be a large crop of olives, so he raised a small sum of money and paid round deposits for the whole of the olive-presses in Miletus and Chios, which he hired at a low rent as nobody was running him up; and when the season arrived, there was a sudden demand for a number of presses at the same time, and by letting them out on what terms he liked he realized a large sum of money, so proving that it is easy for philosophers to be rich if they choose, but this is not what they care about. Thales then is reported to have thus displayed his wisdom, but asa matter of fact this device of taking an opportunity to secure a monopoly is a universal principle of business; hence even some states have recourse to this plan as a method of raising revenue when short of funds: they introduce a monopoly of marketable goods. There was a man in Sicily who used a sum of money deposited with him to buy up all the iron from the iron mines, and afterwards when the dealers came from the trading-centers he was the only seller, though he did not greatly raise the price, but all the same he made a profit of a hundred talents^^[[4|Rackham: Book: 1, Section: 1259a, Note: 4]]^^ on his capital of fifty. When Dionysius^^[[5|Rackham: Book: 1, Section: 1259a, Note: 5]]^^ came to know of it he ordered the man to take his money with him but clear out of Syracuse on the spot,^^[[6|Rackham: Book: 1, Section: 1259a, Note: 6]]^^ since he was inventing means of profit detrimental to the tyrant's own affairs. Yet really this device is the same as the discovery of Thales, for both men alike contrived to secure themselves a monopoly. An acquaintance with these devices is also serviceable for statesmen, for many states need financial aid and modes of revenue like those described, just as a household may, but in greater degree; hence some statesmen even devote their political activity exclusively to finance. And since, as we saw,^^[[7|Rackham: Book: 1, Section: 1259a, Note: 7]]^^ the science of household management has three divisions, one the relation of master to slave, of which we have spoken before,^^[[8|Rackham: Book: 1, Section: 1259a, Note: 8]]^^ one the paternal relation, and the third the conjugal^^[[9|Rackham: Book: 1, Section: 1259a, Note: 9]]^^—for it is a part of the household science to rule over wife and children (over both as over freemen, yet not with the same mode of government, but over the wife to exercise republican government and over the children monarchical);
Also mentioned by Varro and Pliny.
The author of the Second Book of the pseudo-Aristotelian __Oeconomica__ seems to have taken the hint.
The founder of Greek philosophy and mathematics, and one of the Seven Sages, 6th-5th cent. B.C.
The talent was about 240 pounds.
Dionysius the elder, tyrant of Syracuse 405-367 B.C.
cf. Thucydides οἱ δ᾽ οὐκέτι ἔμειναν ἀλλὰ . . .
The construction of the sentence is interrupted, and never completed.
for the male is by nature better fitted to command than the female (except in some cases where their union has been formed contrary to nature) and the older and fully developed person than the younger and immature. It is true that in most cases of republican government the ruler and the ruled interchange in turn (for they tend to be on in equal level in their nature and to have no difference at all), although nevertheless during the period when one is ruler and the other ruled they seek to have a distinction by means of insignia and titles and honors, just as Amasis made his speech about the foot-bath^^[[1|Rackham: Book: 1, Section: 1259b, Note: 1]]^^; but the male stands in this relationship to the female continuously. The rule of the father over the children on the other hand is that of a king; for the male parent is the ruler in virtue both of affection and of seniority, which is characteristic of royal government (and therefore Homer^^[[2|Rackham: Book: 1, Section: 1259b, Note: 2]]^^ finely designated Zeus by the words
<<<
father of men and gods,
<<<
as the king of them all). For though in nature the king must be superior, in race he should be the same as his subjects, and this is the position of the elder in relation to the younger and of the father in relation to the child. It is clear then that household management takes more interest in the human members of the household than in its inanimate property, andin the excellence of these than in that of its property, which we style riches, and more in that of its free members than in that of slaves.
First of all then as to slaves the difficulty might be raised, does a slave possess any other excellence, besides his merits as a tool and a servant, more valuable than these, for instance temperance, have the courage, justice and any of the other moral virtues, or has he no excellence beside his bodily service? For either way there is difficulty; if slaves do possess moral virtue, wherein will they differ from freemen? or if they do not, this is strange, as they are human beings and participate in reason. And nearly the same is the question also raised about the woman and the child: have they too virtues, and ought a woman to be temperate, brave and just, and can a child be intemperate or temperate, or not? This point therefore requires general consideration in relation to natural ruler and subject: is virtue the same for ruler and ruled, or different? If it is proper for both to partake in nobility of character, how could it be proper for the one to rule and the other to be ruled unconditionally? we cannot say that the difference is to be one of degree, for ruling and being ruled differ in kind, and difference of degree is not a difference in kind at all. Whereas if on the contrary it is proper for the one to have moral nobility but not for the other, this is surprising. For if the ruler is not temperate and just, how will he rule well? And if the ruled, how will he obey well?
http://www.perseus.tufts.edu/hopper/text?doc=Hdt.%201.172&lang=original. Amasis king of Egypt was despised by his subjects for his low birth, so he had a statue made out of a gold foot-bath and set it up for them to worship, afterwards explaining to them its lowly origin.
http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%201.544&lang=original.
If intemperate and cowardly he will not perform any of the duties of his position. It is evident therefore that both must possess virtue, but that there are differences in their virtue (as also there are differences between those who are by nature ruled).^^[[1|Rackham: Book: 1, Section: 1260a, Note: 1]]^^ And of this we straightway find an indication in connection with the soul; for the soul by nature contains a part that rules and a part that is ruled, to which we assign different virtues, that is, the virtue of the rational and that of the irrational. It is clear then that the case is the same also with the other instances of ruler and ruled. Hence there are by nature various classes of rulers and ruled. For the free rules the slave, the male the female, and the man the child in a different way. And all possess the various parts of the soul, but possess them in different ways; for the slave has not got the deliberative part at all, and the female has it, but without full authority, while the child has it, but in an undeveloped form. Hence^^[[2|Rackham: Book: 1, Section: 1260a, Note: 2]]^^ the ruler must possess intellectual virtue in completeness (for any work, taken absolutely, belongs to the master-craftsman, and rational principle is a master-craftsman); while each of the other parties must have that share of this virtue which is appropriate to them. We must suppose therefore that the same necessarily holds good of the moral virtues: all must partake of them, but not in the same way, but in such measure as is proper to each in relation to his own function.Hence it is manifest that all the persons mentioned have a moral virtue of their own, and that the temperance of a woman and that of a man are not the same, nor their courage and justice, as Socrates thought,^^[[3|Rackham: Book: 1, Section: 1260a, Note: 3]]^^ but the one is the courage of command, and the other that of subordination, and the case is similar with the other virtues. And this is also clear when we examine the matter more in detail, for it is misleading to give a general definition of virtue, as some do, who say that virtue is being in good condition as regards the soul or acting uprightly or the like; those who enumerate the virtues of different persons separately, as Gorgias does,^^[[4|Rackham: Book: 1, Section: 1260a, Note: 4]]^^ are much more correct than those who define virtue in that way. Hence we must hold that all of these persons have their appropriate virtues, as the poet said of woman:
<<<
Silence gives grace to woman^^[[5|Rackham: Book: 1, Section: 1260a, Note: 5]]^^—
<<<
though that is not the case likewise with a man. Also the child is not completely developed, so that manifestly his virtue also is not personal to himself, but relative to the fully developed being, that is, the person in authority over him. And similarly the slave's virtue also is in relation to the master.
And we laid it down that the slave is serviceable for the mere necessaries of life, so that clearly he needs only a small amount of virtue, in fact just enough to prevent him from failing in his tasks owing to intemperance and cowardice. (But the question might be raised, supposing that what has just been said is true, will artisans also need to have virtue? for they frequently fall short in their tasks owing to intemperance. Or is their case entirely different? For the slave is a partner in his master's life, but the artisan is more remote, and only so much of virtue falls to his share as of slavery^^[[6|Rackham: Book: 1, Section: 1260a, Note: 6]]^^—
This clause seems to have been interpolated; one ms. has a marginal correction, ‘by nature rulers and ruled.’
In the mss. this sentence follows the next one, ‘We must suppose—function,’ and begins ‘Hence the ruler must possess ''moral'' virtue.’
http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Meno%2074b&lang=original
i.e. in Plato, __Meno__ (see 7 above), where this sophist figures as a character in the dialogue; see also 3.1.9, note.
http://www.perseus.tufts.edu/hopper/text?doc=Soph.%20Aj.%20293&lang=original
i.e. his excellences as an artisan are the qualities of a subordinate (his virtues as a human being, apart from his trade, are not considered).
for the mechanic artisan is under a sort of limited slavery, and whereas the slave is one of the natural classes, no shoemaker or other craftsman belongs to his trade by nature.) It is manifest therefore that the master ought to be the cause to the slave of the virtue proper to a slave, but not as possessing that art of mastership which teaches a slave his tasks. Hence those persons are mistaken who deprive the slave of reasoning and tell us to use command only; for admonition is more properly employed with slaves than with children.
But on these subjects let us conclude our decisions in this manner; while the question of the virtue severally belonging to man and woman and children and father, and of the right and wrong mode of conducting their mutual intercourse and the proper way of pursuing the good mode and avoiding the bad one, are matters that it will be necessary to follow up in the part of our treatise dealing with the various forms of constitution.^^[[1|Rackham: Book: 1, Section: 1260b, Note: 1]]^^ For since every household is part of a state, and these relationships are part of the household, and the excellence of the part must have regard to that of the whole, it is necessary that the education both of the children and of the women should be carried on with a regard to the form of the constitution, if it makes any difference as regards the goodness of the state for the children and the women to be good. And it must necessarily make a difference; for the women are a half of the free population, and the children grow up to be the partners in the government of the state. So that as these questions have been decided, and those that remain must be discussed elsewhere, let us relinquish the present subjects as completed, and make a fresh start in our discourse, and first let us consider those thinkers who have advanced views about the Ideal State.
As a matter of fact in Books 7, 8 dealing with the best constitution this subject is not reached.
---
!!![[Section: 1260b|Rackham: Book: 2, Section: 1260b]]
{{Rackham: Book: 2, Section: 1260b}}
---
!!![[Section: 1261a|Rackham: Book: 2, Section: 1261a]]
{{Rackham: Book: 2, Section: 1261a}}
---
!!![[Section: 1261b|Rackham: Book: 2, Section: 1261b]]
{{Rackham: Book: 2, Section: 1261b}}
---
!!![[Section: 1262a|Rackham: Book: 2, Section: 1262a]]
{{Rackham: Book: 2, Section: 1262a}}
---
!!![[Section: 1262b|Rackham: Book: 2, Section: 1262b]]
{{Rackham: Book: 2, Section: 1262b}}
---
!!![[Section: 1263a|Rackham: Book: 2, Section: 1263a]]
{{Rackham: Book: 2, Section: 1263a}}
---
!!![[Section: 1263b|Rackham: Book: 2, Section: 1263b]]
{{Rackham: Book: 2, Section: 1263b}}
---
!!![[Section: 1264a|Rackham: Book: 2, Section: 1264a]]
{{Rackham: Book: 2, Section: 1264a}}
---
!!![[Section: 1264b|Rackham: Book: 2, Section: 1264b]]
{{Rackham: Book: 2, Section: 1264b}}
---
!!![[Section: 1265a|Rackham: Book: 2, Section: 1265a]]
{{Rackham: Book: 2, Section: 1265a}}
---
!!![[Section: 1265b|Rackham: Book: 2, Section: 1265b]]
{{Rackham: Book: 2, Section: 1265b}}
---
!!![[Section: 1266a|Rackham: Book: 2, Section: 1266a]]
{{Rackham: Book: 2, Section: 1266a}}
---
!!![[Section: 1266b|Rackham: Book: 2, Section: 1266b]]
{{Rackham: Book: 2, Section: 1266b}}
---
!!![[Section: 1267a|Rackham: Book: 2, Section: 1267a]]
{{Rackham: Book: 2, Section: 1267a}}
---
!!![[Section: 1267b|Rackham: Book: 2, Section: 1267b]]
{{Rackham: Book: 2, Section: 1267b}}
---
!!![[Section: 1268a|Rackham: Book: 2, Section: 1268a]]
{{Rackham: Book: 2, Section: 1268a}}
---
!!![[Section: 1268b|Rackham: Book: 2, Section: 1268b]]
{{Rackham: Book: 2, Section: 1268b}}
---
!!![[Section: 1269a|Rackham: Book: 2, Section: 1269a]]
{{Rackham: Book: 2, Section: 1269a}}
---
!!![[Section: 1269b|Rackham: Book: 2, Section: 1269b]]
{{Rackham: Book: 2, Section: 1269b}}
---
!!![[Section: 1270a|Rackham: Book: 2, Section: 1270a]]
{{Rackham: Book: 2, Section: 1270a}}
---
!!![[Section: 1270b|Rackham: Book: 2, Section: 1270b]]
{{Rackham: Book: 2, Section: 1270b}}
---
!!![[Section: 1271a|Rackham: Book: 2, Section: 1271a]]
{{Rackham: Book: 2, Section: 1271a}}
---
!!![[Section: 1271b|Rackham: Book: 2, Section: 1271b]]
{{Rackham: Book: 2, Section: 1271b}}
---
!!![[Section: 1272a|Rackham: Book: 2, Section: 1272a]]
{{Rackham: Book: 2, Section: 1272a}}
---
!!![[Section: 1272b|Rackham: Book: 2, Section: 1272b]]
{{Rackham: Book: 2, Section: 1272b}}
---
!!![[Section: 1273a|Rackham: Book: 2, Section: 1273a]]
{{Rackham: Book: 2, Section: 1273a}}
---
!!![[Section: 1273b|Rackham: Book: 2, Section: 1273b]]
{{Rackham: Book: 2, Section: 1273b}}
---
!!![[Section: 1274a|Rackham: Book: 2, Section: 1274a]]
{{Rackham: Book: 2, Section: 1274a}}
---
!!![[Section: 1274b|Rackham: Book: 2, Section: 1274b]]
{{Rackham: Book: 2, Section: 1274b}}
And since we take for our special consideration the study of the form of political community that is the best of all the forms for a people able to pursue the most ideal mode of life, we must also examine the other constitutions actually employed by certain of the states said to be well governed, as well as any others propounded by certain thinkers and reputed to be of merit, in order that we may discern what there is in them that is right and expedient, and also in order that it may not be thought that to seek for something different from them springs entirely from a desire to display ingenuity, but that we may be thought to enter upon this inquiry because these forms of constitution that already exist are not satisfactory.
We must first adopt as a starting-point that which is the natural point of departure for this inquiry. There are three possible systems of property: either all the citizens must own everything in common, or they must own nothing in common, or some things must be common property and others not. To have nothing in common is clearly impossible for the state is essentially a form of community, and to begin with there is bound to be a common locality: a single city occupies a single site, and the single city belongs to its citizens in common.
But is it better for a city that is to be well ordered to have community in everything which can possibly be made common property, or is it better to have some things in common and others not? For example, it is possible for the citizens to have children, wives and possessions in common with each other, as in Plato's __Republic__, in which Socrates says that there must be community of children, women and possessions. Well then, which is preferable, the system that now obtains, or one conforming with the regulation described in the __Republic__^^[[1|Rackham: Book: 2, Section: 1261a, Note: 1]]^^?
Now for all the citizens to have their wives in common involves a variety of difficulties; in particular,^^[[2|Rackham: Book: 2, Section: 1261a, Note: 2]]^^ (1) the object which Socrates advances as the reason why this enactment should be made clearly does not follow from his arguments; also (2) as a means to the end which he asserts should be the fundamental object of the city, the scheme as actually set forth in the dialogue is not practicable; yet (3) how it is to be further worked out has been nowhere definitely stated. I refer to the ideal of the fullest possible unity of the entire state, which Socrates takes as his fundamental principle.
Yet it is clear that if the process of unification advances beyond a certain point, the city will not be a city at all for a state essentially consists of a multitude of persons, and if its unification is carried beyond a certain point, city will be reduced to family and family to individual,for we should pronounce the family to be a more complete unity than the city, and the single person than the family; so that even if any lawgiver were able to unify the state, he must not do so, for he will destroy it in the process. And not only does a city consist of a multitude of human beings, it consists of human beings differing in kind. A collection of persons all alike does not constitute a state. For a city is not the same thing as a league; a league is of value by its quantity, even though it is art the same in kind (since the essential object of the league is military strength), just as a weight would be worth more if it weighed more, whereas^^[[3|Rackham: Book: 2, Section: 1261a, Note: 3]]^^ components which are to make up a unity must differ in kind (and it is by this characteristic that a city will also surpass a tribe of which the population is not scattered among villages but organized like the Arcadians). Hence reciprocal equality^^[[4|Rackham: Book: 2, Section: 1261a, Note: 4]]^^ is the preservative of states, as has been said before in the __Ethics__. For even among the free and equal this principle must necessarily obtain, since all cannot govern at once: they must hold office for a year at a time or by some other arrangement or period; and in this manner it does actually come about that all govern, just as all shoemakers would be also carpenters if the shoemakers and the carpenters kept on changing trades instead of the same persons being shoemakers and carpenters always. But since such permanence of function is better for the political community also, it is clear that it is better for the same persons to govern always, if possible; and among peoples where it is impossible because all the citizens are equal in their nature,
On the following criticisms see Grote, __Plato__, 3, pp. 211-233.
(1) 1.3-7; (2) 1.8-2.11; (3) 2.11-13; also (4) other objections 2.15-16.
In the mss. of the Greek ‘whereas—kind’ comes below after ‘ Arcadian.’
As the best state consists of different classes, its unity is secured by each citizen giving services to society and receiving in return benefits proportionate to his service. Probably τὸ ἴσον is an interpolation (though Newman explains it as 'the reciprocal rendering of an equal amount of dissimilar things'): omitting τὸ ἴσον, we render ‘reciprocity’ and not ‘reciprocal equality’; cf. http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201132b&lang=original, ‘In the interchange of services Justice in the form of Reciprocity is the bond that maintains the association: reciprocity, that is, on the basis of proportion, not on the basis of equality.’
yet at the same time it is only just, whether governing is a good thing or a bad, that all should partake in it, and for equals thus to submit to authority in turn imitates their being originally dissimilar^^[[1|Rackham: Book: 2, Section: 1261b, Note: 1]]^^; for some govern and others are governed by turn, as though becoming other persons; and also similarly when they hold office the holders of different offices are different persons. It is clear then from these considerations that it is not an outcome of nature for the state to be a unity in the manner in which certain persons say that it is, and that what has been said to be the greatest good in states really destroys states; yet surely a thing's particular good acts as its preservative.—Another line of consideration also shows that to seek to unify the state excessively is not beneficial. In point of self-sufficiency the individual is surpassed by the family and the family by the state, and in principle a state is fully realized only when it comes to pass that the community of numbers is self-sufficing; if therefore the more self-sufficing a community is, the more desirable is its condition, then a less degree of unity is more desirable than a greater.
Again, even granting that it is best for the community to be as complete a unity as possible, complete unity does not seem to be proved by the formula ‘if all the citizens say “Mine” and “Not mine” at the same time,’ which Socrates^^[[2|Rackham: Book: 2, Section: 1261b, Note: 2]]^^ thinks to be a sign of thecity's being completely one. ‘All’ is an ambiguous term. If it means ‘each severally,’ very likely this would more fully realize the state of things which Socrates wishes to produce (for in that case every citizen will call the same boy his son and also the same woman his wife, and will speak in the same way of property and indeed of each of the accessories of life) but ''ex hypothesi'' the citizens, having community of women and children, will not call them ‘theirs’ in this sense, but will mean theirs collectively and not severally, and similarly they will call property ‘theirs’ meaning the property of them all, not of each of them severally. We see then that the phrase ‘all say’ is equivocal (in fact the words ‘all,’ ‘both,’ ‘odd,’ ‘even,’ owing to their ambiguity, occasion argumentative quibbling even in philosophical discussions); hence really for all to say the same thing is in one sense admirable, although impracticable, but in another sense is not at all a sign of concord. And furthermore, the proposal has another disadvantage. Property that is common to the greatest number of owners receives the least attention; men care most for their private possessions, and for what they own in common less, or only so far as it falls to their own individual share for in addition to the other reasons, they think less of it on the ground that someone else is thinking about it, just as in household service a large number of domestics sometimes give worse attendance than a smaller number. And it results in each citizen's having a thousand sons, and these do not belong to them as individuals but any child is equally the son of anyone, so that all alike will regard them with indifference.
The best form of constitution is where there is a superior class that governs continuously—an aristocracy; so where there are no class-distinctions, the next best thing is for all the citizens to take turns in governing and being governed, those in office for the time being forming a sort of aristocracy. Richards's alteration of the text gives ‘to take turns to govern is an imitation of original inequality and class-distinction.‘
The reference is to http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Rep.%20462c&lang=original. Unity is secured when everyone thinks that everything belongs equally to him and to everybody else, i.e. everything is common property.
Again, each speaks of one of his fellow-citizens who is prospering or getting on badly as ‘my son’ only in the sense of the fractional part which he forms of the whole number—that is, he says ‘my son’ or ‘so-and-so's son,’ specifying as the father any individual of the thousand citizens or whatever the number be of which the state consists, and even this dubiously, for it is uncertain who has chanced to have had a son born to him and when born safely reared. Yet which is the better way to use the word ‘mine’—this way, each of two thousand or ten thousand people applying it to the same thing, or rather the way in which they say ‘mine’ in the actual states now? for the same person is called ‘my son’ by one man and ‘my brother’ by another, and another calls him ‘nephew,’ or by some other relationship, whether of blood or by affinity and marriage, the speaker's own in the first place, or that of his relations; and in addition someone else calls him ‘fellow-clansman’ or ‘fellow-tribesman.’ For it is better for a boy to be one's own private nephew than one's son in the way described. Moreover it would also be impossible to avoid men's supposing certain persons to be their real brothers and sons and fathers and mothers; for they would be bound to form their belief about each other by the resemblances which occur between children and parents. This indeed is said by some of those who write of travels round the world^^[[1|Rackham: Book: 2, Section: 1262a, Note: 1]]^^ actually to occur;they say that some of the people of Upper Libya have their wives in common, yet the children born are divided among them according to their personal resemblances. And there are some females both of the human race and of the other animals, for instance horses and cattle, who have a strong natural tendency to produce off-spring resembling the male parents, as was the case with the mare at Pharsalus named Honest Lady.^^[[2|Rackham: Book: 2, Section: 1262a, Note: 2]]^^
Moreover it is not easy for those who institute this communism to guard against such objectionable occurrences as outrage, involuntary and in some cases voluntary homicide, fights, abusive language; all of which are violations of piety when committed against fathers, mothers and near relatives as if they were not relatives; but these are bound to occur more frequently when people do not know their relations than when they do, and also, when they do occur, if the offenders know their relationship it is possible for them to have the customary expiations performed, but for those who do not no expiation is possible. Also it is curious that a theorist who makes the sons common property only debars lovers from intercourse and does not prohibit love, nor the other familiarities, which between father and son or brother and brother are most unseemly, since even the fact of love between them is unseemly. And it is also strange that he deprives them of intercourse for no other reason except because the pleasure is too violent; and that he thinks it makes no difference that the parties are in the one case father or son and in the other case brothers of one another. And it seems that this community of wives and sons is more serviceable for the Farmer class than for the Guardians;
Books of geography, founded on travellers' reports—a famous one by Hecataeus, scoffed at by http://www.perseus.tufts.edu/hopper/text?doc=Hdt.%204.36&lang=original.
Or possibly ‘Docile’ ( Jackson), cf. http://www.perseus.tufts.edu/hopper/text?doc=Xen.%20Hunt.%207.4&lang=original.
for there will be less friendship among them if their children and women are in common, and unfriendliness in the subject classes is a good thing with a view to their being submissive to authority and not making revolution. But speaking generally such a law is bound to bring about the opposite state of things to that which rightly enacted laws ought properly to cause, and because of which Socrates thinks it necessary to make these regulations about the children and women. For we think that friendship is the greatest of blessings for the state, since it is the best safeguard against revolution, and the unity of the state, which Socrates praises most highly, both appears to be and is said by him to be the effect of friendship, just as we know that Aristophanes^^[[1|Rackham: Book: 2, Section: 1262b, Note: 1]]^^ in the discourses on love describes how the lovers owing to their extreme affection desire to grow together and both become one instead of being two. In such a union it would be inevitable that both would be spoiled, or at least one, and in the state friendship would inevitably become watery in consequence of such association, and the expressions ‘my father’ and ‘my son’ would quite go out. For just as putting a little sugar into a quantity of water makes the mixture imperceptible, so it also must come about that the mutual relationship based on these names must become imperceptible,since in the republic described by Plato there will be the least possible necessity for people to care for one another as father for sons or as son for father or as brother for brother. For there are two things that most cause men to care for and to love each other, the sense of ownership and the sense of preciousness; and neither motive can be present with the citizens of a state so constituted. Again, as to the transference of some of the children at birth from the Farmers and Artisans to the Guardians^^[[2|Rackham: Book: 2, Section: 1262b, Note: 2]]^^ and of others from the Guardians to the Farmers and Artisans, there is much confusion as to how it is to be done; and the parents who give the children and the officials who transfer them are bound to know which they give to whom. And again, the things spoken of above are bound to occur even more with these transferred children, such as outrage, love-making and murder; for the children of the Guardians transferred to the other citizens will no longer speak of the Guardians as brothers and children and fathers and mothers, nor yet will those living among the Guardians so speak of the other classes, so as to be careful not to commit any such offence because of their relationship.
Such therefore may be our decision as to community of children and women.
In connection with this we have to consider the due regulation of property in a community that is to have the best political institutions: should property be owned in common or privately? This question might indeed be considered separately from the system laid down by law with regard to the children and the women:
The comic poet, figuring as a character in Plato's __Symposium,__ see especially http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Sym.%20192c&lang=original.
The three classes in Plato's __Republic__.
I mean, even if there be separate families as is now the case with all nations, is it better for both the ownership and the employment of property to be in common. . . ,^^[[1|Rackham: Book: 2, Section: 1263a, Note: 1]]^^ for example, should the farms be separate property but the farm-produce be brought into the common stock for consumption (as is the practice with some non-Greek races); or on the contrary should the land be common and farmed in common, but the produce be divided for private use (and this form of communism also is said to prevail among some of the barbarians); or should both farms and produce be common property? Now if the tillers of the soil be of a different class^^[[2|Rackham: Book: 2, Section: 1263a, Note: 2]]^^ there might be another and easier system, but if the citizens do the work for themselves, the regulations for the common ownership of property would give more causes for discontent; for if both in the enjoyment of the produce and in the work of production they prove not equal but unequal, complaints are bound to arise between those who enjoy or take much but work little and those who take less but work more. And in general to live together and share all our human affairs is difficult, and especially to share such things as these. And this is shown in the partnerships of fellow-travellers, for almost the greatest number of them quarrel because they come into collision with one another as a result of ordinary matters and trifles; and also we come into collision most with those of our servantswhom we employ most often for ordinary attendance. Community of property therefore involves these and other similar difficulties; and the present system, if further improved by good morals and by the regulation of correct legislation, would be greatly superior. For it will possess the merit of both systems, by which I mean the advantage of property being common and the advantage of its being private. For property ought to be common in a sense but private speaking absolutely. For the superintendence of properties being divided among the owners will not cause these mutual complaints, and will improve the more because each will apply himself to it as to private business of his own; while on the other hand virtue will be exercised to make ‘friends' goods common goods,’ as the proverb^^[[3|Rackham: Book: 2, Section: 1263a, Note: 3]]^^ goes, for the purpose of use. Such a system exists even now in outline in some states, showing that it is not impracticable, and especially in the ones that are well-administered parts of it are realized already and parts might be realized; for individuals while owning their property privately put their own possessions at the service of their friends and make use of their friends' possessions as common property; for instance in Sparta people use one another's slaves as virtually their own, as well as horses and hounds, and also use the produce in the fields throughout the country if they need provisions on a journey. It is clear therefore that it is better for possessions to be privately owned, but to make them common property in use; and to train the citizens to this is the special task of the legislator. And moreover to feel that a thing is one's private property makes an inexpressibly great difference for pleasure; for the universal feeling of love for oneself is surely not purposeless, but a natural instinct.
Something has clearly been lost here, signifying ‘or should there be some limited form of communism?’
i.e. a class of serfs, like the Helots at Sparta.
The saying was ascribed to Pythgagoras.
Selfishness on the other hand is justly blamed; but this is not to love oneself but to love oneself more than one ought, just as covetousness means loving money to excess—since some love of self, money and so on is practically universal. Moreover, to bestow favors and assistance on friends or visitors or comrades is a great pleasure, and a condition of this is the private ownership of property. These advantages therefore do not come to those who carry the unification of the state too far; and in addition to this they manifestly do away with the practice of two virtues, temperance in relation to women (for it is a noble deed to refrain from one through temperance when she belongs to another) and liberality in relation to possessions (for one will not be able to display liberality nor perform a single liberal action, since the active exercise of liberality takes place in the use of possessions).
Such legislation therefore has an attractive appearance, and might be thought to be humane; for he who is told about it welcomes it with gladness, thinking that it will result in a marvellous friendliness of everybody towards everybody, especially when somebody denounces the evils at present existing in states as due to the fact thatwealth is not owned in common— I mean lawsuits between citizens about breach of contract, and trials for perjury, and the flattery of the rich. But the real cause of all these evils is not the absence of communism, but wickedness, since we see far more quarrels occurring among those who own or use property in common than among those who have their estates separate; but we notice that those who quarrel as a result of their partnerships are few when compared with the total number of private owners. And again it is just to state not only all the evils that men will lose by adopting communism, but also all the good things; and life in such circumstances is seen to be utterly impossible. The cause of Socrates' error must be deemed to be that his fundamental assumption was incorrect. It is certain that in a way both the household and the state should be a unit, but they should not be so in every way. For in one way the state as its unification proceeds will cease to be a state, and in another way, though it continues a state, yet by coming near to ceasing to be one it will be a worse state, just as if one turned a harmony into unison or a rhythm into a single foot. The proper thing is for the state, while being a multitude, to be made a partnership and a unity by means of education, as has been said before and it is strange that the very philosopher who intends to introduce a system of education and thinks that this will make the city morally good should fancy that he can regulate society by such measures as have been mentioned instead of by manners and culture and laws, just as the legislator introduced community of property in Sparta and Crete by the institution of public messes.
And this very point also must not be ignored, that attention must be paid to length of time and to the long period of years, in which it would not have escaped notice if these measures were good ones; for nearly all of them have been discovered already, although some of them have not been collected together and others though brought to knowledge are not put into practice. And their value would become most manifest if one could see such a constitution in actual process of formation; for one will only be able to construct Plato's state by introducing its partitions and dividing up the community into common messes and also into brotherhoods and tribes. So that in the upshot no other regulation will have been enacted except the exemption of the Guardians from the work of agriculture, which is a measure that even now the Spartans attempt to introduce.
Moreover, the working of the constitution as a whole in regard to the members of the state has also not been described by Socrates, nor is it easy to say what it will be. Yet the general mass of the citizens of the other classes make almost the bulk of the state, and about these no definite regulations are laid down, as to whether the Farmers also are to have their property in common or to hold it in private ownership, and also whether community of wives and children is to apply to them or not. For if the Farmers are to have the same complete communism, what will be the difference between them and the Guardian class? or what advantage will they gain by submitting to their government? or what consideration will induce them to submit tothe government, unless the Guardians adopt some clever device like that of the Cretans? These have conceded to their slaves all the same rights as they have themselves except that they are forbidden gymnastic exercises and the possession of arms. But if the family life and property of the Farmers are to be such as they are in other states, what sort of communism will there be? For there will inevitably be two states in one, and these antagonistic to one another. For Socrates makes the Guardians a sort of garrison, while the Farmers, Artisans and other classes are the citizens.^^[[1|Rackham: Book: 2, Section: 1264a, Note: 1]]^^ But quarrels and lawsuits and all the other evils which according to Socrates exist in actual states will all be found among his citizens too. Yet he says that owing to their education they will not need many regulations such as city and market by-laws and the other regulations of that sort, although he assigns his education only to the Guardians. Again, he makes the Farmers the masters of the estates, for which they pay rent; but they are likely to be far more unmanageable and rebellious than the classes of helots, serfs and slaves in certain states today. However, whether this communism is to be compulsory for the Farmers in the same way as for the Guardians or whether it is not, has as a matter of fact not been definitely stated anywhere, nor is there any information about the connected questions, what are to be the political functions and the education of the lower classes, and the laws affecting them. But it is not easy to discover the answers to these questions, yet the character of the lower classes is of no small importance for the preservation of the community of the Guardians.
Or(omitting τοὺς before τεχνίτας)‘For Socrates makes one set of men guardians, a sort of garrison, and another set farmers and artisans and citizens of the other sorts.’
But again, if Socrates intends to make the Farmers have their wives in common but their property private, who is to manage the household in the way in which the women's husbands will carry on the work of the farms? And if the property and the wives of the Farmers are to be common . . .^^[[1|Rackham: Book: 2, Section: 1264b, Note: 1]]^^
It is also strange that Socrates employs the comparison of the lower animals to show that the women are to have the same occupations as the men, considering that animals have no households to manage. Also Socrates' method of appointing the magistrates is not a safe one. For he makes the same persons hold office always; but this occasions rebellion even among people of no special distinction, much more so then among high-spirited and warlike men. But it is clear that he is compelled to make the same persons govern always, for the god-given admixture of gold in the soul is not bestowed on some at one time and others at another time, but is always in the same men, and Socrates says that at the moment of birth some men receive an admixture of gold and others of silver and those who are to be the Artisans and Farmers an admixture of copper and iron. And again, although he deprives the Guardians of happiness, he says that it is the duty of the law-giver to make the whole city happy. But it is not possible for the whole to be happy unless most or all of its parts, or some of them, possess happiness. For happiness is not a thing of the same sortas being an even number: that may belong to a whole but not to either of its parts, but happiness cannot belong to the whole and not to its parts. But yet, if the Guardians are not happy, what other class is? For clearly the Artisans and the general mass of the vulgar classes are not.
The Republic discussed by Socrates therefore possesses these difficulties and also others not smaller than these.
And almost the same holds good of the __Laws__ also, which was written later, so that it will be advantageous to make some small examination of the constitution described in that book as well. For in the __Republic__ Socrates has laid down details about very few matters—regulations about community of wives and children and about property, and the structure of the constitution (for the mass of the population is divided into two parts, one forming the Farmer class and the other the class that defends the state in war, and there is a third class drawn from these latter that forms the council and governs the state), but about the Farmers and the Artisans, whether they are excluded from government or have some part in it, and whether these classes also are to possess arms and to serve in war with the others or not, on these points Socrates has made no decision, but though he thinks that the women ought to serve in war with the Guardians and share the same education, the rest of the discourse he has filled up with external topics, and about the sort of education which it is proper for the Guardians to have.^^[[2|Rackham: Book: 2, Section: 1264b, Note: 2]]^^
A passage has been lost here.
The last clause, ‘and about—to have,’ has almost certainly been misplaced by a copyist, and should come near the beginning of the sentence, after ‘about property.’
But though the __Laws__ consists for the most part of a treatise on law, the author has said a little about the form of the constitution, and in a desire to make this more suitable for adoption by actual states he brings it round by degrees back to the other form, that of the __Republic__. For except community in wives and property, he assigns all his other regulations in the same form to both states, for he prescribes for both the same scheme of education, and a life detached from menial tasks, and similarly as regards common meals, except that in the state described in the __Laws__ he says there are to be common meals for women also, and he makes the Republic consist of a class possessing arms that numbers a thousand, but the state of the __Laws__ has five thousand.
Now it is true that all the discourses of Socrates possess brilliance, cleverness, originality and keenness of inquiry, but it is no doubt difficult to be right about everything: for instance with regard to the size of population just mentioned it must not be over-looked that a territory as large as that of Babylon will be needed for so many inhabitants, or some other country of unlimited extent, to support five thousand men in idleness and another swarm of women and servants around them many times as numerous. It is proper no doubt to assume ideal conditions, but not to go beyond all bounds of possibility. And it is said that in laying down the laws the legislator must have his attention fixed on two things,the territory and the population. But also it would be well to add that he must take into account the neighboring regions also, if the city is to live a life of politics^^[[1|Rackham: Book: 2, Section: 1265a, Note: 1]]^^ (for it is necessary for it to use for war not only such arms as are serviceable within its own territory but also such as are serviceable against places outside it); and if one does not accept such a description whether for the life of the individual or for the common life of the state, yet it is none the less necessary for the citizens to be formidable to their enemies not only when they have entered the country but also when they have left it.^^[[2|Rackham: Book: 2, Section: 1265a, Note: 2]]^^ Also the amount of property requires consideration: would it not perhaps be better to define it differently, by a clearer formula? The writer says that it ought to be sufficiently large for the citizens ‘to live a temperate life’—as if one were to say ‘to live a good life’; but really that phrase is too general, since it is possible to live temperately yet miserably. But a better definition would be ‘to live temperately and liberally’ (for if the two are separated a liberal mode of life is liable to slip into luxury and a temperate one into a life of hardship), since surely these are the only desirable qualities relating to the use of wealth—for instance you cannot use wealth gently or bravely, but you can use it temperately and liberally, so that it follows that these are qualities that have to do with wealth. And it is also strange that although equalizing properties the writer does not regulate the number of the citizens, but leaves the birth-rate uncontrolled, on the assumption that it will be sufficiently levelled up to the same total owing to childless marriages, however many children are begotten,
i.e. a life of intercourse with other states, cf. 1327b 5. Some mss. add ‘not one of isolation’; this looks like an explanatory note interpolated.
Perhaps the Greek should be altered to give ‘when they are away from it.’
because this seems to take place in the states at present. But this ought to be regulated much more in the supposed case than it is now, for now nobody is destitute, because estates are divided among any number, but then, as division of estates will not be allowed, the extra children will necessarily have nothing, whether they are fewer in number or more. And one might think that restriction ought to be put on the birth-rate rather than on property, so as not to allow more than a certain number of children to be produced, and that in fixing their number consideration should be paid to the chances of its happening that some of the children born may die, and to the absence of children in the other marriages; but for the matter to be left alone, as it is in most states, is bound to lead to poverty among the citizens, and poverty produces sedition and crime. The Corinthian Phidon^^[[1|Rackham: Book: 2, Section: 1265b, Note: 1]]^^ in fact, one of the most ancient lawgivers, thought that the house-holds and the citizen population ought to remain at the same numbers, even though at the outset the estates of all were unequal in size; but in Plato's __Laws__ the opposite is the case.^^[[2|Rackham: Book: 2, Section: 1265b, Note: 2]]^^ However, we must say later what we think would be a better system in these matters; but another question omitted in the __Laws__ is how the rulers will be different from the classes ruled; the writer prescribesthat the rulers are to stand in the same relation to the ruled as the warp of cloth stands to the woof by being made of different wool.^^[[3|Rackham: Book: 2, Section: 1265b, Note: 3]]^^ And inasmuch as he allows a man's total property to be increased up to five times its original value, for what reason should not an increase in his landed estate be allowed up to a certain point? Also it must be considered whether the proposed separation of homesteads is not inexpedient for household economy—for the writer allotted two homesteads separate from one another to each citizen; but it is difficult to manage two households.^^[[4|Rackham: Book: 2, Section: 1265b, Note: 4]]^^ And the whole constitution is intended, it is true, to be neither a democracy nor an oligarchy, but of the form intermediate between them which is termed a republic, for the government is constituted from the class that bears arms. If therefore he introduces this constitution as the one most commonly existing of all forms of constitution in the actual states, he has perhaps made a good proposal, but if he introduces it as the next best to the first form of constitution, it is not a good proposal; for very likely one might approve the Spartan constitution more highly, or perhaps some other form nearer to an aristocracy. In fact some people assert that the best constitution must be a combination of all the forms of constitution, and therefore praise the constitution of Sparta (for some people say that it consists of oligarchy, monarchy and democracy, meaning that the kingship is monarchy and the rule of the ephors oligarchy, but that an element of democracy is introduced by the rule of the ephors because the ephors come from the common people; while others pronounce the ephorate a tyranny but find an element of democracy in the public mess-tables and in the other regulations of daily life).
i.e. the estates are equal, and the number of households fixed, but not the number of citizens.
http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Laws%20734e&lang=original In weaving cloth the warp (the threads set up first) must be of strong wool, the woof (the threads woven across the warp) must be softer.
The object was to provide a separate establishment for a married son, http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Laws%20776a&lang=original.
In Plato's __Laws__ on the other hand it is stated that the best constitution must consist of a combination of democracy and tyranny,^^[[1|Rackham: Book: 2, Section: 1266a, Note: 1]]^^ which one might refuse to count as constitutional governments at all, or else rank as the worst of all constitutions. A better theory therefore is put forward by those who intermingle a larger number of forms, for the constitution composed of a combination of a larger number of forms is better. In the next place, the constitution in the __Laws__ proves as a matter of fact not to contain any element of monarchy at all, but its factors are taken from oligarchy and democracy, and for the most part it tends to incline towards oligarchy. This appears from the regulations for the appointment of the magistrates; for their selection by lot from a list previously elected by vote is a feature common to both oligarchy and democracy, but the compulsion put upon the richer citizens to attend the assembly and vote for magistrates or perform any other political function, while the others are allowed to do as they like, is oligarchical, as is the endeavor to secure that a majority of the magistrates shall be drawn from the wealthy and that the highest offices shall be filled from the highest of the classes assessed by wealth. But the writer also makes the election of the council oligarchical for everybody is compelled to elect, but from the first property-class, and then again an equal number from the second class, and then from the members of the third class, except that it was not to be compulsory for all to vote for those to be elected from the members of the third or the fourth class, and to elect from the fourth class was only compulsory for the members of the first and second classes; and afterwards from those thus selected he says that they are to appointan equal number from each class. Thus those who elect the members from the highest property classes will be more numerous and better,^^[[2|Rackham: Book: 2, Section: 1266a, Note: 2]]^^ because some of the lower orders will abstain from voting^^[[3|Rackham: Book: 2, Section: 1266a, Note: 3]]^^ as it is not compulsory. Accordingly that it is not proper to establish a constitution of this character from a blend of democracy and monarchy appears clearly from these considerations, and from what will be said later when our inquiry comes to deal with this class of constitution; also the provision for the election of the rulers from among candidates chosen at a preliminary election is dangerous, for if even a moderate number of people choose to combine into a party, the elections will always go according to their wish.
Such are the points as to the constitution in the __Laws.__
There are also certain other constitutional schemes, some drawn up by amateurs and others by philosophers and statesmen, but all of them are nearer to those which have been actually established and by which states are governed at present than are both of those which have been considered; for nobody else has introduced the innovation of community of children and women, nor that of public meals for the women, but they start rather with the necessary reforms. For some persons think that the right regulation of property is the most important; for the question of property, they say, is universally the cause of party strife. Therefore the Chalcedonian Phaleas^^[[4|Rackham: Book: 2, Section: 1266a, Note: 4]]^^ was the first who introduced this expedient; for he says that the citizens' estates ought to be equal
Plato wrote ‘monarchy,’ http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Laws%20693d&lang=original (cf. here 3.13).
i.e. a better ellective body because representative of all classes.
i.e. from voting for the preliminary list from the third and fourth classes.
and he thought that this would not be difficult to secure at the outset for cities in process of foundation, while in those already settled, although it would be a more irksome task, nevertheless a levelling would most easily be effected by the rich giving dowries but not receiving them and the poor receiving but not giving them. Plato when writing the __Laws__ thought that up to a certain point inequality ought to be allowed, but that no citizen should be permitted to acquire more land than would make his estate five times the size of the smallest, as has also been said before.
But those who bring in legislation of this sort must also not overlook this point, which is overlooked at present, that when regulating the amount of property legislators ought also to regulate the size of the family; for if the number of children becomes too large for the property, the law is quite sure to be broken, and apart from the breach of the law it is a bad thing that many citizens who were rich should become poor, for it is difficult for such men not to be advocates of a new order. That a level standard of property affects the community of the citizens in an important manner some men even in old times clearly have recognized; for example there is the legislation of Solon, and other states have a law prohibiting the acquisition of land to any amount that the individual may desire; and similarly there is legislation to prevent the sale of estates, as at Locri there is a lawthat a man shall not sell unless he can prove that manifest misfortune has befallen him and also there is legislation to preserve the old allotments, and the repeal of this restriction at Leucas made the Leucadian constitution excessively democratic, for it came about that the offices were no longer filled from the established property-qualifications. But it is possible that equality of estates may be maintained, but their size may be either too large and promote luxury, or too small, causing a penurious standard of living; it is clear therefore that it is not enough for the lawgiver to make the estates equal, but he must aim at securing a medium size. And again, even if one prescribed a moderate property for all, it would be of no avail, since it is more needful to level men's desires than their properties, and this can only be done by an adequate system of education enforced by law. But perhaps Phaleas would say that he himself actually prescribes this, as he considers it fundamentally necessary for states to have equality in these two things, property and education. But the nature of the education needs to be defined: it is no use merely for it to be one and the same for all, for it is possible for all to have one and the same education but for this to be of such a nature as to make them desirous of getting more than their share of money or honor or both; moreover^^[[1|Rackham: Book: 2, Section: 1266b, Note: 1]]^^ civil strife is caused not only by inequality of property but also by inequality of honors, though the two motives operate in opposite ways—the masses are discontented if possessions are unequally distributed,
Probably the Greek should be altered to give ‘because’ instead of ‘moreover.’
the upper classes if honors are equally distributed, bringing it about that
<<<
Noble and base in equal honor stand.^^[[1|Rackham: Book: 2, Section: 1267a, Note: 1]]^^
<<<
Nor do men do wrong for the sake of the bare necessities only, the sort of wrongdoing for which Phaleas thinks that equality of substance is a cure—preventing highway robbery by removing the motive of cold or hunger; men also do wrong to gain pleasure and to satisfy desire. For if they have a desire above the bare necessities of existence, they will transgress to cure this desire; and moreover not because of desire only, but in order that they may enjoy the pleasures that are not associated with pains. What remedy then is there for these three classes of offenders? For the first class, a modest competence and work; for the second, temperance; and as for the third sort, any people who desire pleasures that depend on themselves would require no cure for their desires save that which is derived from philosophy, for the other pleasures require the aid of fellow-creatures. Since clearly the greatest transgressions spring from a desire for superfluities, not for bare necessaries (for example, men do not become tyrants in order to avoid shivering with cold, and accordingly high honors are awarded to one who kills a tyrant, but not to one who kills a thief); so that the method of the constitution of Phaleas is efficacious only against the minor social disorders. Again, Phaleas desires to frame institutions for the most part which will lead to a right state of affairs in the internal relations of the citizens, but the legislator should also have regard to relations with the neighboring peoples and with all foreign nations.It is essential therefore for the constitution to be framed with a view to military strength, about which Phaleas has said nothing. And the same is true also about property; for the citizens should not only possess enough to meet their requirements in civic life, but also to encounter the perils that face them from outside; hence they should possess neither so large an amount of wealth that it will be coveted by their neighbors and by stronger states while its possessors will be unable to repel their assailants, nor yet so small an amount as not to be capable of sustaining a war even against equal and similar states. Phaleas, it is true, has laid down no rule at all, but the question must not be overlooked, what amount of wealth is advantageous. Perhaps therefore the best limit to prescribe is that it must not profit a stronger people to make war upon the state because of its excessive wealth, but only just as it might do even if the citizens had not got so much property. For example, when Autophradates was about to lay siege to Atarneus,^^[[2|Rackham: Book: 2, Section: 1267a, Note: 2]]^^ Eubulus bade him consider how long it would take him to capture the place, and then calculate what his expenditure would be for that period, for he himself was willing for the payment of a smaller sum than that to evacuate Atarneus at once; these words caused Autophradates to ponder and led him to abandon the siege. Now equality of property among the citizens is certainly one of the factors that contribute to the avoidance of party faction; it is not however a particularly important one. For the upper classes may resent it on the ground that their merits are not equal, owing to which we actually see them often attacking the government and rebelling;
http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%209.319&lang=original
A stronghold on the coast of Asia Minor acquired by Eubulus, a Bithynian banker, when the Persian empire was breaking up, middle 4th century B.C.; Autophradates was a Persian general.
and also the baseness of human beings is a thing insatiable, and though at the first a dole of only two obols^^[[1|Rackham: Book: 2, Section: 1267b, Note: 1]]^^ is enough, yet when this has now become an established custom, they always want more, until they get to an unlimited amount; for appetite is in its nature unlimited, and the majority of mankind live for the satisfaction of appetite. The starting-point in such matters therefore, rather than levelling estates, is to train those that are respectable by nature so that they may not wish for excessive wealth, and to contrive that the base may not be able to do so, and this is secured if they are inferior in number and not unjustly treated. And also we cannot approve what Phaleas has said about equality of property, for he makes the citizens equal in respect of landed estate only, but wealth also consists in slaves and cattle and money, and there is an abundance of property in the shape of what is called furniture; we must therefore either seek to secure equality or some moderate regulation as regards all these things, or we must permit all forms of wealth. And it is clear from Phaleas's legislation that he makes the citizen-population a small one, inasmuch as all the artisans are to be publicly owned slaves and are not to furnish any complement of the citizen-body. But if it is proper to have public slaves, the laborers employed upon the public works ought to be of that status (as is the case at Epidamnus and as Diophantus once tried to institute at Athens).
These remarks may serve fairly well to indicate such meritsand defects as may be contained in the constitution of Phaleas.
Hippodamus^^[[2|Rackham: Book: 2, Section: 1267b, Note: 2]]^^ son of Euryphon, a Milesian (who invented the division of cities into blocks and cut up Piraeus, and who also became somewhat eccentric in his general mode of life owing to a desire for distinction, so that some people thought that he lived too fussily, with a quantity of hair^^[[3|Rackham: Book: 2, Section: 1267b, Note: 3]]^^ and expensive ornaments, and also a quantity of cheap yet warm clothes not only in winter but also in the summer periods, and who wished to be a man of learning in natural science generally), was the first man not engaged in politics who attempted to speak on the subject of the best form of constitution. His system was for a city with a population of ten thousand, divided into three classes; for he made one class of artisans, one of farmers, and the third the class that fought for the state in war and was the armed class. He divided the land into three parts, one sacred, one public and one private: sacred land to supply the customary offerings to the gods, common land to provide the warrior class with food, and private land to be owned by the farmers. He thought that there are only three divisions of the law, since the matters about which lawsuits take place are three in number—outrage, damage, homicide. He also proposed to establish one supreme court of justice, to which were to be carried up all the cases at law thought to have been decided wrongly, and this court he made to consist of certain selected elders.
Twopence-halfpenny for a seat in the theater at Athens paid for citizens by the State after the time of Pericles.
A famous architect and town-planner (see 1330b 24) circa 475 B.C.
At Sparta men wore their hair long, but at Athens this was the mark of a dandy.
He held that the verdicts in the courts ought not to be given by ballot, but that each juryman should bring a tablet on which if he found a simple verdict of guilty he should write the penalty, and if simply not guilty leave a blank, but if he found the prisoner guilty on some counts but not on others he should state this; for the present state of the law he thought unsatisfactory, since it forces jurors to commit perjury by giving either the one verdict or the other. He proposed a law that those who discovered something of advantage to the state should receive honor, and that the children of those who died in war should have their maintenance from the state, in the belief that this had never yet been provided by law among other people—but as a matter of fact this law exists at present both at Athens and in others of the cities. The governing officials were all to be chosen by the assembly of the people, and this he made to consist of the three classes of the city; and the officials elected were to superintend the business of the community and the affairs of foreign residents and of orphans. These then are the greatest number and the most noteworthy of the provisions in the system of Hippodamus. But doubt might be raised first of all about the division of the general mass of the citizens. The artisans, the farmers and the military class all participate in the government, though the farmers have not got arms and the artisans neither arms nor land,which makes them almost the slaves of those who possess the arms. Therefore for them to share in all the offices is impossible (for it is inevitable that both military commanders and civic guards and in general the most important offices should be appointed from those that have the arms); but if they do not share in the government of the state, how is it possible for them to be friendly towards the constitution? But it may be said that the ruling class as possessing the arms is bound to be stronger than both classes. But this is not easy if they are not numerous and if this be the case, why should the other classes participate in the government and control the appointment of the rulers?^^[[1|Rackham: Book: 2, Section: 1268a, Note: 1]]^^ Again, what use are the farmers to the state? artisans there must necessarily be (for every state requires artisans), and they can make a living as in the other states from the practice of their craft; but as for the farmers, although it would have been reasonable for them to be a portion of the state if they provided the class possessing the arms with its food, as it is they have private land of their own and farm it for themselves. And again, if the common land from which those who fight for the state are to have their food is to be farmed by themselves, the military class would not be different from the agricultural, but the legislator intends it to be; while if the cultivators of the common land are to be a different set of people from both those who cultivate the private farms and the soldiers, this will be yet a forth section of the state, holding no part in it but quite estranged from the government. But yet if one is to make those who cultivate the private and the common land the same people, the amount of the produce from the farms which each man will cultivate will be scanty for two households,
As military posts must be filled by the military class, the civilians will feel excluded and be disaffected; and the military class may not be strong enough to control them. Better, then, not to give full citizenship to civilians.
and moreover why are they not both to take food for themselves and to supply it to the soldiers direct from the land and from the same allotments? All these points therefore involve much confusion. Also the law about trials is unsatisfactory—the requirement that the verdict shall be given on separate counts when the charge in the indictment is single, and the conversion of the juror into an arbitrator. A qualified verdict is practicable in an arbitration even when there are several arbitrators (for they confer with one another about their verdict), but it is not practicable in the law-courts, but the contrary to this is actually provided for by most lawgivers, who prohibit consultation between the jurymen. Then the verdict will inevitably be a confused one when the juror thinks that the defendant is liable for damages but not in so large an amount as the plaintiff claims; for the plaintiff will sue for twenty minae^^[[1|Rackham: Book: 2, Section: 1268b, Note: 1]]^^ and the juror will adjudge ten minae (or the former some larger and the latter some smaller sum), and another juror five minae, and yet another four (and so they will obviously go on making fractions), while others will award the whole sum, and others nothing; what then will be the method of counting the votes? Again, nobody compels the juror to commit perjury who, if the indictment has been drawn in simple form, gives a simple verdict of acquittal or condemnation, and gives it justly; for the jurorwho gives a verdict of acquittal does not give judgement that the defendant owes nothing, but that he does not owe the twenty minae for which he is sued; it is only the juror who gives a verdict condemning the defendant when he does not think that he owes twenty minae who commits perjury. As for the view that an honor ought to be awarded to those who invent something advantageous to the state, legislation to this effect is not safe, but only specious to the ear; for it involves malicious prosecutions and, it may even happen, constitutional upheavals. And the matter leads to another problem and a different inquiry: some persons raise the question whether to alter the ancestral laws, supposing another law is better, is harmful or advantageous to states. Hence it is not easy to give a speedy agreement to the above proposal to honor reformers, if really it is disadvantageous to alter the laws; yet it is possible that persons may bring forward the repeal of laws or of the constitution as a benefit to the community. And since we have made mention of this question, it will be better if we set out a few further observations about it, for, as we said, it involves difficulty. And it might be thought that it would be better for alteration to take place; at all events in the other fields of knowledge this has proved beneficial—for example, medicine has been improved by being altered from the ancestral system, and gymnastic training, and in general all the arts and faculties so that since statesmanship also is to be counted as one of these, it is clear that the same thing necessarily holds good in regard to it as well. And it might be said that a sign of this has occurred in the actual events of history, for (one might argue) the laws of ancient times were too simple and uncivilized: the Hellenes, for instance, used both to carry arms and to purchase their wives from one another, and all the survivals of the customs of antiquity existing anywhere are utterly foolish,
The mina, 100 drachmas, may be put at 4 pounds (gold).
as for example at Cyme there is a law relating to trials for murder, that if the prosecutor on the charge of murder produces a certain number of his own relatives as witnesses, the defendant is guilty of the murder. And in general all men really seek what is good, not what was customary with their forefathers; and it is probable that primitive mankind, whether sprung from the earth^^[[1|Rackham: Book: 2, Section: 1269a, Note: 1]]^^ or the survivors of some destructive cataclysm,^^[[2|Rackham: Book: 2, Section: 1269a, Note: 2]]^^ were just like ordinary foolish people, as indeed is actually said of the earth-born race, so that it is odd that we should abide by their notions. Moreover even written codes of law may with advantage not be left unaltered. For just as in the other arts as well, so with the structure of the state it is impossible that it should have been framed aright in all its details; for it must of necessity be couched in general terms, but our actions deal with particular things. These considerations therefore make it clear that it is proper for some laws sometimes to be altered. But if we consider the matter in another way, it would seem to be a thing that needs much caution. For when it is the case that the improvement would be small, but it is a bad thing to accustom men to repeal the laws lightly, it is clear that some mistakes both of the legislator and of the magistrate should be passed over; for the people will not be as much benefited by making an alteration as they will be harmed by becoming accustomed to distrust their rulers. Also, the example from the case of the arts is a mistake,as to change the practice of an art is a different thing from altering a law; for the law has no power to compel obedience beside the force of custom, and custom only grows up in long lapse of time, so that lightly to change from the existing laws to other new laws is to weaken the power of the law. Again, even if alteration of the laws is proper, are all the laws to be open to alteration, and in every form of constitution, or not? and is any chance person to be competent to introduce alterations or only certain people? for there is a great difference between these alternatives. Therefore let us abandon this inquiry for the present, since it belongs to other occasions.
On the subject of the constitution of Sparta and that of Crete, and virtually in regard to the other forms of constitution also, the questions that arise for consideration are two, one whether their legal structure has any feature that is admirable or the reverse in comparison with the best system, another whether it contains any provision that is really opposed to the fundamental principle and character of the constitution that the founders had in view.
Now it is a thing admitted that a state that is to be well governed must be provided with leisure from menial occupations; but how this is to be provided it is not easy to ascertain. The serf class in Thessaly repeatedly rose against its masters, and so did the Helots at Sparta, where they are like an enemy constantly sitting in wait for the disasters of the Spartiates. Nothing of the kind has hitherto occurred in Crete, the reason perhaps being that the neighboring cities,
So http://www.perseus.tufts.edu/hopper/text?doc=Hes.%20WD%20108&lang=original, http://www.perseus.tufts.edu/hopper/text?doc=Pind.%20N.%206&lang=original.
So http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Laws%20676&lang=original, http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Tim.%2022&lang=original Aristotle believed that man had existed for ever, and that the world had experienced only local cataclysms.
even when at war with one another, in no instance ally themselves with the rebels, because as they themselves also possess a serf class this would not be for their interest; whereas the Laconians were entirely surrounded by hostile neighbors, Argives, Messenians and Arcadians. For with the Thessalians too the serf risings originally began because they were still at war with their neighbors, the Achaeans, Perraebi and Magnesians. Also, apart from other drawbacks, the mere necessity of policing a serf class is an irksome burden—the problem of how intercourse with them is to be carried on: if allowed freedom they grow insolent and claim equal rights with their masters, and if made to live a hard life they plot against them and hate them. It is clear therefore that those whose helot-system works out in this way do not discover the best mode of treating the problem. Again, the freedom in regard to women is detrimental both in regard to the purpose of the constitution and in regard to the happiness of the state. For just as man and wife are part of a household, it is clear that the state also is divided nearly in half into its male and female population, so that in all constitutions in which the position of the women is badly regulated one half of the state must be deemed to have been neglected in framing the law. And this has taken place in the state under consideration,for the lawgiver wishing the whole city to be of strong character displays his intention clearly in relation to the men, but in the case of the women has entirely neglected the matter; for they live dissolutely^^[[1|Rackham: Book: 2, Section: 1269b, Note: 1]]^^ in respect of every sort of dissoluteness, and luxuriously. So that the inevitable result is that in a state thus constituted wealth is held in honor, especially if it is the case that the people are under the sway of their women, as most of the military and warlike races are, except the Celts and such other races as have openly held in honor passionate friendship between males. For it appears that the original teller of the legend had good reason for uniting Ares with Aphrodite, for all men of martial spirit appear to be attracted to the companionship either of male associates or of women. Hence this characteristic existed among the Spartans, and in the time of their empire many things were controlled by the women; yet what difference does it make whether the women rule or the rulers are ruled by the women? The result is the same. And although bravery is of service for none of the regular duties of life, but if at all, in war, even in this respect the Spartans' women were most harmful; and they showed this at the time of the Theban invasion,^^[[2|Rackham: Book: 2, Section: 1269b, Note: 2]]^^ for they rendered no useful service, as the women do in other states, while they caused more confusion than the enemy. It is true therefore that at the outset the freedom allowed to women at Sparta seems to have come about with good reason,
The textual emendation giving ‘live without restraint’ is probably correct.
Under Epaminondas, 369 B.C.
for the Spartans used to be away in exile abroad for long periods on account of their military expeditions, both when fighting the war against the Argives and again during the war against the Arcadians and Messenians; but when they had turned to peaceful pursuits, although they handed over themselves to the lawgiver already prepared for obedience by military life (for this has many elements of virtue), as for the women it is said that Lycurgus did attempt to bring them under the laws, but since they resisted he gave it up. So the Spartan women are, it is true, responsible for what took place, and therefore manifestly for this mistake among the rest; although for our own part we are not considering the question who deserves excuse or does not, but what is the right or wrong mode of action. But, as was also said before, errors as regards the status of women seem not only to cause a certain unseemliness in the actual conduct of the state but to contribute in some degree to undue love of money. For next to the things just spoken of one might censure the Spartan institutions with respect to the unequal distribution of wealth. It has come about that some of the Spartans own too much property and some extremely little; owing to which the land has fallen into few hands, and this has also been badly regulated by the laws;for the lawgiver made it dishonorable to sell a family's existing estate, and did so rightly, but he granted liberty to alienate land at will by gift or bequest; yet the result that has happened was bound to follow in the one case as well as in the other. And also nearly two-fifths of the whole area of the country is owned by women, because of the number of women who inherit estates and the practice of giving large dowries; yet it would have been better if dowries had been prohibited by law or limited to a small or moderate amount . . .^^[[1|Rackham: Book: 2, Section: 1270a, Note: 1]]^^ But as it is he is allowed to give an heiress in marriage to whomever he likes; and if he dies without having made directions as to this by will, whoever he leaves as his executor bestows her upon whom he chooses. As a result of this^^[[2|Rackham: Book: 2, Section: 1270a, Note: 2]]^^ although the country is capable of supporting fifteen hundred cavalry and thirty thousand heavy-armed troopers, they numbered not even a thousand. And the defective nature of their system of land-tenure has been proved by the actual facts of history: the state did not succeed in enduring a single blow,^^[[3|Rackham: Book: 2, Section: 1270a, Note: 3]]^^ but perished owing to the smallness of its population. They have a tradition that in the earlier reigns they used to admit foreigners to their citizenship, with the result that dearth of population did not occur in those days, although they were at war for a long period; and it is stated that at one time the Spartiates numbered as many as ten thousand. However, whether this is true or not, it is better for a state's male population to be kept up by measures to equalize property. The law in relation to parentage is also somewhat adverse to the correction of this evil.
A clause seems to have been lost: ‘Also it would have been better to regulate by law the marriage of heiresses.’
i.e. the consequent fall in the number of men rich enough to keep a horse or even to provide themselves with heavy arms.
The battle of Leuctra, 371 B.C.
For the lawgiver desiring to make the Spartiates as numerous as possible holds out inducements to the citizens to have as many children as possible: for they have a law releasing the man who has been father of three sons from military service, and exempting the father of four from all taxes. Yet it is clear that if a number of sons are born and the land is correspondingly divided there will inevitably come to be many poor men.
Moreover the regulations for the Ephorate^^[[1|Rackham: Book: 2, Section: 1270b, Note: 1]]^^ are also bad. For this office has absolute control over their most important affairs, but the Ephors are appointed from the entire people, so that quite poor men often happen to get into the office, who owing to their poverty used to be^^[[2|Rackham: Book: 2, Section: 1270b, Note: 2]]^^ easily bought. This was often manifested in earlier times, and also lately in the affair^^[[3|Rackham: Book: 2, Section: 1270b, Note: 3]]^^ at Andros; for certain Ephors were corrupted with money and so far as lay in their power ruined the whole state. And because the office was too powerful, and equal to a tyranny, the kings also were compelled to cultivate popular favor, so that in this way too the constitution was jointly injured, for out of an aristocracy came to be evolved a democracy. Thus this office does, it is true, hold together the constitution—for the common people keep quiet because they have a share in the highest office of state, so that whether this is due to the lawgiver orhas come about by chance, the Ephorate is advantageous for the conduct of affairs; for if a constitution is to be preserved, all the sections of the state must wish it to exist and to continue on the same lines; so the kings are in this frame of mind owing to their own honorable rank, the nobility owing to the office of the Elders, which is a prize of virtue, and the common people because of the Ephorate, which is appointed from the whole population—but yet the Ephorate, though rightly open to all the citizens, ought not to be elected as it is now, for the method is too childish.^^[[4|Rackham: Book: 2, Section: 1270b, Note: 4]]^^ And further the Ephors have jurisdiction in lawsuits of high importance, although they are any chance people, so that it would be better if they did not decide cases on their own judgement but by written rules and according to the laws. Also the mode of life of the Ephors is not in conformity with the aim of the state, for it is itself too luxurious, whereas in the case of the other citizens the prescribed life goes too far in the direction of harshness, so that they are unable to endure it, and secretly desert the law and enjoy the pleasures of the body. Also their regulations for the office of the Elders are not good; it is true that if these were persons of a high class who had been adequately trained in manly valor, one might perhaps say that the institution was advantageous to the state, although their life-tenure of the judgeship in important trials is indeed a questionable feature (for there is old age of mind as well as of body);
The five Ephors, elected for a year by the people, were the real rulers of Sparta. The two kings were hereditary; the senate of twenty-eight nobles advised them, and the Ephors presided at the Assembly of citizens over thirty years old, who voted on the measures of the Kings and Ephors but could not discuss them. The small fleet was commanded by a single admiral appointed for a year by the Ephors and not allowed to hold office twice.
Perhaps the Greek should be altered to give ‘are.’
There is no clear evidence what the method was.
but as their education has been on such lines that even the lawgiver himself cannot trust in them as men of virtue, it is a dangerous institution. And it is known that those who have been admitted to this office take bribes and betray many of the public interests by favoritism; so that it would be better if they were not exempt from having to render an account of their office, but at present they are. And it might be held that the magistracy of the Ephors serves to hold all the offices to account; but this gives altogether too much to the Ephorate, and it is not the way in which, as we maintain, officials ought to be called to account. Again, the procedure in the election of the Elders as a mode of selection is not only childish, but it is wrong that one who is to be the holder of this honorable office should canvass for it, for the man worthy of the office ought to hold it whether he wants to or not. But as it is the lawgiver clearly does the same here as in the rest of the constitution: he makes the citizens ambitious and has used this for the election of the Elders, for nobody would ask for office if he were not ambitious; yet surely ambition and love of money are the motives that bring about almost the greatest part of the voluntary wrongdoing that takes place among mankind. As to monarchy, the question whether it is not or is an advantageous institution for states to possessmay be left to another discussion; but at all events it would be advantageous that kings should not be appointed as they are now, but chosen in each case with regard to their own life and conduct. But it is clear that even the lawgiver himself does not suppose that he can make the kings men of high character: at all events he distrusts them as not being persons of sufficient worth owing to which the Spartans used to send kings who were enemies as colleagues on embassies, and thought that the safety of the state depended on division between the kings. Also the regulations for the the public mess-tables called Phiditia have been badly laid down by their originator. The revenue for these ought to come rather from public funds, as in Crete; but among the Spartans everybody has to contribute, although some of them are very poor and unable to find money for this charge, so that the result is the opposite of what the lawgiver purposed. For he intends the organization of the common tables to be democratic, but when regulated by the law in this manner it works out as by no means democratic; for it is not easy for the very poor to participate, yet their ancestral regulation of the citizenship is that it is not to belong to one who is unable to pay this tax. The law about the Admirals has been criticized by some other writers also, and rightly criticized; for it acts as a cause of sedition, since in addition to the kings who are military commanders the office of Admiral stands almost as another kingship. Another criticism that may be made against the fundamental principle of the lawgiver
is one that Plato has made in the __Laws__. The entire system of the laws is directed towards one part of virtue only, military valor, because this is serviceable for conquest. Owing to this they remained secure while at war, but began to decline when they had won an empire, because they did not know how to live a life of leisure, and had been trained in no other form of training more important than the art of war. And another error no less serious than that one is this: they think that the coveted prizes of life are won by valor more than by cowardice, and in this they are right, yet they imagine wrongly that these prizes are worth more than the valor that wins them. The public finance of Sparta is also badly regulated: when compelled to carry on wars on a large scale she has nothing in the state treasury, and the Spartiates pay war taxes badly because, as most of the land is owned by them, they do not scrutinize each other's contributions. And the lawgiver has achieved the opposite result to what is advantageous—he has made the state poor and the individual citizen covetous.
So much for a discussion of the constitution of Sparta: for these are the main points in it for criticism.
The Cretan constitution approximates to that of Sparta, but though in a few points it is not worse framed, for the larger part it has a less perfect finish. For the Spartan constitution appears and indeed is actually stated^^[[1|Rackham: Book: 2, Section: 1271b, Note: 1]]^^ to have been copied in most of its provisions from the Cretan; and as a rule old things have been less fully elaborated than newer ones. For it is said that when Lycurgus relinquished his post as guardian of King Charilaus^^[[2|Rackham: Book: 2, Section: 1271b, Note: 2]]^^ and went abroad, he subsequently passed most of his time in Crete because of the relationship between the Cretans and the Spartans; for the Lyctians^^[[3|Rackham: Book: 2, Section: 1271b, Note: 3]]^^ were colonists from Sparta, and the settlers that went out to the colony found the system of laws already existing among the previous inhabitants of the place; owing to which the neighboring villagers even now use these laws in the same manner, in the belief that Minos^^[[4|Rackham: Book: 2, Section: 1271b, Note: 4]]^^ first instituted this code of laws. And also the island appears to have been designed by nature and to be well situated to be under Greek rule, as it lies across the whole of the sea, round which almost all the Greeks are settled; for Crete is only a short distance from the Peloponnese in one direction, and from the part of Asia around Triopium and from Rhodes in the other. Owing to this Minos won the empire of the sea,^^[[5|Rackham: Book: 2, Section: 1271b, Note: 5]]^^ and made some of the islands subject to him and settled colonies in others, but finally when making an attack on Sicily he ended his life there near Camicus.
The Cretan organization is on the same lines as that of Sparta. In Sparta the land is tilled by the Helots and in Crete by the serfs;
Posthumous son of Lycurgus's elder brother King Polydectes; cf.1316a 34.
Lyctus was an inland city in the east of Crete, not far from Cnossus.
Legendary ruler of Crete, son of Zeus and Europa, and after death a judge in the lower world.
See http://www.perseus.tufts.edu/hopper/text?doc=Thuc.%201.4&lang=original. The tradition of the wealth of Minos is supported by the recent excavations at Cnossus.
and also both have public mess-tables, and in old days the Spartans called them not ‘phiditia’ but ‘men's messes,’ as the Cretans do, which is a proof that they came from Crete. And so also did the system of government; for the Ephors have the same power as the magistrates called Cosmi in Crete, except that the Ephors are five in number and the Cosmi ten; and the Elders at Sparta are equal in number to the Elders whom the Cretans call the Council; and monarchy existed in former times, but then the Cretans abolished it, and the Cosmi hold the leadership in war; and all are members of the Assembly, though it has no powers except the function of confirming by vote the resolutions already formed by the Elders and the Cosmi.
Now the Cretan arrangements for the public mess-tables are better than the Spartan; for at Sparta each citizen pays a fixed poll-tax, failing which he is prevented by law from taking part in the government, as has been said before; but in Crete the system is more communal, for out of all the crops and cattle produced from the public lands, and the tributes paid by the serfs, one part is assigned for the worship of the gods and the maintenance of the public services,and the other for the public mess-tables, so that all the citizens are maintained from the common funds, women and children as well as men; and the lawgiver has devised many wise measures to secure the benefit of moderation at table, and the segregation of the women in order that they may not bear many children, for which purpose he instituted association with the male sex, as to which there will be another occasion^^[[1|Rackham: Book: 2, Section: 1272a, Note: 1]]^^ to consider whether it was a bad thing or a good one. That the regulations for the common mess-tables therefore are better in Crete than at Sparta is manifest; but the regulations for the Cosmi are even worse than those regarding the Ephors. For the evil attaching to the office of the Ephors belongs to the Cosmi also, as the post is filled by any chance persons, while the benefit conferred on the government by this office at Sparta is lacking in Crete. At Sparta, as the election is made from all the citizens, the common people sharing in the highest office desire the maintenance of the constitution, but in Crete they do not elect the Cosmi from all the citizens but from certain clans, and the Elders from those who have held the office of Cosmos, about which regulations the same comments might be made as about what takes place at Sparta: their freedom from being called to account and their tenure for life gives them greater rank than their merit deserves, and their administration of their office at their own discretion and not under the guidance of a written code is dangerous. And the fact that the common people quietly tolerate their exclusion is no proof that the arrangement is a sound one; for the Cosmi unlike the Ephors make no sort of profit,
This promise is not fulfilled
as they live in an island remote from any people to corrupt them. Also the remedy which they employ for this defect^^[[1|Rackham: Book: 2, Section: 1272b, Note: 1]]^^ is a curious one, and less characteristic of a republic than of a dynasty^^[[2|Rackham: Book: 2, Section: 1272b, Note: 2]]^^: often the Cosmi are expelled by a conspiracy formed among some of their actual colleagues or the private citizens. Also the Cosmi are allowed to resign during their term of office. Now it would be preferable for all these expedients to be put in force by law rather than at the discretion of individuals, for that is a dangerous principle. And the worst expedient of all is that of the suspension of the office of Cosmi, which is often brought about by members of the powerful class who wish to escape being punished; this proves that the constitution has a republican element, although it is not actually a republic but rather a dynasty.^^[[3|Rackham: Book: 2, Section: 1272b, Note: 3]]^^ And the nobles frequently form parties among the common people and among their friends and so bring about a suspension of government,^^[[4|Rackham: Book: 2, Section: 1272b, Note: 4]]^^ and form factions and engage in war with one another. Yet such a state of things is virtually the same as if for a period of time the state underwent an entire revolution, and the bonds of civil society were loosened.
And it is a precarious position for a state to be in, when those who wish to attack it also have the power to do so. But, as has been said, it is saved by its locality; for distance has had the same effect as alien-acts.^^[[5|Rackham: Book: 2, Section: 1272b, Note: 5]]^^ A result of this is that with the Cretans the serf population stands firm, whereas the Helots often revolt; for the Cretanstake no part in foreign empire, and also the island has only lately been invaded by warfare from abroad, rendering manifest the weakness of the legal system there.
Let this suffice for our discussion of this form of constitution.
Carthage also appears to have a good constitution, with many outstanding features as compared with those of other nations, but most nearly resembling the Spartan in some points. For these three constitutions are in a way near to one another and are widely different from the others—the Cretan, the Spartan and, thirdly, that of Carthage. Many regulations at Carthage are good; and a proof of a well-regulated constitution is that the populace willingly remain faithful to the constitutional system, and that neither civil strife has arisen in any degree worth mentioning, nor yet a tyrant.
Points in which the Carthaginian constitution resembles the Spartan are the common mess-tables of its Comradeships corresponding to the Phiditia, and the magistracy of the Hundred and Four corresponding to the Ephors (except one point of superiority—the Ephors are drawn from any class, but the Carthaginians elect this magistracy by merit); the kings and the council of Elders correspond to the kings and Elders at Sparta, and it is another superior feature that the Carthaginian kings are not confined to the same family and that one of no particular distinction, and also that if any family distinguishes itself . . .^^[[6|Rackham: Book: 2, Section: 1272b, Note: 6]]^^ the Elders are to be chosen from these rather than by age; for as they are put in control of important matters, if they are men of no value they do great harm,
i.e. the defect of the undue restriction of the office.
The MSS. give ‘bring about a monarchy.’
Aliens required special permission to reside at Sparta, and the ephors had powers to expel them for undesirable conduct.
Clauses seem to have been lost concluding the account of the appointment of the Kings and turning to the Elders and their selection on grounds of wealth.
and they have already injured the Spartan State.
Most of the points therefore in the Carthaginian system that would be criticized on the ground of their divergences happen to be common to all the constitutions of which we have spoken; but the features open to criticism as judged by the principle of an aristocracy or republic are some of them departures in the direction of democracy and others in the direction of oligarchy. The reference of some matters and not of others to the popular assembly rests with the kings in consultation with the Elders in case they agree^^[[1|Rackham: Book: 2, Section: 1273a, Note: 1]]^^ unanimously, but failing that, these matters also lie with the people^^[[2|Rackham: Book: 2, Section: 1273a, Note: 2]]^^; and when the kings introduce business in the assembly, they do not merely let the people sit and listen to the decisions that have been taken by their rulers, but the people have the sovereign decision, and anybody who wishes may speak against the proposals introduced, a right that does not exist under the other constitutions. The appointment by co-optation of the Boards of Five which control many important matters, and the election by these boards of the supreme magistracy of the Hundred, and also their longer tenure of authority than that of any other officers (for they are in power after they have gone out of office and before they have actually entered upon it) are oligarchical features; their receiving no pay and not being chosen by lot and other similar regulations must be set down as aristocratic, and so must the fact that the members of the Boards are the judges in all lawsuits,instead of different suits being tried by different courts as at Sparta. But the Carthaginian system diverges from aristocracy in the direction of oligarchy most signally in respect of a certain idea that is shared by the mass of mankind; they think that the rulers should be chosen not only for their merit but also for their wealth, as it is not possible for a poor man to govern well or to have leisure for his duties. If therefore election by wealth is oligarchical and election by merit aristocratic, this will be a third system exhibited in the organization of the constitution of Carthage, for there elections are made with an eye to these two qualifications, and especially elections to the most important offices, those of the kings and of the generals. But it must be held that this divergence from aristocracy is an error on the part of a lawgiver; for one of the most important points to keep in view from the outset is that the best citizens may be able to have leisure and may not have to engage in any unseemly occupation, not only when in office but also when living in private life. And if it is necessary to look to the question of means for the sake of leisure, it is a bad thing that the greatest offices of state, the kingship and the generalship, should be for sale. For this law makes wealth more honored than worth, and renders the whole state avaricious; and whatever the holders of supreme power deem honorable, the opinion of the other citizens also is certain to follow them, and a state in which virtue is not held in the highest honor
i.e. agree to refer or not to refer
i.e. even when the Kings only or the Elders only desire reference, it takes place
cannot be securely governed by an aristocracy. And it is probable that those who purchase office will learn by degrees to make a profit out of it, when they hold office for money spent; for it would be odd if a man of small means but respectable should want to make a profit but an inferior person when he has spent money to get elected should not want to. Hence the persons who should be in office are those most capable of holding office. And even if the lawgiver neglected to secure comfortable means for respectable people, it would at all events be better that he should provide for their leisure while in office.
And it might also be thought a bad thing for the same person to hold several offices, which is considered a distinction at Carthage. One man one job is the best rule for efficiency, and the lawgiver ought to see that this may be secured, and not appoint the same man to play the flute and make shoes. Hence except in a small city it is more statesmanlike for a larger number to share in the offices and more democratic, for it is fairer to all, as we said, and also functions are performed better and more quickly when separate than by the same people. This is clear in military and naval matters; for in both of these departments command and subordination penetrate throughout almost the whole body.^^[[1|Rackham: Book: 2, Section: 1273b, Note: 1]]^^
But the constitution being oligarchical they best escape the dangers by being wealthy, as they constantly send out a portion of the common people toappointments in the cities; by this means they heal the social sore and make the constitution stable. However, this is the achievement of fortune, whereas freedom from civil strife ought to be secured by the lawgiver; but as it is, suppose some misfortune occurs and the multitude of the subject class revolts, there is no remedy provided by the laws to restore tranquillity.
This then is the character of the Spartan, Cretan and Carthaginian constitutions, which are justly famous.
Of those that have put forward views about politics, some have taken no part in any political activities whatever but have passed their whole life as private citizens; and something has been said about almost all the writers of this class about whom there is anything noteworthy. Some on the other hand have been lawgivers, either for their native cities or even for certain foreign peoples, after having themselves been actively engaged in government; and of these some have been framers of laws only, and others of a constitution also, for instance Solon and Lycurgus, who instituted both laws and constitutions. The Spartan constitution has been discussed. As for Solon, he is considered by some people to have been a good lawgiver, as having put an end to oligarchy when it was too unqualified and having liberated the people from slavery and restored the ancestral democracy with a skilful blending of the constitution: the Council on the Areopagus being an oligarchic element, the elective magistracies aristocratic and the law-courts democratic. And although really in regard to certain of these features, the Council and the election of magistrates,
i.e. everyone in command (except the commander-in-chief) has someone of higher rank over him.
Solon seems merely to have abstained from destroying institutions that existed already, he does appear to have founded the democracy by constituting the jury-courts from all the citizens. For this he is actually blamed by some persons, as having dissolved the power of the other parts of the community by making the law-court, which was elected by lot, all-powerful. For as the law-court grew strong, men courted favor with the people as with a tyrant, and so brought the constitution to the present democracy; and Ephialtes and Pericles docked the power of the Council on the Areopagus, while Pericles instituted payment for serving in the law-courts, and in this manner finally the successive leaders of the people led them on by growing stages to the present democracy. But this does not seem to have come about in accordance with the intention of Solon, but rather as a result of accident (for the common people having been the cause of the naval victories at the time of the Persian invasion became proud and adopted bad men as popular leaders when the respectable classes opposed their policy); inasmuch as Solon for his part appears to bestow only the minimum of power upon the people, the function of electing the magistrates and of calling them to account (for if even this were not under the control of the populace it would be a mere slave and a foreign enemy), whereas he appointed all the offices from the notable and the wealthy, the Five-hundred-bushel classand the Teamsters and a third property-class called the Knighthood; while the fourth class, the Thetes, were admitted to no office.^^[[1|Rackham: Book: 2, Section: 1274a, Note: 1]]^^
Laws were given^^[[2|Rackham: Book: 2, Section: 1274a, Note: 2]]^^ by Zaleucus to the Epizephyrian^^[[3|Rackham: Book: 2, Section: 1274a, Note: 3]]^^ Locrians and by Charondas^^[[4|Rackham: Book: 2, Section: 1274a, Note: 4]]^^ of Catana to his fellow-citizens and to the other Chalcidic cities^^[[5|Rackham: Book: 2, Section: 1274a, Note: 5]]^^ on the coasts of Italy and Sicily. Some persons try to connect Zaleucus and Charondas together: they say that Onomacritus first arose as an able lawgiver, and that he was trained in Crete, being a Locrian and travelling there to practise the art of soothsaying, and Thales became his companion, and Lycurgus and Zaleucus were pupils of Thales, and Charondas of Zaleucus; but these stories give too little attention to the dates. Philolaus of Corinth also arose as lawgiver at Thebes. Philolaus belonged by birth to the Bacchiad family; he became the lover of Diocles the winner^^[[6|Rackham: Book: 2, Section: 1274a, Note: 6]]^^ at Olympia, but when Diocles quitted the city because of his loathing for the passion of his mother Alcyone, he went away to Thebes, and there they both ended their life. Even now people still show their tombs, in full view of each other and one of them fully open to view in the direction of the Corinthian country but the other one not; for the story goes that they arranged to be buried in this manner, Diocles owing to his hatred for his misfortune securing that the land of Corinth might not be visible from his tomb, and Philolaus that it might be from his.
For Solon's classification of the citizens by the annual income of their estates see http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Ath.%20Pol.%207&lang=original.
Zephyrium, a promontory in S. Italy.
Colonies from Chalcis in Euboea.
It was due then to a reason of this nature that they went to live at Thebes; but Philolaus became the Thebans' lawgiver in regard to various matters, among others the size of families,—the laws called by the Thebans laws of adoption; about this Philolaus enacted special legislation, in order that the number of the estates in land might be preserved. There is nothing special in the code of Charondas except the trials for false witness (for he was the first to introduce the procedure of denunciation), but in the accuracy of his laws he is a more finished workman even than the legislators of today. (Peculiar to Phaleas^^[[1|Rackham: Book: 2, Section: 1274b, Note: 1]]^^ is the measure for equalizing properties; to Plato,^^[[2|Rackham: Book: 2, Section: 1274b, Note: 2]]^^ community of wives and children and of property, and the common meals for the women, and also the law about drunkenness, enacting that sober persons are to be masters of the drinking-bouts, and the regulation for military training to make men ambidextrous during drill, on the ground that it is a mistake to have one of the two hands useful but the other useless.) There are laws of Draco,^^[[3|Rackham: Book: 2, Section: 1274b, Note: 3]]^^ but he legislated for an existing constitution, and there is nothing peculiar in his laws that is worthy of mention, except their severity in imposing heavy punishment. Pittacus^^[[4|Rackham: Book: 2, Section: 1274b, Note: 4]]^^ also was a framer of laws, but not of a constitution; a special law of his is that if men commit any offence when drunk, they are to pay a larger fine than those who offend when sober; because since more men are insolent when drunk than when sober he had regard not to the view that drunken offenders are to be shown more mercy, but to expediency. Androdamas^^[[5|Rackham: Book: 2, Section: 1274b, Note: 5]]^^ of Rhegium also became lawgiver to the Chalcidians in the direction of Thrace,^^[[6|Rackham: Book: 2, Section: 1274b, Note: 6]]^^ and to him belong the laws dealing with cases of murder and with heiresses; however one cannot mention any provision that is peculiar to him.
Let such be our examination of the constitutional schemes actually in force and of those that have been proposed by certain persons.
Author of the first written code at Athens, 621 B.C. (though in [[Aristot. Ath. Pol. 4|http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Ath.%20Pol.%204&lang=original]], his legislation is hardly mentioned; he appears there as the framer of the constitution).
Of Mitylene in Lesbos, one of the Seven Sages, dictator 589-579 B.C.
Chalcidice, the peninsula in the N. Aegean, was colonized from Chalcis in Euboea.
---
!!![[Section: 1274b|Rackham: Book: 3, Section: 1274b]]
{{Rackham: Book: 3, Section: 1274b}}
---
!!![[Section: 1275a|Rackham: Book: 3, Section: 1275a]]
{{Rackham: Book: 3, Section: 1275a}}
---
!!![[Section: 1275b|Rackham: Book: 3, Section: 1275b]]
{{Rackham: Book: 3, Section: 1275b}}
---
!!![[Section: 1276a|Rackham: Book: 3, Section: 1276a]]
{{Rackham: Book: 3, Section: 1276a}}
---
!!![[Section: 1276b|Rackham: Book: 3, Section: 1276b]]
{{Rackham: Book: 3, Section: 1276b}}
---
!!![[Section: 1277a|Rackham: Book: 3, Section: 1277a]]
{{Rackham: Book: 3, Section: 1277a}}
---
!!![[Section: 1277b|Rackham: Book: 3, Section: 1277b]]
{{Rackham: Book: 3, Section: 1277b}}
---
!!![[Section: 1278a|Rackham: Book: 3, Section: 1278a]]
{{Rackham: Book: 3, Section: 1278a}}
---
!!![[Section: 1278b|Rackham: Book: 3, Section: 1278b]]
{{Rackham: Book: 3, Section: 1278b}}
---
!!![[Section: 1279a|Rackham: Book: 3, Section: 1279a]]
{{Rackham: Book: 3, Section: 1279a}}
---
!!![[Section: 1279b|Rackham: Book: 3, Section: 1279b]]
{{Rackham: Book: 3, Section: 1279b}}
---
!!![[Section: 1280a|Rackham: Book: 3, Section: 1280a]]
{{Rackham: Book: 3, Section: 1280a}}
---
!!![[Section: 1280b|Rackham: Book: 3, Section: 1280b]]
{{Rackham: Book: 3, Section: 1280b}}
---
!!![[Section: 1281a|Rackham: Book: 3, Section: 1281a]]
{{Rackham: Book: 3, Section: 1281a}}
---
!!![[Section: 1281b|Rackham: Book: 3, Section: 1281b]]
{{Rackham: Book: 3, Section: 1281b}}
---
!!![[Section: 1282a|Rackham: Book: 3, Section: 1282a]]
{{Rackham: Book: 3, Section: 1282a}}
---
!!![[Section: 1282b|Rackham: Book: 3, Section: 1282b]]
{{Rackham: Book: 3, Section: 1282b}}
---
!!![[Section: 1283a|Rackham: Book: 3, Section: 1283a]]
{{Rackham: Book: 3, Section: 1283a}}
---
!!![[Section: 1283b|Rackham: Book: 3, Section: 1283b]]
{{Rackham: Book: 3, Section: 1283b}}
---
!!![[Section: 1284a|Rackham: Book: 3, Section: 1284a]]
{{Rackham: Book: 3, Section: 1284a}}
---
!!![[Section: 1284b|Rackham: Book: 3, Section: 1284b]]
{{Rackham: Book: 3, Section: 1284b}}
---
!!![[Section: 1285a|Rackham: Book: 3, Section: 1285a]]
{{Rackham: Book: 3, Section: 1285a}}
---
!!![[Section: 1285b|Rackham: Book: 3, Section: 1285b]]
{{Rackham: Book: 3, Section: 1285b}}
---
!!![[Section: 1286a|Rackham: Book: 3, Section: 1286a]]
{{Rackham: Book: 3, Section: 1286a}}
---
!!![[Section: 1286b|Rackham: Book: 3, Section: 1286b]]
{{Rackham: Book: 3, Section: 1286b}}
---
!!![[Section: 1287a|Rackham: Book: 3, Section: 1287a]]
{{Rackham: Book: 3, Section: 1287a}}
---
!!![[Section: 1287b|Rackham: Book: 3, Section: 1287b]]
{{Rackham: Book: 3, Section: 1287b}}
---
!!![[Section: 1288a|Rackham: Book: 3, Section: 1288a]]
{{Rackham: Book: 3, Section: 1288a}}
---
!!![[Section: 1288b|Rackham: Book: 3, Section: 1288b]]
{{Rackham: Book: 3, Section: 1288b}}
For the student of government, and of nature and characteristics of the various forms of constitution, almost the first question to consider is in regard to the state: what exactly is the essential nature of a state? As it is, this is a matter of dispute: a public act is spoken of by some people as the action of the state, others speak of it as the action not of the state but of the oligarchy or the tyrant in power^^[[1|Rackham: Book: 3, Section: 1274b, Note: 1]]^^; and we see that the activity of the statesman and lawgiver is entirely concerned with a state as its object, and a constitution is a form of organization of the inhabitants of a state. But a state is a composite thing, in the same sense as any other of the things that are wholes but consist of many parts; it is therefore clear that we must first inquire into the nature of a citizen; for a state is a collection of citizens,
So we speak of an action planned and carried by the party in power as an Act of Parliament, and technically as an act of the sovereign.
so that we have to consider who is entitled to the name of citizen, and what the essential nature of a citizen is. For there is often a difference of opinion as to this: people do not all agree that the same person is a citizen; often somebody who would be a citizen in a democracy is not a citizen under an oligarchy. We need not here consider those who acquire the title of citizen in some exceptional manner, for example those who are citizens by adoption; and citizenship is not constituted by domicile in a certain place (for resident aliens and slaves share the domicile of citizens), nor are those citizens who participate in a common system of justice, conferring the right to defend an action and to bring one in the law-courts (for this right belongs also to the parties under a commercial treaty, as they too can sue and be sued at law,—or rather, in many places even the right of legal action is not shared completely by resident aliens, but they are obliged to produce a patron, so that they only share in a common legal procedure to an incomplete degree), but these are only citizens in the manner in which children who are as yet too young to have been enrolled in the list and old men who have been discharged^^[[1|Rackham: Book: 3, Section: 1275a, Note: 1]]^^ must be pronounced to be citizens in a sense, yet not quite absolutely, but with the added qualification of ‘under age’ in the case of the former and ‘superannuated’ or some other similar term (it makes no difference, the meaning being clear) in that of the latter. For we seek to define a citizen in the absolute sense, and one possessing nodisqualification of this nature that requires a correcting term, since similar difficulties may also be raised, and solved, about citizens who have been disfranchised or exiled. A citizen pure and simple is defined by nothing else so much as by the right to participate in judicial functions and in office. But some offices of government are definitely limited in regard to time, so that some of them are not allowed to be held twice by the same person at all, or only after certain fixed intervals of time; other officials are without limit of tenure, for example the juryman and the member of the assembly. It might perhaps be said that such persons are not officials at all, and that the exercise of these functions does not constitute the holding of office;^^[[2|Rackham: Book: 3, Section: 1275a, Note: 2]]^^ and yet it is absurd to deny the title of official to those who have the greatest power in the state. But it need not make any difference, as it is only the question of a name, since there is no common name for a juryman and a member of the assembly that is properly applied to both. For the sake of distinction therefore let us call the combination of the two functions ‘office’ without limitation. Accordingly we lay it down that those are citizens who participate in office in this manner.
Such more or less is the definition of ‘citizen’ that would best fit with all of those to whom the name is applied. But it must not be forgotten that things in the case of which the things to which they are related differ in kind, one of them being primary, another one secondary and so on, either do not contain a common nature at all, as being what they are, or barely do so.^^[[3|Rackham: Book: 3, Section: 1275a, Note: 3]]^^ Now we see that constitutions differ from one another in kind, and that some are subsequent and others prior;
This seems to imply that aged citizens were excused attendance at the assembly and law-courts, as well as military service
Or, amending the text, ‘and yet that it is absurd to deny the title of citizen to those—’
The meaning of this abstract principle is most easily seen from its application here: if states are generically different from one another, membership of a state, citizenship, can hardly be a single thing, and come under a single definition.
for erroneous and divergent forms are necessarily subsequent to correct forms (in what sense we employ the terms ‘divergent’ of constitutions will appear later). Hence the citizen corresponding to each form of constitution will also necessarily be different. Therefore the definition of a citizen that we have given applies especially to citizenship in a democracy; under other forms of government it may hold good, but will not necessarily do so. For in some states there is no body of common citizens, and they do not have the custom of a popular assembly but councils of specially convened members, and the office of trying law-suits goes by sections—for example at Sparta suits for breach of contract are tried by different ephors in different cases, while cases of homicide are tried by the ephors and doubtless other suits by some other magistrate. The same method is not^^[[1|Rackham: Book: 3, Section: 1275b, Note: 1]]^^ followed at Carthage, where certain magistrates judge all the law-suits. But still, our definition of a citizen admits of correction. For under the other forms of constitution a member of the assembly and of a jury-court is not ‘an official’ without restriction, but an official defined according to his office; either all of them or some among them are assigned deliberative and judicial duties either in all matters or in certain matters. What constitutes a citizen is therefore clear from these considerations: we now declare that one who has the right to participate in deliberative or judicial office is a citizen of the statein which he has that right, and a state is a collection of such persons sufficiently numerous, speaking broadly, to secure independence of life.
But in practice citizenship is limited to the child of citizens on both sides, not on one side only, that is, the child of a citizen father or of a citizen mother; and other people carry this requirement further back, for example to the second or the third preceding generation or further. But given this as a practical and hasty definition, some people raise the difficulty, How will that ancestor three or four generations back have been a citizen? Gorgias^^[[2|Rackham: Book: 3, Section: 1275b, Note: 2]]^^ of Leontini therefore, partly perhaps in genuine perplexity but partly in jest, said that just as the vessels made by mortar-makers were mortars, so the citizens made by the magistrates were Larisaeans, since some of the magistrates were actually larisa-makers.^^[[3|Rackham: Book: 3, Section: 1275b, Note: 3]]^^ But it is really a simple matter; for if they possessed citizenship in the manner stated in our definition of a citizen, they were citizens—since it is clearly impossible to apply the qualification of descent from a citizen father or mother to the original colonizers or founders of a city.
But perhaps a question rather arises about those who were admitted to citizenship when a revolution had taken place, for instance such a creation of citizens as that carried out^^[[4|Rackham: Book: 3, Section: 1275b, Note: 4]]^^ at Athens by Cleisthenes after the expulsion of the tyrants, when he enrolled in his tribes many resident aliens who had been foreigners or slaves. The dispute as to these is not about the fact of their citizenship, but whether they received it wrongly or rightly. Yet even as to this one might raise the further question,
The negative is a conjectural insertion, cf. 1273a 20.
Sicilian orator and nihilistic philosopher, visited Athens 427 B.C.
Larisa, a city in Thessaly, was famous for the manufacture of a kind of kettle called ‘larisa.’
whether, if a man is not rightly a citizen, he is a citizen at all, as ‘wrongly’ means the same as ‘not truly.’ But we sometimes see officials governing wrongly, as to whom we shall not deny that they do govern, but shall say that they do not do it rightly, and a citizen is defined by a certain function of government (a citizen, as we said, is one who shares in such and such an office); therefore it is clear that even persons wrongly admitted to citizenship are to be pronounced to be citizens, although the question whether they are so rightly or not rightly is connected with the question that was propounded before.^^[[1|Rackham: Book: 3, Section: 1276a, Note: 1]]^^ For some persons raise the question, When is an occurrence the act of the state and when is it not? for example, when the government has been altered from oligarchy or tyranny to democracy. In such circumstances some people claim that the new government should not discharge public debts, on the ground that the money was borrowed by the tyrant and not by the state, and should repudiate many other similar claims also, because some forms of government rest upon force and are not aimed at the welfare of the community. If therefore some democracies also are governed in that manner, the acts of the authorities in their case can only be said to be the acts of the state in the same sense as the public acts emanating from an oligarchy or a tyranny are said to be. Akin to this controversy seems to be the subject, What exactly is the principle on which we ought to pronounce a city to be the same city as it was before, or not the same but a different city? The most obvious mode of inquiring into this difficultydeals with place and people: the place and the people may have been divided, and some may have settled in one place, and some in another. In this form the question must be considered as easier of solution; for, as ‘city’ has several meanings, the inquiry so put is in a way not difficult.^^[[2|Rackham: Book: 3, Section: 1276a, Note: 2]]^^ But it may similarly be asked, Suppose a set of men inhabit the same place, in what circumstances are we to consider their city to be a single city? Its unity clearly does not depend on the walls, for it would be possible to throw a single wall round the Peloponnesus; and a case in point perhaps is Babylon, and any other city that has the circuit of a nation rather than of a city; for it is said that when Babylon was captured a considerable part of the city was not aware of it three days later. But the consideration of this difficulty will be serviceable for another occasion, as the student of politics must not ignore the question, What is the most advantageous size for a city, and should its population be of one race or of several? But are we to pronounce a city, where the same population inhabit the same place, to be the same city so long as the population are of the same race, in spite of the fact that all the time some are dying and others being born, just as it is our custom to say that a river or a spring is the same river or spring although one stream of water is always being added to it and another being withdrawn from it, or are we to say that though the people are the same people for the similar reason of continuity, yet the city is a different city?
The question, What is a state? 1274b 34.
i.e. πόλις means both (1) ‘city’ (and also ‘citadel’) and (2) ‘state,’ a collection of citizens; and if the citizens divide and settle in two different ‘cities’ with different governments, they are clearly not the same ‘state’ as before.
For inasmuch as a state is a kind of partnership, and is in fact a partnership of citizens in a government, when the form of the government has been altered and is different it would appear to follow that the state is no longer the same state, just as we say that a chorus which on one occasion acts a comedy and on another a tragedy is a different chorus although it is often composed of the same persons, and similarly with any other common whole or composite structure we say it is different if the form of its structure is different—for instance a musical tune consisting of the same notes we call a different tune if at one time it is played in the Dorian mode and at another in the Phrygian. Therefore if this is the case, it is clear that we must speak of a state as being the same state chiefly with regard to its constitution; and it is possible for it to be called by the same or by a different designation both when its inhabitants are the same and when they are entirely different persons. But whether a state is or is not bound in justice to discharge its engagements when it has changed to a different constitution, is another subject.
The next thing to consider after what has now been said is the question whether we are to hold that the goodness of a good man is the same as that of a good citizen, or not the same. However, if this point really is to receive investigation, we must first ascertain in some general outline what constitutes the excellence of a citizen.Now a citizen we pronounced to be one sort of partner in a community, as is a sailor. And although sailors differ from each other in function—one is an oarsman, another helmsman, another look-out man, and another has some other similar special designation—and so clearly the most exact definition of their excellence will be special to each, yet there will also be a common definition of excellence that will apply alike to all of them; for security in navigation is the business of them all, since each of the sailors aims at that. Similarly therefore with the citizens, although they are dissimilar from one another, their business is the security of their community, and this community is the constitution, so that the goodness of a citizen must necessarily be relative to the constitution of the state. If therefore there are various forms of constitution, it is clear that there cannot be one single goodness which is the perfect goodness of the good citizen; but when we speak of a good man we mean that he possesses one single goodness, perfect goodness. Hence it is manifestly possible to be a good citizen without possessing the goodness that constitutes a good man. Moreover it is also feasible to pursue the same topic by raising the question in another manner in relation to the best form of constitution. If it is impossible^^[[1|Rackham: Book: 3, Section: 1276b, Note: 1]]^^ for a state to consist entirely of good men, and if it is necessary for each person to perform well the work of his position, and to do this springs from goodness, then because it is impossible for all the citizens to be alike,
Perhaps the Greek should be altered to give ‘possible’. If we emend the text with Bernays to εἰ γὰρ δύνατον ἐξ ἁπάντων σπουδαίων ὄντων εἶναι πόλιν, the sense is: assuming the possibility of a perfect state, with all its factors the best of their kind, this means that all the population will be good citizens, not that they will all be perfect specimens of the human race, because the state needs citizens of the working classes, etc., and these cannot in the nature of things be perfect human beings
the goodness of a good citizen would not be one and the same as the goodness of a good man; for all ought to possess the goodness of the good citizen (that is a necessary condition of the state's being the best possible), but it is impossible that all should possess the goodness of a good man, if it is not necessary that all the citizens in a good state should be good men. Again, since the state consists of unlike persons—just as an animal (to take this instance first) consists of soul and body, and a soul of reason and appetite, and a household of husband and wife and [ownership involves]^^[[1|Rackham: Book: 3, Section: 1277a, Note: 1]]^^ a master and slave, in the same manner a state consists of all of these persons and also of others of different classes in addition to these,—it necessarily follows that the goodness of all the citizens is not one and the same, just as among dancers the skill of a head dancer is not the same as that of a subordinate leader. It is clear then from these considerations that the goodness of a good citizen and that of a good man are not the same in general; but will the goodness of a good citizen of a particular sort be the same as that of a good man? Now we say that a good ruler is virtuous and wise, and that a citizen taking part in politics must be wise. Also some people say that even the education of a ruler must be different, as indeed we see that the sons of kings are educated in horsemanship and military exercises, and Euripides says^^[[2|Rackham: Book: 3, Section: 1277a, Note: 2]]^^
<<<
No subtleties for me, but what the state
Requireth—
<<<
implying that there is a special education for a ruler. And if the goodness of a good ruler is the same as the goodness of a good man, yet the person ruled is also a citizen, so that the goodness of a citizen in general will not be the same as that of a man, although that of a particular citizen will; for goodness as a ruler is not the same as goodness as a citizen, and no doubt this is the reason why Jason^^[[3|Rackham: Book: 3, Section: 1277a, Note: 3]]^^ said that when he was not tyrant he went hungry, meaning that he did not know the art of being a private person. Another point is that we praise the ability to rule and to be ruled, and it is doubtless held that the goodness of a citizen consists in ability both to rule and to be ruled well. If then we lay it down that the goodness of the good man is displayed in ruling, whereas that of the citizen is shown in both capacities, the two capacities cannot be equally laudable. Since therefore both views are sometimes accepted, and it is thought that the ruler and the subject do not have to learn the same arts but that the citizen must know both arts and share in both capacities, . . . .^^[[4|Rackham: Book: 3, Section: 1277a, Note: 4]]^^ And it may be discerned from the following illustration: one form of authority is that of a master; by this we mean the exercise of authority in regard to the necessary work of the house, which it is not necessary for the master to know how to execute, but rather how to utilize; the other capacity, I mean the ability actually to serve in these menial tasks, is indeed a slave's quality. But we distinguish several kinds of slave, as their employments are several. One department belongs to the handicraftsmen, who as their name implies are the persons that live by their hands,
These words in the Greek are probably an interpolation.
Fragment 16, from __Aeolus__.
Tyrant of Pherae in Thessaly, assassinated 370 B.C.
Some words seem to have been lost, conveying ‘we must consider how this dual fitness can be acquired,’ or possibly considerably more. But the text at the beginning of the sentence is also corrupt.
a class that includes the mechanic artisan. Hence in some states manual laborers were not admitted to office in old times, before the development of extreme democracy. The tasks of those who are under this form of authority therefore it is not proper for the good man or the man fit for citizenship or the good citizen to learn, except for his own private use occasionally (for then it ceases to be a case of the one party being master and the other slave). But there exists a form of authority by which a man rules over persons of the same race as himself, and free men (for that is how we describe political authority), and this the ruler should learn by being ruled, just as a man should command cavalry after having served as a trooper, command a regiment after having served in a regiment and been in command of a company and of a platoon. Hence there is much truth in the saying that it is impossible to become a good ruler without having been a subject. And although the goodness of a ruler and that of a subject are different, the good citizen must have the knowledge and the ability both to be ruled and to rule, and the merit of the good citizen consists in having a knowledge of the government of free men on both sides. And therefore both these virtues are characteristic of a good man, even if temperance and justice in a ruler are of a different kind from temperance and justice in a subject; for clearly a good man's virtue, for example his justice, will not be one and the same when he is under government and when he is free, but it will be of different kinds,one fitting him to rule and one to be ruled, just as temperance and courage are different in a man and in a woman (for a man would be thought a coward if he were only as brave as a brave woman, and a woman a chatterer if she were only as modest as a good man; since even the household functions of a man and of a woman are different—his business is to get and hers to keep). And practical wisdom alone of the virtues is a virtue peculiar to a ruler; for the other virtues seem to be necessary alike for both subjects and rulers to possess, but wisdom assuredly is not a subject's virtue, but only right opinion: the subject corresponds to the man who makes flutes and the ruler to the flute-player who uses them.
The question whether the goodness of a good man is the same as that of a good citizen or different, and how they are the same and how different, is clear from these considerations.
But one of the difficulties as to what constitutes a citizen is still left. Is it truly the case that a citizen is a person who has the right to share office in the government, or are the working classes also to be counted citizens? If these persons also are to be counted who have no share in offices, it is not possible for every citizen to possess the citizen's virtue; for the true citizen is the man capable of governing.^^[[1|Rackham: Book: 3, Section: 1277b, Note: 1]]^^ If on the other hand no one of the working people is a citizen, in what class are the various workers to be ranked? for they are neither resident aliens nor foreigners. Or shall we say that so far as that argument goes no inconsistency results?
Or perhaps ‘for the working-man is a citizen.’ οὗτος γὰρ πολίτης. The translation takes πολίτης as subject and οὗτος as predicate (meaning ἔχων τὴν τοιαύτην ἀρετήν, possessing capacity to govern). But possibly the predicate is πολίτης and the subject οὗτος, which then stands for ὁ βάναυσος; if so, the whole sentence means that if the non-official classes are citizens, not all the citizens will possess civic virtue (which is capacity to govern), for the working-man will be a citizen (and he is not capable of governing).
for slaves also are not in one of the classes mentioned, nor are freedmen. For it is true that not all the persons indispensable for the existence of a state are to be deemed citizens, since even the sons of citizens are not citizens in the same sense as the adults: the latter are citizens in the full sense, the former only by presumption^^[[1|Rackham: Book: 3, Section: 1278a, Note: 1]]^^—they are citizens, but incomplete ones. In ancient times in fact the artisan class in some states consisted of slaves or aliens, owing to which the great mass of artisans are so even now; and the best-ordered state will not make an artisan a citizen. While if even the artisan is a citizen, then what we said to be the citizen's virtue must not be said to belong to every citizen, nor merely be defined as the virtue of a free man, but will only belong to those who are released from menial occupations. Among menial occupations those who render such services to an individual are slaves, and those who do so for the community are artisans and hired laborers. The state of the case about them will be manifest from what follows when we consider it a little further[, for what has been said when made known itself makes it clear].^^[[2|Rackham: Book: 3, Section: 1278a, Note: 2]]^^ As there are several forms of constitution, it follows that there are several kinds of citizen, and especially of the citizen in a subject position; hence under one form of constitution citizenship will necessarily extend to the artisan and the hired laborer, while under other forms this is impossible, for instance in any constitution that is of the form entitled aristocratic and in whichthe honors are bestowed according to goodness and to merit, since a person living a life of manual toil or as a hired laborer cannot practise the pursuits in which goodness is exercised. In oligarchies on the other hand, though it is impossible for a hired laborer to be a citizen (since admission to office of various grades is based on high property-assessments), it is possible for an artisan; for even the general mass of the craftsmen are rich. At Thebes there was a law that no one who had not kept out of trade for the last ten years might be admitted to office. But under many constitutions the law draws recruits even from foreigners; for in some democracies the son of a citizen-mother is a citizen, and the same rule holds good as to base-born sons in many places. Nevertheless, inasmuch as such persons are adopted as citizens owing to a lack of citizens of legitimate birth (for legislation of this kind is resorted to because of under-population), when a state becomes well off for numbers it gradually divests itself first of the sons of a slave father or mother, then of those whose mothers only were citizens, and finally only allows citizenship to the children of citizens on both sides. These facts then show that there are various kinds of citizen, and that a citizen in the fullest sense means the man who shares in the honors of the state, as is implied in the verse of Homer^^[[3|Rackham: Book: 3, Section: 1278a, Note: 3]]^^:
<<<
Like to some alien settler without honor,—
<<<
since a native not admitted to a share in the public honors is like an alien domiciled in the land. But in some places this exclusion is disguised, for the purpose of deceiving those who are a part of the population.^^[[4|Rackham: Book: 3, Section: 1278a, Note: 4]]^^
The answer therefore to the question,
Or, with Casaubon's probable correction of the Greek, ‘only with a qualification.’
The ill-expressed clause ‘for what—clear’ seems almost certainly to be an interpolation.
http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%209.648&lang=original, http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%2016.59&lang=original
The MSS. give ‘But where such exclusion is disguised, it (this concealment) is for the purpose of deceiving’ etc.
Is the goodness that makes a good man to be deemed the same as that which makes a worthy citizen, or different? is now clear from what has been said in one form of state the good man and the good citizen are the same, but in another they are different, and also in the former case it is not every citizen but only the statesman, the man who controls or is competent to control, singly or with colleagues, the administration of the commonwealth, that is essentially also a good man.
And since these points have been determined, the next question to be considered is whether we are to lay it down that there is only one form of constitution or several, and if several, what they are and how many and what are the differences between them. Now a constitution is the ordering of a state in respect of its various magistracies, and especially the magistracy that is supreme over all matters. For the government is everywhere supreme over the state and the constitution is the government. I mean that in democratic states for example the people are supreme, but in oligarchies on the contrary the few are; and we say that they have a different constitution. And we shall use the same language about the other forms of government also.
We have therefore to determine first the fundamental points, what is the object for which a state exists and how many different kinds of system there are for governing mankind and for controlling the common life.
Now it has been said in our first discourses,^^[[1|Rackham: Book: 3, Section: 1278b, Note: 1]]^^ in which we determined the principles concerning household management and the control of slaves, that man is by nature a political animal;and so even when men have no need of assistance from each other they none the less desire to live together. At the same time they are also brought together by common interest, so far as each achieves a share of the good life. The good life then is the chief aim of society, both collectively for all its members and individually; but they also come together and maintain the political partnership for the sake of life merely, for doubtless there is some element of value contained even in the mere state of being alive, provided that there is not too great an excess on the side of the hardships of life, and it is clear that the mass of mankind cling to life at the cost of enduring much suffering, which shows that life contains some measure of well-being and of sweetness in its essential nature.
And again, the several recognized varieties of government can easily be defined; in fact we frequently discuss them in our external discourses.^^[[2|Rackham: Book: 3, Section: 1278b, Note: 2]]^^ The authority of a master over a slave, although in truth when both master and slave are designed by nature for their positions their interests are the same, nevertheless governs in the greater degree with a view to the interest of the master, but incidentally with a view to that of the slave, for if the slave deteriorates the position of the master cannot be saved from injury. Authority over children and wife [and over the whole household, which we call the art of household management^^[[3|Rackham: Book: 3, Section: 1278b, Note: 3]]^^] is exercised either in the interest of those ruled or for some common interest of both parties,—essentially, in the interest of the ruled, as we see that the other arts also,
Mentioned at 1323a 22 (and also six times in other books); they are there appealed to for the tripartite classification of foods which in http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201098b&lang=original is ascribed to ‘current opinion of long standing and generally accepted by students of philosophy.’ The term may there predenote doctrines not peculiar to the Peripatetic school.
Aristotle can hardly have written this clause, as it includes mastership over slaves.
like medicine and athletic training, are pursued in the interest of the persons upon whom they are practised, although incidentally they may also be in the interest of the practitioners themselves; for nothing prevents the trainer from being on occasions himself also one of the persons in training, just as the pilot is always a member of the crew; so although the trainer or pilot studies the good of those under his authority, when he himself also becomes one among them he incidentally shares the benefit, for the pilot is a sailor in the ship and the trainer can become one of the persons in training under his own direction. Hence in regard to the political offices also, when the state is constituted on the principle of equality and of similarity between the citizens, these claim to hold office by turn—in earlier times, under the natural system, claiming to do public services in turn, and for somebody in return to look after their own welfare just as previously they looked after his interest when in office themselves; but nowadays owing to the benefits to be got from public sources and from holding office people wish to be in office continuously, just as if it were the case that those in office although sickly people always enjoyed good health—in which case office would no doubt be much run after by invalids.
It is clear then that those constitutions that aim at the common advantage are in effect rightly framed in accordance with absolute justice, while those that aim at the rulers' own advantage only are faulty,and are all of them deviations from the right constitutions; for they have an element of despotism, whereas a city is a partnership of free men.
These matters having been determined the next step is to consider how many forms of constitution there are and what they are; and first to study the right forms of constitution, since the deviations will also become manifest when these are defined.
But inasmuch as ‘constitution’ means the same as ‘government,’ and the government is the supreme power in the state, and this must be either a single ruler or a few or the mass of the citizens, in cases when the one or the few or the many govern with an eye to the common interest, these constitutions must necessarily be right ones, while those administered with an eye to the private interest of either the one or the few or the multitude are deviations. For either we must not say that those who are part of the state are citizens, or those who are part of the state must share in the advantage of membership. Our customary designation for a monarchy that aims at the common advantage is ‘kingship’; for a government of more than one yet only a few ‘aristocracy’ (either because the best men rule or because they rule with a view to what is best for the state and for its members); while when the multitude govern the state with a view to the common advantage, it is called by the name common to all the forms of constitution, ‘constitutional government.’ (And this comes about reasonably, since although it is possible for one man or a few to excel in virtue, when the number is larger it becomes difficult for them to possess perfect excellence in respect of every form of virtue,
but they can best excel in military valor, for this is found with numbers; and therefore with this form of constitution the class that fights for the state in war is the most powerful, and it is those who possess arms who are admitted to the government.) Deviations from the constitutions mentioned are tyranny corresponding to kingship, oligarchy to aristocracy, and democracy to constitutional government; for tyranny is monarchy ruling in the interest of the monarch, oligarchy government in the interest of the rich, democracy government in the interest of the poor, and none of these forms governs with regard to the profit of the community.
But it is necessary to say at a little greater length what each of these constitutions is; for the question involves certain difficulties, and it is the special mark of one who studies any subject philosophically, and not solely with regard to its practical aspect, that he does not overlook or omit any point, but brings to light the truth about each. Now tyranny, as has been said, is monarchy exerting despotic power over the political community; oligarchy is when the control of the government is in the hands of those that own the properties; democracy is when on the contrary it is in the hands of those that do not possess much property, but are poor.A first difficulty is with regard to the definition. If the majority of the citizens were wealthy and were in control of the state, yet when the multitude is in power it is a democracy, and similarly, to take the other case, if it were to occur somewhere that the poor were fewer than the rich but were stronger than they and accordingly were in control of the government, yet where a small number is in control it is said to be an oligarchy, then it would seem that our definition of the forms of constitution was not a good one.^^[[1|Rackham: Book: 3, Section: 1279b, Note: 1]]^^ And once again, if one assumed the combination of small numbers with wealth and of multitude with poverty, and named the constitutions thus—one in which the rich being few in number hold the offices, oligarchy: one in which the poor being many in number hold the offices, democracy,—this involves another difficulty. What names are we to give to the constitutions just described—the one in which there are more rich and the one in which the poor are the fewer, and these control their respective governments—if there exists no other form of constitution beside those mentioned? The argument therefore seems to make it clear that for few or many to have power is an accidental feature of oligarchies in the one case and democracies in the other, due to the fact that the rich are few and the poor are many everywhere (so that it is not really the case that the points mentioned constitute a specific difference), but that the real thing in which democracy and oligarchy differ from each other is poverty and wealth;
i.e. it would be absurd to term government by the people democracy if the people happened to be very rich, or government by a few oligarchy if the few were poor and the many whom they governed rich.
and it necessarily follows that wherever the rulers owe their power to wealth, whether they be a minority or a majority, this is an oligarchy, and when the poor rule, it is a democracy, although it does accidentally happen, as we said, that where the rulers hold power by wealth they are few and where they hold power by poverty they are many, because few men are rich but all men possess freedom, and wealth and freedom are the grounds on which the two classes lay claim to the government.
And first we must ascertain what are stated to be the determining qualities of oligarchy and democracy, and what is the principle of justice under the one form of government and under the other. For all men lay hold on justice of some sort, but they only advance to a certain point, and do not express the principle of absolute justice in its entirety. For instance, it is thought that justice is equality, and so it is, though not for everybody but only for those who are equals; and it is thought that inequality is just, for so indeed it is, though not for everybody, but for those who are unequal; but these partisans strip away the qualification of the persons concerned, and judge badly. And the cause of this is that they are themselves concerned in the decision, and perhaps most men are bad judges when their own interests are in question. Hence inasmuch as ‘just’ means just for certain persons, and it is divided in the same way in relation to the things to be distributed and the persons that receive them, as has been said before in the Ethics,^^[[1|Rackham: Book: 3, Section: 1280a, Note: 1]]^^ the two parties agree as to what constitutes equality in the thing, but dispute as to what constitutes equality in the person,chiefly for the reason just now stated, because men are bad judges where they themselves are concerned, but also, inasmuch as both parties put forward a plea that is just up to a certain point, they think that what they say is absolutely just. For the one side think that if they are unequal in some respects, for instance in wealth, they are entirely unequal, and the other side think that if they are equal in some respects, for instance in freedom, they are entirely equal. But the most important thing they do not mention. If men formed the community and came together for the sake of wealth, their share in the state is proportionate to their share in the property, so that the argument of the champions of oligarchy would appear to be valid—namely that in a partnership with a capital of 100 minae^^[[2|Rackham: Book: 3, Section: 1280a, Note: 2]]^^ it would not be just for the man who contributed one mina to have a share whether of the principal or of the profits accruing equal to the share of the man who supplied the whole of the remainder; but if on the other hand the state was formed not for the sake of life only but rather for the good life (for otherwise a collection of slaves or of lower animals would be a state, but as it is, it is not a state, because slaves^^[[3|Rackham: Book: 3, Section: 1280a, Note: 3]]^^ and animals have no share in well-being or in purposive life), and if its object is not military alliance for defence against injury by anybody, and it does not exist for the sake of trade and of business relations^^[[4|Rackham: Book: 3, Section: 1280a, Note: 4]]^^—for if so, Etruscans and Carthaginians and all the people that have commercial relations with one another would be virtually citizens of a single state; at all events they have agreements about imports and covenants as to abstaining from dishonesty and treaties of alliance for mutual defence;
Cf. http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201131a&lang=original.
See 1260a 12, and http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201177a&lang=original, ‘but no one allows a slave any measure of happiness, any more than a life of his own.’
The sentence here breaks off; The inference that should have formed its conclusion is given in 5.15.
but they do not have officials common to them all appointed to enforce these covenants, but different officials with either party, nor yet does either party take any concern as to the proper moral character of the other, nor attempt to secure that nobody in the states under the covenant shall be dishonest or in any way immoral, but only that they shall not commit any wrong against each other. All those on the other hand who are concerned about good government do take civic virtue and vice into their purview. Thus it is also clear that any state that is truly so called and is not a state merely in name must pay attention to virtue; for otherwise the community becomes merely an alliance, differing only in locality from the other alliances, those of allies that live apart. And the law is a covenant or, in the phrase of the sophist Lycophron,^^[[1|Rackham: Book: 3, Section: 1280b, Note: 1]]^^ a guarantee of men's just claims on one another, but it is not designed to make the citizens virtuous and just. And that this is how the matter stands is manifest. For if one were actually to bring the sites of two cities together into one, so that the city-walls of Megara and those of Corinth were contiguous, even so they would not be one city; nor would they if they enacted rights of intermarriage with each other, although intermarriage between citizens is one of the elements of community which are characteristic of states. And similarly even if certain people lived in separate places yet not so far apart as not to have intercourse, but had laws to prevent their wronging one anotherin their interchange of products— for instance, if one man were a carpenter, another a farmer, another a shoemaker and another something else of the kind,—and the whole population numbered ten thousand, but nevertheless they had no mutual dealings in anything else except such things as exchange of commodities and military alliance, even then this would still not be a state. What then exactly is the reason for this? for clearly it is not because their intercourse is from a distance since even if they came together for intercourse of this sort (each nevertheless using his individual house as a city) and for one another's military aid against wrongful aggressors only, as under a defensive alliance, not even then would they seem to those who consider the matter carefully to constitute a state, if they associated on the same footing when they came together as they did when they were apart. It is manifest therefore that a state is not merely the sharing of a common locality for the purpose of preventing mutual injury and exchanging goods. These are necessary preconditions of a state's existence, yet nevertheless, even if all these conditions are present, that does not therefore make a state, but a state is a partnership of families and of clans in living well, and its object is a full and independent life. At the same time this will not be realized unless the partners do inhabit one and the same locality and practise intermarriage; this indeed is the reason why family relationships have arisen throughout the states, and brotherhoods and clubs for sacrificial rites and social recreations. But such organization is produced by the feeling of friendship, for friendship is the motive of social life; therefore, while the object of a state is the good life, these things are means to that end. And a state is the partnership of clans and villages in a full and independent life,
Probably a pupil of Gorgias, see 1275b 26 n.
which in our view constitutes a happy and noble life; the political fellowship must therefore be deemed to exist for the sake of noble actions, not merely for living in common. Hence those who contribute most to such fellowship have a larger part in the state than those who are their equals or superiors in freedom and birth but not their equals in civic virtue, or than those who surpass them in wealth but are surpassed by them in virtue.
It is therefore clear from what has been said that all those who dispute about the forms of constitution assert a part of the just principle.
But it is a matter of question what ought to be the sovereign power in the state. Clearly it must be either the multitude, or the rich, or the good, or the one man who is best of all, or a tyrant. But all of these arrangements appear to involve disagreeable consequences. For instance, if the poor take advantage of their greater numbers to divide up the property of the rich, is not this unjust? No, it may be said, for it was a resolution made by the supreme authority in just form. Then what must be pronounced to be the extreme of injustice? And again, when everybody is taken into account, suppose the majority share out among themselves the property of the minority, it is manifest that they are destroying the state; but assuredly virtue does not destroyits possessor, and justice is not destructive of the state, so that it is clear that this principle also cannot be just. Also it follows from it that all the actions done by a tyrant are just, for his use of force is based upon superior strength, as is the compulsion exerted by the multitude against the rich. But is it just that the minority and the rich should rule? Suppose therefore they also act in the same way and plunder and take away the property of the multitude, is this just? If it is, so also is the plunder of the rich by the multitude. It is clear therefore that all these things are bad and not just. But ought the good to rule, and be in control of all classes? If so, then it follows that all the other classes will be dishonored,^^[[1|Rackham: Book: 3, Section: 1281a, Note: 1]]^^ if they are not honored by holding the offices of government; for we speak of offices as honors, and if the same persons are always in office the rest must necessarily be excluded from honor. But is it better for the most virtuous individual to be the ruler? But that is still more oligarchical, for the people excluded from honor will be more numerous. But perhaps some one would say that in any case it is a bad thing for a human being, having in his soul the passions that are the attributes of humanity, to be sovereign, and not the law. Suppose therefore that law is sovereign, but law of an oligarchic or democratic nature, what difference will it make as regards the difficulties that have been raised? for the results described before will come about just the same.
Most of these points therefore must be discussed on another occasion; but the view that it is more proper for the multitude to be sovereign than the few of greatest virtue might be thought to be explicable and to have some justification, and even to be the true view. For it is possible that the many, though not individually good men,
The term is technical and means disfranchisement and loss of civic rights.
yet when they come together may be better, not individually but collectively, than those who are so, just as public dinners to which many contribute are better than those supplied at one man's cost; for where there are many, each individual, it may be argued, has some portion of virtue and wisdom, and when they have come together, just as the multitude becomes a single man with many feet and many hands and many senses, so also it becomes one personality as regards the moral and intellectual faculties. This is why the general public is a better judge of the works of music and those of the poets, because different men can judge a different part of the performance, and all of them all of it. But the superiority of good men over the mass of men individually, like that of handsome men, so it is said, over plain men and of the works of the painter's art over the real objects, really consists in this, that a number of scattered good points have been collected together into one example; since if the features be taken separately, the eye of one real person is more beautiful than that of the man in the picture, and some other feature of somebody else. It is not indeed clear whether this collective superiority of the many compared with the few good men can possibly exist in regard to every democracy and every multitude, and perhaps it may be urged that it is manifestly impossible in the case of some—for the same argument would also apply to animals, yet what difference is there,practically, between some multitudes and animals?—but nothing prevents what has been said from being true about some particular multitude. One might therefore employ these considerations to solve not only the previously stated difficulty but also the related question, over what matters is the authority of the freemen, the mass of the citizens, to extend (using that expression to denote those who are not rich nor possessed of any distinguishing excellence at all)? For it is not safe for them to participate in the highest offices (for injustice and folly would inevitably cause them to act unjustly in some things and to make mistakes in others), but yet not to admit them and for them not to participate is an alarming situation, for when there are a number of persons without political honors and in poverty, the city then is bound to be full of enemies. It remains therefore for them to share the deliberative and judicial functions. For this reason Solon and certain other lawgivers appoint the common citizens to^^[[1|Rackham: Book: 3, Section: 1281b, Note: 1]]^^ the election of the magistrates and the function of calling them to audit, although they do not allow them to hold office singly. For all when assembled together have sufficient discernment, and by mingling with the better class are of benefit to the state, just as impure food mixed with what is pure makes the whole more nourishing than the small amount of pure food alone; but separately the individual is immature in judgement. This arrangement of the constitution is however open to question in the first place on the ground that it might be held that the best man to judge which physician has given the right treatment is the man that is himself capable of treating and curing the patient of his present disease, and this is the man who is himself a physician;
Probably words meaning ‘these functions and to’ have fallen out.
and that this is the case similarly with regard to the other arts and crafts. Hence just as a court of physicians must judge the work of a physician, so also all other practitioners ought to be called to account before their fellows. But ‘physician’ means both the ordinary practitioner, and the master of the craft, and thirdly, the man who has studied medicine as part of his general education (for in almost all the arts there are some such students, and we assign the right of judgement just as much to cultivated amateurs as to experts). Further the same might be thought to hold good also of the election of officials, for to elect rightly is a task for experts—for example, it is for experts in the science of mensuration to elect a land-surveyor and for experts in navigation to choose a pilot; for even though in some occupations and arts some laymen also have a voice in appointments, yet they certainly do not have more voice than the experts. Hence according to this argument the masses should not be put in control over either the election of magistrates or their audit. But perhaps this statement is not entirely correct, both for the reason stated above,^^[[1|Rackham: Book: 3, Section: 1282a, Note: 1]]^^ in case the populace is not of too slavish a character (for although each individual separately will be a worse judge than the experts, the whole of them assembled together will be better or at least as good judges), and also because about some things the man who made them would not be the only nor the best judge, in the case of professionals whose products come within the knowledge of laymen also:to judge a house, for instance, does not belong only to the man who built it, but in fact the man who uses the house (that is, the householder) will be an even better judge of it, and a steersman judges a rudder better than a carpenter, and the diner judges a banquet better than the cook.
This difficulty then might perhaps be thought to be satisfactorily solved in this way. But there is another connected with it: it is thought to be absurd that the base should be in control over more important matters than the respectable; but the audits and the elections of magistrates are a very important matter, yet in some constitutions, as has been said, they are assigned to the common people, for all such matters are under the control of the assembly, yet persons of a low property-assessment and of any age take part in the assembly and the council and sit on juries, whereas treasury officials, generals and the holders of the highest magistracies are drawn from among persons of large property. Now this difficulty also may be solved in a similar way; for perhaps these regulations also are sound, since it is not the individual juryman or councillor or member of the assembly in whom authority rests, but the court, the council and the people, while each of the individuals named (I mean the councillor, the members of assembly and the juryman) is a part of those bodies. Hence justly the multitude is sovereign in greater matters, for the popular assembly, the council and the jury-court are formed of a number of people, and also the assessed property of all these members collectively is more than that of the magistrates holding great offices individually or in small groups.
Let these points therefore be decided in this manner.
But the difficulty first mentioned^^[[1|Rackham: Book: 3, Section: 1282b, Note: 1]]^^ proves nothing else so clearly as that it is proper for the laws when rightly laid down to be sovereign, while the ruler or rulers in office should have supreme powers over matters as to which the laws are quite unable to pronounce with precision because of the difficulty of making a general rule to cover all cases. We have not however yet ascertained at all what particular character a code of laws correctly laid down ought to possess, but the difficulty raised at the start^^[[2|Rackham: Book: 3, Section: 1282b, Note: 2]]^^ still remains;^^[[3|Rackham: Book: 3, Section: 1282b, Note: 3]]^^ for necessarily the laws are good or bad, just or unjust, simultaneously with and similarly to the constitutions of states (though of course it is obvious that the laws are bound to be adapted to the constitution); yet if so, it is clear that the laws in conformity with the right constitutions must necessarily be just and those in conformity with the divergent^^[[4|Rackham: Book: 3, Section: 1282b, Note: 4]]^^ forms of constitution unjust.
^^[[5|Rackham: Book: 3, Section: 1282b, Note: 5]]^^And inasmuch as in all the sciences and arts the End is a good, and the greatest good and good in the highest degree in the most authoritative of all, which is the political faculty, and the good in the political field, that is, the general advantage, is justice, it is therefore thought by all men that justice is some sort of equality, and up to a certain point at all events they agree with the philosophical discourses in whichconclusions have been reached about questions of ethics^^[[6|Rackham: Book: 3, Section: 1282b, Note: 6]]^^; for justice is a quality of a thing in relation to persons,^^[[7|Rackham: Book: 3, Section: 1282b, Note: 7]]^^ and they hold that for persons that are equal the thing must be equal. But equality in what characteristics does this mean, and inequality in what? This must be made clear, since this too raises a difficulty, and calls for political philosophy. For perhaps someone might say that the offices of state ought to be distributed unequally according to superiority in every good quality, even if the candidates in all other respects did not differ at all but were exactly alike, because men that are different^^[[8|Rackham: Book: 3, Section: 1282b, Note: 8]]^^ have different rights and merits. Yet if this is true, those who are superior in complexion or stature or any good quality will have an advantage in respect of political rights. But surely the error here is obvious, and it comes out clearly if we consider the other sciences and faculties. Among flute-players equally good at their art it is not proper to give an advantage in respect of the flutes to those of better birth, for they will not play any better, but it is the superior performers who ought to be given the superior instruments. And if our meaning is not yet plain, it will become still clearer when we have carried the matter further. Suppose someone is superior in playing the flute but much inferior in birth or in good looks, then, even granting that each of these things—birth and beauty—is a greater good than ability to play the flute, and even though they surpass flute-playing proportionately more than the best flute-player surpasses the others in flute-playing, even so the best flute-player ought to be given the outstandingly good flutes;
Viz. that in whatever class sovereignty is vested, some hardships will result, 1281a 14 ff.
Probably this clause should stand after the next, ‘though—constitution’ (which will be a parenthesis), and should run ‘but <the difficulty is there> for necessarily—states.’
The usual rendering is ‘perverted,’ but the Greek term is more neutral.
What follows is a summary of http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201103a&lang=original.
See also http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201131a&lang=original.
Literally, ‘the just is (a just) something and (something just) for somebody.’
i.e. different in some good quality.
for otherwise superiority both in wealth and in birth ought to contribute to the excellence of the performance, but they do not do so at all. Moreover on this theory every good thing would be commensurable with every other. For if to be of some particular height gave more claim, then height in general would be in competition with wealth and with free birth; therefore if A excels in height more than B does in virtue, and speaking generally size gives more superiority than virtue,^^[[1|Rackham: Book: 3, Section: 1283a, Note: 1]]^^ all things would be commensurable for; if such-and-such an amount of one thing is better than such-and-such an amount of another, it is clear that such-and-such an amount of the one is equal to that amount of another. But since this is impossible, it is clear that in politics with good reason men do not claim a right to office on the ground of inequality of every kind—if one set of men are slow runners and another fast, this is no good ground for the one set having more and the other less^^[[2|Rackham: Book: 3, Section: 1283a, Note: 2]]^^ political power, but the latter's superiority receives its honor in athletic contests; but the claim to office must necessarily be based on superiority in those things which go to the making of the state. Hence it is reasonable for the well-born, free and wealthy to lay claim to honor; for there must be free men and tax-payers, since a state consisting entirely of poor men would not be a state, any more than one consisting of slaves. But then, granting there is need of these, it is clear thatthere is also need of justice and civic virtue, for these are also indispensable in the administration of a state; except that wealth and freedom are indispensable for a state's existence, whereas justice and civic virtue are indispensable for its good administration.
As a means therefore towards a state's existence all or at all events some of these factors would seem to make a good claim, although as means to a good life education and virtue would make the most just claim, as has been said also before. On the other hand since those who are equal in one thing only ought not to have equality in all things nor those unequal as regards one thing inequality in all, it follows that all these forms of constitution must be deviations. Now it has been said before that all make a claim that is in a manner just, though not all a claim that is absolutely just; the rich claiming because they have a larger share of the land, and the land is common property, and also as being for the most part more faithful to their covenants; the free and well-born as being closely connected together (for the better-born are citizens to a greater degree than those of claims, low birth, and good birth is in every community held in honor at home), and also because it is probable that the children of better parents will be better, for good birth means goodness of breed; and we shall admit that virtue also makes an equally just claim, for we hold that justice is social virtue, which necessarily brings all the other virtues in its train; but moreover the majority have a just claim as compared with the minority, since they are stronger and richer and better if their superior numbers are taken in comparison with the others' inferior numbers. Therefore supposing all were in one city,
Perhaps we should rewrite the Greek to give ‘even though speaking generally virtue gives more superiority than size.’
Doubtless the author meant the other way round, ‘for the slow having less and the fast more political power.’
I mean, that is, the good and the wealthy and noble and also an additional mass of citizens, will there be a dispute, or will there not, as to who ought to govern? It is true that under each of the forms of constitution that have been mentioned the decision as to who ought to govern is undisputed (for the difference between them lies in their sovereign classes—one is distinguished by being governed by the rich men, one by being governed by the good men, and similarly each of the others); but nevertheless we are considering the question how we are to decide between these classes supposing that they all exist in the state at the same period.
If then the possessors of virtue should be quite few in number, how is the decision to be made? ought we to consider their fewness in relation to the task, and whether they are able to administer the state, or sufficiently numerous to constitute a state? And there is some difficulty as regards all the rival claimants to political honors. Those who claim to rule because of their wealth might seem to have no justice in their proposal, and similarly also those who claim on the score of birth; for it is clear that if, to go a step further, a single individual is richer than all the others together, according to the same principle of justice it will obviously be right for this one man to rule over all, and similarly the man of outstanding nobility among the claimantson the score of free birth. And this same thing will perhaps result in the case of aristocratic government based on virtue; for if there be some one man who is better than the other virtuous men in the state, by the same principle of justice that man must be sovereign. Accordingly if it is actually proper for the multitude to be sovereign because they are better than the few, then also, if one person or if more than one but fewer than the many are better than the rest, it would be proper for these rather than the multitude to be sovereign. All these considerations therefore seem to prove the incorrectness of all of the standards on which men claim that they themselves shall govern and everybody else be governed by them. For surely even against those who claim to be sovereign over the government on account of virtue, and similarly against those who claim on account of wealth, the multitudes might be able to advance a just plea; for it is quite possible that at some time the multitude may be collectively better and richer than the few, although not individually.
Hence it is also possible to meet in this way the question which some persons investigate and put forward (for some raise the question whether the legislator desiring to lay down the rightest laws should legislate with a view to the advantage of the better people or that of the larger number) in cases when the situation mentioned^^[[1|Rackham: Book: 3, Section: 1283b, Note: 1]]^^ occurs. And ‘right’ must be taken in the sense of ‘equally right,’ and this means right in regard to the interest of the whole state and in regard to the common welfare of the citizens; and a citizen is in general one who shares in governing and being governed,
At the end of the last sentence, 7.12.
although he is different according to each form of constitution, but in relation to the best form a citizen is one who has the capacity and the will to be governed and to govern with a view to the life in accordance with virtue.
But if there is any one man so greatly distinguished in outstanding virtue, or more than one but not enough to be able to make up a complete state, so that the virtue of all the rest and their political ability is not comparable with that of the men mentioned, if they are several, or if one, with his alone, it is no longer proper to count these exceptional men a part of the state; for they will be treated unjustly if deemed worthy of equal status, being so widely unequal in virtue and in their political ability: since such a man will naturally be as a god among men. Hence it is clear that legislation also must necessarily be concerned with persons who are equal in birth and in ability, but there can be no law dealing with such men as those described, for they are themselves a law; indeed a man would be ridiculous if he tried to legislate for them, for probably they would say what in the story of Antisthenes^^[[1|Rackham: Book: 3, Section: 1284a, Note: 1]]^^ the lions said^^[[2|Rackham: Book: 3, Section: 1284a, Note: 2]]^^ when the hares made speeches in the assembly and demanded that all should have equality. This is why democratically governed states institute the system of ostracism, because of a reason of this nature; for these are the states considered to pursue equality most of all things,so that they used to ostracize men thought to be outstandingly powerful on account of wealth or popularity or some other form of political strength, and used to banish them out of the city for fixed periods of time. And there is a mythical story that the Argonauts left Heracles behind for a similar reason; for the Argo^^[[3|Rackham: Book: 3, Section: 1284a, Note: 3]]^^ refused to carry him with the others because he was so much heavier than the sailors. Hence also those who blame tyranny and Periander's advice to Thrasybulus^^[[4|Rackham: Book: 3, Section: 1284a, Note: 4]]^^ must not be thought to be absolutely right in their censure (the story is that Periander made no reply to the herald sent to ask his advice, but levelled the corn-field by plucking off the ears that stood out above the rest; and consequently, although the herald did not know the reason for what was going on, when he carried back news of what had occurred, Thrasybulus understood that he was to destroy the outstanding citizens); for this policy is advantageous not only for tyrants, nor is it only tyrants that use it, but the same is the case with oligarchies and democracies as well; for ostracism has in a way the same effect as docking off the outstanding men by exile. And the same course is adopted in regard to cities and races by the holders of sovereign power, for example the Athenians so dealt with the Samians and Chians and Lesbians^^[[5|Rackham: Book: 3, Section: 1284a, Note: 5]]^^ (for no sooner did they get a strong hold of their empire than they humbled them in contravention of their covenants),
Pupil of Socrates and founder of the Cynic sect of philosophers.
‘Where are your claws and teeth?’
Cf. http://www.perseus.tufts.edu/hopper/text?doc=Apollod.%201.9.19&lang=original τῆς Ἀργοῦς φθεγξαμένης μὴ δύνασθαι πέρειν τὸ τούτου βάρος. Argo was a live creature, and Athena had built a ‘talking timber’ into her cutwater.
Periander was tyrant of Corinth circa 626-585 B.C.; Thrasybulus was tyrant of Miletus. http://www.perseus.tufts.edu/hopper/text?doc=Hdt.%205.92&lang=original tells the story with their parts reversed.
In 440, 424 and 427 B.C. respectively
and the king of the Persians frequently used to cut down the numbers of the Medes and Babylonians and the other races that had waxed proud because they had once been head of an empire. And the problem applies universally to all the forms of constitution, even the right forms; for while the divergent forms of government do this because their regard is fixed on their private advantage, nevertheless with the constitutions directed to the common good the same is the case. And this is also clear in the field of the other arts and sciences; a painter would not let his animal have its foot of disproportionately large size, even though it was an exceptionally beautiful foot, nor would a shipbuilder make the stern or some other part of a ship disproportionately big, nor yet will a trainer of choruses allow a man who sings louder and more beautifully than the whole band to be a member of it. Hence as far as this practice goes nothing prevents monarchs from being in harmony with the cities they rule, if they resort to it when their own personal rule is beneficial to the cities. Therefore in relation to acknowledged superiorities the argument for ostracism has a certain element of political justice. True, it is better for the lawgiver so to constitute the state at the outset that it does not need this medicine; but the next best course to steer, if occasion arises, is to endeavor to correctthe constitution by some such method of rectification. But this was not what happened with the states, for they were not looking at what was advantageous for their proper constitution, but their acts of ostracism were done in a revolutionary spirit. In the divergent forms of constitution therefore it is evident that ostracism is advantageous and just under the special constitution, though perhaps it is also evident that it is not^^[[1|Rackham: Book: 3, Section: 1284b, Note: 1]]^^ just absolutely; but in the case of the best constitution there is much doubt as to what ought to be done, not as regards superiority in the other things of value, such as strength and wealth and popularity, but in the case of a person becoming exceptionally distinguished for virtue. It certainly would not be said that such a man must be banished and got out of the way; yet nevertheless no doubt men would not think that they ought to rule over such a man, for that would be the same as if they claimed to rule over Zeus, dividing up his spheres of government. It remains therefore, and this seems to be the natural course, for all to obey such a man gladly, so that men of this sort may be kings in the cities for all time.
And perhaps it is well after the subjects that have been discussed to pass over to consider royal government; for we pronounce this to be one of the correct constitutions. And it has to be considered whether it is advantageous for a city or a country that is to be well administered to be ruled by a king, or whether it is not so but some other constitution is more expedient, or whether royal rule is expedient for some states and not for others. But it is needful to decide first whether there is only one sort of kingship or whether it has several varieties.
Perhaps ‘not’ should be struck out; but if it stands, the clause refers to 8.5 init.—in these cases ostracism is practiced only in the interest of those in power.
Now it is at all events easy to discern that kingship includes several kinds, and that the mode of government is not the same in all. For the kingship in the Spartan constitution, which is held to be a typical royalty of the kind guided by law, does not carry sovereignty in all matters, though when a king goes on a foreign expedition he is the leader in all matters relating to the war; and also matters relating to religion have been assigned to the kings. This kingship therefore is a sort of military command vested in generals with absolute powers and held for life; for the king has not authority to put a subject to death, except [in a certain reign]^^[[1|Rackham: Book: 3, Section: 1285a, Note: 1]]^^ as in ancient times kings on their military expeditions could kill an offender out of hand, as Homer proves, for Agamemnon endured being reviled in the assemblies but when they were on an expedition had authority to put a man to death: at all events he says
<<<
But whomsoe'er I see far from the fray . . .
Shall have no hope to fly from dogs and vultures,
For death is in my hands!^^[[2|Rackham: Book: 3, Section: 1285a, Note: 2]]^^
<<<
This then is one sort of kingship, a lifelong generalship, and some of the kingships of this kind are hereditary, others elective; and by its side there is another sort of monarchy, examples of which are kingships existing among some of the barbarians. The power possessed by all of these resembles that of tyrannies, but they govern according to law and are hereditary;for because the barbarians are more servile in their nature than the Greeks, and the Asiatics than the Europeans, they endure despotic rule without any resentment. These kingships therefore are for these reasons of a tyrannical nature, but they are secure because they are hereditary and rule by law. Also their bodyguard is of a royal and not a tyrannical type for the same reason; for kings are guarded by the citizens in arms, whereas tyrants have foreign guards, for kings rule in accordance with law and over willing subjects, but tyrants rule over unwilling subjects, owing to which kings take their guards from among the citizens but tyrants have them to guard against the citizens. These then are two kinds of monarchy; while another is that which existed among the ancient Greeks, the type of rulers called ''aesymnetae''. This, to put it simply, is an elective tyranny, and it differs from the monarchy that exists among barbarians not in governing without the guidance of law but only in not being hereditary. Some holders of this type of monarchy ruled for life, others until certain fixed limits of time or until certain undertakings were ended, as for example the people of Mitylene once elected Pittacus to resist the exiles under the leadership of Antimenides and the poet Alcaeus. That they elected Pittacus^^[[3|Rackham: Book: 3, Section: 1285a, Note: 3]]^^ as tyrant is proved by Alcaeus in one of his catches; for he rebukes the people because
<<<
The base-born Pittacus they did set up
As tyrant of the meek and luckless city,
And all did greatly praise him.
<<<
Inexplicable, and omitted in one of the earliest editions; possibly βασιλείᾳ is to be emended to ἐλάσει ‘except on some march-out.’
Quoted from http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%202.391&lang=original, but the last line is not in our Homer.
Pittacus held the office 587-579 B.C. He was one of the Seven Sages. Antimenides and Alcaeus were brothers.
These monarchies therefore now and in the past are of the nature of tyrannies because they are autocratic, but of the nature of kingships because they are elective and rule over willing subjects. A fourth class of royal monarchy consists of the hereditary legal kingships over willing subjects in the heroic period. For because the first of the line had been benefactors of the multitude in the arts or in war, or through having drawn them together or provided them with land, these kings used to come to the throne with the consent of the subjects and hand it on to their successors by lineal descent. And they had supreme command in war and control over all sacrifices that were not in the hands of the priestly class, and in addition to these functions they were judges in law-suits; some gave judgement not on oath and some on oath—the oath was taken by holding up the sceptre.^^[[1|Rackham: Book: 3, Section: 1285b, Note: 1]]^^ These kings then of ancient times used to govern continuously in matters within the city and in the country and across the frontiers; but later on when gradually the kings relinquished some of their powers and had others taken from them by the multitudes, in the cities in general only the sacrifices were left to the kings,^^[[2|Rackham: Book: 3, Section: 1285b, Note: 2]]^^ while where anything that deserves the name of royalty survived the kings only had the command in military expeditions across the frontiers.
There are then these kinds of kingship, four in number: one belonging to the heroic times, which was exercised over willing subjects, but in certain limited fields, for the king was general and judge and master of religious ceremonies; second, the barbarian monarchy, which is an hereditary despotism governing in conformity with law; third, the rule of the functionary called an ''aesymnetes'', which is an elective tyranny; and fourth among these is the Spartan kingship, which may be described simply as an hereditary generalship held for life. These kingships then differ from one another in this manner. But a fifth kind of kingship is when a single ruler is sovereign over all matters in the way in which each race and each city is sovereign over its common affairs; this monarchy ranges with the rule of a master over a household, for just as the master's rule is a sort of monarchy in the home, so absolute monarchy is domestic mastership over a city, or over a race or several races.
There are therefore, we may say, virtually two kinds of kingship that have been examined, this one and the Spartan. For most of the others lie between these, since with them the king is sovereign over fewer things than under absolute monarchy, but over more than under the Spartan kingship. Hence our inquiry is virtually about two questions, one whether it is expedient or inexpedient for states to have a military commander holding office for life, and that either by descent or by class,^^[[3|Rackham: Book: 3, Section: 1285b, Note: 3]]^^
This ritual is mentioned in http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%201.234&lang=original, http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%207.412&lang=original, http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%2010.328&lang=original.
The monarchy was reduced to a priesthood at Cyrene (http://www.perseus.tufts.edu/hopper/text?doc=Hdt.%204.161&lang=original) and at Ephesus.
Some MSS. give ‘or by election.’
and one whether it is expedient or inexpedient for one man to be sovereign over everything. Now the study of a military command of the kind mentioned has more the aspect of a legal than of a constitutional inquiry (for it is possible for this form of office to exist under all constitutions), so let it be dismissed at the first stage^^[[1|Rackham: Book: 3, Section: 1286a, Note: 1]]^^; but the remaining mode of kingship is a kind of constitution, so that it is necessary to consider this one and to run over the difficulties that it involves.
And the starting-point of the inquiry is the question whether it is more advantageous to be ruled by the best men or by the best laws. Those of the opinion that it is advantageous to be governed by a king think that laws enunciate only general principles but do not give directions for dealing with circumstances as they arise; so that in an art of any kind it is foolish to govern procedure by written rules (and indeed in Egypt physicians have the right to alter their prescription after four days, although if one of them alters it before he does so at his own risk); it is clear therefore that government according to written rules, that is laws, is not the best, for the same reason. At the same time, however, rulers ought to be in possession of the general principle before mentioned as well. And a thing that does not contain the emotional element is generally superior to a thing in which it is innate; now the law does not possess this factor, but every human soulnecessarily has it. But perhaps someone might say that in compensation for this a single ruler will decide better about particular cases. Therefore it is clear that on the one hand the ruler must necessarily be a legislator, and that there must or be laws laid down, although these must not be sovereign^^[[2|Rackham: Book: 3, Section: 1286a, Note: 2]]^^ where they go astray—admittedly in all other cases they ought to be sovereign; but on the other hand in matters which it is impossible for the law either to decide at all or to decide well, ought the one best man to govern or all the citizens? As it is, the citizens assembled hear lawsuits and deliberate and give judgements, but these judgements are all on particular cases. Now no doubt any one of them individually is inferior compared with the best man, but a state consists of a number of individuals, and just as a banquet to which many contribute dishes is finer than a single plain dinner, for this reason in many cases a crowd judges better than any single person. Also the multitude is more incorruptible—just as the larger stream of water is purer, so the mass of citizens is less corruptible than the few; and the individual's judgement is bound to be corrupted when he is overcome by anger or some other such emotion, whereas in the other case it is a difficult thing for all the people to be roused to anger and go wrong together. But the multitude must consist of the freemen, doing nothing apart from the law except about matters as to which the law must of necessity be deficient. And if this is not indeed easy to ensure in the case of many men, yet if there were a majority of good men and good citizens, would an individual make a more incorruptible ruler or rather those who though the majority in number yet are all good?
Cf. 1289a 11 ff.; but the promise of a full discussion of law is not fulfilled
i.e. unalterably binding, and not be set aside by special dispensation of the ruler when deemed to be unjust in some particular case.
The majority, is it not obvious? But it will be said that they will split up into factions, whereas with a single ruler this cannot happen. But against this must perhaps be set the fact that they are as virtuous in soul as the single ruler. If then the rule of the majority when these are all good men is to be considered an aristocracy, and that of the one man kingship, aristocracy would be preferable for the states to kingship, whether the royal office be conjoined with military force or without it, if it be possible to get a larger number of men than one who are of similar quality. And it was perhaps only owing to this that kingships existed in earlier times, because it was rare to find men who greatly excelled in virtue, especially as in those days they dwelt in small cities. Moreover they used to appoint their kings on the ground of public service, and to perform this is a task for the good men. But as it began to come about that many men arose who were alike in respect of virtue, they would no longer submit to royalty, but sought for some form of commonwealth, and set up a republican constitution. And as men becoming baser began to make money out of the community, it is reasonable to suppose that some such cause as this occasioned the rise of oligarchies; for they brought wealth into honor. And from oligarchies they first changed to tyrannies, and from tyrannies to democracy; for by constantly bringing the government into fewer hands owing to a base love of gain, they made the multitude stronger,^^[[1|Rackham: Book: 3, Section: 1286b, Note: 1]]^^ so that it set upon the oligarchs, and democracies came into existence.But now that the states have come to be even greater than they were, perhaps it is not easy for yet another form of constitution beside democracy to come into existence. And even if one held that royal government is best for states, what is to be the position as regards the king's children? is the sovereignty to be hereditary? But this will be disastrous if the king's sons turn out to be like what some have been. It may be said that the king being sovereign will not in that case bequeath the throne to his children. But that is too much to be easy to believe: it would be difficult for a king to disinherit his sons, and an act of virtue above the level of human nature. And there is a difficulty also about the royal power: ought the man who is to reign as king to force to have an armed force about him, by means of which he will have power to compel those who may be unwilling to obey, or if not, how is it possible for him to administer his office? For even if he were a law-abiding sovereign and never acted according to his own will against the law, nevertheless it would be essential for him to have power behind him whereby to safeguard the laws. Probably therefore it is not difficult to define the regulations for a king of this sort: he must have a force of his own, but the force must be only so large as to be stronger than a single individual or even several individuals banded together, but weaker than the multitude, on the principle on which the men of old times used to assign bodyguards whenever they appointed somebody as what they termed ''aesymnetes'' or tyrant^^[[2|Rackham: Book: 3, Section: 1286b, Note: 2]]^^ of the state, and also, when Dionysius^^[[3|Rackham: Book: 3, Section: 1286b, Note: 3]]^^ asked for his guards, somebody advised him to give the same number of guards to the citizens of Syracuse.
i.e. more men of ability and position went over to the opposition.
‘Or tyrant’ looks like an incorrect note, see 1285b 25.
Our discussion has now reached the case of the king who acts in all matters according to his own will, and we must examine this type of royalty. For the so-called constitutional monarchy, as we said,^^[[1|Rackham: Book: 3, Section: 1287a, Note: 1]]^^ is not a special kind of constitution (since it is possible for a life-long generalship to exist under all constitutions, for example under a democracy and an aristocracy, and many people make one man sovereign over the administration, for instance there is a government of this sort in Epidamnus,^^[[2|Rackham: Book: 3, Section: 1287a, Note: 2]]^^ and also at Opus^^[[3|Rackham: Book: 3, Section: 1287a, Note: 3]]^^ to a certain smaller extent); but we have now to discuss what is called Absolute Monarchy, which is the monarchy under which the king governs all men according to his own will. Some people think that it is entirely contrary to nature for one person to be sovereign over all the citizens where the state consists of men who are alike; for necessarily persons alike in nature must in accordance with nature have the same principle of justice and the same value, so that inasmuch as for persons who are unequal to have an equal amount of food or clothing is harmful for their bodies, the same is the case also in regard to honors; similarly therefore it is wrong for those who are equal to have inequality, owing to which it is just for no one person to govern or be governed more than another, and therefore for everybody to govern and be governed alike in turn. And this constitutes law for regulation is law. Therefore it is preferable for the law to rule rather than any one of the citizens,and according to this same principle, even if it be better for certain men to govern, they must be appointed as guardians of the laws and in subordination to them; for there must be some government, but it is clearly not just, men say, for one person to be governor when all the citizens are alike. It may be objected that any case which the law appears to be unable to define, a human being also would be unable to decide. But the law first specially educates the magistrates for the purpose and then commissions them to decide and administer the matters that it leaves over ‘according to the best of their judgement,’^^[[4|Rackham: Book: 3, Section: 1287a, Note: 4]]^^ and furthermore it allows them to introduce for themselves any amendment that experience leads them to think better than the established code. He therefore that recommends that the law shall govern seems to recommend that God and reason alone shall govern, but he that would have man govern adds a wild animal also; for appetite is like a wild animal, and also passion warps the rule even of the best men. Therefore the law is wisdom without desire. And there seems to be no truth in the analogy which argues from the arts^^[[5|Rackham: Book: 3, Section: 1287a, Note: 5]]^^ that it is a bad thing to doctor oneself by book, but preferable to employ the experts in the arts. For they never act contrary to principle from motives of friendship, but earn their fee when (for instance) they have cured their patients, whereas holders of political office usually do many things out of spite and to win favor; since when people suspect even the physicians of being in the confidence of their enemies and of trying to make away with them for gain, in that case they would sooner look up the treatment in the books.
Durazzo, on the Adriatic.
Chief town of Locri, near the Straits of Euboea
This formula came in the oath taken by the dicasts at Athens.
i.e. the practical sciences, of which medicine is taken as an example.
Yet certainly physicians themselves call in other physicians to treat them when they are ill, and gymnastic trainers put themselves under other trainers when they are doing exercises, believing that they are unable to judge truly because they are judging about their own cases and when they are under the influence of feeling. Hence it is clear that when men seek for what is just they seek for what is impartial; for^^[[1|Rackham: Book: 3, Section: 1287b, Note: 1]]^^ the law is that which is impartial. Again, customary laws^^[[2|Rackham: Book: 3, Section: 1287b, Note: 2]]^^ are more sovereign and deal with more sovereign matters than written laws, so that if a human ruler is less liable to error than written laws, yet he is not less liable to error than the laws of custom. But also it is certainly not easy for the single ruler to oversee a multitude of things; it will therefore be necessary for the officials appointed by him to be numerous; so that what difference does it make whether this has been the arrangement immediately from the outset or the single ruler appoints them in this manner? Again, a thing that has also been said before, if the virtuous man justly deserves to rule because he is better, yet two good men are better than one: for that is the meaning of the line^^[[3|Rackham: Book: 3, Section: 1287b, Note: 3]]^^
<<<
When two together go—
<<<
and of the prayer of Agamemnon^^[[4|Rackham: Book: 3, Section: 1287b, Note: 4]]^^
<<<
May ten such fellow-councillors be mine.
<<<
And even now the magistrates, like the Athenian dicast, have power to judge certain cases about which the law is unable to give a clear declaration, since nobody disputes that in matters about which it can do so the law would be the best ruler and judge. But since, although some things can be covered by the laws,other things cannot, it is the latter that cause doubt and raise the question whether it is preferable for the best law to rule or the best man. For to lay down a law about things that are subjects for deliberation is an impossibility. Therefore men do not deny that it must be for a human being to judge about such matters, but they say that it ought not to be a single human being only but a number. For the individual official judges well when he has been instructed by the law, and it would doubtless seem curious if a person saw better when judging with two eyes and two organs of hearing and acting with two feet and hands than many persons with many, since even as it is monarchs make many eyes and ears and hands and feet their own, for they adopt persons that are friendly to their rule and to themselves as their fellow-rulers. Although therefore if these assistants are not friendly they will not act in conformity with the monarch's policy, if they are friends of him and of his rule, well, a friend is one's equal and like, so that if the monarch thinks that his friends ought to rule he thinks that people who are equal to and like himself ought to rule like himself.
This then more or less is the case advanced by those who argue against kingship.
But perhaps, although this is a true account of the matter in some cases, it does not apply in others. For there is such a thing as being naturally fitted to be controlled by a master, and in another case, to be governed by a king, and in another, for citizenship, and this is just and expedient; but there is no such thing as natural fitness for tyranny, nor for any other of the forms of government that are divergences, for these come about against nature.
Perhaps this should be ‘and.’
i.e. the rules of duty and of manners that are customary but not embodied in legislation: cf. 1319b 40 ‘the laws both written and unwritten.’
http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%2010.224&lang=original: The passage goes on καί τε πρὸ ὃ τοῦ ἐνόησεν ὅππως κέρδος ἔῃ, ‘then one discerneth Before the other how advantage lieth.’
http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%202.372&lang=original.
But merely from what has been said, it is clear that among people who are alike and equal it is neither expedient nor just for one to be sovereign over all—neither when there are no laws, but he himself is in the place of law, nor when there are laws, neither when both sovereign and subjects are good nor when both are bad, nor yet when the sovereign is superior in virtue, except in a certain manner. What this manner is must be stated; and in a way it has been stated already even before. But first we must define what constitutes fitness for royal government, what fitness for aristocracy, and what for a republic. A fit subject for royal government is a populace of such a sort as to be naturally capable of producing a family of outstanding excellence for political leadership; a community fit for aristocracy is one that naturally produces a populace^^[[1|Rackham: Book: 3, Section: 1288a, Note: 1]]^^ capable of being governed under the form of government fit for free men by those who are fitted by virtue for taking the part of leaders in constitutional government; a republican community, one in which there naturally grows up a military populace^^[[2|Rackham: Book: 3, Section: 1288a, Note: 2]]^^ capable of being governed and of governing under a law that distributes the offices among the well-to-do in accordance with merit. When therefore it comes about that there is either a whole family or even some one individual that differs from the other citizens in virtue so greatly that his virtue exceeds that of all the others, then it is just for this family to be the royal family or this individual king, and sovereign over all matters. For, as has been said before,this holds good not only in accordance with the right that is usually brought forward by those who are founding aristocratic and oligarchic constitutions, and from the other side by those who are founding democratic ones (for they all make their claim on the ground of superiority, though not the same superiority), but it also holds good in accordance with the right spoken of before.^^[[3|Rackham: Book: 3, Section: 1288a, Note: 3]]^^ For it is not seemly to put to death or banish, nor yet obviously to ostracize, such a man, nor is it seemly to call upon him to take his turn as a subject; for it is not in the order of nature for the part to overtop the whole, but the man that is so exceptionally outstanding has come to overtop the whole community. Hence it only remains for the community to obey such a man, and for him to be sovereign not in turn but absolutely.
Let this be our answer to the questions as regards kingship, what are its varieties, and whether it is disadvantageous for states or advantageous, and for what states, and under what conditions.
And since we pronounce the right constitutions to be three, and of these the one governed by the best men must necessarily be the best, and such is the one in which it has come about either that some one man or a whole family or a group of men is superior in virtue to all the citizens together, the latter being able to be governed and the former to govern on the principles of the most desirable life, and since in the first part of the discourse^^[[4|Rackham: Book: 3, Section: 1288a, Note: 4]]^^ it was proved that the virtue of a man and that of a citizen in the best state must of necessity be the same, it is evident that a man becomes good in the same way and by the same means as one might establish an aristocratically or monarchically governed state,^^[[5|Rackham: Book: 3, Section: 1288a, Note: 5]]^^
The clause translated ‘that—populace’ some editors excise as a superfluous insertion.
They also excise ‘in which-populace’
i.e. the right of merit, 8.7.
Perhaps the Greek should be altered to give ‘established a state governed in the best way by an aristocracy or a monarchy.’
so that it will be almost the same education and habits that make a man good and that make him capable as a citizen or a king.
These conclusions having been laid down, we must now endeavor to discuss the best form of constitution and to say in what way it is natural for it to come into existence and how it is natural for it to be organized.^^[[1|Rackham: Book: 3, Section: 1288b, Note: 1]]^^
The concluding sentence, by whomever written, clearly leads on to the Book that is No. 7 in the MSS. and in this edition; and after it the MSS. add half the first sentence of that Book, slightly altered. Some editors therefore transfer Books 7 and 8 here and put Books 4, 5 and 6 after them; opinions vary as to the proper order of Books 4, 5. and 6 among themselves.
---
!!![[Section: 1288b|Rackham: Book: 4, Section: 1288b]]
{{Rackham: Book: 4, Section: 1288b}}
---
!!![[Section: 1289a|Rackham: Book: 4, Section: 1289a]]
{{Rackham: Book: 4, Section: 1289a}}
---
!!![[Section: 1289b|Rackham: Book: 4, Section: 1289b]]
{{Rackham: Book: 4, Section: 1289b}}
---
!!![[Section: 1290a|Rackham: Book: 4, Section: 1290a]]
{{Rackham: Book: 4, Section: 1290a}}
---
!!![[Section: 1290b|Rackham: Book: 4, Section: 1290b]]
{{Rackham: Book: 4, Section: 1290b}}
---
!!![[Section: 1291a|Rackham: Book: 4, Section: 1291a]]
{{Rackham: Book: 4, Section: 1291a}}
---
!!![[Section: 1291b|Rackham: Book: 4, Section: 1291b]]
{{Rackham: Book: 4, Section: 1291b}}
---
!!![[Section: 1292a|Rackham: Book: 4, Section: 1292a]]
{{Rackham: Book: 4, Section: 1292a}}
---
!!![[Section: 1292b|Rackham: Book: 4, Section: 1292b]]
{{Rackham: Book: 4, Section: 1292b}}
---
!!![[Section: 1293a|Rackham: Book: 4, Section: 1293a]]
{{Rackham: Book: 4, Section: 1293a}}
---
!!![[Section: 1293b|Rackham: Book: 4, Section: 1293b]]
{{Rackham: Book: 4, Section: 1293b}}
---
!!![[Section: 1294a|Rackham: Book: 4, Section: 1294a]]
{{Rackham: Book: 4, Section: 1294a}}
---
!!![[Section: 1294b|Rackham: Book: 4, Section: 1294b]]
{{Rackham: Book: 4, Section: 1294b}}
---
!!![[Section: 1295a|Rackham: Book: 4, Section: 1295a]]
{{Rackham: Book: 4, Section: 1295a}}
---
!!![[Section: 1295b|Rackham: Book: 4, Section: 1295b]]
{{Rackham: Book: 4, Section: 1295b}}
---
!!![[Section: 1296a|Rackham: Book: 4, Section: 1296a]]
{{Rackham: Book: 4, Section: 1296a}}
---
!!![[Section: 1296b|Rackham: Book: 4, Section: 1296b]]
{{Rackham: Book: 4, Section: 1296b}}
---
!!![[Section: 1297a|Rackham: Book: 4, Section: 1297a]]
{{Rackham: Book: 4, Section: 1297a}}
---
!!![[Section: 1297b|Rackham: Book: 4, Section: 1297b]]
{{Rackham: Book: 4, Section: 1297b}}
---
!!![[Section: 1298a|Rackham: Book: 4, Section: 1298a]]
{{Rackham: Book: 4, Section: 1298a}}
---
!!![[Section: 1298b|Rackham: Book: 4, Section: 1298b]]
{{Rackham: Book: 4, Section: 1298b}}
---
!!![[Section: 1299a|Rackham: Book: 4, Section: 1299a]]
{{Rackham: Book: 4, Section: 1299a}}
---
!!![[Section: 1299b|Rackham: Book: 4, Section: 1299b]]
{{Rackham: Book: 4, Section: 1299b}}
---
!!![[Section: 1300a|Rackham: Book: 4, Section: 1300a]]
{{Rackham: Book: 4, Section: 1300a}}
---
!!![[Section: 1300b|Rackham: Book: 4, Section: 1300b]]
{{Rackham: Book: 4, Section: 1300b}}
---
!!![[Section: 1301a|Rackham: Book: 4, Section: 1301a]]
{{Rackham: Book: 4, Section: 1301a}}
^^[[1|Rackham: Book: 4, Section: 1288b, Note: 1]]^^In all the arts and the sciences that are not merely sectional but that in relation to some one class of subject are complete, it is the function of a single art or science to study what is suited to each class,^^[[2|Rackham: Book: 4, Section: 1288b, Note: 2]]^^ for instance what sort of gymnastic exercise is beneficial for what sort of bodily frame, and what is the best sort (for the best must naturally suit the person of the finest natural endowment and equipment), and also what one exercise taken by all is the best for the largest number (for this is also a question for gymnastic science), and in addition, in case someone desires a habit of body and a knowledge of athletic exercises that are not the ones adapted to him, it is clearly just as much the task of the trainer and gymnastic master to produce this capacity^^[[3|Rackham: Book: 4, Section: 1288b, Note: 3]]^^ also;and we notice this also happening similarly in regard to medicine, and shipbuilding, and the making of clothes, and every other craft. Hence it is clear that in the case of the constitution as well it is the business of the same science to study which is the best constitution and what character it must have to be the most ideal if no external circumstance stands in the way, and what constitution is adapted to what people (since for many it is doubtless impossible to attain the best one, so that the good lawgiver and the true statesman must be acquainted with both the form of constitution that is the highest absolutely and that which is best under assumed conditions), and also thirdly the form of constitution based on a certain supposition (for he must be also capable of considering both how some given constitution could be brought into existence originally and also in what way having been brought into existence it could be preserved for the longest time: I mean for example if it has befallen some state not only not to possess the best constitution and to be unprovided even with the things necessary for it, but also not to have the constitution that is practicable under the circumstances but an inferior one); and beside all these matters he must ascertain the form of constitution most suited to all states, since most of those who make pronouncements about the constitution, even if the rest of what they say is good, entirely miss the points of practical utility. For it is proper to consider^^[[4|Rackham: Book: 4, Section: 1288b, Note: 4]]^^ not only what is the best constitution but also what is the one possible of achievement, and likewise also what is the one that is easier and more generally shared by all states. But as it is, some students inquire which is the highest form of all even though requiring much material equipment,^^[[5|Rackham: Book: 4, Section: 1288b, Note: 5]]^^ while those who rather state some general form sweep aside the constitutions actually existing and praise that of Sparta or some other;
Transposed as Book 6 by some editors; see Book 3 fin., note.
Perhaps the Greek should be altered to give ‘to each individual.’
i.e. a bodily bearing and athletic skill that are not the ones most suited to the pupil's particular physique.
The fourfold classification given just before is repeated in rather loose terms in this sentence.
The word originally denoted the duty of the wealthy citizen holding office of Choregus to supply dresses, etc., for the chorus and actors in a drama.
but the proper course is to bring forward an organization of such a sort that men will easily be persuaded and be able in the existing circumstances to take part in it, since to reform a constitution is no less a task than to frame one from the beginning, just as to re-learn a science is just as hard as to learn it originally; in addition therefore to the things mentioned the student of politics must also be able to render aid to the constitutions that exist already, as was also said before.^^[[1|Rackham: Book: 4, Section: 1289a, Note: 1]]^^ But this is impossible if he does not know how many kinds of constitution there are; but at present some people think that there is only one kind of democracy and one kind of oligarchy, but this is not true. Hence he must take in view the different varieties of the constitutions, and know how many there are and how many are their combinations. And after this it needs this same discrimination also to discern the laws that are the best, and those that are suited to each of the forms of constitution. For the laws should be laid down, and all people lay them down, to suit the constitutions—the constitutions must not be made to suit the laws; for a constitution is the regulation of the offices of the state in regard to the mode of their distribution and to the question what is the sovereign power in the state and what is the object of each community, but laws are distinct from the principles of the constitution, and regulate how the magistrates are to govern and to guard against thosewho transgress them. So that clearly it is necessary to be in possession of the different varieties of each form of constitution, and the number of these, even for the purpose of legislation; for it is impossible for the same laws to be expedient for all oligarchies or democracies if there are really several kinds of them, and not one sort of democracy or oligarchy only.
And inasmuch as in our first inquiry^^[[2|Rackham: Book: 4, Section: 1289a, Note: 2]]^^ about the forms of the constitution we classified the right constitutions as three, kingship, aristocracy and constitutional government, and the deviations from these as three, tyranny from kingship, oligarchy from aristocracy and democracy from constitutional government, and about aristocracy and kingship we have spoken (for to study the best constitution is the same thing as to speak about the forms that bear those names, since each of them means a system based on the qualification of virtue equipped with means), and as also the question what constitutes the difference between aristocracy and kingship and when a royal government is to be adopted has been decided before, it remains to discuss the form of constitution designated by the name^^[[3|Rackham: Book: 4, Section: 1289a, Note: 3]]^^ common to them all, and the other forms, oligarchy, democracy and tyranny. Now it is manifest also which of these deviations^^[[4|Rackham: Book: 4, Section: 1289a, Note: 4]]^^ is the worst and which the second worst. For necessarily the deviation from the first and most divine must be the worst,^^[[5|Rackham: Book: 4, Section: 1289a, Note: 5]]^^ and kingship must of necessity either possess the name only, without really being kingship,
i.e. πολιτεία, ‘polity,’ which denotes not only a constitution of any form, but also (like our term ‘constitutional government’) a particular form, viz., a republic, cf. Book 3.5.2.
The three forms of constitution last mentioned.
''Corruptio optimi pessima'', a Socratic notion: ‘the men of the best natural gifts, when educated, are the worst,’ http://www.perseus.tufts.edu/hopper/text?doc=Xen.%20Mem.%204.1.3&lang=original.
or be based on the outstanding superiority of the man who is king; so that tyranny being the worst form must be the one farthest removed from constitutional government, and oligarchy must be the second farthest (for aristocracy is widely separated from that constitution), while democracy must be the most moderate. An account of their relative merits has indeed already been given also by one of the former writers,^^[[1|Rackham: Book: 4, Section: 1289b, Note: 1]]^^ though not on the same principle as ours; for he inclined to judge that there were good varieties of all the forms, for instance a good sort of oligarchy and so on, and that democracy was the worst among these, but the best among the bad varieties, whereas we say that the deviations are wholly wrong, and that it is not right to speak of one form of oligarchy as better than another, but only as less bad. But let us for the present dismiss the question of a classification of this nature. Our business is first to distinguish how many different forms of the constitutions there are, assuming that there do exist several kinds of democracy and of oligarchy; next, which form is most general, and which most desirable after the best constitution, and also if there exists some other form that is aristocratic in nature and well constructed but not fitted to the largest number of cities, which this is; next, which of the other forms too is desirable for what people (since probably for some democracy is necessary more than oligarchy, and for others oligarchy more than democracy);and after this, in what way should one proceed who wishes to set up these constitutions, I mean the various forms of democracy and of oligarchy; and finally, when as far as possible we have concisely touched upon all these questions, we must endeavor to review what are the agencies that destroy and what are those that preserve constitutions generally and each variety of constitution in particular, and what are the causes by which it is most natural for these events to be brought about.
Now the reason of there being several forms of constitution is that every city has a considerable number of parts. For in the first place we see that all the cities are composed of households, and then again that of this multitude some must necessarily be rich and some poor and some between the two, and also of the rich and the poor the former class is heavy-armed and the latter without armor. And we see that one portion of the common people is agricultural, another engaged in trade and another mechanic. And the upper classes have distinctions also corresponding to their wealth and the amounts of their property (for example in a stud of horses—for it is not easy to rear horses without being rich, and this is why in ancient times there were oligarchies in all the states whose strength lay in their cavalry, and they used to use horses for their wars against their neighbors, as for instance did the Eretrians and Chalcidians and the people of Magnesia on the Maeander and many of the other Asiatic peoples). Moreover in addition to differences in wealth there is the difference of birth, and that in regard to virtue,
http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Stat.%20302a&lang=original
and indeed any other similar distinction that in the discussion of aristocracy has been stated to constitute a part of the state (for there we distinguished how many necessary parts there are of which every state must consist); for sometimes all of these parts participate in the constitution and sometimes a smaller or a larger number of them. It is clear therefore that there must necessarily be several forms of constitution differing in kind from one another, inasmuch as these parts differ in kind among themselves. For a constitution means the arrangement of the magistracies, and this all people plan out either according to the power of those who share political rights, or according to some common equality between them, I mean for example between the poor or between the rich, or some equality common to them both.^^[[1|Rackham: Book: 4, Section: 1290a, Note: 1]]^^ It follows therefore that there are as many forms of constitution as there are modes of arrangement according to the superiorities and the differences of the sections. But the forms mostly are thought to be two—just as in the case of the winds we speak of some as north and some as south and regard the rest as deviations from these,^^[[2|Rackham: Book: 4, Section: 1290a, Note: 2]]^^ so also of constitutions there are held to be two forms, democracy and oligarchy; for men reckon aristocracy as a kind of oligarchy because it is oligarchy of a sort, and what is called constitutional government as democracy, just as in the case of the winds they reckon the west wind as a kind of north wind and the east wind as a kind of south wind.And the case is similar with musical modes, as some people say: for there too they posit two kinds, the Dorian mode and the Phrygian, and call the other scales some of them Dorian and the others Phrygian. For the most part therefore they are accustomed to think in this way about the constitutions; but it is truer and better to class them as we did, and assuming that there are two well-constructed forms, or else one, to say that the others are deviations, some from the well-blended constitution and the others from the best one, the more tense and masterful constitutions being oligarchic and the relaxed and soft ones demotic.
But it is not right to define democracy, as some people are in the custom of doing now, merely as the constitution in which the multitude is sovereign (for even in oligarchies and everywhere the majority is sovereign) nor oligarchy as the constitution in which a few are sovereign over the government. For if the whole number were thirteen hundred, and a thousand of these were rich and did not give the three hundred poor a share in the government although they were free-born and like themselves in all other respects, no one would say that this people was governed democratically; and similarly also if there were few poor, but these more powerful than the rich who were more numerous, no one would call such a government a democracy either, if the other citizens being rich had no share in the honors. Rather therefore ought we to say that it is a democracy
This clause looks like an interpolation.
Aristotle refers to this view in http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Meteo.%20364a.19&lang=original, saying that west winds are classed with north and east winds with south, because wind from the setting sun is cooler and from the rising sun warmer. He notes that north and south winds are the most frequent, http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Meteo.%20361a.6&lang=original; this may have suggested the idea that they were the typical winds.
when the free are sovereign and an oligarchy when the rich are, but that it comes about that the sovereign class in a democracy is numerous and that in an oligarchy small because there are many men of free birth and few rich. For otherwise, suppose people assigned the offices by height, as some persons^^[[1|Rackham: Book: 4, Section: 1290b, Note: 1]]^^ say is done in Ethiopia, or by beauty, that would be an oligarchy, because both the handsome and the tall are few in number. Nevertheless it is not enough to define these constitutions even by wealth and free birth only; but inasmuch as there are more elements than one both in democracy and in oligarchy, we must add the further distinction that neither is it a democracy if the free^^[[2|Rackham: Book: 4, Section: 1290b, Note: 2]]^^ being few govern the majority who are not of free birth, as for instance at Apollonia on the Ionian Gulf and at Thera (for in each of these cities the offices of honor were filled by the specially noble families who had been the first settlers of the colonies, and these were few out of many), nor is it a democracy^^[[3|Rackham: Book: 4, Section: 1290b, Note: 3]]^^ if the rich rule because they are in a majority, as in ancient times at Colophon (for there the majority of the population owned large property before the war against the Lydians took place), but it is a democracy when those who are free are in the majority and have sovereignty over the government, and an oligarchy when the rich and more well bornare few and sovereign.
It has then been stated that there are several forms of constitution, and what is the cause of this; but let us take the starting-point that was laid down before^^[[4|Rackham: Book: 4, Section: 1290b, Note: 4]]^^ and say that there are more forms than those mentioned, and what these forms are, and why they vary. For we agree that every state possesses not one part but several. Therefore just as, in case we intended to obtain a classification of animals, we should first define the properties necessarily belonging to every animal (for instance some of the sense organs, and the machinery for masticating and for receiving food, such as a mouth and a stomach, and in addition to these the locomotive organs of the various species), and if there were only so many necessary parts, but there were different varieties of these (I mean for instance certain various kinds of mouth and stomach and sensory organs, and also of the locomotive parts as well), the number of possible combinations of these variations will necessarily produce a variety of kinds of animals (for it is not possible for the same animal to have several different sorts of mouth, nor similarly of ears either), so that when all the possible combinations of these are taken they will all produce animal species, and there will be as many species of the animal as there are combinations of the necessary parts:—so in the same way also we shall classify the varieties of the constitutions that have been mentioned. For states also are composed not of one but of several parts, as has been said often. One of these parts therefore is the mass of persons concerned with food who are called farmers,
e.g. http://www.perseus.tufts.edu/hopper/text?doc=Hdt.%203.20&lang=original.
i.e. those of citizen birth.
Perhaps the Greek should be altered here to give ‘an oligarchy.’
and second is what is called the mechanic class (and this is the group engaged in the arts without which it is impossible for a city to be inhabited, and some of these arts are indispensably necessary, while others contribute to luxury or noble living), and third is a commercial class (by which I mean the class that is engaged in selling and buying and in wholesale and retail trade), and fourth is the class of manual laborers, and the fifth class is the one to defend the state in war, which is no less indispensable than the others if the people are not to become the slaves of those who come against them; for surely it is quite out of the question that it should be proper to give the name of state to a community that is by nature a slave, for a state is self-sufficient, but that which is a slave is not self-sufficient. Therefore the statement made in the __Republic__^^[[1|Rackham: Book: 4, Section: 1291a, Note: 1]]^^ is witty but not adequate. For Socrates says that the most necessary elements of which a state is composed are four, and he specifies these as a weaver, a farmer, a shoemaker and a builder; and then again he adds, on the ground that these are not self-sufficient, a copper-smith and the people to look after the necessary live-stock, and in addition a merchant and a retail trader. These elements together constitute the full complement of his first city,^^[[2|Rackham: Book: 4, Section: 1291a, Note: 2]]^^ implying that every city is formed for the sake of the necessaries of life and not rather for the sake of what is noble, and that it has equal need of both shoemakers and farmers; but the warrior classhe does not assign to it until as the territory is increased and comes into contact with that of the neighbors they are brought into war. But yet even among the four partners or whatever their number be there must necessarily be somebody to assign justice and to judge their claims; inasmuch therefore as one would count the soul of an animal to be more a part of it than the body, so also the factors in states corresponding to the soul must be deemed to be parts of them more than those factors which contribute to necessary utility,—the former being the military class and the class that plays a part in judicial justice, and in addition to these the deliberative class, deliberation being a function of political intelligence. And it makes no difference to the argument whether these functions are held by special classes separately or by the same persons; for it often happens for the same men to be both soldiers and farmers. Hence inasmuch as both groups^^[[3|Rackham: Book: 4, Section: 1291a, Note: 3]]^^ of classes must be counted parts of the state, it is clear that the heavy-armed soldiery at any rate^^[[4|Rackham: Book: 4, Section: 1291a, Note: 4]]^^ must be a part of the state. And a seventh class is the one that serves the community by means of its property, the class that we call the rich. And an eighth is the class of public servants, that is, those who serve in the magistracies, inasmuch as without rulers it is impossible for a city to exist; it is therefore necessary that there should be some men who are able to govern and who render this service to the state either continuously or in turn. And there remain the classes which we happen to have defined just before, the deliberative class and the one that judges the claims of litigants. If therefore it is proper for the states to have these functions performed, and well and justly performed,
http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Rep.%20369b&lang=original
i.e. the first sketch of the City-state, loc. cit.
The first four classes and the fifth and sixth (the military and judicial).
Lower grades of the forces may be excluded from citizenship, e.g. the rowers of the triremes (see below, 1376b 15).
it is necessary for there also to be some men possessing virtue in the form of political excellence. Now as to the other capacities many people think that it is possible for them to be possessed in combination, for example, for the same men to be the soldiers that defend the state in war and the farmers that till the land and the artisans, and also the councillors and judges, and indeed all men claim to possess virtue and think themselves capable of filling most of the offices of state; but it is not possible for the same men to be poor and rich. Hence these seem to be in the fullest sense the parts of the state, the rich and the poor. And also the fact that the rich are usually few and the poor many makes these two among the parts of the state appear as opposite sections; so that the superior claims^^[[1|Rackham: Book: 4, Section: 1291b, Note: 1]]^^ of these classes are even made the guiding principles upon which constitutions are constructed, and it is thought that there are two forms of constitution, democracy and oligarchy.
That there are then several forms of constitution, and what are the reasons for this, has been stated before; let us now say that there are several varieties both of democracy and of oligarchy. And this is clear even from what has been said already. For there are several classes both of the people and of those called the notables; for instance classes of the people are, one the farmers, another the class dealing with the arts and crafts, another the commercial classoccupied in buying and selling and another the one occupied with the sea—and this is divided into the classes concerned with naval warfare, with trade, with ferrying passengers and with fishing (for each of these classes is extremely numerous in various places, for instance fishermen at Tarentum and Byzantium, navy men at Athens, the mercantile class at Aegina and Chios, and the ferryman-class at Tenedos), and in addition to these the hand-working class and the people possessing little substance so that they cannot live a life of leisure, also those that are not free men of citizen parentage on both sides, and any other similar class of common people; while among the notables wealth, birth, virtue, education, and the distinctions that are spoken of in the same group as these, form the classes.
The first kind of democracy therefore is the one which receives the name chiefly in respect of equality. For the law of this sort of democracy ascribes equality to the state of things in which the poor have no more prominence than the rich, and neither class is sovereign, but both are alike; for assuming that freedom is chiefly found in a democracy, as some persons suppose, and also equality, this would be so most fully when to the fullest extent all alike share equally in the government. And since the people are in the majority, and a resolution passed by a majority is paramount, this must necessarily be a democracy. This therefore is one kind of democracy, where the offices are held on property qualifications, but these low ones, although it is essential that the man who acquires the specified amount should have the right to hold office, and the man who loses it should not hold office.
And another kind of democracy is for all the citizens that are not open to challenge^^[[1|Rackham: Book: 4, Section: 1292a, Note: 1]]^^ to have a share in office, but for the law to rule; and another kind of democracy is for all to share in the offices on the mere qualification of being a citizen, but for the law to rule. Another kind of democracy is where all the other regulations are the same, but the multitude is sovereign and not the law; and this comes about when the decrees of the assembly over-ride the law. This state of things is brought about by the demagogues; for in the states under democratic government guided by law a demagogue does not arise, but the best classes of citizens are in the most prominent position; but where the laws are not sovereign, then demagogues arise; for the common people become a single composite monarch, since the many are sovereign not as individuals but collectively. Yet what kind of democracy Homer^^[[2|Rackham: Book: 4, Section: 1292a, Note: 2]]^^ means by the words ‘no blessing is the lordship of the many’—whether he means this kind or when those who rule as individuals are more numerous, is not clear. However, a people of this sort, as being monarch, seeks to exercise monarchic rule through not being ruled by the law, and becomes despotic, so that flatterers are held in honor. And a democracy of this nature is comparable to the tyrannical form of monarchy, because their spirit is the same, and both exercise despotic control over the better classes, and the decrees voted by the assemblyare like the commands issued in a tyranny, and the demagogues and the flatterers are the same people or a corresponding class, and either set has the very strongest influence with the respective ruling power, the flatterers with the tyrants and the demagogues with democracies of this kind. And these men cause the resolutions of the assembly to be supreme and not the laws, by referring all things to the people; for they owe their rise to greatness to the fact that the people is sovereign over all things while they are sovereign over the opinion of the people, for the multitude believes them. Moreover those who bring charges against the magistrates say that the people ought to judge the suits, and the people receive the invitation gladly, so that all the magistracies are put down. And it would seem to be a reasonable criticism to say that such a democracy is not a constitution at all; for where the laws do not govern there is no constitution, as the law ought to govern all things while the magistrates control particulars, and we ought to judge this to be constitutional government; if then democracy really is one of the forms of constitution, it is manifest that an organization of this kind, in which all things are administered by resolutions of the assembly, is not even a democracy in the proper sense, for it is impossible for a voted resolution to be a universal rule.
Let this be our discussion of the different kinds of democracy.
Of the kinds of oligarchy, one is for the magistracies to be appointed from property-assessments so high that the poor who are the majority have no share in the government, but for the man who acquires the requisite amount of property to be allowed to take part in it;
i.e. on the score of birth, cf. 5.4.
http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Il.%202.204&lang=original
another is when the magistracies are filled from high assessments and the magistrates themselves elect to fill vacancies (so that if they do so from all the citizens of this assessment, this appears rather to be of the nature of an aristocracy, but if from a particular section of them, it is oligarchical); another variety of oligarchy is when son succeeds father in office; and a fourth kind is when the hereditary system just mentioned exists and also the magistrates govern and not the law. This among oligarchies is the form corresponding to tyranny among monarchies and to the form of democracy about which we spoke last among democracies, and indeed oligarchy of this sort has the special name of dynasty.^^[[1|Rackham: Book: 4, Section: 1292b, Note: 1]]^^
So many therefore are the kinds of oligarchy and of democracy; but it must not escape notice that in many places it has come about that although the constitution as framed by the laws is not democratic, yet owing to custom and the social system it is democratically administered, and similarly by a reverse process in other states although the legal constitution is more democratic, yet by means of the social system and customs it is carried on rather as an oligarchy. This occurs chiefly after alterations of the constitutions have taken place; for the people do not change over to the new system immediately but are content at the first stages to gain small advantages from the other party,so that the previously existing laws continue although power is in the hands of the party that is changing the constitution.
And that these various kinds of democracy and oligarchy exist is manifest from the actual things that have been said. For necessarily either all the parts of the population that have been mentioned must have a share in the government, or some and not others. When therefore the farmer class and the class possessed of moderate property is sovereign over the government, they govern according to laws; for they have a livelihood if they work, but are not able to be at leisure, so that they put the law in control and hold the minimum of assemblies necessary; and the other persons have the right to take part when they have acquired the property-assessment fixed by the laws, so that to take part in the government is open to all who have got that amount of property; since for it not to be open to everybody on any terms at all is a characteristic of oligarchy, but then on the other hand it is impossible for it to be open to them to have leisure if there are no revenues.^^[[2|Rackham: Book: 4, Section: 1292b, Note: 2]]^^ This then is one kind of democracy for these reasons. Another kind is due to the distinction that comes next: it is possible that all the citizens not liable to objection on the score of birth may have the right to take part in the assembly, but may actually take part only when they are able to be at leisure; hence in a democracy of this nature the laws govern because there is no revenue. A third kind is when all those who are free men have the right to take part in the government yet do not do so because of the aforesaid reason, so that it follows that in this form of democracy also the law governs.
Government controlled by a few powerful families. Cf. http://www.perseus.tufts.edu/hopper/text?doc=Thuc.%203.62.4&lang=original, where the Thebans say, ‘In those days our state was not governed by an oligarchy that granted equal justice to all, nor yet by a democracy; the power was in the hands of a small cabal (δυναστεία ὀλίγων ἀνδρῶν), than which nothing is more opposed to law or to true political order, or more nearly resembles a tyranny’ (Jowett).
i.e. revenues from abroad; the poor can only attend often if paid for attendance, and this can only be financed if the state has income from tribute or foreign property.
And a fourth kind of democracy is the one that has been the last in point of time to come into existence in the states. Because the states have become much greater than the original ones and possess large supplies of revenue, while all the citizens have a share in the government because of the superiority^^[[1|Rackham: Book: 4, Section: 1293a, Note: 1]]^^ of the multitude, all actually take part in it and exercise their citizenship because even the poor are enabled to be at leisure by receiving pay. Indeed the multitude in this kind of state has a very great deal of leisure, for they are not hampered at all by the care of their private affairs, but the rich are, so that often they take no part in the assembly nor in judging lawsuits. Owing to this the multitude of the poor becomes sovereign over the government, instead of the laws. Such in number and in nature are the kinds of democracy that these causes necessarily bring into existence. To turn to the varieties and of oligarchy, when more men possess property, but less of it and not a very large amount, this is the first form of oligarchy; for they allow the man that acquires property the right to participate, and because there is a large number of persons participating in the government it necessarily follows that not the men but the law is sovereign (for the farther removed they are from monarchy, and as they have not so much property as to be idle and neglect it, nor yet so little as to be kept at the expense of the state,they are compelled to call upon the law to rule instead of ruling themselves). But then if the owners of the properties are fewer than those who owned them previously, and own more, the second form of oligarchy comes into being; for as they become stronger they claim to have a larger share, and therefore they themselves select those from among the rest of the citizens who go into the government, but as they are not yet strong enough to rule without law they make the law conform with this.^^[[2|Rackham: Book: 4, Section: 1293a, Note: 2]]^^ And if they carry matters further by becoming fewer and holding larger properties, there comes about the third advance in oligarchy, which consists in their keeping the offices in their own hands, but under a law enacting that they are to be hereditary. And when finally they attain very great pre-eminence by their wealth and their multitude of friends, a dynasty of this nature is near to monarchy, and men become supreme instead of the law; and this is the fourth kind of oligarchy, the counterpart of the last kind of democracy.
Furthermore^^[[3|Rackham: Book: 4, Section: 1293a, Note: 3]]^^ there are two constitutions by the side of democracy and oligarchy, one^^[[4|Rackham: Book: 4, Section: 1293a, Note: 4]]^^ of which is counted by everybody and has been referred to as one of the four forms of constitution (and the four meant are monarchy, oligarchy, democracy and fourth the form called aristocracy), but there is a fifth, entitled by the common name of them all (for it is called constitutional government), but as it does not often occur it is overlooked by those who try to enumerate the forms of constitution, and they use the four names only (as does Plato) in the list of constitutions.
i.e. they legalize the recruiting of the ruling class by co-optation; or the words may mean ‘they make the law ruler.’
We now pass from the varieties of Oligarchy and of Democracy to those of the other actually existing constitutions, Aristocracy so-called and Constitutional Government.
Now the name of aristocracy is indeed properly given to the constitution that we discussed in our first discourses^^[[1|Rackham: Book: 4, Section: 1293b, Note: 1]]^^ (for it is right to apply the name ‘aristocracy’—‘government of the best’—only to the constitution of which the citizens are best in virtue absolutely and not merely good men in relation to some arbitrary standard, for under it alone the same person is a good man and a good citizen absolutely, whereas those who are good under the other constitutions are good relatively to their own form of constitution); nevertheless there are also some constitutions that have differences both in comparison with oligarchically governed states and with what is termed constitutional government, inasmuch as in them they elect the officials not only by wealth but also by goodness; this form of constitution differs from both and is called aristocratic. For even in the states that do not pay any public attention to virtue there are nevertheless some men that are held in high esteem and are thought worthy of respect. Where then the constitution takes in view wealth and virtue as well as the common people, as for instance at Carthage, this is of the nature of an aristocracy; and so also are the states, in which the constitution, like that of Sparta, takes in view two of these things only, virtue and the common people, and there is a mingling of these two factors, democracy and virtue. These then are two kinds of aristocracy beside the first, which is the best constitution,and a third kind is those instances of what is called constitutional government that incline more in the direction of oligarchy.
It remains for us to speak about what is termed constitutional government and also about tyranny. Though neither the former nor the aristocracies spoken of just now are really deviations, we have classed them thus because in actual truth they have all fallen away from the most correct constitution, and consequently are counted with the deviation-forms, and those are deviations from them, as we said in our remarks at the beginning.^^[[2|Rackham: Book: 4, Section: 1293b, Note: 2]]^^ Tyranny is reasonably mentioned last because it is the least constitutional of all governments, whereas our investigation is about constitutional government.
Having then stated the reason for this mode of classification, we have now to set forth our view about constitutional government. For its meaning is clearer now that the characteristics of oligarchy and democracy have been defined; since constitutional government is, to put it simply, a mixture of oligarchy and democracy. But people customarily give the name of constitutional government only to those among such mixed constitutions that incline towards democracy, and entitle those that incline more towards oligarchy aristocracies, because education and good birth go more with the wealthier classes, and also the wealthy are thought to have already the things to get which wrongdoers commit wrong; owing to which people apply the terms ‘gentry’ and ‘notabilities’ to the rich. Since therefore aristocracy means the assignment of the highest place to the best of the citizens, oligarchies also are said to be drawn rather from the gentry.
Book 3. 1279a 35 ff., 1286b 3 ff.
See 1279b 4 ff. Actual aristocracies are a falling-off from the Aristocracy and Polity is a decline from Monarchy and Aristocracy; but they are not deviations in the technical sense.
And it seems an impossibility for a city governed not by the aristocracy but by the base to have well-ordered government, and similarly also for a city that has not a well-ordered government to be governed aristocratically. But to have good laws enacted but not obey them does not constitute well-ordered government. Hence one form of good government must be understood to consist in the laws enacted being obeyed, and another form in the laws which the citizens keep being well enacted (for it is possible to obey badly enacted laws). And for laws to be well enacted is possible in two ways: they must either be the best laws possible for the given people or the best absolutely. But aristocracy in the fullest sense seems to consist in the distribution of the honors according to virtue; for virtue is the defining factor of aristocracy, as wealth is of oligarchy, and freedom of democracy (while the principle that a decision of the majority is supreme is found in them all: for in both oligarchy and aristocracy and democracies whatever the larger part of those who have a share in the government decides is supreme). In most states^^[[1|Rackham: Book: 4, Section: 1294a, Note: 1]]^^ then the name of aristocracy is given to that form of constitutional government,^^[[2|Rackham: Book: 4, Section: 1294a, Note: 2]]^^ for the combination aims only at the well-off and the poor, wealth and freedom (since in almost the largest number of states the rich seem to occupy the place of the gentry); but as there are three things that claim equal participationin the constitution, freedom, wealth and virtue (for the fourth, what is called nobility, accompanies the two latter—nobility means ancient wealth and virtue), it is manifest that the mixture of the two factors, the rich and the poor,^^[[3|Rackham: Book: 4, Section: 1294a, Note: 3]]^^ ought to be termed constitutional government, while the mixture of the three factors deserves the name of aristocracy most of all the various forms of aristocracy beside the true and best form.
It has then been stated that other forms of constitution also exist besides monarchy, democracy and oligarchy, and what their characteristics are, and how the various sorts of aristocracy and of constitutional government differ from one another; and it is manifest that aristocracy and constitutional government are not widely apart from one another.
Next to what has been said let us state the way in which what is called constitutional government comes into existence by the side of democracy and oligarchy, and how it is proper to establish it. At the same time the defining characteristics of democracy and oligarchy will also be clear; for we must grasp the distinction between these and then make a combination out of them, taking, so to say, a contribution from each. And there are three principles determining this combination or mixture. Under one plan we must adopt both features from the legislative schemes of the two different constitutions: for example, in regard to the administration of justice, in oligarchies they institute a fine for the rich if they do not serve on juries but no pay for the poor for serving, while in democracies they assign pay for the poor but no fine for the rich, but a common and intermediate principle is to have both payment and fine, and therefore this is a mark of a constitutional government, since it is a mixture of elements from both oligarchy and democracy.
i.e. in most states that are considered aristocracies.
i.e. the more oligarchical form, 1293b 36.
Loosely put for ‘wealth and free birth.’
This then is one mode of combining the two. Another is to take the middle course between the regulations of each: for example, democracies permit membership of the assembly on no property-qualification at all or a quite small one, oligarchies on a large property-qualification, but the combination clearly is to have neither principle, but one which lies in the middle between either of these two qualifications. In the third place is a combination of the two systems, taking some features from the oligarchical law and some from the democratic; I mean, for example, that it is thought to be democratic for the offices to be assigned by lot, for them to be elected oligarchic, and democratic for them not to have a property-qualification, oligarchic to have one; therefore it is aristocratic and constitutional to take one feature from one form and the other from the other, from oligarchy that offices are to be elected, and from democracy that this is not to be on a property-qualification. This then is the mode of the mixture; and the mark of a good mixture of democracy and oligarchy is when it is possible to speak of the same constitution as a democracy and as an oligarchy; for manifestly this is so when it is said because they have been mixed well, and this is the case with the form that lies in the middle, for each of the two extreme forms can be seen in it. This is the case with the constitution of Sparta. For many peopleendeavor to describe it as being a democracy, because its system has many democratic features, for instance first of all its regulation for the rearing of boys, since the sons of the rich are brought up in the same way as those of the poor, and are educated in a manner in which the sons of the poor also could be educated, and they are also treated similarly at the next age, and in the same manner when they are grown up, for there is nothing that distinguishes the rich man from the poor man—thus the arrangements for food are the same for all at the common messes, and the rich wear clothes such as even any poor man could procure, and also because of the two greatest offices the common people elect to one and share in the other (they elect the Elders and share in the Ephorate); but others call it an oligarchy, because it has many oligarchical features, for instance that all the offices are elective and none appointed by lot and few persons have the power to sentence to death and exile, and a number of other such matters. But in a well-constructed mixed constitution both of the two factors, and neither of them,^^[[1|Rackham: Book: 4, Section: 1294b, Note: 1]]^^ should seem to be present, and it should be kept safe by its own means and not by outside aid, and by its own means not because those who desire its security are more numerous outside it^^[[2|Rackham: Book: 4, Section: 1294b, Note: 2]]^^ (for even a bad constitution might possess this quality), but because no section of the state whatever would even wish for another constitution.
The proper way therefore to establish a constitutional government, and similarly also the governments named aristocracies, has now been stated.
A conjectural emendation removes this mysterious epigram, giving ‘and not one of the two (only).’
Or, if ἔξωθεν is an interpolation, ‘not merely because those (citizens) who wish it to survive are more numerous (than those who do not).’
It remained for us to speak of tyranny, not because there is much that can be said about it, but in order that it may receive its part in our inquiry, since we rank this also as one among the kinds of constitution. The nature of kingship we have defined in our first discourses,^^[[1|Rackham: Book: 4, Section: 1295a, Note: 1]]^^ in which we examined the question in relation to the constitution most commonly denoted by the term ‘kingship,’ whether it is disadvantageous or an advantage to states, and what person ought to be set up as king, and from what source, and by what procedure; and in the passage in which we were considering kingship we distinguished two kinds of tyranny, because their power in a manner borders upon royalty, because both these forms of rule are in accordance with law (for among some of the barbarians they elect monarchic rulers with autocratic powers, and also in old times among the ancient Greeks some men used to become monarchs of this sort, the rulers called ''aesymnetae''), but these two forms of tyranny have certain differences from one another, although they were on the one hand of the nature of royalty because they were in accordance with law and because they exercised monarchic rule over willing subjects, and on the other hand of the nature of a tyranny because they ruled despotically and according to their own judgement. But there is a third kind of tyranny which is thought to be tyranny in the fullest degree, being the counterpart of universal kingship; to this sort of tyranny must necessarily belong a monarchythat exercises irresponsible rule over subjects all of the same or of a higher class with a view to its own private interest and not in the interest of the persons ruled. Hence it is held against the will of the subjects, since no free man willingly endures such rule.
These then are the kinds of tyranny and such is their number, for the reasons stated
But what is the best constitution and what is the best mode of life for most cities and most of mankind, if we do not judge by the standard of a virtue that is above the level of private citizens or of an education that needs natural gifts and means supplied by fortune, nor by the standard of the ideal constitution, but of a mode of life able to be shared by most men and a constitution possible for most states to attain? For the constitutions called aristocracies, of which we spoke just now,^^[[2|Rackham: Book: 4, Section: 1295a, Note: 2]]^^ in some cases fall somewhat out of the scope of most states, and in others approximate to what is called constitutional government, so that it is proper to speak of these two forms as if they were one. And indeed the decision in regard to all these questions is based on the same elementary principles. For if it has been rightly said in the__Ethics__^^[[3|Rackham: Book: 4, Section: 1295a, Note: 3]]^^ that the happy life is the life that is lived without impediment in accordance with virtue, and that virtue is a middle course, it necessarily follows that the middle course of life is the best—such a middle course as it is possible for each class of men to attain. And these same criteria must also necessarily apply to the goodness and badness of a state, and of a constitution—for a constitution is a certain mode of life of a state.
See 1293b 7-21, cf. 1293b 36-1294a 25.
http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201101a&lang=original.
In all states therefore there exist three divisions of the state, the very rich, the very poor, and thirdly those who are between the two. Since then it is admitted that what is moderate or in the middle is best, it is manifest that the middle amount of all of the good things of fortune is the best amount to possess. For this degree of wealth is the readiest to obey reason, whereas for a person who is exceedingly beautiful or strong or nobly born or rich, or the opposite—exceedingly poor or weak or of very mean station, it is difficult to follow the bidding of reason; for the former turn more to insolence and grand wickedness, and the latter overmuch to malice and petty wickedness, and the motive of all wrongdoing is either insolence or malice. And moreover the middle class are the least inclined to shun office and to covet office,^^[[1|Rackham: Book: 4, Section: 1295b, Note: 1]]^^ and both these tendencies are injurious to states. And in addition to these points, those who have an excess of fortune's goods, strength, wealth, friends and the like, are not willing to be governed and do not know how to be (and they have acquired this quality even in their boyhood from their homelife, which was so luxurious that they have not got used to submitting to authority even in school), while those who are excessively in need of these things are too humble. Hence the latter class do not know how to govern but know how to submit togovernment of a servile kind, while the former class do not know how to submit to any government, and only know how to govern in the manner of a master. The result is a state consisting of slaves and masters, not of free men, and of one class envious and another contemptuous of their fellows. This condition of affairs is very far removed from friendliness, and from political partnership—for friendliness is an element of partnership, since men are not willing to be partners with their enemies even on a journey. But surely the ideal of the state is to consist as much as possible of persons that are equal and alike, and this similarity is most found in the middle classes; therefore the middle-class state will necessarily be best constituted in respect of those elements^^[[2|Rackham: Book: 4, Section: 1295b, Note: 2]]^^ of which we say that the state is by nature composed. And also this class of citizens have the greatest security in the states; for they do not themselves covet other men's goods as do the poor, nor do the other classes covet their substance as the poor covet that of the rich; and because they are neither plotted against nor plotting they live free from danger. Because of this it was a good prayer of Phocylides^^[[3|Rackham: Book: 4, Section: 1295b, Note: 3]]^^—
<<<
In many things the middle have the best;
Be mine a middle station.
<<<
It is clear therefore also that the political community administered by the middle class is the best, and that it is possible for those states to be well governed that are of the kind in which the middle class is numerous, and preferably stronger than both the other two classes, or at all events than one of them, for by throwing in its weight it sways the balance and prevents the opposite extremes^^[[4|Rackham: Book: 4, Section: 1295b, Note: 4]]^^ from coming into existence. Hence it is the greatest good fortune if the men that have political power possess a moderate and sufficient substance,
The text is an emendation; some MSS. give ‘to rule the tribe and to rule the council,’ but most have ‘to love office and rule the council,’ apparently thinking that the verb translated ‘rule the council’ meant ‘wish office.’
Probably Lambinus's alteration of the Greek should be accepted, giving ‘hence that state will necessarily be best governed which consists of those elements—.’
A gnomic poet of Miletus, born 560 B.C.
i.e. extreme democracy and very limited oligarchy.
since where some own a very great deal of property and others none there comes about either an extreme democracy or an unmixed oligarchy, or a tyranny may result from both of the two extremes, for tyranny springs from both democracy and oligarchy of the most unbridled kind, but much less often from the middle forms of constitution and those near to them. The cause of this we will speak of later in our treatment of political revolutions. That the middle form of constitution is the best is evident; for it alone is free from faction, since where the middle class is numerous, factions and party divisions among the citizens are least likely to occur. And the great states are more free from faction for the same reason, because the middle class is numerous, whereas in the small states it is easy to divide the whole people into two parties leaving nothing in between, and also almost everybody is needy or wealthy. Also democracies are more secure and more long-lived than oligarchies owing to the citizens of the middle class (for they are more numerous and have a larger share of the honors in democracies than in oligarchies), since when the poor are in a majority without the middle class, adversity sets in and they are soon ruined. And it must be deemed a significant fact that the best lawgivers are from among the middle citizens; for Solon was of that class,as appears from his poetry, and so was Lycurgus (for he was not a king) and Charondas and almost the greatest number of the other lawgivers.
And these considerations also show the reason why the constitutions of most states are either democratic or oligarchical; owing to the middle class in these states being often a small one, the classes diverging from the middle status—whichever of the two, the owners of the estates or the people, from time to time has the upper hand—conduct the government on their own lines, so that it becomes either a democracy or an oligarchy. And in addition to this, because factions occur and fights between the people and the wealthy, whichever party happens to gain the upper hand over its opponents does not establish a common or equal government, but takes the superior share in the government as a prize of victory, and makes it a democracy in the one case and an oligarchy in the other. Moreover each of the two states that in the past held the leadership of Greece took as a pattern the form of government that existed among themselves and set up in the one case democracies and in the other oligarchies in the cities, not considering the interest of the cities but their own advantage. Hence owing to these causes the middle form of constitution either never comes into existence or seldom and in few places; for one man^^[[1|Rackham: Book: 4, Section: 1296a, Note: 1]]^^ only among the states that have formerly held the leadership was induced to grant this form of organization, and by this time it has become a fixed habit with the people of the separate cities also not even to desire equality,
It is quite uncertain who is meant, possibly Solon or Theramenes.
but either to seek to rule or to endure being under a master.
These considerations therefore make it clear which is the best constitution, and why it is the best; and now that the best has been defined, it is not difficult to see, among the other forms of constitution (inasmuch as we pronounce that there are various forms of democracy and various oligarchies), what kind is to be placed first, what second, and what next in this order, by reason of one being better and another worse. For at each stage the form nearest to the best one must necessarily be superior, and the form that is more remote from the middle must be inferior—unless one is judging relatively to given conditions: I make this reservation because it is quite possible that although one form of constitution is preferable it may often be more advantageous for certain people to have another form.
The next thing after what has been said is to discuss which constitution is advantageous for which people, and what sort of constitution for what sort of people. Now we must first grasp a general principle that applies equally to all sorts of constitution: it is essential that the part of the state that wishes the constitution to remain should be stronger than the part that does not wish it. But every state consists of both quality and quantity: by quality I mean freedom, wealth, education, good birth, and by quantity the superior numbers of the multitude. And it is possible that,while the quality of the state belongs to one among the parts of which the state consists and its quantity to another part—for example the low-born may be more numerous than the noble or the poor than the rich, yet the more numerous class may not exceed in quantity as much as they fall behind in quality. Hence these two factors have to be judged in comparison with one another.
Where therefore the multitude of the poor exceeds in the proportion stated,^^[[1|Rackham: Book: 4, Section: 1296b, Note: 1]]^^ here it is natural for there to be democracy, and each kind of democracy in accordance with the superior number of the common people of each sort, for example if the number of the farming class exceeds, the first sort of democracy, but if that of the common laborers and wage-earners, the last sort, and similarly also with the other sorts that lie between these two; but where the class of the well-to-do and notable exceeds in quality more than it falls behind in quantity, here it is natural for there to be an oligarchy, and likewise the various kinds of oligarchy according to the degree of superiority^^[[2|Rackham: Book: 4, Section: 1296b, Note: 2]]^^ of the oligarchical multitude.^^[[3|Rackham: Book: 4, Section: 1296b, Note: 3]]^^ But the lawgiver in his constitution must always take in the middle class; if he is making the laws of an oligarchical character he must keep the middle class in view, and if democratic, he must legislate so as to bring them in. And where the number of the middle class exceeds both the extreme classes together, or even one of them only, here it is possible for a constitutional government to be lasting;
i.e. so as to outbalance their inferiority in quality.
i.e. superiority in quality.
The word is loosely used of this small class.
for there is no fear of the rich ever coming to terms with the poor against this numerous middle class; for neither class will ever wish to be subject to the other, and if they look for another constitution fairer to both than this they will not find one, for they would not endure to take turns to govern because they distrust each other: everywhere it is the arbitrator that is most trusted, and the man in the middle is an arbitrator. And the better the constitution is mixed, the more permanent it is; and many even of those who want to establish aristocratic forms of constitution make a great mistake not only in giving too large a share to the well-to-do but also in cheating the people; for false benefits inevitably result ultimately in true evil, as the encroachments of the rich ruin the constitution more than those of the people.
The artifices employed in constitutions as a pretext in regard to the people are five in number, and are concerned with the assembly, the magistracies, the law-courts, the bearing of heavy arms, and gymnastic exercises; in relation to the assembly, the granting to all of the right to attend but the imposition of a fine for non-attendance on the well-to-do only, or a much larger fine on them than others; in relation to the magistracies,the denial to the owners of rated property of the right to swear off serving, while the poor have this right; in relation to the law-courts, the imposition of a fine on the well-to-do if they do not serve on a jury, but no penalty for the poor, or else a large fine for the one class and a small one for the others, as in the laws of Charondas. In some places all have the right to serve in the assembly and on juries after having their names put on a register, but large fines are imposed on those who after so registering fail to attend in either capacity, in order that the fine may cause them to avoid registration and that owing to their not registering they may not serve on juries or in the assembly. They also legislate in the same manner about owning heavy arms and engaging in gymnastic exercises: the poor are not allowed to possess arms, but the well-to-do are liable to a fine if they have not got them, and there is no fine for the former class if they abstain from gymnastics, but the well-to-do are liable to a fine, in order that the one class because of the fine may take part in them and the other because they have no penalty to fear may not. These artifices of legislation then are of an oligarchic nature; in democracies they introduce contrary devices in regard to these matters: they provide pay for the poor for serving in the assembly and on juries and impose no fine upon the well-to-do for abstaining. Hence it is manifest that if anybody wishes to make a just blend, he must bring together the regulations existing in each of the two forms of constitution, and provide pay for attendance and a fine for non-attendance; for thus all would participate, whereas in the other way the government comes to be in the hands of only one of the two classes.
And although it is proper that the government should be drawn only from those who possess heavy armor, yet it is not possible to define the amount of the property-qualification absolutely and to say that they must possess so much, but only to consider what sort of amount is the highest that is compatible with making those who have a share in the constitution more numerous than those who have not, and to fix that limit. For those who are poor and have no share in the honors are willing to keep quiet if no one insults them or takes away any part of their substance; but this is not easy to secure, for it does not always happen that those who are in the governing class are gentlemen. Also people have a way of being reluctant to serve when there is a war if they do not get rations and are poor men but; if somebody provides food they want to fight. In some states the citizen-body consists not only of those who are serving as heavy-armed soldiers, but also of those who have so served; and at Malea the citizen-body consisted of these, while the magistrates were elected from those who were actually on service. And indeed the earliest form of constitution among the Greeks after the kingships consisted of those who were actually soldiers, the original form consisting of the cavalry (for war had its strength and its pre-eminence in cavalry, since without orderly formation heavy-armed infantryis useless, and the sciences and systems dealing with tactics did not exist among the men of old times, so that their strength lay in their cavalry); but as the states grew and the wearers of heavy armor had become stronger, more persons came to have a part in the government. Hence what we now call constitutional governments the men of former times called democracies; but the constitutional governments of early days were naturally oligarchical and royal, for owing to the smallness of the populations their middle class was not numerous, so that because of their small numbers as well as in conformity with the structure of the state the middle class more readily endured being in a subject position.
It has then been said what is the reason of there being several forms of constitution, and why there are others besides those designated by name (for there is not one single democracy only, and similarly there are more than one of the other forms), and also what are the differences between them and what is the reason why these differences occur, and in addition to these points, which is the best of the constitutions speaking generally, and of the other constitutions which sort is suited to which sort of people.
And again, let us speak about the points that come next, both generally and with reference to each constitution separately, taking their appropriate starting-point. All forms of constitution then have three factors in reference to which the good lawgiver has to consider what is expedient for each constitution; and if these factors are well-ordered the constitution must of necessity be well-ordered, and the superiority of one constitution over another necessarily consists in the superiority of each of these factors. Of these three factors one is, what is to be the body that deliberates about the common interests,
second the one connected with the magistracies, that is, what there are to be and what matters they are to control, and what is to be the method of their election, and a third is, what is to be the judiciary.
The deliberative factor is sovereign about war and peace and the formation and dissolution of alliances, and about laws, and about sentences of death and exile and confiscation of property, and about the audits of magistrates. And necessarily either all these decisions must be assigned to all the citizens, or all to some of them (for instance to some one magistracy or to several), or different ones to different magistracies, or some of them to all the citizens and some to certain persons.
For all the citizens to be members of the deliberative body and to decide all these matters is a mark of a popular government, for the common people seek for equality of this nature. But there are several modes of such universal membership. One is for the citizens to serve in rotation and not all in a body (as is enacted in the constitution of the Milesian Telecles,^^[[1|Rackham: Book: 4, Section: 1298a, Note: 1]]^^ and in other constitutions also the boards of magistrates deliberate in joint assemblies but all the citizens enter into the magistracies from the tribes or from the very smallest sections of the citizen-body in rotation until office has gone through the whole body), and for there to be joint assemblies only to consider legislation and reforms of the constitution and to hear the reports submitted by the magistrates. Another mode isfor all to assemble in a body, but only for the purpose of electing magistrates, enacting laws, considering the declaration of war and the conclusion of peace and holding the audit of magistrates, but for all other matters to be considered by the magistrates appointed to deal with each respectively and elected by suffrage or by lot from all the citizens. Another mode is for the citizens to meet about the magistracies and the audits and in order to deliberate about declaring war and concluding an alliance, but for all other matters to be dealt with by the magistrates, elected by suffrage in as many cases as circumstances allow,^^[[2|Rackham: Book: 4, Section: 1298a, Note: 2]]^^ and such magistracies are all those which must of necessity be filled by experts. A fourth mode is for all to meet in council about all matters, and for the magistracies to decide about nothing but only to make preliminary decisions; this is the mode in which democracy in its last form is administered at the present day—the form of democracy which we pronounce to correspond to dynastic oligarchy and to tyrannical monarchy. These modes then are all of them democratic. On the other hand for some persons to deliberate upon all matters is oligarchic. But this also has several variations. For when the members of the deliberative body are elected on comparatively moderate property-qualifications, and the eligible persons are comparatively numerous because of the moderateness of the qualification, and when they do not make changes in things in which the law forbids it but follow the law, and when anybody acquiring the property-qualification is allowed to become a member, a constitution of this sort is indeed an oligarchy, but one of the nature of constitutional government, because of its moderation. When on the other hand not everybody thus qualified participates in deliberation but only certain persons previously chosen by election,
i.e. in an advanced democracy.
and these govern in accordance with law as in the former case, this is oligarchical; and also when the deliberative officials are elected by co-optation, and when the office is hereditary and has supreme control over the laws, this system is bound to be oligarchical. But when certain persons control certain matters, for instance when all the citizens control decisions as to war and peace and the audit of officials while everything else is controlled by magistrates and these are elected by vote, not by lot,^^[[1|Rackham: Book: 4, Section: 1298b, Note: 1]]^^ the constitution is an aristocracy; while if some matters are controlled by magistrates elected by vote and others by magistrates chosen by lot, and this either directly or from a list previously selected by vote, or if magistrates elected by vote and by lot sit in a joint body, some of these regulations are features of an aristocratic constitution and others of constitutional government itself.
We have then in this way distinguished the different kinds of deliberative body in relation to the forms of constitution, and each form of constitution carries on the administration in accordance with the distinction stated. But for a democracy of the form that at the present day is considered to be democracy in the fullest degree (and I mean one of the sort in which the people is sovereign even over the laws) it is advantageous for the improvement of its deliberative function for it to do the same as is done in oligarchies in the matter of the law-courts (for they enact a fine to compel the attendance on juries of those whom they want to attend, whereas democratic states institute payment for attendance for the benefit of the poor), and also to do this in respect of the assemblies(for they will deliberate better when all are deliberating jointly, the common people when with the notables and these when with the masses), and it is also advantageous for those who deliberate to be elected by vote or by lot equally from the different sections, and, if the men of the people far exceed the political class in number, it is advantageous either not to give pay to all but only to as many as are commensurate with the number of the notables, or to discard by lot those who exceed this number. In oligarchies on the other hand it is advantageous either to co-opt some persons from the multitude, or to institute an office like the one that exists in certain constitutional governments under the flame of Preliminary Councillors or Guardians of the Law,^^[[2|Rackham: Book: 4, Section: 1298b, Note: 2]]^^ and deal with the matters about which these officials have held a preliminary deliberation (for thus the common people will have a share in deliberation and will not have the power to abolish any part of the constitution), and then for the people by their vote either to confirm or at all events not to pass anything contrary to the resolutions brought before them, or to allow all to take part in debate but only the magistrates to frame resolutions; and in fact it is proper to do just the opposite of what takes place in constitutionally governed states; for the common people ought to be given power to vote the rejection of a measure, but not to vote its ratification, but it should be referred back to the magistrates. In constitutional governments the procedure is the reverse; the few are competent to vote the rejection of a resolution but are not competent to vote its ratification, this being always referred back to the most numerous body.
The MSS. give ‘or by lot.’
There were πρόβουλοι at Corinth as well as a βουλή and an ἐκκλησία; and νομοφύλακες at Sparta, Athens and elsewhere: at Athens they sat with the presidents of the βουλή and ἐκκλησία to check illegal procedure.
Let us then decide in this manner about the deliberative body, which in fact is the sovereign power in the constitution.
Connected with this subject is the determination in regard to the magistracies (for this part of the constitution also has many varieties), how many magistracies there are to be, and what are to be their powers, and what their various periods of tenure (for some people make their magistracies tenable for six months, others for less, others for a year and others for a longer period)—shall the magistracies be for life or for a long period, or if for a shorter term shall the same people be allowed to hold them several times or not the same man twice but once only? and also as to the appointment of magistrates, who shall be eligible, who the electors, and what the mode of election? For on all these points it is needful to be able to determine how many modes of procedure are possible, and then to settle what modes are expedient for what sorts of constitution. Nor is it easy to decide to what kinds of office the name of magistracy ought to be applied; for the political community requires a great many officials, owing to which it is not proper to reckon all of them magistrates, whether elected by vote or by lot,—for instance first the priests (for this office must be considered as something different from the political magistracies), and again there are leaders of choruses, and heralds, and persons are also elected as ambassadors.And of the offices exercising superintendence some are political, and are exercised either over the whole of the citizens in regard to some operation—for instance a general superintends them when serving as soldiers, or over a section—for instance the superintendent of women or of children; while others are economic (for states often elect officers to dole out corn^^[[1|Rackham: Book: 4, Section: 1299a, Note: 1]]^^); and others are subordinate, and are the sort of services to which people when well off appoint slaves. But the title of magistracy, to put it simply, is chiefly to be applied to all those offices to which have been assigned the duties of deliberating about certain matters and of acting as judges and of issuing orders, and especially the last, for to give orders is most characteristic of authority. But this question is of virtually no practical importance (for no decision has yet been given, our discussion being merely about the name), although it does admit of some further inquiry of a speculative kind. On the other hand the questions what kinds and what number of magistracies are necessary to constitute a state at all, and what kinds although not necessary are advantageous for a good constitution, are questions that might preferably be discussed, both indeed as regards every form of constitution and particularly in regard to the small states. For it is true that in the large states it is possible and proper for one magistracy to be assigned to one function (for the large number of the citizens makes it possible for many people to enter on an official career, so as to intermit their tenure of some offices for a long time and to hold others only once, and also every task is better attended to if the attention is directed to one thing only than if it is busy with many);
Distributions of corn were made at times of scarcity, or when the state had received a present of corn.
but in the small states it is inevitable that many offices must be gathered into few hands (for owing to shortage of manpower it is not easy for many people to be in office, since who will take over the posts as their successors?). But sometimes small states require the same magistracies and laws as large ones except that the latter require the same persons to serve often, but in the former this only occurs after a long interval. Hence it is possible to assign several duties to one man at the same time (since they will not interfere with one another), and to meet the shortage of man-power it is necessary to make the magistracies like spit-lampholders.^^[[1|Rackham: Book: 4, Section: 1299b, Note: 1]]^^ If therefore we are able to say how many magistracies every state must necessarily possess and how many, though not absolutely necessary, it ought to possess, knowing these points one might more easily make a combination of those magistracies which are of a suitable nature to be combined into a single office. And it is suitable for the further question not to be overlooked, what kinds of matters ought to be attended to by a number of officials locally distributed and what ought to be under the authority of one magistrate for all localities, for example should good order be seen to in the market-place by a Controller of the Market and elsewhere by another official, or everywhere by the same one? and ought the offices to be divided according to the function or according to the persons concerned—I mean, for instance, should there be a single official in control of good order, or a different onefor children and for women? and also under the various constitutions does the nature of the magistracies vary in accordance with each or does it not vary at all—for example in democracy, oligarchy, aristocracy and monarchy are the magistracies the same in their powers, although they are not filled from equal ranks nor from similar classes but are different in different constitutions (for example in aristocracies drawn from the educated, in oligarchies from the wealthy, and in democracies from the free), or although some constitutions happen to be correspondent with the actual differences of their magistracies, yet in other cases are the same magistracies advantageous even where the constitutions differ (for in some places it is suitable for the same magistracies to have large functions and in other places small ones)? Not but what there are also some offices peculiar to special forms of constitution, for instance the office of Preliminary Councillors.^^[[2|Rackham: Book: 4, Section: 1299b, Note: 2]]^^ This is undemocratic, although a Council is a popular body, for there is bound to be some body of this nature to have the duty of preparing measures for the popular assembly, in order that it may be able to attend to its business; but a preparatory committee, if small, is oligarchical, and Preliminary Councillors must necessarily be few in number, so that they are an oligarchical element. But where both of these magistracies exist, the Preliminary Councillors are in authority over the Councillors, since a councillor is a democratic official, but a preliminary councillor is an oligarchic one. Also the power of the Council is weakened in democracies of the sort in which the people in assembly deals with everything itself;
An implement (its exact shape does not appear to be known) used by soldiers on campaign, here mentioned as an illustration of one tool serving two purposes, cf. 1252b 1.
and this usually happens when there is a plentiful supply of pay for those who attend the assembly, for being at leisure they meet frequently and decide all things themselves. But a Superintendent of Children and a Superintendent of Women, and any other magistrates that exercise a similar sort of supervision, are an aristocratic feature, and not democratic (for how is it possible to prevent the wives of the poor from going out of doors^^[[1|Rackham: Book: 4, Section: 1300a, Note: 1]]^^?) nor yet oligarchic (for the wives of oligarchic rulers are luxurious). But let the discussion of these matters go no further at present, and let us attempt to go through from the beginning the question of the ways of appointing the magistrates. The varieties here depend on three determinants, the combinations of which must give all the possible modes. One of these three determining points is, who are the persons who appoint the magistrates? the second is, from whom? and last, in what manner? And of each of these three determinants there are three variations: either all the citizens appoint or some, and either from all or from a certain class (defined for instance by property-assessment or birth or virtue or some other such qualification, as at Megara only those were eligible who returned in a body from exile and fought together against the common people),^^[[2|Rackham: Book: 4, Section: 1300a, Note: 2]]^^ and the mode of appointment may be either by vote or by lot; again, these systems may be coupled together—I mean that some citizens may appoint to some offices but all to others, and to some offices all citizens may be eligible but to others only a certain class, and to some appointment may be by vote but to others by lot. And of each variation of these determinants there will be four modes: either all citizens may appoint from all by vote, or all from all by lot—and from all either section by section, for instance by tribes or demes or brotherhoods until the procedure has gone through all the citizens, or from the whole number every time,—or else partly in one way and partly in the other. Again, if the electors are some of the citizens, they must either appoint from all by vote, or from all by lot, or from some by vote, or from some by lot, or partly in one way and partly in the other—I mean partly by vote and partly by lot. Hence the modes prove to be twelve, apart from the two combinations. And among these, two ways of appointment are democratic—for all to appoint from all by vote, or by lot, or by both—some offices by lot and others by vote; but for not all to be the electors and for them to appoint simultaneously, and either from all or from some either by lot or by vote or by both, or some offices from all and others from some by both (by which I mean some by lot and others by vote) is constitutional. And for some to appoint from all, to some offices by vote and to others by lot or by both^^[[3|Rackham: Book: 4, Section: 1300a, Note: 3]]^^ (to some by lot and to others by vote) is oligarchical; and it is even more oligarchical to appoint from both classes. But to appoint some offices from all and the others from a certain class is constitutional with an aristocratic bias;
Or possibly ‘from going in processions’: Solon made regulations ταῖς ἐξόδοις τῶν γυναικῶν καὶ τοῖς πένθεσι καὶ ταῖς ἑορταῖς(http://www.perseus.tufts.edu/hopper/text?doc=Plut.%20Sol.%2021&lang=original).
It is quite uncertain when this event took place and whether it is the same as those referred to at 1302b 30 f. and l304b 34 ff.
Perhaps the Greek should be rewritten to give ‘for some to appoint from all either by vote or by lot or by both.’
or to appoint some by vote and others by lot. And for a certain class to appoint from a certain class <by vote>^^[[1|Rackham: Book: 4, Section: 1300b, Note: 1]]^^ is oligarchical, and so it is for a certain class to appoint from a certain class by lot (although not working out in the same way), and for a certain class to appoint from a certain class by both methods. And for a certain class to make a preliminary selection from the whole body and then for all to appoint from among certain persons (thus selected) is aristocratic.
So many in number therefore are the modes of appointing to the magistracies, and this is how the modes are classified according to the different constitutions; and what regulations are advantageous for what people and how the appointments ought to be conducted will be made clear at the same time as we consider what are the powers of the offices. By the power of an office I mean for instance the control of the revenues and the control of the guard; since a different sort of power belongs for example to a generalship and to the office that controls market contracts.
Of the three factors of a constitution it remains to speak of the judiciary, and of judicial bodies also we must consider the various modes, in accordance with the same plan. And a difference among judicial courts rests upon three determinants—constituents, sphere of action, and mode of appointment. As to their constituents I mean are the courts drawn from all the citizens or from a certain class? as to sphere of action, how many kinds of courts are there? and as to mode of appointment, are they appointed by lot or by vote? First then let us distinguish how many kinds of courts there are. They are eight in number, one a court of audit,another to deal with offenders against any public interest, another with matters that bear on the constitution, a fourth for both magistrates and private persons in disputes about penalties, fifth the court dealing with private contracts that are on an important scale, and beside these there is (6) the court that tries homicide, and (7) that which hears alien suits (of courts of homicide there are four kinds, whether the jury is the same or different—namely, for cases of deliberate homicide, of involuntary homicide, of homicide admitted but claimed to be justifiable, and fourth to deal with charges of homicide brought against men that have fled from the country for homicide, upon their return,^^[[2|Rackham: Book: 4, Section: 1300b, Note: 2]]^^ such as at Athens for instance the Court at Phreatto is said to be, although such cases are of rare occurrence in the whole course of history, even in the great states and of the aliens' court one branch hears suits of aliens against aliens and another of aliens against citizens); and also beside all of these there are (8) courts to try cases of petty contracts, involving sums of one drachma, five drachmas or a little more—for even these cases have to be tried, though they are not suitable for a numerous jury. But let us dismiss the subject of these petty suits, and the courts for homicide and those for aliens, and let us speak about political trials, which when not well conducted cause party divisions and revolutionary disturbances. And necessarily either all the judges of all the cases that have been classified will be appointed by vote, or by lot, or all in all cases partly by lot and partly by vote, or in some cases some judges will be appointed by lot and others by vote for the same case.
This insertion by Lambinus seems certain.
i.e. men that had been allowed to flee the country when charged with accidental homicide, and on their return were accused of another homicide, a willful murder.
These modes then are four in number, and the sectional modes also make as many others; for here again the judges for all cases may be drawn by vote from a certain class, or for all cases by lot from a certain class, or some courts may be appointed by lot and others by vote, or some courts may be composed of judges chosen by lot and by vote for the same cases. These then are the modes, as was said, corresponding to those mentioned. And there are also the same courts in combination—I mean for example some drawn from the whole body and some from a class and some from both, as for instance if the same court contained some members from the whole body and others from a class, and appointed either by lot or by vote or both. We have then stated all the modes in which it is possible for the courts to be composed; and of these the first set, drawn from all the citizens and dealing with all cases, are popular, the second, drawn from a certain class to deal with all cases, are oligarchic, and the third, drawn partly from all and partly from a certain class, are suited to an aristocracy and to a constitutional government.
---
!!![[Section: 1301a|Rackham: Book: 5, Section: 1301a]]
{{Rackham: Book: 5, Section: 1301a}}
---
!!![[Section: 1301b|Rackham: Book: 5, Section: 1301b]]
{{Rackham: Book: 5, Section: 1301b}}
---
!!![[Section: 1302a|Rackham: Book: 5, Section: 1302a]]
{{Rackham: Book: 5, Section: 1302a}}
---
!!![[Section: 1302b|Rackham: Book: 5, Section: 1302b]]
{{Rackham: Book: 5, Section: 1302b}}
---
!!![[Section: 1303a|Rackham: Book: 5, Section: 1303a]]
{{Rackham: Book: 5, Section: 1303a}}
---
!!![[Section: 1303b|Rackham: Book: 5, Section: 1303b]]
{{Rackham: Book: 5, Section: 1303b}}
---
!!![[Section: 1304a|Rackham: Book: 5, Section: 1304a]]
{{Rackham: Book: 5, Section: 1304a}}
---
!!![[Section: 1304b|Rackham: Book: 5, Section: 1304b]]
{{Rackham: Book: 5, Section: 1304b}}
---
!!![[Section: 1305a|Rackham: Book: 5, Section: 1305a]]
{{Rackham: Book: 5, Section: 1305a}}
---
!!![[Section: 1305b|Rackham: Book: 5, Section: 1305b]]
{{Rackham: Book: 5, Section: 1305b}}
---
!!![[Section: 1306a|Rackham: Book: 5, Section: 1306a]]
{{Rackham: Book: 5, Section: 1306a}}
---
!!![[Section: 1306b|Rackham: Book: 5, Section: 1306b]]
{{Rackham: Book: 5, Section: 1306b}}
---
!!![[Section: 1307a|Rackham: Book: 5, Section: 1307a]]
{{Rackham: Book: 5, Section: 1307a}}
---
!!![[Section: 1307b|Rackham: Book: 5, Section: 1307b]]
{{Rackham: Book: 5, Section: 1307b}}
---
!!![[Section: 1308a|Rackham: Book: 5, Section: 1308a]]
{{Rackham: Book: 5, Section: 1308a}}
---
!!![[Section: 1308b|Rackham: Book: 5, Section: 1308b]]
{{Rackham: Book: 5, Section: 1308b}}
---
!!![[Section: 1309a|Rackham: Book: 5, Section: 1309a]]
{{Rackham: Book: 5, Section: 1309a}}
---
!!![[Section: 1309b|Rackham: Book: 5, Section: 1309b]]
{{Rackham: Book: 5, Section: 1309b}}
---
!!![[Section: 1310a|Rackham: Book: 5, Section: 1310a]]
{{Rackham: Book: 5, Section: 1310a}}
---
!!![[Section: 1310b|Rackham: Book: 5, Section: 1310b]]
{{Rackham: Book: 5, Section: 1310b}}
---
!!![[Section: 1311a|Rackham: Book: 5, Section: 1311a]]
{{Rackham: Book: 5, Section: 1311a}}
---
!!![[Section: 1311b|Rackham: Book: 5, Section: 1311b]]
{{Rackham: Book: 5, Section: 1311b}}
---
!!![[Section: 1312a|Rackham: Book: 5, Section: 1312a]]
{{Rackham: Book: 5, Section: 1312a}}
---
!!![[Section: 1312b|Rackham: Book: 5, Section: 1312b]]
{{Rackham: Book: 5, Section: 1312b}}
---
!!![[Section: 1313a|Rackham: Book: 5, Section: 1313a]]
{{Rackham: Book: 5, Section: 1313a}}
---
!!![[Section: 1313b|Rackham: Book: 5, Section: 1313b]]
{{Rackham: Book: 5, Section: 1313b}}
---
!!![[Section: 1314a|Rackham: Book: 5, Section: 1314a]]
{{Rackham: Book: 5, Section: 1314a}}
---
!!![[Section: 1314b|Rackham: Book: 5, Section: 1314b]]
{{Rackham: Book: 5, Section: 1314b}}
---
!!![[Section: 1315a|Rackham: Book: 5, Section: 1315a]]
{{Rackham: Book: 5, Section: 1315a}}
---
!!![[Section: 1315b|Rackham: Book: 5, Section: 1315b]]
{{Rackham: Book: 5, Section: 1315b}}
---
!!![[Section: 1316a|Rackham: Book: 5, Section: 1316a]]
{{Rackham: Book: 5, Section: 1316a}}
---
!!![[Section: 1316b|Rackham: Book: 5, Section: 1316b]]
{{Rackham: Book: 5, Section: 1316b}}
^^[[1|Rackham: Book: 5, Section: 1301a, Note: 1]]^^Almost all the other subjects which we intended to treathave now been discussed. There must follow the consideration of the questions, what are the number and the nature of the causes that give rise to revolutions in constitutions, and what are the causes that destroy each form of constitution, and out of what forms into what forms do they usually change, and again what are the safeguards of constitutions in general and of each form in particular, and what are the means by which the safeguarding of each may best be put into effect.^^[[2|Rackham: Book: 5, Section: 1301a, Note: 2]]^^
And we must first assume the starting-point, that many forms of constitution have come into existence with everybody agreeing as to what is just, that is proportionate equality, but failing to attain it (as has also been said before). Thus democracy arose from men's thinking that if they are equal in any respect they are equal absolutely (for they suppose that because they are all alike free they are equal absolutely), oligarchy arose from their assuming that if they are unequal as regards some one thing they are unequal wholly (for being unequal in property they assume that they are unequal absolutely); and then the democrats claim as being equal to participate in all things in equal shares, while the oligarchs as being unequal seek to have a larger share, for a larger share is unequal. All these forms of constitution then have some element of justice, but from an absolute point of view they are erroneous; and owing to this cause, when each of the two parties has not got the share in the constitution which accords with the fundamental assumption that they happen to entertain, faction ensues. And of all men those who excel in virtue would most justifiably stir up faction, though they are least given to doing so;
Book 5 is placed as Book 7 by some editors, as Book 8 by others, see Book 3 fin., note.
For this distinction between broad methods of guarding against revolution and the practical means by which those methods can be put into effect Newman compares 9.2 f., 10 f.; 4.2.5 fin., 6.1.1.
for they alone can with the fullest reason be deemed absolutely unequal. And there are some men who being superior in birth claim unequal rights because of this inequality; for persons who have ancestral virtue and wealth behind them are thought to be noble.
These then roughly speaking are the starting-points and sources of factions, which give rise to party strife (and revolutions due to this take place in two ways: sometimes they are in regard to the constitution, and aim at changing from the one established to another, for instance from democracy to oligarchy, or to democracy from oligarchy, or from these to constitutional government and aristocracy, or from those to these; but sometimes the revolution is not in regard to the established constitution, but its promoters desire the same form of government, for instance oligarchy or monarchy, but wish it to be in their own control. Again it may be a question of degree; for instance, when there is an oligarchy the object may be to change to a more oligarchical government or to a less, or when there is a democracy to a more or to a less democratic government, and similarly in the case of the remaining constitutions, the aim may be either to tighten them up or to relax them. Or again the aim may be to change a certain part of the constitution, for example to establish or abolish a certain magistracy, as according to some accounts Lysanderattempted to abolish the kingship at Sparta and the king Pausanias the ephorate^^[[1|Rackham: Book: 5, Section: 1301b, Note: 1]]^^; and also at Epidamnus the constitution was altered in part, for they set up a council instead of the tribal rulers, and it is still compulsory for the magistrates alone of the class that has political power to come to the popular assembly when an appointment to a magistracy is put to the vote; and the single supreme magistrate was also an oligarchical feature in this constitution). For party strife is everywhere due to inequality, where classes that are unequal do not receive a share of power in proportion (for a lifelong monarchy is an unequal feature when it exists among equals); for generally the motive for factious strife is the desire for equality. But equality is of two kinds, numerical equality and equality according to worth—by numerically equal I mean that which is the same and equal in number or dimension, by equal according to worth that which is equal by proportion^^[[2|Rackham: Book: 5, Section: 1301b, Note: 2]]^^; for instance numerically 3 exceeds 2 and 2 exceeds 1 by an equal amount, but by proportion 4 exceeds 2 and 2 exceeds 1 equally, since 2 and 1 are equal parts of 4 and 2, both being halves. But although men agree that the absolutely just is what is according to worth, they disagree (as was said before^^[[3|Rackham: Book: 5, Section: 1301b, Note: 3]]^^) in that some think that if they are equal in something they are wholly equal, and others claim that if they are unequal in something they deserve an unequal share of all things. Owing to this two principal varieties of constitution come into existence, democracy and oligarchy; for noble birth and virtue are found in few men, but the qualifications specified^^[[4|Rackham: Book: 5, Section: 1301b, Note: 4]]^^ in more:
This ethical arithmetic is helped out in Greek by the fact that, even without the qualification κατ᾽ ἀξίαν, ἴσος often means ‘equal to desert,’ fair, just.
See 1301a 27 ff. and note.
That is, numbers and wealth.
nowhere are there a hundred men nobly born and good, but there are rich men^^[[1|Rackham: Book: 5, Section: 1302a, Note: 1]]^^ in many places. But for the constitution to be framed absolutely and entirely according to either kind of equality is bad. And this is proved by experience, for not one of the constitutions formed on such lines is permanent. And the cause of this is that it is impossible for some evil not to occur ultimately from the first and initial error that has been made. Hence the proper course is to employ numerical equality in some things and equality according to worth in others. But nevertheless democracy is safer and more free from civil strife than oligarchy; for in oligarchies two kinds of strife spring up, faction between different members of the oligarchy and also faction between the oligarchs and the people, whereas in democracies only strife between the people and the oligarchical party occurs, but party strife between different sections of the people itself does not occur to any degree worth mentioning. And again the government formed of the middle classes is nearer to the people than to the few, and it is the safest of the kinds of constitution mentioned.
And since we are considering what circumstances give rise to party factions and revolutions in constitutions, we must first ascertain their origins and causes generally. They are, speaking roughly, three in number,^^[[2|Rackham: Book: 5, Section: 1302a, Note: 2]]^^ which we must first define in outline separately.For we must ascertain what state of affairs gives rise to party strife, and for what objects it is waged, and thirdly what are the origins of political disorders and internal party struggles.
Now the principal cause, speaking generally, of the citizens being themselves disposed in a certain manner towards revolution is the one about which we happen to have spoken already. Those that desire equality enter on party strife if they think that they have too little although they are the equals of those who have more, while those that desire inequality or superiority do so if they suppose that although they are unequal they have not got more but an equal amount or less (and these desires may be felt justly, and they may also be felt unjustly); for when inferior, people enter on strife in order that they may be equal, and when equal, in order that they may be greater. We have therefore said what are the states of feeling in which men engage in party strife.
The objects about which it is waged are gain and honor, and their opposites, for men carry on party faction in states in order to avoid dishonor and loss, either on their own behalf or on behalf of their friends.
And the causes and origins of the disturbances which occasion the actual states of feeling described and their direction to the objects mentioned, according to one account happen to be seven in number, though according to another they are more. Two of them are the same as those spoken of before although not operating in the same way: the motives of gain and honor also stir men up against each other not in order that they may get them for themselves, as has been said before,
Perhaps the text should be emended to give ‘there are many rich men and poor men in many places.’
Viz. the material, final and efficient causes of revolutions (Jowett).
but because they see other men in some cases justly and in other cases unjustly getting a larger share of them. Other causes are insolence, fear, excessive predominance, contempt, disproportionate growth of power; and also other modes of cause^^[[1|Rackham: Book: 5, Section: 1302b, Note: 1]]^^ are election intrigue, carelessness, pettiness, dissimilarity. Among these motives the power possessed by insolence and gain, and their mode of operation, is almost obvious; for when the men in office show insolence and greed, people rise in revolt against one another and against the constitutions that afford the opportunity for such conduct; and greed sometimes preys on private property and sometimes on common funds. It is clear also what is the power of honor and how it can cause party faction; for men form factions both when they are themselves dishonored and when they see others honored; and the distribution of honors is unjust when persons are either honored or dishonored against their deserts, just when it is according to desert. Excessive predominance causes faction, when some individual or body of men is greater and more powerful than is suitable to the state and the power of the government; for such are the conditions that usually result in the rise of a monarchy or dynasty. Owing to this in some places they have the custom of temporary banishment,^^[[2|Rackham: Book: 5, Section: 1302b, Note: 2]]^^ as at Argos and Athens; yet it would be better to provide from the outset that there may be no persons in the stateso greatly predominant, than first to allow them to come into existence and afterwards to apply a remedy. Fear is the motive of faction with those who have inflicted wrong and are afraid of being punished, and also with those who are in danger of suffering a wrong and wish to act in time before the wrong is inflicted, as the notables at Rhodes banded together^^[[3|Rackham: Book: 5, Section: 1302b, Note: 3]]^^ against the people because of the law-suits that were being brought against them. Contempt is a cause of faction and of actual attacks, upon the government, for instance in oligarchies when those who have no share in the government are more numerous (for they think themselves the stronger party), and in democracies when the rich have begun to feel contempt for the disorder and anarchy that prevails, as for example at Thebes the democracy was destroyed owing to bad government after the battle of Oenophyta,^^[[4|Rackham: Book: 5, Section: 1302b, Note: 4]]^^ and that of the Megarians was destroyed when they had been defeated owing to disorder and anarchy,^^[[5|Rackham: Book: 5, Section: 1302b, Note: 5]]^^ and at Syracuse before the tyranny^^[[6|Rackham: Book: 5, Section: 1302b, Note: 6]]^^ of Gelo, and at Rhodes^^[[7|Rackham: Book: 5, Section: 1302b, Note: 7]]^^ the common people had fallen into contempt before the rising against them. Revolutions in the constitutions also take place on account of disproportionate growth; for just as the body^^[[8|Rackham: Book: 5, Section: 1302b, Note: 8]]^^ is composed of parts, and needs to grow proportionately in order that its symmetry may remain, and if it does not it is spoiled, when the foot is four cubits long and the rest of the body two spans, and sometimes it might even change into the shape of another animal if it increased disproportionately not only in size but also in quality,^^[[9|Rackham: Book: 5, Section: 1302b, Note: 9]]^^ so also a state is composed of parts,
The four causes now mentioned are those alluded to just above (1302a 38) as an addition to the seven enumerated above, 1302a 38-b 5.
Perhaps in 390 B.C., cf. 1302b 32 f. and 1304b 27 ff.
It is not clear whether what follows refers to a work of art (cf. 1284b 8) or is an exaggerated account of a disease; Galen describes one called σατυρίασις, in which the bones of the temple swell out like satyrs' horns.
i.e. if, for example, the foot became as hard as a hoof.
one of which often grows without its being noticed, as for example the number of the poor in democracies and constitutional states. And sometimes this is also brought about by accidental occurrences, as for instance at Tarentum when a great many notables were defeated and killed by the Iapygians a short time after the Persian wars a constitutional government was changed to a democracy, and at Argos when those in the seventh tribe^^[[1|Rackham: Book: 5, Section: 1303a, Note: 1]]^^ had been destroyed by the Spartan Cleomenes the citizens were compelled to admit some of the surrounding people, and at Athens when they suffered disasters by land the notables became fewer because at the time of the war against Sparta the army was drawn from a muster-roll.^^[[2|Rackham: Book: 5, Section: 1303a, Note: 2]]^^ And this happens also in democracies, though to a smaller extent; for when the wealthy become more numerous or their properties increase, the governments change to oligarchies and dynasties.^^[[3|Rackham: Book: 5, Section: 1303a, Note: 3]]^^ And revolutions in constitutions take place even without factious strife, owing to election intrigue, as at Heraea^^[[4|Rackham: Book: 5, Section: 1303a, Note: 4]]^^ (for they made their magistrates elected by lot instead of by vote for this reason, because the people used to elect those who canvassed); and also owing to carelessness, when people allow men that are not friends of the constitution to enter into the sovereign offices, as at Oreus^^[[5|Rackham: Book: 5, Section: 1303a, Note: 5]]^^ oligarchy was broken up when Heracleodorus became one of the magistrates, who in place of an oligarchyformed a constitutional government, or rather a democracy. Another cause is alteration by small stages; by this I mean that often a great change of institutions takes place unnoticed when people overlook a small alteration, as in Ambracia the property-qualification was small, and finally men hold office with none at all, as a little is near to nothing, or practically the same. Also difference of race is a cause of faction, until harmony of spirit is reached; for just as any chance multitude of people does not form a state, so a state is not formed in any chance period of time. Hence most of the states that have hitherto admitted joint settlers or additional settlers^^[[6|Rackham: Book: 5, Section: 1303a, Note: 6]]^^ have split into factions; for example Achaeans settled at Sybaris^^[[7|Rackham: Book: 5, Section: 1303a, Note: 7]]^^ jointly with Troezenians, and afterwards the Achaeans having become more numerous expelled the Troezenians, which was the Cause of the curse that fell on the Sybarites; and at Thurii Sybarites quarrelled with those who had settled there with them, for they claimed to have the larger share in the country as being their own, and were ejected; and at Byzantium the additional settlers were discovered plotting against the colonists and were expelled by force of arms; and the people of Antissa^^[[8|Rackham: Book: 5, Section: 1303a, Note: 8]]^^ after admitting the Chian exiles expelled them by arms; and the people of Zancle^^[[9|Rackham: Book: 5, Section: 1303a, Note: 9]]^^ after admitting settlers from Samos were themselves expelled; and the people of Apollonia on the Euxine Sea after bringing in additional settlers fell into faction; and the Syracusans after the period of the tyrants^^[[10|Rackham: Book: 5, Section: 1303a, Note: 10]]^^
The word to be understood here may be φυλῇ, or possibly ἡμέρᾳ: the seventh day of the month was sacred to Apollo, especially at Sparta, and one account assigns Cleomenes' victory to that day, in which case the casualties may well have been known afterwards as ‘those who fell on the seventh.’
Thrasybulus succeeded his brother Hiero as tyrant in 467 B.C. and fell within a year.
i.e. was made up of citizens and not of mercenaries.
On the Alpheus, in Arcadia.
In Euboea; its secession from Sparta to Athens, 377 B.C., was perhaps the occasion of this revolution.
i.e. colonists not from the mother-city, admitted either at the foundation of the colony or later.
Sybaris, founded 720 B.C., became very wealthy. The Troezenian population when expelled were received at Croton, which made war on Sybaris and destroyed it 510 B.C. To what exactly τὸ ἄγος refers is unknown.
conferred citizenship on their foreign troops and mercenaries and then faction set in and they came to battle; and the Amphipolitans having received settlers from Chalcis were most of them driven out by them.^^[[1|Rackham: Book: 5, Section: 1303b, Note: 1]]^^
(And in oligarchies civil strife is raised by the many, on the ground that they are treated unjustly because they are not admitted to an equal share although they are equal, as has been said before, but in democracies it begins with the notables, because they have an equal share although they are not equal.)^^[[2|Rackham: Book: 5, Section: 1303b, Note: 2]]^^
Also states sometimes enter on faction for geographical reasons, when the nature of the country is not suited for there being a single city, as for example at Clazomenae^^[[3|Rackham: Book: 5, Section: 1303b, Note: 3]]^^ the people near Chytrum are in feud with the inhabitants of the island, and the Colophonians and the Notians^^[[4|Rackham: Book: 5, Section: 1303b, Note: 4]]^^; and at Athens the population is not uniformly democratic in spirit, but the inhabitants of Piraeus are more so than those of the city. For just as in wars the fording of watercourses, even quite small ones, causes the formations to lose contact, so every difference seems to cause division. Thus perhaps the greatest division is that between virtue and vice, next that between wealth and poverty, and so with other differences in varying degree, one of which is the one mentioned.^^[[5|Rackham: Book: 5, Section: 1303b, Note: 5]]^^
Factions arise therefore not about but out of small matters; but they are carried on about great matters. And even the small ones grow extremely violent when they spring up among men of the ruling class,as happened for example at Syracuse in ancient times. For the constitution underwent a revolution as a result of a quarrel that arose^^[[6|Rackham: Book: 5, Section: 1303b, Note: 6]]^^ between two young men, who belonged to the ruling class, about a love affair. While one of them was abroad the other who was his comrade won over the youth with whom he was in love, and the former in his anger against him retaliated by persuading his wife to come to him; owing to which they stirred up a party struggle among all the people in the state, enlisting them on their sides. On account of this it is necessary to guard against such affairs at their beginning, and to break up the factions of the leaders and powerful men; for the error occurs at the beginning, and the beginning as the proverb says is half of the whole, so that even a small mistake at the beginning stands in the same ratio^^[[7|Rackham: Book: 5, Section: 1303b, Note: 7]]^^ to mistakes at the other stages. And in general the faction quarrels of the notables involve the whole state in the consequences, as happened at Hestiaea^^[[8|Rackham: Book: 5, Section: 1303b, Note: 8]]^^ after the Persian wars, when two brothers quarrelled about the division of their patrimony; for the poorer of the two, on the ground that the other would not make a return of the estate and of the treasure that their father had found, got the common people on his side, and the other possessing much property was supported by the rich. And at Delphi the beginning of all the factions that occurred afterwards was when a quarrel arose out of a marriage;
Cf. 1306a 2. The exact circumstances are unknown; Amphipolis was colonized from Athens 437 B.C.
This sentence is out of place here, and would fit in better if placed (as it is by Newman) above at 1301a 39, after στασιάζουσι, or (with other editors) 1301b 26.
Topography uncertain: Clazomenae near Smyrna was partly on a small island, which Alexander joined to the mainland with a causeway.
Notium was the port of Colophon.
i.e. difference of locality.
Perhaps under the oligarch of the Gamori, overthrown by the people and followed by Gelo's tyranny, 485 B.C.
i.e. the ratio of being a half to the whole: a bad start does as much to harm as all the later mistakes put together.
Also called Oreus, see 1303a 18.
the bridegroom interpreted some chance occurrence when he came to fetch the bride as a bad omen and went away without taking her, and her relatives thinking themselves insulted threw some articles of sacred property into the fire when he was performing a sacrifice and then put him to death as guilty of sacrilege. And also at Mitylene^^[[1|Rackham: Book: 5, Section: 1304a, Note: 1]]^^ a faction that arose out of some heiresses was the beginning of many misfortunes, and of the war with the Athenians in which Paches captured the city of Mitylene: a wealthy citizen named Timophanes left two daughters, and a man who was rejected in his suit to obtain them for his own sons, Doxander, started the faction and kept on stirring up the Athenians, whose consul he was at Mitylene. And among the Phocians when a faction arising out of an heiress sprang up in connection with Mnaseas the father of Mnason and Euthykrates the father of Onomarchus,^^[[2|Rackham: Book: 5, Section: 1304a, Note: 2]]^^ this faction proved to be the beginning for the Phocians of the Holy War. At Epidamnus also circumstances relating to a marriage gave rise to a revolution in the constitution^^[[3|Rackham: Book: 5, Section: 1304a, Note: 3]]^^; somebody had betrothed his daughter, and the father of the man to whom he had betrothed her became a magistrate, and had to sentence him to a fine; the other thinking that he had been treated with insolence formed a party of the unenfranchised classes to assist him. And also revolutions to oligarchy and democracy and constitutional government arise from the growth in reputation or in power of some magistracy or some section of the state;as for example the Council on the Areopagus having risen in reputation during the Persian wars was believed to have made the constitution more rigid, and then again the naval multitude, having been the cause of the victory off Salamis and thereby of the leadership of Athens due to her power at sea, made the democracy stronger; and at Argos the notables having risen in repute in connection with the battle against the Spartans at Mantinea took in hand to put down the people; and at Syracuse the people having been the cause of the victory in the war against Athens made a revolution from constitutional government to democracy; and at Chalcis the people with the aid of the notables overthrew the tyrant Phoxus^^[[4|Rackham: Book: 5, Section: 1304a, Note: 4]]^^ and then immediately seized the government; and again at Ambracia similarly the people joined with the adversaries of the tyrant Periander in expelling him and then brought the government round to themselves.^^[[5|Rackham: Book: 5, Section: 1304a, Note: 5]]^^ And indeed in general it must not escape notice that the persons who have caused a state to win power, whether private citizens or magistrates or tribes, or in general a section or group of any kind, stir up faction; for either those who envy these men for being honored begin the faction, or these men owing to their superiority are not willing to remain in a position of equality. And constitutions also undergo revolution when what are thought of as opposing sections of the state become equal to one another,
The revolt of Mitylene 428 B.C. is ascribed to purely political causes by http://www.perseus.tufts.edu/hopper/text?doc=Thuc.%203.1&lang=original.
i.e. the fathers of the two suitors for the heiress's hand turned the quarrel into a faction fight.
Perhaps the same event as that referred to 1301b 21.
580 B.C; cf. 1311a 39 ff.
for instance the rich and the people, and there is no middle class or only an extremely small one; for if either of the two sections becomes much the superior, the remainder is not willing to risk an encounter with its manifestly stronger opponent. Owing to this men who are exceptional in virtue generally speaking do not cause faction, because they find themselves few against many. Universally then in connection with all the forms of constitution the origins and causes of factions and revolutions are of this nature.
The means used to cause revolutions of constitutions are sometimes force and sometimes fraud. Force is employed either when the revolutionary leaders exert compulsion immediately from the start or later on—as indeed the mode of using fraud is also twofold: sometimes the revolutionaries after completely deceiving the people at the first stage alter the constitution with their consent, but then at a later stage retain their hold on it by force against the people's will: for instance, at the time of the Four Hundred,^^[[1|Rackham: Book: 5, Section: 1304b, Note: 1]]^^ they deceived the people by saying that the Persian King would supply money for the war against the Spartans, and after telling them this falsehood endeavored to keep a hold upon the government; but in other cases they both persuade the people at the start and afterwards repeat the persuasion and govern them with their consent.
Speaking generally therefore in regard to all the forms of constitution, the causes that have been stated are those from which revolutions have occurred.
But in the light of these general rules we must consider the usual course of eventsas classified according to each different kind of constitution. In democracies the principal cause of revolutions is the insolence of the demagogues; for they cause the owners of property to band together, partly by malicious prosecutions of individuals among them (for common fear brings together even the greatest enemies), and partly by setting on the common people against them as a class. And one may see this taking place in this manner in many instances. In Cos the democracy was overthrown^^[[2|Rackham: Book: 5, Section: 1304b, Note: 2]]^^ when evil demagogues had arisen there, for the notables banded themselves together; and also in Rhodes,^^[[3|Rackham: Book: 5, Section: 1304b, Note: 3]]^^ for the demagogues used to provide pay for public services, and also to hinder the payment of money owed^^[[4|Rackham: Book: 5, Section: 1304b, Note: 4]]^^ to the naval captains, and these because of the lawsuits that were brought against them were forced to make common cause and overthrow the people. And also at Heraclea^^[[5|Rackham: Book: 5, Section: 1304b, Note: 5]]^^ the people were put down immediately after the foundation of the colony because of the people's leaders; for the notables being unjustly treated by them used to be driven out, but later on those who were driven out collecting together effected their return and put down the people. And also the democracy at Megara was put down in a similar manner^^[[6|Rackham: Book: 5, Section: 1304b, Note: 6]]^^; the people's leaders in order to have money to distribute to the people went on expelling many of the notables, until they made the exiles a large body, and these came back and defeated the people in a battle and set up the oligarchy. And the same thing happened also at Cyme
The oligarchy at Athens 411 B.C., cf. 1305a 27.
i.e. owed for repairs to the ships, and perhaps also for advances of pay to the crews.
Probably the Pontic Heraclea (cf. 1305b 5, 36, 1306a 37), founded middle of the 6th century B.C., not the Trachinian.
in the time of the democracy which Thrasymachus put down^^[[1|Rackham: Book: 5, Section: 1305a, Note: 1]]^^, and in the case of other states also examination would show that revolutions take place very much in this manner. Sometimes they make the notables combine by wronging them in order to curry favor, causing either their estates to be divided up or their revenues by imposing public services, and sometimes by so slandering them that they may have the property of the wealthy to confiscate. And in old times whenever the same man became both leader of the people and general, they used to change the constitution to a tyranny; for almost the largest number of the tyrants of early days have risen from being leaders of the people. And the reason why this used to happen then but does not do so now is because then the leaders of the people were drawn from those who held the office of general (for they were not yet skilled in oratory), but now when rhetoric has developed the able speakers are leaders of the people, but owing to their inexperience in military matters they are not put in control of these, except in so far as something of the kind has taken place to a small extent in some places. And tyrannies also used to occur in former times more than they do now because important offices were entrusted to certain men, as at Miletus a tyranny^^[[2|Rackham: Book: 5, Section: 1305a, Note: 2]]^^ arose out of the presidency (for the president had control of many important matters). And moreover, because the cities in those times were not large but the common people lived on their farmsbusily engaged in agriculture, the people's champions when they became warlike used to aim at tyranny. And they all used to do this when they had acquired the confidence of the people, and their pledge of confidence was their enmity towards the rich, as at Athens Pisistratus made himself tyrant by raising up a party against the men of the plain, and Theagenes at Megara by slaughtering the cattle of the well-to-do which he captured grazing by the river, and Dionysius^^[[3|Rackham: Book: 5, Section: 1305a, Note: 3]]^^ established a claim to become tyrant when he accused Daphnaeus and the rich, since his hostility to them caused him to be trusted as a true man of the people. And revolutions also take place from the ancestral form of democracy to one of the most modern kind; for where the magistracies are elective, but not on property-assessments, and the people elect, men ambitious of office by acting as popular leaders bring things to the point of the people's being sovereign even over the laws. A remedy to prevent this or to reduce its extent is for the tribes to elect the magistrates, and not the people collectively.
These then are the causes through which almost all the revolutions in democracies take place.
Oligarchies undergo revolution principally through two ways that are the most obvious. One is if they treat the multitude unjustly; for anybody makes an adequate people's champion, and especially so when their leader happens to come from the oligarchy itself, like Lygdamis at Naxos, who afterwards actually became tyrant of the Naxians.
An event otherwise unknown.
Perhaps that of Thrasybulus (http://www.perseus.tufts.edu/hopper/text?doc=Hdt.%201.20&lang=original), 612 B.C.
Dionysius the elder, see 1259a 29 n.
Faction originating with other people also has various ways of arising. Sometimes when the honors of office are shared by very few, dissolution originates from the wealthy themselves,^^[[1|Rackham: Book: 5, Section: 1305b, Note: 1]]^^ but not those that are in office, as for example has occurred at Marseilles,^^[[2|Rackham: Book: 5, Section: 1305b, Note: 2]]^^ at Istrus,^^[[3|Rackham: Book: 5, Section: 1305b, Note: 3]]^^ at Heraclea,^^[[4|Rackham: Book: 5, Section: 1305b, Note: 4]]^^ and in other states; for those who did not share in the magistracies raised disturbances until as a first stage the older brothers were admitted, and later the younger ones again (for in some places a father and a son may not hold office together, and in others an elder and a younger brother may not). At Marseilles the oligarchy became more constitutional, while at Istrus it ended in becoming democracy, and in Heraclea the government passed from a smaller number to six hundred. At Cnidus also there was a revolution^^[[5|Rackham: Book: 5, Section: 1305b, Note: 5]]^^ of the oligarchy caused by a faction formed by the notables against one another, because few shared in the government, and the rule stated held, that if a father was a member a son could not be, nor if there were several brothers could any except the eldest; for the common people seized the opportunity of their quarrel and, taking a champion from among the notables, fell upon them and conquered them, for a party divided against itself is weak. Another case was at Erythrae,^^[[6|Rackham: Book: 5, Section: 1305b, Note: 6]]^^ where at the time of the oligarchy of the Basilidae in ancient days, althoughthe persons in the government directed affairs well, nevertheless the common people were resentful because they were governed by a few, and brought about a revolution of the constitution.
On the other hand, oligarchies are overthrown from within themselves both^^[[7|Rackham: Book: 5, Section: 1305b, Note: 7]]^^ when from motives of rivalry they play the demagogue (and this demagogy is of two sorts, one among the oligarchs themselves, for a demagogue can arise among them even when they are a very small body,—as for instance in the time of the Thirty at Athens, the party of Charicles rose to power by currying popularity with the Thirty, and in the time of the Four Hundred^^[[8|Rackham: Book: 5, Section: 1305b, Note: 8]]^^ the party of Phrynichus rose in the same way,—the other when the members of the oligarchy curry popularity with the mob, as the Civic Guards at Larisa^^[[9|Rackham: Book: 5, Section: 1305b, Note: 9]]^^ courted popularity with the mob because it elected them, and in all the oligarchies in which the magistracies are not elected by the class from which the magistrates come but are filled from high property-grades or from political clubs while the electors are the heavy-armed soldiers or the common people, as used to be the case at Abydos, and in places where the jury-courts are not made up from the government^^[[10|Rackham: Book: 5, Section: 1305b, Note: 10]]^^—for there members of the oligarchy by courting popular favor with a view to their trials cause a revolution of the constitution, as took place at Heraclea on the Euxine^^[[11|Rackham: Book: 5, Section: 1305b, Note: 11]]^^; and a further instance is when some men try to narrow down the oligarchy to a smaller number, for those who seek equality are forced to bring in the people as a helper.) And revolutions in oligarchy also take place when they squander their private means by riotous living; for also men of this sort seek to bring about a new state of affairs, and either aim at tyranny themselves or suborn somebody else
The contrasted case, of dissolution of oligarchy arising from the people, should follow, but is omitted.
i.e. (apparently) where membership is not confined to the class eligible for the magistracies.
Near the mouth of the Danube.
Perhaps not the same as the one mentioned at 1306b 3.
Just west of Smyrna. The family name implies a claim to royal ancestry.
This sentence is interrupted by a parenthesis and is resumed in 5.6, ‘And revolution is oligarchy also—’.
(as Hipparinus put forward Dionysius^^[[1|Rackham: Book: 5, Section: 1306a, Note: 1]]^^ at Syracuse, and at Amphipolis^^[[2|Rackham: Book: 5, Section: 1306a, Note: 2]]^^ a man named Cleotimus led the additional settlers that came from Chalcis and on their arrival stirred them up to sedition against the wealthy, and in Aegina the man who carried out the transactions with Chares attempted to cause a revolution in the constitution for a reason of this sort^^[[3|Rackham: Book: 5, Section: 1306a, Note: 3]]^^); so sometimes they attempt at once to introduce some reform, at other times they rob the public funds and in consequence either they or those who fight against them in their peculations stir up faction against the government, as happened at Apollonia on the Black Sea. On the other hand, harmonious oligarchy does not easily cause its own destruction; and an indication of this is the constitutional government at Pharsalus, for there the ruling class though few are masters of many men^^[[4|Rackham: Book: 5, Section: 1306a, Note: 4]]^^ because on good terms with one another. Also oligarchical governments break up when they create a second oligarchy within the oligarchy. This is when, although the whole citizen class is small, its few members are not all admitted to the greatest offices; this is what once occurred in Elis, for the government being in the hands of a few, very few men used to become members of the Elders,^^[[5|Rackham: Book: 5, Section: 1306a, Note: 5]]^^ because these numbering ninety held office for life, and the mode of election was of a dynastic type^^[[6|Rackham: Book: 5, Section: 1306a, Note: 6]]^^ and resembled that of the Elders at Sparta.
Revolutionsof oligarchies occur both during war and in time of peace— during war since the oligarchs are forced by their distrust of the people to employ mercenary troops (for the man in whose hands they place them often becomes tyrant, as Timophanes did at Corinth,^^[[7|Rackham: Book: 5, Section: 1306a, Note: 7]]^^ and if they put several men in command, these win for themselves dynastic power), and when through fear of this they give a share in the constitution to the multitude, the oligarchy falls because they are compelled to make use of the common people; during peace, on the other hand, because of their distrust of one another they place their protection in the hands of mercenary troops and a magistrate between the two parties, who sometimes becomes master of both, which happened at Larisa in the time of the government of the Aleuadae led by Simus,^^[[8|Rackham: Book: 5, Section: 1306a, Note: 8]]^^ and at Abydos in the time of the political clubs of which that of Iphiades was one. And factions arise also in consequence of one set of the members of the oligarchy themselves being pushed aside by another set and being driven into party strife in regard to marriages or law-suits; examples of such disorders arising out of a cause related to marriage are the instances spoken of before, and also the oligarchy of the knights at Eretria was put down^^[[9|Rackham: Book: 5, Section: 1306a, Note: 9]]^^ by Diagoras when he had been wronged in respect of a marriage, while the faction at Heraclea and that at Thebes arose out of a judgement of a law-court, when the people at Heraclea justly but factiously enforced the punishment against Eurytion on a charge of adultery
i.e. he had squandered his fortune in riotous living; this deal with the Athenian general may have been in 367 B.C.
i.e. both of the lower classes and of the subject cities.
i.e. the small governing body.
i.e. like a ''dynasteia'', favorable to the interest of a few very wealthy families; see 1292b 10 n.
Corinth was at war with Argos circa 350 B.C. Timophanes was killed by his brother the famous Timoleon, in order to restore constitutional government.
A probable emendation of the Greek gives ‘happened at Larisa to Simus and his party at the time of the government of the Aleuadae.’ This family were hereditary rulers of Larisa (see also 1275b 29 ff. n., and 1305b 29 ff.)
Possibly before the Persian wars. See 1289b 36 ff. The two following cases are unrecorded elsewhere.
and those at Thebes did so against Archias; for their personal enemies stirred up party feeling against them so as to get them bound in the pillory in the market-place. Also many governments have been put down by some of their members who had become resentful because the oligarchies were too despotic; this is how the oligarchies fell at Cnidus^^[[1|Rackham: Book: 5, Section: 1306b, Note: 1]]^^ and at Chios. And revolutions also occur from an accident, both in what is called a constitutional government and in those oligarchies in which membership of the council and the law-courts and tenure of the other offices are based on a property-qualification. For often the qualification first having been fixed to suit the circumstances of the time, so that in an oligarchy a few may be members and in a constitutional government the middle classes, when peace or some other good fortune leads to a good harvest it comes about that the same properties become worth many times as large an assessment, so that all the citizens share in all the rights, the change sometimes taking place gradually and little by little and not being noticed, but at other times more quickly.
Such then are the causes that lead to revolutions and factions in oligarchies (and generally, both democracies and oligarchies are sometimes altered not into the opposite forms of constitution but into ones of the same class, for instancefrom legitimate democracies and oligarchies into autocratic ones and from the latter into the former).
In aristocracies factions arise in some cases because few men share in the honors (which has also been said^^[[2|Rackham: Book: 5, Section: 1306b, Note: 2]]^^ to be the cause of disturbances in oligarchies, because an aristocracy too is a sort of oligarchy, for in both those who govern are few—although the reason for this is not the same in both—since this does cause it to be thought that aristocracy is a form of oligarchy). And this is most bound to come about when there is a considerable number of people who are proud-spirited on the ground of being equals in virtue (for example the clan called the Maidens' Sons^^[[3|Rackham: Book: 5, Section: 1306b, Note: 3]]^^ at Sparta—for they were descended from the Equals—whom the Spartans detected in a conspiracy and sent away to colonize Tarentum); or when individuals although great men and inferior to nobody in virtue are treated dishonorably by certain men in higher honor (for example Lysander by the kings^^[[4|Rackham: Book: 5, Section: 1306b, Note: 4]]^^); or when a person of manly nature has no share in the honors (for example Cinadon,^^[[5|Rackham: Book: 5, Section: 1306b, Note: 5]]^^ who got together the attack upon the Spartans in the reign of Agesilaus). Faction in aristocracies also arises when some of the well-born are too poor and others too rich (which happens especially during wars, and this also occurred at Sparta at the time of the Messenian War—as appears from the poem of Tyrtaeus entitled__Law and Order__;
Said to be descended from irregular unions authorized in order to keep up population during the First Messenian War. They founded Taranto 708 B.C.
King Pausanias II. checked Lysander after his conquest of Athens in 403 B.C. and King Agesilaus thwarted him on the expedition into Asia Minor in 396.
His conspiracy against the Ὅμοιοι in 398 B.C. was discovered and he was executed.
for some men being in distress because of the war put forward a claim to carry out a re-division of the land of the country). Also if a man is great and capable of being yet greater, he stirs up faction in order that he may be sole ruler (as Pausanias who commanded the army through the Persian war seems to have done at Sparta, and Hanno^^[[1|Rackham: Book: 5, Section: 1307a, Note: 1]]^^ at Carthage).
But the actual overthrow of both constitutional governments and aristocracies is mostly due to a departure from justice in the actual framework of the constitution. For what starts it in the case of a constitutional government is that it does not contain a good blend of democracy and oligarchy; and in the case of an aristocracy it is the lack of a good blend of those two elements and of virtue, but chiefly of the two elements (I mean popular government and oligarchy), for both constitutional governments and most of the constitutions that are called aristocracies aim at blending these. For this^^[[2|Rackham: Book: 5, Section: 1307a, Note: 2]]^^ is the point of distinction between aristocracies and what are called constitutional governments, and it is owing to this that some of them^^[[3|Rackham: Book: 5, Section: 1307a, Note: 3]]^^ are less and others more stable; for the constitutions inclining more towards oligarchy men call aristocracies and those inclining more to the side of the multitude constitutional governments, owing to which those of the latter sort are more secure than the others, for the greater number is the stronger, and also men are more content when they have an equal amount, whereas the owners of wealthy properties, if the constitution gives them the superior position,seek to behave insolently and to gain money. And speaking broadly, to whichever side the constitution leans, that is the side to which it shifts as either of the two parties increases its own side—a constitutional government shifts to democracy and an aristocracy to oligarchy, or to the opposite extremes, that is, aristocracy to democracy (for the poorer people feeling they are unjustly treated pull it round to the opposite) and constitutional governments to oligarchy (for the only lasting thing is equality in accordance with desert and the possession of what is their own). And the change mentioned^^[[4|Rackham: Book: 5, Section: 1307a, Note: 4]]^^ came about at Thurii, for because the property-qualification for honors was too high, the constitution was altered to a lower property-qualification and to a larger number of official posts, but because the notables illegally bought up the whole of the land (for the constitution was too oligarchical, so that they were able to grasp at wealth) . . .^^[[5|Rackham: Book: 5, Section: 1307a, Note: 5]]^^ And the people having been trained in the war overpowered the guards, until those who were in the position of having too much land relinquished it.
Besides, as all aristocratic constitutions are inclined towards oligarchy, the notables grasp at wealth (for example at Sparta the estates are coming into a few hands); and the notables have more power to do what they like, and to form marriage connections with whom they like (which was the cause of the fall of the state of Locri, as a result of the marriage with Dionysius,^^[[6|Rackham: Book: 5, Section: 1307a, Note: 6]]^^ which would not have taken place in a democracy; nor in a well-blended aristocracy).
Perhaps Hanno who fought in Sicily against the elder Dionysius circa 4OO B.C.
i.e. their mode of blending oligarchy and democracy.
The writer loosely speaks of aristocracies and polities as a single class, differing only in degree of concentration of power in the hands of the upper classes.
i.e. from aristocracy to democracy. Possibly these events occurred after the defeat of Athens at Syracuse in 413 B.C., when the Athenian party at Thurii was banished (Lysias 835 D). The events in 8 were perhaps in the fourth century.
Probably a clause meaning ‘civil strife ensued’ has been lost.
See 1259a 28 n. He married in 397 B.C. the daughter of a Locrian citizen, who bore him the younger Dionysius.
And aristocracies are most liable to undergo revolution unobserved, through gradual relaxation, just as it has been said in what has gone before about all forms of constitution in general, that even a small change may cause a revolution. For when they give up one of the details of the constitution, afterwards they also make another slightly bigger change more readily, until they alter the whole system. This occurred for instance with the constitution of Thurii. There was a law that the office of general could be held at intervals of four years, but some of the younger men, becoming warlike and winning high repute with the mass of the guards, came to despise the men engaged in affairs, and thought that they would easily get control; so first they tried to repeal the law referred to, so as to enable the same persons to serve as generals continuously, as they saw that the people would vote for themselves with enthusiasm. And though the magistrates in charge of this matter, called the Councillors, at first made a movement to oppose them, they were won over, believing that after repealing this law they would allow the rest of the constitution to stand; but later, though they wished to prevent them when other laws were being repealed, they could no longer do anything more, but the whole system of the constitution was converted into a dynasty of the men who had initiated the innovations.
And constitutions of all formsare broken up some times from movements initiating from within themselves, but sometimes from outside, when there is an opposite form of constitution either near by or a long way off yet possessed of power. This used to happen in the days of the Athenians and the Spartans; the Athenians used to put down oligarchies everywhere and the Spartans democracies.
We have then approximately stated the causes that give rise to revolutions in the constitutions of states and to party factions.
The next thing to speak about is security both in general and for each form of constitution separately. First then it is clear that if we know the causes by which constitutions are destroyed we also know the causes by which they are preserved; for opposites create opposites, and destruction is the opposite of security. In well-blended constitutions therefore, if care must be taken to prevent men from committing any other breach of the law, most of all must a small breach be guarded against, for transgression of the law creeps in unnoticed, just as a small expenditure occurring often ruins men's estates; for the expense is not noticed because it does not come all at once, for the mind is led astray by the repeated small outlays, just like the sophistic puzzle, ‘if each is little, then all are a little.’^^[[1|Rackham: Book: 5, Section: 1307b, Note: 1]]^^ This is true in one way but in another it is not; for the whole or total is not little, but made up of little parts. One thing therefore that we must guard against is this beginning; and the next point is that we must not put faith in the arguments strung together for the sake of tricking the multitude,
This is the ''sorites''fallacy; add to one stone another, and another, and another—when do they make a heap (σωρός)? and take away stone after stone—when do they cease to be a heap? Horace's ‘ratio ruentis acerui’ (http://www.perseus.tufts.edu/hopper/text?doc=Hor.%20Ep.%202.47&lang=original.
for they are refuted by the facts (and what sort of constitutional sophistries we refer to has been said before). And again we must observe that not only some aristocracies but also some oligarchies endure not because the constitutions are secure but because those who get in the offices treat both those outside the constitution and those in the government well, on the one hand by not treating those who are not members of it unjustly and by bringing their leading men into the constitution and not wronging the ambitious ones in the matter of dishonor or the multitude in the matter of gain, and on the other hand, in relation to themselves and those who are members, by treating one another in a democratic spirit. For that equality which men of democratic spirit seek for in the case of the multitude is not only just but also expedient in the case of their compeers. Hence if there are a greater number in the governing class, many of the legislative enactments of a democratic nature are advantageous, for example for the offices to be tenable for six months, to enable all the compeers to participate in them; for the compeers in this case are as it were the people (owing to which demagogues often arise even among them, as has been said already), and also oligarchies and aristocracies fall into dynasties less (for it is not so easy to do wrongswhen in office for a short time as when in for a long time, since it is long tenure of office that causes tyrannies to spring up in oligarchies and democracies; for either those who are the greatest men in either sort of state aim at tyranny, in the one sort the demagogues and in the other the dynasts, or those who hold the greatest offices, when they are in office for along time). And constitutions are kept secure not only through being at a distance from destroyers but sometimes also through being near them,^^[[1|Rackham: Book: 5, Section: 1308a, Note: 1]]^^ for when they are afraid the citizens keep a closer hold on the government; hence those who take thought for the constitution must contrive causes of fear, in order that the citizens may keep guard and not relax their vigilance for the constitution like a watch in the night, and they must make the distant near. Again, they must also endeavor to guard against the quarrels and party struggles of the notables by means of legislation, and to keep out those who are outside the quarrel before they too have taken it over; since to discern a growing evil at the commencement is not any ordinary person's work but needs a statesman. And to deal with the revolution from oligarchy and constitutional government that arises because of the property-qualifications, when this occurs while the rates of qualification remain the same but money is becoming plentiful, it is advantageous to examine the total amount of the rated value of the community as compared with the past amount, in states where the assessment is made yearly, over that period,
and three years or five years ago in the larger states, and if the new total is many times larger or many times smaller than the former one at the time when the rates qualifying for citizenship were fixed, it is advantageous that there should be a law for the magistrates correspondingly to tighten up or to relax the rates, tightening them up in proportion to the ratio of increase if the new total rated value exceeds the old, and relaxing them and making the qualification lower if the new total falls below the old. For in oligarchies and constitutional states, when they do not do this, in the one case^^[[1|Rackham: Book: 5, Section: 1308b, Note: 1]]^^ the result is that in the latter an oligarchy comes into existence and in the former a dynasty, and in the other case^^[[2|Rackham: Book: 5, Section: 1308b, Note: 2]]^^ a constitutional government turns into a democracy and an oligarchy into a constitutional government or a government of the people. But it is a policy common to democracy and oligarchy [and to monarchy],^^[[3|Rackham: Book: 5, Section: 1308b, Note: 3]]^^ and every form of constitution not to raise up any man too much beyond due proportion, but rather to try to assign small honors and of long tenure or great ones quickly^^[[4|Rackham: Book: 5, Section: 1308b, Note: 4]]^^ (for officials grow corrupt, and not every man can bear good fortune), or if not, at all events not to bestow honors in clusters and take them away again in clusters, but by a gradual process; and best of all to try so to regulate people by the law that there may be nobody among them specially pre-eminent in power due to friends or wealth, or, failing this, to cause their periods out of office to be spent abroad.And since men also cause revolutions through their private lives, some magistracy must be set up to inspect those whose mode of living is unsuited to the constitution—unsuited to democracy in a democracy, to oligarchy in an oligarchy, and similarly for each of the other forms of constitution. And also sectional prosperity in the state must be guarded against for the same reasons; and the way to avert this is always to entrust business and office to the opposite sections (I mean that the respectable are opposite to the multitude and the poor to the wealthy), and to endeavor either to mingle together the multitude of the poor and that of the wealthy or to increase the middle class (for this dissolves party factions due to inequality). And in every form of constitution it is a very great thing for it to be so framed both by its laws and by its other institutions that it is impossible for the magistracies to make a profit. And this has most to be guarded against in oligarchies; for the many are not so much annoyed at being excluded from holding office (but in fact they are glad if somebody lets them have leisure to spend on their own affairs) as they are if they think that the magistrates are stealing the common funds, but then both things annoy them, exclusion from the honors of office and exclusion from its profits. And indeed the sole way in which a combination of democracy and aristocracy is possible is if someone could contrive this arrangement^^[[5|Rackham: Book: 5, Section: 1308b, Note: 5]]^^;
i.e. if the total valuation has decreased.
i.e. if the total has increased.
Some MSS. and many editors omit these words.
The text should probably be emended ‘with a short tenure.’
i.e. render it impossible to make money out of office
for it would then be possible for the notables and also the multitude both to have what they want; for it is the democratic principle for all to have the right to hold office and the aristocratic one for the offices to be filled by the notables, and this will be the case when it is impossible to make money from office; for the poor will not want to hold office because of making nothing out of it, but rather to attend to their own affairs, while the wealthy will be able to hold office because they have no need to add to their resources from the public funds; so that the result will be that the poor will become well-off through spending their time upon their work, and the notables will not be governed by any casual persons. Therefore to prevent peculation of the public property, let the transfer of the funds take place in the presence of all the citizens, and let copies of the lists be deposited for each brotherhood,^^[[1|Rackham: Book: 5, Section: 1309a, Note: 1]]^^ company^^[[2|Rackham: Book: 5, Section: 1309a, Note: 2]]^^ and tribe; and to get men to hold office without profit there must be honors assigned by law to officials of good repute. And in democracies it is necessary to be sparing of the wealthy not only by not causing properties to be divided up, but not incomes either (which under some constitutions takes place unnoticed), and it is better to prevent men from undertaking costly but useless public services like equipping choruses and torch-races^^[[3|Rackham: Book: 5, Section: 1309a, Note: 3]]^^ and all other similar services, even if they wish to;in an oligarchy on the other hand it is necessary to take much care of the poor, and to allot to them the offices of profit, and the penalty if one of the rich commits an outrage against them must be greater than if it is done by one of themselves,^^[[4|Rackham: Book: 5, Section: 1309a, Note: 4]]^^ and inheritance must not go by bequest but by family, and the same man must not inherit more than one estate, for so estates would be more on a level, and more of the poor would establish themselves as prosperous. And it is expedient both in a democracy and in an oligarchy to assign to those who have a smaller share in the government—in a democracy to the wealthy and in an oligarchy to the poor—either equality or precedence in all other things excepting the supreme offices of state; but these should be entrusted to those prescribed by the constitution exclusively, or to them for the most part.
There are some three qualities which those who are to hold the supreme magistracies ought to possess, first, loyalty to the established constitution, next, very great capacity to do the duties of the office, and third, virtue and justice—in each constitution the sort of justice suited to the constitution (for if the rules of justice are not the same under all constitutions, it follows that there must be differences in the nature of justice also). It is a difficult question how the choice ought to be made when it happens that all these qualities are not found in the same person;
Groups of citizens normally three to a tribe, supposed to be based on relationship.
Originally a military, later a civil classification.
Equipping the chorus and actors for tragedies and comedies and providing for the ceremonial torch-races were public services borne by individuals at Athens.
Or possibly ‘than if he does it against one of his own class.’
for instance, if one man is a good military commander but a bad man and no friend of the constitution, and the other is just and loyal, how should the choice be made? It seems that two things ought to be considered, what is the quality of which all men have a larger share, and what the one of which all have a smaller share? Therefore in the case of military command one must consider experience more than virtue, for men have a smaller share of military experience and a larger share of moral goodness; but in the case of a trusteeship or a stewardship the opposite, for these require more virtue than most men possess, but the knowledge required is common to all men. And somebody might raise the question, why is virtue needed if both capacity and loyalty to the constitution are forthcoming, as even these two qualities will do what is suitable? May not the answer be, because those who possess these two qualities may possibly lack self-control, so that just as they do not serve themselves well although they know how to and although they love themselves, so possibly in some cases they may behave in this way in regard to the community also? And broadly, whatever provisions in the laws we describe as advantageous to constitutions, these are all preservative of the constitutions, and so is the supreme elementary principle that has been often stated, that of taking precautions that the section desirous of the constitution shall be stronger in numbers than the section not desirous off it. And beside all these matters one thing must not be overlooked which at present is overlooked by the, deviation-forms^^[[1|Rackham: Book: 5, Section: 1309b, Note: 1]]^^ of constitution—the middle party;for many of the institutions thought to be popular destroy democracies, and many of those thought oligarchical destroy oligarchies. But the adherents of the deviation-form, thinking that this form is the only right thing, drag it to excess, not knowing that just as there can be a nose that although deviating from the most handsome straightness towards being hooked or snub nevertheless is still beautiful and agreeable to look at, yet all the same, if a sculptor carries it still further in the direction of excess, he will first lose the symmetry of the feature and finally will make it not even look like a nose at all, because of its excess and deficiency in the two opposite qualities (and the same is the ease also in regard to the other parts of the body), so this is what happens about constitutions likewise; for it is possible for an oligarchy and a democracy to be satisfactory although they have diverged from the best structure, but if one strains either of them further, first he will make the constitution worse, and finally he will make it not a constitution at all. Therefore the legislator and the statesman must not fail to know what sort of democratic institutions save and what destroy a democracy, and what sort of oligarchical institutions an oligarchy; for neither constitution can exist and endure without the well-to-do and the multitude, but when an even level of property comes about, the constitution resulting must of necessity be another one,
so that when men destroy these classes by laws carried to excess they destroy the constitutions. And a mistake is made both in democracies and in oligarchies—in democracies by the demagogues, where the multitude is supreme over the laws; for they always divide the state into two by fighting with the well-to-do, but they ought on the contrary always to pretend to be speaking on behalf of men that are well-to-do, while in democracies the oligarchical statesmen ought to pretend to be speaking on behalf of the people, and the oligarchics ought to take oath in terms exactly opposite to those which they use now, for at present in some oligarchies they swear, “And I will be hostile to the people and will plan whatever evil I can against them,”^^[[1|Rackham: Book: 5, Section: 1310a, Note: 1]]^^ but they ought to hold, and to act the part of holding, the opposite notion, declaring in their oaths, “I will not wrong the people.” But the greatest of all the means spoken of to secure the stability of constitutions is one that at present all people despise: it is a system of education suited to the constitutions. For there is no use in the most valuable laws, ratified by the unanimous judgement of the whole body of citizens, if these are not trained and educated in the constitution, popularly if the laws are popular, oligarchically if they are oligarchical; for there is such a thing as want of self-discipline in a state, as well as in an individual.But to have been educatedto suit the constitution does not mean to do the things that give pleasure to the adherents of oligarchy or to the supporters of democracy, but the things that will enable the former to govern oligarchically and the latter to govern themselves democratically. But at present in the oligarchies the sons of the rulers are luxurious, and the sons of the badly-off become trained by exercise and labor, so that they are both more desirous of reform and more able to bring it about; while in the democracies thought to be the most democratic the opposite of what is expedient has come about. And the cause of this is that they define liberty wrongly (for there are two things that are thought to be defining features of democracy, the sovereignty of the majority and liberty); for justice is supposed to be equality, and equality the sovereignty of what ever may have been decided by the multitude, and liberty doing just what one likes. Hence in democracies of this sort everybody lives as he likes, and ‘unto what end he listeth,’ as Euripides^^[[2|Rackham: Book: 5, Section: 1310a, Note: 2]]^^ says. But this is bad; for to live in conformity with the constitution ought not to be considered slavery but safety.
This therefore, speaking broadly, is a list of the things that cause the alteration and the destruction of constitutions, and of those that cause their “security and continuance.”
It remains to speak of monarchy, the causes that destroy it and the natural means of its preservation.
The ‘scoffing anapaestic cadence’ of this oath has been noted. In 411 B.C. the democratic reaction at Athens swore ‘to be enemies of the Four Hundred and to hold no parley with them.’
Fragment 883, from an unknown play.
And the things that happen about royal governments and tyrannies are almost similar to those that have been narrated about constitutional governments. For royal government corresponds with aristocracy, while tyranny is a combination of the last form of oligarchy^^[[1|Rackham: Book: 5, Section: 1310b, Note: 1]]^^ and of democracy; and for that very reason it is most harmful to its subjects, inasmuch as it is a combination of two bad things, and is liable to the deviations and errors that spring from both forms of constitution. And these two different sorts of monarchy have their origins from directly opposite sources; royalty has come into existence for the assistance of the distinguished against the people, and a king is appointed from those distinguished by superiority in virtue or the actions that spring from virtue, or by superiority in coming from a family of that character, while a tyrant is set up from among the people and the multitude to oppose the notables, in order that the people may suffer no injustice from them. And this is manifest from the facts of history. For almost the greatest number of tyrants have risen, it may be said, from being demagogues, having won the people's confidence by slandering the notables. For some tyrannies were set up in this manner when the states had already grown great, but others that came before them arose from kings departing from the ancestral customs and aiming at a more despotic rule,and others from the men elected to fill the supreme magistracies (for in old times the peoples used to appoint the popular officials^^[[2|Rackham: Book: 5, Section: 1310b, Note: 2]]^^ and the sacred embassies^^[[3|Rackham: Book: 5, Section: 1310b, Note: 3]]^^ for long terms of office), and others from oligarchies electing some one supreme official for the greatest magistracies. For in all these methods they had it in their power to effect their purpose easily, if only they wished, because they already possessed the power of royal rule in the one set of cases and of their honorable office in the other, for example Phidon in Argos^^[[4|Rackham: Book: 5, Section: 1310b, Note: 4]]^^ and others became tyrants when they possessed royal power already, while the Ionian tyrants^^[[5|Rackham: Book: 5, Section: 1310b, Note: 5]]^^ and Phalaris^^[[6|Rackham: Book: 5, Section: 1310b, Note: 6]]^^ arose from offices of honor, and Panaetius at Leontini and Cypselus at Corinth and Pisistratus^^[[7|Rackham: Book: 5, Section: 1310b, Note: 7]]^^ at Athens and Dionysius^^[[8|Rackham: Book: 5, Section: 1310b, Note: 8]]^^ at Syracuse and others in the same manner from the position of demagogue. Therefore, as we said, royalty is ranged in correspondence with aristocracy, for it goes by merit, either by private virtue or by family or by services or by a combination of these things and ability. For in every instance this honor fell to men after they had conferred benefit or because they had the ability to confer benefit on their cities or their nations, some having prevented their enslavement in war, for instance Codrus,^^[[9|Rackham: Book: 5, Section: 1310b, Note: 9]]^^ others having set them free, for instance Cyrus,^^[[10|Rackham: Book: 5, Section: 1310b, Note: 10]]^^ or having settled or acquired territory, for instance the kings of Sparta and Macedon and the Molossians.^^[[11|Rackham: Book: 5, Section: 1310b, Note: 11]]^^ And a king wishes to be a guardian,
Cyrus liberated Persia from the Median empire 559 B.C.
Neoptolemus, son of Achilles, conquered the Molossi and became their king.
Here δημιουργία means ‘magistracy’ generally; δημιουργός was the title of a special officer in some Peloponnesian states.
Official missions to religious games and to oracles.
e.g. Thrasybulus, tyrant of Miletus, 612 B.C.
Tyrant of Agrigentum 572 B.C.
The usual tradition was that Codrus was already king when he saved Athens by sacrificing his life.
to protect the owners of estates from suffering injustice and the people from suffering insult, but tyranny, as has repeatedly been said, pays regard to no common interest unless for the sake of its private benefit; and the aim of tyranny is what is pleasant, that of royalty what is noble. Hence even in their requisitions money is the aim of tyrants but rather marks of honor that of kings; and a king's body-guard consists of citizens, a tyrant's of foreign mercenaries. And it is manifest that tyranny has the evils of both democracy and oligarchy; it copies oligarchy in making wealth its object (for inevitably that is the only way in which the tyrant's body-guard and his luxury can be kept up) and in putting no trust in the multitude (which is why they resort to the measure of stripping the people of arms, and why ill-treatment of the mob and its expulsion from the city and settlement in scattered places is common to both forms of government, both oligarchy and tyranny), while it copies democracy in making war on the notables and destroying them secretly and openly and banishing them as plotting against it and obstructive to its rule. For it is from them that counter-movements actually spring, some of them wishing themselves to rule, and others notto be slaves. Hence comes the advice of Periander to Thrasybulus,^^[[1|Rackham: Book: 5, Section: 1311a, Note: 1]]^^ his docking of the prominent cornstalks, meaning that the prominent citizens must always be made away with.
Therefore, as was virtually stated,^^[[2|Rackham: Book: 5, Section: 1311a, Note: 2]]^^ the causes of revolutions in constitutional and in royal governments must be deemed to be the same; for subjects in many cases attack monarchies because of unjust treatment and fear and contempt, and among the forms of unjust treatment most of all because of insolence, and sometimes the cause is the seizure of private property. Also the objects aimed at by the revolutionaries in the case both of tyrannies and of royal governments are the same as in revolts against constitutional government; for monarchs possess great wealth and great honor, which are desired by all men. And in some cases the attack is aimed at the person of the rulers, in others at their office. Risings provoked by insolence are aimed against the person; and though insolence has many varieties, each of them gives rise to anger, and when men are angry they mostly attack for the sake of revenge, not of ambition. For example the attack on the Pisistratidae took place because they outraged Harmodius's sister and treated Harmodius with contumely (for Harmodius attacked them because of his sister and Aristogiton because of Harmodius, and also the plot was laid against Periander the tyrant in Ambracia^^[[3|Rackham: Book: 5, Section: 1311a, Note: 3]]^^ because when drinking
This has not been stated, but can be inferred from what precedes.
with his favorite he asked him if he was yet with child by him),and the attack on Philip by Pausanias^^[[1|Rackham: Book: 5, Section: 1311b, Note: 1]]^^ was because he allowed him to be insulted by Attalus and his friends, and that on Amyntas the Little^^[[2|Rackham: Book: 5, Section: 1311b, Note: 2]]^^ by Derdas because he mocked at his youth, and the attack of the eunuch on Evagoras of Cyprus was for revenge, for he murdered him as being insulted, because Evagoras's son had taken away his wife. And many risings have also occurred because of shameful personal indignities committed by certain monarchs. One instance is the attack of Crataeas on Archelaus^^[[3|Rackham: Book: 5, Section: 1311b, Note: 3]]^^; for he was always resentful of the association, so that even a smaller excuse became sufficient, or perhaps it was because he did not give him the hand of one of his daughters after agreeing to do so, but gave the elder to the king of Elimea when hard pressed in a war against Sirras and Arrabaeus, and the younger to his son Amyntas, thinking that thus Amyntas would be least likely to quarrel with his son by Cleopatra; but at all events Crataeas's estrangement was primarily caused by resentment because of the love affair. And Hellanocrates of Larisa also joined in the attack for the same reason; for because while enjoying his favors Archelaus would not restore him to his home although he had promised to do so, he thought that the motive of the familiarity that had taken placehad been insolence and not passionate desire. And Pytho and Heraclides of Aenus made away with Cotys^^[[4|Rackham: Book: 5, Section: 1311b, Note: 4]]^^ to avenge their father, and Adamas revolted from Cotys because he had been mutilated by him when a boy, on the ground of the insult. And also many men when enraged by the indignity of corporal chastisement have avenged the insult by destroying or attempting to destroy its author, even when a magistrate or member of a royal dynasty. For example when the Penthilidae^^[[5|Rackham: Book: 5, Section: 1311b, Note: 5]]^^ at Mitylene went about striking people with their staves Megacles with his friends set on them and made away with them, and afterwards Smerdis when he had been beaten and dragged out from his wife's presence killed Penthilus. Also Decamnichus took a leading part in the attack upon Archelaus, being the first to stir on the attackers; and the cause of his anger was that he had handed him over to Euripides the poet to flog, Euripides being angry because he had made a remark about his breath smelling. And many others also for similar reasons have been made away with or plotted against. And similarly also from the motive of fear; for this was one of the causes we mentioned in the case of monarchies, as also in that of constitutional governments; for instance Artapanes^^[[6|Rackham: Book: 5, Section: 1311b, Note: 6]]^^ killed Xerxes fearing the charge about Darius, because he had hanged him when Xerxes had ordered him not to but he had thought that he would forgive him because he would forget, as he had been at dinner. And other attacks on monarchs have been on account of contempt,
A Macedonian youth of family, who murdered Philip 336 B.C. Attalus was the uncle of Philip's wife Cleopatra.
Perhaps the adjective should be transferred to Derdas and expunged as an interpolated note. The persons referred to are uncertain.
King of Macedon 413-399 B.C. Euripides went to reside at his court 408 B.C. and died there 406 B.C. at the age of 75.
King of Thrace 382-358 B.C.
The ruling family in the early oligarchy there, claiming descent from Penthilus, an illegitimate son of Orestes.
Captain of Xerxes' body-guard.
as somebody killed Sardanapallus^^[[1|Rackham: Book: 5, Section: 1312a, Note: 1]]^^ when he saw him combing his hair with his women (if this story told by the narrators of legends is true—and if it did not happen with Sardanapallus, it might quite well be true of somebody else), and Dion attacked the younger Dionysius^^[[2|Rackham: Book: 5, Section: 1312a, Note: 2]]^^ because he despised him, when he saw the citizens despising him and the king himself always drunk. And contempt has led some even of the friends of monarchs to attack them, for they despise them for trusting them and think they will not be found out. And contempt is in a manner the motive of those who attack monarchs thinking that they are able to seize the government; for they make the attempt with a light heart, feeling that they have the power and because of their power despising the danger, as generals commanding the armies attack their monarchs; for instance Cyrus attacked Astyages^^[[3|Rackham: Book: 5, Section: 1312a, Note: 3]]^^ when he despised both his mode of life and his power, because his power had waned and he himself was living luxuriously, and the Thracian Seuthes attacked Amadocus^^[[4|Rackham: Book: 5, Section: 1312a, Note: 4]]^^ when his general. Others again attack monarchs for more than one of these motives, for instance both because they despise them and for the sake of gain, as Mithridates^^[[5|Rackham: Book: 5, Section: 1312a, Note: 5]]^^ attacked Ariobarzanes.^^[[6|Rackham: Book: 5, Section: 1312a, Note: 6]]^^ And it is men of bold nature and who hold a military office with monarchs who most often make the attempt for this reason; for courage possessing power is boldness,and they make their attacks thinking that with courage and power they will easily prevail. But with those whose attack is prompted by ambition the motive operates in a different way from those spoken of before; some men attack tyrants because they see great profits and great honors belonging to them, but that is not the reason that in each case leads the persons who attack from motives of ambition to resolve on the venture; those others are led by the motive stated, but these attack monarchs from a wish to gain not monarchy but glory, just as they would wish to take part in doing any other uncommon deed that makes men famous and known to their fellows. Not but what those who make the venture from this motive are very few indeed in number, for underlying it there must be an utter disregard of safety, if regard for safety is not to check the enterprise; they must always have present in their minds the opinion of Dion, although it is not easy for many men to have it; Dion marched with a small force against Dionysius, saying that his feeling was that, whatever point he might be able to get to, it would be enough for him to have had that much share in the enterprise—for instance, if it should befall him to die as soon as he had just set foot in the country, that death would satisfy him.
And one way in which tyranny is destroyed, as is each of the other forms of constitution also, is from without,
Last king of the Assyrian empire at Nineveh.
Tyrant of Syracuse 367-356 and 346-343 B.C., cf. 1312a 34 ff.
The last king of Media, reigned 594-559 B.C.
Both these Thracian kings became allies of Athens 390 B.C., but the event referred to may be later.
Perhaps Mithridates II., who succeeded his father Ariobarzanes as satrap of Pontus 336 B.C.
The following sentence may have been shifted by mistake from the end of 8.14 above.
if some state with an opposite constitution is stronger (for the wish to destroy it will clearly be present in such a neighbor because of the opposition of principle, and all men do what they wish if they have the power)—and the constitutions opposed to tyranny are, on the one hand democracy, which is opposed to it as (in Hesiod's phrase^^[[1|Rackham: Book: 5, Section: 1312b, Note: 1]]^^) ‘potter to potter,’ because the final form of democracy is tyranny, and on the other hand royalty and aristocracy are opposed to tyranny because of the opposite nature of their constitutional structure (owing to which the Spartans put down a very great many tyrannies, and so did the Syracusans at the period when they were governed well.) But one way is from within itself, when the partners in it fall into discord, as the tyranny of the family of Gelo^^[[2|Rackham: Book: 5, Section: 1312b, Note: 2]]^^ was destroyed, and in modern times^^[[3|Rackham: Book: 5, Section: 1312b, Note: 3]]^^ that of the family of Dionysius^^[[4|Rackham: Book: 5, Section: 1312b, Note: 4]]^^—Gelo's, when Thrasybulus the brother of Hiero paid court to the son of Gelo and urged him into indulgences in order that he himself might rule, and the son's connections banded together a body of confederates in order that the tyranny might not be put down entirely but only Thrasybulus, but their confederates seizing the opportunity expelled them all; Dionysius was put down by Dion, his relative, who got the people on to his side and expelled him, but was afterwards killed. There are two causes that chiefly lead men to attack tyranny, hatred and contempt; the former, hatred,attaches to tyrants always, but it is their being despised that causes their downfall in many cases. A proof of this is that most of those that have won tyrannies have also kept their offices to the end, but those that have inherited them almost all lose them at once; for they live a life of indulgence, and so become despicable and also give many opportunities to their attackers. And also anger must be counted as an element in the hatred felt for them, for in a way it occasions the same actions. And often it is even more active than hatred, since angry men attack more vigorously because passion does not employ calculation (and insolence most frequently causes men to be led by their angry tempers, which was the cause of the fall of the tyranny of the Pisistratidae and many others), but hatred calculates more; for anger brings with it an element of pain, making calculation difficult, but enmity is not accompanied by pain. And to speak summarily, all the things that we have mentioned as causing the down fall of unmixed and extreme oligarchy and of the last form of democracy must be counted as destructive of tyranny as well, since extreme oligarchy and democracy are in reality divided^^[[5|Rackham: Book: 5, Section: 1312b, Note: 5]]^^ tyrannies. Royal government on the other hand is very seldom destroyed by external causes, so that it is long-lasting; but in most cases its destruction arises out of itself. And it is destroyed in two ways,
http://www.perseus.tufts.edu/hopper/text?doc=Hes.%20WD%2025&lang=original καὶ κεραμεὺς κεραμεῖ κοτέει καὶ τέκτονι τέκτων, ‘two of a trade never agree.’
Tyrant of Syracuse 485-478 B.C., succeeded by his brother Hiero who died 467. Gelo's son is unknown. Cf. 1315b 35 ff.
356 B.C., a good many years before this book was written.
i.e. divided among several persons, ‘put into commission.’
one when those who participate in it quarrel, and another when the kings try to administer the government too tyrannically, claiming to exercise sovereignty in more things and contrary to the law. Royal governments do not occur any more now, but if ever monarchies do occur they are rather tyrannies, because royalty is government over willing subjects but with sovereignty over greater matters, but men of equal quality are numerous and no one is so outstanding as to fit the magnitude and dignity of the office; so that for this reason the subjects do not submit willingly, and if a man has made himself ruler by deception or force, then this is thought to be a tyranny. In cases of hereditary royalty we must also set down a cause of their destruction, in addition to those mentioned, the fact that hereditary kings often become despicable, and that although possessing not the power of a tyrant but the dignity of a king they commit insolent outrages; for the deposition of kings used to be easy, since a king will at once cease to be king if his subjects do not wish him to be, whereas a tyrant will still be tyrant even though his subjects do not wish it.
These causes then and others of the same nature are those that bring about the destruction of monarchies.
On the other hand it is clear that monarchies, speaking generally, are preserved in safety as a result of the opposite causes to those by which they are destroyed. But taking the different sorts of monarchy separately—royalties are preserved by bringing theminto a more moderate form; for the fewer powers the kings have, the longer time the office in its entirety must last, for they themselves become less despotic and more equal to their subjects in temper, and their subjects envy them less. For this was the cause of the long persistence of the Molossian royalty, and that of Sparta has continued because the office was from the beginning divided into two halves, and because it was again limited in various ways by Theopompus,^^[[1|Rackham: Book: 5, Section: 1313a, Note: 1]]^^ in particular by his instituting the office of the ephors to keep a check upon it; for by taking away some of the kings' power he increased the permanence of the royal office, so that in a manner he did not make it less but greater. This indeed as the story goes is what he said in reply to his wife, when she asked if he felt no shame in bequeathing the royal power to his sons smaller than he had inherited it from his father: “Indeed I do not,” he is said to have answered, “for I hand it on more lasting.”
Tyrannies on the other hand are preserved in two extremely opposite ways. One of these is the traditional way and the one in which most tyrants administer their office. Most of these ordinary safeguards of tyranny are said to have been instituted by Periander^^[[2|Rackham: Book: 5, Section: 1313a, Note: 2]]^^ of Corinth, and also many such devices may be borrowed from the Persian empire. These are both the measures mentioned some time back to secure the safety of a tyranny as far as possible—the lopping off of outstanding men and the destruction of the proud,—and also the prohibition of common meals and club-fellowship and education and all other things of this nature,
King of Sparta circa 770-720 B.C.
in fact the close watch upon all things that usually engender the two emotions of pride and confidence, and the prevention of the formation of study-circles and other conferences for debate,^^[[1|Rackham: Book: 5, Section: 1313b, Note: 1]]^^ and the employment of every means that will make people as much as possible unknown to one another (for familiarity increases mutual confidence); and for the people in the city to be always visible and to hang about the palace-gates (for thus there would be least concealment about what they are doing, and they would get into a habit of being humble from always acting in a servile way); and all the other similar devices of Persian and barbarian tyranny (for all have the same effect); and to try not to be uninformed about any chance utterances or actions of any of the subjects, but to have spies like the women called ‘provocatrices’ at Syracuse and the ‘sharp-ears’ that used to be sent out by Hiero wherever there was any gathering or conference (for when men are afraid of spies of this sort they keep a check on their tongues, and if they do speak freely are less likely not to be found out); and to set men at variance with one another and cause quarrels between friend and friend and between the people and the notables and among the rich. And it is a device of tyranny to make the subjects poor, so that a guard^^[[2|Rackham: Book: 5, Section: 1313b, Note: 2]]^^may not be kept, and also that the people being busy with their daily affairs may not have leisure to plot against their ruler. Instances of this are the pyramids in Egypt and the votive offerings of the Cypselids,^^[[3|Rackham: Book: 5, Section: 1313b, Note: 3]]^^ and the building of the temple of Olympian Zeus by the Pisistratidae^^[[4|Rackham: Book: 5, Section: 1313b, Note: 4]]^^ and of the temples at Samos, works of Polycrates^^[[5|Rackham: Book: 5, Section: 1313b, Note: 5]]^^ (for all these undertakings produce the same effect, constant occupation and poverty among the subject people); and the levying of taxes, as at Syracuse (for in the reign of Dionysius^^[[6|Rackham: Book: 5, Section: 1313b, Note: 6]]^^ the result of taxation used to be that in five years men had contributed the whole of their substance). Also the tyrant is a stirrer-up of war, with the deliberate purpose of keeping the people busy and also of making them constantly in need of a leader. Also whereas friends are a means of security to royalty, it is a mark of a tyrant to be extremely distrustful of his friends, on the ground that, while all have the wish, these chiefly have the power. Also the things that occur in connection with the final form of democracy^^[[7|Rackham: Book: 5, Section: 1313b, Note: 7]]^^ are all favorable to tyranny—dominance of women in the homes, in order that they may carry abroad reports against the men, and lack of discipline among the slaves, for the same reason; for slaves and women do not plot against tyrants, and also, if they prosper under tyrannies, must feel well-disposed to them, and to democracies as well (for the common people also wishes to be sole ruler). Hence also the flatterer is in honor with both—with democracies the demagogue (for the demagogue is a flatterer of the people), and with the tyrants those who associate with them humbly, which is the task of flattery.
The phrases cover Plato's gatherings in the Academy, Aristotle's in the Peripatos of the Lyceum, and other meetings for the intellectual use of leisure in gymnasia, palaestrae and leschae.
Apparently this means a citizen force side by side with the tyrant's mercenaries; a variant gives ‘in order that the (tyrant's) guard may be kept.’
Cypselus and his son Periander (1310b 29 n., 1284a 26 n.) dedicated a colossal statue of Zeus at Olympia and other monuments there and at Delphi.
Pisistratus is said to have begun the temple of Olympian Zeus at Athens, not finished till the time of Hadrian.
Tyrant of Samos, d. 522 B.C.
In fact owing to this tyranny is a friend of the base; for tyrants enjoy being flattered, but nobody would ever flatter them if he possessed a free spirit—men of character love their ruler, or at all events do not flatter him. And the base are useful for base business, for nail is driven out by nail, as the proverb goes.^^[[1|Rackham: Book: 5, Section: 1314a, Note: 1]]^^ And it is a mark of a tyrant to dislike anyone that is proud or free-spirited; for the tyrant claims for himself alone the right to bear that character, and the man who meets his pride with pride and shows a free spirit robs tyranny of its superiority and position of mastery; tyrants therefore hate the proud as undermining their authority. And it is a mark of a tyrant to have men of foreign extraction rather than citizens as guests at table and companions, feeling that citizens are hostile but strangers make no claim against him.^^[[2|Rackham: Book: 5, Section: 1314a, Note: 2]]^^ These and similar habits are characteristic of tyrants and preservative of their office, but they lack no element of baseness. And broadly speaking, they are all included under three heads; for tyranny aims at three things, one to keep its subjects humble (for a humble-spirited man would not plot against anybody), second to have them continually distrust one another (for a tyranny is not destroyed until some men come to trust each other, owing to which tyrants also make war on the respectable, as detrimentalto their rule not only because of their refusal to submit to despotic rule, but also because they are faithful to one another and to the other citizens, and do not inform against one another nor against the others); and the third is lack of power for political action (since nobody attempts impossibilities, so that nobody tries to put down a tyranny if he has not power behind him). These then in fact are the three aims to which the wishes of tyrants are directed; for all the measures taken by tyrants one might class under these principles—some are designed to prevent mutual confidence among the subjects, others to curtail their power, and others to make them humble-spirited.
Such then is the nature of one method by which security is obtained for tyrannies. The other tries to operate in a manner almost the opposite of the devices mentioned. And it can be ascertained from considering the downfall of royal governments. For just as one mode of destroying royalty is to make its government more tyrannical, so a mode of securing tyranny is to make it more regal, protecting one thing only, its power, in order that the ruler may govern not only with the consent of the subjects but even without it; for if he gives up this, he also gives up his position as tyrant. But while this must stand as a fundamental principle, all the other measures he may either adopt or pretend to adopt by cleverly acting the royal part. The first step is to be careful of the public funds,
The proverb ἡλῷ ἧλος ἐκκρούεται usually meant driving out something by a thing of the same kind (‘set a thief to catch a thief’), not as here the execution of evil designs by appropriate agents.
i.e. do not claim honors as against their patron, claim to be his equals.
not squandering presents such as the multitudes resent, when tyrants take money from the people themselves while they toil and labor in penury and lavish it on mistresses and foreigners and craftsmen, and also rendering account of receipts and expenditure, as some tyrants have done already (for this careful management would make a ruler seem a steward of the state and not a tyrant, and he need not be afraid of ever being at a loss for funds while he is master of the state; on the contrary, for those tyrants who go abroad on foreign campaigns this is actually more expedient than to leave their money there collected into one sum, for there is less fear of those guarding it making an attempt on power; since for tyrants campaigning abroad the keepers of the treasury are more to be feared than the citizens, for the citizens go abroad with him but the others stay at home). Secondly he must be seen to collect his taxes and benevolences for purposes of administration and to meet his occasional requirements for military emergencies, and generally must pose as guardian and steward as it were of a public fund and not a private estate. And his bearing must not be harsh but dignified, and also such as to inspire not fear but rather respectin those who encounter him, though this is not easy to achieve if he is a contemptible personality; so that even if he neglects the other virtues he is bound to cultivate military valor, and to make himself a reputation as a soldier. And further more not only must he himself be known not to outrage any of his subjects, either boy or girl, but so also must everybody about him, and also their wives must similarly show respect towards the other women, since even the insolences of women have caused the fall of many tyrannies. And in regard to bodily enjoyments he must do the opposite of what some tyrants do now (for they not only begin their debaucheries at daybreak and carry them on for many days at a time, but also wish to be seen doing so by the public, in order that people may admire them as fortunate and happy), but best of all he must be moderate in such matters, or if not, he must at all events avoid displaying his indulgences to his fellows (for not the sober man but the drunkard is easy to attack and to despise, not the wakeful man but the sleeper). And he must do the opposite of almost all the things mentioned some time back, for he must lay out and adorn the city as if he were a trustee and not a tyrant. And further he must be seen always to be exceptionally zealous as regards religious observances (for people are less afraid of suffering any illegal treatment from men of this sort,
if they think that their ruler has religious scruples and pays regard to the gods, and also they plot against him less, thinking that he has even the gods as allies), though he should not display a foolish religiosity. And he must pay such honor to those who display merit in any matter that they may think that they could never be more honored by the citizens if they were in dependent; and honors of this kind he should bestow in person, but inflict his punishments by the agency of other magistrates and law-courts. And it is a protection common to every sort of monarchy to make no one man great, but if necessary to exalt several (for they will keep watch on one another), and if after all the ruler has to elevate an individual, at all events not take a man of bold spirit (for such a character is most enterprising in all undertakings); and if he thinks fit to remove somebody from his power, to do this by gradual stages and not take away the whole of his authority at once. And again he should carefully avoid all forms of outrage, and two beyond all, violent bodily punishments and outrage of the young. And this caution must especially be exercised in relation to the ambitious, for while to be slighted in regard to property annoys the lovers of wealth, slights that involve dishonor are what men of honorable ambition and high character resent.Hence the tyrant should either not consort with men of this kind, or appear to inflict his punishments paternally and not because of contempt, and to indulge in the society of the young for reasons of passion, not because he has the power, and in general he should buy off what are thought to be dishonors by greater honors. And among those who make attempts upon the life of a ruler the most formidable and those against whom the greatest precaution is needed are those that are ready to sacrifice their lives if they can destroy him. Hence the greatest care must be taken to guard against those who think that insolent outrage is being done either to themselves or to those who happen to be under their care; for men attacking under the influence of anger are reckless of themselves, as Heraclitus^^[[1|Rackham: Book: 5, Section: 1315a, Note: 1]]^^ also observed when he said that anger was hard to combat because it would buy revenge with a life. And since states consist of two parts, the poor people and the rich, the most important thing is for both to think that they owe their safety to the government and for it to prevent either from being wronged by the other, but whichever class is the stronger, this must be made to be entirely on the side of the government, as, if this support for the tyrant's interests is secured, there is no need for him to institute a liberation of slaves or a disarming of the citizens, for one of the two parts of the state added to his power will be enough to make him and them stronger than their attackers. But to discuss each of such matters separately is superfluous; for the thing to aim at is clear,
The natural philosopher of Ephesus, fl. circa 513 B.C., known as ὁ σκοτεινός for his epigrammatic obscurity.
that it is necessary to appear to the subjects to be not a tyrannical ruler but a steward and a royal governor, and not an appropriator of wealth but a trustee, and to pursue the moderate things of life and not its extravagances, and also to make the notables one's comrades and the many one's followers. For the result of these methods must be that not only the tyrant's rule will be more honorable and more enviable because he will rule nobler subjects and not men that have been humiliated, and will not be continually hated and feared, but also that his rule will endure longer, and moreover that he himself in his personal character will be nobly disposed towards virtue, or at all events half-virtuous, and not base but only half-base.
Nevertheless oligarchy and tyranny^^[[1|Rackham: Book: 5, Section: 1315b, Note: 1]]^^ are less lasting than any of the constitutional governments. For the longest-lived was the tyranny at Sicyon, that of the sons^^[[2|Rackham: Book: 5, Section: 1315b, Note: 2]]^^ of Orthagoras and of Orthagoras himself, and this lasted a hundred years.^^[[3|Rackham: Book: 5, Section: 1315b, Note: 3]]^^ The cause of this was that they treated their subjects moderately and in many matters were subservient to the laws, and Cleisthenes because he was a warlike man was not easily despised, and in most things they kept the lead of the people by looking after their interests. At all events it is said that Cleisthenes placed a wreath on the judge who awarded the victory away from him, and some say that the statueof a seated figure in the market-place is a statue of the man who gave this judgement. And they say that Pisistratus^^[[4|Rackham: Book: 5, Section: 1315b, Note: 4]]^^ also once submitted to a summons for trial before the Areopagus. And the second longest is the tyranny at Corinth, that of the Cypselids,^^[[5|Rackham: Book: 5, Section: 1315b, Note: 5]]^^ for even this lasted seventy-three and a half years, as Cypselus was tyrant for thirty years, Periander for forty-four,^^[[6|Rackham: Book: 5, Section: 1315b, Note: 6]]^^ and Psammetichus son of Gordias for three years. And the reasons for the permanence of this tyranny also are the same: Cypselus was a leader of the people and continuously throughout his period of office dispensed with a bodyguard; and although Periander became tyrannical, yet he was warlike. The third longest tyranny is that of the Pisistratidae at Athens, but it was not continuous; for while Pisistratus^^[[7|Rackham: Book: 5, Section: 1315b, Note: 7]]^^ was tyrant he twice fled into exile, so that in a period of thirty-three years he was tyrant for seventeen years out of the total, and his sons for eighteen years, so that the whole duration of their rule was thirty-five years. Among the remaining tyrannies is the one connected with Hiero and Gelo^^[[8|Rackham: Book: 5, Section: 1315b, Note: 8]]^^ at Syracuse, but even this did not last many years, but only eighteen in all, for Gelo after being tyrant for seven years ended his life in the eighth, and Hiero ruled ten years, but Thrasybulus was expelled after ten months. And the usual tyrannies have all of them been of quite short duration.
The causes therefore of the destruction of constitutional governments and of monarchies and those again of their preservation have almost all of them been discussed.
Oligarchy is not mentioned in what follows, and the context deals with the forms of monarchy. Tyranny is included among the constitutions at 1312a 40, but not elsewhere in this Book. Some editors bracket ll. 19-29 as spurious or out of place.
i.e. descendants; Cleisthenes was his grandson.
The Greek may be corrected to ‘forty and a half’ to give the stated total.
The subject of revolutions is discussed by Socrates in the Republic,^^[[1|Rackham: Book: 5, Section: 1316a, Note: 1]]^^ but is not discussed well. For his account of revolution in the constitution that is the best one and the first does not apply to it particularly. He says that the cause is that nothing is permanent but everything changes in a certain cycle, and that change has its origin in those numbers ‘whose basic ratio 4 : 3 linked with the number 5 gives two harmonies,’—meaning whenever the number of this figure becomes cubed,—in the belief that nature sometimes engenders men that are evil, and too strong for education to influence—speaking perhaps not ill as far as this particular dictum goes (for it is possible that there are some persons incapable of being educated and becoming men of noble character), but why should this process of revolution belong to the constitution which Socrates speaks of as the best, more than to all the other forms of constitution, and to all men that come into existence? and why merely by the operation of time, which he says is the cause of change in all things, do even things that did not begin to exist simultaneously change simultaneously? for instance, if a thing came into existence the day before the completion of the cycle, why does it yet change simultaneously with everything else? And in addition to these points, what is the reason why the republic changes from the constitution mentioned into the Spartan form^^[[2|Rackham: Book: 5, Section: 1316a, Note: 2]]^^? For all constitutions more often change into the opposite form than into theone near them. And the same remark applies to the other revolutions as well. For from the Spartan constitution the state changes, he says, to oligarchy, and from this to democracy, and from democracy to tyranny. Yet revolutions also occur the other way about, for example from democracy to oligarchy, and more often so than from democracy to monarchy. Again as to tyranny he does not say whether it will undergo revolution or not, nor, if it will, what will be the cause of it, and into what sort of constitution it will change; and the reason for this is that he would not have found it easy to say, for it is irregular; since according to him tyranny ought to change into the first and best constitution, for so the process would be continuous and a circle, but as a matter of fact tyranny also changes into tyranny, as the constitution of Sicyon^^[[3|Rackham: Book: 5, Section: 1316a, Note: 3]]^^ passed from the tyranny of Myron to that of Cleisthenes, and into oligarchy, as did that of Antileon^^[[4|Rackham: Book: 5, Section: 1316a, Note: 4]]^^ at Chalcis, and into democracy, as that of the family of Gelo^^[[5|Rackham: Book: 5, Section: 1316a, Note: 5]]^^ at Syracuse, and into aristocracy, as that of Charilaus^^[[6|Rackham: Book: 5, Section: 1316a, Note: 6]]^^ at Sparta [and as at Carthage].^^[[7|Rackham: Book: 5, Section: 1316a, Note: 7]]^^ And constitutions change from oligarchy to tyranny, as did almost the greatest number of the ancient oligarchies in Sicily, at Leontini to the tyranny of Panaetius,^^[[8|Rackham: Book: 5, Section: 1316a, Note: 8]]^^ at Gelo to that of Cleander, at Rhegium to that of Anaxilaus,^^[[9|Rackham: Book: 5, Section: 1316a, Note: 9]]^^ and in many other cities similarly. And it is also a strange idea that revolutions into oligarchy take place because the occupants of the offices are lovers of money and engaged in money-making,
Plato, __Republic__, Bks. 8, 9 init.; the mathematical formula for the change from Aristocracy to Timocracy quoted here occurs at http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Rep.%20546c&lang=original—see Adam's note there.
Timocracy, http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Rep.%20545a&lang=original
This clause seems an interpolation; cf. b 6.
Unknown. Reggio is related to Sicily as Dover is to France.
but not because owners of much more than the average amount of property think it unjust for those who do not own any property to have an equal share in the state with those who do; and in many oligarchies those in office are not allowed to engage in business, but there are laws preventing it, whereas in Carthage, which has a democratic government,^^[[1|Rackham: Book: 5, Section: 1316b, Note: 1]]^^ the magistrates go in for business, and they have not yet had a revolution. And it is also a strange remark^^[[2|Rackham: Book: 5, Section: 1316b, Note: 2]]^^ that the oligarchical state is two states, one of rich men and one of poor men. For what has happened to this state rather than to the Spartan or any other sort of state where all do not own an equal amount of wealth or where all are not equally good men? and when nobody has become poorer than he was before, none the less revolution takes place from oligarchy to democracy if the men of no property become more numerous, and from democracy to oligarchy if the wealthy class is stronger than the multitude and the latter neglect politics but the former give their mind to them. And although there are many causes through which revolutions in oligarchies occur, he mentions only one—that of men becoming poor through riotous living, by paying away their money in interest on loans—as if at the start all men or most men were rich. But this is not true, but although when some of the leaders have lost their properties they stir up innovations, when men of the other classes are ruined nothing strange happens; and even when such a revolution does occur it is no more likely to end in a democracy than in another form of constitution. And furthermore men also form factions and cause revolutions in the constitution if they are not allowed a share of honors, and if they are unjustly or insolently treated, even if they have not run through all their property...^^[[3|Rackham: Book: 5, Section: 1316b, Note: 3]]^^ because of being allowed to do whatever they like; the cause of which he states to be excessive liberty. And although there are several forms of oligarchy and of democracy, Socrates speaks of the revolutions that occur in them as though there were only one form of each.
Apparently this clause also is an interpolation, or ‘democratic’ is a copyist's mistake for ‘oligarchic’ or ‘timocratic,’ see 1272b 24 ff.
[[Plat. Rep. 551d|http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Rep.%20551d&lang=original]]
Some words appear to be lost here; what follows refers to democracy, cf. [[Plat. Rep. 587b|http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Rep.%20587b&lang=original]].
---
!!![[Section: 1316b|Rackham: Book: 6, Section: 1316b]]
{{Rackham: Book: 6, Section: 1316b}}
---
!!![[Section: 1317a|Rackham: Book: 6, Section: 1317a]]
{{Rackham: Book: 6, Section: 1317a}}
---
!!![[Section: 1317b|Rackham: Book: 6, Section: 1317b]]
{{Rackham: Book: 6, Section: 1317b}}
---
!!![[Section: 1318a|Rackham: Book: 6, Section: 1318a]]
{{Rackham: Book: 6, Section: 1318a}}
---
!!![[Section: 1318b|Rackham: Book: 6, Section: 1318b]]
{{Rackham: Book: 6, Section: 1318b}}
---
!!![[Section: 1319a|Rackham: Book: 6, Section: 1319a]]
{{Rackham: Book: 6, Section: 1319a}}
---
!!![[Section: 1319b|Rackham: Book: 6, Section: 1319b]]
{{Rackham: Book: 6, Section: 1319b}}
---
!!![[Section: 1320a|Rackham: Book: 6, Section: 1320a]]
{{Rackham: Book: 6, Section: 1320a}}
---
!!![[Section: 1320b|Rackham: Book: 6, Section: 1320b]]
{{Rackham: Book: 6, Section: 1320b}}
---
!!![[Section: 1321a|Rackham: Book: 6, Section: 1321a]]
{{Rackham: Book: 6, Section: 1321a}}
---
!!![[Section: 1321b|Rackham: Book: 6, Section: 1321b]]
{{Rackham: Book: 6, Section: 1321b}}
---
!!![[Section: 1322a|Rackham: Book: 6, Section: 1322a]]
{{Rackham: Book: 6, Section: 1322a}}
---
!!![[Section: 1322b|Rackham: Book: 6, Section: 1322b]]
{{Rackham: Book: 6, Section: 1322b}}
---
!!![[Section: 1323a|Rackham: Book: 6, Section: 1323a]]
{{Rackham: Book: 6, Section: 1323a}}
^^[[1|Rackham: Book: 6, Section: 1316b, Note: 1]]^^We have already discussed^^[[2|Rackham: Book: 6, Section: 1316b, Note: 2]]^^ how many and what are the varieties of the deliberative body or sovereign power in the state, and of the system of magistracies and of law-courts, and which variety is adapted to which form of constitution, and also^^[[3|Rackham: Book: 6, Section: 1316b, Note: 3]]^^ the destruction of constitutions and their preservation, from what sort of people they originate and what are their causes. But as a matter of fact since there have come into existence several kinds of democracy and similarly of the other forms of constitution, it will be well at the same time to consider^^[[4|Rackham: Book: 6, Section: 1316b, Note: 4]]^^ any point that remains about these varieties, and also determine the mode of organization appropriate and advantageous for each. And further we must also investigate^^[[5|Rackham: Book: 6, Section: 1316b, Note: 5]]^^ the combinations of all the modes of organizing the actual departments of state that have been mentioned,^^[[6|Rackham: Book: 6, Section: 1316b, Note: 6]]^^
Book 7 in some editions, Book 8 in others.
These topics do not occur in the extant work.
i.e. the deliberative, executive and judicial, see 1297b 41 ff.
for these modes when coupled together make the constitutions overlap, so as to produce oligarchical aristocracies and republics inclining towards democracy. I refer to the combinations which ought to be investigated but have not at present been studied, for example if the deliberative body and the system of electing magistrates are organized oligarchically but the regulations as to the law-courts aristocratically, or these and the structure of the deliberative body oligarchically and the election of magistracy aristocratically, or if in some other manner not all the parts of the constitution are appropriately combined.
Now it has been stated before^^[[1|Rackham: Book: 6, Section: 1317a, Note: 1]]^^ what kind of democracy is suited to what kind of state, and similarly which of the kinds of oligarchy is suited to what kind of populace, and also which of the remaining constitutions is advantageous for which people; but nevertheless since it must not only be made clear which variety of these constitutions is best for states, but also how both these best varieties and the other forms must be established, let us briefly pursue the subject. And first let us speak about democracy; for at the same time the facts will also become clear about the opposite form of constitution, that is, the constitution which some people call oligarchy.^^[[2|Rackham: Book: 6, Section: 1317a, Note: 2]]^^
And for this inquiry we must take into view all the features that are popular and that are thoughtto go with democracies; for it comes about from combinations of these that the kinds of democracy are formed, and that there are different democracies and more than one sort. In fact there are two causes for there being several kinds of democracy, first the one stated before, the fact that the populations are different (for we find one multitude engaged in agriculture and another consisting of handicraftsmen and day-laborers, and when the first of these is added to the second and again the third to both of them it not only makes a difference in that the quality of the democracy becomes better or worse but also by its becoming different in kind); and the second cause is the one about which we now speak. For the institutions that go with democracies and seem to be appropriate to this form of constitution make the democracies different by their combinations; for one form of democracy will be accompanied by fewer, another by more, and another by all of them. And it is serviceable to ascertain each of them both for the purpose of instituting whichever of these kinds of democracy one happens to wish and for the purpose of amending existing ones. For people setting up constitutions seek to collect together all the features appropriate to their fundamental principle, but in so doing they make a mistake, as has been said before in the passage dealing with the causes of the destruction and the preservation of constitutions. And now let us state the postulates, the ethical characters and the aims of the various forms of democracy.
Now a fundamental principle of the democratic form of constitution is liberty—that is what is usually asserted, implying that only under this constitution do men participate in liberty,
‘Rule of the few,’ i.e. the few rich, but the name is not exact, for in aristocracy also the rulers are few.
for they assert this as the aim of every democracy. But one factor of liberty is to govern and be governed in turn; for the popular principle of justice is to have equality according to number, not worth, and if this is the principle of justice prevailing, the multitude must of necessity be sovereign and the decision of the majority must be final and must constitute justice, for they say that each of the citizens ought to have an equal share; so that it results that in democracies the poor are more powerful than the rich, because there are more of them and whatever is decided by the majority is sovereign. This then is one mark of liberty which all democrats set down as a principle of the constitution. And one is for a man to live as he likes; for they say that this is the function of liberty, inasmuch as to live not as one likes is the life of a man that is a slave. This is the second principle of democracy, and from it has come the claim not to be governed, preferably not by anybody, or failing that, to govern and be governed in turns; and this is the way in which the second principle contributes to equalitarian liberty.^^[[1|Rackham: Book: 6, Section: 1317b, Note: 1]]^^ And these principles having been laid down and this being the nature of democratic government, the following institutions are democratic in character: election of officials by all from all; government of each by all,and of all by each in turn; election by lot either to all magistracies or to all that do not need experience and skill; no property-qualification for office, or only a very low one; no office to be held twice, or more than a few times, by the same person, or few offices except the military ones; short tenure either of all offices or of as many as possible; judicial functions to be exercised by all citizens, that is by persons selected from all, and on all matters, or on most and the greatest and most important, for instance the audit of official accounts, constitutional questions, private contracts; the assembly to be sovereign over all matters, but no official over any or only over extremely few; or else a council to be sovereign over the most important matters (and a council is the most democratic of magistracies in states where there is not a plentiful supply of pay for everybody—for where there is, they deprive even this office of its power, since the people draws all the trials to itself when it has plenty of pay, as has been said before in the treatise preceding this one^^[[2|Rackham: Book: 6, Section: 1317b, Note: 2]]^^); also payment for public duties, preferably in all branches, assembly, law-courts, magistracies, or if not, for the magistracies, the law-courts, council and sovereign assemblies, or for those magistracies which are bound^^[[3|Rackham: Book: 6, Section: 1317b, Note: 3]]^^ to have common mess tables. Also inasmuch as oligarchy is defined by birth, wealth and education, the popular qualifications are thought to be the opposite of these, low birth, poverty, vulgarity. And in respect of the magistracies it is democratic to have none tenable for life,
This clause is obscure: perhaps it is an interpolation.
Book 4, 1299b 38 ff. (Books 4. and 5. are regarded as forming one treatise).
i.e. owing to the nature of their duties, and by general custom.
and if any life-office has been left after an ancient revolution, at all events to deprive it of its power and to substitute election by lot for election by vote.
These^^[[1|Rackham: Book: 6, Section: 1318a, Note: 1]]^^ then are the features common to democracies. But what is thought to be the extreme form of democracy and of popular government comes about as a result of the principle of justice that is admitted to be democratic, and this is for all to have equality according to number. For it is equality for the poor to have no larger share of power than the rich, and not for the poor alone to be supreme but for all to govern equally; for in this way they would feel that the constitution possessed both equality and liberty. But the question follows, how will they have equality? are the property-assessments of five hundred citizens to be divided among a thousand and the thousand to have equal power to the five hundred^^[[2|Rackham: Book: 6, Section: 1318a, Note: 2]]^^? or is equality on this principle^^[[3|Rackham: Book: 6, Section: 1318a, Note: 3]]^^ not to be arranged in this manner, but the division into classes to be on this system, but then an equal number to be taken from the five hundred and from the thousand and these to control the elections and the law-courts? Is this then the justest form of constitution in accordance with popular justice, or is it rather one that goes by counting heads?^^[[4|Rackham: Book: 6, Section: 1318a, Note: 4]]^^ For democrats say that justice is whatever seems good to the larger number,but advocates of oligarchy think that it is whatever seems good to the owners of the larger amount of property, for they say that the decision ought to go by amount of property. But both views involve inequality and injustice; for if the will of the few is to prevail, this means a tyranny, since if one man owns more than the other rich men,^^[[5|Rackham: Book: 6, Section: 1318a, Note: 5]]^^ according to the oligarchic principle of justice it is just for him to rule alone; whereas if the will of the numerical majority is to prevail, they will do injustice by confiscating the property of the rich minority, as has been said before.^^[[6|Rackham: Book: 6, Section: 1318a, Note: 6]]^^ What form of equality therefore would be one on which both parties will agree must be considered in the light of the principles of justice as defined by both sets. For they say that whatever seems good to the majority of the citizens ought to be sovereign. Let us then accept this principle, yet not wholly without qualification, but inasmuch as fortune has brought into existence two component parts of the state, rich and poor, let any resolution passed by both classes, or by a majority of each, be sovereign, but if the two classes carry opposite resolutions, let the decision of the majority, in the sense of the group whose total property assessment is the larger, prevail: for instance, if there are ten rich citizens and twenty poor ones, and opposite votes have been cast by six of the rich on one side and by fifteen of the less wealthy on the other, four of the rich have sided with the poor and five of the poor with the rich; then the side that has the larger total property when the assessments of both classes on either side are added together carries the voting.^^[[7|Rackham: Book: 6, Section: 1318a, Note: 7]]^^ But if the totals fall out exactly equal, this is to be deemed an impasse common to both sides, as it is at present if the assembly or law-court is exactly divided;
The rest of the chapter is most obscure, and its authenticity is questioned.
i.e. two groups of voters, with equal total wealth and total voting-power, but one group twice as numerous as the other, so that a man in the rich group has two votes and one in the poor group one, the former being on the average twice as rich as the latter.
i.e. ‘equality in proportion to number.’
i.e. apparently, more than the property of all the others put together.
If the rich citizens are on the average twice as wealthy as the poor (1.11), and therefore a rich man has two votes to a poor man's one, when 6 rich and 5 poor vote one way, and 15 poor and 4 rich the other, the division is 17 to 23, and the view of the latter party, which is carried, represents a larger total of wealth but a larger proportion of poor men.
either a decision must be made by casting lots or some other such device must be adopted. But on questions of equality and justice, even though it is very difficult to discover the truth about them, nevertheless it is easier to hit upon it than to persuade people that have the power to get an advantage to agree to it; equality and justice are always sought by the weaker party, but those that have the upper hand pay no attention to them.
There being four kinds of democracy, the best is the one that stands first in structure, as was said in the discourses preceding these^^[[1|Rackham: Book: 6, Section: 1318b, Note: 1]]^^; it is also the oldest of them all, but by first I mean first as it were in a classification of the kinds of common people. The best common people are the agricultural population, so that it is possible to introduce democracy as well as other forms of constitution where the multitude lives by agriculture or by pasturing cattle. For owing to their not having much property they are busy, so that they cannot often meet in the assembly, while owing to their having^^[[2|Rackham: Book: 6, Section: 1318b, Note: 2]]^^ the necessaries of life they pass their time attending to their farm work and do not covet their neighbors' goods, but find more pleasure in working than in taking part in politics and holding office, where the profits to be made from the offices are not large; for the mass of mankind are more covetous of gain than of honor. And this is indicated by the fact that men endured the tyrannies of former times, and endure oligarchies, if a ruler does not prevent them from working orrob them; for then some of them soon get rich and the others free from want. And also, if they have any ambition, to have control over electing magistrates and calling them to account makes up for the lack of office, since in some democracies even if the people have no part in electing the magistrates but these are elected by a special committee selected in turn out of the whole number, as at Mantinea, yet if they have the power of deliberating on policy, the multitude are satisfied. (And this too must be counted as one form of democracy, on the lines on which it once existed at Mantinea.) Indeed it is for this reason that it is advantageous for the form of democracy spoken of before, and is a customary institution in it, for all the citizens to elect the magistrates and call them to account, and to try law-suits, but for the holders of the greatest magistracies to be elected and to have property-qualifications, the higher offices being elected from the higher property-grades, or else for no office to be elected on a property-qualification, but for officials to be chosen on the ground of capacity. And a state governed in this way is bound to be governed well (for the offices will always be administered by the best men with the consent of the people and without their being jealous of the upper classes), and this arrangement is certain to be satisfactory for the upper classes and notables, for they will not be under the government of others inferior to themselves, and they will govern justly because a different class will be in control of the audits—since it is expedient to be in a state of suspense and not to be able to do everything exactly as seems good to one, for liberty to do whatever one likes cannot guard against the evil that is in every man's character.
Cf. 4, 1291b 30-41, 1292b 25-33.
The MSS. give ‘not having,’ but editors do not explain how in that case people would avoid starvation.
Hence there necessarily results the condition of affairs that is the most advantageous in the government of states—for the upper classes to govern without doing wrong, the common people not being deprived of any rights. It is manifest therefore that this is the best of the forms of democracy, and why this is so—namely, because in it the common people are of a certain kind.
For the purpose of making the people an agricultural community, not only were some of the laws that were enacted in many states in early times entirely serviceable, prohibiting the ownership of more than a certain amount of land under any conditions or else of more than a certain amount lying between a certain place and the citadel or city (and in early times at all events in many states there was even legislation prohibiting the sale of the original allotments; and there is a law said to be due to Oxylus^^[[1|Rackham: Book: 6, Section: 1319a, Note: 1]]^^ with some similar provision, forbidding loans secured on a certain portion of a man's existing estate), but at the present day it would also be well to introduce reform by means of the law of the Aphytaeans, as it is serviceable for the purpose of which we are speaking; the citizens of Aphytis^^[[2|Rackham: Book: 6, Section: 1319a, Note: 2]]^^ although numerous and possessing a small territory nevertheless are all engaged in agriculture, for they are assessed not on the whole of their estates, but on divisions of them so small that even the poor can exceed the required minimum in their assessments.^^[[3|Rackham: Book: 6, Section: 1319a, Note: 3]]^^
After the agricultural communitythe best kind of democracy is where the people are herdsmen and get their living from cattle; for this life has many points of resemblance to agriculture, and as regards military duties pastoral people are in a very well trained condition and serviceable in body and capable of living in the open. But almost all the other classes of populace, of which the remaining kinds of democracy are composed, are very inferior to these, for their mode of life is mean, and there is no element of virtue in any of the occupations in which the multitude of artisans and market-people and the wage-earning class take part, and also owing to their loitering about the market-place and the city almost all people of this class find it easy to attend the assembly; whereas the farmers owing to their being scattered over the country do not attend, and have not an equal desire for this opportunity of meeting. And where it also happens that the lie of the land is such that the country is widely separated from the city, it is easy to establish a good democracy and also a good constitutional government, for the multitude is forced to live at a distance on the farms; and so, even if there is a crowd that frequents the market-place, it is best in democracies not to hold assemblies without the multitude scattered over the country.^^[[4|Rackham: Book: 6, Section: 1319a, Note: 4]]^^
It has then been stated how the best and first kind of democracy is to be organized, and it is clear how we ought to organize the other kinds also. For they must diverge in a corresponding order, and at each stage we must admit the next inferior class.
Leader of the Heraclidae in their invasion of the Peloponnese, and afterwards king of Elis.
Aphytis was on the Isthmus of Pallene in Macedonia.
No satisfactory explanation seems to have been suggested of what this means.
i.e. in a largely agricultural democracy, even though there may be a considerable idle population, which would attend frequent assemblies, it is best to hold them infrequently, so as to secure the attendance of the farmers.
The last kind of democracy, because all the population share in the government, it is not within the power of every state to endure, and it is not easy for it to persist if it is not well constituted in its laws and customs (but the things that result in destroying both this state and the other forms of constitution have been nearly all of them spoken of before^^[[1|Rackham: Book: 6, Section: 1319b, Note: 1]]^^). With a view to setting up this kind of democracy and making the people powerful their leaders usually acquire as many supporters as possible and admit to citizenship not only the legitimate children of citizens but also the base-born and those of citizen-birth on one side, I mean those whose father or mother is a citizen; for all this element is specially congenial to a to democracy of this sort. Popular leaders therefore regularly introduce such institutions; they ought however only to go on adding citizens up to the point where the multitude outnumbers the notables and the middle class and not to go beyond that point; for if they exceed it they make the government more disorderly, and also provoke the notables further in the direction of being reluctant to endure the democracy, which actually took place and caused the revolution at Cyrene^^[[2|Rackham: Book: 6, Section: 1319b, Note: 2]]^^; for a small base element is overlooked, but when it grows numerous it is more in evidence.A democracy of this kind will also find useful such institutions as were employed by Cleisthenes^^[[3|Rackham: Book: 6, Section: 1319b, Note: 3]]^^ at Athens when he wished to increase the power of the democracy, and by the party setting up the democracy at Cyrene; different tribes and brotherhoods must be created outnumbering the old ones, and the celebrations of private religious rites must be grouped together into a small number of public celebrations, and every device must be employed to make all the people as much as possible intermingled with one another, and to break up the previously existing groups of associates. Moreover the characteristics of a tyranny also are all thought to be democratic, I mean for instance licence among slaves, which may really be advantageous for the popular party up to a point, and among women and children, and indulgence to live as one likes; a constitution of this sort will have a large number of supporters, as disorderly living is pleasanter to the mass of mankind than sober living.
But it is not the greatest or only task of the legislator or of those who desire to construct a constitution of this kind merely to set it up, but rather to ensure its preservation; for it is not difficult for any form of constitution to last for one or two or three days. We must therefore employ the results obtained in the inquiries that we have made already^^[[4|Rackham: Book: 6, Section: 1319b, Note: 4]]^^ into the causes of the preservation and the destruction of constitutions, and attempt in the light of those results to establish the safety of the state, carefully avoiding the things that cause destruction, and enacting such laws both written and unwritten
In N. Africa. Diodorus (http://www.perseus.tufts.edu/hopper/text?doc=Diod.%2014.34&lang=original) describes a revolution there in 401 B.C., when five hundred of the rich were put to death and others fled, but after a battle a compromise was arranged.
as shall best compass the results preservative of constitutions, and not think that a measure is democratic or oligarchic which will cause the state to be democratically or oligarchically governed in the greatest degree, but which will cause it to be so governed for the longest time. But the demagogues of today to court the favor of the peoples often use the law-courts to bring about confiscations of property. Hence those who are caring for the safety of the constitution must counteract this by enacting that nothing belonging to persons condemned at law shall be confiscated and liable to be carried to the public treasury, but that their property shall be consecrated to the service of religion; for male-factors will be no less on their guard, as they will be punished just the same, while the mob will less often vote guilty against men on trial when it is not going to get anything out of it. Also they must always make the public trials that occur as few as possible, checking those who bring indictments at random by big penalties; for they do not usually indict men of the people but notables, whereas even with this form of constitution it is desirable for all the citizens if possible to be friendly to the state, or failing that, at all events not to think of their rulers as enemies. And inasmuch as the ultimate forms of democracy tend to have large populations and it is difficult for their citizens to sit in the assembly without pay, and this in a state where there do not happen to be revenues is inimical to the notables (for pay has to be obtained from a property-tax and confiscation, and from corruption of the law-courts, which has caused the overthrow of many democracies before now),—where therefore there happen to be no revenues, few meetings of the assembly must be held, and the law-courts must consist of many members but only sit a few days (for this not only contributes to the rich not being in fear of the cost of the system even if the well-off do not take the pay and only the poor do, but also leads to far greater efficiency in the trial of law-suits, for the well-to-do, though not wishing to be away from their private affairs for many days, are willing to leave them for a short time), while where there are revenues men must not do what the popular leaders do now (for they use the surplus for doles, and people no sooner get them than they want the same doles again, because this way of helping the poor is the legendary jar with a hole in it^^[[1|Rackham: Book: 6, Section: 1320a, Note: 1]]^^), but the truly democratic statesman must study how the multitude may be saved from extreme poverty; for this is what causes democracy to be corrupt. Measures must therefore be contrived that may bring about lasting prosperity. And since this is advantageous also for the well-to-do, the proper course is to collect all the proceeds of the revenues into a fund and distribute this in lump sums to the needy, best of all, if one can, in sums large enough for acquiring a small estate, or, failing this, to serve as capital for trade or husbandry,
The fifty daughters of Danaus were married to their cousins, and all but one murdered their husbands on the bridal night, and were punished in Hades by having to pour water into the jar described.
and if this is not possible for all, at all events to distribute the money by tribes or some other division of the population in turn, while in the meantime the well-to-do must contribute pay for attendance at the necessary assemblies, being themselves excused from useless public services. By following some such policy as this the Carthaginians have won the friendship of the common people; for they constantly send out some of the people to the surrounding territories and so make them well-off. And if the notables are men of good feeling and sense they may also divide the needy among them in groups and supply them with capital to start them in businesses. It is also a good plan to imitate the policy^^[[1|Rackham: Book: 6, Section: 1320b, Note: 1]]^^ of the Tarentines. They get the goodwill of the multitude by making property communal for the purpose of use by the needy^^[[2|Rackham: Book: 6, Section: 1320b, Note: 2]]^^; also they have divided the whole number of their magistracies into two classes, one elected by vote and the other filled by lot,—the latter to ensure that the people may have a share in them, and the former to improve the conduct of public affairs. And it is also possible to effect this by dividing the holders of the same magistracy into two groups, one appointed by lot and the other by vote.
We have then said how democracies should be organized.
It is also fairly clear from these considerations how oligarchies ought to be organized. We must infer them from their opposites, reasoning out each form of oligarchywith reference to the form of democracy opposite to it, starting with the most well-blended and first form of oligarchy^^[[3|Rackham: Book: 6, Section: 1320b, Note: 3]]^^—and this is the one near to what is called a constitutional government, and for it the property-qualifications must be divided into one group of smaller properties and another of larger ones, smaller properties qualifying their owners for the indispensable offices and larger ones for the more important; and a person owning the qualifying property must be allowed to take a share in the government,—introducing by the assessment a large enough number of the common people to secure that with them the governing class will have a majority over those excluded; and persons to share in the government must constantly be brought in from the better class of the common people. And the next form of oligarchy also must be constructed in a similar way with a slight tightening up of the qualification. But the form of oligarchy that stands opposite to the last form of democracy, the most autocratic and tyrannical of the oligarchies, in as far as it is the worst requires a correspondingly great amount of safe-guarding. For just as human bodies in a good state of health and ships well equipped with their crews for a voyage admit of more mistakes without being destroyed thereby, but bodies of a morbid habit and vessels strained in their timbers and manned with bad crews cannot endure even the smallest mistakes, so also the worst constitutions need the most safe-guarding.
This seems to mean that the land was in private ownership, but that there was some system of poor-relief, to provide for the destitute out of the produce.
In contrast with the first and best form of democracy, 2 init.
Democracies therefore generally speaking are kept safe by the largeness of the citizen-body, for this is the antithesis of justice according to desert; but oligarchy on the contrary must manifestly obtain its security by means of good organization.
And since the mass of the population falls principally into four divisions, the farming class, artisans, retail traders and hired laborers, and military forces are of four classes, cavalry, heavy infantry, light infantry and marines, in places where the country happens to be suitable for horsemanship, there natural conditions favor the establishment of an oligarchy that will be powerful (for the security of the inhabitants depends on the strength of this element, and keeping studs of horses is the pursuit of those who own extensive estates); and where the ground is suitable for heavy infantry, conditions favor the next form of oligarchy (for heavy infantry is a service for the well-to-do rather than the poor); but light infantry and naval forces are an entirely democratic element. As things are therefore, where there is a large multitude of this class, when party strife occurs the oligarchs often get the worst of the struggle; and a remedy for this must be adopted from military commanders, who combine with their cavalry and heavy infantry forces a contingent of light infantry. And this is the way^^[[1|Rackham: Book: 6, Section: 1321a, Note: 1]]^^ in which the common people get the better over the well-to-do in outbreaks of party strife:being unencumbered they fight easily against cavalry and heavy infantry. Therefore to establish this force out of this class is to establish it against itself, but the right plan is for the men of military age to be separated into a division of older and one of younger men, and to have their own sons while still young trained in the exercises of light and unarmed troops, and for youths selected from among the boys to be themselves trained in active operations. And the bestowal of a share in the government upon the multitude should either go on the lines stated before,^^[[2|Rackham: Book: 6, Section: 1321a, Note: 2]]^^ and be made to those who acquire the property-qualification, or as at Thebes, to people after they have abstained for a time from mechanic industries, or as at Marseilles, by making a selection among members of the governing classes and those outside it of persons who deserve^^[[3|Rackham: Book: 6, Section: 1321a, Note: 3]]^^ inclusion. And furthermore the most supreme offices also, which must be retained by those within the constitution, must have expensive duties attached to them, in order that the common people may be willing to be excluded from them, and may feel no resentment against the ruling class, because it pays a high price for office. And it fits in with this that they should offer splendid sacrifices and build up some public monument on entering upon office, so that the common people sharing in the festivities and seeing the city decorated both with votive offerings and with building may be glad to see the constitution enduring; and an additional result will be that the notables will have memorials of their outlay. But at present the members of oligarchies do not adopt this course but the opposite, for they seek the gains of office just as much as the honor; hence these oligarchies are well described as miniature democracies.^^[[4|Rackham: Book: 6, Section: 1321a, Note: 4]]^^
i.e. by superior mobility.
If the text is corrected it seems to mean that the list was revised from time to time and some old names taken off and new ones put on.
The phrase suggests that in democracy public duties are cheifly undertaken for their emoluments.
Let this then be a description of the proper way to organize the various forms of democracy and of oligarchy.
As a consequence of what has been said there follow satisfactory conclusions to the questions concerning magistracies—how many and what they should be and to whom they should belong, as has also been said before.^^[[1|Rackham: Book: 6, Section: 1321b, Note: 1]]^^ For without the indispensable^^[[2|Rackham: Book: 6, Section: 1321b, Note: 2]]^^ magistracies a state cannot exist, while without those that contribute to good order and seemliness it cannot be well governed. And furthermore the magistracies are bound to be fewer in the small states and more numerous in the large ones, as in fact has been said before^^[[3|Rackham: Book: 6, Section: 1321b, Note: 3]]^^; it must therefore be kept in view what kinds of magistracies it is desirable to combine and what kinds to keep separate. First among the indispensable services is the superintendence of the market, over which there must be an official to superintend contracts and good order; since it is a necessity for almost all states that people shall sell some things and buy others according to one another's necessary requirements, and this is the readiest means of securing self-sufficiency, which seems to be the reason for men's having united into a single state. Another superintendency connected very closely with this one is the curatorship of public and private properties in the city,to secure good order and the preservation and rectification of falling buildings and roads, and of the bounds between different persons' estates, so that disputes may not arise about them, and all the other duties of superintendence similar to these. An office of this nature is in most states entitled that of City-controller, but it has several departments, each of which is filled by separate officials in the states with larger populations, for instance Curators of Walls, Superintendents of Wells, Harbors-guardians. And another office also is indispensable and closely akin to these, for it controls the same matters but deals with the country and there regions outside the city; and these magistrates are called in some places Land-controllers and in others Custodians of Forests. These then are three departments of control over these matters, while another office is that to which the revenues of the public funds are paid in, the officials who guard them and by whom they are divided out to the several administrative departments; these magistrates are called Receivers and Stewards. Another magistracy is the one that has to receive a written return of private contracts and of the verdicts of the law-courts; and with these same officials the registration of legal proceedings and their institution have also to take place. In some states this office also is divided into several, but there are places where one magistracy controls all these matters; and these officials are called Sacred Recorders, Superintendents, Recorders, and other names akin to these. And after these is the office connected with it but perhaps the most indispensable and most difficult of all, the one concerned with the execution of judgement upon persons cast in suits and those posted as defaulters according to the lists,
Book 4 ,1297b 35 ff., 1299a 3 ff.
and with the custody of prisoners. This is an irksome office because it involves great unpopularity, so that where it is not possible to make a great deal of profit out of it men will not undertake it, or when they have undertaken it are reluctant to carry out its functions according to the laws; but it is necessary, because there is no use in trials being held about men's rights when the verdicts are not put into execution, so that if when no legal trial of disputes takes place social intercourse is impossible, so also is it when judgements are not executed. Hence it is better for this magistracy not to be a single office but to consist of several persons drawn from different courts, and it is desirable similarly to try to divide up the functions connected with the posting up of people registered as public debtors, and further also in some cases for the sentences to be executed by magistrates, especially by the newly elected ones preferably in suits tried by the outgoing ones, and in those tried by men actually in office for the magistrate executing the sentence to be different from the one that passed it, for instance the City-controllers to execute the judgements passed on from the Market-controllers and other magistrates those passed on by the City-controllers. For the less odium involved for those who execute the judgements, the more adequately the judgements will be carried out; so for the same magistrates to have imposed the sentence and to execute it involves a twofold odium, and for the same ones to execute it in all cases makes them the enemies of everybody. And in many places also the office of keeping custody of prisoners, for example at Athens the office of the magistrates known as the Eleven^^[[1|Rackham: Book: 6, Section: 1322a, Note: 1]]^^,is separate from the magistracy that executes sentences. It is better therefore to keep this also separate, and to attempt the same device with regard to this as well. For though it is no less necessary than the office of which I spoke, yet in practice respectable people avoid it most of all offices, while it is not safe to put it into the hands of the base, for they themselves need others to guard them instead of being able to keep guard over others. Hence there must not be one magistracy specially assigned to the custody of prisoners nor must the same magistracy perform this duty continuously, but it should be performed by the young, in places where there is a regiment of cadets^^[[2|Rackham: Book: 6, Section: 1322a, Note: 2]]^^ or guards, and by the magistrates, in successive sections.
These magistracies therefore must be counted first as supremely necessary, and next to them must be put those that are not less necessary but are ranked on a higher grade of dignity, because they require much experience and trustworthiness; in this class would come the magistracies concerned with guarding the city and those assigned to military requirements. And both in peace and in war it is equally necessary for there to be magistrates to superintend the guarding of gates and walls and the inspection and drill of the citizen troops. In some places therefore there are more magistracies assigned to all these duties, and in others fewer—for instance in the small states there is one to deal with all of them. And the officers of this sort are entitled Generals or War-lords.
This example looks like a mistaken note interpolated in the text. The Eleven had both functions.
At Athens and elsewhere young citizens from eighteen to twenty were enrolled in training corps for military instruction; these served as police and home troops.
And moreover if there are also cavalry or light infantry or archers or a navy, sometimes a magistracy is appointed to have charge of each of these arms also, and they carry the titles of Admiral, Cavalry-commander and Taxiarch, and also the divisional commissions subordinate to these of Captains of Triremes, Company-commanders and Captains of Tribes, and all the subdivisions of these commands. But the whole of this sort of officers constituted a single class, that of military command. This then is how the matter stands in regard to this office; but inasmuch as some of the magistracies, if not all, handle large sums of public money, there must be another office to receive an account and subject it to audit, which must itself handle no other business; and these officials are called Auditors by some people, Accountants by others, Examiners by others and Advocates by others. And by the side of all these offices is the one that is most supreme over all matters, for often the same magistracy has the execution of business that controls its introduction, or presides over the general assembly in places where the people are supreme; for the magistracy that convenes the sovereign assembly is bound to be the sovereign power in the state. It is styled in some places the Preliminary Council because it considers business in advance, but where there is a democracy^^[[1|Rackham: Book: 6, Section: 1322b, Note: 1]]^^ it is more usually called a Council. This more or less completes the number of the offices of a political nature; but another kind of superintendence is that concerned with divine worship; in this class are priests and superintendents of mattersconnected with the temples, the preservation of existing buildings and the restoration of those that are ruinous, and the other duties relating to the gods. In practice this superintendence in some places forms a single office, for instance in the small cities, but in others it belongs to a number of officials who are not members of the priesthood, for example Sacrificial Officers and Temple-guardians and Stewards of Sacred Funds. And connected with this is the office devoted to the management of all the public festivals which the law does not assign to the priests but the officials in charge of which derive their honor from the common sacrificial hearth, and these officials are called in some places Archons, in others Kings and in others Presidents. To sum up therefore, the necessary offices of superintendence deal with the following matters : institutions of religion, military institutions, revenue and expenditure, control of the market, citadel, harbors and country, also the arrangements of the law-courts, registration of contracts, collection of fines, custody of prisoners, supervision of accounts and inspections, and the auditing of officials, and lastly the offices connected with the body that deliberates about public affairs. On the other hand, peculiar to the states that have more leisure and prosperity, and also pay attention to public decorum, are the offices of Superintendent of Women, Guardian of the Laws, Superintendent of Children, Controller of Physical Training,
Cf. 1323a 9 below. Apparently πλῆθός ἐστι stands for τὸ πλῆθος κύριόν ἐστι, but editors quote no parallel.
and in addition to these the superintendence of athletic and Dionysiac contests and of any similar displays that happen to be held. Some of these offices are obviously not of a popular character, for instance that of Superintendent of Women and of Children; for the poor having no slaves are forced to employ their women and children as servants. There are three offices which in some states supervise the election of the chief magistrates—Guardians of the Laws, Preliminary Councillors and Council; of these the Guardians of the Laws are an aristocratic institution, the Preliminary Councillors oligarchic, and a Council democratic.
We have now therefore spoken in outline about almost all the offices of state.
---
!!![[Section: 1323a|Rackham: Book: 7, Section: 1323a]]
{{Rackham: Book: 7, Section: 1323a}}
---
!!![[Section: 1323b|Rackham: Book: 7, Section: 1323b]]
{{Rackham: Book: 7, Section: 1323b}}
---
!!![[Section: 1324a|Rackham: Book: 7, Section: 1324a]]
{{Rackham: Book: 7, Section: 1324a}}
---
!!![[Section: 1324b|Rackham: Book: 7, Section: 1324b]]
{{Rackham: Book: 7, Section: 1324b}}
---
!!![[Section: 1325a|Rackham: Book: 7, Section: 1325a]]
{{Rackham: Book: 7, Section: 1325a}}
---
!!![[Section: 1325b|Rackham: Book: 7, Section: 1325b]]
{{Rackham: Book: 7, Section: 1325b}}
---
!!![[Section: 1326a|Rackham: Book: 7, Section: 1326a]]
{{Rackham: Book: 7, Section: 1326a}}
---
!!![[Section: 1326b|Rackham: Book: 7, Section: 1326b]]
{{Rackham: Book: 7, Section: 1326b}}
---
!!![[Section: 1327a|Rackham: Book: 7, Section: 1327a]]
{{Rackham: Book: 7, Section: 1327a}}
---
!!![[Section: 1327b|Rackham: Book: 7, Section: 1327b]]
{{Rackham: Book: 7, Section: 1327b}}
---
!!![[Section: 1328a|Rackham: Book: 7, Section: 1328a]]
{{Rackham: Book: 7, Section: 1328a}}
---
!!![[Section: 1328b|Rackham: Book: 7, Section: 1328b]]
{{Rackham: Book: 7, Section: 1328b}}
---
!!![[Section: 1329a|Rackham: Book: 7, Section: 1329a]]
{{Rackham: Book: 7, Section: 1329a}}
---
!!![[Section: 1329b|Rackham: Book: 7, Section: 1329b]]
{{Rackham: Book: 7, Section: 1329b}}
---
!!![[Section: 1330a|Rackham: Book: 7, Section: 1330a]]
{{Rackham: Book: 7, Section: 1330a}}
---
!!![[Section: 1330b|Rackham: Book: 7, Section: 1330b]]
{{Rackham: Book: 7, Section: 1330b}}
---
!!![[Section: 1331a|Rackham: Book: 7, Section: 1331a]]
{{Rackham: Book: 7, Section: 1331a}}
---
!!![[Section: 1331b|Rackham: Book: 7, Section: 1331b]]
{{Rackham: Book: 7, Section: 1331b}}
---
!!![[Section: 1332a|Rackham: Book: 7, Section: 1332a]]
{{Rackham: Book: 7, Section: 1332a}}
---
!!![[Section: 1332b|Rackham: Book: 7, Section: 1332b]]
{{Rackham: Book: 7, Section: 1332b}}
---
!!![[Section: 1333a|Rackham: Book: 7, Section: 1333a]]
{{Rackham: Book: 7, Section: 1333a}}
---
!!![[Section: 1333b|Rackham: Book: 7, Section: 1333b]]
{{Rackham: Book: 7, Section: 1333b}}
---
!!![[Section: 1334a|Rackham: Book: 7, Section: 1334a]]
{{Rackham: Book: 7, Section: 1334a}}
---
!!![[Section: 1334b|Rackham: Book: 7, Section: 1334b]]
{{Rackham: Book: 7, Section: 1334b}}
---
!!![[Section: 1335a|Rackham: Book: 7, Section: 1335a]]
{{Rackham: Book: 7, Section: 1335a}}
---
!!![[Section: 1335b|Rackham: Book: 7, Section: 1335b]]
{{Rackham: Book: 7, Section: 1335b}}
---
!!![[Section: 1336a|Rackham: Book: 7, Section: 1336a]]
{{Rackham: Book: 7, Section: 1336a}}
---
!!![[Section: 1336b|Rackham: Book: 7, Section: 1336b]]
{{Rackham: Book: 7, Section: 1336b}}
---
!!![[Section: 1337a|Rackham: Book: 7, Section: 1337a]]
{{Rackham: Book: 7, Section: 1337a}}
^^[[1|Rackham: Book: 7, Section: 1323a, Note: 1]]^^The student who is going to make a suitable investigation of the best form of constitution must necessarily decide first of all what is the most desirable mode of life. For while this is uncertain it is also bound to be uncertain what is the best constitution, since it is to be expected that the people that have the best form of government available under their given conditions will fare the best, exceptional circumstances apart. Hence we must firstagree what life is most desirable for almost all men, and after that whether the same life is most desirable both for the community and for the individual, or a different one. Believing therefore in the adequacy of much of what is said even in extraneous discourses^^[[2|Rackham: Book: 7, Section: 1323a, Note: 2]]^^ on the subject of the best life, let us make use of these pronouncements now. For as regards at all events one classification of things good, putting them in three groups, external goods, goods of the soul and goods of the body, assuredly nobody would deny that the ideally happy are bound to possess all three. For nobody would call a man ideally happy that has not got a particle of courage nor of temperance nor of justice nor of wisdom, but is afraid of the flies that flutter by him, cannot refrain from any of the most outrageous actions in order to gratify a desire to eat or to drink, ruins his dearest friends for the sake of a farthing, and similarly in matters of the intellect also is as senseless and mistaken as any child or lunatic. But although these are propositions which when uttered everybody would agree to, yet men differ about amount and degrees of value. They think it is enough to possess however small a quantity of virtue, but of wealth, riches, power, glory and everything of that kind they seek a larger and larger amount without limit. We on the other hand shall tell them that it is easy to arrive at conviction on these matters in the light of the actual facts, when one sees that men do not acquire and preserve the virtues by means of these external goods, but external goods by means of the virtues,
Cf. 3.6. It is debated whether the phrase refers to Aristotle's own popular writings, or to those of other philosophers, or to discussions of the subject in ordinary intercourse.
and that whether the life of happiness consists for man in enjoyment or in virtue or in both, it is found in larger measure with those who are of surpassingly high cultivation in character and intellect but only moderate as regards the external acquisition of goods, than with those who own more than they can use of the latter but are deficient in the former. Not but what the truth is also easily seen if we consider the matter in the light of reason. For external goods have a limit, as has any instrument (and everything useful is useful for something), so an excessive amount of them must necessarily do harm, or do no good, to its possessor; whereas with any of the goods of the soul, the more abundant it is, the more useful it must be—if even to goods of the soul not only the term ‘noble’ but also the term ‘useful’ can be properly applied. And broadly, it is clear that we shall declare that the best condition of each particular thing, comparing things with one another, corresponds in point of superiority to the distance that subsists between the things of which we declare these conditions themselves to be conditions.^^[[1|Rackham: Book: 7, Section: 1323b, Note: 1]]^^ Hence inasmuch as our soul is a more valuable thing both absolutely and relatively to ourselves than either our property or our body, the best conditions of these things must necessarily stand in the same relation to one another as the things themselves do. Moreover it is for the sake of the soul that these goods are in their nature desirable, and that all wise men mustchoose them, not the soul for the sake of those other things. Let us then take it as agreed between us that to each man there falls just so large a measure of happiness as he achieves of virtue and wisdom and of virtuous and wise action: in evidence of this we have the case of God, who is happy and blessed, but is so on account of no external goods, but on account of himself, and by being of a certain quality in his nature; since it is also for this reason that prosperity is necessarily different from happiness—for the cause of goods external to the soul is the spontaneous and fortune,^^[[2|Rackham: Book: 7, Section: 1323b, Note: 2]]^^ but nobody is just or temperate as a result of or owing to the action of fortune. And connected is a truth requiring the same arguments to prove it, that it is also the best state, and the one that does well,^^[[3|Rackham: Book: 7, Section: 1323b, Note: 3]]^^ that is happy. But to do well is impossible save for those who do good actions, and there is no good action either of a man or of a state without virtue and wisdom; and courage, justice and wisdom belonging to a state have the same meaning and form as have those virtues whose possession bestows the titles of just and wise and temperate on an individual human being.
These remarks however must suffice by way of preface to our discourse: for neither is it possible to abstain from touching on these subjects altogether, nor is it feasible to follow out all the arguments that are germane to them, for that is the business of another course of study. For the present let us take it as established that the best life, whether separately for an individual or collectively for states,
e.g. the finest man excels the finest monkey to the degree in which the species man excels the species monkey.
Aristotle taught that some events are the result of the undesigned interaction of two lines of causation in nature's design; he denoted this (1) in general, by ‘the automatic’ or self-acting (represented in Latin by ''sponte'', spontaneous), (2) as concerning man, by ‘fortune.’
The common play on the ambiguity of ‘do well,’ meaning either ‘prosper’ or ‘act rightly.’
is the life conjoined with virtue furnished with sufficient means for taking part in virtuous actions^^[[1|Rackham: Book: 7, Section: 1324a, Note: 1]]^^; while objections to this position we must pass over in the course of the present inquiry, and reserve them for future consideration, if anyone be found to disagree with what has been said.
On the other hand it remains to say whether the happiness of a state is to be pronounced the same as that of each individual man, or whether it is different. Here too the answer is clear: everybody would agree that it is the same; for all those who base the good life upon wealth in the case of the individual, also assign felicity to the state as a whole if it is wealthy; and all who value the life of the tyrant highest, would also say that the state which rules the widest empire is the happiest; and if any body accepts the individual as happy on account of virtue, he will also say that the state which is the better morally is the happier. But there now arise these two questions that require consideration: first, which mode of life is the more desirable, the life of active citizenship and participation in politics, or rather the life of an alien and that of detachment from the political partnership; next, what constitution and what organization of a state is to be deemed the best,—either on the assumption that to take an active part in the state is desirable for everybody, or that it is undesirable for some men although desirable for most. But as it isthe latter question that is the business of political study and speculation, and not the question of what is desirable for the individual, and as it is the investigation of politics that we have now taken up, the former question would be a side issue, and the latter is the business of political inquiry.
Now it is clear that the best constitution is the system under which anybody whatsoever would be best off and would live in felicity; but the question is raised even on the part of those who agree that the life accompanied by virtue is the most desirable, whether the life of citizenship and activity is desirable or rather a life released from all external affairs, for example some form of contemplative life, which is said by some to be the only life that is philosophic.^^[[2|Rackham: Book: 7, Section: 1324a, Note: 2]]^^ For it is manifest that these are the two modes of life principally chosen by the men most ambitious of excelling in virtue, both in past times and at the present day—I mean the life of politics and the life of philosophy. And it makes no little difference which way the truth lies; for assuredly the wise are bound to arrange their affairs in the direction of the better goal—and this applies to the state collectively as well as to the individual human being. Some persons think that empire over one's neighbors, if despotically exercised, involves a definite injustice of the greatest kind, and if constitutionally, although it carries no injustice, yet is a hindrance to the ruler's own well-being; but others hold almost the opposite view to these—they think that the life of action and citizenship is the only life fit for a man, since with each of the virtues its exercise in actions is just as possible for men engaged in public affairs and in politics as for those who live a private life.
http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201099a&lang=original, http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201179a&lang=original
Perhaps the Greek should be altered to give ‘which alone is said to be desirable by some philosophers.’
Some people then hold the former view, while others declare that the despotic and tyrannical form of constitution alone achieves happiness; and in some states it is also the distinctive aim of the constitution and the laws to enable them to exercise despotic rule over their neighbors. Hence even though with most peoples most of the legal ordinances have been laid down virtually at random, nevertheless if there are places where the laws aim at one definite object, that object is in all cases power, as in Sparta and Crete both the system of education and the mass of the laws are framed in the main with a view to war; and also among all the non-Hellenic nations that are strong enough to expand at the expense of others, military strength has been held in honor, for example, among the Scythians, Persians, Thracians and Celts. Indeed among some peoples there are even certain laws stimulating military valor; for instance at Carthage, we are told, warriors receive the decoration of armlets of the same number as the campaigns on which they have served; and at one time there was also a law in Macedonia that a man who had never killed an enemy must wear his halter instead of a belt. Among Scythian tribes at a certain festival a cup was carried round from which a man that had not killed an enemy was not allowed to drink. Among the Iberians, a warlike race, they fix small spits^^[[1|Rackham: Book: 7, Section: 1324b, Note: 1]]^^in the earth round a man's grave corresponding in number to the enemies he has killed. So with other races there are many other practices of a similar kind, some established by law and others by custom.
Nevertheless those who wish to examine the matter closely might perhaps think it exceedingly strange that it should be the business of a statesman to be able to devise means of holding empire and mastery over the neighboring peoples whether they desire it or not. How can that be worthy of a statesman or lawgiver which is not even lawful? and government is not lawful when it is carried on not only justly but also unjustly—and superior strength may be unjustly exercised. Moreover we do not see this in the other sciences either: it is no part of a physician's or ship-captain's business to use either persuasion or compulsion upon the patients in the one case and the crew^^[[2|Rackham: Book: 7, Section: 1324b, Note: 2]]^^ in the other. Yet most peoples seem to think that despotic rule is statesmanship, and are not ashamed to practise towards others treatment which they declare to be unjust and detrimental for themselves; for in their own internal affairs they demand just government, yet in their relations with other peoples they pay no attention to justice. Yet it is strange if there is not a natural distinction between peoples suited to be despotically ruled and those not suited; so that if this is so, it is not proper to attempt to exercise despotic government over all people, but only over those suited for it, just as it is not right to hunt human beings for food or sacrifice, but only the game suitable for this purpose, that is, such wild creatures as are good to eat. And moreover it is possible even for a single state in isolation to be happy,
Or perhaps ‘pointed stones.’
Or perhaps ‘the passengers.’
that is one that is well governed, in as much as it is conceivable that a state might be carried on somewhere in isolation, enjoying good laws, and in such a state the system of the constitution will not be framed for the purpose of war or of overpowering its enemies—for we are to suppose everything to do with war to be excluded. It is evident therefore that while all military pursuits are to be deemed honorable, they are not so as being the ultimate end of all things but as means to that end. And it is the business of the good lawgiver to study how a state, a race of men or any other community is to partake of the good life and the happiness possible for them. Some however of the regulations laid down will vary; and in case there exist any neighbor peoples, it is the business of the legislative art to consider what sort of exercises should be practised in relation to what sort of neighbors or how the state is to adopt the regulations that are suitable in relation to each.
But this question of the proper end for the best constitutions to aim at may receive its due consideration later.^^[[1|Rackham: Book: 7, Section: 1325a, Note: 1]]^^
We turn to those who, while agreeing that the life of virtue is the most desirable, differ about the way in which that life should be pursued. Some disapprove of holding office in the state, thinking that the life of the free manis different from the life of politics and is the most desirable of any; whereas others think the political life the best life, for they argue that it is impossible for the man who does nothing to do well, and doing well and happiness are the same thing.^^[[2|Rackham: Book: 7, Section: 1325a, Note: 2]]^^ To these two parties we must reply that both are partly right and partly wrong. The former are right in saying that the life of the free man is better than the life of mastership, for this is true—there is nothing specially dignified in employing a slave, as a slave, for giving orders about menial duties has in it nothing of nobility; yet to think that all government is exercising the authority of a master is a mistake, for there is as wide a difference between ruling free men and ruling slaves as there is between the natural freeman and the natural slave themselves. But these things have been adequately decided in the first discourses.^^[[3|Rackham: Book: 7, Section: 1325a, Note: 3]]^^ But to praise inaction more highly than action is an error, for happiness is an activity, and further the actions of the just and temperate have in them the realization of much that is noble. Yet on the strength of these decisions somebody might perhaps suppose that the highest good is to be the master of the world, since thus one would have the power to compass the greatest number and the noblest kind of actions, and therefore it is not the duty of the man that is capable of ruling to surrender office to his neighbor, but rather to take it from him, and no account must be taken by father of sons nor by sons of father nor in general by one friend of another, and no heed must be paid to them in comparison with this; for the best thing is the most to be desired, and to do well is the best thing. Now this statement is perhaps true
On the ambiguous use of ‘do well’ see 1323b 32 n.
if it is the case that the most desirable of existing things will belong to men that use robbery and violence. But perhaps it cannot belong to them, and this is a false assumption. For a man's acts can no longer be noble if he does not excel as greatly as a man excels a woman or a father his children or a master his slaves, so that one who transgresses cannot afterwards achieve anything sufficient to rectify the lapse from virtue that he had already committed; because for equals the noble and just consists in their taking turns, since this is equal and alike, but for those that are equal to have an unequal share and those that are alike an unlike share is contrary to nature, and nothing contrary to nature is noble. Hence in case there is another person who is our superior in virtue and in practical capacity for the highest functions, him it is noble to follow and him it is just to obey; though he must possess not only virtue but also capacity that will render him capable of action. But if these things are well said, and if happiness is to be defined as well-doing, the active life is the best life both for the whole state collectively and for each man individually. But the active life is not necessarily active in relation to other men, as some people think, nor are only those processes of thought active that are pursued for the sake of the objects that result from action, but far morethose speculations and thoughts that have their end in themselves and are pursued for their own sake; for the end is to do well, and therefore is a certain form of action.^^[[1|Rackham: Book: 7, Section: 1325b, Note: 1]]^^ And even with actions done in relation to external objects we predicate action in the full sense chiefly of the master-craftsmen who direct the action by their thoughts. Moreover with cities also, those that occupy an isolated situation and pursue a policy of isolation are not necessarily inactive; for state activities also can be sectional, since the sections of the state have many common relations with one another. And this is also possible similarly in the case of any individual human being; for otherwise God and the whole universe could hardly be well circumstanced, since they have no external activities by the side of their own private activities.
It is therefore manifest that the same life must be the best both for each human being individually and for states and mankind collectively.
And as we have prepared the way by this prefatory discussion of the subject, and have previously studied all the other forms of constitution,^^[[2|Rackham: Book: 7, Section: 1325b, Note: 2]]^^ the starting-point for the remainder of our subject is first to specify the nature of the conditions that are necessary in the case of the state that is to be constituted in the ideally best manner. For the best constitution cannot be realized without suitable equipment.^^[[3|Rackham: Book: 7, Section: 1325b, Note: 3]]^^ We must therefore posit as granted in advance a number of as it were ideal conditions, although none of these must be actually impossible. I mean for instance in reference to number of citizens and territory. All other craftsmen, for example a weaver or a shipwright,
Cf. 1323b 32 n., 1325a 21.
This seems to refer to Books 4-6.
have to be supplied with their material in a condition suitable for their trade, for the better this material has been prepared, the finer is bound to be the product of their craft; so also the statesman and the lawgiver ought to be furnished with their proper material in a suitable condition. Under the head of material equipment for the state there first come the questions as to a supply of population—what precisely ought to be its number and what its natural character? and similarly in regard to the territory, what is to be its particular size and nature? Most people imagine that the prosperous state must be a great state; but granted the truth of this, they fail to realize in what quality the greatness or smallness of a state consists: they judge a great state by the numerical magnitude of the population, but really the more proper thing to look at is not numbers but efficiency. For a state like other things has a certain function to perform, so that it is the state most capable of performing this function that is to be deemed the greatest, just as one would pronounce Hippocrates to be greater, not as a human being but as a physician, than somebody who surpassed him in bodily size. All the same, even if it be right to judge the state by the test of its multitude, this ought not to be done with regard to the multitude of any and every class (for states are doubtless bound to contain a large number of slavesand resident aliens and foreigners), but the test should be the number of those who are a part of the state—the special parts of which a state consists. It is superiority in the number of these that indicates a great state; a state that sends forth to war a large number of the baser sort and a small number of heavy-armed soldiers cannot possibly be a great state—for a great state is not the same thing as a state with a large population. But certainly experience also shows that it is difficult and perhaps impossible for a state with too large a population to have good legal government. At all events we see that none of the states reputed to be well governed is without some restriction in regard to numbers. The evidence of theory proves the same point. Law is a form of order, and good law must necessarily mean good order; but an excessively large number cannot participate in order: to give it order would surely be a task for divine power, which holds even this universe together.^^[[1|Rackham: Book: 7, Section: 1326a, Note: 1]]^^ Hence that state also must necessarily be the most beautiful with whose magnitude is combined the above-mentioned limiting principle; for certainly beauty is usually found in number and magnitude, but there is a due measure of magnitude for a city-state as there also is for all other things—animals, plants, tools; each of these if too small or excessively large will not possess its own proper efficiency, but in some cases will have entirely lost its true nature and in others will be in a defective condition: for instance, a ship a span long will not be a ship at all, nor will a ship a quarter of a mile long, and even when it reaches a certain size,
In the MSS. this clause follows the next.
in some cases smallness and in others excessive largeness will make it sail badly. Similarly a state consisting of too few people will not be self-sufficing (which is an essential quality of a state), and one consisting of too many, though self-sufficing in the mere necessaries, will be so in the way in which a nation^^[[1|Rackham: Book: 7, Section: 1326b, Note: 1]]^^ is, and not as a state, since it will not be easy for it to possess constitutional government—for who will command its over-swollen multitude in war? or who will serve as its herald, unless he have the lungs of a Stentor? It follows that the lowest limit for the existence of a state is when it consists of a population that reaches the minimum number that is self-sufficient for the purpose of living the good life after the manner of a political community. It is possible also for one that exceeds this one in number to be a greater state, but, as we said, this possibility of increase is not without limit, and what the limit of the state's expansion is can easily be seen from practical considerations. The activities of the state are those of the rulers and those of the persons ruled, and the work of a ruler is to direct the administration and to judge law-suits; but in order to decide questions of justice and in order to distribute the offices according to merit it is necessary for the citizens to know each other's personal characters, since where this does not happen to be the case the business of electing officials and trying law-suits is bound to go badly; haphazard decision is unjust in both matters, and thismust obviously prevail in an excessively numerous community. Also in such a community it is easy for foreigners and resident aliens to usurp the rights of citizenship, for the excessive number of the population makes it not difficult to escape detection. It is clear therefore that the best limiting principle for a state is the largest expansion of the population, with a view to self-sufficiency that can well be taken in at one view.
Such may be our conclusion on the question of the size of the state.
Very much the same holds good about its territory. As to the question what particular kind of land it ought to have, it is clear that everybody would command that which is most self-sufficing (and such is necessarily that which bears every sort of produce, for self-sufficiency means having a supply of everything and lacking nothing). In extent and magnitude the land ought to be of a size that will enable the inhabitants to live a life of liberal and at the same time temperate leisure. Whether this limiting principle is rightly or wrongly stated must be considered more precisely later on,^^[[2|Rackham: Book: 7, Section: 1326b, Note: 2]]^^ when we come to raise the general subject of property and the ownership of wealth,—how and in what way it ought to be related to the employment of wealth^^[[3|Rackham: Book: 7, Section: 1326b, Note: 3]]^^; about this question there are many controversies, owing to those that draw us towards either extreme of life, the one school towards parsimony and the other towards luxury. The proper configuration of the country it is not difficult to state (though there are some points on which the advice of military experts also must be taken): on the one hand it should be difficult for enemies to invade and easy for the people themselves to march out from,
i.e. presumably an Ethnos in the usual sense, a community composed of villages loosely bound together by relationship and trade, and united for defence, but not for political life; not an Ethnos of associated cities.
This promise is not fulfilled in the work as it has come down to us.
The distinction seems to be between owning (or perhaps getting) wealth and using it; but a probable emendation of the Greek gives ‘how we ought to stand in relation to its employment.’
and in addition, on the other hand, the same thing holds good of the territory that we said about the size of the population—it must be well able to be taken in at one view, and that means being a country easy for military defence. As to the site of the city, if it is to be ideally placed, it is proper for it to be well situated with regard both to the sea and to the country. One defining principle is that mentioned above^^[[1|Rackham: Book: 7, Section: 1327a, Note: 1]]^^—the city must be in communication with all parts of the territory for the purpose of sending out military assistance; and the remaining principle is that it must be easily accessible for the conveyance to it of the agricultural produce, and also of timber-wood and any other such material that the country happens to possess.
As to communication with the sea it is in fact much debated whether it is advantageous to well-ordered states or harmful. It is maintained that the visits of persons brought up under other institutions are detrimental to law and order, and so also is a swollen population, which grows out of sending out abroad and receiving in a number of traders, but is unfavorable to good government. Now it is not difficult to see that, if these consequences are avoided, it is advantageous in respect of both security and the supply of necessary commoditiesthat the city and the country should have access to the sea. With a view to enduring wars more easily people that are to be secure must be capable of defensive operations on both elements, land and sea, and with a view to striking at assailants, even if it be not possible on both elements, yet to do so on one or the other will be more in the power of people that have access to both. And the importation of commodities that they do not happen to have in their own country and the export of their surplus products are things indispensable; for the state ought to engage in commerce for its own interest, but not for the interest of the foreigner. People that throw open their market to the world do so for the sake of revenue, but a state that is not to take part in that sort of profit-making need not possess a great commercial port. But since even now we see many countries and cities possessing sea-ports and harbors conveniently situated with regard to the city, so as not to form part of the same town^^[[2|Rackham: Book: 7, Section: 1327a, Note: 2]]^^ and yet not to be too far off, but commanded by walls and other defence-works of the kind, it is manifest that if any advantage does result through the communication of city with port the state will possess this advantage, and if there is any harmful result it is easy to guard against it by means of laws stating and regulating what persons are not and what persons are to have intercourse with one another. On the question of naval forces, there is no doubt that to possess them up to a certain strength is most desirable
Perhaps the Greek should be altered to give ‘part of the town itself.’
(for a state ought to be formidable, and also capable of the defence of not only its own people but also some of its neighbors, by sea as well as by land); but when we come to the question of the number and size of this force, we have to consider the state's manner of life if it is to live a life of leadership and affairs,^^[[1|Rackham: Book: 7, Section: 1327b, Note: 1]]^^ it must possess maritime as well as other forces commensurate with its activities. On the other hand it is not necessary for states to include the teeming population that grows up in connection with common sailors, as there is no need for these to be citizens; for the marines are free men and are a part of the infantry, and it is they who have command and control the crew; and if there exists a mass of villagers and tillers of the soil, there is bound to be no lack of sailors too. In fact we see this state of thing existing even now in some places, for instance in the city of Heraclea; the Heracleotes man a large fleet of triremes, although they possess a city of but moderate size as compared with others.
Let such then be our conclusions about the territories and harbors of cities, and the sea, and about naval forces.
About the citizen population, we said before what is its proper limit of numbers. Let us now speakof what ought to be the citizens' natural character. Now this one might almost discern by looking at the famous cities of Greece and by observing how the whole inhabited world is divided up among the nations.^^[[2|Rackham: Book: 7, Section: 1327b, Note: 2]]^^ The nations inhabiting the cold places and those of Europe are full of spirit but somewhat deficient in intelligence and skill, so that they continue comparatively free, but lacking in political organization and capacity to rule their neighbors. The peoples of Asia on the other hand are intelligent and skillful in temperament, but lack spirit, so that they are in continuous subjection and slavery. But the Greek race participates in both characters, just as it occupies the middle position geographically, for it is both spirited and intelligent; hence it continues to be free and to have very good political institutions, and to be capable of ruling all mankind if it attains constitutional unity. The same diversity also exists among the Greek races compared with one another: some have a one-sided nature, others are happily blended in regard to both these capacities.^^[[3|Rackham: Book: 7, Section: 1327b, Note: 3]]^^ It is clear therefore that people that are to be easily guided to virtue by the lawgiver must be both intellectual and spirited in their nature. For as to what is said by certain persons about the character that should belong to their Guardians^^[[4|Rackham: Book: 7, Section: 1327b, Note: 4]]^^—they should be affectionate to their friends but fierce towards strangers—it is spirit that causes affectionateness, for spirit is the capacity of the soul whereby we love.
i.e. relations with other states—a broader term than hegemony, leadership of an alliance.
i.e. intelligence and high spirit, capacity for self-government and capacity for empire.
The ruling class in Plato's Ideal State,http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Rep.%20375c&lang=original.
A sign of this is that spirit is more roused against associates and friends than against strangers, when it thinks itself slighted. Therefore Archilochus^^[[1|Rackham: Book: 7, Section: 1328a, Note: 1]]^^ for instance, when reproaching his friends, appropriately apostrophizes his spirit:
<<<
For 'tis thy friends that make thee choke with rage.
<<<
Moreover it is from this faculty that power to command and love of freedom are in all cases derived; for spirit is a commanding and indomitable element. But it is a mistake to describe the Guardians as cruel towards strangers; it is not right to be cruel towards anybody, and men of great-souled nature are not fierce except towards wrongdoers, and their anger is still fiercer against their companions if they think that these are wronging them, as has been said before. And this is reasonable, because they think that in addition to the harm done them they are also being defrauded of a benefit by persons whom they believe to owe them one. Hence the sayings
<<<
For brothers' wars are cruel,^^[[2|Rackham: Book: 7, Section: 1328a, Note: 2]]^^
<<<
and
<<<
They that too deeply loved too deeply hate.^^[[3|Rackham: Book: 7, Section: 1328a, Note: 3]]^^
<<<
We have now approximately decided what are the proper numbers and the natural qualities of those who exercise the right of citizens, and the proper extent and nature of the territory (for we must notseek to attain the same exactness by means of theoretical discussions as is obtained by means of the facts that come to us through sense-perceptions).
But since, just as with all other natural organisms those things that are indispensable for the existence of the whole are not parts^^[[4|Rackham: Book: 7, Section: 1328a, Note: 4]]^^ of the whole organization, it is also clear that not all the things that are necessary for states to possess are to be counted as parts of a state (any more than this is so with any other association that forms something one in kind, for there must be something that is one and common and the same for the partners, whether the shares that they take be equal or unequal: for example this common property may be food or an area of land or something else of the same sort—^^[[5|Rackham: Book: 7, Section: 1328a, Note: 5]]^^ but when of two related things one is a means and the other an end, in their case there is nothing in common except for the one to act and the other to receive the action. I mean for instance the relation between any instrument or artificer and the work that they produce: between a house and a builder there is nothing that is produced in common, but the builder's craft exists for the sake of the house. Hence although states need property, the property is no part of the state. And there are many living things that fall under the head of property.^^[[6|Rackham: Book: 7, Section: 1328a, Note: 6]]^^ And the state is one form of partnership of similar people, and its object is the best life that is possible. And since the greatest good is happiness, and this is some perfect activity or employment of virtue, and since it has so come about that it is possible for some men to participate in it, but for others only to a small extent or not at all, it is clear that this is the cause for there arising different kinds and varieties of state and several forms of constitution;
Archilochus of Paros (one of the earliest lyric poets, fl. 600 B.C., the inventor of the iambic meter, which he used for lampoons), fr. 61 Bergk, 676 Diehl, 67 Edmonds,__Elegy and Iambus__, 2. 133.
http://www.perseus.tufts.edu/hopper/text?doc=Eur.%20Fr.%20965&lang=original.
http://www.perseus.tufts.edu/hopper/text?doc=Eur.%20Fr.%2078&lang=original
i.e. they are not ''all of them''parts: the ‘parts’ of a thing are among the ‘indispensable conditions’ of its existence, but there are others also.
The sentence is unfinished.
Possibly the words from the beginning of 7.2 ‘But when’ to this point should be transferred below to 7.3 mid. after ‘different constitutions.’
for as each set of people pursues participation in happiness in a different manner and by different means they make for themselves different modes of life and different constitutions. And we must also further consider how many there are of these things referred to that are indispensable for the existence of a state; for among them will be the things which we pronounce to be parts of a state, owing to which their presence is essential. We must therefore consider the list of occupations that a state requires : for from these it will appear what the indispensable classes are. First then a state must have a supply of food; secondly, handicrafts (since life needs many tools); third, arms (since the members of the association must necessarily possess arms both to use among themselves and for purposes of government, in cases of insubordination, and to employ against those who try to molest them from without); also a certain abundance of money, in order that they may have enough both for their internal needs and for requirements of war; fifth, a primary need, the service of religion, termed a priesthood; and sixth in number and most necessary of all, a provision for deciding questions of interests and of rights between the citizens. These then are the occupations that virtually every state requires (for the state is not any chance multitude of people but one self-sufficient for the needs of life, as we say,^^[[1|Rackham: Book: 7, Section: 1328b, Note: 1]]^^ and if any of these industries happens to be wanting, it is impossible for that association to be absolutely self-sufficient). It is necessary therefore for the state to be organizedon the lines of these functions; consequently it must possess a number of farmers who will provide the food, and craftsmen, and the military class, and the wealthy, and priests and judges to decide questions of necessity^^[[2|Rackham: Book: 7, Section: 1328b, Note: 2]]^^ and of interests.
These matters having been settled, it remains to consider whether everybody is to take part in all of these functions (for it is possible for the whole of the people to be at once farmers and craftsmen and the councillors and judges), or whether we are to assume different classes corresponding to each of the functions mentioned, or whether some of them must necessarily be specialized and others combined. But it will not be the same in every form of constitution; for, as we said,^^[[3|Rackham: Book: 7, Section: 1328b, Note: 3]]^^ it is possible either for all the people to take part in all the functions or for not all to take part in all but for certain people to have certain functions. In fact these different distributions of functions are the cause of the difference between constitutions: democracies are states in which all the people participate in all the functions, oligarchies where the contrary is the case. But at present we are studying the best constitution, and this is the constitution under which the state would be most happy, and it has been stated before^^[[4|Rackham: Book: 7, Section: 1328b, Note: 4]]^^ that happiness cannot be forthcoming without virtue; it is therefore clear from these considerations that in the most nobly constituted state, and the one that possesses men that are absolutely just, not merely just relatively to the principle that is the basis of the constitution, the citizens must not live a mechanic or a mercantile life (for such a life is ignoble and inimical to virtue), nor yet must those who are to be citizens in the best state be tillers of the soil
Cf. Books 2.1.7, 3.1.8, 5.2.10.
Perhaps the text should be altered to give ‘matters of justice.’
(for leisure is needed both for the development of virtue and for active participation in politics). And since the state also contains the military class and the class that deliberates about matters of policy and judges questions of justice, and these are manifestly in a special sense parts of the state, are these classes also to be set down as distinct or are both functions to be assigned to the same persons? But here also the answer is clear, because in a certain sense they should be assigned to the same persons, but in a certain sense to different ones. Inasmuch as each of these two functions belongs to a different prime of life, and one requires wisdom, the other strength, they are to be assigned to different people; but inasmuch as it is a thing impossible that when a set of men are able to employ force and to resist control, these should submit always to be ruled, from this point of view both functions must be assigned to the same people; for those who have the power of arms have the power to decide whether the constitution shall stand or fall. The only course left them is to assign this constitutional function to both sets of men without distinction,^^[[1|Rackham: Book: 7, Section: 1329a, Note: 1]]^^ yet not simultaneously, but, as in the natural order of things strength is found in the younger men and wisdom in the elder, it seems to be expedient and just for their functions to be allotted to both in this way, for this mode of division possesses conformity with merit. Moreover the ownership of properties also must be centered round these classes, for the citizens must necessarily possess plentiful means, and these are the citizens. For theartisan class has no share in the state, nor has any other class that is not ‘an artificer of virtue.’^^[[2|Rackham: Book: 7, Section: 1329a, Note: 2]]^^ And this is clear from our basic principle; for in conjunction with virtue happiness is bound to be forthcoming, but we should pronounce a state happy having regard not to a particular section of it but to all its citizens. And it is also manifest that the properties must belong to these classes, inasmuch as^^[[3|Rackham: Book: 7, Section: 1329a, Note: 3]]^^ it is necessary for the tillers of the soil to be slaves, or serfs of alien race. There remains of the list enumerated the class of priests; and the position of this class also is manifest. Priests must be appointed neither from the tillers of the soil nor from the artisans, for it is seemly that the gods should be worshipped by citizens; and since the citizen body is divided into two parts, the military class and the councillor class, and as it is seemly that those who have relinquished these duties owing to age should render to the gods their due worship and should spend their retirement in their service, it is to these that the priestly offices should be assigned.
We have therefore stated the things indispensable for the constitution of a state, and the things that are parts of a state: tillers of the soil, craftsmen and the laboring class generally are a necessary appurtenance of states, but the military and deliberative classes are parts of the state; and moreover each of these divisions is separate from the others, either permanently or by turn.^^[[4|Rackham: Book: 7, Section: 1329a, Note: 4]]^^
And that it is proper for the state to be divided up into castes and for the military class to be distinct from that of the tillers of the soil
Or, amending this curious Greek, ‘for the constitution to assign both these functions to the same people.’
A Platonic phrase, http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Rep.%20500d&lang=original.
As this is a new point, perhaps we should transpose ‘inasmuch as’( εἴπερ)and ‘that’(ὅτι)in the line above.
i.e. the ‘appurtenances’ are permanently separate form the army and the deliberative, which are the ‘parts,’ and which are separate from each other only ‘by turn,’ i.e. a citizen passes on from one to the other.
does not seem to be a discovery of political philosophers of today or one made recently.^^[[1|Rackham: Book: 7, Section: 1329b, Note: 1]]^^ In Egypt this arrangement still exists even now, as also in Crete; it is said to have been established in Egypt by the legislation of Sesostris and in Crete by that of Minos. Common meals also seem to be an ancient institution, those in Crete having begun in the reign of Minos, while those in Italy are much older than these. According to the historians one of the settlers there, a certain Italus, became king of Oenotria, and from him they took the name of Italians instead of that of Oenotrians, and the name of Italy was given to all that promontory^^[[2|Rackham: Book: 7, Section: 1329b, Note: 2]]^^ of Europe lying between the Gulfs of Scylletium and of Lametus,^^[[3|Rackham: Book: 7, Section: 1329b, Note: 3]]^^ which are half a day's journey apart. It was this Italus then who according to tradition converted the Oenotrians from a pastoral life to one of agriculture and gave them various ordinances, being the first to institute their system of common meals; hence the common meals and some of his laws are still observed by certain of his successors even today. The settlers in the direction of Tyrrhenia^^[[4|Rackham: Book: 7, Section: 1329b, Note: 4]]^^ were Opicans, who today as in former times bear the surname ofAusonians; the region towards Iapygia^^[[5|Rackham: Book: 7, Section: 1329b, Note: 5]]^^ and the Ionian Gulf, called Syrtis, was inhabited by the Chones, who also were Oenotrians by race. It is from this country that the system of common meals has its origin, while the division of the citizen-body by hereditary caste came from Egypt, for the reign of Sesostris long antedates that of Minos. We may almost take it therefore that all other political devices also have been discovered repeatedly, or rather an infinite number of times over, in the lapse of ages; for the discoveries of a necessary kind are probably taught by need itself, and when the necessaries have been provided it is reasonable that things contributing to refinement and luxury should find their development; so that we must assume that this is the way with political institutions also. The antiquity of all of them is indicated by the history of Egypt; for the Egyptians are reputed to be the oldest of nations, but they have always had laws and a political system. Hence we should use the results of previous discovery when adequate, while endeavoring to investigate matters hitherto passed over.
It has been stated before that the land ought to be owned by those who possess arms and those who share the rights of the constitution, and why the cultivators ought to be a different caste from these, and what is the proper extent and conformation of the country. We have now to discuss first the allotment of the land, and the proper class and character of its cultivators; since we advocate not common ownership of land, as some have done,
Perhaps to be read as denying the originality of Plato's__Republic__.
i.e. the south-west peninsula or toe of Italy.
i.e. the Gulfs of Squillace and Eufemia.
The modern Tuscany, i.e. the people of Lucania, Campania and Latium.
The south-east promontory or heel of Italy.
but community in it brought about in a friendly way by the use of it,^^[[1|Rackham: Book: 7, Section: 1330a, Note: 1]]^^ and we hold that no citizen should be ill supplied with means of subsistence. As to common meals, all agree that this is an institution advantageous for well-organized states to possess; our own reasons for sharing this view we will state later.^^[[2|Rackham: Book: 7, Section: 1330a, Note: 2]]^^ But the common meals must be shared by all the citizens, and it is not easy for the poor to contribute their assessed share from their private means and also to maintain their household as well. And moreover the expenses connected with religion are the common concern of the whole state. It is necessary therefore for the land to be divided into two parts, of which one must be common and the other the private property of individuals; and each of these two divisions must again be divided in two. Of the common land one portion should be assigned to the services of religion, and the other to defray the cost of the common meals; of the land in private ownership one part should be the district near the frontiers, and another the district near the city, in order that two plots may be assigned to each citizen and all may have a share in both districts. This arrangement satisfies equity and justice, and also conduces to greater unanimity in facing border warfare. Where this system is not followed, one set of people are reckless about quarrelling with the neighboring states,and the other set are too cautious and neglect considerations of honor. Hence some people have a law that the citizens whose land is near the frontier are not to take part in deliberation as to wars against neighboring states, on the ground that private interest would prevent them from being able to take counsel wisely. The land must therefore be divided up in this manner because of the reasons aforesaid.
Those who are to cultivate the soil should best of all, if the ideal system is to be stated, be slaves, not drawn from people all of one tribe nor of a spirited character (for thus they would be both serviceable for their work and safe to abstain from insurrection), but as a second best they should be alien serfs of a similar nature. Of these laborers those in private employment must be among the private possessions of the owners of the estates, and those working on the common land common property. How slaves should be employed, and why it is advantageous that all slaves should have their freedom set before them as a reward, we will say later.^^[[3|Rackham: Book: 7, Section: 1330a, Note: 3]]^^
It has been said before that the city should so far as circumstances permit be in communication alike with the mainland, the sea and the whole of its territory. The site of the city itself we must pray that fortune may place on sloping ground, having regard to four considerations^^[[4|Rackham: Book: 7, Section: 1330a, Note: 4]]^^: first, as a thing essential, the consideration of health (for cities whose site slopes east or towards the breezes that blow from the sunrise are more healthy, and in the second degree those that face away from the north wind,^^[[5|Rackham: Book: 7, Section: 1330a, Note: 5]]^^ for these are milder in winter);
This vague phrase (based on the proverb κοινὰ τὰ τῶν φίλων, ‘friends' goods are common property’) seems to denote some sort of customary communism in the cultivation of the land and enjoyment of the produce, combined with private ownership of the freehold.
This promise is not fulfilled.
This promise is not fulfilled.
Apparently (1) fresh air, (2) water supply, (3) administration, (4) military requirements.
Literally, ‘in the direction in which the north wind blows.’
and among the remaining considerations, a sloping site is favorable both for political and for military purposes. For military purposes therefore the site should be easy of exit for the citizens themselves, and difficult for the adversary to approach and to blockade, and it must possess if possible a plentiful natural supply of pools and springs, but failing this, a mode has been invented of supplying water by means of constructing an abundance of large reservoirs for rain-water, so that a supply may never fail the citizens when they are debarred from their territory by war. And since we have to consider the health of the inhabitants, and this depends upon the place being well situated both on healthy ground and with a healthy aspect, and secondly upon using wholesome water-supplies, the following matter also must be attended to as of primary importance. Those things which we use for the body in the largest quantity, and most frequently, contribute most to health; and the influence of the water-supply and of the air is of this nature. Hence in wise cities if all the sources of water are not equally pure and there is not an abundance of suitable springs, the water-supplies for drinking must be kept separate from those for other requirements. As to fortified positions, what is expedient is not the same for all forms of constitution alike; for example, a citadel-hill is suitable for oligarchy and monarchy,and a level site for democracy; neither is favorable to an aristocracy, but rather several strong positions. The arrangement of the private dwellings is thought to be more agreeable and more convenient for general purposes if they are laid out in straight streets, after the modern fashion, that is, the one introduced by Hippodamus^^[[1|Rackham: Book: 7, Section: 1330b, Note: 1]]^^; but it is more suitable for security in war if it is on the contrary plan, as cities used to be in ancient times; for that arrangement is difficult for foreign troops^^[[2|Rackham: Book: 7, Section: 1330b, Note: 2]]^^ to enter and to find their way about in when attacking. Hence it is well to combine the advantages of both plans (for this is possible if the houses are laid out in the way which among the farmers some people call ‘on the slant’^^[[3|Rackham: Book: 7, Section: 1330b, Note: 3]]^^ in the case of vines), and not to lay out the whole city in straight streets, but only certain parts and districts, for in this way it will combine security with beauty.
As regards walls, those who aver that cities which pretend to valor should not have them hold too old-fashioned a view—and that though they see that the cities that indulge in that form of vanity are refuted by experience. It is true that against an evenly matched foe and one little superior in numbers it is not honorable to try to secure oneself by the strength of one's fortifications; but as it does and may happen that the superior numbers of the attackers may be too much for the human valor of a small force, if the city is to survive and not to suffer disaster or insult, the securest fortification of walls must be deemed to be the most warlike,
i.e. an enemy's mercenaries; but the MSS. give ‘difficult for foreign troops to make sorties from [i.e. presumably to find their way out when once they have got in, cf. http://www.perseus.tufts.edu/hopper/text?doc=Thuc.%202.4.2&lang=original] and for attackers to find their way about in.’
The Roman ''quincunx'', each plant of one row being in line with the gap between two plants of the next row, thus:
particularly in view of the inventions that have now been made in the direction of precision with missiles and artillery for sieges. To claim not to encompass cities with walls is like desiring^^[[1|Rackham: Book: 7, Section: 1331a, Note: 1]]^^ the country to be easy to invade and stripping it of hilly regions, and similarly not surrounding even private dwellings with house-walls on the ground that the inhabitants will be cowardly. Another point moreover that must not be forgotten is that those who have walls round the city can use their cities in both ways, both as walled cities and as open ones, whereas cities not possessing walls cannot be used in both ways. If then this is so, not only must walls be put round a city, but also attention must be paid to them in order that they may be suitable both in regard to the adornment of the city and in respect of military requirements, especially the new devices recently invented. For just as the attackers of a city are concerned to study the means by which they can gain the advantage, so also for the defenders some devices have already been invented and others they must discover and think out; for people do not even start attempting to attack those who are well prepared.
And since the multitude of citizens must be distributedin separate messes, and the city walls must be divided up by guard-posts and towers in suitable places, it is clear that these facts themselves call for some of the messes to be organized at these guard-posts. These things then might be arranged in this manner. But it is fitting that the dwellings assigned to the gods and the most important of the official messes should have a suitable site, and the same for all, excepting those temples which are assigned a special place apart by the law or else by some utterance of the Pythian oracle. And the site would be suitable if it is one that is sufficiently conspicuous in regard to the excellence of its position, and also of superior strength in regard to the adjacent parts of the city. It is convenient that below this site should be laid out an agora of the kind customary in Thessaly which they call a free agora, that is, one which has to be kept clear of all merchandise and into which no artisan or farmer or any other such person may intrude unless summoned by the magistrates. It would give amenity to the site if the gymnasia of the older men were also situated here—for it is proper to have this institution also divided according to ages,^^[[2|Rackham: Book: 7, Section: 1331a, Note: 2]]^^ and for certain magistrates to pass their time among the youths while the older men spend theirs with the magistrates; for the presence of the magistrates before men's eyes most engenders true respect and a freeman's awe.
Perhaps a word should be added to the Greek giving ‘desiring to make the country easy to invade, and to strip it—’.
Or ‘for in this noble practice different ages should be separated’ (Jowett).
The agora for merchandise must be different from the free agora, and in another place; it must have a site convenient for the collection there of all the goods sent from the seaport and from the country. And as the divisions of the state's populace include^^[[1|Rackham: Book: 7, Section: 1331b, Note: 1]]^^ priests and magistrates, it is suitable that the priests' mess-rooms also should have their position round that of the sacred buildings. And all the magistracies that superintend contracts, and the registration of actions at law, summonses and other such matters of administration, and also those that deal with the control of the markets and with what is termed policing the city, should have buildings adjacent to an agora or some public place of resort, and such a place is the neighborhood of the business agora, for we assign the upper agora as the place in which to spend leisure, and this one for necessary business.
The arrangements in the country also should copy the plan described; there too the magistrates called in some states Wardens of the Woods and in others Land-superintendents must have their guard-posts and mess-rooms for patrol duty, and also temples must be distributed over the country, some dedicated to gods and some to heroes. But to linger at this point over the detailed statement and discussion of questions of this kind is waste of time.The difficulty with such things is not so much in the matter of theory but in that of practice; to lay down principles is a work of aspiration, but their realization is the task of fortune. Hence we will relinquish for the present the further consideration of matters of this sort.
We must now discuss the constitution itself, and ask what and of what character should be the components of the state that is to have felicity and good government. There are two things in which the welfare of all men consists: one of these is the correct establishment of the aim and end of their actions, the other the ascertainment of the actions leading to that end. (For the end proposed and the means adopted may be inconsistent with one another, as also they may be consistent; sometimes the aim has been correctly proposed, but people fail to achieve it in action, sometimes they achieve all the means successfully but the end that they posited was a bad one, and sometimes they err as to both—for instance, in medicine practitioners are sometimes both wrong in their judgement of what qualities a healthy body ought to possess and unsuccessful in hitting on effective means to produce the distinctive aim that they have set before them; whereas in the arts and sciences both these things have to be secured, the end and the practical means to the end.) Now it is clear that all men aim at the good life and at happiness, but though some possess the power to attain these things, some do not, owing to some factor of fortune or of nature (fortune because the good life needs also a certain equipment of means,
Perhaps the Greek should be altered to τὸ προεστός, ‘as the governing class is divided into.’
and although it needs less of this for men of better natural disposition it needs more for those of worse); while others, although they have the power, go wrong at the start in their search for happiness.^^[[1|Rackham: Book: 7, Section: 1332a, Note: 1]]^^ But the object before us is to discern the best constitution, and this is the one under which a state will be best governed, and a state will be best governed under the constitution under which it has the most opportunity for happiness; it is therefore clear that we must know what happiness is. The view that we maintain (and this is the definition that we laid down in the__Ethics__,^^[[2|Rackham: Book: 7, Section: 1332a, Note: 2]]^^ if those discourses are of any value) is that happiness is the complete activity and employment of virtue, and this not conditionally but absolutely. When I say ‘conditionally’ I refer to things necessary, by ‘absolutely’ I mean ‘nobly’: for instance, to take the case of just actions, just acts of vengeance and of punishment spring it is true from virtue, but are necessary, and have the quality of nobility only in a limited manner (since it would be preferable that neither individual nor state should have any need of such things), whereas actions aiming at honors and resources^^[[3|Rackham: Book: 7, Section: 1332a, Note: 3]]^^ are the noblest actions absolutely; for the former class of acts consist in the removal^^[[4|Rackham: Book: 7, Section: 1332a, Note: 4]]^^ of something evil, but actions of the latter kind are the opposite—they are the foundation and the generation of things good. The virtuous man will use even poverty, disease, andthe other forms of bad fortune in a noble manner, but felicity consists in their opposites (for it is a definition established by our ethical discourses^^[[5|Rackham: Book: 7, Section: 1332a, Note: 5]]^^ that the virtuous man is the man of such a character that because of his virtue things absolutely good are good to him, and it is therefore clear that his employment of these goods must also be virtuous and noble absolutely); and hence men actually suppose that external goods are the cause of happiness, just as if they were to assign the cause of a brilliantly fine performance on the harp to the instrument rather than to the skill of the player. It follows therefore from what has been said that some goods must be forthcoming to start with and others must be provided by the legislator. Hence we pray that the organization of the state may be successful in securing those goods which are in the control of fortune (for that fortune does control external goods we take as axiomatic); but when we come to the state's being virtuous, to secure this is not the function of fortune but of science and policy. But then the virtue of the state is of course caused by the citizens who share in its government being virtuous; and in our state all the citizens share in the government. The point we have to consider therefore is, how does a man become virtuous? For even if it be possible for the citizens to be virtuous collectively without being so individually, the latter is preferable, since for each individual to be virtuous entails as a consequence the collective virtue of all. But there are admittedly three things by which men are made good and virtuous, and these three things are nature, habit and reason. For to start with, one must be born with the nature of a human being and not of some other animal; and secondly, one must be born of a certain quality of body and of soul. But there are some qualities that it is of no use to be born with,
i.e. they misconceive the nature of happiness and select the wrong thing to aim at.
http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201098a&lang=original and http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201176b&lang=original
A conjectural emendation gives ‘distinctions.’
This is a conjectural emendation; the MSS. give ‘the adoption.’
http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Nic.%20Eth.%201113a&lang=original
for our habits make us alter them: some qualities in fact are made by nature liable to be modified by the habits in either direction, for the worse or for the better. Now the other animals live chiefly by nature, though some in small degrees are guided by habits too; but man lives by reason also, for he alone of animals possesses reason; so that in him these three things must be in harmony with one another; for men often act contrary to their acquired habits and to their nature because of their reason, if they are convinced that some other course of action is preferable.
Now we have already^^[[1|Rackham: Book: 7, Section: 1332b, Note: 1]]^^ defined the proper natural character of those who are to be amenable to the hand of the legislator; what now remains is the task of education, for men learn some things by practice, others by precept.
But since every political community is composed of rulers and subjects, we must therefore consider whether the rulers and the subjects ought to change, or to remain the same through life; for it is clear that their education also will have to be made to correspond with this distribution of functions. If then it were the case that the one class differed from the other as widely as we believe the gods and heroes to differ from mankind, having first a great superiority in regard to the body and then in regard tothe soul, so that the pre-eminence of the rulers was indisputable and manifest to the subjects, it is clear that it would be better for the same persons always to be rulers and subjects once for all; but as this is not easy to secure, and as we do not find anything corresponding to the great difference that Scylax states to exist between kings and subjects in India, it is clear that for many reasons it is necessary for all to share alike in ruling and being ruled in turn. For equality means for persons who are alike identity of status, and also it is difficult^^[[2|Rackham: Book: 7, Section: 1332b, Note: 2]]^^ for a constitution to endure that is framed in contravention of justice. For all the people throughout the country are ranged on the side of the subject class in wishing for a revolution, and it is a thing inconceivable that those in the government should be sufficiently numerous to over power all of these together. But yet on the other hand that the rulers ought to be superior to the subjects cannot be disputed; therefore the lawgiver must consider how this is to be secured, and how they are to participate in the government. And this has been already^^[[3|Rackham: Book: 7, Section: 1332b, Note: 3]]^^ discussed. Nature has given the distinction by making the group that is itself the same in race partly younger and partly older, of which two sets it is appropriate to the one to be governed and for the other to govern; and no one chafes or thinks himself better than his rulers when he is governed on the ground of age, especially as he is going to get back what he has thus contributed to the common stock when he reaches the proper age. In a sense therefore we must say that the rulers and ruled are the same, and in a sense different.
The emendation suggested by Richards gives ‘For equality and identity (of status) are just for persons who are alike, and it is difficult,’ etc.
Hence their education also is bound to be in one way the same and in another different. For he who is to be a good ruler must have first been ruled, as the saying is^^[[1|Rackham: Book: 7, Section: 1333a, Note: 1]]^^ (and government, as has been said in the first discourses,^^[[2|Rackham: Book: 7, Section: 1333a, Note: 2]]^^ is of two sorts, one carried on for the sake of the ruler and the other for the sake of the subject; of these the former is what we call the rule of a master,the latter is the government of free men . . .^^[[3|Rackham: Book: 7, Section: 1333a, Note: 3]]^^ But some of the commands given differ not in nature of the services commanded but in their object. Hence a number of what are thought to be menial services can be honorably performed even by freemen in youth; since in regard to honor and dishonor actions do not differ so much in themselves as in their end and object). But since we say that the goodness of a citizen^^[[4|Rackham: Book: 7, Section: 1333a, Note: 4]]^^ and ruler are the same as that of the best man, and that the same person ought to become a subject first and a ruler afterwards, it will be important for the legislator to study how and by what courses of training good men are to be produced, and what is the end of the best life.
The soul is divided into two parts, of which one is in itself possessed of reason, while the other is not rational in itself but capable of obeying reason. To these parts in our view belong those virtues in accordance with which a man is pronounced to be good in some way. But in which of thesetwo parts the end of man rather resides, those who define the parts of the soul in accordance with our view will have no doubt as to how they should decide. The worse always exists as a means to the better, and this is manifest alike in the products of art and in those of nature; but the rational part of the soul is better than the irrational. And the rational part is subdivided into two, according to our usual scheme of division; for reason is of two kinds, practical and theoretic, so that obviously the rational part of the soul must also be subdivided accordingly. A corresponding classification we shall also pronounce to hold among its activities: the activities of the part of the soul that is by nature superior must be preferable for those persons who are capable of attaining either all the soul's activities or two^^[[5|Rackham: Book: 7, Section: 1333a, Note: 5]]^^ out of the three; since that thing is always most desirable for each person which is the highest to which it is possible for him to attain. Also life as a whole is divided into business and leisure, and war and peace, and our actions are aimed some of them at things necessary and useful, others at things noble. In these matters the same principle of preference that applies to the parts of the soul must apply also to the activities of those parts: war must be for the sake of peace, business for the sake of leisure, things necessary and useful for the purpose of things noble. The statesman therefore must legislate with all these considerations in view, both in respect of the parts of the soul and of their activities, and aiming more particularly at the greater goods and the ends. And the same principle applies in regard to modes of life and choices of conduct: a man should be capable of engaging in business and war,
The sentence here breaks off into a long parenthesis, after which it is not resumed.
Book 3.6.6-12, 1278b 30 ff.
One sentence or more has been lost here.
Perhaps the Greek should be altered to give ‘of the best citizen.’
i.e. the two lower ones, the three being the activities of the theoretic reason, of the practical reason, and of the passions that although irrational are amenable to reason.
but still more capable of living in peace and leisure; and he should do what is necessary and useful, but still more should he do what is noble. These then are the aims that ought to be kept in view in the education of the citizens both while still children and at the later ages that require education. But the Greek peoples reputed at the present day to have the best constitutions, and the lawgivers that established them, manifestly did not frame their constitutional systems with reference to the best end, nor construct their laws and their scheme of education with a view to all the virtues, but they swerved aside in a vulgar manner towards those excellences that are supposed to be useful and more conducive to gain. And following the same lines as they, some later writers also have pronounced the same opinion: in praising the Spartan constitution they express admiration for the aim of its founder on the ground that he framed the whole of his legislation with a view to conquest and to war. These views are easy to refute on theoretical grounds and also have now been refuted by the facts of history. For just as most of mankind covet being master of many servants^^[[1|Rackham: Book: 7, Section: 1333b, Note: 1]]^^ because this produces a manifold supply of fortune's goods, so Thibron^^[[2|Rackham: Book: 7, Section: 1333b, Note: 2]]^^ and all the other writers about the Spartan constitutionshow admiration for the lawgiver of the Spartans because owing to their having been trained to meet dangers they governed a wide empire. Yet it clearly follows that since as a matter of fact at the present day the Spartans no longer possess an empire, they are not happy, and their lawgiver was not a good one. And it is ridiculous that although they have kept to his laws, and although nothing hinders their observing the laws, they have lost the noble life. Also writers have a wrong conception of the power for which the lawgiver should display esteem; to govern freemen is nobler and more conjoined with virtue than to rule despotically. And again it is not a proper ground for deeming a state happy and for praising its lawgiver, that it has practised conquest with a view to ruling^^[[3|Rackham: Book: 7, Section: 1333b, Note: 3]]^^ over its neighbors. This principle is most disastrous; it follows from it that an individual citizen who has the capacity ought to endeavor to attain the power to hold sway over his own city; but this is just what the Spartans charge as a reproach against their king Pausanias, although he attained such high honor. No principle therefore and no law of this nature is either statesmanlike or profitable, nor is it true; the same ideals are the best both for individuals and for communities, and the lawgiver should endeavor to implant them in the souls of mankind. The proper object of practising military training is not in order that men may enslave those who do not deserve slavery, but in order that first they may themselves avoid becoming enslaved to others; then so that they may seek suzerainty for the benefit of the subject people,
Or possibly, ‘covet a wide empire.’
A probable emendation gives ‘that he has trained it with a view to ruling.’
but not for the sake of world-wide despotism; and thirdly to hold despotic power over those who deserve to be slaves. Experience supports the testimony of theory, that it is the duty of the lawgiver rather to study how he may frame his legislation both with regard to warfare and in other departments for the object of leisure and of peace. Most military states remain safe while at war but perish when they have won their empire; in peace-time they lose their keen temper, like iron.^^[[1|Rackham: Book: 7, Section: 1334a, Note: 1]]^^ The lawgiver is to blame, because he did not educate them to be able to employ leisure.
And since it appears that men have the same end collectively and individually, and since the same distinctive aim must necessarily belong both to the best man and to the best government, it is clear that the virtues relating to leisure are essential^^[[2|Rackham: Book: 7, Section: 1334a, Note: 2]]^^; since, as has been said repeatedly, peace is the end of war, leisure of business. But the virtues useful for leisure and for its employment are not only those that operate during leisure but also those that operate in business; for many of the necessaries must needs be forthcoming to give us opportunity for leisure. Therefore it is proper for the state to be temperate,brave and enduring; since, as the proverb goes, there is no leisure for slaves, but people unable to face danger bravely are the slaves of their assailants. Therefore courage and fortitude are needed for business, love of wisdom for leisure, temperance and justice for both seasons, and more especially when men are at peace and have leisure; for war compels men to be just and temperate, whereas the enjoyment of prosperity and peaceful leisure tend to make them insolent. Therefore much justice and much temperance are needed by those who are deemed very prosperous and who enjoy all the things counted as blessings, like the persons, if such there be, as the poets say,^^[[3|Rackham: Book: 7, Section: 1334a, Note: 3]]^^ that dwell in the Islands of the Blest; these will most need wisdom, temperance and justice, the more they are at leisure and have an abundance of such blessings. It is clear therefore why a state that is to be happy and righteous must share in these virtues; for if it is disgraceful to be unable to use our good things, it is still more disgraceful to be unable to use them in time of leisure, and although showing ourselves good men when engaged in business and war, in times of peace and leisure to seem no better than slaves. Therefore we must not cultivate virtue after the manner of the state of Sparta. The superiority of the Spartans over other races does not lie
i.e. an iron blade when not used loses keenness and has to be re-tempered.
i.e. to the state as well as to the individual.
http://www.perseus.tufts.edu/hopper/text?doc=Hes.%20WD%20170&lang=original
in their holding a different opinion from others as to what things are the greatest goods, but rather in their believing that these are obtained by means of one particular virtue; yet because they both deem these things and their enjoyment to be greater goods than the enjoyment of the virtues . . .^^[[1|Rackham: Book: 7, Section: 1334b, Note: 1]]^^
. . . and that it is to be practised for its own sake is manifest from these considerations; but it must now be considered how and by what means this will come about. Now we have indeed previously decided that it requires nature and habit and reason, and among these, what particular quality of nature men ought to possess has been defined previously; but it remains to consider whether men ought to be educated first by means of the reason or by the habits. For between reason and habit the most perfect harmony ought to exist, as it is possible both for the reason to have missed the highest principle and for men to have been as wrongly trained through the habits. This therefore at all events is clear in the first place, in the case of men as of other creatures, that their engendering starts from a beginning, and that the end starts from a certain beginning that is another end,^^[[2|Rackham: Book: 7, Section: 1334b, Note: 2]]^^ and that reason and intelligence are for us the end of our natural development, so that it is with a view to these ends that our engendering and the training of our habits must be regulated. And secondly, as soul and body are two, so we observe that the soul also has two parts, the irrational part and the part possessing reason, and that the states which they experience are two in number,the one being desire and the other intelligence; and as the body is prior in its development to the soul, so the irrational part of the soul is prior to the rational. And this also is obvious, because passion and will, and also appetite,^^[[3|Rackham: Book: 7, Section: 1334b, Note: 3]]^^ exist in children even as soon as they are born, but it is the nature of reasoning and intelligence to arise in them as they grow older. Therefore in the first place it is necessary for the training of the body to precede that of the mind, and secondly for the training of the appetite to precede that of the intelligence; but the training of the appetite must be for the sake of the intellect, and that of the body for the sake of the soul.
Inasmuch therefore as it is the duty of the lawgiver to consider from the start how the children reared are to obtain the best bodily frames, he must first pay attention to the union of the sexes, and settle when and in what condition a couple should practise matrimonial intercourse. In legislating for this partnership he must pay regard partly to the persons themselves and to their span of life, so that they may arrive together at the same period in their ages, and their powers may not be at discord through the man being still capable of parentage and the wife incapable, or the wife capable and the man not (for this causes differences and actual discord between them), and also he must consider as well the succession of the children, for the children must neither be too far removed in their ages from the fathers (since elderly fathers get no good from their children's return of their favors, nor do the children from the help they get from the fathers),
The end of this sentence and the beginning of the next appear to have been lost.
A conjectural addition to the text gives ‘the end to which a certain beginning leads is itself the beginning of another end.’ The active use of the reason is the end (i.e. the completion and the purpose) of the birth and growth of the human animal.
These three emotions are subdivisions of ‘desire’ above.
nor must they be too near them (for this involves much unpleasantness, since in such families there is less respect felt between them, as between companions of the same age, and also the nearness of age leads to friction in household affairs); and in addition, to return to the point from which we began this digression, measures must be taken to ensure that the children produced may have bodily frames suited to the wish of the lawgiver. These results then are almost all attained by one mode of regulation. For since the period of parentage terminates, speaking generally, with men at the age of seventy at the outside, and with women at fifty, the commencement of their union should correspond in respect of age with these times. But the mating of the young is bad for child-bearing; for in all animal species the offspring of the young are more imperfect and likely to produce female children,^^[[1|Rackham: Book: 7, Section: 1335a, Note: 1]]^^ and small in figure, so that the same thing must necessarily occur in the human race also. And a proof of this is that in all the states where it is the local custom to mate young men and young women, the people are deformed and small of body. And again young women labor more, and more of them die in childbirth; indeed according to some accounts such was the reason why the oracle^^[[2|Rackham: Book: 7, Section: 1335a, Note: 2]]^^ was givento the people of Troezen, because many were dying owing to its being their custom for the women to marry young, and it did not refer to the harvest. And again it also contributes to chastity for the bestowal of women in marriage to be made when they are older, for it is thought that they are more licentious when they have had intercourse in youth. Also the males are thought to be arrested in bodily growth if they have intercourse while the seed is still growing, for this also has a fixed period after passing which it is no longer plentiful. Therefore it is fitting for the women to be married at about the age of eighteen and the men at thirty-seven or a little before^^[[3|Rackham: Book: 7, Section: 1335a, Note: 3]]^^—for that will give long enough for the union to take place with their bodily vigor at its prime, and for it to arrive with a convenient coincidence of dates at the time when procreation ceases. Moreover the succession of the children to the estates, if their birth duly occurs soon after the parents marry, will take place when they are beginning their prime, and when the parents' period of vigor has now come to a close, towards the age of seventy. The proper age therefore for union has been discussed; as to the proper times in respect of the season we may accept what is customary with most people, who have rightly decided even as it is to practise marital cohabitation in winter. And people should also study for themselves, when their time comes, the teachings of physicians and natural philosophers on the subject of the procreation of children; the suitable bodily seasons are adequately discussed by the physicians,
Some editors write θηλύτοκα and interpret ‘more likely to be born females.’ ( θηλυτόκα, ‘likely to bear females,’ is applied to the young parents themselves in http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20HA%20766b.29&lang=original.)
Μὴ τέμνε νέαν ἄλοκα(‘cut not a new furrow’) schol.
The word ‘before’ is a conjectural insertion.
and the question of weather by the natural philosophers, who say that north winds are more favorable than south. The particular kind of bodily constitution in the parents that will be most beneficial for the offspring must be dwelt on more in detail in our discussion of the management of children^^[[1|Rackham: Book: 7, Section: 1335b, Note: 1]]^^; it is sufficient to speak of it in outline now. The athlete's habit of body is not serviceable for bodily fitness as required by a citizen, nor for health and parentage, nor yet is a habit that is too valetudinarian and unfit for labor, but the condition that lies between them. The bodily habit therefore should have been trained by exercise, but not by exercises that are violent, and not for one form of labor only, as is the athlete's habit of body, but for the pursuits of free men. And these arrangements must be provided alike for men and women. And pregnant women also must take care of their bodies, not avoiding exercise nor adopting a low diet; this it is easy for the lawgiver to secure by ordering them to make a journey daily for the due worship of the deities whose office is the control of childbirth. As regards the mind, however, on the contrary it suits them to pass the time more indolently than as regards their bodies; for children before birth are evidently affected by the mother just as growing plants are by the earth.As to exposing orrearing the children born, let there be a law that no deformed child shall be reared; but on the ground of number of children, if the regular customs hinder any of those born being exposed, there must be a limit fixed to the procreation of offspring, and if any people have a child as a result of intercourse in contravention of these regulations, abortion must be practised on it before it has developed sensation and life; for the line between lawful and unlawful abortion will be marked by the fact of having sensation and being alive. And since the beginning of the fit age for a man and for a woman, at which they are to begin their union, has been defined, let it also be decided for how long a time it is suitable for them to serve the state in the matter of producing children. For the offspring of too elderly parents, as those of too young ones, are born imperfect both in body and mind, and the children of those that have arrived at old age are weaklings. Therefore the period must be limited to correspond with the mental prime; and this in the case of most men is the age stated by some of the poets, who measure men's age by periods of seven years,^^[[2|Rackham: Book: 7, Section: 1335b, Note: 2]]^^—it is about the age of fifty. Therefore persons exceeding this age by four or five years must be discharged from the duty of producing children for the community, and for the rest of their lives if they have intercourse it must be manifestly for the sake of health or for some other similar reason. As to intercourse with another woman or man, in general it must be dishonorable for them to be known to take any part in it in any circumstances whatsoever as long as they are husband and wife and bear those names, but any who may be discovered doing anything of the sort during their period of parentage
This was never written, or has been lost.
http://www.perseus.tufts.edu/hopper/text?doc=Sol.%20Fr.%2027&lang=original
must be punished with a loss of privilege suited to the offence.
When the children have been born, the particular mode of rearing adopted must be deemed an important determining influence in regard to their power of body. It appears from examining the other animals, and is also shown by the foreign races that make it their aim to keep up the military habit of body, that a diet giving an abundance of milk is most suited to the bodies of children, and one that allows rather little wine because of the diseases that it causes. Moreover it is advantageous to subject them to as many movements as are practicable with children of that age. To prevent the limbs from being distorted owing to softness, some races even now employ certain mechanical appliances that keep the bodies of infants from being twisted. And it is also advantageous to accustom them at once from early childhood to cold, for this is most useful both for health and with a view to military service. Hence among many non-Greek races it is customary in the case of some peoples to wash the children at birth by dipping them in a cold river, and with others, for instance the Celts, to give them scanty covering. For it is better to inure them at the very start to everything possible, but to inure them gradually;and the bodily habit of children is naturally well fitted by warmth to be trained to bear cold. In the earliest period of life then it is expedient to employ this or a similar method of nursing; and the next period to this, up to the age of five, which it is not well to direct as yet to any study nor to compulsory labors, in order that they may not hinder the growth, should nevertheless be allowed enough movement to avoid bodily inactivity; and this exercise should be obtained by means of various pursuits, particularly play. But even the games must not be unfit for freemen, nor laborious, nor undisciplined. Also the question of the kind of tales and stories that should be told to children of this age must be attended to by the officials called Children's Tutors. For all such amusements should prepare the way for their later pursuits; hence most children's games should be imitations of the serious occupations of later life. The legislators in the__Laws__^^[[1|Rackham: Book: 7, Section: 1336a, Note: 1]]^^ forbid allowing children to have paroxysms of crying, but this prohibition is a mistake; violent crying contributes to growth, for it serves in a way as exercise for the body, since holding the breath is the strength giving factor in hard labor, and this takes place also with children when they stretch themselves in crying. The Tutors must supervise the children's pastimes, and in particular must see that they associate as little as possible with slaves. For children of this age,
http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Laws%20792a&lang=original. Plato merely says that a child's crying shows it to be annoyed, and that it ought to have as little pain as possible or else it will grow up morose.
and up to seven years old, must necessarily be reared at home; so it is reasonable to suppose that even at this age they may acquire a taint of illiberality from what they hear and see. The lawgiver ought therefore to banish indecent talk, as much as anything else, out of the state altogether (for light talk about anything disgraceful soon passes into action)—so most of all from among the young, so that they may not say nor hear anything of the sort; and anybody found saying or doing any of the things prohibited, if he is of free station but not yet promoted to reclining at the public meals, must be punished with marks of dishonor and with beating, and an older offender must be punished with marks of dishonor degrading to a free man, because of his slavish behavior. And since we banish any talk of this kind, clearly we must also banish the seeing of either pictures or representations that are indecent. The officials must therefore be careful that there may be no sculpture or painting that represents indecent actions, except in the temples of a certain class of gods to whom the law allows even scurrility; but in regard to these^^[[1|Rackham: Book: 7, Section: 1336b, Note: 1]]^^ the law permits men still of suitable age to worship the gods both on their own behalf and on behalf of the children and women.But the younger ones must not be allowed in the audience at lampoons^^[[2|Rackham: Book: 7, Section: 1336b, Note: 2]]^^ and at comedy, before they reach the age at which they will now have the right to recline at table in company and to drink deeply, and at which their education will render all of them immune to the harmful effects of such things. For the present therefore we have merely mentioned these matters in passing, but later we must stop to settle them more definitely, first discussing fully whether legislation prohibiting the attendance of the young is desirable or not, and how such prohibition should be put in force; but on the present occasion we have touched on the question only in the manner necessary. For perhaps the tragic actor Theodorus^^[[3|Rackham: Book: 7, Section: 1336b, Note: 3]]^^ used to put the matter not badly: he had never once allowed anybody to produce his part^^[[4|Rackham: Book: 7, Section: 1336b, Note: 4]]^^ before him, not even one of the poor actors, as he said that audiences are attracted by what they hear first; and this happens alike in regard to our dealings with people and to our dealings with things—all that comes first we like better. On this account we ought to make all base things unfamiliar to the young, and especially those that involve either depravity or malignity.
But when the five years from two to seven have passed, the children must now become spectators at the lessons^^[[5|Rackham: Book: 7, Section: 1336b, Note: 5]]^^ which they will themselves have to learn. And there are two ages corresponding to which education should be divided—there must be a break after the period from seven to puberty, and again after that from puberty to twenty-one. For those who divide the ages by periods of seven years are generally speaking not wrong,^^[[6|Rackham: Book: 7, Section: 1336b, Note: 6]]^^
The MS. text gives ‘and in addition to these’; and the word ‘still’ may be an interpolation.
Iambic verses, often abusive and indecent, recited at festivals of Dionysus.
A great Athenian performer of Sophocles; he took the part of Antigone.
Loosely put for ‘to appear on the stage.’
i.e. in gymnastics and music.
The MSS. give ‘not right.’
and it is proper to follow the division of nature, for all art and education aim at filling up nature's deficiencies. First therefore we must consider whether some regulation in regard to the boys ought to be instituted, next whether it is advantageous for their supervision to be conducted on a public footing or in a private manner as is done at present in most states, and thirdly of what particular nature this supervision ought to be.
---
!!![[Section: 1337a|Rackham: Book: 8, Section: 1337a]]
{{Rackham: Book: 8, Section: 1337a}}
---
!!![[Section: 1337b|Rackham: Book: 8, Section: 1337b]]
{{Rackham: Book: 8, Section: 1337b}}
---
!!![[Section: 1338a|Rackham: Book: 8, Section: 1338a]]
{{Rackham: Book: 8, Section: 1338a}}
---
!!![[Section: 1338b|Rackham: Book: 8, Section: 1338b]]
{{Rackham: Book: 8, Section: 1338b}}
---
!!![[Section: 1339a|Rackham: Book: 8, Section: 1339a]]
{{Rackham: Book: 8, Section: 1339a}}
---
!!![[Section: 1339b|Rackham: Book: 8, Section: 1339b]]
{{Rackham: Book: 8, Section: 1339b}}
---
!!![[Section: 1340a|Rackham: Book: 8, Section: 1340a]]
{{Rackham: Book: 8, Section: 1340a}}
---
!!![[Section: 1340b|Rackham: Book: 8, Section: 1340b]]
{{Rackham: Book: 8, Section: 1340b}}
---
!!![[Section: 1341a|Rackham: Book: 8, Section: 1341a]]
{{Rackham: Book: 8, Section: 1341a}}
---
!!![[Section: 1341b|Rackham: Book: 8, Section: 1341b]]
{{Rackham: Book: 8, Section: 1341b}}
---
!!![[Section: 1342a|Rackham: Book: 8, Section: 1342a]]
{{Rackham: Book: 8, Section: 1342a}}
---
!!![[Section: 1342b|Rackham: Book: 8, Section: 1342b]]
{{Rackham: Book: 8, Section: 1342b}}
^^[[1|Rackham: Book: 8, Section: 1337a, Note: 1]]^^Now nobody would dispute that the education of the young requires the special attention of the lawgiver. Indeed the neglect of this in states is injurious to their constitutions; for education ought to be adapted to the particular form of constitution, since the particular character belonging to each constitution both guards the constitution generally and originally establishes it—for instance the democratic spirit promotes democracy and the oligarchic spirit oligarchy; and the best spirit always causes a better constitution. Moreover in regard to all the faculties and crafts certain forms of preliminary educationand training in their various operations are necessarys o that manifestly this is also requisite in regard to the actions of virtue. And inasmuch as the end for the whole state is one, it is manifest that education also must necessarily be one and the same for all and that the superintendence of this must be public, and not on private lines, in the way in which at present each man superintends the education of his own children, teaching them privately, and whatever special branch of knowledge he thinks fit. But matters of public interest ought to be under public supervision; at the same time we ought not to think that any of the citizens belongs to himself, but that all belong to the state, for each is a part of the state, and it is natural for the superintendence of the several parts to have regard to the superintendence of the whole. And one might praise the Spartans in respect of this, for they pay the greatest attention to the training of their children, and conduct it on a public system.
It is clear then that there should be legislation about education and that it should be conducted on a public system. But consideration must be given to the question, what constitutes education and what is the proper way to be educated. At present there are differences of opinion as to the proper tasks to be set; for all peoples do not agree as to the things that the young ought to learn, either with a view to virtue or with a view to the best life, nor is it clear whether their studies should be regulated more with regard to intellect or with regard to character. And confusing questions arise out of the education that actually prevails, and it is not at all clear whether the pupils should practise pursuits that are practically morally edifying, or higher accomplishments—for all these views have won the support of some judges;
and nothing is agreed as regards the exercise conducive to virtue, for, to start with, all men do not honor the same virtue, so that they naturally hold different opinions in regard to training in virtue.
It is therefore not difficult to see that the young must be taught those useful arts that are indispensably necessary; but it is clear that they should not be taught all the useful arts, those pursuits that are liberal being kept distinct from those that are illiberal, and that they must participate in such among the useful arts as will not render the person who participates in them vulgar. A task and also an art or a science must be deemed vulgar if it renders the body or soul or mind of free men useless for the employments and actions of virtue. Hence we entitle vulgar all such arts as deteriorate the condition of the body, and also the industries that earn wages; for they make the mind preoccupied and degraded. And even with the liberal sciences, although it is not illiberal to take part in some of them up to a point, to devote oneself to them too assiduously and carefully is liable to have the injurious results specified. Also it makes much difference what object one has in view in a pursuit or study; if one follows it for the sake of oneself or one's friends, or on moral grounds, it is not illiberal,but the man who follows the same pursuit because of other people would often appear to be acting in a menial and servile manner.
The branches of study at present established fall into both classes, as was said before.^^[[1|Rackham: Book: 8, Section: 1337b, Note: 1]]^^ There are perhaps four customary subjects of education, reading and writing, gymnastics, music, and fourth, with some people, drawing; reading and writing and drawing being taught as being useful for the purposes of life and very serviceable, and gymnastics as contributing to manly courage; but as to music, here one might raise a question. For at present most people take part in it for the sake of pleasure; but those, who originally included it in education did so because, as has often been said, nature itself seeks to be able not only to engage rightly in business but also to occupy leisure nobly; for—to speak about it yet again^^[[2|Rackham: Book: 8, Section: 1337b, Note: 2]]^^—this is the first principle of all things. For if although both business and leisure are necessary, yet leisure is more desirable and more fully an end than business, we must inquire what is the proper occupation of leisure. For assuredly it should not be employed in play, since it would follow that play is our end in life. But if this is impossible, and sports should rather be employed in our times of business (for a man who is at work needs rest, and rest is the object of play, while business is accompanied by toil and exertion), it follows that in introducing sports we must watch the right opportunity for their employment, since we are applying them to serve as medicine; for the activity of play is a relaxation of the soul, and serves as recreation because of its pleasantness.
But leisure seems itself to contain pleasure and happiness and felicity of life. And this is not possessed by the busy but by the leisured; for the busy man busies himself for the sake of some end as not being in his possession, but happiness is an end achieved, which all men think is accompanied by pleasure and not by pain. But all men do not go on to define this pleasure in the same way, but according to their various natures and to their own characters, and the pleasure with which the best man thinks that happiness is conjoined is the best pleasure and the one arising from the noblest sources. So that it is clear that some subjects must be learnt and acquired merely with a view to the pleasure in their pursuit, and that these studies and these branches of learning are ends in themselves, while the forms of learning related to business are studied as necessary and as means to other things. Hence our predecessors included music in education not as a necessity (for there is nothing necessary about it), nor as useful (in the way in which reading and writing are useful for business and for household management and for acquiring learning and for many pursuits of civil life, while drawing also seems to be useful in making us better judges of the works of artists), nor yet again as we pursue gymnastics,for the sake of health and strength (for we do not see either of these things produced as a result of music); it remains therefore that it is useful as a pastime in leisure, which is evidently the purpose for which people actually introduce it, for they rank it as a form of pastime that they think proper for free men. For this reason Homer wrote thus:
<<<
But him alone
'Tis meet to summon to the festal banquet^^[[1|Rackham: Book: 8, Section: 1338a, Note: 1]]^^;
<<<
and after these words he speaks of certain others
<<<
Who call the bard that he may gladden all.^^[[2|Rackham: Book: 8, Section: 1338a, Note: 2]]^^
<<<
And also in other verses Odysseus says that this is the best pastime, when, as men are enjoying good cheer,
<<<
The banqueters, seated in order due
Throughout the hall, may hear a minstrel sing.^^[[3|Rackham: Book: 8, Section: 1338a, Note: 3]]^^
<<<
It is clear therefore that there is a form of education in which boys should be trained not because it is useful or necessary but as being liberal and noble; though whether there is one such subject of education or several, and what these are and how they are to be pursued, must be discussed later,^^[[4|Rackham: Book: 8, Section: 1338a, Note: 4]]^^ but as it is we have made this much progress on the way, that we have some testimony even from the ancients, derived from the courses of education which they founded—for the point is proved by music. And it is also clear that some of the useful subjects as well ought to be studied by the young not only because of their utility, like the study of reading and writing, but also because they may lead on to many other branches of knowledge; and similarly they should study drawing not in order that they may not go wrong in their private purchases and may avoid being cheated in buying and selling furniture,
This line is not in our __Odyssey__, but apparently followed http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Od.%2017.383&lang=original. The passage runs (382 ff.):
<<<
τίς γὰρ δὴ ξεῖνον καλεῖ ἄλλοθεν αὐτὸς ἐπελθὼν
ἄλλον γ᾽, εἰ μὴ τῶν οἳ δημιοεργοὶ ἔασι,
μάντιν ἢ ἰητῆρα κακῶν ἢ τέκτονα δούρων,
ἢ καὶ θέσπιν ἀοιδόν, ὅ κεν τέρπῃσιν ἀείδων;
<<<
The fourth line quoted corresponds to this, but not exactly.
http://www.perseus.tufts.edu/hopper/text?doc=Hom.%20Od.%209.5&lang=original.
This promise is not fulfilled.
but rather because this study makes a man observant of bodily beauty; and to seek for utility everywhere is entirely unsuited to men that are great-souled and free. And since it is plain that education by habit must come before education by reason, and training of the body before training of the mind, it is clear from these considerations that the boys must be handed over to the care of the wrestling-master and the trainer; for the latter imparts a certain quality to the habit of the body and the former to its actions.
Now at the present time some of the states reputed to pay the greatest attention to children produce in them an athletic habit^^[[1|Rackham: Book: 8, Section: 1338b, Note: 1]]^^ to the detriment of their bodily form and growth, while the Spartans although they have avoided this error yet make their boys animal in nature by their laborious exercises, in the belief that this is most contributory to manly courage. Yet, as has often been said, it is not right to regulate education with a view to one virtue only, or to this one most of all; indeed they do not even investigate the question whether this virtue is to be had in view at all. For neither in the lower animals nor in the case of foreign races do we see that courage goes with the wildest, but rather with the gentler and lion-like temperaments.^^[[2|Rackham: Book: 8, Section: 1338b, Note: 2]]^^ And there are manyforeign races inclined to murder and cannibalism, for example among the tribes of the Black Sea the Achaeans and Heniochi, and others of the mainland races, some in the same degree as those named and some more, which although piratical have got no share of manly courage. And again we know that even the Spartans, although so long as they persisted by themselves in their laborious exercises they surpassed all other peoples, now fall behind others both in gymnastic and in military contests; for they used not to excel because they exercised their young men in this fashion but only because they trained and their adversaries did not. Consequently honor and not animal ferocity should play the first part; for it is not a wolf nor one of the other wild animals that will venture upon any noble hazard, but rather a good man. But those who let boys pursue these hard exercises too much and turn them out untrained in necessary things in real truth render them vulgar, making them available for statesmanship to use for one task only, and even for this task training them worse than others do, as our argument proves. And^^[[3|Rackham: Book: 8, Section: 1338b, Note: 3]]^^ we must not judge them from their former achievements but from the facts of today; for they have rivals in their education now, but they used to have none before.
It is therefore agreed that we should employ gymnastic training, and how we should employ it. For until puberty we should apply lighter exercises, forbidding hard diet and severe exertions, in order that nothing may hinder the growth;
i.e. premature and disproportionate muscular development, directed to some particular competition. Cf. 1288b 12 ff.
http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20HA%20629b.8&lang=original (the lion is gentle except when hungry); http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Soph.%20231a&lang=original (the dog the gentlest of animals).
This sentence would come better at the end of 3.4.
for there is no small proof that too severe training can produce this result in the fact that in the list of Olympic victors one would only find two or three persons who have won both as men and as boys, because when people go into training in youth the severe exercises rob them of their strength. But when they have spent three years after puberty upon their other studies, then it is suitable to occupy the next period of life with laborious exercises and strict training diet^^[[1|Rackham: Book: 8, Section: 1339a, Note: 1]]^^; for it is wrong to work hard with the mind and the body at the same time; for it is the nature of the two different sorts of exertion to produce opposite effects, bodily toil impeding the development of the mind and mental toil that of the body.
About music on the other hand we have previously raised some questions in the course of our argument, but it is well to take them up again and carry them further now, in order that this may give the key so to speak for the principles which one might advance in pronouncing about it. For it is not easy to say precisely what potency it possesses, nor yet for the sake of what object one should participate in it—whether for amusement and relaxation, as one indulges in sleep and deep drinking (for these in themselves are not serious pursuits but merely pleasant, and ‘relax our care,’ as Euripides says^^[[2|Rackham: Book: 8, Section: 1339a, Note: 2]]^^; owing to which people actually class music with them andemploy all of these things, sleep, deep drinking and music, in the same way, and they also place dancing in the same class); or whether we ought rather to think that music tends in some degree to virtue (music being capable of producing a certain quality of character just as gymnastics are capable of producing a certain quality of body, music accustoming men to be able to rejoice rightly); or that it contributes something to intellectual entertainment^^[[3|Rackham: Book: 8, Section: 1339a, Note: 3]]^^ and culture (for this must be set down as a third alternative among those mentioned). Now it is not difficult to see that one must not make amusement the object of the education of the young; for amusement does not go with learning—learning is a painful process. Nor yet moreover is it suitable to assign intellectual entertainment to boys and to the young; for a thing that is an end does not belong to anything that is imperfect. But perhaps it might be thought that the serious pursuits of boys are for the sake of amusement when they have grown up to be men. But, if something of this sort is the case, why should the young need to learn this accomplishment themselves, and not, like the Persian and Median kings, participate in the pleasure and the education of music by means of others performing it? for those who have made music a business and profession must necessarily perform better than those who practise only long enough to learn. But if it is proper for them to labor at accomplishments of this sort, then it would also be right for them to prepare the dishes of an elaborate cuisine; but this is absurd. And the same difficulty also arises as to the question whether learning music can improve their characters; for why should they learn to perform edifying music themselves,
i.e. compulsion to eat very large rations of prescribed food—the Greek way of training.
http://www.perseus.tufts.edu/hopper/text?doc=Eur.%20Ba.%20378&lang=original (Bromios) ὃς τάδ᾽ ἔχει, θιασεύειν τε χόροις μετά τ᾽ αὐλῶν γελᾶσαι ἀναπαῦσαί τε μερίμνας
The term διαγωγή, ‘pastime,’ is idiomatically used of the pursuits of cultured leisure—serious conversation, music, the drama.
instead of learning to enjoy it rightly and be able to judge it when they hear others performing, as the Spartans do? for the Spartans although they do not learn to perform can nevertheless judge good and bad music correctly, so it is said. And the same argument applies also if music is to be employed for refined enjoyment and entertainment; why need people learn to perform themselves instead of enjoying music played by others? And we may consider the conception that we have about the gods: Zeus does not sing and harp to the poets himself. But professional musicians we speak of as vulgar people, and indeed we think it not manly to perform music, except when drunk or for fun.
But perhaps these points will have to be considered afterwards; our first inquiry is whether music ought not or ought to be included in education, and what is its efficacy among the three uses of it that have been discussed—does it serve for education or amusement or entertainment? It is reasonable to reckon it under all of these heads, and it appears to participate in them all. Amusement is for the sake of relaxation, and relaxation must necessarily be pleasant, for it is a way of curing the pain due to laborious work; also entertainment ought admittedly to be not only honorable but also pleasant, for happiness is derived from both honor and pleasure;but we all pronounce music to be one of the pleasantest things, whether instrumental or instrumental and vocal music together (at least Musaeus^^[[1|Rackham: Book: 8, Section: 1339b, Note: 1]]^^ says, ‘Song is man's sweetest joy,’ and that is why people with good reason introduce it at parties and entertainments, for its exhilarating effect), so that for this reason also one might suppose that the younger men ought to be educated in music. For all harmless pleasures are not only suitable for the ultimate object but also for relaxation; and as it but rarely happens for men to reach their ultimate object, whereas they often relax and pursue amusement not so much with some ulterior object but because of the pleasure of it, it would be serviceable to let them relax at intervals in the pleasures derived from music. But it has come about that men make amusements an end; for the end also perhaps contains a certain pleasure, but not any ordinary pleasure, and seeking this they take the other as being this because it has a certain resemblance to the achievement of the end of their undertakings. For the end is desirable not for the sake of anything that will result from it, and also pleasures of the sort under consideration are not desirable for the sake of some future result, but because of things that have happened already, for instance labor and pain. One might then perhaps assume this to be the reason which causes men to seek to procure happiness by means of those pleasures; but in the case of taking part in music, this is not because of this reason only, but also because performing music is useful, as it seems, for relaxation. But nevertheless we must examine whether it is not the case that, although this has come about,
A semi-legendary bard, to whom a number of oracular verses that were current were attributed.
yet the nature of music is more honorable than corresponds with the employment of it mentioned, and it is proper not only to participate in the common pleasure that springs from it, which is perceptible to everybody (for the pleasure contained in music is of a natural kind, owing to which the use of it is dear to those of all ages and characters), but to see if its influence reaches also in a manner to the character and to the soul. And this would clearly be the case if we are affected in our characters in a certain manner by it. But it is clear that we are affected in a certain manner, both by many other kinds of music and not least by the melodies of Olympus^^[[1|Rackham: Book: 8, Section: 1340a, Note: 1]]^^; for these admittedly make our souls enthusiastic, and enthusiasm is an affection of the character of the soul. And moreover everybody when listening to imitations^^[[2|Rackham: Book: 8, Section: 1340a, Note: 2]]^^ is thrown into a corresponding state of feeling, even apart from the rhythms and tunes themselves.^^[[3|Rackham: Book: 8, Section: 1340a, Note: 3]]^^ And since it is the case that music is one of the things that give pleasure, and that virtue has to do with feeling delight and love and hatred rightly, there is obviously nothing that it is more needful to learn and become habituated to than to judge correctly and to delight in virtuous characters and noble actions; but rhythms and melodies contain representations of angerand mildness, and also of courage and temperance and all their opposites and the other moral qualities, that most closely correspond to the true natures of these qualities (and this is clear from the facts of what occurs—when we listen to such representations we change in our soul); and habituation in feeling pain and delight at representations of reality is close to feeling them towards actual reality (for example, if a man delights in beholding the statue of somebody for no other reason than because of its actual form, the actual sight of the person whose statue he beholds must also of necessity give him pleasure); and it is the case that whereas the other objects of sensation contain no representation of character, for example the objects of touch and taste (though the objects of sight do so slightly, for there are forms that represent character, but only to a small extent, and not^^[[4|Rackham: Book: 8, Section: 1340a, Note: 4]]^^ all men participate in visual perception of such qualities; also visual works of art are not representations of character but rather the forms and colors produced are mere indications of character, and these indications are only bodily sensations during the emotions; not but what in so far as there is a difference even in regard to the observation of these indications,^^[[5|Rackham: Book: 8, Section: 1340a, Note: 5]]^^ the young must not look at the works of Pauson but those of Polygnotus,^^[[6|Rackham: Book: 8, Section: 1340a, Note: 6]]^^ and of any other moral painter or sculptor), pieces of music on the contrary do actually contain in them selves imitations of character; and this is manifest, for even in the nature of the mere melodies there are differences, so that people when hearing them are affected differently and have not the same feelings in regard to each of them, but listen to some in a more mournful and restrained state,
A Phrygian composer of the seventh century B.C.
Music dramatically expressing various states of emotion.
A probable correction of the Greek gives ‘by the rhythms and tunes themselves, even apart from the words.’
‘Not’ is a conjectural insertion.
i.e. these visual impressions do vary to some extent in moral effect.
Pauson is a painter otherwise little known. Polygnotus decorated the Stoa Poikile and other famous public buildings at Athens, in the middle of the 5th century B.C. ‘Polygnotus represented men as better than they really were, Pauson as worse’ (http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Poet.%201448a.5&lang=original).
for instance the mode called Mixolydian, and to others in a softer state of mind, but in a midway state and with the greatest composure to another, as the Dorian mode alone of tunes seems to act, while the Phrygian makes men enthusiastic; for these things are well stated by those who have studied this form of education, as they derive the evidence for their theories from the actual facts of experience. And the same holds good about the rhythms also, for some have a more stable and others a more emotional character, and of the latter some are more vulgar in their emotional effects and others more liberal. From these considerations therefore it is plain that music has the power of producing a certain effect on the moral character of the soul, and if it has the power to do this, it is clear that the young must be directed to music and must be educated in it. Also education in music is well adapted to the youthful nature; for the young owing to their youth cannot endure any thing not sweetened by pleasure, and music is by nature a thing that has a pleasant sweetness. And we seem to have a certain affinity with tunes and rhythms; owing to which many wise men say either that the soul is a harmony or that it has harmony.^^[[1|Rackham: Book: 8, Section: 1340b, Note: 1]]^^
We ought now to decide the question raised earlier, whether the young ought to learn music by singing and playing themselves or not. It is not difficult to see that it makes a great difference in the process of acquiring a certain quality whether one takes a part in the actions that impart it oneself; for it is a thing that is impossible, or difficult, to become a good judge of performances if one has not taken part in them. At the same time also boys must have some occupation, and one must think Archytas's rattle^^[[2|Rackham: Book: 8, Section: 1340b, Note: 2]]^^ a good invention, which people give to children in order that while occupied with this they may not break any of the furniture; for young things cannot keep still. Whereas then a rattle is a suitable occupation for infant children, education serves as a rattle for young people when older. Such considerations therefore prove that children should be trained in music so as actually to take part in its performance; and it is not difficult to distinguish what is suitable and unsuitable for various ages, and to refute those who assert that the practice of music is vulgar. For first, inasmuch as it is necessary to take part in the performances for the sake of judging them, it is therefore proper for the pupils when young actually to engage in the performances, though when they get older they should be released from performing, but be able to judge what is beautiful and enjoy it rightly because of the study in which they engaged in their youth. Then as to the objection raised by some people that music makes people vulgar, it is not difficult to solve it by considering how far pupils who are being educated with a view to civic virtue should take part in the actual performance of music,
The former doctrine is Pythagorean, the latter is stated by http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Phaedo%2093&lang=original.
Archytas a Pythagorean philosopher, mathematician, statesman, and general of Tarentum, contemporary with Plato. He was interested in mechanics; but one tradition ascribes the toy in question to a carpenter of the same name.
and in what times and what rhythms they should take part, and also what kinds of instruments should be used in their studies, as this naturally makes a difference. For the solution of the objection depends upon these points, as it is quite possible that some modes of music do produce the result mentioned. It is manifest therefore that the study of music must not place a hindrance in the way of subsequent activities, nor vulgarize the bodily frame and make it useless for the exercises of the soldier and the citizen, either for their practical pursuit now or for their scientific study later on.^^[[1|Rackham: Book: 8, Section: 1341a, Note: 1]]^^ And this would come about in respect of their study if the pupils did not go on toiling at the exercises that aim at professional competitions, nor the wonderful and elaborate performances which have now entered into the competitions and have passed from the competitions into education, but also only practised exercises not of that sort until they are able to enjoy beautiful tunes and rhythms, and not merely the charm common to all music, which even some lower animals enjoy, as well as a multitude of slaves and children. And it is also clear from these considerations what sort of instruments they should use. Flutes must not be introduced into education, nor any other professional instrument, such as the harp or any other of that sort, butsuch instruments as will make them attentive pupils either at their musical training or in their other lessons. Moreover the flute is not a moralizing but rather an exciting influence, so that it ought to be used for occasions of the kind at which attendance has the effect of purification rather than instruction.^^[[2|Rackham: Book: 8, Section: 1341a, Note: 2]]^^ And let us add that the flute happens to possess the additional property telling against its use in education that playing it prevents the employment of speech. Hence former ages rightly rejected its use by the young and the free, although at first they had employed it. For as they came to have more leisure because of their wealth and grew more high-spirited and valorous, both at a still earlier date and because after the Persian Wars they were filled with pride as a result of their achievements, they began to engage in all branches of learning, making no distinction but pursuing research further. Because of this they even included flute-playing among their studies; for in Sparta a certain chorus-leader played the flute to his chorus himself,^^[[3|Rackham: Book: 8, Section: 1341a, Note: 3]]^^ and at Athens it became so fashionable that almost the majority of freemen went in for flute-playing, as is shown by the tablet erected by Thrasippus after having provided the chorus for Ecphantides.^^[[4|Rackham: Book: 8, Section: 1341a, Note: 4]]^^ But later on it came to be disapproved of as a result of actual experience, when men were more capable of judging what music conduced to virtue and what did not; and similarly also many of the old instruments were disapproved of, like the pectis and the barbitos^^[[5|Rackham: Book: 8, Section: 1341a, Note: 5]]^^ and the instruments designed to give pleasure to those who hear people playing them,^^[[6|Rackham: Book: 8, Section: 1341a, Note: 6]]^^ the septangle, the triangle and the sambyc,^^[[7|Rackham: Book: 8, Section: 1341a, Note: 7]]^^
It is difficult not to think that either the nouns or the adverbs in the Greek have been erroneously transposed, and that we should translate ‘either for learning them now or for practising them later on.’
A wealthy citizen who undertook the duty of equipping and training a chorus for a religious celebration (especially the production of a drama at Athens) usually had an assistant of lower station to supply the instrumental music. The office of choregus is not elsewhere referred to as existing at Sparta.
Ecphantides was one of the earliest comic poets; Thrasippus is not elsewhere recorded. Who the flute-player was is unknown.
These were old-fashioned forms of the lyre.
A possible emendation of the Greek gives ‘those who listen to their modulations.’
Three different stringed instruments, the last having four strings stretched in a triangular frame.
and all the instruments that require manual skill.And indeed there is a reasonable foundation for the story that was told by the ancients about the flute. The tale goes that Athena found a flute and threw it away. Now it is not a bad point in the story that the goddess did this out of annoyance because of the ugly distortion of her features; but as a matter of fact it is more likely that it was because education in flute-playing has no effect on the intelligence, whereas we attribute science and art to Athena.
And since we reject professional education in the instruments and in performance^^[[1|Rackham: Book: 8, Section: 1341b, Note: 1]]^^ (and we count performance in competitions as professional, for the performer does not take part in it for his own improvement, but for his hearers' pleasure, and that a vulgar pleasure, owing to which we do not consider performing to be proper for free men, but somewhat menial; and indeed performers do become vulgar, since the object at which they aim is a low one, as vulgarity in the audience usually influences the music, so that it imparts to the artists who practise it with a view to suit the audience a special kind of personality, and also of bodily frame because of the movements required)—we must therefore give some consideration to tunes and rhythms,and to the question whether for educational purposes we must employ all the tunes and all the rhythms or make distinctions; and next, whether for those who are working at music for education we shall lay down the same regulation, or ought we to establish some other third one (inasmuch as we see that the factors in music are melody and rhythm, and it is important to notice what influence each of these has upon education), and whether we are to prefer music with a good melody or music with a good rhythm. Now we consider that much is well said on these matters by some of the musicians of the present day and by some of those engaged in philosophy who happen to be experienced in musical education, and we will abandon the precise discussion as to each of these matters for any who wish it to seek it from those teachers, while for the present let us lay down general principles, merely stating the outlines of the subjects. And since we accept the classification of melodies made by some philosophers, as ethical melodies, melodies of action, and passionate melodies,^^[[2|Rackham: Book: 8, Section: 1341b, Note: 2]]^^ distributing the various harmonies among these classes as being in nature akin to one or the other, and as we say that music ought to be employed not for the purpose of one benefit that it confers but on account of several (for it serves the purpose both of education and of purgation—the term purgation we use for the present without explanation, but we will return to discuss the meaning that we give to it more explicitly in our treatise on poetry^^[[3|Rackham: Book: 8, Section: 1341b, Note: 3]]^^—and thirdly it serves for amusement, serving to relax our tension and to give rest from it),
The Greek should probably be altered to give ‘reject, some instruments and professional education in performance.’
i.e. representative of character, of action and of emotion.
In http://www.perseus.tufts.edu/hopper/text?doc=Aristot.%20Poet.%201449b&lang=original tragedy is said to purge the emotion of pity and fear by giving them an outlet; the reference here is probably to the lost Second Book of __Poetics__.
it is clear that we should employ all the harmonies, yet not employ them all in the same way, but use the most ethical ones for education, and the active and passionate kinds for listening to when others are performing (for any experience that occurs violently in some souls is found in all, though with different degrees of intensity—for example pity and fear, and also religious excitement; for some persons are very liable to this form of emotion, and under the influence of sacred music we see these people, when they use tunes that violently arouse the soul, being thrown into a state as if they had received medicinal treatment and taken a purge; the same experience then must come also to the compassionate and the timid and the other emotional people generally in such degree as befalls each individual of these classes, and all must undergo a purgation and a pleasant feeling of relief; and similarly also the purgative melodies afford harmless delight to people). Therefore those who go in for theatrical music must be set to compete in harmonies and melodies of this kind (and since the audience is of two classes, one freemen and educated people, and the otherthe vulgar class composed of mechanics and laborers and other such persons, the latter sort also must be assigned competitions and shows for relaxation; and just as their souls are warped from the natural state, so those harmonies and melodies that are highly strung and irregular in coloration^^[[1|Rackham: Book: 8, Section: 1342a, Note: 1]]^^ are deviations, but people of each sort receive pleasure from what is naturally suited to them, owing to which the competitors before an audience of this sort must be allowed to employ some such kind of music as this); but for education, as has been said,^^[[2|Rackham: Book: 8, Section: 1342a, Note: 2]]^^ the ethical class of melodies and of harmonies must be employed. And of that nature is the Dorian mode, as we said before^^[[3|Rackham: Book: 8, Section: 1342a, Note: 3]]^^; but we must also accept any other mode that those who take part in the pursuit of philosophy and in musical education may recommend to us. Socrates in the __Republic__^^[[4|Rackham: Book: 8, Section: 1342a, Note: 4]]^^ does not do well in allowing only the Phrygian mode along with the Dorian, and that when he has rejected the flute among instruments;
Said to mean divergent from the regular scale in having smaller intervals.
http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Rep.%20399a&lang=original
for the Phrygian mode has the same effect among harmonies as the flute among instruments—both are violently exciting and emotional. This is shown by poetry; for all Bacchiac versification and all movement of that sort^^[[1|Rackham: Book: 8, Section: 1342b, Note: 1]]^^ belongs particularly to the flute among the instruments, and these meters find their suitable accompaniment in tunes in the Phrygian mode among the harmonies: for example the dithyramb is admittedly held to be a Phrygian meter, and the experts on this subject adduce many instances to prove this, particularly the fact that Philoxenus when he attempted to compose a dithyramb, __The Mysians__, in the Dorian mode was unable to do so, but merely by the force of nature fell back again into the suitable harmony, the Phrygian. And all agree that the Dorian mode is more sedate and of a specially manly character. Moreover since we praise and say that we ought to pursue the mean between extremes, and the Dorian mode has this nature in relation to the other harmonies, it is clear that it suits the younger pupils to be educated rather in the Dorian melodies. But there are two objects to aim at, the possible as well as the suitable; for we are bound rather to attempt the things that are possible and those that are suitable for the particular class of people concerned; and in these matters also there are dividing lines drawn by the ages—for instance, those whose powers have waned through lapse of time cannot easily sing the highly strung harmonies, but to persons of that age nature suggests the relaxed harmonies. Therefore some musical experts also rightly criticize Socrates^^[[2|Rackham: Book: 8, Section: 1342b, Note: 2]]^^ because he disapproved of the relaxed harmonies for amusement, taking them to have the character of intoxication, not in the sense of the effect of strong drink, for that clearly has more the result of making men frenzied revellers, but as failing in power. Hence even with a view to the period of life that is to follow, that of the comparatively old, it is proper to engage in the harmonies and melodies of this kind too, and also any kind of harmony that is suited to the age of boyhood because it is capable of being at once decorous and educative, which seems to be the nature of the Lydian mode most of all the harmonies. It is clear therefore that we should lay down these three canons to guide education, moderation, possibility and suitability.
Or perhaps βακχεία and κίνησις denote bodily movement accompanying the song; or they may denote the emotional frenzy expressed and stimulated by it. The dithyramb was a form of poetry of this class, originally celebrating the birth of Dionysus. Philoxenus, one of the most famous dithyrambic poets, 435-380 B.C., lived at Athens, and later at the court of Dionysius of Syracuse.
http://www.perseus.tufts.edu/hopper/text?doc=Plat.%20Rep.%20338e&lang=original