From 61e5e92b1403b6ef1f492c36dab8cad651fa91c0 Mon Sep 17 00:00:00 2001 From: wraitii Date: Sun, 29 Nov 2015 19:19:20 +0000 Subject: [PATCH] Update/revamp my template analyzer tool. Remove the useless "fancy" data in favor of a simpler visualization of templates, adding an in-place tool to filter and sort (for convenience). This was SVN commit r17331. --- .../tools/templatesanalyzer/CreateRMTest.py | 81 -- source/tools/templatesanalyzer/Readme.txt | 115 +-- source/tools/templatesanalyzer/style.css | 155 +--- .../tablefilter/style/colsVisibility.css | 6 + .../tablefilter/style/filtersVisibility.css | 6 + .../tablefilter/style/tablefilter.css | 22 + .../tablefilter/style/themes/blank.png | 3 + .../style/themes/btn_clear_filters.png | 3 + .../tablefilter/style/themes/btn_filter.png | 3 + .../style/themes/btn_first_page.gif | Bin 0 -> 63 bytes .../style/themes/btn_last_page.gif | Bin 0 -> 61 bytes .../style/themes/btn_next_page.gif | Bin 0 -> 59 bytes .../style/themes/btn_previous_page.gif | Bin 0 -> 58 bytes .../style/themes/default/default.css | 6 + .../style/themes/default/images/bg_infDiv.jpg | Bin 0 -> 303 bytes .../style/themes/default/images/bg_th.jpg | Bin 0 -> 326 bytes .../themes/default/images/btn_eraser.gif | Bin 0 -> 356 bytes .../themes/default/images/btn_first_page.gif | Bin 0 -> 332 bytes .../themes/default/images/btn_last_page.gif | Bin 0 -> 331 bytes .../themes/default/images/btn_next_page.gif | Bin 0 -> 187 bytes .../themes/default/images/btn_over_eraser.gif | Bin 0 -> 440 bytes .../default/images/btn_over_first_page.gif | Bin 0 -> 640 bytes .../default/images/btn_over_last_page.gif | Bin 0 -> 427 bytes .../default/images/btn_over_next_page.gif | Bin 0 -> 393 bytes .../default/images/btn_over_previous_page.gif | Bin 0 -> 395 bytes .../default/images/btn_previous_page.gif | Bin 0 -> 290 bytes .../themes/default/images/img_loading.gif | Bin 0 -> 3236 bytes .../tablefilter/style/themes/downsimple.png | 3 + .../tablefilter/style/themes/icn_clp.png | 3 + .../tablefilter/style/themes/icn_exp.png | 3 + .../tablefilter/style/themes/icn_filter.gif | Bin 0 -> 68 bytes .../style/themes/icn_filterActive.gif | Bin 0 -> 78 bytes .../themes/mytheme/images/bg_headers.jpg | Bin 0 -> 300 bytes .../style/themes/mytheme/images/bg_infDiv.jpg | Bin 0 -> 303 bytes .../themes/mytheme/images/btn_filter.png | 3 + .../themes/mytheme/images/btn_first_page.gif | Bin 0 -> 63 bytes .../themes/mytheme/images/btn_last_page.gif | Bin 0 -> 61 bytes .../themes/mytheme/images/btn_next_page.gif | Bin 0 -> 59 bytes .../mytheme/images/btn_previous_page.gif | Bin 0 -> 58 bytes .../themes/mytheme/images/img_loading.gif | Bin 0 -> 8787 bytes .../style/themes/mytheme/mytheme.css | 6 + .../themes/skyblue/images/bg_skyblue.gif | Bin 0 -> 554 bytes .../themes/skyblue/images/btn_first_page.gif | Bin 0 -> 118 bytes .../themes/skyblue/images/btn_last_page.gif | Bin 0 -> 118 bytes .../themes/skyblue/images/btn_next_page.gif | Bin 0 -> 97 bytes .../themes/skyblue/images/btn_prev_page.gif | Bin 0 -> 97 bytes .../skyblue/images/icn_clear_filters.png | 3 + .../themes/skyblue/images/img_loading.gif | Bin 0 -> 847 bytes .../style/themes/skyblue/skyblue.css | 6 + .../tablefilter/style/themes/upsimple.png | 3 + .../tablefilter/tablefilter.js | 10 + .../templatesanalyzer/tablefilter/tf-1.js | 8 + source/tools/templatesanalyzer/unitTables.py | 730 +++++++----------- 53 files changed, 420 insertions(+), 758 deletions(-) delete mode 100755 source/tools/templatesanalyzer/CreateRMTest.py create mode 100644 source/tools/templatesanalyzer/tablefilter/style/colsVisibility.css create mode 100644 source/tools/templatesanalyzer/tablefilter/style/filtersVisibility.css create mode 100644 source/tools/templatesanalyzer/tablefilter/style/tablefilter.css create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/blank.png create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/btn_clear_filters.png create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/btn_filter.png create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/btn_first_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/btn_last_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/btn_next_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/btn_previous_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/default.css create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/bg_infDiv.jpg create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/bg_th.jpg create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_eraser.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_first_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_last_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_next_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_eraser.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_first_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_last_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_next_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_previous_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_previous_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/default/images/img_loading.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/downsimple.png create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/icn_clp.png create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/icn_exp.png create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/icn_filter.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/icn_filterActive.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/bg_headers.jpg create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/bg_infDiv.jpg create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/btn_filter.png create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/btn_first_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/btn_last_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/btn_next_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/btn_previous_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/img_loading.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/mytheme.css create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/bg_skyblue.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_first_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_last_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_next_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_prev_page.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/icn_clear_filters.png create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/img_loading.gif create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/skyblue.css create mode 100644 source/tools/templatesanalyzer/tablefilter/style/themes/upsimple.png create mode 100644 source/tools/templatesanalyzer/tablefilter/tablefilter.js create mode 100644 source/tools/templatesanalyzer/tablefilter/tf-1.js diff --git a/source/tools/templatesanalyzer/CreateRMTest.py b/source/tools/templatesanalyzer/CreateRMTest.py deleted file mode 100755 index 41c92c8e7b..0000000000 --- a/source/tools/templatesanalyzer/CreateRMTest.py +++ /dev/null @@ -1,81 +0,0 @@ -import xml.etree.ElementTree as ET -import os - -# This script creates the RM demo map "Balance Test" with units defined as such: - -Civs = ["rome","pers"] - -if len (Civs) != 2: - sys.exit("You should only input two civilizations to compare") - -CivBuildings = ["civil_centre", "barracks","gymnasion", "stables", "elephant_stables", "fortress", "embassy_celtic", "embassy_italiote", "embassy_iberian"] -#CivBuildings = ["civil_centre", "barracks"] - -# Remote Civ templates with those strings in their name. -FilterOut = ["hero", "mecha", "support"] - - -############################################################ -# Load Civ specific templates -# Will be loaded by loading buildings, and templates will be set the Civ building, the Civ and in general. -# Allows to avoid special units. -CivData = {}; - -os.chdir(os.path.realpath(__file__).replace("CreateRMTest.py","") + "../../../binaries/data/mods/public/simulation/templates/") - -for Civ in Civs: - CivData[Civ] = {} - for building in CivBuildings: - bdTemplate = "./structures/" + Civ + "_" + building + ".xml" - TrainableUnits = [] - if (os.path.isfile(bdTemplate)): - Template = ET.parse(bdTemplate) - if (Template.find("./ProductionQueue/Entities") != None): - TrainableUnits = Template.find("./ProductionQueue/Entities").text.replace(" ","").replace("\t","").split("\n") - # We have the templates this building can train. - for UnitFile in TrainableUnits: - breakIt = False - for filter in FilterOut: - if UnitFile.find(filter) != -1: breakIt = True - if breakIt: continue - - if (os.path.isfile(UnitFile + ".xml")): - if UnitFile not in CivData[Civ]: - CivData[Civ][UnitFile] = UnitFile - -print (CivData[Civs[0]]) - -basePath = os.path.realpath(__file__).replace("CreateRMTest.py","") + "../../maps/random/" - -f = open(basePath + 'demo_testBalance.js', 'w') - -f.write("RMS.LoadLibrary(\"rmgen\");\n\nlog(\"Initializing map...\");\n\nInitMap();\n\nvar fx = fractionToTiles(0.5);\nvar fz = fractionToTiles(0.5);\n\nplaceObject(fractionToTiles(0.4), fz, \"special/trigger_point_A\", 0, 0);\n\nplaceObject(fractionToTiles(0.6), fz, \"special/trigger_point_B\", 0, 0);\n\nplaceObject(fx, fz, \"special/trigger_point_C\", 0, 0);\n\n// Export map data\nExportMap();\n") - -f = open(basePath + 'demo_testBalance.json', 'w') - -f.write("{\n \"settings\" : {\n \"Name\" : \"Balance Demo\",\n \"Script\" : \"demo_testBalance.js\",\n \"Description\" : \"Test the unit Balance in a trigger map. Change the triggers to change the units created.\",\n \"BaseTerrain\" : [\"medit_sea_depths\"],\n \"BaseHeight\" : 30,\n \"CircularMap\" : true,\n \"Keywords\": [\"demo\"],\n \"TriggerScripts\": [\n \"scripts/TriggerHelper.js\",\n \"random/demo_testBalance_triggers.js\"\n ],\n \"XXXXXX\" : \"Optionally define other things here, like we would for a scenario\"\n }\n}\n") - -f = open(basePath + 'demo_testBalance_triggers.js', 'w') - -f.write("Trigger.prototype.StartAWave = function()\n{\n var cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);\n var attackerEntity = [") - -start = True -for Unit in CivData[Civs[0]]: - if start == False: - f.write( ",") - if start == True: - start = False - f.write("\"" + Unit + "\"") - -f.write("];\n var defenderEntity = [") - -start = True -for Unit in CivData[Civs[1]]: - if start == False: - f.write( ",") - if start == True: - start = False - f.write("\"" + Unit + "\"") - -f.write("];\n var count = 75;\n\n var pos = Engine.QueryInterface(this.GetTriggerPoints(\"C\")[0], IID_Position).GetPosition();\n\n var cmd = {\"x\" : pos.x, \"z\" : pos.z};\n cmd.type = \"attack-walk\";\n cmd.queued = true;\n cmd.entities = [];\n\n // spawn attackers\n for (var o = 0; o < count; ++o)\n {\n var rand = Math.floor(Math.random() * attackerEntity.length);\n if (rand == attackerEntity.length) rand = attackerEntity - 1;\n var attackers = TriggerHelper.SpawnUnitsFromTriggerPoints(\"A\", attackerEntity[rand], 1, 1);\n for each (var i in attackers)\n cmd.entities.push(i[0]);\n ProcessCommand(1, cmd);\n }\n\n cmd.entities = [];\n for (var o = 0; o < count; ++o)\n {\n var rand = Math.floor(Math.random() * defenderEntity.length);\n if (rand == defenderEntity.length) rand = attackerEntity - 1;\n var defenders = TriggerHelper.SpawnUnitsFromTriggerPoints(\"B\", defenderEntity[rand], 1, 2);\n for each (var i in defenders)\n cmd.entities.push(i[0]);\n ProcessCommand(2, cmd);\n }\n\n cmpTrigger.DoAfterDelay(180000, \"StartAnEnemyWave\", {}); // The next wave will come in 2 minutes\n}\n\nTrigger.prototype.InitGame = function()\n{\n}\n\nvar cmpTrigger = Engine.QueryInterface(SYSTEM_ENTITY, IID_Trigger);\ncmpTrigger.DoAfterDelay(0, \"StartAWave\", {});\n") - diff --git a/source/tools/templatesanalyzer/Readme.txt b/source/tools/templatesanalyzer/Readme.txt index 105d2ecac8..31284661d1 100644 --- a/source/tools/templatesanalyzer/Readme.txt +++ b/source/tools/templatesanalyzer/Readme.txt @@ -1,110 +1,29 @@ Template Analyzer. -This python tool has been written by wraitii. Its purpose is to help with balancing and "rock-paper-scissors" mechanic and provide some easy-to-read data about civilizations and units. Take its results with a grain of salt: the in-game results can vary based on micromanaging, pathfinding issues, and sheer luck. However, my testings so far have shown it's usually not too wrong, and I think that assuming two equal players the data will be somewhat accurate. +This python tool has been written by wraitii. Its purpose is to help with unit and civ balancing by allowing quick comparison between important template data. -Note that this doesn’t account for techs and building costs, or auras and things like that. +Run it using "python unitTables.py" or "pypy unitTables.py" if you have pypy installed. + +The output will be located in an HTML file called "unit_summary_table.html" in this folder. -Mod makers that would like to compare your units with vanilla's: read "Customizing unitTables" below. +The script gives 3 informations: +-A comparison table of generic templates. +-A comparison table of civilization units (it shows the differences with the generic templates) +-A comparison of civilization rosters. -######################################################################## -######################################################################## -1. unitTables.py +The script can be customized to change the units that are considered, since loading all units make sit slightly unreadable. +By default it loads all citizen soldiers and all champions. -This is the main script, the one which returns the comparison tables. It has 6 kinds of output, and many parameters. - ------------------------------------------------------------- -- Unit Tables - -Those are shown for generic templates and can be activated for civs (see below). It basically lists some unit stats so you don't have to check the templates. +To change this, change the "LoadTemplatesIfParent" variable. +You can also consider only some civilizations. +You may also filter some templates based on their name, if you want to remove specific templates. ------------------------------------------------------------- -- Unit Comparison Matrix - -Those are the two side-by-side big tables. The left one uses a Green-Yellow-Red color Scheme, the right one a Red-white-Green. +The HTML page comes with a JS extension that allows to filter and sort in-place, to help with comparisons. You can disable this by disabling javascript or by changing the "AddSortingOverlay" parameter in the script. -The matrix on the left shows how strong a unit is compared to another one in fight. This calculation does not take costs into account, its purpose is to yield an indicator of who would win in an arena fight. Results are somewhat inaccurate for ranged units, particularly in ranged vs melee fights, as micro takes a really big importance for those. -A completely red value means the unit cannot win this fight, and that 100 units would only do minimal damage to the enemy, whilst being completely destroyed. -Yellow means that the two units are fairly equivalent, and a well microed fight would end up in a stalemate, more or less. -Green means the unit is stronger. Full Green means 4 times stronger, and any higher value would still be shown as full green. Elephants for example can sometimes be up to 10/20 stronger, which will not be shown. +This extension, called TableFilter, is released under the MIT license. The version I used was the one found at https://github.com/koalyptus/TableFilter/ -The matrix on the right shows hardcoded counters. Greener means higher counter. A value of 2.5 is full green. Red values show units that are less effective at attacking other units. Full Red can mean that the unit cannot attack this kind of enemy (for example women can't attack anything, basically). - - ------------------------------------------------------------- -- Unit Worthiness - -Those are the Red/Blue pyramids. Those show how powerful, cost-wise, a unit is. Thus the longer the bar, the better the unit will be cost-wise. Red bars show offensive power, while blue bars show resiliency (HP and armor). This being a simple scalar, it does not reflect really accurately how units behave, since it eg does not take hard-coded counters into account. It can be however used eg to see if a champion version of a unit is effectively worth its heightened cost, or not. - ------------------------------------------------------------- -- Unit Specializations - -This table compares units that inherit from a generic template to this generic template (note that this means that barracks-specific versions of champion units don't count.). The graph shows the difference with the generic template, and the last column is how much this changes the worth or the unit (according to the script). -If you want to data mine here, I recommend you copy/paste this table in Excel or Numbers to be able to sort it by column. - ------------------------------------------------------------- -- Roster Variety - -This shows in a simple manner which civs have units inheriting from which template, which is a simple but accurate way of showing the roster variety of a civ. The less units, the variety the civ has. - ------------------------------------------------------------- -- Civilization Comparison Tables - -Those tables compare civilizations using the Unit Comparison Matrixes. The intent is to give a portrait of how good a civ's units are against another civ's, to check at a glance if civilizations are properly balanced. Note that this is all statistical analysis, and that however well the tool will work, this requires interpretation. Don't take this at face value. In particular, this doesn't take technologies or buildings into account, so you need to keep that in mind. Perhaps a super OP unit requires an insanely expensive tech, making it more balanced. - -The 3 left-most columns do not take costs into account (but do take the "ranged efficiency" factor into account.) The others do. -It is often interesting to compare the columns taking costs into account and those not doing so. - -I'll refer to the Civ being looked at as "Civ A" and the ones listed in the table as "Civ B" - -The "Average Efficiency" Columns show, on average, how strong Civ A units are against Civ B's. Since this uses the Unit Comparison Matrices, any value above "1" means that on average, Civ A units are stronger. However some units can bring this value up (such as elephants, which are really strong), even in the "cost adjusted" version. Likewise, a unit that's particularly weak or easily countered would bring average efficiency down. -Still, values far above 1 (>2…) should be investigated using the Unit Comparison Matrices themselves, and checking unit costs. You can remove some units specifically from the tables to check if it changes something (see below). - -The "Maximal Minimal Efficiency" columns show how strong the weakest unit of Civ A is. If the value is close to 1 (or even above), this means that civ A has a unit that Civ B cannot counter, ie Civ A has a unit that would win a fight against any of Civ B's units (note that for the column taking costs into account, this means that for the same amount of resources spent, Civ A could always train an army that Civ B cannot defeat). Obviously this is fairly bad, and again though this tool isn't perfect, such data is a pretty good indication that civs are unbalanced. On the other hand, a very low value means that Civ A has a unit Civ B counters perfectly. This is not necessarily an issue. - -The "Minimal Maximal Efficiency" columns show how weak the strongest unit of Civ A is. As you can expect, contrarily to "Maximal Minimal Efficiency", this column should be above "1". A value near "1" or even below it means that Civ A's strongest unit would lose a fight against any of Civ B's units. Again, this is a fairly good indicator that balance is wrong. Check "Range Efficiency" and costs to see if those factors explain this discrepancy. - -The "Ranged Efficiency" column show how strong the ranged units of Civ A are, compared to Civ B. Values above 100% mean that Civ A has better archers/javelineers/slingers, and would thus probably have an advantage in open fights, which thus affects its unit efficiency. This can explain why a civ appears unbalanced (generally too strong or too weak). - -The "Countered the least" and "Counters the least" show, respectively, which unit "Maximal Minimal Efficiency" and "Minimal Maximal Efficiency" refer to. You can use this to easily check in the Unit Comparison Matrices which unit is apparently too strong or too weak, which can help you remove some templates for a fairer comparison in some cases, or simply rebalance this unit. - -The "Balance" column gives an easy to read indicator of how balanced civs are. This is really just a basic reading of the values in the table, and should not be taken at face value. - -Note that if "Max Min Efficiency" and "Min Max Efficiency" are both very close to "1", and average efficiency too, this most likely means the civs are fairly balanced, assuming techs and buildings do not mess this up. - ------------------------------------------------------------- -- Customizing UnitTables - -Since this script cannot hope to provide an objective verdict of how strong civs are against one another, it has a variety of easily adjustable parameters that you can use to get a more accurate idea of how civs behave. - -The variables below "#Generic templates to load" can be used to load only some templates. They refer to the file names, and you can add your own. Those are for the generic templates. - -"Civs" will tell the script which civilizations to compare. Modders, to add your own, add it here (and see below for changing BasePath) -"CivBuildings" will tell the script what buildings to look at. Those are the end of structure template files, of format {CivName}_{BuildingName}.xml - > You can for example restrict this to ["barracks"] to only load units from the barracks. -"FilterOut" can be used to prune Civ templates. Any template which has any of these strings in its name will be removed. You can use this to remove specific templates, or whole collections (such as templates having "mechanical_siege" in their name.) - -Graphic Parameters are as such: -"ComparativeSortByCav" will sort the Unit Comparison Matrices so that Cavalry and Infantry are separate instead of mixed. -"ComparativeSortByChamp" will sort the Unit Comparison Matrices so that Champions and Citizen Soldiers are separate instead of mixed. -"SortTypes" gives the order in which to sort units. This refers to their classes, so put the rare-most classes in front (eg Pike before Spear) -"ShowCivLists" will display the unit lists for civilizations too and not only generic templates. - -Actual script parameters are as such: -"paramIncludePopCost" tells wether to include pop cost in the costs or not. Units that take more pop will be seen as weaker. -"paramFactorCounters" tells wether to count hardcoded counters or not. This can be used to see if counters have the desired effect. -"paramDPSImp" affects how important Damage Per Second (ie attack) is compared to HP and armour in calculating a unit's worthiness. -"paramHPImp" affects how important HP is compared to DPS in calculating a unit's worthiness. Lower is more important. -"paramRessImp" can be tweaked to make some resource types appear more costly. This can be used to check civ balance on maps where wood is scarce, for example. -"paramBuildTimeImp" (range [0-1], >1 is OK) affects how Build Time changes unit cost. With higher values, units that are slow to build are seen as weaker. -"paramSpeedImp" (range [0-1]) affects how important Speed is. With higher values, faster units will be stronger (this also affects unit comparison matrices.) -"paramRangedCoverage" (range [0-1] >1 is OK) affects how much "Ranged Efficiency" counts when comparing civs with one another. Higher values mean more importance. -"paramRangedMode" is used to know how to calculate a civilisation's Ranged Efficiency, either by averaging its units or taking the strongest one. - -"paramMicroAutoSpeed" is particular: it is used to give a base advantage to ranged units over slower melee units. This parameters is the difference threshold at which this advantage takes place. For example, with a melee unit having a speed of 10, if this parameter is 2.5, only ranged units whose speed is 12.5 or more will benefit of this advantage. This can be used to simulate micro. Only affects Unit Comparison Matrices. - -"paramMicroPerfectSpeed" is similar, only in this case the advantage is extremely high. This is used to simulate "perfect" micro, as ranged units can kill any much slower melee units without taking any hits if properly microed. If you want to check civs on the whole, set this really high to disable it as in the heat of the moment it's rare for micro to be this perfect. Only affects Unit Comparison Matrices. - - -Modders, change "BasePath" to something else if you want to use civs from another mod than "Public". To compare your civs with those in public, I recommend you copy the "simulation/templates" folder of the public mod somewhere else, copy your units in, and point BasePath to that folder. - -######################################################################## -######################################################################## -2. CreateRMTest.py - -This simple script takes two civilizations, and parameters which work as in unitTable.py, and creates a Random Map script with triggers to easily compare armies in-game. The created files are in maps/random, named "test_demobalance". You can then change the attacking and defending units to whatever you see fit, as well as change the size of armies. Not that this creates armies randomly based on a list of templates, so comparing whole civs will usually come down to which civs has the most of its strongest units. It is more accurate to compare one-of-a-kind armies, and even then you can only micro one side, which makes a lot of difference. +All contents of this folder are under the MIT License. +Enjoy! \ No newline at end of file diff --git a/source/tools/templatesanalyzer/style.css b/source/tools/templatesanalyzer/style.css index 83201972c8..af37999d04 100644 --- a/source/tools/templatesanalyzer/style.css +++ b/source/tools/templatesanalyzer/style.css @@ -23,124 +23,6 @@ h2 font-size: 30px; font-style: italic; } -h3 -{ - border-bottom: 1px #33AAFF solid; - text-align: center; - font-size: 25px; - font-weight: normal; -} -.UnitList -{ - border-collapse: collapse; - white-space:nowrap; -} - -.UnitList th -{ - text-align: center; - padding: 0px 8px 3px 8px; - font-weight: normal; - border-bottom: 1px #DDDDDD solid; -} - -.UnitList td -{ - text-align: center; - white-space:nowrap; - padding:3px; -} - -.ComparisonTable -{ - margin-top: 175px; - border-collapse: collapse; - border:1px black; - font-size: 18px; - margin-bottom: 40px; -} - -.ComparisonTable td -{ - width:20px; - height: 20px; - text-align: center; -} - -.Separator -{ - min-width:50px; - border: none; -} - -.ComparisonTable th -{ - text-align: right; - font-weight:normal; - padding-right:5px; -} -.ComparisonTable .vertical-text th { - -webkit-transform: rotate(-45deg); - -moz-transform: rotate(-45deg); - -ms-transform: rotate(-45deg); - -o-transform: rotate(-45deg); - transform: rotate(-45deg); - max-width: 20px; - height: 25px; - padding-right:0px; - font-size: 12px; -} -.desc -{ - font-style: italic; - font-size: 13px; - margin-top: -15px; -} -.WorthList th -{ - text-align: right; - font-weight:normal; - padding-right:2px; -} -.WorthList td -{ - width: 400px; - color:white; -} -.WorthList td span -{ - display:inline-block; -} - -.AverageComp -{ - border-collapse: collapse; - font-size: 16px; - margin-left: auto; - margin-right: auto; -} -.AverageComp tr -{ - border-bottom: 1px #DDD solid; - height:28px; -} -.AverageComp th -{ - font-weight: normal -} -.AverageComp td -{ - text-align: center; - min-width: 150px; -} - -.AverageComp .UnitTd -{ - text-align: center; - width: 150px; - border: 1px #DDD solid; - padding: 0px 5px 0px 5px; -} .CivRosterVariety { @@ -152,6 +34,7 @@ h3 { font-weight: normal; width:100px; + height:50px; margin-left: 50px; font-size: 14px; } @@ -179,26 +62,19 @@ h3 font-size: 20px; } -.TemplateParentComp th -{ - border-right: 1px #CCC solid; - border-bottom: 1px #CCC solid; - font-weight: normal; - font-size: 15px; - padding:4px; - margin: 2px; -} -.TemplateParentComp .Sub +table .Sub { padding: 4px; font-size: 13px; + text-align: left; } -.TemplateParentComp tr + +table tr { border-bottom: 1px #F3F3F3 solid; } -.TemplateParentComp .Label td +table td { text-align: center; font-weight: normal; @@ -206,7 +82,24 @@ h3 padding: 3px 6px 3px 6px; } -.TemplateParentComp +table th +{ + border-bottom: 1px #CCC solid; + font-size: 15px; + padding:4px; + margin: 2px; + text-align: center; + font-weight: normal; + min-width: 25px; + border-left:1px black solid; +} + +table .Label td, table .Label th +{ + border-bottom: 1px #000 solid; +} + +table { border: 2px black solid; font-size: 12px; diff --git a/source/tools/templatesanalyzer/tablefilter/style/colsVisibility.css b/source/tools/templatesanalyzer/tablefilter/style/colsVisibility.css new file mode 100644 index 0000000000..9a0a9bf033 --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/style/colsVisibility.css @@ -0,0 +1,6 @@ +/** + * tablefilter v0.0.11 by Max Guglielmi + * build date: 2015-11-21T07:50:21.705Z + * MIT License + */ +span.colVisSpan{text-align:left;}span.colVisSpan a.colVis{display:inline-block;padding:7px 5px 0;font-size:inherit;font-weight:inherit;vertical-align:top}div.colVisCont{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;position:absolute;display:none;border:1px solid #ccc;height:auto;width:250px;background-color:#fff;margin:35px 0 0 -100px;z-index:10000;padding:10px 10px 10px 10px;text-align:left;font-size:12px;}div.colVisCont:after,div.colVisCont:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.colVisCont:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.colVisCont:before{border-color:rgba(255,255,255,0);border-bottom-color:#ccc;border-width:12px;margin-left:-12px}div.colVisCont p{margin:6px auto 6px auto}div.colVisCont a.colVis{display:initial;font-weight:inherit}ul.cols_checklist{padding:0;margin:0;list-style:none;}ul.cols_checklist label{display:block}ul.cols_checklist input{vertical-align:middle;margin:2px 5px 2px 1px}li.cols_checklist_item{padding:4px;margin:0;}li.cols_checklist_item:hover{background-color:#335ea8;color:#fff}.cols_checklist_slc_item{background-color:#335ea8;color:#fff} \ No newline at end of file diff --git a/source/tools/templatesanalyzer/tablefilter/style/filtersVisibility.css b/source/tools/templatesanalyzer/tablefilter/style/filtersVisibility.css new file mode 100644 index 0000000000..6294aa6664 --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/style/filtersVisibility.css @@ -0,0 +1,6 @@ +/** + * tablefilter v0.0.11 by Max Guglielmi + * build date: 2015-11-21T07:50:21.705Z + * MIT License + */ +span.expClpFlt a.btnExpClpFlt{width:35px;height:35px;display:inline-block;}span.expClpFlt a.btnExpClpFlt:hover{background-color:#f4f4f4}span.expClpFlt img{padding:8px 11px 11px 11px} \ No newline at end of file diff --git a/source/tools/templatesanalyzer/tablefilter/style/tablefilter.css b/source/tools/templatesanalyzer/tablefilter/style/tablefilter.css new file mode 100644 index 0000000000..2e77510a92 --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/style/tablefilter.css @@ -0,0 +1,22 @@ +/** + * tablefilter v0.0.11 by Max Guglielmi + * build date: 2015-11-21T07:50:21.705Z + * MIT License + */ +.activeHeader{background-color:#66afe9 !important;color:#fff !important} +.even{background-color:#fff}.odd{background-color:#f9f9f9} + +.ezActiveRow{background-color:#2852a8 !important;color:#fff}.ezSelectedRow{background-color:#316ac5 !important;color:#fff}.ezActiveCell{background-color:#d9e8fb !important;color:#000 !important;font-weight:bold}.ezETSelectedCell{background-color:#ffdc61 !important;font-weight:bold;color:#000 !important}.ezUnselectable{-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.ezInputEditor{width:95%;height:auto;font-size:inherit;border:1px solid #aaccf6}.ezTextareaEditor{width:95%;height:35px;font-size:inherit;border:1px solid #aaccf6}.ezSelectEditor{width:100%;font-size:inherit;border:1px solid #aaccf6}.ezModifiedCell{background:transparent url("themes/bg_mod_cell.png") 0 0 no-repeat}select[multiple="multiple"].ezSelectEditor{height:35px}.ezCommandEditor{margin:2px;}.ezCommandEditor button,.ezCommandEditor input[type="button"]{min-height:22px;margin:1px;padding:3px;border:1px solid #ccc;background:#fff;border-radius:4px 4px 4px 4px;-moz-border-radius:4px 4px 4px 4px;}.ezCommandEditor button:hover,.ezCommandEditor input[type="button"]:hover{border:1px solid #999}.ezCommandEditor img{border:0;vertical-align:middle;margin:2px}.ezOpacity{opacity:.6}.alignLeft{text-align:left}.alignCenter{text-align:center}.alignRight{text-align:right} +.div_checklist{width:100%;height:90px;border:1px solid #f4f4f4;overflow:auto;text-align:left;background-color:#fff;color:#444;}.div_checklist ul.flt_checklist{padding:0 !important;margin:0 !important;list-style:none !important}.div_checklist li.flt_checklist_item{padding:1px !important;margin:0 !important;font-size:10px !important;border-bottom:1px solid #f4f4f4 !important;}.div_checklist li.flt_checklist_item:hover{background-color:#335ea8 !important;color:#fff !important}.div_checklist label{display:block !important}.div_checklist input{vertical-align:middle !important;margin:2px 5px 2px 1px !important}.flt_checklist_item_disabled{background-color:#e5e5e5}.flt_checklist_slc_item{background-color:#335ea8 !important;color:#fff !important} +.fltrow{height:1em;background-color:#eaeaea;}.fltrow td{border-bottom:1px solid #ccc !important;border-top:1px solid #f4f4f4;border-left:1px solid #ccc;border-right:1px solid #f4f4f4;padding:.2em !important;}.fltrow td:last-child{border-right:1px solid #ccc}.btnflt{height:35px;font-family:inherit;font-size:inherit;vertical-align:middle;margin:0 2px 0 2px;padding:0 1px 0 1px}.btnflt_icon{font-family:inherit;font-size:inherit;width:35px;height:35px;cursor:pointer !important;border:0 !important;vertical-align:middle;background:transparent url("themes/btn_filter.png") center center no-repeat !important}.flt,.flt_s,.single_flt{font-family:inherit;display:block;color:#444;background-color:#fff;border:1px inset #f4f4f4;margin:0;padding:0 0 0 .2em;width:100%;height:35px;vertical-align:middle;border-radius:2px;box-sizing:border-box;}.flt:focus,.flt_s:focus,.single_flt:focus{border-color:#66afe9;outline:0 none;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6);-moz-box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6);box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}select.flt_multi{font-family:inherit;color:#444;background-color:#fff;border:1px solid #f4f4f4;margin:0;padding:.2em;width:100%;height:90px;vertical-align:middle;box-sizing:border-box}.flt_s{width:60%;box-sizing:initial;display:initial}.single_flt{width:70%;box-sizing:initial;display:initial}div.popUpFilter{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;margin:30px auto 0 0;position:absolute;display:none;width:100px;background-color:#eaeaea;border:1px solid #eaeaea;padding:0}div.popUpFilter:after,div.popUpFilter:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.popUpFilter:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.popUpFilter:before{border-color:rgba(255,255,255,0);border-bottom-color:#eaeaea;border-width:12px;margin-left:-12px} +div.grd_Cont{-webkit-box-shadow:4px 4px 10px 0 rgba(50,50,50,0.75);-moz-box-shadow:4px 4px 10px 0 rgba(50,50,50,0.75);box-shadow:4px 4px 10px 0 rgba(50,50,50,0.75);width:800px;height:auto;overflow:hidden;padding:3px 3px 3px 3px;background-color:#c8e0fb;border:1px solid #99bbe8;}div.grd_Cont .fltrow{background-color:transparent}div.grd_Cont .flt{border:1px solid #99bbe8;width:100%;}div.grd_Cont .flt :focus{border:1px solid #558dd9}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#dfe8f6}div.grd_tblCont{height:400px;width:800px;background:#fff;overflow-x:auto;overflow-y:scroll}div.grd_headTblCont{height:auto;width:800px;overflow:hidden;border-bottom:1px solid #99bbe8;background-color:#c8e0fb}div.grd_tblCont table,div.grd_headTblCont table{border-collapse:collapse;table-layout:fixed;box-sizing:initial}div.grd_tblCont table{border-right:1px solid #99bbe8;box-sizing:initial}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{height:35px;background-color:#c8e0fb;padding:.1em .5em;color:#333;border-right:1px solid #99bbe8 !important;overflow:hidden;text-overflow:ellipsis}div.grd_headTblCont table td{padding:.2em .2em}div.grd_tblCont table td{padding:.5em .7em;border-bottom:1px solid #99bbe8;overflow:hidden;text-overflow:ellipsis}.grd_inf{clear:both;width:auto;height:35px;background-color:#c8e0fb;margin:0;padding:1px 3px 1px 3px;border-top:1px solid #99bbe8;}.grd_inf a{color:#333;text-decoration:none;font-weight:bold;}.grd_inf a:hover{text-decoration:underline;background-color:transparent}.grd_inf input.reset:hover{background-color:transparent}.grd_inf .mdiv{width:40% !important}.grd_inf .ldiv div{border:0}.grd_inf .helpBtn{border:0 !important}.grd_inf div.status{position:absolute;float:none !important;height:auto !important;margin:19px 0 !important;font-size:12px;color:#333;border:0 !important}.grd_inf div.tot{border:0 !important} +.helpBtn{display:inline-block;height:27px;margin:0;padding:8px 15px 0 15px;vertical-align:top;}.helpBtn:hover{background-color:#f4f4f4}div.helpCont{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;position:absolute;display:none;width:300px;padding:10px;margin:45px 0 0 -150px;border:1px solid #ccc;line-height:20px;font-size:inherit;color:#333;background:#fff;text-align:left;}div.helpCont:after,div.helpCont:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.helpCont:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.helpCont:before{border-color:rgba(255,255,255,0);border-bottom-color:#ccc;border-width:12px;margin-left:-12px}div.helpCont a{color:#c00;text-decoration:underline;font-weight:normal}div.helpCont a.close{color:#333 !important;text-decoration:none !important;font-weight:bold;}div.helpCont a.close:hover{text-decoration:none}div.helpCont hr{border:1px solid #ccc}div.helpFooter{margin:10px 0 0 0;}div.helpFooter h4{margin:2px 2px 2px 2px;color:#333} +span.keyword{font-weight:700;font-style:italic;border-bottom:1px dotted #ccc} +.loader{position:absolute;padding:.5em .7em;margin:10em 0 0 3em;width:auto;z-index:1000;font-weight:600;background-color:#a7a7a8;vertical-align:middle;border-radius:10px;color:#fff;text-shadow:1px 1px #333} +select.pgSlc{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;vertical-align:middle}select.pgSlc:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}input.pgNbInp{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;width:35px}input.pgNbInp:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}input.pgInp,.nextPage,.previousPage,.firstPage,.lastPage{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;vertical-align:middle;width:35px;border:0;font-weight:bold}input.pgInp:focus,.nextPage:focus,.previousPage:focus,.firstPage:focus,.lastPage:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}.nextPage{background:transparent url("themes/btn_next_page.gif") center center no-repeat !important;}.nextPage:hover{background-color:#f4f4f4 !important}.previousPage{background:transparent url("themes/btn_previous_page.gif") center center no-repeat !important;}.previousPage:hover{background-color:#f4f4f4 !important}.firstPage{background:transparent url("themes/btn_first_page.gif") center center no-repeat !important;}.firstPage:hover{background-color:#f4f4f4 !important}.lastPage{background:transparent url("themes/btn_last_page.gif") center center no-repeat !important;}.lastPage:hover{background-color:#f4f4f4 !important}span.nbpg{padding:0 5px}select.rspg{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;margin:0 0 0 5px;vertical-align:middle}select.rspg:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}span.rspgSpan{font-size:inherit} +input.reset{display:inline-block;width:35px;height:35px;border:0;background:transparent url("themes/btn_clear_filters.png") center center no-repeat;vertical-align:top;}input.reset:hover{background-color:#f4f4f4} +div.tot{float:left;overflow:hidden;min-width:150px;height:100%;margin:0;padding:.5em;vertical-align:middle;}div.tot span{font-weight:500} +.sort-arrow{width:11px;height:11px;margin:0 2px;background-position:center center;background-repeat:no-repeat}.descending{background-image:url("themes/downsimple.png")}.ascending{background-image:url("themes/upsimple.png")} +div.status{float:left;overflow:hidden;min-width:120px;height:100%;margin:0;padding:.5em;}div.status span{font-size:inherit} +table.TF{font-family:inherit;border-spacing:0;border:0;}table.TF th{height:35px;margin:0;background-color:#eaeaea;border-bottom:1px solid #ccc;border-top:1px solid #f4f4f4;border-left:1px solid #ccc;border-right:1px solid #f4f4f4;padding:.1em .7em;color:#333;}table.TF th:last-child{border-right:1px solid #ccc}table.TF td{margin:0;padding:.5em .7em;border-bottom:1px solid #c6c6c6} +.inf{clear:both;width:auto;height:35px;background-color:#fff;font-size:inherit;margin:0;padding:0;border-top:1px solid #ccc;border-bottom:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc;overflow:hidden;border-top-left-radius:3px;border-top-right-radius:3px;}.inf a{color:#333;text-decoration:none;font-weight:bold;box-sizing:initial;}.inf a:hover{text-decoration:underline}.ldiv{float:left;width:30%;position:inherit;text-align:left}.mdiv{float:left;width:38%;position:inherit;text-align:center;padding:0}.rdiv{float:right;width:30%;position:inherit;text-align:right} \ No newline at end of file diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/blank.png b/source/tools/templatesanalyzer/tablefilter/style/themes/blank.png new file mode 100644 index 0000000000..00ef4c731e --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/style/themes/blank.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afeb8f339d2dfa9208cffd0e631d9cd80131d7fa9082f6628c63c9916a55bc7b +size 144 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/btn_clear_filters.png b/source/tools/templatesanalyzer/tablefilter/style/themes/btn_clear_filters.png new file mode 100644 index 0000000000..bc328993ad --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/style/themes/btn_clear_filters.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d504b4dd79068b374a5a72581e30ed7a597d974700bb2b09cb68e7a190334674 +size 360 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/btn_filter.png b/source/tools/templatesanalyzer/tablefilter/style/themes/btn_filter.png new file mode 100644 index 0000000000..4de589f64b --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/style/themes/btn_filter.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f409a5d45636fd4bfdeaf60cd1b3e65d0eb98cd3a963a1cdeeac5b392ec902f +size 325 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/btn_first_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/btn_first_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..ba03bde6ec9d37926ebd5972d55978b261c130d9 GIT binary patch literal 63 zcmZ?wbhEHb#HVy*CDd;!`NJtS-rsWRw9D^HCZ~`hm4LvuYF@_=n(J-r( zR`YhopZpDaRWEB05f)+Kub4wH#yAt4i;f7Jr9z~ck}{K0Y4w&?yd zajRDeB}vj%-I3O#a$p8!3;#X*9wtQzipd}{6dUpf41t*Nsfh730H+ZV{{$h~w?(rH hu%Pcucze0#*S$c6{>a1zQyjO==E3g!$r>|%egbl-DLnuH literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/bg_th.jpg b/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/bg_th.jpg new file mode 100644 index 0000000000000000000000000000000000000000..eea01e93ee370ee3ead7dbf37b4233a405a28ea7 GIT binary patch literal 326 zcmex=?eKKy@+fd?qeB*-ktV9#(b#BaZY{5o^_sWn|rpI4sS-WWV<*{eX41@`}M F0swFbD?R`K literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_eraser.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_eraser.gif new file mode 100644 index 0000000000000000000000000000000000000000..bb1050a35196945dc52e847d91ec789ac426e987 GIT binary patch literal 356 zcmZ?wbhEHb6lM@+xXQrr|Ns9#@814=^7zB!$3O4gd2{E^_Z!#096$E%@WFRS4u9Ug zGotZiF$i#_<`}=3koVk7CWYyTsjno{P%_clT)y4xP@vQy&vm=8w021MV AV*mgE literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_first_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_first_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..2405816fae529ca0601a55a8578e4506a3209467 GIT binary patch literal 332 zcmZ?wbhEHb6lM@+xXQq=>d5=0`~NT6`+woS57V~1?^yT0b>08o)gPJ`Jg=MoE@RHm z^f|u^XFboH^*?v!v;1jqvM0aJnDR7p;^Wl**9kpO;(H#(cR%p&{OjNKEwbxTMEm{l z_6MP@_rh9U2DjV|Y+oeX`Hku9J2{KlQR~+E@LQ^9D&LEE3imM=sM1o~PkEO~qrv|Ns9PP=Vr4 z7FH1kD+V2qFvw2~Y?%&o3p{kB`cEt=Iw@l$AoN)6C4*0=Sb&ky1wQS@z)4O5+@_6g znlmlel+I~*xXG(dsI-5<0*<|tRQT(y)VU=zO+D2FI-QI)^vpbUgeN(h7@2$O%Fc2z YwD2@gTIg!&sb#s`cg@;$o{kLG0Fr%=y8r+H literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_last_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_last_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..32de4b5d81435fb423b1da8f538fb2ff64338ec4 GIT binary patch literal 331 zcmZ?wbhEHb6lM@+xXQq=>d5;=d;c%o_hH(W_Z{p0_pbiXwBUK&{CDYderL@2Svc!? z?#yTT)81rEd73@>b>_s!sr|1LdY;60KZxvl6yE+ItmS23^TXhVYkt)a{i`o{RNeO~ zJz-yZ*CqdeQ|=X=!gm&VcMP*`+h=UoNxNZ@u--UwnQrhr4c}=h9uxlm|Ia`%Q2fcl zD#D=2paU`qjf4~`+9o=x zSxTx1J-@PKgJ%?1$N3dgHpy6dN^ww>ru2sdy^L^*JdB)OaXPb5ayl W^Hg?ImQeR~o;r8MnzcTT4AuaZ<#7}M literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_next_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_next_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..6344ff1e63495e73bf1d64ec3a2dd87a170475bf GIT binary patch literal 187 zcmZ?wbhEHb6lM@+IKsfNXz%}NTi$o9``^3zL<+>2rP;&U&6Z^I67}rwKhz;=3P2 zc0CGge&|tk-@f#&PT@PJ+$$D&cMP*`>!jT|r$%1mcUm^cLXvamR@7NR0Zif{H RoML7REB8Oxpuxgm4FE9fM0WrH literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_eraser.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_eraser.gif new file mode 100644 index 0000000000000000000000000000000000000000..e22f48bdcddc8b7938244408d5973b5aa8bbe5a2 GIT binary patch literal 440 zcmV;p0Z0BvNk%w1VG{ro0M!5h|NsBz^Y{Gj?fK;6@Z;n8-rUyX_s-+@?A+Y<*w@bA z_r}}z#@Fw?)9>`h#=Xzy?!&?E#KX1A=kvR`+q=8hwzj>zz~-*3oVw?nw%)U|wv@Ks z(5R@eudlrq0BXk$axb!;g=dnVEZ@#Lqmr` zLI3~&A^8La6aWAKEC2ui022Tc000KnK!7AeEEUrI-eVfC!nZWuh@X+6Igh^ zUY~gEbA3Wxa9B+c`9h`uV@~%83iyHpwd$GTbaOrf4uyp)AT}>4Dgh0T4TFY-E+7>< z9V#r2k3Izxpr9@!9Et%fn-32-2^X%eqn0=wr<)QdJQBLP6o?c&B@(A8R5TTN1qi-6 zB^C++Da0o^36mEq6gkaR0VX2>G7zDlh&Rm#=m8^WH4(3_BsI+j^acSTQ!p_z{QdLw i_B<@nP@;uFgZ}^qh_d8~!zNLLV3;`un|?-|s#DeCz4wtB$;1y8r*8 zz5f^P`!HwM^Eun@P22K*%C>t`)?I5|_rGJ^|K8OfdRAR)S$3{z!SlNL@2cmWtDbi( zea`QUIX|ms9m|~czi`&`+?mhvr@bkjb}VDc)9lHwizn^PocK7k|8;!N!-SqE@!bz1 zyB_&>{`K$r7T*3KqWykY%gfN#d%-Pt1DhWPH(ax;`{`Hx(7*bEN7a3=(i8TjckPOA zn-slp$v>b|_|7T!ibdWX!>rr(8QWE|KIx?0&`-UrpK@L{?W;l335$gF#*xc(gXd}Z zPE+xi@c;jRhQS9Ef3mQOF!(X(fSd-369)FX4SpPaEv;?s98CfYJ-vPX0vv)2%u}aL zpTQs~%D^&j{(^-JqGEIB$&0HkWYL?)AST7Yx>wT{iU&lExQr7u#BnGONQqR96v1- zoqk$N>(;28OkdBu)XU04Wn)UqaRJq-3?&8`oF_OtrcIEE6bf`^V_hjUq;eoHDBNE8m_;RnHLu??p5Nj4Bj11NQ DEe+)* literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_last_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_last_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..cb41d28dcc414d8dd2edad4b4c64240434213e8c GIT binary patch literal 427 zcmV;c0aX4+Nk%w1VG{ro0M!5h=kxd0~ogJYm@6}l;vrW<8zX|WsmD%jO1U7;8}{|SBKzMgy~U(;ZuOtPJ7`` zd(cRF-%54JKXu(gZPY|>z$|g@IBwiAYTG|(w=8DZIAE_cS*9&ho+wS0BuJ3||Nj60 z00000A^8La6aYN{EC2ui022Tc000Kaz#gJOEEII-d^&1Td&tuUG(N0w8$5 z;4ol9>3TU~0;eMK0w@?jVcs##@0|o{4#33kAqsYY3oCpZ9{>i6B?=KSiv}eQEsFpj zBZ`YB4jCDc1}73PmLr)5s45Z~GdDR0Di$)R0Hy#4xGo&6Jh>h=xV0NpRWK?yJXSCu zI8^`}!&Wpg$g@qHEIaCNQ||Tw)I9SLOZWcs VQIT$m&X06T6{z-Ise literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_next_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_next_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..49c5456009724fc34af77754ee6efab6e9181b28 GIT binary patch literal 393 zcmZ?wbhEHb6lM@+xXQrr{PXu~kH4P-qWj;E-Tr>;`un|?-|s#DeCz4wi}wDXv+Mbs zZTF^ZyEkpi`zh&44guRR?ZtN{W-mtOz? literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_previous_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/btn_over_previous_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..6c260129e32009fe290c6788e1cf066f52e9bbc5 GIT binary patch literal 395 zcmZ?wbhEHb6lM@+xXQrr{PXu~kH4P-qWj;E-Tr>;`un|?-|s#DeCz4wOZWd@wDI+__C+v!En-slp$v>b|_|86KyGqt4 z{nX2{XM9Jx$4c%FvuG!>5t|NsAIzzr0CvapIUm@(*plz{xiz_!9c zy2(*Ts-Gi~`9O}*|uL{V+)hUj{AA%IN}%rZj^ji z3tYr(Aj!bi+#=5@uGZ4bASu<EUra@N&g>a|94l6+i^^#k zu3RxgA|ygzL&qpmVsk{Ofu3=sh%f`wvE#>dO-?W|2&Xb$ymZO*G9!af@U`2QqrC4t WU2rQ(&iWtU^Dw^qfq&;;|E_Q0 z?GGZ_?}xVD3vRg^+;GjV?x%nC1+UT*cEz_%ieBgxzH`YxV4tyFCF_%Z>SfuqulgzH z4U$e+B&;`%T&5d5Ps4YbipPZi|Nk@41}OeyVHIIeV$cB@5AqWOo4v!t0uLRj{u4`z zPWtH0ayi1RWy7Ep!gfHR(Tt(FW$8-}4vq=jB|!lpR#$jgA1~~(nAIOUh4HPcVtrF{ Ji>o7pH2`TPS8@OV literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/img_loading.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/default/images/img_loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..3bbf639efae54ae59e83067121a5283ca34fc319 GIT binary patch literal 3236 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 literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/icn_filterActive.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/icn_filterActive.gif new file mode 100644 index 0000000000000000000000000000000000000000..55b73607142cdb2065f3151c8b8b968845cf1b1f GIT binary patch literal 78 zcmZ?wbhEHb6krfwn8?7u5Rm>K41i3c-K&#J#k^OlVGIREAHa~j11NQhanfK literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/bg_headers.jpg b/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/bg_headers.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9409afd9e512558180fd7c6faf8ee2b296e63b8f GIT binary patch literal 300 zcma)1yAHxI3_O!G4QZeWDNwZ?kk}F82N;kLk00c77}!~PEUfSoA!VqFSUAg)b@rWY zfAJ5P-FmwQ5n&So{*Dy{=RD#fibPk0Or#Jp(MlysX`??dx}Tb~ubs;>=c=+St4V{} zgyJ~v>0WM3UJUK9Xqx{P{s=2EMa;;eV~JVvCyYL)q6N-m;KwGsKrI?@G^hnXJXmd% c+3)Ef^*3lnVHdMl;#|F+ZoZiA53|%?-`u<>OaK4? literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/bg_infDiv.jpg b/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/bg_infDiv.jpg new file mode 100644 index 0000000000000000000000000000000000000000..958953092796d5f7af9f21768f392b879ec08132 GIT binary patch literal 303 zcma)!I}XAy5JYDa+X;>#HVy*CDd;!`NJtS-rsWRw9D^HCZ~`hm4LvuYF@_=n(J-r( zR`YhopZpDaRWEB05f)+Kub4wH#yAt4i;f7Jr9z~ck}{K0Y4w&?yd zajRDeB}vj%-I3O#a$p8!3;#X*9wtQzipd}{6dUpf41t*Nsfh730H+ZV{{$h~w?(rH hu%Pcucze0#*S$c6{>a1zQyjO==E3g!$r>|%egbl-DLnuH literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/btn_filter.png b/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/btn_filter.png new file mode 100644 index 0000000000..a107bef712 --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/btn_filter.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1516e5ad1c4af1664f10ce5af139a8f26640c525dac54bd76540ffad6cfd7d02 +size 928 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/btn_first_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/images/btn_first_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..ba03bde6ec9d37926ebd5972d55978b261c130d9 GIT binary patch literal 63 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 Z!QkV=)ywzNd0AvD_s_rnLh--P{{SmBg>3); literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/mytheme.css b/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/mytheme.css new file mode 100644 index 0000000000..63950c75ab --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/style/themes/mytheme/mytheme.css @@ -0,0 +1,6 @@ +/** + * tablefilter v0.0.11 by Max Guglielmi + * build date: 2015-11-21T07:50:21.705Z + * MIT License + */ +table.TF{border-left:1px dotted #81963b !important;border-top:none !important;border-right:0 !important;border-bottom:none !important;}table.TF th{background:#39424b url("images/bg_headers.jpg") left top repeat-x !important;border-bottom:0 !important;border-right:1px dotted #d0d0d0 !important;border-left:0 !important;border-top:0 !important;color:#fff !important}table.TF td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b;padding:5px !important}.fltrow{background-color:#81963b !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #687830 !important}input.flt{width:99% !important}.inf{background:#d8d8d8;height:$min-height}input.reset{width:53px;background:transparent url("images/btn_filter.png") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important}div.grd_Cont{background:#81963b url("images/bg_headers.jpg") left top repeat-x !important;border:1px solid #ccc !important;padding:0 1px 1px 1px !important;}div.grd_Cont .even{background-color:#bccd83}div.grd_Cont .odd{background-color:#fff}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important;}div.grd_tblCont table td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b}div.grd_tblCont table th,div.grd_headTblCont table th{background:transparent url("images/bg_headers.jpg") 0 0 repeat-x !important;border-bottom:0 !important;border-right:1px dotted #d0d0d0 !important;border-left:0 !important;border-top:0 !important;padding:0 4px 0 4px !important;color:#fff !important;height:35px !important}div.grd_headTblCont table td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;background-color:#81963b !important;padding:1px 3px 1px 3px !important}.grd_inf{background-color:#d8d8d8;border-top:1px solid #d0d0d0 !important}.loader{border:0 !important;background:#81963b !important}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#bccd83}.odd{background-color:#fff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important} \ No newline at end of file diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/bg_skyblue.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/bg_skyblue.gif new file mode 100644 index 0000000000000000000000000000000000000000..430aa2451a0dfbf9e167a671312c8d87b44a606d GIT binary patch literal 554 zcmc(cM{*Nk6okjdV3I)2ImnUV0+Ve_Fv-T`yyqtDxB$fls=Q*u0XPK)Y$J@o7$Iqb zq=_1hMl%|9^P5ZX7H`q->*}t0i%SbLv(Fo(*ODSht1{LUkSqtR)>sFlI%{G5+8D_QDgx~`GRLofMiNu21{DE+@l z1Wo_Kr?&U@Po(CTFB%^{j@_JjdiunvV^_~jUzoeUwC~mI;=Ps@>CIcIVR^Zy=lK42 z{ryvW-X9(u?C5yZ+B!0lNQ{myjE!BoGdX#yv$L&jV&dYFSnT|jYlqH0Ij}Y~G(O(f z_u%^Q@ZB@<_$)g9Y8_$~D+r7PetIgrA=<-hPZu}6RpN>m&e*tT0 B8SMZ7 literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_first_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_first_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..56441d9f4bf343afe20c9495e37673141d021859 GIT binary patch literal 118 zcmZ?wbhEHb6k-r!Sj56`@7_Jzg-1(Ize-C>`~Uwx0}LqsWMO1rU}4Y!34qixFk5@< zy7SM#OZ1iWVb+Pa8DuxNo;sfSJZYKI?oFp7n4EZnUv9XmBKOKhgtJ2Vgv5b)8&?Fg P8Hhhk@meb+#9$2oCL1YQ literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_last_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_last_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..cd99c92958104519a719a4e6e69e5de671bcdafd GIT binary patch literal 118 zcmZ?wbhEHb6k-r!Sj56`@7_Jzg-1(Ize-C>`~Uwx0}LqsWMO1rU}4Y!34qixFk5@< zy7SM#%k&uc4c>&?0*z_~avFWIsneKt)hOPc#8R`(G5z$<-A3{OtG<2y+TeOhP?DK1 OzWG^-*IFYX25SK8oGAeS literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_next_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_next_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..2422770d214d617e9a6d76db426672adb04c9f2c GIT binary patch literal 97 zcmZ?wbhEHb6k-r!Sj56`@7_Jzg-1(Ize-C>`~Uwx0}LqsWMO1rU}4Y!34qixFspg& ty7SNAl-aQ*2jWa!?zueAoNN*IOmitC=S*EKj*T&k&0jUuoL6VC1^@=DAp-ya literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_prev_page.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/btn_prev_page.gif new file mode 100644 index 0000000000000000000000000000000000000000..0288506ab40b49a04f6deb7033111719099b70d4 GIT binary patch literal 97 zcmZ?wbhEHb6k-r!Sj56`@7_Jzg-1(Ize-C>`~Uwx0}LqsWMO1rU}4Y!34qixFspg& ty7SNAl*O?W<{RFdZcP3j`$%J|nkYxks%;N;?lRInu5#|J&2$C^YXBfMB8UJ0 literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/icn_clear_filters.png b/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/icn_clear_filters.png new file mode 100644 index 0000000000..490e55c736 --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/icn_clear_filters.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5a2759e241abae0692203e925bdd67b69be635d3a3ac7ad6b1dc12d3a21bc5c +size 601 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/img_loading.gif b/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/images/img_loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..8fed7bebe9dda3850e5dea3c3f50140212a67f4f GIT binary patch literal 847 zcmZ?wbhEHb6krfw_`<;O|Ns9$FO8o+f0P%7uUbAm)K51n#pBV#JBJT$jgPciIJbM+ zq}n&HU+mbr;`+67O|>cAZ3PUZ0LA~@ey$FYQWHy3QxwWG zOEMG^vl1(E@)J|^GV{{%85DoAaB=}v>40njIg)`jKtZ7|C3D_V1Cbm>t(JsUYiEcY znscOMSW{Dbs9XQek@W+`moDm(gcf^6{c#k6`iKp z3O2$bpDJaKzVCO!W=V#ELYMoco(wIiqYqZBa8PlrJ#gUQwWCZNJyRM|Gem@V4jxc& z5ajYX(C{HS(7l<-Y0J}X0j4t)Y*v|urUY)&exbB)arzX46=LfaE$ny97C5i$$iQtA zU~a%}!^zTMz!%A8p~cJDuB?d7@&up{l|N6=xFzDD#dRb=gj07(yWxA|MlLJo(}vz# zJX)F_vU%vuP`SCWl7T~D-^DYmH?p|(8pB;2?(ju2EHd!m6l>Kn=ySTl)t4>c_3SNA zsJ&@9GfRz1HgAk3KTkJSOM@W6+MqCn$x!5|!-{5SIkq+8$FjSd<}fNcJxQ=XB;V44*P5Tx{x@K?2IMzj z?5%L%aWxb;bW$QWR^s?h36Gu&Z8tR71-e*Fm=vCC=twMcQ%v+=hzOp+(U@zxWGiEm zi^mo=hE+QglXSTHR2vG6#gdOGZ&3fi`$mb~#LPTEO)EmbL8GTv1*@g;P)j|49^+W% zV8U={(=kUS&xsrxW-UzMu*+*@^)yiFkm!~3Hs8eSp~HT#Q@5m9tEt&lN@PmF#QxT?BtNxFx{b_&)GbKL*I}kjWtHIyGKot!5Wl2!2kfo%Lt_a literal 0 HcmV?d00001 diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/skyblue.css b/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/skyblue.css new file mode 100644 index 0000000000..33698a768f --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/style/themes/skyblue/skyblue.css @@ -0,0 +1,6 @@ +/** + * tablefilter v0.0.11 by Max Guglielmi + * build date: 2015-11-21T07:50:21.705Z + * MIT License + */ +table.TF{padding:0;color:#000;border-right:1px solid #a4bed4;border-top:1px solid #a4bed4;border-left:1px solid #a4bed4;border-bottom:0;}table.TF th{margin:0;color:inherit;background:#d1e5fe url("images/bg_skyblue.gif") 0 0 repeat-x;border-color:#fdfdfd #a4bed4 #a4bed4 #fdfdfd;border-width:1px;border-style:solid}table.TF td{margin:0;padding:5px;color:inherit;border-bottom:1px solid #a4bed4;border-left:0;border-top:0;border-right:0}.fltrow{background-color:#d1e5fe !important;}.fltrow th,.fltrow td{padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #a4bed4 !important}input.flt{width:99% !important}.inf{background-color:#e3efff !important;border:1px solid #a4bed4;height:$min-height;color:#004a6f}div.tot,div.status{border-right:0 !important}.helpBtn:hover{background-color:transparent}input.reset{background:transparent url("images/icn_clear_filters.png") center center no-repeat !important}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.nextPage:hover{background:#ffe4ab url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.previousPage{background:transparent url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.previousPage:hover{background:#ffe4ab url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.firstPage:hover{background:#ffe4ab url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.lastPage:hover{background:#ffe4ab url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.activeHeader{background:#ffe4ab !important;border:1px solid #ffb552 !important;color:inherit !important}div.grd_Cont{background-color:#d9eaed !important;border:1px solid #9cc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#e3efff}div.grd_headTblCont{background-color:#d9eaed !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#d9eaed url("images/bg_skyblue.gif") left top repeat-x;border-bottom:1px solid #a4bed4;border-right:1px solid #a4bed4 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #a4bed4 !important;border-right:0 !important;border-left:0 !important;border-top:0 !important}.grd_inf{background-color:#cce2fe;color:#004a6f;border-top:1px solid #9cc !important;}.grd_inf a{text-decoration:none;font-weight:bold}.loader{background-color:#2d8eef;border:1px solid #cce2fe;border-radius:5px}.even{background-color:#fff}.odd{background-color:#e3efff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.ezActiveRow{background-color:#ffdc61 !important;color:inherit}.ezSelectedRow{background-color:#ffe4ab !important;color:inherit}.ezActiveCell{background-color:#fff !important;color:#000 !important;font-weight:bold}.ezETSelectedCell{background-color:#fff !important;font-weight:bold;color:#000 !important} \ No newline at end of file diff --git a/source/tools/templatesanalyzer/tablefilter/style/themes/upsimple.png b/source/tools/templatesanalyzer/tablefilter/style/themes/upsimple.png new file mode 100644 index 0000000000..a2a1e8893a --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/style/themes/upsimple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6be1003ff69eb9398689dc7a61b4c44dbcf49163a8892e808fe92145c30974d6 +size 201 diff --git a/source/tools/templatesanalyzer/tablefilter/tablefilter.js b/source/tools/templatesanalyzer/tablefilter/tablefilter.js new file mode 100644 index 0000000000..11da887916 --- /dev/null +++ b/source/tools/templatesanalyzer/tablefilter/tablefilter.js @@ -0,0 +1,10 @@ +/** + * tablefilter v0.0.11 by Max Guglielmi + * build date: 2015-11-21T07:50:21.627Z + * MIT License + */ + +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var s=e();for(var i in s)("object"==typeof exports?exports:t)[i]=s[i]}}(this,function(){return function(t){function e(s){if(i[s])return i[s].exports;var a=i[s]={exports:{},id:s,loaded:!1};return t[s].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var s=window.webpackJsonp;window.webpackJsonp=function(i,l){for(var n,r,o=0,h=[];ol;l++)i[l]=arguments[l];if(0!==i.length){if(this.id=null,this.version="0.0.11",this.year=(new Date).getFullYear(),this.tbl=null,this.startRow=null,this.refRow=null,this.headersRow=null,this.cfg={},this.nbFilterableRows=null,this.nbRows=null,this.nbCells=null,this._hasGrid=!1,i.forEach(function(t){var s=typeof t;"object"===s&&t&&"TABLE"===t.nodeName?(e.tbl=t,e.id=t.id||"tf_"+(new Date).getTime()+"_"):"string"===s?(e.id=t,e.tbl=h["default"].id(t)):"number"===s?e.startRow=t:"object"===s&&(e.cfg=t)}),!this.tbl||"TABLE"!=this.tbl.nodeName||0===this.getRowsNb())throw new Error("Could not instantiate TableFilter: HTML table not found.");var n=this.cfg;this.refRow=null===this.startRow?2:this.startRow+1;try{this.nbCells=this.getCellsNb(this.refRow)}catch(o){this.nbCells=this.getCellsNb(0)}this.basePath=n.base_path||"tablefilter/",this.fltTypeInp="input",this.fltTypeSlc="select",this.fltTypeMulti="multiple",this.fltTypeCheckList="checklist",this.fltTypeNone="none",this.fltGrid=n.grid===!1?!1:!0,this.gridLayout=Boolean(n.grid_layout),this.filtersRowIndex=isNaN(n.filters_row_index)?0:n.filters_row_index,this.headersRow=isNaN(n.headers_row_index)?0===this.filtersRowIndex?1:0:n.headers_row_index,this.gridLayout&&(this.headersRow>1?this.filtersRowIndex=this.headersRow+1:(this.filtersRowIndex=1,this.headersRow=0)),this.fltCellTag="th"!==n.filters_cell_tag||"td"!==n.filters_cell_tag?"td":n.filters_cell_tag,this.fltIds=[],this.fltElms=[],this.searchArgs=null,this.validRowsIndex=null,this.fltGridEl=null,this.isFirstLoad=!0,this.infDiv=null,this.lDiv=null,this.rDiv=null,this.mDiv=null,this.infDivCssClass=n.inf_div_css_class||"inf",this.lDivCssClass=n.left_div_css_class||"ldiv",this.rDivCssClass=n.right_div_css_class||"rdiv",this.mDivCssClass=n.middle_div_css_class||"mdiv",this.contDivCssClass=n.content_div_css_class||"cont",this.stylePath=n.style_path||this.basePath+"style/",this.stylesheet=n.stylesheet||this.stylePath+"tablefilter.css",this.stylesheetId=this.id+"_style",this.fltsRowCssClass=n.flts_row_css_class||"fltrow",this.enableIcons=n.enable_icons===!1?!1:!0,this.alternateRows=Boolean(n.alternate_rows),this.hasColWidths=g["default"].isArray(n.col_widths),this.colWidths=this.hasColWidths?n.col_widths:null,this.fltCssClass=n.flt_css_class||"flt",this.fltMultiCssClass=n.flt_multi_css_class||"flt_multi",this.fltSmallCssClass=n.flt_small_css_class||"flt_s",this.singleFltCssClass=n.single_flt_css_class||"single_flt",this.enterKey=n.enter_key===!1?!1:!0,this.onBeforeFilter=g["default"].isFn(n.on_before_filter)?n.on_before_filter:null,this.onAfterFilter=g["default"].isFn(n.on_after_filter)?n.on_after_filter:null,this.caseSensitive=Boolean(n.case_sensitive),this.hasExactMatchByCol=g["default"].isArray(n.columns_exact_match),this.exactMatchByCol=this.hasExactMatchByCol?n.columns_exact_match:[],this.exactMatch=Boolean(n.exact_match),this.linkedFilters=Boolean(n.linked_filters),this.disableExcludedOptions=Boolean(n.disable_excluded_options),this.activeFlt=null,this.activeFilterId=null,this.hasVisibleRows=Boolean(n.rows_always_visible),this.visibleRows=this.hasVisibleRows?n.rows_always_visible:[],this.isExternalFlt=Boolean(n.external_flt_grid),this.externalFltTgtIds=n.external_flt_grid_ids||null,this.externalFltEls=[],this.execDelay=isNaN(n.exec_delay)?100:parseInt(n.exec_delay,10),this.onFiltersLoaded=g["default"].isFn(n.on_filters_loaded)?n.on_filters_loaded:null,this.singleSearchFlt=Boolean(n.single_filter),this.onRowValidated=g["default"].isFn(n.on_row_validated)?n.on_row_validated:null,this.customCellDataCols=n.custom_cell_data_cols?n.custom_cell_data_cols:[],this.customCellData=g["default"].isFn(n.custom_cell_data)?n.custom_cell_data:null,this.watermark=n.watermark||"",this.isWatermarkArray=g["default"].isArray(this.watermark),this.toolBarTgtId=n.toolbar_target_id||null,this.help=g["default"].isUndef(n.help_instructions)?void 0:Boolean(n.help_instructions),this.popupFilters=Boolean(n.popup_filters),this.markActiveColumns=Boolean(n.mark_active_columns),this.activeColumnsCssClass=n.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=g["default"].isFn(n.on_before_active_column)?n.on_before_active_column:null,this.onAfterActiveColumn=g["default"].isFn(n.on_after_active_column)?n.on_after_active_column:null,this.displayAllText=n.display_all_text||"Clear",this.enableEmptyOption=Boolean(n.enable_empty_option),this.emptyText=n.empty_text||"(Empty)",this.enableNonEmptyOption=Boolean(n.enable_non_empty_option),this.nonEmptyText=n.non_empty_text||"(Non empty)",this.onSlcChange=n.on_change===!1?!1:!0,this.sortSlc=n.sort_select===!1?!1:!0,this.isSortNumAsc=Boolean(n.sort_num_asc),this.sortNumAsc=this.isSortNumAsc?n.sort_num_asc:null,this.isSortNumDesc=Boolean(n.sort_num_desc),this.sortNumDesc=this.isSortNumDesc?n.sort_num_desc:null,this.loadFltOnDemand=Boolean(n.load_filters_on_demand),this.hasCustomOptions=g["default"].isObj(n.custom_options),this.customOptions=n.custom_options,this.rgxOperator=n.regexp_operator||"rgx:",this.emOperator=n.empty_operator||"[empty]",this.nmOperator=n.nonempty_operator||"[nonempty]",this.orOperator=n.or_operator||"||",this.anOperator=n.and_operator||"&&",this.grOperator=n.greater_operator||">",this.lwOperator=n.lower_operator||"<",this.leOperator=n.lower_equal_operator||"<=",this.geOperator=n.greater_equal_operator||">=",this.dfOperator=n.different_operator||"!",this.lkOperator=n.like_operator||"*",this.eqOperator=n.equal_operator||"=",this.stOperator=n.start_with_operator||"{",this.enOperator=n.end_with_operator||"}",this.curExp=n.cur_exp||"^[¥£€$]",this.separator=n.separator||",",this.rowsCounter=Boolean(n.rows_counter),this.statusBar=Boolean(n.status_bar),this.loader=Boolean(n.loader),this.displayBtn=Boolean(n.btn),this.btnText=n.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=n.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=Boolean(n.btn_reset),this.btnResetCssClass=n.btn_reset_css_class||"reset",this.onBeforeReset=g["default"].isFn(n.on_before_reset)?n.on_before_reset:null,this.onAfterReset=g["default"].isFn(n.on_after_reset)?n.on_after_reset:null,this.paging=Boolean(n.paging),this.nbVisibleRows=0,this.nbHiddenRows=0,this.autoFilter=Boolean(n.auto_filter),this.autoFilterDelay=isNaN(n.auto_filter_delay)?900:n.auto_filter_delay,this.isUserTyping=null,this.autoFilterTimer=null,this.highlightKeywords=Boolean(n.highlight_keywords),this.defaultDateType=n.default_date_type||"DMY",this.thousandsSeparator=n.thousands_separator||",",this.decimalSeparator=n.decimal_separator||".",this.hasColNbFormat=g["default"].isArray(n.col_number_format),this.colNbFormat=this.hasColNbFormat?n.col_number_format:null,this.hasColDateType=g["default"].isArray(n.col_date_type),this.colDateType=this.hasColDateType?n.col_date_type:null,this.msgFilter=n.msg_filter||"Filtering data...",this.msgPopulate=n.msg_populate||"Populating filter...",this.msgPopulateCheckList=n.msg_populate_checklist||"Populating list...",this.msgChangePage=n.msg_change_page||"Collecting paging data...",this.msgClear=n.msg_clear||"Clearing filters...",this.msgChangeResults=n.msg_change_results||"Changing results per page...",this.msgResetValues=n.msg_reset_grid_values||"Re-setting filters values...",this.msgResetPage=n.msg_reset_page||"Re-setting page...",this.msgResetPageLength=n.msg_reset_page_length||"Re-setting page length...",this.msgSort=n.msg_sort||"Sorting data...",this.msgLoadExtensions=n.msg_load_extensions||"Loading extensions...",this.msgLoadThemes=n.msg_load_themes||"Loading theme(s)...",this.prfxTf="TF",this.prfxFlt="flt",this.prfxValButton="btn",this.prfxInfDiv="inf_",this.prfxLDiv="ldiv_",this.prfxRDiv="rdiv_",this.prfxMDiv="mdiv_",this.prfxCookieFltsValues="tf_flts_",this.prfxCookiePageNb="tf_pgnb_",this.prfxCookiePageLen="tf_pglen_",this.hasStoredValues=!1,this.rememberGridValues=Boolean(n.remember_grid_values),this.fltsValuesCookie=this.prfxCookieFltsValues+this.id,this.rememberPageNb=this.paging&&n.remember_page_number,this.pgNbCookie=this.prfxCookiePageNb+this.id,this.rememberPageLen=this.paging&&n.remember_page_length,this.pgLenCookie=this.prfxCookiePageLen+this.id,this.extensions=n.extensions,this.hasExtensions=g["default"].isArray(this.extensions),this.enableDefaultTheme=Boolean(n.enable_default_theme),this.hasThemes=this.enableDefaultTheme||g["default"].isArray(n.themes),this.themes=n.themes||[],this.themesPath=n.themes_path||this.stylePath+"themes/",this.Mod={},this.ExtRegistry={},this.Evt={name:{filter:"Filter",dropdown:"DropDown",checklist:"CheckList",changepage:"ChangePage",clear:"Clear",changeresultsperpage:"ChangeResults",resetvalues:"ResetValues",resetpage:"ResetPage",resetpagelength:"ResetPageLength",loadextensions:"LoadExtensions",loadthemes:"LoadThemes"},detectKey:function(t){if(this.enterKey){var e=t||D.event;if(e){var s=r["default"].keyCode(e);13===s?(this.filter(),r["default"].cancel(e),r["default"].stop(e)):(this.isUserTyping=!0,D.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}}},onKeyUp:function(t){function e(){D.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null,this.isUserTyping||(this.filter(),this.isUserTyping=null)}if(this.autoFilter){var s=t||D.event,i=r["default"].keyCode(s);this.isUserTyping=!1,13!==i&&9!==i&&27!==i&&38!==i&&40!==i?null===this.autoFilterTimer&&(this.autoFilterTimer=D.setInterval(e.bind(this),this.autoFilterDelay)):(D.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},onKeyDown:function(){this.autoFilter&&(this.isUserTyping=!0)},onInpBlur:function(){if(this.autoFilter&&(this.isUserTyping=!1,D.clearInterval(this.autoFilterTimer)),this.hasExtension("advancedGrid")){var t=this.extension("advancedGrid"),e=t._ezEditTable;t.cfg.editable&&e.Editable.Set(),t.cfg.selection&&e.Selection.Set()}},onInpFocus:function(t){var e=t||D.event,s=r["default"].target(e);if(this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.popupFilters&&(r["default"].cancel(e),r["default"].stop(e)),this.hasExtension("advancedGrid")){var i=this.extension("advancedGrid"),a=i._ezEditTable;i.cfg.editable&&a.Editable.Remove(),i.cfg.selection&&a.Selection.Remove()}},onSlcFocus:function(t){var e=t||D.event,s=r["default"].target(e);if(this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.loadFltOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Mod.dropdown._build(i)}this.popupFilters&&(r["default"].cancel(e),r["default"].stop(e))},onSlcChange:function(t){if(this.activeFlt){var e=t||D.event;this.popupFilters&&r["default"].stop(e),this.onSlcChange&&this.filter()}},onCheckListClick:function(t){var e=t||D.event,s=r["default"].target(e);if(this.loadFltOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Mod.checkList._build(i),this.Mod.checkList.checkListDiv[i].onclick=null,this.Mod.checkList.checkListDiv[i].title=""}},onBtnClick:function(){this.filter()}}}}return l(t,[{key:"init",value:function(){if(!this._hasGrid){this.tbl||(this.tbl=h["default"].id(this.id)),this.gridLayout&&(this.refRow=null===this.startRow?0:this.startRow),this.popupFilters&&(0===this.filtersRowIndex&&1===this.headersRow||this.gridLayout)&&(this.headersRow=0);var t=this.Mod,e=this.singleSearchFlt?1:this.nbCells,s=void 0;if(this["import"](this.stylesheetId,this.stylesheet,null,"link"),this.hasThemes&&this._loadThemes(),(this.rememberGridValues||this.rememberPageNb||this.rememberPageLen)&&(t.store=new w.Store(this)),this.gridLayout&&(t.gridLayout=new x.GridLayout(this),t.gridLayout.init()),this.loader&&(t.loader||(t.loader=new T.Loader(this),t.loader.init())),this.highlightKeywords&&(t.highlightKeyword=new k.HighlightKeyword(this)),this.popupFilters&&(t.popupFilter||(t.popupFilter=new P.PopupFilter(this)),t.popupFilter.init()),this.fltGrid)if(this.isFirstLoad){var i=void 0;if(!this.gridLayout){var a=h["default"].tag(this.tbl,"thead");i=a.length>0?a[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),this.headersRow>1&&this.filtersRowIndex<=this.headersRow&&!this.popupFilters&&this.headersRow++,this.popupFilters&&this.headersRow++,i.className=this.fltsRowCssClass,(this.isExternalFlt||this.popupFilters)&&(i.style.display="none")}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length;for(var l=0;e>l;l++){this.popupFilters&&t.popupFilter.build(l);var n=h["default"].create(this.fltCellTag),o=this.getFilterType(l),d=this.isExternalFlt&&this.externalFltTgtIds?this.externalFltTgtIds[l]:null;if(this.singleSearchFlt&&(n.colSpan=this.nbCells),this.gridLayout||i.appendChild(n),s=l==e-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,this.singleSearchFlt&&(o=this.fltTypeInp,s=this.singleFltCssClass),o===this.fltTypeSlc||o===this.fltTypeMulti){t.dropdown||(t.dropdown=new F.Dropdown(this));var c=t.dropdown,f=h["default"].create(this.fltTypeSlc,["id",this.prfxFlt+l+"_"+this.id],["ct",l],["filled","0"]);if(o===this.fltTypeMulti&&(f.multiple=this.fltTypeMulti,f.title=c.multipleSlcTooltip),f.className=u["default"].lower(o)===this.fltTypeSlc?s:this.fltMultiCssClass,d?(h["default"].id(d).appendChild(f),this.externalFltEls.push(f)):n.appendChild(f),this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.loadFltOnDemand||c._build(l),r["default"].add(f,"keypress",this.Evt.detectKey.bind(this)),r["default"].add(f,"change",this.Evt.onSlcChange.bind(this)),r["default"].add(f,"focus",this.Evt.onSlcFocus.bind(this)),this.loadFltOnDemand){var p=h["default"].createOpt(this.displayAllText,"");f.appendChild(p)}}else if(o===this.fltTypeCheckList){var g=void 0;t.checkList=new R.CheckList(this),g=t.checkList;var v=h["default"].create("div",["id",g.prfxCheckListDiv+l+"_"+this.id],["ct",l],["filled","0"]);v.className=g.checkListDivCssClass,d?(h["default"].id(d).appendChild(v),this.externalFltEls.push(v)):n.appendChild(v),g.checkListDiv[l]=v,this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.loadFltOnDemand||g._build(l),this.loadFltOnDemand&&(r["default"].add(v,"click",this.Evt.onCheckListClick.bind(this)),v.appendChild(h["default"].text(g.activateCheckListTxt)))}else{var b=o===this.fltTypeInp?"text":"hidden",m=h["default"].create(this.fltTypeInp,["id",this.prfxFlt+l+"_"+this.id],["type",b],["ct",l]);if("hidden"!==b&&this.watermark&&m.setAttribute("placeholder",this.isWatermarkArray?this.watermark[l]||"":this.watermark),m.className=s,r["default"].add(m,"focus",this.Evt.onInpFocus.bind(this)),d?(h["default"].id(d).appendChild(m),this.externalFltEls.push(m)):n.appendChild(m),this.fltIds.push(this.prfxFlt+l+"_"+this.id),r["default"].add(m,"keypress",this.Evt.detectKey.bind(this)),r["default"].add(m,"keydown",this.Evt.onKeyDown.bind(this)),r["default"].add(m,"keyup",this.Evt.onKeyUp.bind(this)),r["default"].add(m,"blur",this.Evt.onInpBlur.bind(this)),this.rememberGridValues){var _=this.Mod.store.getFilterValues(this.fltsValuesCookie);" "!=_[l]&&this.setFilterValue(l,_[l],!1)}}if(l==e-1&&this.displayBtn){var y=h["default"].create(this.fltTypeInp,["id",this.prfxValButton+l+"_"+this.id],["type","button"],["value",this.btnText]);y.className=this.btnCssClass,d?h["default"].id(d).appendChild(y):n.appendChild(y),r["default"].add(y,"click",this.Evt.onBtnClick.bind(this))}}}else this._resetGrid();else this.refRow=this.refRow-1,this.gridLayout&&(this.refRow=0),this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.nbFilterableRows+this.refRow;this.hasVisibleRows&&this.enforceVisibility(),this.rowsCounter&&(t.rowsCounter=new O.RowsCounter(this),t.rowsCounter.init()),this.statusBar&&(t.statusBar=new I.StatusBar(this),t.statusBar.init()),(this.paging||t.paging)&&(t.paging||(t.paging=new S.Paging(this),t.paging.init()),t.paging.reset()),this.btnReset&&(t.clearButton=new E.ClearButton(this),t.clearButton.init()),this.help&&(t.help||(t.help=new L.Help(this)),t.help.init()),this.hasColWidths&&!this.gridLayout&&this.setColWidths(),this.alternateRows&&(t.alternateRows=new N.AlternateRows(this),t.alternateRows.init()),this.isFirstLoad=!1,this._hasGrid=!0,(this.rememberGridValues||this.rememberPageLen||this.rememberPageNb)&&this.resetValues(),this.gridLayout||h["default"].addClass(this.tbl,this.prfxTf),this.loader&&t.loader.show("none"),this.hasExtensions&&this.initExtensions(),this.onFiltersLoaded&&this.onFiltersLoaded.call(null,this)}}},{key:"EvtManager",value:function(t){function e(){var e=this.Evt.name;switch(t){case e.filter:this._filter();break;case e.dropdown:this.linkedFilters?r.dropdown._build(i,!0):r.dropdown._build(i,!1,a,l);break;case e.checklist:r.checkList._build(i,a,l);break;case e.changepage:r.paging._changePage(n);break;case e.clear:this._clearFilters(),this._filter();break;case e.changeresultsperpage:r.paging._changeResultsPerPage();break;case e.resetvalues:this._resetValues(),this._filter();break;case e.resetpage:r.paging._resetPage(this.pgNbCookie);break;case e.resetpagelength:r.paging._resetPageLength(this.pgLenCookie);break;case e.loadextensions:this._loadExtensions();break;case e.loadthemes:this._loadThemes()}this.statusBar&&r.statusBar.message(""),this.loader&&r.loader.show("none")}var s=arguments.length<=1||void 0===arguments[1]?{slcIndex:null,slcExternal:!1,slcId:null,pgIndex:null}:arguments[1],i=s.slcIndex,a=s.slcExternal,l=s.slcId,n=s.pgIndex,r=this.Mod;this.loader||this.statusBar||this.linkedFilters?(this.loader&&r.loader.show(""),this.statusBar&&r.statusBar.message(this["msg"+t]),D.setTimeout(e.bind(this),this.execDelay)):e.call(this)}},{key:"feature",value:function(t){return this.Mod[t]}},{key:"initExtensions",value:function(){for(var t=this.extensions,e=0,s=t.length;s>e;e++){var i=t[e];this.ExtRegistry[i.name]||this.loadExtension(i)}}},{key:"loadExtension",value:function(t){var e=this;if(t&&t.name){var i=t.name,a=t.path,l=void 0;i&&a?l=t.path+i:(i=i.replace(".js",""),l="extensions/{}/{}".replace(/{}/g,i)),s.p=this.basePath,s.e(1,function(s){var a=[s(24)("./"+l)];(function(s){var a=new s(e,t);a.init(),e.ExtRegistry[i]=a}).apply(null,a)})}}},{key:"extension",value:function(t){return this.ExtRegistry[t]}},{key:"hasExtension",value:function(t){return!g["default"].isEmpty(this.ExtRegistry[t])}},{key:"destroyExtensions",value:function(){for(var t=this.extensions,e=0,s=t.length;s>e;e++){var i=t[e],a=this.ExtRegistry[i.name];a&&(a.destroy(),this.ExtRegistry[i.name]=null)}}},{key:"loadThemes",value:function(){this.EvtManager(this.Evt.name.loadthemes)}},{key:"_loadThemes",value:function(){var t=this.themes;if(this.enableDefaultTheme){var e={name:"default"};this.themes.push(e)}if(g["default"].isArray(t))for(var s=0,i=t.length;i>s;s++){var a=t[s],l=a.name,n=a.path,r=this.prfxTf+l;l&&!n?n=this.themesPath+l+"/"+l+".css":!l&&a.path&&(l="theme{0}".replace("{0}",s)),this.isImported(n,"link")||this["import"](r,n,null,"link")}this.btnResetText=null,this.btnResetHtml='',this.btnPrevPageHtml='',this.btnNextPageHtml='',this.btnFirstPageHtml='',this.btnLastPageHtml='',this.loader=!0,this.loaderHtml='
',this.loaderText=null}},{key:"getStylesheet",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"default":arguments[0];return h["default"].id(this.prfxTf+t)}},{key:"destroy",value:function(){if(this._hasGrid){var t=this.tbl.rows,e=this.Mod;this._clearFilters(),this.isExternalFlt&&!this.popupFilters&&this.removeExternalFlts(),this.infDiv&&this.removeToolbar(),this.highlightKeywords&&e.highlightKeyword.unhighlightAll(),this.markActiveColumns&&this.clearActiveColumns(),this.hasExtensions&&this.destroyExtensions();for(var s=this.refRow;s0&&[].forEach.call(e,function(e){t.removeChild(e)})}}},{key:"removeExternalFlts",value:function(){if(this.isExternalFlt&&this.externalFltTgtIds)for(var t=this.externalFltTgtIds,e=t.length,s=0;e>s;s++){var i=t[s],a=h["default"].id(i);a&&(a.innerHTML="")}}},{key:"isCustomOptions",value:function(t){return this.hasCustomOptions&&-1!=this.customOptions.cols.indexOf(t)}},{key:"getCustomOptions",value:function(t){if(!g["default"].isEmpty(t)&&this.isCustomOptions(t)){for(var e=this.customOptions,s=e.cols,i=[],a=[],l=s.indexOf(t),n=e.values[l],r=e.texts[l],o=e.sorts[l],h=0,d=n.length;d>h;h++)a.push(n[h]),r[h]?i.push(r[h]):i.push(n[h]);return o&&(a.sort(),i.sort()),[a,i]}}},{key:"resetValues",value:function(){this.EvtManager(this.Evt.name.resetvalues)}},{key:"_resetValues",value:function(){this.rememberGridValues&&this.loadFltOnDemand&&this._resetGridValues(this.fltsValuesCookie),this.rememberPageLen&&this.Mod.paging&&this.Mod.paging.resetPageLength(this.pgLenCookie),this.rememberPageNb&&this.Mod.paging&&this.Mod.paging.resetPage(this.pgNbCookie)}},{key:"_resetGridValues",value:function(t){if(this.loadFltOnDemand){var e=this.Mod.store.getFilterValues(t),s=this.getFiltersByType(this.fltTypeSlc,!0),i=this.getFiltersByType(this.fltTypeMulti,!0);if(Number(e[e.length-1])===this.fltIds.length){for(var a=0;ad;d++)""!==l[d]&&(n=h["default"].createOpt(l[d],l[d],!0),o.appendChild(n),this.hasStoredValues=!0)}}else if(r===this.fltTypeCheckList){var c=this.Mod.checkList,f=c.checkListDiv[a];f.title=f.innerHTML,f.innerHTML="";var p=h["default"].create("ul",["id",this.fltIds[a]],["colIndex",a]);p.className=c.checkListCssClass;var g=h["default"].createCheckItem(this.fltIds[a]+"_0","",this.displayAllText);g.className=c.checkListItemCssClass,p.appendChild(g),f.appendChild(p),l=e[a].split(" "+this.orOperator+" ");for(var d=0,u=l.length;u>d;d++)if(""!==l[d]){var v=h["default"].createCheckItem(this.fltIds[a]+"_"+(d+1),l[d],l[d]);v.className=c.checkListItemCssClass,p.appendChild(v),v.check.checked=!0,c.setCheckListValues(v.check),this.hasStoredValues=!0}}}!this.hasStoredValues&&this.paging&&this.Mod.paging.setPagingInfo()}}}},{key:"filter",value:function(){this.EvtManager(this.Evt.name.filter)}},{key:"_filter",value:function(){function t(t,e,s){if(this.highlightKeywords&&e){t=t.replace(p,""),t=t.replace(g,""),t=t.replace(v,""),t=t.replace(b,"");var a=t;(r.test(t)||o.test(t)||d.test(t)||c.test(t)||f.test(t))&&(a=h["default"].getText(s)),""!==a&&i.highlightKeyword.highlight(s,a,i.highlightKeyword.highlightCssClass)}}function e(t,e,s){var i=void 0,a=C["default"].removeNbFormat,h=d.test(t),w=r.test(t),x=c.test(t),T=o.test(t),k=f.test(t),P=g.test(t),F=p.test(t),R=v.test(t),O=b.test(t),S=m===t,E=_===t,L=y.test(t),N=h&&M(t.replace(d,""),I),D=w&&M(t.replace(r,""),I),A=x&&M(t.replace(c,""),I),H=T&&M(t.replace(o,""),I),j=k&&M(t.replace(f,""),I),V=P&&M(t.replace(g,""),I),U=void 0,G=void 0;if(M(e,I))U=B(e,I),N?(G=B(t.replace(d,""),I),i=G>U):D?(G=B(t.replace(r,""),I),i=G>=U):H?(G=B(t.replace(o,""),I),i=U>=G):A?(G=B(t.replace(c,""),I),i=U>G):j?(G=B(t.replace(f,""),I),i=U.toString()!=G.toString()):V?(G=B(t.replace(g,""),I),i=U.toString()==G.toString()):p.test(t)?i=this._containsStr(t.replace(p,""),e,!1):M(t,I)?(G=B(t,I),i=U.toString()==G.toString()):S?i=u["default"].isEmpty(e):E&&(i=!u["default"].isEmpty(e));else if(this.hasColNbFormat&&this.colNbFormat[s]?(l=a(e,this.colNbFormat[s]),n=this.colNbFormat[s]):","===this.thousandsSeparator&&"."===this.decimalSeparator?(l=a(e,"us"),n="us"):(l=a(e,"eu"),n="eu"),w)i=l<=a(t.replace(r,""),n);else if(T)i=l>=a(t.replace(o,""),n);else if(h)i=la(t.replace(c,""),n);else if(k)i=this._containsStr(t.replace(f,""),e)?!1:!0;else if(F)i=this._containsStr(t.replace(p,""),e,!1);else if(P)i=this._containsStr(t.replace(g,""),e,!0);else if(R)i=0===e.indexOf(t.replace(v,""))?!0:!1;else if(O){var W=t.replace(b,"");i=e.lastIndexOf(W,e.length-1)===e.length-1-(W.length-1)&&e.lastIndexOf(W,e.length-1)>-1?!0:!1}else if(S)i=u["default"].isEmpty(e);else if(E)i=!u["default"].isEmpty(e);else if(L)try{var z=t.replace(y,""),$=new RegExp(z);i=$.test(e)}catch(K){i=!1}else i=this._containsStr(t,e,this.isExactMatch(s));return i}if(this.fltGrid&&(this._hasGrid||this.isFirstLoad)){this.onBeforeFilter&&this.onBeforeFilter.call(null,this);var s=this.tbl.rows,i=this.Mod,a=0;this.validRowsIndex=[],this.highlightKeywords&&i.highlightKeyword.unhighlightAll(),this.popupFilters&&i.popupFilter.buildIcons(),this.markActiveColumns&&this.clearActiveColumns(),this.searchArgs=this.getFiltersValue();for(var l,n,r=new RegExp(this.leOperator),o=new RegExp(this.geOperator),d=new RegExp(this.lwOperator),c=new RegExp(this.grOperator),f=new RegExp(this.dfOperator),p=new RegExp(u["default"].rgxEsc(this.lkOperator)),g=new RegExp(this.eqOperator),v=new RegExp(this.stOperator),b=new RegExp(this.enOperator),m=this.emOperator,_=this.nmOperator,y=new RegExp(u["default"].rgxEsc(this.rgxOperator)),w=this.refRow;wR;R++){var O=this.searchArgs[this.singleSearchFlt?0:R],I=this.hasColDateType?this.colDateType[R]:this.defaultDateType;if(""!==O){var S=u["default"].matchCase(this.getCellData(x[R]),this.caseSensitive),E=O.split(this.orOperator),L=E.length>1?!0:!1,N=O.split(this.anOperator),D=N.length>1?!0:!1;if(L||D){for(var A=void 0,H=!1,j=L?E:N,V=0,U=j.length;U>V&&(A=u["default"].trim(j[V]),H=e.call(this,A,S,R),t.call(this,A,H,x[R]),!L||!H)&&(!D||H);V++);k[R]=H}else k[R]=e.call(this,u["default"].trim(O),S,R),t.call(this,O,k[R],x[R]);k[R]||(P=!1),this.singleSearchFlt&&k[R]&&(F=!0),this.popupFilters&&i.popupFilter.buildIcon(R,!0),this.markActiveColumns&&w===this.refRow&&(this.onBeforeActiveColumn&&this.onBeforeActiveColumn.call(null,this,R),h["default"].addClass(this.getHeaderElement(R),this.activeColumnsCssClass),this.onAfterActiveColumn&&this.onAfterActiveColumn.call(null,this,R))}}this.singleSearchFlt&&F&&(P=!0),P?(this.validateRow(w,!0),this.validRowsIndex.push(w),this.alternateRows&&i.alternateRows.setRowBg(w,this.validRowsIndex.length),this.onRowValidated&&this.onRowValidated.call(null,this,w)):(this.validateRow(w,!1),i.alternateRows&&i.alternateRows.removeRowBg(w),this.hasVisibleRows&&-1!==this.visibleRows.indexOf(w)?this.validRowsIndex.push(w):a++)}}this.nbVisibleRows=this.validRowsIndex.length,this.nbHiddenRows=a,this.rememberGridValues&&i.store.saveFilterValues(this.fltsValuesCookie),this.paging?(i.paging.startPagingRow=0,i.paging.currentPageNb=1,i.paging.setPagingInfo(this.validRowsIndex)):this.applyProps(),this.onAfterFilter&&this.onAfterFilter.call(null,this)}}},{key:"applyProps",value:function(){var t=this.Mod;this.hasVisibleRows&&this.enforceVisibility(),this.hasExtension("colOps")&&this.extension("colOps").calc(),this.linkedFilters&&this.linkFilters(),this.rowsCounter&&t.rowsCounter.refresh(this.nbVisibleRows),this.popupFilters&&t.popupFilter.closeAll()}},{key:"getColValues",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],s=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],i=arguments.length<=3||void 0===arguments[3]?[]:arguments[3];if(this.fltGrid){var a=this.tbl.rows,l=[];e&&l.push(this.getHeadersText()[t]);for(var n=this.refRow;n0&&(r=-1!=i.indexOf(n));var o=a[n].cells,h=o.length;if(h===this.nbCells&&!r)for(var d=0;h>d;d++)if(d==t&&""===a[n].style.display){var u=this.getCellData(o[d]),c=this.colNbFormat?this.colNbFormat[t]:null,f=s?C["default"].removeNbFormat(u,c):u;l.push(f)}}return l}}},{key:"getFilterValue",value:function(t){if(this.fltGrid){var e=void 0,s=this.getFilterElement(t);if(!s)return"";var i=this.getFilterType(t);if(i!==this.fltTypeMulti&&i!==this.fltTypeCheckList)e=s.value;else if(i===this.fltTypeMulti){e="";for(var a=0,l=s.options.length;l>a;a++)s.options[a].selected&&(e=e.concat(s.options[a].value+" "+this.orOperator+" "));e=e.substr(0,e.length-4)}else i===this.fltTypeCheckList&&(null!==s.getAttribute("value")?(e=s.getAttribute("value"), +e=e.substr(0,e.length-3)):e="");return e}}},{key:"getFiltersValue",value:function(){if(this.fltGrid){for(var t=[],e=0,s=this.fltIds.length;s>e;e++)t.push(u["default"].trim(u["default"].matchCase(this.getFilterValue(e),this.caseSensitive)));return t}}},{key:"getFilterId",value:function(t){return this.fltGrid?this.fltIds[t]:void 0}},{key:"getFiltersByType",value:function(t,e){if(this.fltGrid){for(var s=[],i=0,a=this.fltIds.length;a>i;i++){var l=this.getFilterType(i);if(l===u["default"].lower(t)){var n=e?i:this.fltIds[i];s.push(n)}}return s}}},{key:"getFilterElement",value:function(t){var e=this.fltIds[t];return h["default"].id(e)}},{key:"getCellsNb",value:function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=this.tbl.rows[t];return e.cells.length}},{key:"getRowsNb",value:function(t){var e=g["default"].isUndef(this.refRow)?0:this.refRow,s=this.tbl.rows.length;return t&&(e=0),parseInt(s-e,10)}},{key:"getCellData",value:function(t){var e=t.cellIndex;return this.customCellData&&-1!=this.customCellDataCols.indexOf(e)?this.customCellData.call(null,this,t,e):h["default"].getText(t)}},{key:"getTableData",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=this.tbl.rows,s=[];t&&s.push([this.getHeadersRowIndex(),this.getHeadersText()]);for(var i=this.refRow;in;n++){var o=this.getCellData(l[n]);a[1].push(o)}s.push(a)}return s}},{key:"getFilteredData",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(!this.validRowsIndex)return[];var e=this.tbl.rows,s=[];t&&s.push([this.getHeadersRowIndex(),this.getHeadersText()]);for(var i=this.getValidRows(!0),a=0;aa;a++){var n=s[a],r=n[1],o=r[t];i.push(o)}return i}},{key:"getRowDisplay",value:function(t){return g["default"].isObj(t)?t.style.display:null}},{key:"validateRow",value:function(t,e){var s=this.tbl.rows[t];if(s&&"boolean"==typeof e){this.hasVisibleRows&&-1!==this.visibleRows.indexOf(t)&&(e=!0);var i=e?"":"none",a=e?"true":"false";s.style.display=i,this.paging&&s.setAttribute("validRow",a)}}},{key:"validateAllRows",value:function(){if(this._hasGrid){this.validRowsIndex=[];for(var t=this.refRow;tl;l++){var r=s.options[l];(""===a||""===a[0])&&(r.selected=!1),""===r.value&&(r.selected=!1),""!==r.value&&b["default"].has(a,r.value,!0)&&(r.selected=!0)}else if(i===this.fltTypeCheckList){e=u["default"].matchCase(e,this.caseSensitive);var o=e.split(" "+this.orOperator+" "),d=h["default"].tag(s,"li").length;s.setAttribute("value",""),s.setAttribute("indexes","");for(var c=0;d>c;c++){var f=h["default"].tag(s,"li")[c],p=h["default"].tag(f,"label")[0],g=h["default"].tag(f,"input")[0],v=u["default"].matchCase(h["default"].getText(p),this.caseSensitive);""!==v&&b["default"].has(o,v,!0)?(g.checked=!0,this.Mod.checkList.setCheckListValues(g)):(g.checked=!1,this.Mod.checkList.setCheckListValues(g))}}}}},{key:"setColWidths",value:function(t,e){function s(){for(var t=this.nbCells,s=this.colWidths,i=h["default"].tag(e,"col"),a=i.length>0,l=a?null:A.createDocumentFragment(),n=0;t>n;n++){var r=void 0;a?r=i[n]:(r=h["default"].create("col",["id",this.id+"_col_"+n]),l.appendChild(r)),r.style.width=s[n]}a||e.insertBefore(l,e.firstChild)}if(this.fltGrid&&this.hasColWidths){e=e||this.tbl;var i=void 0;i=void 0===t?"none"!=e.rows[0].style.display?0:1:t,s.call(this)}}},{key:"enforceVisibility",value:function(){if(this.hasVisibleRows)for(var t=0,e=this.visibleRows.length;e>t;t++){var s=this.visibleRows[t];s<=this.nbRows&&this.validateRow(s,!0)}}},{key:"clearFilters",value:function(){this.EvtManager(this.Evt.name.clear)}},{key:"_clearFilters",value:function(){if(this.fltGrid){this.onBeforeReset&&this.onBeforeReset.call(null,this,this.getFiltersValue());for(var t=0,e=this.fltIds.length;e>t;t++)this.setFilterValue(t,"");this.linkedFilters&&this.linkFilters(),this.rememberPageLen&&f["default"].remove(this.pgLenCookie),this.rememberPageNb&&f["default"].remove(this.pgNbCookie),this.onAfterReset&&this.onAfterReset.call(null,this)}}},{key:"clearActiveColumns",value:function(){for(var t=0,e=this.getCellsNb(this.headersRow);e>t;t++)h["default"].removeClass(this.getHeaderElement(t),this.activeColumnsCssClass)}},{key:"linkFilters",value:function(){if(this.activeFilterId){var t=this.getFiltersByType(this.fltTypeSlc,!0),e=this.getFiltersByType(this.fltTypeMulti,!0),s=this.getFiltersByType(this.fltTypeCheckList,!0),i=t.concat(e);i=i.concat(s);var a=this.activeFilterId.split("_")[0];a=a.split(this.prfxFlt)[1];for(var l=void 0,n=0,r=i.length;r>n;n++){var o=h["default"].id(this.fltIds[i[n]]);if(l=this.getFilterValue(i[n]),a!==i[n]||this.paging&&-1!=t.indexOf(i[n])&&a===i[n]||!this.paging&&(-1!=s.indexOf(i[n])||-1!=e.indexOf(i[n]))||l===this.displayAllText){if(-1!=s.indexOf(i[n])?this.Mod.checkList.checkListDiv[i[n]].innerHTML="":o.innerHTML="",this.loadFltOnDemand){var d=h["default"].createOpt(this.displayAllText,"");o&&o.appendChild(d)}-1!=s.indexOf(i[n])?this.Mod.checkList._build(i[n]):this.Mod.dropdown._build(i[n],!0),this.setFilterValue(i[n],l)}}}}},{key:"_resetGrid",value:function(){if(!this.isFirstLoad){var t=this.Mod,e=this.tbl,s=e.rows,i=this.filtersRowIndex,a=s[i];if(!this.gridLayout)if(e.tHead){var l=e.tHead.insertRow(this.filtersRowIndex);e.tHead.replaceChild(this.fltGridEl,l)}else a.parentNode.insertBefore(this.fltGridEl,a);if(this.isExternalFlt)for(var n=this.externalFltTgtIds,r=0,o=n.length;o>r;r++){var d=h["default"].id(n[r]);if(d){var u=this.externalFltEls[r];d.appendChild(u);var c=this.getFilterType(r);this.gridLayout&&""===u.innerHTML&&c!==this.fltTypeInp&&((c===this.fltTypeSlc||c===this.fltTypeMulti)&&t.dropdown.build(r),c===this.fltTypeCheckList&&t.checkList.build(r))}}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=s.length,this.popupFilters&&(this.headersRow++,t.popupFilter.reset()),this.gridLayout||h["default"].addClass(this.tbl,this.prfxTf),this._hasGrid=!0}}},{key:"isExactMatch",value:function(t){var e=this.getFilterType(t);return this.exactMatchByCol[t]||this.exactMatch||e!==this.fltTypeInp}},{key:"_containsStr",value:function(t,e,s){var i=void 0,a=this.caseSensitive?"g":"gi";return i=s?new RegExp("(^\\s*)"+u["default"].rgxEsc(t)+"(\\s*$)",a):new RegExp(u["default"].rgxEsc(t),a),i.test(e)}},{key:"isImported",value:function(t,e){for(var s=!1,i=e?e:"script",a="script"==i?"src":"href",l=h["default"].tag(A,i),n=0,r=l.length;r>n;n++)if(void 0!==l[n][a]&&l[n][a].match(t)){s=!0;break}return s}},{key:"import",value:function(t,e,s,i){var a=i?i:"script",l=this.isImported(e,a);if(!l){var n=this,r=!1,o=void 0,d=h["default"].tag(A,"head")[0];o="link"===u["default"].lower(a)?h["default"].create("link",["id",t],["type","text/css"],["rel","stylesheet"],["href",e]):h["default"].create("script",["id",t],["type","text/javascript"],["src",e]),o.onload=o.onreadystatechange=function(){r||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(r=!0,"function"==typeof s&&s.call(null,n))},o.onerror=function(){throw new Error("TF script could not load: "+e)},d.appendChild(o)}}},{key:"hasGrid",value:function(){return this._hasGrid}},{key:"getFiltersId",value:function(){return this.fltIds||[]}},{key:"getValidRows",value:function(t){if(!t)return this.validRowsIndex;this.validRowsIndex=[];for(var e=this.refRow;e]+>/g,"");return e=e.replace(/^\s+/,"").replace(/\s+$/,"")},create:function(t){if(t&&""!==t){var e=document.createElement(t),s=arguments;if(s.length>1)for(var i=0;i0){var i=document.cookie,a=i.indexOf(s);if(-1!==a){a+=s.length;var l=i.indexOf(";",a);-1===l&&(l=i.length),e=unescape(i.substring(a,l))}}return e},remove:function(t){this.write(t,"",-1)},valueToArray:function(t,e){e||(e=",");var s=this.read(t),i=s.split(e);return i},getValueByIndex:function(t,e,s){s||(s=",");var i=this.valueToArray(t,s);return i[e]}},t.exports=e["default"]},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=void 0;e["default"]={isObj:function(t){var e=!1;return"string"==typeof t?window[t]&&"object"==typeof window[t]&&(e=!0):t&&"object"==typeof t&&(e=!0),e},isFn:function(t){return t&&t.constructor==Function},isArray:function(t){return t&&t.constructor==Array},isUndef:function(t){return t===s},isNull:function(t){return null===t},isEmpty:function(t){return this.isUndef(t)||this.isNull(t)||0===t.length}},t.exports=e["default"]},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=s(3),l=i(a);e["default"]={has:function(t,e,s){for(var i=void 0===s?!1:s,a=0;a2)return t;var e=void 0;return 99>=t&&t>50&&(e="19"+t),(50>t||"00"===t)&&(e="20"+t),e}function i(t){if(void 0===t)return 0;for(var e=void 0,s=["january","february","march","april","may","june","july","august","september","october","november","december","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],i=0;i11||23>e)&&(e-=12),1>e||e>12?0:e}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={isValid:function(t,e){if(e||(e="DMY"),e=e.toUpperCase(),3!=e.length&&"DDMMMYYYY"===e){var s=this.format(t,e);t=s.getDate()+"/"+(s.getMonth()+1)+"/"+s.getFullYear(),e="DMY"}(-1===e.indexOf("M")||-1===e.indexOf("D")||-1===e.indexOf("Y"))&&(e="DMY");var i=void 0,a=void 0;if("Y"==e.substring(0,1)?(i=/^\d{2}(\-|\/|\.)\d{1,2}\1\d{1,2}$/,a=/^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/):"Y"==e.substring(1,2)?(i=/^\d{1,2}(\-|\/|\.)\d{2}\1\d{1,2}$/,a=/^\d{1,2}(\-|\/|\.)\d{4}\1\d{1,2}$/):(i=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/,a=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/),i.test(t)===!1&&a.test(t)===!1)return!1;var l=t.split(RegExp.$1),n=void 0,r=void 0,o=void 0;n="M"===e.substring(0,1)?l[0]:"M"===e.substring(1,2)?l[1]:l[2],r="D"===e.substring(0,1)?l[0]:"D"===e.substring(1,2)?l[1]:l[2],o="Y"===e.substring(0,1)?l[0]:"Y"===e.substring(1,2)?l[1]:l[2],parseInt(o,10)<=50&&(o=(parseInt(o,10)+2e3).toString()),parseInt(o,10)<=99&&(o=(parseInt(o,10)+1900).toString());var h=new Date(parseInt(o,10),parseInt(n,10)-1,parseInt(r,10),0,0,0,0);return parseInt(r,10)!=h.getDate()?!1:parseInt(n,10)-1!=h.getMonth()?!1:!0},format:function(t,e){if(e||(e="DMY"),!t||""===t)return new Date(1001,0,1);var a=void 0,l=void 0;switch(e.toUpperCase()){case"DDMMMYYYY":l=t.replace(/[- \/.]/g," ").split(" "),a=new Date(s(l[2]),i(l[1])-1,l[0]);break;case"DMY":l=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),a=new Date(s(l[2]),l[1]-1,l[0]);break;case"MDY":l=t.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),a=new Date(s(l[2]),l[0]-1,l[1]);break;case"YMD":l=t.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,"$1 $4 $6").split(" "),a=new Date(s(l[0]),l[1]-1,l[2]);break;default:l=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),a=new Date(s(l[2]),l[1]-1,l[0])}return a}},t.exports=e["default"]},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=s(3),l=i(a);e["default"]={removeNbFormat:function(t,e){if(t){e||(e="us");var s=t;return s="us"===l["default"].lower(e)?+s.replace(/[^\d\.-]/g,""):+s.replace(/[^\d\,-]/g,"").replace(",",".")}}},t.exports=e["default"]},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var s=0;s0&&i.removeChild(k[0]),this.headTbl.style.tableLayout="fixed",i.style.tableLayout="fixed",this.headTbl.cellPadding=i.cellPadding,this.headTbl.cellSpacing=i.cellSpacing,e.setColWidths(0,this.headTbl),i.style.width="",this.headTbl.style.width=i.clientWidth+"px",p["default"].add(this.tblCont,"scroll",function(e){var s=p["default"].target(e),i=s.scrollLeft;t.headTblCont.scrollLeft=i});var P=(s.extensions||[]).filter(function(t){return"sort"===t.name});1===P.length&&(P[0].async_sort=!0,P[0].trigger_ids=g),this.tblHasColTag=d["default"].tag(i,"col").length>0?!0:!1;var F=function(){for(var t=e.nbCells-1;t>=0;t--){var s=d["default"].create("col",["id",e.id+"_col_"+t]);i.insertBefore(s,i.firstChild),s.style.width=e.colWidths[t],this.gridColElms[t]=s}this.tblHasColTag=!0};if(this.tblHasColTag)for(var R=d["default"].tag(i,"col"),O=0;O',this.popUpDivCssClass=e.popup_div_css_class||"popUpFilter",this.onBeforePopUpOpen=d["default"].isFn(e.on_before_popup_filter_open)?e.on_before_popup_filter_open:null,this.onAfterPopUpOpen=d["default"].isFn(e.on_after_popup_filter_open)?e.on_after_popup_filter_open:null,this.onBeforePopUpClose=d["default"].isFn(e.on_before_popup_filter_close)?e.on_before_popup_filter_close:null, +this.onAfterPopUpClose=d["default"].isFn(e.on_after_popup_filter_close)?e.on_after_popup_filter_close:null,this.popUpFltSpans=[],this.popUpFltImgs=[],this.popUpFltElms=this.popUpFltElmCache||[],this.popUpFltAdjustToContainer=!0,this.prfxPopUpSpan="popUpSpan_",this.prfxPopUpDiv="popUpDiv_"}return l(s,e),n(s,[{key:"onClick",value:function(e){var s=e||t.event,i=s.target.parentNode,a=parseInt(i.getAttribute("ci"),10);if(this.closeAll(a),this.toggle(a),this.popUpFltAdjustToContainer){var l=this.popUpFltElms[a],n=this.tf.getHeaderElement(a),r=.95*n.clientWidth;l.style.width=parseInt(r,10)+"px"}p["default"].cancel(s),p["default"].stop(s)}},{key:"init",value:function(){var t=this;if(!this.initialized){for(var e=this.tf,s=0;sC;C++)if(t===C&&(!e||e&&a.disableExcludedOptions)||t==C&&e&&(""===o[m].style.display&&!a.paging||a.paging&&(!a.validRowsIndex||a.validRowsIndex&&-1!=a.validRowsIndex.indexOf(m))&&(void 0===c||c==t||c!=t&&-1!=a.validRowsIndex.indexOf(m)))){var w=a.getCellData(_[C]),x=u["default"].matchCase(w,d);if(h["default"].has(this.opts,x,d)||this.opts.push(w),e&&a.disableExcludedOptions){var T=b[C];T||(T=a.getFilteredDataCol(C)),h["default"].has(T,x,d)||h["default"].has(v,x,d)||this.isFirstLoad||v.push(w)}}}if(this.isCustom){var k=a.getCustomOptions(t);this.opts=k[0],this.optsTxt=k[1]}if(a.sortSlc&&!this.isCustom&&(d?(this.opts.sort(),v&&v.sort()):(this.opts.sort(f["default"].ignoreCase),v&&v.sort(f["default"].ignoreCase))),a.sortNumAsc&&-1!=a.sortNumAsc.indexOf(t))try{this.opts.sort(numSortAsc),v&&v.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(P){this.opts.sort(),v&&v.sort(),this.isCustom&&this.optsTxt.sort()}if(a.sortNumDesc&&-1!=a.sortNumDesc.indexOf(t))try{this.opts.sort(numSortDesc),v&&v.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(P){this.opts.sort(),v&&v.sort(),this.isCustom&&this.optsTxt.sort()}this.addOptions(t,n,e,v,p,g)}}},{key:"addOptions",value:function(t,e,s,i,a,l){var n=this.tf,o=u["default"].lower(this.slcFillingMethod),d=e.value;e.innerHTML="",e=this.addFirstOption(e);for(var c=0;c"+p+""}else{var b;b=n.loadFltOnDemand&&d===this.opts[c]&&n.getFilterType(t)===n.fltTypeSlc?r["default"].createOpt(p,f,!0):n.getFilterType(t)!==n.fltTypeMulti?r["default"].createOpt(p,f," "!==a[t]&&f===a[t]?!0:!1):r["default"].createOpt(p,f,h["default"].has(l,u["default"].matchCase(this.opts[c],n.matchCase),n.matchCase)||-1!==l.toString().indexOf(f)?!0:!1),g&&(b.disabled=!0),e.appendChild(b)}}"innerhtml"===o&&(e.innerHTML+=this.slcInnerHtml),e.setAttribute("filled","1")}},{key:"addFirstOption",value:function(t){var e=this.tf,s=u["default"].lower(this.slcFillingMethod);if("innerhtml"===s)this.slcInnerHtml+='";else{var i=r["default"].createOpt(this.enableSlcResetFilter?e.displayAllText:"","");if(this.enableSlcResetFilter||(i.style.display="none"),t.appendChild(i),e.enableEmptyOption){var a=r["default"].createOpt(e.emptyText,e.emOperator);t.appendChild(a)}if(e.enableNonEmptyOption){var l=r["default"].createOpt(e.nonEmptyText,e.nmOperator);t.appendChild(l)}}return t}}]),t}();e.Dropdown=p},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=s(3),l=i(a);e["default"]={ignoreCase:function(t,e){var s=l["default"].lower(t),i=l["default"].lower(e);return i>s?-1:s>i?1:0}},t.exports=e["default"]},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var s=0;s_;_++)if(t===_&&(!a.linkedFilters||a.linkedFilters&&a.disableExcludedOptions)||t===_&&a.linkedFilters&&(""===d[v].style.display&&!a.paging||a.paging&&(!c||c===t||c!=t&&-1!=a.validRowsIndex.indexOf(v)))){var y=a.getCellData(b[_]),C=u["default"].matchCase(y,a.matchCase);h["default"].has(this.opts,C,a.matchCase)||this.opts.push(y);var w=p[_];a.linkedFilters&&a.disableExcludedOptions&&(w||(w=a.getFilteredDataCol(_)),h["default"].has(w,C,a.matchCase)||h["default"].has(this.excludedOpts,C,a.matchCase)||a.isFirstLoad||this.excludedOpts.push(y))}}if(this.isCustom){var x=a.getCustomOptions(t);this.opts=x[0],this.optsTxt=x[1]}if(a.sortSlc&&!this.isCustom&&(a.matchCase?(this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort()):(this.opts.sort(f["default"].ignoreCase),this.excludedOpts&&this.excludedOpts.sort(f["default"].ignoreCase))),a.sortNumAsc&&-1!=a.sortNumAsc.indexOf(t))try{this.opts.sort(numSortAsc),this.excludedOpts&&this.excludedOpts.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(T){this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort(),this.isCustom&&this.optsTxt.sort()}if(a.sortNumDesc&&-1!=a.sortNumDesc.indexOf(t))try{this.opts.sort(numSortDesc),this.excludedOpts&&this.excludedOpts.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(T){this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort(),this.isCustom&&this.optsTxt.sort()}this.addChecks(t,o,a.separator),a.loadFltOnDemand&&(n.innerHTML=""),n.appendChild(o),n.setAttribute("filled","1")}}},{key:"addChecks",value:function(t,e){var s=this,i=this.tf,a=this.addTChecks(t,e),l=[],n=i.feature("store"),o=n?n.getFilterValues(i.fltsValuesCookie)[t]:null;o&&u["default"].trim(o).length>0&&(i.hasCustomSlcOptions&&-1!=i.customSlcOptions.cols.indexOf(t)?l.push(o):l=o.split(" "+i.orOperator+" "));for(var d=0;d0?1:0),l=a+i.pagingLength-1<=e.nbVisibleRows?a+i.pagingLength-1:e.nbVisibleRows;s=a+this.fromToTextSeparator+l+this.overText+e.nbVisibleRows}}else s=t&&""!==t?t:e.nbFilterableRows-e.nbHiddenRows;this.rowsCounterSpan.innerHTML=s,this.onAfterRefreshCounter&&this.onAfterRefreshCounter.call(null,e,this.rowsCounterSpan,s)}}},{key:"destroy",value:function(){this.initialized&&(!this.rowsCounterTgtId&&this.rowsCounterDiv?this.rowsCounterDiv.parentNode.removeChild(this.rowsCounterDiv):d["default"].id(this.rowsCounterTgtId).innerHTML="",this.rowsCounterSpan=null,this.rowsCounterDiv=null,this.disable(),this.initialized=!1)}}]),e}(o.Feature);e.RowsCounter=f},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var s=0;s",this.btnPrevPageText=s.btn_prev_page_text||"<",this.btnLastPageText=s.btn_last_page_text||">|",this.btnFirstPageText=s.btn_first_page_text||"|<",this.btnNextPageHtml=s.btn_next_page_html||(t.enableIcons?'':null),this.btnPrevPageHtml=s.btn_prev_page_html||(t.enableIcons?'':null),this.btnFirstPageHtml=s.btn_first_page_html||(t.enableIcons?'':null),this.btnLastPageHtml=s.btn_last_page_html||(t.enableIcons?'':null),this.pageText=s.page_text||" Page ",this.ofText=s.of_text||" of ",this.nbPgSpanCssClass=s.nb_pages_css_class||"nbpg",this.hasPagingBtns=s.paging_btns===!1?!1:!0,this.pageSelectorType=s.page_selector_type||t.fltTypeSlc,this.onBeforeChangePage=c["default"].isFn(s.on_before_change_page)?s.on_before_change_page:null,this.onAfterChangePage=c["default"].isFn(s.on_after_change_page)?s.on_after_change_page:null,this.prfxSlcPages="slcPages_",this.prfxSlcResults="slcResults_",this.prfxSlcResultsTxt="slcResultsTxt_",this.prfxBtnNextSpan="btnNextSpan_",this.prfxBtnPrevSpan="btnPrevSpan_",this.prfxBtnLastSpan="btnLastSpan_",this.prfxBtnFirstSpan="btnFirstSpan_",this.prfxBtnNext="btnNext_",this.prfxBtnPrev="btnPrev_",this.prfxBtnLast="btnLast_",this.prfxBtnFirst="btnFirst_",this.prfxPgSpan="pgspan_",this.prfxPgBeforeSpan="pgbeforespan_",this.prfxPgAfterSpan="pgafterspan_";var i=this.refRow,l=this.nbRows;this.nbPages=Math.ceil((l-i)/this.pagingLength);var n=this;this.evt={slcIndex:function(){return n.pageSelectorType===t.fltTypeSlc?n.pagingSlc.options.selectedIndex:parseInt(n.pagingSlc.value,10)-1},nbOpts:function(){return n.pageSelectorType===t.fltTypeSlc?parseInt(n.pagingSlc.options.length,10)-1:n.nbPages-1},next:function(){var t=n.evt.slcIndex()0?n.evt.slcIndex()-1:n.evt.nbOpts();n.changePage(t)},last:function(){n.changePage(n.evt.nbOpts())},first:function(){n.changePage(0)},_detectKey:function(e){var s=v["default"].keyCode(e);13===s&&(t.sorted?(t.filter(),n.changePage(n.evt.slcIndex())):n.changePage(),this.blur())},slcPagesChange:null,nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null}}return l(e,t),n(e,[{key:"init",value:function(){var t,e=this,s=this.tf,i=this.evt;if(!this.initialized){this.hasResultsPerPage&&(this.resultsPerPage.length<2?this.hasResultsPerPage=!1:(this.pagingLength=this.resultsPerPage[1][0],this.setResultsPerPage())),i.slcPagesChange=function(t){var s=t.target;e.changePage(s.selectedIndex)},this.pageSelectorType===s.fltTypeSlc&&(t=d["default"].create(s.fltTypeSlc,["id",this.prfxSlcPages+s.id]),t.className=this.pgSlcCssClass,v["default"].add(t,"change",i.slcPagesChange)),this.pageSelectorType===s.fltTypeInp&&(t=d["default"].create(s.fltTypeInp,["id",this.prfxSlcPages+s.id],["value",this.currentPageNb]),t.className=this.pgInpCssClass,v["default"].add(t,"keypress",i._detectKey));var a=d["default"].create("span",["id",this.prfxBtnNextSpan+s.id]),l=d["default"].create("span",["id",this.prfxBtnPrevSpan+s.id]),n=d["default"].create("span",["id",this.prfxBtnLastSpan+s.id]),r=d["default"].create("span",["id",this.prfxBtnFirstSpan+s.id]);if(this.hasPagingBtns){if(this.btnNextPageHtml)a.innerHTML=this.btnNextPageHtml,v["default"].add(a,"click",i.next);else{var o=d["default"].create(s.fltTypeInp,["id",this.prfxBtnNext+s.id],["type","button"],["value",this.btnNextPageText],["title","Next"]);o.className=this.btnPageCssClass,v["default"].add(o,"click",i.next),a.appendChild(o)}if(this.btnPrevPageHtml)l.innerHTML=this.btnPrevPageHtml,v["default"].add(l,"click",i.prev);else{var h=d["default"].create(s.fltTypeInp,["id",this.prfxBtnPrev+s.id],["type","button"],["value",this.btnPrevPageText],["title","Previous"]);h.className=this.btnPageCssClass,v["default"].add(h,"click",i.prev),l.appendChild(h)}if(this.btnLastPageHtml)n.innerHTML=this.btnLastPageHtml,v["default"].add(n,"click",i.last);else{var u=d["default"].create(s.fltTypeInp,["id",this.prfxBtnLast+s.id],["type","button"],["value",this.btnLastPageText],["title","Last"]);u.className=this.btnPageCssClass,v["default"].add(u,"click",i.last),n.appendChild(u)}if(this.btnFirstPageHtml)r.innerHTML=this.btnFirstPageHtml,v["default"].add(r,"click",i.first);else{var c=d["default"].create(s.fltTypeInp,["id",this.prfxBtnFirst+s.id],["type","button"],["value",this.btnFirstPageText],["title","First"]);c.className=this.btnPageCssClass,v["default"].add(c,"click",i.first),r.appendChild(c)}}this.pagingTgtId||s.setToolbar();var f=this.pagingTgtId?d["default"].id(this.pagingTgtId):s.mDiv;f.appendChild(r),f.appendChild(l);var p=d["default"].create("span",["id",this.prfxPgBeforeSpan+s.id]);p.appendChild(d["default"].text(this.pageText)),p.className=this.nbPgSpanCssClass,f.appendChild(p),f.appendChild(t);var g=d["default"].create("span",["id",this.prfxPgAfterSpan+s.id]);g.appendChild(d["default"].text(this.ofText)),g.className=this.nbPgSpanCssClass,f.appendChild(g);var b=d["default"].create("span",["id",this.prfxPgSpan+s.id]);b.className=this.nbPgSpanCssClass,b.appendChild(d["default"].text(" "+this.nbPages+" ")),f.appendChild(b),f.appendChild(a),f.appendChild(n),this.pagingSlc=d["default"].id(this.prfxSlcPages+s.id),s.rememberGridValues||this.setPagingInfo(),s.fltGrid||(s.validateAllRows(),this.setPagingInfo(s.validRowsIndex)),this.initialized=!0}}},{key:"reset",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=this.tf;e.hasGrid()&&!this.isEnabled()&&(this.enable(),this.init(),e.resetValues(),t&&e.filter())}},{key:"setPagingInfo",value:function(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],e=this.tf,s=e.tbl.rows,i=this.pagingTgtId?d["default"].id(this.pagingTgtId):e.mDiv,a=d["default"].id(this.prfxPgSpan+e.id);if(e.validRowsIndex=t,0===t.length)for(var l=e.refRow;l0)if(i.style.visibility="visible",this.pageSelectorType===e.fltTypeSlc)for(var o=0;ol;l++){var r=e.validRowsIndex[l],o=i[r],h=o.getAttribute("validRow");l>=this.startPagingRow&&a>l?((c["default"].isNull(h)||Boolean("true"===h))&&(o.style.display=""),e.alternateRows&&s&&s.setRowBg(r,l)):(o.style.display="none",e.alternateRows&&s&&s.removeRowBg(r))}e.nbVisibleRows=e.validRowsIndex.length,e.applyProps()}},{key:"getPage",value:function(){return this.currentPageNb}},{key:"setPage",value:function(t){var e=this.tf;if(e.hasGrid()&&this.isEnabled()){var s=this.evt,i=typeof t;if("string"===i)switch(p["default"].lower(t)){case"next":s.next();break;case"previous":s.prev();break;case"last":s.last();break;case"first":s.first();break;default:s.next()}else"number"===i&&this.changePage(t-1)}}},{key:"setResultsPerPage",value:function(){var t=this,e=this.tf,s=this.evt;if((e.hasGrid()||e.isFirstLoad)&&!this.resultsPerPageSlc&&this.resultsPerPage){s.slcResultsChange=function(e){t.changeResultsPerPage(),e.target.blur(); +};var i=d["default"].create(e.fltTypeSlc,["id",this.prfxSlcResults+e.id]);i.className=this.resultsSlcCssClass;var a=this.resultsPerPage[0],l=this.resultsPerPage[1],n=d["default"].create("span",["id",this.prfxSlcResultsTxt+e.id]);n.className=this.resultsSpanCssClass,this.resultsPerPageTgtId||e.setToolbar();var r=this.resultsPerPageTgtId?d["default"].id(this.resultsPerPageTgtId):e.rDiv;n.appendChild(d["default"].text(a));var o=e.feature("help");o&&o.btn?(o.btn.parentNode.insertBefore(n,o.btn),o.btn.parentNode.insertBefore(i,o.btn)):(r.appendChild(n),r.appendChild(i));for(var h=0;h=0&&t<=this.nbPages-1&&(this.onBeforeChangePage&&this.onBeforeChangePage.call(null,this,t),this.currentPageNb=parseInt(t,10)+1,this.pageSelectorType===e.fltTypeSlc?this.pagingSlc.options[t].selected=!0:this.pagingSlc.value=this.currentPageNb,e.rememberPageNb&&e.feature("store").savePageNb(e.pgNbCookie),this.startPagingRow=this.pageSelectorType===e.fltTypeSlc?this.pagingSlc.value:t*this.pagingLength,this.groupByPage(),this.onAfterChangePage&&this.onAfterChangePage.call(null,this,t)))}},{key:"_changeResultsPerPage",value:function(){var t=this.tf;if(this.isEnabled()){var e=this.resultsPerPageSlc,s=this.pageSelectorType===t.fltTypeSlc?this.pagingSlc.selectedIndex:parseInt(this.pagingSlc.value-1,10);if(this.pagingLength=parseInt(e.options[e.selectedIndex].value,10),this.startPagingRow=this.pagingLength*s,!isNaN(this.pagingLength)){if(this.startPagingRow>=t.nbFilterableRows&&(this.startPagingRow=t.nbFilterableRows-this.pagingLength),this.setPagingInfo(),this.pageSelectorType===t.fltTypeSlc){var i=this.pagingSlc.options.length-1<=s?this.pagingSlc.options.length-1:s;this.pagingSlc.options[i].selected=!0}t.rememberPageLen&&t.feature("store").savePageLength(t.pgLenCookie)}}}},{key:"_resetPage",value:function(t){var e=this.tf,s=e.feature("store").getPageNb(t);""!==s&&this.changePage(s-1)}},{key:"_resetPageLength",value:function(t){var e=this.tf;if(this.isEnabled()){var s=e.feature("store").getPageLength(t);""!==s&&(this.resultsPerPageSlc.options[s].selected=!0,this.changeResultsPerPage())}}},{key:"destroy",value:function(){var t=this.tf;if(this.initialized){var e=d["default"].id(this.prfxBtnNextSpan+t.id),s=d["default"].id(this.prfxBtnPrevSpan+t.id),i=d["default"].id(this.prfxBtnLastSpan+t.id),a=d["default"].id(this.prfxBtnFirstSpan+t.id),l=d["default"].id(this.prfxPgBeforeSpan+t.id),n=d["default"].id(this.prfxPgAfterSpan+t.id),r=d["default"].id(this.prfxPgSpan+t.id),o=this.evt;this.pagingSlc&&(this.pageSelectorType===t.fltTypeSlc?v["default"].remove(this.pagingSlc,"change",o.slcPagesChange):this.pageSelectorType===t.fltTypeInp&&v["default"].remove(this.pagingSlc,"keypress",o._detectKey),this.pagingSlc.parentNode.removeChild(this.pagingSlc)),e&&(v["default"].remove(e,"click",o.next),e.parentNode.removeChild(e)),s&&(v["default"].remove(s,"click",o.prev),s.parentNode.removeChild(s)),i&&(v["default"].remove(i,"click",o.last),i.parentNode.removeChild(i)),a&&(v["default"].remove(a,"click",o.first),a.parentNode.removeChild(a)),l&&l.parentNode.removeChild(l),n&&n.parentNode.removeChild(n),r&&r.parentNode.removeChild(r),this.hasResultsPerPage&&this.removeResultsPerPage(),this.pagingSlc=null,this.nbPages=0,this.disable(),this.initialized=!1}}}]),e}(o.Feature);e.Paging=b},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var s=0;s':null),this.prfxResetSpan="resetspan_"}return l(e,t),n(e,[{key:"onClick",value:function(){this.isEnabled()&&this.tf.clearFilters()}},{key:"init",value:function(){var t=this,e=this.tf;if(!this.initialized){var s=d["default"].create("span",["id",this.prfxResetSpan+e.id]);this.btnResetTgtId||e.setToolbar();var i=this.btnResetTgtId?d["default"].id(this.btnResetTgtId):e.rDiv;if(i.appendChild(s),this.btnResetHtml){s.innerHTML=this.btnResetHtml;var a=s.firstChild;c["default"].add(a,"click",function(){t.onClick()})}else{var l=d["default"].create("a",["href","javascript:void(0);"]);l.className=e.btnResetCssClass,l.appendChild(d["default"].text(this.btnResetText)),s.appendChild(l),c["default"].add(l,"click",function(){t.onClick()})}this.btnResetEl=s.firstChild,this.initialized=!0}}},{key:"destroy",value:function(){var t=this.tf;if(this.initialized){var e=d["default"].id(this.prfxResetSpan+t.id);e&&e.parentNode.removeChild(e),this.btnResetEl=null,this.disable(),this.initialized=!1}}}]),e}(o.Feature);e.ClearButton=f},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var s=0;s<, <=, >, >=, =, *, !, {, }, ||,&&, [empty], [nonempty], rgx:
Learn more
',this.instrHtml=s.help_instructions_html||null,this.btnText=s.help_instructions_btn_text||"?",this.btnHtml=s.help_instructions_btn_html||null,this.btnCssClass=s.help_instructions_btn_css_class||"helpBtn",this.contCssClass=s.help_instructions_container_css_class||"helpCont",this.btn=null,this.cont=null,this.defaultHtml='

TableFilter v'+t.version+'

'+p+"
©2015-"+t.year+' Max Guglielmi
',this.prfxHelpSpan="helpSpan_",this.prfxHelpDiv="helpDiv_"}return l(e,t),n(e,[{key:"init",value:function(){var t=this;if(!this.initialized){var e=this.tf,s=d["default"].create("span",["id",this.prfxHelpSpan+e.id]),i=d["default"].create("div",["id",this.prfxHelpDiv+e.id]);this.tgtId||e.setToolbar();var a=this.tgtId?d["default"].id(this.tgtId):e.rDiv;a.appendChild(s);var l=this.contTgtId?d["default"].id(this.contTgtId):s;if(this.btnHtml){s.innerHTML=this.btnHtml;var n=s.firstChild;c["default"].add(n,"click",function(){t.toggle()}),l.appendChild(i)}else{l.appendChild(i);var r=d["default"].create("a",["href","javascript:void(0);"]);r.className=this.btnCssClass,r.appendChild(d["default"].text(this.btnText)),s.appendChild(r),c["default"].add(r,"click",function(){t.toggle()})}this.instrHtml?(this.contTgtId&&l.appendChild(i),i.innerHTML=this.instrHtml,this.contTgtId||(i.className=this.contCssClass,c["default"].add(i,"dblclick",function(){t.toggle()}))):(i.innerHTML=this.instrText,i.className=this.contCssClass,c["default"].add(i,"dblclick",function(){t.toggle()})),i.innerHTML+=this.defaultHtml,c["default"].add(i,"click",function(){t.toggle()}),this.cont=i,this.btn=s,this.initialized=!0}}},{key:"toggle",value:function(){if(this.enabled!==!1){var t=this.cont.style.display;""===t||"none"===t?this.cont.style.display="inline":this.cont.style.display="none"}}},{key:"destroy",value:function(){this.initialized&&(this.btn.parentNode.removeChild(this.btn),this.btn=null,this.cont&&(this.cont.parentNode.removeChild(this.cont),this.cont=null,this.disable(),this.initialized=!1))}}]),e}(o.Feature);e.Help=g},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var s=0;sn;n++){var r=s?n:e[n];this.setRowBg(r,l),l++}this.initialized=!0}}},{key:"setRowBg",value:function(t,e){if(this.isEnabled()&&!isNaN(t)){var s=this.tf.tbl.rows,i=isNaN(e)?t:e;this.removeRowBg(t),d["default"].addClass(s[t],i%2?this.evenCss:this.oddCss)}}},{key:"removeRowBg",value:function(t){if(!isNaN(t)){var e=this.tf.tbl.rows;d["default"].removeClass(e[t],this.oddCss),d["default"].removeClass(e[t],this.evenCss)}}},{key:"destroy",value:function(){if(this.initialized){for(var t=this.tf.refRow;t0&&!s.startRow?void 0:s.startRow||e.refRow,s.base_path=s.base_path||e.basePath+"ezEditTable/";var n=s.editable,l=s.selection;l&&(s.default_selection=s.default_selection||"row"),s.active_cell_css=s.active_cell_css||"ezETSelectedCell";var a=0,o=0;if(l){var h=function(t,s,i){var n=t.Selection,l=function(i){if("row"===t.defaultSelection)n.SelectRowByIndex(i);else{t.ClearSelections();var l=s.cellIndex,a=e.tbl.rows[i];"both"===t.defaultSelection&&n.SelectRowByIndex(i),a&&n.SelectCell(a.cells[l])}if(e.validRowsIndex.length!==e.getRowsNb()){var r=e.tbl.rows[i];r&&r.scrollIntoView(!1),c&&(c.cellIndex===e.getCellsNb()-1&&e.gridLayout?e.tblCont.scrollLeft=1e8:0===c.cellIndex&&e.gridLayout?e.tblCont.scrollLeft=0:c.scrollIntoView(!1))}};if(e.validRowsIndex){var r,h=e.validRowsIndex,d=h.length,u="row"!==t.defaultSelection?s.parentNode:s,c="TD"===s.nodeName?s:null,f=void 0!==i?t.Event.GetKey(i):0,p=-1!==h.indexOf(u.rowIndex),g=e.feature("paging"),v=34===f||33===f?g&&g.pagingLength||t.nbRowsPerPage:1;if(p)34!==f&&33!==f?(a=h.indexOf(u.rowIndex),o=u.rowIndex):(r=34===f?d-1>=a+v?h[a+v]:[d-1]:a-v<=h[0]?h[0]:h[a-v],o=r,a=h.indexOf(r),l(r));else{if(u.rowIndex>o)if(u.rowIndex>=h[d-1])r=h[d-1];else{var b=a+v;r=b>d-1?h[d-1]:h[b]}else if(u.rowIndex<=h[0])r=h[0];else{var m=h[a-v];r=m?m:h[0]}o=u.rowIndex,l(r)}}},d=function(t,s){var i="row"!==t.defaultSelection?s.parentNode:s;if(e.paging&&e.feature("paging").nbPages>1){var n=e.feature("paging");t.nbRowsPerPage=n.pagingLength;var l=e.validRowsIndex,a=l.length,r=parseInt(n.startPagingRow,10)+parseInt(n.pagingLength,10),o=i.rowIndex;o===l[a-1]&&n.currentPageNb!==n.nbPages?n.setPage("last"):o==l[0]&&1!==n.currentPageNb?n.setPage("first"):o>l[r-1]&&ol[0]&&n.setPage("previous")}};if(e.paging&&(e.feature("paging").onAfterChangePage=function(t){var e=t.tf.extension("advancedGrid"),s=e._ezEditTable,i=s.Selection,n=i.GetActiveRow();n&&n.scrollIntoView(!1);var l=i.GetActiveCell();l&&l.scrollIntoView(!1)}),"row"===s.default_selection){var u=s.on_before_selected_row;s.on_before_selected_row=function(){d(arguments[0],arguments[1],arguments[2]),u&&u.call(null,arguments[0],arguments[1],arguments[2])};var c=s.on_after_selected_row;s.on_after_selected_row=function(){h(arguments[0],arguments[1],arguments[2]),c&&c.call(null,arguments[0],arguments[1],arguments[2])}}else{var f=s.on_before_selected_cell;s.on_before_selected_cell=function(){d(arguments[0],arguments[1],arguments[2]),f&&f.call(null,arguments[0],arguments[1],arguments[2])};var p=s.on_after_selected_cell;s.on_after_selected_cell=function(){h(arguments[0],arguments[1],arguments[2]),p&&p.call(null,arguments[0],arguments[1],arguments[2])}}}if(n){var g=s.on_added_dom_row;if(s.on_added_dom_row=function(){e.nbFilterableRows++,e.paging?(e.nbRows++,e.nbVisibleRows++,e.nbFilterableRows++,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset()):e.feature("rowsCounter").refresh(),e.alternateRows&&e.feature("alternateRows").init(),g&&g.call(null,arguments[0],arguments[1],arguments[2])},s.actions&&s.actions["delete"]){var v=s.actions["delete"].on_after_submit;s.actions["delete"].on_after_submit=function(){e.nbFilterableRows--,e.paging?(e.nbRows--,e.nbVisibleRows--,e.nbFilterableRows--,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset(!1)):e.feature("rowsCounter").refresh(),e.alternateRows&&e.feature("alternateRows").init(),v&&v.call(null,arguments[0],arguments[1])}}}try{this._ezEditTable=new EditTable(e.id,s,t),this._ezEditTable.Init()}catch(b){throw new Error(this.err)}this.initialized=!0}},{key:"reset",value:function(){var t=this._ezEditTable;t&&(this.cfg.selection&&t.Selection.Set(),this.cfg.editable&&t.Editable.Set())}},{key:"destroy",value:function(){var t=this._ezEditTable;t&&(this.cfg.selection&&(t.Selection.ClearSelections(),t.Selection.Remove()),this.cfg.editable&&t.Editable.Remove()),this.initialized=!1}}]),t}();e["default"]=o,t.exports=e["default"]},26:function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=s(25),l=i(n);e["default"]=l["default"],t.exports=e["default"]},27:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function t(t,e){for(var s=0;s=jj;jj++)ucolIndex[jj]===colIndex[ii]&&(saved=1);0===saved&&(ucolMax++,ucolIndex[ucolMax]=colIndex[ii])}if("object"==_string2["default"].lower(typeof labelId)&&"object"==_string2["default"].lower(typeof colIndex)&&"object"==_string2["default"].lower(typeof operation))for(var rows=tf.tbl.rows,colvalues=[],ucol=0;ucolMax>=ucol;ucol++){colvalues.push(tf.getColValues(ucolIndex[ucol],!1,!0,excludeRow));for(var result,nbvalues=0,temp,meanValue=0,sumValue=0,minValue=null,maxValue=null,q1Value=null,medValue=null,q3Value=null,meanFlag=0,sumFlag=0,minFlag=0,maxFlag=0,q1Flag=0,medFlag=0,q3Flag=0,theList=[],opsThisCol=[],decThisCol=[],labThisCol=[],oTypeThisCol=[],mThisCol=-1,k=0;kmaxValue?parseFloat(cvalue):maxValue))}if(1===meanFlag&&(meanValue=sumValue/nbvalues),1===medFlag){var aux=0;nbvalues%2===1?(aux=Math.floor(nbvalues/2),medValue=theList[aux]):medValue=(theList[nbvalues/2]+theList[nbvalues/2-1])/2}var posa;if(1===q1Flag&&(posa=0,posa=Math.floor(nbvalues/4),q1Value=4*posa==nbvalues?(theList[posa-1]+theList[posa])/2:theList[posa]),1===q3Flag){posa=0;var posb=0;posa=Math.floor(nbvalues/4),4*posa===nbvalues?(posb=3*posa,q3Value=(theList[posb]+theList[posb-1])/2):q3Value=theList[nbvalues-posa-1]}for(var i=0;mThisCol>=i;i++){switch(opsThisCol[i]){case"mean":result=meanValue;break;case"sum":result=sumValue;break;case"min":result=minValue;break;case"max":result=maxValue;break;case"median":result=medValue;break;case"q1":result=q1Value;break;case"q3":result=q3Value}var precision=isNaN(decThisCol[i])?2:decThisCol[i];if(oTypeThisCol&&result){if(result=result.toFixed(precision),_dom2["default"].id(labThisCol[i]))switch(_string2["default"].lower(oTypeThisCol)){case"innerhtml":isNaN(result)||!isFinite(result)||0===nbvalues?_dom2["default"].id(labThisCol[i]).innerHTML=".":_dom2["default"].id(labThisCol[i]).innerHTML=result;break;case"setvalue":_dom2["default"].id(labThisCol[i]).value=result;break;case"createtextnode":var oldnode=_dom2["default"].id(labThisCol[i]).firstChild,txtnode=_dom2["default"].text(result);_dom2["default"].id(labThisCol[i]).replaceChild(txtnode,oldnode)}}else try{isNaN(result)||!isFinite(result)||0===nbvalues?_dom2["default"].id(labThisCol[i]).innerHTML=".":_dom2["default"].id(labThisCol[i]).innerHTML=result.toFixed(precision)}catch(e){}}var totRow=totRowIndex&&totRowIndex[ucol]?rows[totRowIndex[ucol]]:null;totRow&&(totRow.style.display="")}this.onAfterOperation&&this.onAfterOperation.call(null,tf)}}},{key:"destroy",value:function(){}}]),ColOps}();exports["default"]=ColOps,module.exports=exports["default"]},28:function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var s=0;s0,this.onLoaded=h["default"].isFn(s.on_loaded)?s.on_loaded:null,this.onBeforeOpen=h["default"].isFn(s.on_before_open)?s.on_before_open:null,this.onAfterOpen=h["default"].isFn(s.on_after_open)?s.on_after_open:null,this.onBeforeClose=h["default"].isFn(s.on_before_close)?s.on_before_close:null,this.onAfterClose=h["default"].isFn(s.on_after_close)?s.on_after_close:null,this.onBeforeColHidden=h["default"].isFn(s.on_before_col_hidden)?s.on_before_col_hidden:null,this.onAfterColHidden=h["default"].isFn(s.on_after_col_hidden)?s.on_after_col_hidden:null,this.onBeforeColDisplayed=h["default"].isFn(s.on_before_col_displayed)?s.on_before_col_displayed:null,this.onAfterColDisplayed=h["default"].isFn(s.on_after_col_displayed)?s.on_after_col_displayed:null,e.gridLayout&&(this.headersTbl=e.feature("gridLayout").headTbl,this.headersIndex=0,this.onAfterColDisplayed=function(){},this.onAfterColHidden=function(){}),e["import"](s.name+"Style",e.stylePath+this.stylesheet,null,"link"),this.tf=e}return l(t,[{key:"toggle",value:function(){var t=this.contEl.style.display,e=this.onBeforeOpen,s=this.onBeforeClose,i=this.onAfterOpen,n=this.onAfterClose;e&&"inline"!==t&&e.call(null,this),s&&"inline"===t&&s.call(null,this),this.contEl.style.display="inline"===t?"none":"inline",i&&"inline"!==t&&i.call(null,this),n&&"inline"===t&&n.call(null,this)}},{key:"checkItem",value:function(t){var e=t.parentNode;if(e&&t){var s=t.firstChild.checked,i=t.firstChild.getAttribute("id").split("_")[1];i=parseInt(i,10),s?r["default"].addClass(e,this.listSlcItemCssClass):r["default"].removeClass(e,this.listSlcItemCssClass);var n=!1;(this.tickToHide&&s||!this.tickToHide&&!s)&&(n=!0),this.setHidden(i,n)}}},{key:"init",value:function(){this.manager&&(this.buildBtn(),this.buildManager(),this.initialized=!0)}},{key:"buildBtn",value:function(){var t=this;if(!this.btnEl){var e=this.tf,s=r["default"].create("span",["id",this.prfx+e.id]);s.className=this.spanCssClass,this.btnTgtId||e.setToolbar();var i=this.btnTgtId?r["default"].id(this.btnTgtId):e.rDiv;if(this.btnTgtId)i.appendChild(s);else{var n=i.firstChild;n.parentNode.insertBefore(s,n)}if(this.btnHtml){s.innerHTML=this.btnHtml;var l=s.firstChild;this.enableHover?u["default"].add(l,"mouseover",function(e){t.toggle(e)}):u["default"].add(l,"click",function(e){t.toggle(e)})}else{var a=r["default"].create("a",["href","javascript:;"]);a.className=this.btnCssClass,a.title=this.desc,a.innerHTML=this.btnText,s.appendChild(a),this.enableHover?u["default"].add(a,"mouseover",function(e){t.toggle(e)}):u["default"].add(a,"click",function(e){t.toggle(e)})}this.spanEl=s,this.btnEl=this.spanEl.firstChild,this.onLoaded&&this.onLoaded.call(null,this)}}},{key:"buildManager",value:function(){var t=this,e=this.tf,s=this.contElTgtId?r["default"].id(this.contElTgtId):r["default"].create("div",["id",this.prfxCont+e.id]);s.className=this.contCssClass;var i=r["default"].create("p");i.innerHTML=this.text,s.appendChild(i);var n=r["default"].create("ul",["id","ul"+this.name+"_"+e.id]);n.className=this.listCssClass;var l=this.headersTbl?this.headersTbl:e.tbl,a=this.headersTbl?this.headersIndex:e.getHeadersRowIndex(),o=l.rows[a];if(this.enableTickAll){var h=r["default"].createCheckItem("col__"+e.id,this.tickAllText,this.tickAllText);r["default"].addClass(h,this.listItemCssClass),n.appendChild(h),h.check.checked=!this.tickToHide,u["default"].add(h.check,"click",function(){for(var t=0;t',this.icnCollapseHtml='Collapse filters',this.defaultText="Toggle filters",this.targetId=s.target_id||null,this.enableIcon=s.enable_icon===!1?!1:!0,this.btnText=s.btn_text||"",this.collapseBtnHtml=this.enableIcon?this.icnCollapseHtml+this.btnText:this.btnText||this.defaultText,this.expandBtnHtml=this.enableIcon?this.icnExpandHtml+this.btnText:this.btnText||this.defaultText,this.btnHtml=s.btn_html||null,this.btnCssClass=s.btn_css_class||"btnExpClpFlt",this.contCssClass=s.cont_css_class||"expClpFlt",this.filtersRowIndex=h["default"].isUndef(s.filters_row_index)?e.getFiltersRowIndex():s.filters_row_index,this.visibleAtStart=h["default"].isUndef(s.visible_at_start)?!0:Boolean(s.visible_at_start),this.prfx="fltsVis_",this.onBeforeShow=h["default"].isFn(s.on_before_show)?s.on_before_show:null,this.onAfterShow=h["default"].isFn(s.on_after_show)?s.on_after_show:null,this.onBeforeHide=h["default"].isFn(s.on_before_hide)?s.on_before_hide:null,this.onAfterHide=h["default"].isFn(s.on_after_hide)?s.on_after_hide:null,e["import"](s.name+"Style",e.stylePath+this.stylesheet,null,"link"),this.tf=e}return l(t,[{key:"init",value:function(){this.initialized||(this.buildUI(),this.initialized=!0)}},{key:"buildUI",value:function(){var t=this,e=this.tf,s=r["default"].create("span",["id",this.prfx+e.id]);s.className=this.contCssClass,this.targetId||e.setToolbar();var i=this.targetId?r["default"].id(this.targetId):e.rDiv;if(this.targetId)i.appendChild(s);else{var n=i.firstChild;n.parentNode.insertBefore(s,n)}var l=void 0;this.btnHtml?(s.innerHTML=this.btnHtml,l=s.firstChild):(l=r["default"].create("a",["href","javascript:void(0);"]),l.className=this.btnCssClass,l.title=this.btnText||this.defaultText,l.innerHTML=this.collapseBtnHtml,s.appendChild(l)),u["default"].add(l,"click",function(){return t.toggle()}),this.contEl=s,this.btnEl=l,this.visibleAtStart||this.toggle()}},{key:"toggle",value:function(){var t=this.tf,e=t.gridLayout?t.feature("gridLayout").headTbl:t.tbl,s=e.rows[this.filtersRowIndex],i=s.style.display;this.onBeforeShow&&""!==i&&this.onBeforeShow.call(this,this),this.onBeforeHide&&""===i&&this.onBeforeHide.call(null,this),s.style.display=""===i?"none":"",this.enableIcon&&!this.btnHtml&&(this.btnEl.innerHTML=""===i?this.expandBtnHtml:this.collapseBtnHtml),this.onAfterShow&&""!==i&&this.onAfterShow.call(null,this),this.onAfterHide&&""===i&&this.onAfterHide.call(null,this)}},{key:"destroy",value:function(){(this.btnEl||this.contEl)&&(this.btnEl.innerHTML="",this.btnEl.parentNode.removeChild(this.btnEl),this.btnEl=null,this.contEl.innerHTML="",this.contEl.parentNode.removeChild(this.contEl),this.contEl=null,this.initialized=!1)}}]),t}();e["default"]=c,t.exports=e["default"]},30:function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t){return x["default"].removeNbFormat(t,"us")}function a(t){return x["default"].removeNbFormat(t,"eu")}function r(t,e){return w["default"].format(t,e)}function o(t){return r(t,"DMY")}function h(t){return r(t,"MDY")}function d(t){return r(t,"YMD")}function u(t){return r(t,"DDMMMYYYY")}function c(t){var e=t.split(".");for(var s in e){for(var i=e[s];3>i.length;)i="0"+i;e[s]=i}return e.join(".")}function f(t,e){var s=c(t.value.toLowerCase()),i=c(e.value.toLowerCase());return s==i?0:i>s?-1:1}Object.defineProperty(e,"__esModule",{value:!0});var p=function(){function t(t,e){for(var s=0;si;i++);return i},SortableTable.prototype.initHeader=function(s){var i=this;if(!i.tHead){if(!e.gridLayout)return;i.tHead=e.feature("gridLayout").headTbl.tHead}i.headersRow=e.headersRow;var n=i.tHead.rows[i.headersRow].cells;i.sortTypes=s||[];for(var l=n.length,a=void 0,r=void 0,o=0;l>o;o++)r=n[o],null!==i.sortTypes[o]&&"None"!==i.sortTypes[o]?(r.style.cursor="pointer",a=m["default"].create("img",["src",t.imgPath+t.imgBlank]),r.appendChild(a),null!==i.sortTypes[o]&&r.setAttribute("_sortType",i.sortTypes[o]),_["default"].add(r,"click",i._headerOnclick)):(r.setAttribute("_sortType",s[o]),r._sortType="None");i.updateHeaderArrows()},SortableTable.prototype.updateHeaderArrows=function(){var e=this,s=void 0,i=void 0,n=void 0;if(t.asyncSort&&t.triggerIds.length>0){var l=t.triggerIds;s=[],i=l.length;for(var a=0;ar;r++){var o=s[r].getAttribute("_sortType");null!==o&&"None"!==o&&(n=s[r].lastChild||s[r],"img"!==n.nodeName.toLowerCase()&&(n=m["default"].create("img",["src",t.imgPath+t.imgBlank]),s[r].appendChild(n)),r===e.sortColumn?n.className=t.imgClassName+" "+(this.descending?t.imgDescClassName:t.imgAscClassName):n.className=t.imgClassName)}},SortableTable.prototype.getRowValue=function(t,e,s){var i=this,n=i._sortTypeInfo[e];if(n&&n.getRowValue)return n.getRowValue(t,s);var l=t.cells[s],a=SortableTable.getInnerText(l);return i.getValueFromString(a,e)},SortableTable.getInnerText=function(e){return e?e.getAttribute(t.customKey)?e.getAttribute(t.customKey):m["default"].getText(e):void 0}}},{key:"addSortType",value:function(){var t=arguments;SortableTable.prototype.addSortType(t[0],t[1],t[2],t[3])}},{key:"setSortTypes",value:function(){for(var t=this,e=this.tf,s=this.sortTypes,i=[],n=0;n0&&!function(){for(var e=t.triggerIds,s=0;s descending, false -> ascending\r\nSortableTable.prototype.defaultDescending = false;\r\n\r\n// shared between all instances. This is intentional to allow external files\r\n// to modify the prototype\r\nSortableTable.prototype._sortTypeInfo = {};\r\n\r\nSortableTable.prototype.setTable = function (oTable) {\r\n if ( this.tHead )\r\n this.uninitHeader();\r\n this.element = oTable;\r\n this.setTHead( oTable.tHead );\r\n this.setTBody( oTable.tBodies[0] );\r\n};\r\n\r\nSortableTable.prototype.setTHead = function (oTHead) {\r\n if (this.tHead && this.tHead != oTHead )\r\n this.uninitHeader();\r\n this.tHead = oTHead;\r\n this.initHeader( this.sortTypes );\r\n};\r\n\r\nSortableTable.prototype.setTBody = function (oTBody) {\r\n this.tBody = oTBody;\r\n};\r\n\r\nSortableTable.prototype.setSortTypes = function ( oSortTypes ) {\r\n if ( this.tHead )\r\n this.uninitHeader();\r\n this.sortTypes = oSortTypes || [];\r\n if ( this.tHead )\r\n this.initHeader( this.sortTypes );\r\n};\r\n\r\n// adds arrow containers and events\r\n// also binds sort type to the header cells so that reordering columns does\r\n// not break the sort types\r\nSortableTable.prototype.initHeader = function (oSortTypes) {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var doc = this.tHead.ownerDocument || this.tHead.document;\r\n this.sortTypes = oSortTypes || [];\r\n var l = cells.length;\r\n var img, c;\r\n for (var i = 0; i < l; i++) {\r\n c = cells[i];\r\n if (this.sortTypes[i] != null && this.sortTypes[i] != "None") {\r\n img = doc.createElement("IMG");\r\n img.src = "images/blank.png";\r\n c.appendChild(img);\r\n if (this.sortTypes[i] != null)\r\n c._sortType = this.sortTypes[i];\r\n if (typeof c.addEventListener != "undefined")\r\n c.addEventListener("click", this._headerOnclick, false);\r\n else if (typeof c.attachEvent != "undefined")\r\n c.attachEvent("onclick", this._headerOnclick);\r\n else\r\n c.onclick = this._headerOnclick;\r\n }\r\n else\r\n {\r\n c.setAttribute( "_sortType", oSortTypes[i] );\r\n c._sortType = "None";\r\n }\r\n }\r\n this.updateHeaderArrows();\r\n};\r\n\r\n// remove arrows and events\r\nSortableTable.prototype.uninitHeader = function () {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var l = cells.length;\r\n var c;\r\n for (var i = 0; i < l; i++) {\r\n c = cells[i];\r\n if (c._sortType != null && c._sortType != "None") {\r\n c.removeChild(c.lastChild);\r\n if (typeof c.removeEventListener != "undefined")\r\n c.removeEventListener("click", this._headerOnclick, false);\r\n else if (typeof c.detachEvent != "undefined")\r\n c.detachEvent("onclick", this._headerOnclick);\r\n c._sortType = null;\r\n c.removeAttribute( "_sortType" );\r\n }\r\n }\r\n};\r\n\r\nSortableTable.prototype.updateHeaderArrows = function () {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var l = cells.length;\r\n var img;\r\n for (var i = 0; i < l; i++) {\r\n if (cells[i]._sortType != null && cells[i]._sortType != "None") {\r\n img = cells[i].lastChild;\r\n if (i == this.sortColumn)\r\n img.className = "sort-arrow " + (this.descending ? "descending" : "ascending");\r\n else\r\n img.className = "sort-arrow";\r\n }\r\n }\r\n};\r\n\r\nSortableTable.prototype.headerOnclick = function (e) {\r\n // find TD element\r\n var el = e.target || e.srcElement;\r\n while (el.tagName != "TD")\r\n el = el.parentNode;\r\n\r\n this.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex);\r\n};\r\n\r\n// IE returns wrong cellIndex when columns are hidden\r\nSortableTable.getCellIndex = function (oTd) {\r\n var cells = oTd.parentNode.childNodes\r\n var l = cells.length;\r\n var i;\r\n for (i = 0; cells[i] != oTd && i < l; i++)\r\n ;\r\n return i;\r\n};\r\n\r\nSortableTable.prototype.getSortType = function (nColumn) {\r\n return this.sortTypes[nColumn] || "String";\r\n};\r\n\r\n// only nColumn is required\r\n// if bDescending is left out the old value is taken into account\r\n// if sSortType is left out the sort type is found from the sortTypes array\r\n\r\nSortableTable.prototype.sort = function (nColumn, bDescending, sSortType) {\r\n if (!this.tBody) return;\r\n if (sSortType == null)\r\n sSortType = this.getSortType(nColumn);\r\n\r\n // exit if None\r\n if (sSortType == "None")\r\n return;\r\n\r\n if (bDescending == null) {\r\n if (this.sortColumn != nColumn)\r\n this.descending = this.defaultDescending;\r\n else\r\n this.descending = !this.descending;\r\n }\r\n else\r\n this.descending = bDescending;\r\n\r\n this.sortColumn = nColumn;\r\n\r\n if (typeof this.onbeforesort == "function")\r\n this.onbeforesort();\r\n\r\n var f = this.getSortFunction(sSortType, nColumn);\r\n var a = this.getCache(sSortType, nColumn);\r\n var tBody = this.tBody;\r\n\r\n a.sort(f);\r\n\r\n if (this.descending)\r\n a.reverse();\r\n\r\n if (SortableTable.removeBeforeSort) {\r\n // remove from doc\r\n var nextSibling = tBody.nextSibling;\r\n var p = tBody.parentNode;\r\n p.removeChild(tBody);\r\n }\r\n\r\n // insert in the new order\r\n var l = a.length;\r\n for (var i = 0; i < l; i++)\r\n tBody.appendChild(a[i].element);\r\n\r\n if (SortableTable.removeBeforeSort) {\r\n // insert into doc\r\n p.insertBefore(tBody, nextSibling);\r\n }\r\n\r\n this.updateHeaderArrows();\r\n\r\n this.destroyCache(a);\r\n\r\n if (typeof this.onsort == "function")\r\n this.onsort();\r\n};\r\n\r\nSortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) {\r\n var oThis = this;\r\n this._asyncsort = function () {\r\n oThis.sort(nColumn, bDescending, sSortType);\r\n };\r\n window.setTimeout(this._asyncsort, 1);\r\n};\r\n\r\nSortableTable.prototype.getCache = function (sType, nColumn) {\r\n if (!this.tBody) return [];\r\n var rows = this.tBody.rows;\r\n var l = rows.length;\r\n var a = new Array(l);\r\n var r;\r\n for (var i = 0; i < l; i++) {\r\n r = rows[i];\r\n a[i] = {\r\n value: this.getRowValue(r, sType, nColumn),\r\n element: r\r\n };\r\n };\r\n return a;\r\n};\r\n\r\nSortableTable.prototype.destroyCache = function (oArray) {\r\n var l = oArray.length;\r\n for (var i = 0; i < l; i++) {\r\n oArray[i].value = null;\r\n oArray[i].element = null;\r\n oArray[i] = null;\r\n }\r\n};\r\n\r\nSortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {\r\n // if we have defined a custom getRowValue use that\r\n if (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)\r\n return this._sortTypeInfo[sType].getRowValue(oRow, nColumn);\r\n\r\n var s;\r\n var c = oRow.cells[nColumn];\r\n if (typeof c.innerText != "undefined")\r\n s = c.innerText;\r\n else\r\n s = SortableTable.getInnerText(c);\r\n return this.getValueFromString(s, sType);\r\n};\r\n\r\nSortableTable.getInnerText = function (oNode) {\r\n var s = "";\r\n var cs = oNode.childNodes;\r\n var l = cs.length;\r\n for (var i = 0; i < l; i++) {\r\n switch (cs[i].nodeType) {\r\n case 1: //ELEMENT_NODE\r\n s += SortableTable.getInnerText(cs[i]);\r\n break;\r\n case 3: //TEXT_NODE\r\n s += cs[i].nodeValue;\r\n break;\r\n }\r\n }\r\n return s;\r\n};\r\n\r\nSortableTable.prototype.getValueFromString = function (sText, sType) {\r\n if (this._sortTypeInfo[sType])\r\n return this._sortTypeInfo[sType].getValueFromString( sText );\r\n return sText;\r\n /*\r\n switch (sType) {\r\n case "Number":\r\n return Number(sText);\r\n case "CaseInsensitiveString":\r\n return sText.toUpperCase();\r\n case "Date":\r\n var parts = sText.split("-");\r\n var d = new Date(0);\r\n d.setFullYear(parts[0]);\r\n d.setDate(parts[2]);\r\n d.setMonth(parts[1] - 1);\r\n return d.valueOf();\r\n }\r\n return sText;\r\n */\r\n };\r\n\r\nSortableTable.prototype.getSortFunction = function (sType, nColumn) {\r\n if (this._sortTypeInfo[sType])\r\n return this._sortTypeInfo[sType].compare;\r\n return SortableTable.basicCompare;\r\n};\r\n\r\nSortableTable.prototype.destroy = function () {\r\n this.uninitHeader();\r\n var win = this.document.parentWindow;\r\n if (win && typeof win.detachEvent != "undefined") { // only IE needs this\r\n win.detachEvent("onunload", this._onunload);\r\n }\r\n this._onunload = null;\r\n this.element = null;\r\n this.tHead = null;\r\n this.tBody = null;\r\n this.document = null;\r\n this._headerOnclick = null;\r\n this.sortTypes = null;\r\n this._asyncsort = null;\r\n this.onsort = null;\r\n};\r\n\r\n// Adds a sort type to all instance of SortableTable\r\n// sType : String - the identifier of the sort type\r\n// fGetValueFromString : function ( s : string ) : T - A function that takes a\r\n// string and casts it to a desired format. If left out the string is just\r\n// returned\r\n// fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort\r\n// compare function. Takes two values and compares them. If left out less than,\r\n// <, compare is used\r\n// fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function\r\n// that takes the row and the column index and returns the value used to compare.\r\n// If left out then the innerText is first taken for the cell and then the\r\n// fGetValueFromString is used to convert that string the desired value and type\r\n\r\nSortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) {\r\n this._sortTypeInfo[sType] = {\r\n type: sType,\r\n getValueFromString: fGetValueFromString || SortableTable.idFunction,\r\n compare: fCompareFunction || SortableTable.basicCompare,\r\n getRowValue: fGetRowValue\r\n };\r\n};\r\n\r\n// this removes the sort type from all instances of SortableTable\r\nSortableTable.prototype.removeSortType = function (sType) {\r\n delete this._sortTypeInfo[sType];\r\n};\r\n\r\nSortableTable.basicCompare = function compare(n1, n2) {\r\n if (n1.value < n2.value)\r\n return -1;\r\n if (n2.value < n1.value)\r\n return 1;\r\n return 0;\r\n};\r\n\r\nSortableTable.idFunction = function (x) {\r\n return x;\r\n};\r\n\r\nSortableTable.toUpperCase = function (s) {\r\n return s.toUpperCase();\r\n};\r\n\r\nSortableTable.toDate = function (s) {\r\n var parts = s.split("-");\r\n var d = new Date(0);\r\n d.setFullYear(parts[0]);\r\n d.setDate(parts[2]);\r\n d.setMonth(parts[1] - 1);\r\n return d.valueOf();\r\n};\r\n\r\n\r\n// add sort types\r\nSortableTable.prototype.addSortType("Number", Number);\r\nSortableTable.prototype.addSortType("CaseInsensitiveString", SortableTable.toUpperCase);\r\nSortableTable.prototype.addSortType("Date", SortableTable.toDate);\r\nSortableTable.prototype.addSortType("String");\r\n// None is a special case\r\n'}}); \ No newline at end of file diff --git a/source/tools/templatesanalyzer/unitTables.py b/source/tools/templatesanalyzer/unitTables.py index 892526c5d8..916d616f5f 100644 --- a/source/tools/templatesanalyzer/unitTables.py +++ b/source/tools/templatesanalyzer/unitTables.py @@ -6,62 +6,70 @@ import glob AttackTypes = ["Hack","Pierce","Crush"] Resources = ["food", "wood", "stone", "metal"] -#Generic templates to load -Class = ["_champion",""] -Types = ["infantry","cavalry"]; -Subtypes = ["spearman","pikeman","swordsman", "archer","javelinist","slinger"]; -Fix = ["melee_","ranged_",""] -AddedTemplates = ["template_unit_champion_elephant_melee.xml"] +# Generic templates to load +# The way this works is it tries all generic templates +# But only loads those who have one of the following parents +# EG adding "template_unit.xml" will load all units. +LoadTemplatesIfParent = ["template_unit_infantry.xml", "template_unit_cavalry.xml", "template_unit_champion.xml"]; -# Those describe Civs to analyze and buildings to consider. -# That way you can restrict to some buildings specifically. -Civs = ["athen", "mace", "spart", "cart", "rome", "pers", "maur", "brit", "gaul", "iber"] -#Civs = ["rome","pers"] -CivBuildings = ["civil_centre", "barracks","gymnasion", "stables", "elephant_stables", "fortress", "embassy_celtic", "embassy_italiote", "embassy_iberian"] -#CivBuildings = ["civil_centre", "barracks"] +# Those describe Civs to analyze. +# The script will load all entities that derive (to the nth degree) from one of the above templates. +Civs = ["athen", "mace", "spart", "sele", "cart", "rome", "pers", "maur", "brit", "gaul", "iber"] # Remote Civ templates with those strings in their name. -FilterOut = ["hero", "mecha", "support", "barracks"] +FilterOut = ["marian"] -# Graphic parameters: affects only how the data is shown +# Sorting parameters for the "roster variety" table ComparativeSortByCav = True ComparativeSortByChamp = True -SortTypes = ["Support","Pike","Spear","Sword", "Archer","Javelin","Sling","Elephant"]; # Classes -ShowCivLists = False +SortTypes = ["Support","Pike","Spear","Sword", "Archer","Javelin","Sling","Elephant"] # Classes -# Parameters: affects the data -paramIncludePopCost = False -paramFactorCounters = True; # False means attack bonuses are not counted. -paramDPSImp = 5 -paramHPImp = 3 # Decrease to make more important -paramRessImp = { "food" : 1.0, "wood" : 1.0, "stone" : 2.0, "metal" : 1.5 } -paramBuildTimeImp = 0.5 # Sane values are 0-1, though more is OK. -paramSpeedImp = 0.2 # Sane values are 0-1, anything else will be weird. -paramRangedCoverage = 1.0 # Sane values are 0-1, though more is OK. -paramRangedMode = "Average" #Anything but "Average" is "Max" -paramMicroAutoSpeed = 2.5 # Give a small advantage to ranged units faster than melee units (by at least this parameter). Making this too high will disable this advantage. This simulates the advantage a bit of micro would give -paramMicroPerfectSpeed = 5.0 # Likewise, only this assumes perfect micro. Thus a ranged unit a lot faster is invincible. For example chariot v Elephant is a large win for elephants without this, but a large win for chariots with, since chariots can easily outmaneuver elephants if microed perfectly. +# Disable if you want the more compact basic data. Enable to allow filtering and sorting in-place. +AddSortingOverlay = True # This is the path to the /templates/ folder to consider. Change this for mod support. basePath = os.path.realpath(__file__).replace("unitTables.py","") + "../../../binaries/data/mods/public/simulation/templates/" +# For performance purposes, cache opened templates files. +globalTemplatesList = {}; def htbout(file, balise, value): file.write("<" + balise + ">" + value + "\n" ) def htout(file, value): file.write("

" + value + "

\n" ) +def fastParse(templateName): + if templateName in globalTemplatesList: + return globalTemplatesList[templateName] + globalTemplatesList[templateName] = ET.parse(templateName) + return globalTemplatesList[templateName] + +# This function checks that a template has the given parent. +def hasParentTemplate(UnitName, parentName): + Template = fastParse(UnitName) + + found = False + Name = UnitName; + while found != True and Template.getroot().get("parent") != None: + Name = Template.getroot().get("parent") + ".xml" + if Name == parentName: + return True + Template = ET.parse(Name) + + return False + +# This function parses the entity values manually. def CalcUnit(UnitName, existingUnit = None): unit = { 'HP' : "0", "BuildTime" : "0", "Cost" : { 'food' : "0", "wood" : "0", "stone" : "0", "metal" : "0", "population" : "0"}, 'Attack' : { "Melee" : { "Hack" : 0, "Pierce" : 0, "Crush" : 0 }, "Ranged" : { "Hack" : 0, "Pierce" : 0, "Crush" : 0 } }, 'RepeatRate' : {"Melee" : "0", "Ranged" : "0"},'PrepRate' : {"Melee" : "0", "Ranged" : "0"}, "Armour" : {}, - "Ranged" : "false", "Classes" : [], "AttackBonuses" : {}, "Restricted" : [], - "Civ" : None }; + "Ranged" : False, "Classes" : [], "AttackBonuses" : {}, "Restricted" : [], + "Civ" : None } if (existingUnit != None): unit = existingUnit - Template = ET.parse(UnitName) + Template = fastParse(UnitName) # Recursively get data from our parent which we'll override. if (Template.getroot().get("parent") != None): @@ -81,6 +89,9 @@ def CalcUnit(UnitName, existingUnit = None): for type in list(Template.find("./Cost/Resources")): unit['Cost'][type.tag] = type.text + if (Template.find("./Cost/Population") != None): + unit['Cost']["population"] = Template.find("./Cost/Population").text + if (Template.find("./Attack/Melee") != None): if (Template.find("./Attack/Melee/RepeatTime") != None): unit['RepeatRate']["Melee"] = Template.find("./Attack/Melee/RepeatTime").text @@ -110,9 +121,11 @@ def CalcUnit(UnitName, existingUnit = None): if (Template.find("./Attack/Ranged") != None): - unit['Ranged'] = "true" + unit['Ranged'] = True if (Template.find("./Attack/Ranged/MaxRange") != None): unit['Range'] = Template.find("./Attack/Ranged/MaxRange").text + if (Template.find("./Attack/Ranged/Spread") != None): + unit['Spread'] = Template.find("./Attack/Ranged/Spread").text if (Template.find("./Attack/Ranged/RepeatTime") != None): unit['RepeatRate']["Ranged"] = Template.find("./Attack/Ranged/RepeatTime").text if (Template.find("./Attack/Ranged/PrepareTime") != None): @@ -170,175 +183,54 @@ def CalcUnit(UnitName, existingUnit = None): return unit def WriteUnit(Name, UnitDict): - rstr = "" + ret = "" - rstr += "" + Name + "\n" + ret += "" + Name + "" + + ret += "" + str(int(UnitDict["HP"])) + "" - rstr += "" + UnitDict["HP"] + "\n" + ret += "" +str("%.0f" % float(UnitDict["BuildTime"])) + "" - rstr += "" + UnitDict["BuildTime"] + "\n" + ret += "" + str("%.1f" % float(UnitDict["WalkSpeed"])) + "" - rstr += "" + UnitDict["WalkSpeed"] + "\n" - - rstr += "" + UnitDict["Cost"]["food"] + "F / " + UnitDict["Cost"]["wood"] + "W / " + UnitDict["Cost"]["stone"] + "S / " + UnitDict["Cost"]["metal"] + "M\n" + for atype in AttackTypes: + PercentValue = 1.0 - (0.9 ** float(UnitDict["Armour"][atype])) + ret += "" + str("%.0f" % float(UnitDict["Armour"][atype])) + " / " + str("%.0f" % (PercentValue*100.0)) + "%" - if UnitDict["Ranged"] == "True": - rstr += "" + str(UnitDict["Attack"]["Ranged"]["Hack"]) + " / " + str(UnitDict["Attack"]["Ranged"]["Pierce"]) + " / " + str(UnitDict["Attack"]["Ranged"]["Crush"]) + "\n" + attType = ("Ranged" if UnitDict["Ranged"] == True else "Melee") + if UnitDict["RepeatRate"][attType] != "0": + for atype in AttackTypes: + repeatTime = float(UnitDict["RepeatRate"][attType])/1000.0 + ret += "" + str("%.1f" % (float(UnitDict["Attack"][attType][atype])/repeatTime)) + "" + + ret += "" + str("%.1f" % (float(UnitDict["RepeatRate"][attType])/1000.0)) + "" else: - rstr += "" + str(UnitDict["Attack"]["Melee"]["Hack"]) + " / " + str(UnitDict["Attack"]["Melee"]["Pierce"]) + " / " + str(UnitDict["Attack"]["Melee"]["Crush"]) + "\n" - - rstr += "" + str(UnitDict["Armour"]["Hack"]) + " / " + str(UnitDict["Armour"]["Pierce"]) + " / " + str(UnitDict["Armour"]["Crush"]) + "\n" + for atype in AttackTypes: + ret += " - " + ret += " - " - rstr += "" - for classe in UnitDict["Classes"]: - rstr += classe + " " - rstr += "" + if UnitDict["Ranged"] == True: + ret += "" + str("%.1f" % float(UnitDict["Range"])) + "" + spread = (float(UnitDict["Spread"]) / float(UnitDict["Range"]))*100.0 + ret += "" + str("%.1f" % spread) + "" + else: + ret += " - - " + + for rtype in Resources: + ret += "" + str("%.0f" % float(UnitDict["Cost"][rtype])) + "" - rstr += "" + ret += "" + str("%.0f" % float(UnitDict["Cost"]["population"])) + "" + + ret += "" for Bonus in UnitDict["AttackBonuses"]: - rstr += "[" + ret += "[" for classe in UnitDict["AttackBonuses"][Bonus]["Classes"]: - rstr += classe + " " - rstr += ': ' + str(UnitDict["AttackBonuses"][Bonus]["Multiplier"]) + "] " - rstr += "" + ret += classe + " " + ret += ': ' + str(UnitDict["AttackBonuses"][Bonus]["Multiplier"]) + "] " + ret += "" - rstr += "" - for classe in UnitDict["Restricted"]: - rstr += classe + " " - rstr += "" - - return "" + rstr - -def CalcValue(UnitDict): - Worth = {}; - - # Try to estimate how "worth it" a unit is. - # We can't really differentiate between attack types and armor types and counters here, so values might fluctuate - # But this can be used to quickly estimate if some units are too costly. - - Attack = "Melee" - if (UnitDict["Ranged"] == "true"): - Attack = "Ranged" - - DPS = 0 - for att in AttackTypes: - DPS += float(UnitDict['Attack'][Attack][att]) - if (Attack == "Ranged"): - DPS += float(UnitDict["Range"]) / 10 - DPS /= (float(UnitDict['RepeatRate'][Attack])+float(UnitDict['PrepRate'][Attack])+1)/1000 - - Worth["Attack"] = DPS * paramDPSImp; - - if "Infantry" in UnitDict["Restricted"]: - Worth["Attack"] /= 5.0; - if "Cavalry" in UnitDict["Restricted"]: - Worth["Attack"] /= 5.0; - - armorTotal = float(UnitDict['Armour']["Hack"]) + float(UnitDict['Armour']["Pierce"]) + float(UnitDict['Armour']["Crush"])/2.0 - - Worth["Defence"] = int(UnitDict['HP']) / (0.9**armorTotal)/paramHPImp; - - TotalCost = 0 - for ress in paramRessImp: - TotalCost += int(UnitDict['Cost'][ress]) * paramRessImp[ress] - - if (paramIncludePopCost): - TotalCost *= (int(UnitDict['Cost']["population"])+1)/2.0 - - Worth["Cost"] = TotalCost/400.0; - - Worth["Cost"] = Worth["Cost"] * int(UnitDict['BuildTime'])/12.0 * paramBuildTimeImp + (1.0-paramBuildTimeImp) * Worth["Cost"]; - - # Speed makes you way less evasive, and you can chase less. - # It's not really a cost so just decrease Attack and Defence - Worth["Attack"] = Worth["Attack"] * float(UnitDict["WalkSpeed"])/10.0 * paramSpeedImp + (1.0-paramSpeedImp) * Worth["Attack"]; - Worth["Defence"] = Worth["Defence"] * float(UnitDict["WalkSpeed"])/10.0 * paramSpeedImp + (1.0-paramSpeedImp) * Worth["Defence"]; - - Worth["Total"] = (Worth["Attack"] + Worth["Defence"])/Worth["Cost"] - - return Worth - -def canAttack(Attacker, Defender): - ARestrictions = Attacker["Restricted"] - BClasses = Defender["Classes"] - - for Classes in ARestrictions: - if Classes in BClasses: - return False - return True - -def GetAttackBonus(Attacker, Defender): - if not canAttack(Attacker, Defender): - return 0.0 - Abonuses = Attacker["AttackBonuses"] - BClasses = Defender["Classes"] - - Bonus = 1.0; - - for BonusTypes in Abonuses: - found = True - for classe in Abonuses[BonusTypes]["Classes"]: - if classe not in BClasses: - found = False; - for civi in Abonuses[BonusTypes]["Civs"]: - if Defender["Civ"] not in civi: - found = False; - if found: - Bonus *= Abonuses[BonusTypes]["Multiplier"] - - return Bonus; - -# Returns how much stronger unit A is compared to unit B in a direct fight. Uses counters, speed. Not perfect, but not widely inaccurate either. -def Compare2(UnitDictA,UnitDictB): - AWorth = 1.0; - BWorth = 1.0; - - output = 1.0; - - # Get some DPS up in here. Use only melee or Ranged if available. - AAttack = "Melee" - if (UnitDictA["Ranged"] == "true"): - AAttack = "Ranged" - BAttack = "Melee" - if (UnitDictB["Ranged"] == "true"): - BAttack = "Ranged" - - ADPS = 0.0 - BDPS = 0.0 - # Exponential armor - for att in AttackTypes: - ADPS += float(UnitDictA['Attack'][AAttack][att]) * 0.9**float(UnitDictB['Armour'][att]) - BDPS += float(UnitDictB['Attack'][BAttack][att]) * 0.9**float(UnitDictA['Armour'][att]) - #Check if A is bonused against B and vice versa - if (paramFactorCounters == True): - ADPS *= GetAttackBonus(UnitDictA,UnitDictB) - BDPS *= GetAttackBonus(UnitDictB,UnitDictA) - - if (AAttack == "Ranged"): - ADPS += float(UnitDictA["Range"]) / float(UnitDictB["WalkSpeed"]) - if (BAttack == "Ranged"): - BDPS += float(UnitDictB["Range"]) / float(UnitDictA["WalkSpeed"]) - - ADPS /= (float(UnitDictA['RepeatRate'][AAttack])+float(UnitDictA['PrepRate'][AAttack])+1)/1000 - BDPS /= (float(UnitDictB['RepeatRate'][BAttack])+float(UnitDictB['PrepRate'][BAttack])+1)/1000 - - #Ranged units can get a real advantage against slower enemy units. - if AAttack == "Ranged" and BAttack != "Ranged" and float(UnitDictA["WalkSpeed"]) - paramMicroAutoSpeed > float(UnitDictB["WalkSpeed"]): - ADPS += 20 - elif BAttack == "Ranged" and AAttack != "Ranged" and float(UnitDictB["WalkSpeed"]) - paramMicroAutoSpeed > float(UnitDictA["WalkSpeed"]): - BDPS += 20 - - if AAttack == "Ranged" and BAttack != "Ranged" and float(UnitDictA["WalkSpeed"]) - paramMicroPerfectSpeed > float(UnitDictB["WalkSpeed"]): - ADPS += 5000 - elif BAttack == "Ranged" and AAttack != "Ranged" and float(UnitDictB["WalkSpeed"]) - paramMicroPerfectSpeed > float(UnitDictA["WalkSpeed"]): - BDPS += 5000 - - AWorth += int(UnitDictA['HP']) / (BDPS+1); - BWorth += int(UnitDictB['HP']) / (ADPS+1); - - SpeedRatio = 1.0-paramSpeedImp + paramSpeedImp * float(UnitDictA["WalkSpeed"]) / float(UnitDictB["WalkSpeed"]) - - return AWorth / BWorth * SpeedRatio + ret += "\n" + return ret # Sort the templates dictionary. def SortFn(A): @@ -347,142 +239,34 @@ def SortFn(A): sortVal += 1 if classe in A[1]["Classes"]: break - if (ComparativeSortByChamp == True and A[0].find("champion") == -1): + if ComparativeSortByChamp == True and A[0].find("champion") == -1: sortVal -= 20 - if (ComparativeSortByCav == True and A[0].find("cavalry") == -1): + if ComparativeSortByCav == True and A[0].find("cavalry") == -1: sortVal -= 10 - if (A[1]["Civ"] != None): + if A[1]["Civ"] != None and A[1]["Civ"] in Civs: sortVal += 100 * Civs.index(A[1]["Civ"]) return sortVal -# Output a matrix of each units against one another, where the square is greener if the unit is stronger, redder if weaker. -def WriteComparisonTable(Units, OtherUnits = None): - f.write("") +# helper to write coloured text. +def WriteColouredDiff(file, diff, PositOrNegat): - if OtherUnits == None: - OtherUnits = Units + def cleverParse(diff): + if float(diff) - int(diff) < 0.001: + return str(int(diff)) + else: + return str("%.1f" % float(diff)) - sortedDict = sorted(Units.items(), key=SortFn) - sortedOtherDict = sorted(OtherUnits.items(), key=SortFn) - - # First column: write them all - f.write ("") - f.write("") - for unitName in sortedOtherDict: - f.write("") - f.write("") - for unitName in sortedOtherDict: - f.write("") - f.write("") - - # Write the comparisons - for unitName in sortedDict: - f.write("\n") - - for otherUnitName in sortedOtherDict: - outcome = Compare2(unitName[1],otherUnitName[1]) - green = max(0.0, min(4.0,outcome)) - if (green > 1.0): - f.write("") - else: - f.write("") - - f.write("") - - for otherUnitName in sortedOtherDict: - outcome = GetAttackBonus(unitName[1],otherUnitName[1]) - green = max(0.0, min(3.0,outcome)) - if (green > 1.0): - f.write("") - else: - f.write("") - f.write("") - - f.write("
" + unitName[0] + "" + unitName[0] + "
" + unitName[0] + "
") - - -def WriteWorthList(Units): - - def SortFn(A): - return CalcValue(A[1])["Total"] - - sortedDict = sorted(Units.items(), key=SortFn, reverse=True) - - f.write("") - for unitName in sortedDict: - value = CalcValue(unitName[1]) - valueAtt = int(2*value["Attack"]/value["Cost"]) - valueDef = int(2*value["Defence"]/value["Cost"]) - f.write("") - f.write("") - f.write("") - - f.write("
" + unitName[0] + ": " + str(valueAtt) + "" + str(valueDef) + "
") - -def CivUnitComparisons(CivA, CivB): - averageEffNoCost = 0 - MaxMinEffNoCost = 0 - MinMaxEffNoCost = 999999 - averageEff = 0 - MaxMinEff = 0 - MinMaxEff = 999999 - MaxMinEffUnit = "" - MinMaxEffUnit = "" - - for theirUnit in CivB["Units"]: - unitAverageNoCost = 0 - unitMaxNoCost = 0 - unitAverage = 0 - unitMax = 0 - for myUnit in CivA["Units"]: - eff = Compare2(CivA["Units"][myUnit],CivB["Units"][theirUnit]) - eff = (eff * CivA["RangedUnitsWorth"] / CivB["RangedUnitsWorth"] * paramRangedCoverage) + eff * (1.0-paramRangedCoverage) - unitAverageNoCost += eff - if (eff > unitMaxNoCost): unitMaxNoCost = eff - eff /= CalcValue(CivA["Units"][myUnit])["Cost"] / CalcValue(CivB["Units"][theirUnit])["Cost"] - unitAverage += eff - if (eff > unitMax): unitMax = eff - unitAverageNoCost /= len(CivB["Units"]) - unitAverage /= len(CivB["Units"]) - averageEffNoCost += unitAverageNoCost - averageEff += unitAverage - if (unitMax < MinMaxEff): - MinMaxEff = unitMax - MinMaxEffUnit = theirUnit - if (unitMaxNoCost < MinMaxEffNoCost): MinMaxEffNoCost = unitMaxNoCost - - for myUnit in CivA["Units"]: - unitMinNoCost = 9999999 - unitMin = 9999999 - for theirUnit in CivB["Units"]: - eff = Compare2(CivA["Units"][myUnit],CivB["Units"][theirUnit]) - eff = (eff * CivA["RangedUnitsWorth"] / CivB["RangedUnitsWorth"] * paramRangedCoverage) + eff * (1.0-paramRangedCoverage) - if (eff < unitMinNoCost): unitMinNoCost = eff - eff /= CalcValue(CivA["Units"][myUnit])["Cost"] / CalcValue(CivB["Units"][theirUnit])["Cost"] - if (eff < unitMin): unitMin = eff - if (unitMin > MaxMinEff): - MaxMinEff = unitMin - MaxMinEffUnit = myUnit - if (unitMinNoCost > MaxMinEffNoCost): MaxMinEffNoCost = unitMinNoCost - - f.write("" + oCiv + "") - averageEffNoCost /= len(CivA["Units"]) - averageEff /= len(CivA["Units"]) - f.write("" + str("%.2f" % averageEffNoCost) + "") - f.write("" + str("%.2f" % MaxMinEffNoCost) + "") - f.write("" + str("%.2f" % MinMaxEffNoCost) + "") - f.write("" + str("%.2f" % averageEff) + "") - f.write("" + str("%.2f" % MaxMinEff) + "") - f.write("" + str("%.2f" % MinMaxEff) + "") - if MaxMinEff <= MinMaxEff and abs(MaxMinEff * MinMaxEff - 1.0) < 0.1: - f.write("Surely") - elif MaxMinEff <= MinMaxEff and abs(MaxMinEff * MinMaxEff - 1.0) < 0.2: - f.write("Probably") - elif MaxMinEff > MinMaxEff or MaxMinEff * MinMaxEff > 1.0: - f.write("No, too strong") + if (PositOrNegat == "positive"): + file.write(" 0 else "0,150,0")) + ");\">" + cleverParse(diff) + "") + elif (PositOrNegat == "negative"): + file.write("" + cleverParse(diff) + "") else: - f.write("No, too weak") - f.write("" + str(int(CivA["RangedUnitsWorth"] / CivB["RangedUnitsWorth"]*100)) + "%" + MaxMinEffUnit + "" + MinMaxEffUnit + "") + complain + + +############################################################ +############################################################ +# Create the HTML file f = open(os.path.realpath(__file__).replace("unitTables.py","") + 'unit_summary_table.html', 'w') @@ -492,130 +276,137 @@ f.write("\n") os.chdir(basePath) -#Load values up. -templates = {}; # Values - ############################################################ -#Whilst loading I also write them. +# Load generic templates + +templates = {} + htbout(f,"h2", "Units") -f.write("") -f.write("") -for clss in Class: - for tp in Types: - for sbt in Subtypes: - for x in Fix: - template = "template_unit" + clss + "_" + tp + "_" + x + sbt + ".xml" - if (os.path.isfile(template)): - templates[template] = CalcUnit(template) - f.write(WriteUnit(template, templates[template])) -for Tmp in AddedTemplates: - if (os.path.isfile(Tmp)): - templates[Tmp] = CalcUnit(Tmp) - f.write(WriteUnit(Tmp, templates[Tmp])) + +f.write("
HPBuildTimeSpeedCostsAttack (H/P/C)Armour(H/P/C)ClassesEfficient againstCannot Attack
\n") +f.write("") +f.write("\n") +f.write("") +f.write("\n\n") + +for template in list(glob.glob('template_*.xml')): + if os.path.isfile(template): + found = False + for possParent in LoadTemplatesIfParent: + if hasParentTemplate(template, possParent): + found = True + break + if found == True: + templates[template] = CalcUnit(template) + f.write(WriteUnit(template, templates[template])) + f.write("
HP BuildTime Speed(walk) Armour Attack (DPS) Costs Efficient Against
HPC HPCRateRangeSpread\n(/100m) FWSMP
") -f.write("

Unit Comparison Table

\n") -f.write("

The first table shows how strong a unit is against another one. Full green means 4 times as strong, Yellow means equal, Full red means infinitely worse.
The second table shows hardcoded attack counters. Full Green is 3.0. White is 1.0. Red is 0.0.

") -if (not paramFactorCounters): - f.write("

The left graph does not account for hardcoded counters here.

") -WriteComparisonTable(templates) - -f.write("

Worthiness

\n") -f.write("

This gives a representation of how efficient a unit is cost-wise.
Red bars are offensive capabilities, blue bars defensive capabilites.

") -f.write("

Costs are estimated as the sum of Food*" + str(paramRessImp["food"]) + " / Wood*" + str(paramRessImp["wood"]) + " / Stone*" + str(paramRessImp["stone"]) + " / Metal*" + str(paramRessImp["metal"]) + "
") -f.write("Population cost is " + ("counted" if paramIncludePopCost else "not counted") + " in the costs.
") -WriteWorthList(templates) - ############################################################ # Load Civ specific templates -# Will be loaded by loading buildings, and templates will be set the Civ building, the Civ and in general. -# Allows to avoid special units. -CivData = {}; -CivTemplates = {}; + +CivTemplates = {} for Civ in Civs: - if ShowCivLists: - htbout(f,"h2", Civ) - f.write("") - CivData[Civ] = { "Units" : {}, "Buildings" : {}, "RangedUnits" : {} } - for building in CivBuildings: - CivData[Civ]["Buildings"][building] = {} - bdTemplate = "./structures/" + Civ + "_" + building + ".xml" - TrainableUnits = [] - if (os.path.isfile(bdTemplate)): - Template = ET.parse(bdTemplate) - if (Template.find("./ProductionQueue/Entities") != None): - TrainableUnits = Template.find("./ProductionQueue/Entities").text.replace(" ","").replace("\t","").split("\n") - # We have the templates this building can train. - for UnitFile in TrainableUnits: + CivTemplates[Civ] = {}; + # Load all templates that start with that civ indicator + for template in list(glob.glob('units/' + Civ + '_*.xml')): + if os.path.isfile(template): + + # filter based on FilterOut breakIt = False for filter in FilterOut: - if UnitFile.find(filter) != -1: breakIt = True + if template.find(filter) != -1: breakIt = True if breakIt: continue - if (os.path.isfile(UnitFile + ".xml")): - templates[UnitFile + ".xml"] = CalcUnit(UnitFile + ".xml") # Parse - CivData[Civ]["Buildings"][building][UnitFile + ".xml"] = templates[UnitFile + ".xml"] - if UnitFile + ".xml" not in CivData[Civ]["Units"]: - CivTemplates[UnitFile + ".xml"] = templates[UnitFile + ".xml"] - CivData[Civ]["Units"][UnitFile + ".xml"] = templates[UnitFile + ".xml"] - if ShowCivLists: - f.write(WriteUnit(UnitFile + ".xml", templates[UnitFile + ".xml"])) - if "Ranged" in templates[UnitFile + ".xml"]["Classes"]: - CivData[Civ]["RangedUnits"][UnitFile + ".xml"] = templates[UnitFile + ".xml"] - f.write("
") + # filter based on loaded generic templates + breakIt = True + for possParent in LoadTemplatesIfParent: + if hasParentTemplate(template, possParent): + breakIt = False + break + if breakIt: continue + + unit = CalcUnit(template) + + # Remove variants for now + if unit["Parent"].find("template_") == -1: + continue + + # load template + CivTemplates[Civ][template] = unit ############################################################ f.write("\n\n

Units Specializations

\n") f.write("

This table compares each template to its parent, showing the differences between the two.
Note that like any table, you can copy/paste this in Excel (or Numbers or ...) and sort it.

") + TemplatesByParent = {} #Get them in the array -for CivUnitTemplate in CivTemplates: - parent = CivTemplates[CivUnitTemplate]["Parent"] - if parent in templates and templates[parent]["Civ"] == None: - if parent not in TemplatesByParent: - TemplatesByParent[parent] = [] - TemplatesByParent[parent].append( (CivUnitTemplate,CivTemplates[CivUnitTemplate])) +for Civ in Civs: + for CivUnitTemplate in CivTemplates[Civ]: + parent = CivTemplates[Civ][CivUnitTemplate]["Parent"] + if parent in templates and templates[parent]["Civ"] == None: + if parent not in TemplatesByParent: + TemplatesByParent[parent] = [] + TemplatesByParent[parent].append( (CivUnitTemplate,CivTemplates[Civ][CivUnitTemplate])) #Sort them by civ and write them in a table. -f.write("\n") -f.write("\n") -f.write("\n") +f.write("
HPBuildTimeSpeed(walk)ArmourAttackCostsCivWorth
HPCHPCFWSMP
\n") +f.write("") +f.write("\n") +f.write("") +f.write("\n") for parent in TemplatesByParent: TemplatesByParent[parent].sort(key=lambda x : Civs.index(x[1]["Civ"])) - f.write("") for tp in TemplatesByParent[parent]: - f.write("") + f.write("") + + f.write("") + + # HP diff = int(tp[1]["HP"]) - int(templates[parent]["HP"]) - f.write("") + WriteColouredDiff(f, diff, "negative") + + # Build Time diff = int(tp[1]["BuildTime"]) - int(templates[parent]["BuildTime"]) - f.write("") - + WriteColouredDiff(f, diff, "positive") + + # walk speed diff = float(tp[1]["WalkSpeed"]) - float(templates[parent]["WalkSpeed"]) - f.write("") - + WriteColouredDiff(f, diff, "negative") + + # Armor for atype in AttackTypes: diff = float(tp[1]["Armour"][atype]) - float(templates[parent]["Armour"][atype]) - f.write("") + WriteColouredDiff(f, diff, "negative") - attType = ("Ranged" if tp[1]["Ranged"] else "Melee") - for atype in AttackTypes: - diff = float(tp[1]["Attack"][attType][atype]) - float(templates[parent]["Attack"][attType][atype]) - f.write("") + # Attack types (DPS) and rate. + attType = ("Ranged" if tp[1]["Ranged"] == True else "Melee") + if tp[1]["RepeatRate"][attType] != "0": + for atype in AttackTypes: + myDPS = float(tp[1]["Attack"][attType][atype]) / (float(tp[1]["RepeatRate"][attType])/1000.0) + parentDPS = float(templates[parent]["Attack"][attType][atype]) / (float(templates[parent]["RepeatRate"][attType])/1000.0) + WriteColouredDiff(f, myDPS - parentDPS, "negative") + WriteColouredDiff(f, float(tp[1]["RepeatRate"][attType])/1000.0 - float(templates[parent]["RepeatRate"][attType])/1000.0, "negative") + # range and spread + if tp[1]["Ranged"] == True: + WriteColouredDiff(f, float(tp[1]["Range"]) - float(templates[parent]["Range"]), "negative") + mySpread = (float(tp[1]["Spread"]) / (float(tp[1]["Range"]))*100.0) + parentSpread = (float(templates[parent]["Spread"]) / (float(templates[parent]["Range"]))*100.0) + WriteColouredDiff(f, mySpread - parentSpread, "positive") + else: + f.write("") + else: + f.write("") for rtype in Resources: - diff = float(tp[1]["Cost"][rtype]) - float(templates[parent]["Cost"][rtype]) - f.write("") + WriteColouredDiff(f, float(tp[1]["Cost"][rtype]) - float(templates[parent]["Cost"][rtype]), "positive") - diff = float(tp[1]["Cost"]["population"]) - float(templates[parent]["Cost"]["population"]) - f.write("") + WriteColouredDiff(f, float(tp[1]["Cost"]["population"]) - float(templates[parent]["Cost"]["population"]), "positive") f.write("") - diff = float(CalcValue(tp[1])["Total"]) / float(CalcValue(templates[parent])["Total"])-1.0 - f.write("") - f.write("\n") f.write("
HP BuildTime Speed Armour Attack Costs Civ
HPC HPCRateRangeSpread FWSMP
" + parent + "" + tp[0] + "" + parent.replace(".xml","").replace("template_","") + "" + tp[0].replace(".xml","").replace("units/","") + "" + str(int(diff)) + " 0 else "0,150,0")) + ");\">" + str(int(diff)) + "" + str("%.1f" % diff) + "" + str(int(diff)) + "" + str(int(diff)) + " 0 else "0,150,0")) + ");\">" + str(int(diff)) + " 0 else "0,150,0")) + ");\">" + str(int(diff)) + "" + tp[1]["Civ"] + "" + str(int(100*diff)) + "%
") @@ -633,7 +424,7 @@ sortedDict = sorted(templates.items(), key=SortFn) for tp in sortedDict: if tp[0] not in TemplatesByParent: continue - f.write("\n") + f.write("\n") for civ in Civs: found = 0 for temp in TemplatesByParent[tp[0]]: @@ -650,50 +441,93 @@ for tp in sortedDict: f.write("\n") f.write("\n") for civ in Civs: - f.write("\n") + count = 0 + for units in CivTemplates[civ]: count += 1 + f.write("\n") + f.write("\n") + f.write("
" + tp[0] +"
" + tp[0] +"
Total:" + str(len(CivData[civ]["Units"])) + "" + str(count) + "
") -############################################################ -# Writing Civ Specific Comparisons. -f.write("

Civilisation Comparisons

\n") +# Add a simple script to allow filtering on sorting directly in the HTML page. +if AddSortingOverlay: + f.write("\n\ + \n\ + \n") -f.write("

The following graphs attempt to do some analysis of civilizations against each other. ") -f.write("Different kinds of data: A matrix of units efficiency in a 1v1 fight, a graph of unit worthiness (power/cost), and a statistical analysis of civilizations against each other:
") -f.write("In this last one in particular, \"Minimal Maximal Efficiency\" is low if there is a unit this civ cannot counter, and \"Maximal Minimal Efficiency\" is high if there is a unit that cannot be countered. If the (minimal) maximal efficiency and the average maximal efficiency are close, this means there are several units for that civ that counter the enemy civ's unit.
The Balance column analyses those two to give some verdict (consider the average effectiveness too though)

Note that \"Counter\" in this data means \"Any unit that is strong against another unit\", so a unit that's simply way stronger than another counts as \"countering it\".
If a civ's average efficiency and average efficiency disregarding costs are very different, this can mean that its costly units are particularly strong (Mauryans fit the bill with elephants).

") - -for Civ in Civs: - CivData[Civ]["RangedUnitsWorth"] = 0 - for unit in CivData[Civ]["RangedUnits"]: - value = CalcValue(CivData[Civ]["RangedUnits"][unit])["Total"] - if paramRangedMode == "Average": CivData[Civ]["RangedUnitsWorth"] += value - elif value > CivData[Civ]["RangedUnitsWorth"]: CivData[Civ]["RangedUnitsWorth"] = value - if (paramRangedMode == "Average" and len(CivData[Civ]["RangedUnits"]) > 0): - CivData[Civ]["RangedUnitsWorth"] /= len(CivData[Civ]["RangedUnits"]) - -for Civ in Civs: - f.write("

" + Civ + "

") - - z = {} - for oCiv in Civs: - if (oCiv != Civ): - z.update(CivData[oCiv]["Units"]) - WriteComparisonTable(CivData[Civ]["Units"],z) - - WriteWorthList(CivData[Civ]["Units"]) - - f.write("

This Civilization has " + str(len(CivData[Civ]["RangedUnits"])) + " ranged units for a worth of " + str(CivData[Civ]["RangedUnitsWorth"]) + " (method " + ("Average" if paramRangedMode == "Average" else "Max") + "), individually:
") - for unit in CivData[Civ]["RangedUnits"]: - value = CalcValue(CivData[Civ]["RangedUnits"][unit])["Total"] - f.write(unit + " : " + str(value) + "
") - - f.write("


The following table uses the value in the comparison matrix above, factoring in costs (on the 3 columns on the right), and the average efficiency of its ranged units (per ParamRangedCoverage - " + str(paramRangedCoverage) + " right now).

") - f.write("
") - f.write("") - for oCiv in Civs: - if (oCiv == Civ): - continue - CivUnitComparisons(CivData[Civ],CivData[oCiv]) - f.write("
Average Efficiency
(disregards costs)
Maximal Minimal Efficiency
(disregards costs)
Minimal Maximal Efficiency
(disregards costs)
Average EfficiencyMaximal Minimal EfficiencyMinimal Maximal EfficiencyBalanceRanged EfficiencyCountered the leastCounters the least
") f.write("\n") \ No newline at end of file