diff --git a/.env b/.env
index 82490c4..ba0c9ea 100644
--- a/.env
+++ b/.env
@@ -1,7 +1,7 @@
-REACT_APP_API_URL=https://api.harmonydata.ac.uk
+REACT_APP_API_URL=http://localhost:8000
REACT_APP_API_EXAMPLES=$REACT_APP_API_URL/text/examples
REACT_APP_API_PARSE=$REACT_APP_API_URL/text/parse
REACT_APP_API_MATCH=$REACT_APP_API_URL/text/match
REACT_APP_API_VERSION=$REACT_APP_API_URL/info/version
REACT_APP_API_MODELS=$REACT_APP_API_URL/info/list-models
-REACT_APP_ABSOLUTE_URL_PREFIX=https://harmonydata.github.io
+REACT_APP_ABSOLUTE_URL_PREFIX=http://localhost:8000
diff --git a/.env.development b/.env.development
index c017fb8..ba0c9ea 100644
--- a/.env.development
+++ b/.env.development
@@ -1,7 +1,7 @@
-REACT_APP_API_URL=https://harmonystagingtmp.azurewebsites.net/
+REACT_APP_API_URL=http://localhost:8000
REACT_APP_API_EXAMPLES=$REACT_APP_API_URL/text/examples
REACT_APP_API_PARSE=$REACT_APP_API_URL/text/parse
REACT_APP_API_MATCH=$REACT_APP_API_URL/text/match
REACT_APP_API_VERSION=$REACT_APP_API_URL/info/version
REACT_APP_API_MODELS=$REACT_APP_API_URL/info/list-models
-REACT_APP_ABSOLUTE_URL_PREFIX=https://harmonydata.github.io
+REACT_APP_ABSOLUTE_URL_PREFIX=http://localhost:8000
diff --git a/coverage/clover.xml b/coverage/clover.xml
new file mode 100644
index 0000000..7fe5960
--- /dev/null
+++ b/coverage/clover.xml
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json
new file mode 100644
index 0000000..2c230bd
--- /dev/null
+++ b/coverage/coverage-final.json
@@ -0,0 +1,3 @@
+{"/Users/vc/Desktop/17313/app/src/components/App.js": {"path":"/Users/vc/Desktop/17313/app/src/components/App.js","statementMap":{"0":{"start":{"line":42,"column":18},"end":{"line":42,"column":30}},"1":{"start":{"line":43,"column":38},"end":{"line":43,"column":53}},"2":{"start":{"line":44,"column":56},"end":{"line":44,"column":68}},"3":{"start":{"line":45,"column":32},"end":{"line":45,"column":44}},"4":{"start":{"line":46,"column":46},"end":{"line":50,"column":4}},"5":{"start":{"line":51,"column":26},"end":{"line":51,"column":71}},"6":{"start":{"line":52,"column":26},"end":{"line":52,"column":36}},"7":{"start":{"line":59,"column":6},"end":{"line":59,"column":15}},"8":{"start":{"line":60,"column":40},"end":{"line":60,"column":50}},"9":{"start":{"line":61,"column":48},"end":{"line":61,"column":58}},"10":{"start":{"line":62,"column":36},"end":{"line":62,"column":46}},"11":{"start":{"line":63,"column":2},"end":{"line":65,"column":24}},"12":{"start":{"line":64,"column":4},"end":{"line":64,"column":48}},"13":{"start":{"line":67,"column":2},"end":{"line":77,"column":18}},"14":{"start":{"line":68,"column":31},"end":{"line":72,"column":5}},"15":{"start":{"line":70,"column":6},"end":{"line":71,"column":69}},"16":{"start":{"line":71,"column":8},"end":{"line":71,"column":69}},"17":{"start":{"line":73,"column":4},"end":{"line":73,"column":64}},"18":{"start":{"line":74,"column":4},"end":{"line":76,"column":6}},"19":{"start":{"line":75,"column":6},"end":{"line":75,"column":69}},"20":{"start":{"line":79,"column":2},"end":{"line":85,"column":9}},"21":{"start":{"line":80,"column":4},"end":{"line":84,"column":65}},"22":{"start":{"line":84,"column":6},"end":{"line":84,"column":65}},"23":{"start":{"line":87,"column":2},"end":{"line":113,"column":34}},"24":{"start":{"line":89,"column":4},"end":{"line":99,"column":5}},"25":{"start":{"line":94,"column":30},"end":{"line":94,"column":51}},"26":{"start":{"line":95,"column":6},"end":{"line":95,"column":47}},"27":{"start":{"line":96,"column":6},"end":{"line":97,"column":39}},"28":{"start":{"line":98,"column":6},"end":{"line":98,"column":43}},"29":{"start":{"line":102,"column":4},"end":{"line":112,"column":5}},"30":{"start":{"line":107,"column":30},"end":{"line":107,"column":51}},"31":{"start":{"line":108,"column":6},"end":{"line":109,"column":55}},"32":{"start":{"line":110,"column":6},"end":{"line":110,"column":60}},"33":{"start":{"line":111,"column":6},"end":{"line":111,"column":43}},"34":{"start":{"line":115,"column":2},"end":{"line":128,"column":27}},"35":{"start":{"line":116,"column":4},"end":{"line":119,"column":5}},"36":{"start":{"line":117,"column":6},"end":{"line":117,"column":41}},"37":{"start":{"line":118,"column":6},"end":{"line":118,"column":32}},"38":{"start":{"line":120,"column":4},"end":{"line":127,"column":9}},"39":{"start":{"line":122,"column":8},"end":{"line":122,"column":37}},"40":{"start":{"line":123,"column":8},"end":{"line":123,"column":26}},"41":{"start":{"line":126,"column":8},"end":{"line":126,"column":23}},"42":{"start":{"line":130,"column":20},"end":{"line":137,"column":3}},"43":{"start":{"line":131,"column":11},"end":{"line":135,"column":5}},"44":{"start":{"line":133,"column":8},"end":{"line":133,"column":73}},"45":{"start":{"line":133,"column":31},"end":{"line":133,"column":70}},"46":{"start":{"line":139,"column":22},"end":{"line":148,"column":3}},"47":{"start":{"line":140,"column":4},"end":{"line":147,"column":12}},"48":{"start":{"line":142,"column":8},"end":{"line":142,"column":27}},"49":{"start":{"line":146,"column":8},"end":{"line":146,"column":41}},"50":{"start":{"line":150,"column":23},"end":{"line":159,"column":3}},"51":{"start":{"line":152,"column":6},"end":{"line":156,"column":11}},"52":{"start":{"line":153,"column":8},"end":{"line":156,"column":11}},"53":{"start":{"line":154,"column":26},"end":{"line":154,"column":54}},"54":{"start":{"line":155,"column":10},"end":{"line":155,"column":32}},"55":{"start":{"line":161,"column":2},"end":{"line":165,"column":35}},"56":{"start":{"line":162,"column":4},"end":{"line":164,"column":5}},"57":{"start":{"line":163,"column":6},"end":{"line":163,"column":33}},"58":{"start":{"line":167,"column":30},"end":{"line":183,"column":3}},"59":{"start":{"line":168,"column":12},"end":{"line":168,"column":14}},"60":{"start":{"line":169,"column":4},"end":{"line":169,"column":24}},"61":{"start":{"line":170,"column":4},"end":{"line":170,"column":38}},"62":{"start":{"line":171,"column":4},"end":{"line":171,"column":20}},"63":{"start":{"line":172,"column":4},"end":{"line":182,"column":7}},"64":{"start":{"line":173,"column":6},"end":{"line":181,"column":11}},"65":{"start":{"line":175,"column":10},"end":{"line":175,"column":27}},"66":{"start":{"line":176,"column":10},"end":{"line":176,"column":69}},"67":{"start":{"line":179,"column":10},"end":{"line":179,"column":25}},"68":{"start":{"line":180,"column":10},"end":{"line":180,"column":48}},"69":{"start":{"line":185,"column":22},"end":{"line":219,"column":3}},"70":{"start":{"line":186,"column":4},"end":{"line":218,"column":5}},"71":{"start":{"line":189,"column":23},"end":{"line":189,"column":56}},"72":{"start":{"line":191,"column":6},"end":{"line":217,"column":8}},"73":{"start":{"line":199,"column":16},"end":{"line":199,"column":38}},"74":{"start":{"line":200,"column":16},"end":{"line":200,"column":41}},"75":{"start":{"line":201,"column":16},"end":{"line":201,"column":39}},"76":{"start":{"line":202,"column":16},"end":{"line":203,"column":103}},"77":{"start":{"line":204,"column":16},"end":{"line":209,"column":21}},"78":{"start":{"line":221,"column":26},"end":{"line":238,"column":3}},"79":{"start":{"line":222,"column":4},"end":{"line":222,"column":34}},"80":{"start":{"line":223,"column":12},"end":{"line":223,"column":14}},"81":{"start":{"line":224,"column":4},"end":{"line":224,"column":52}},"82":{"start":{"line":225,"column":4},"end":{"line":225,"column":38}},"83":{"start":{"line":226,"column":4},"end":{"line":226,"column":21}},"84":{"start":{"line":227,"column":4},"end":{"line":227,"column":27}},"85":{"start":{"line":228,"column":4},"end":{"line":237,"column":7}},"86":{"start":{"line":229,"column":6},"end":{"line":236,"column":11}},"87":{"start":{"line":231,"column":10},"end":{"line":231,"column":65}},"88":{"start":{"line":234,"column":10},"end":{"line":234,"column":25}},"89":{"start":{"line":235,"column":10},"end":{"line":235,"column":48}},"90":{"start":{"line":240,"column":24},"end":{"line":307,"column":3}},"91":{"start":{"line":241,"column":4},"end":{"line":241,"column":34}},"92":{"start":{"line":243,"column":23},"end":{"line":272,"column":8}},"93":{"start":{"line":245,"column":16},"end":{"line":245,"column":34}},"94":{"start":{"line":246,"column":17},"end":{"line":246,"column":36}},"95":{"start":{"line":247,"column":8},"end":{"line":260,"column":11}},"96":{"start":{"line":261,"column":8},"end":{"line":261,"column":17}},"97":{"start":{"line":265,"column":8},"end":{"line":267,"column":9}},"98":{"start":{"line":266,"column":10},"end":{"line":266,"column":19}},"99":{"start":{"line":268,"column":8},"end":{"line":270,"column":9}},"100":{"start":{"line":269,"column":10},"end":{"line":269,"column":20}},"101":{"start":{"line":271,"column":8},"end":{"line":271,"column":17}},"102":{"start":{"line":273,"column":18},"end":{"line":286,"column":8}},"103":{"start":{"line":275,"column":8},"end":{"line":275,"column":27}},"104":{"start":{"line":279,"column":8},"end":{"line":281,"column":9}},"105":{"start":{"line":280,"column":10},"end":{"line":280,"column":19}},"106":{"start":{"line":282,"column":8},"end":{"line":284,"column":9}},"107":{"start":{"line":283,"column":10},"end":{"line":283,"column":20}},"108":{"start":{"line":285,"column":8},"end":{"line":285,"column":17}},"109":{"start":{"line":288,"column":20},"end":{"line":290,"column":6}},"110":{"start":{"line":289,"column":6},"end":{"line":289,"column":53}},"111":{"start":{"line":291,"column":23},"end":{"line":293,"column":6}},"112":{"start":{"line":292,"column":6},"end":{"line":292,"column":29}},"113":{"start":{"line":295,"column":24},"end":{"line":297,"column":6}},"114":{"start":{"line":296,"column":6},"end":{"line":296,"column":44}},"115":{"start":{"line":298,"column":4},"end":{"line":298,"column":36}},"116":{"start":{"line":299,"column":4},"end":{"line":299,"column":33}},"117":{"start":{"line":301,"column":20},"end":{"line":301,"column":55}},"118":{"start":{"line":302,"column":19},"end":{"line":302,"column":54}},"119":{"start":{"line":303,"column":21},"end":{"line":303,"column":41}},"120":{"start":{"line":304,"column":4},"end":{"line":304,"column":62}},"121":{"start":{"line":305,"column":4},"end":{"line":305,"column":60}},"122":{"start":{"line":306,"column":4},"end":{"line":306,"column":44}},"123":{"start":{"line":311,"column":22},"end":{"line":354,"column":3}},"124":{"start":{"line":312,"column":4},"end":{"line":353,"column":5}},"125":{"start":{"line":313,"column":33},"end":{"line":323,"column":11}},"126":{"start":{"line":313,"column":63},"end":{"line":323,"column":9}},"127":{"start":{"line":325,"column":26},"end":{"line":325,"column":48}},"128":{"start":{"line":326,"column":24},"end":{"line":333,"column":10}},"129":{"start":{"line":331,"column":29},"end":{"line":331,"column":39}},"130":{"start":{"line":332,"column":26},"end":{"line":332,"column":30}},"131":{"start":{"line":335,"column":20},"end":{"line":335,"column":48}},"132":{"start":{"line":336,"column":21},"end":{"line":336,"column":48}},"133":{"start":{"line":337,"column":8},"end":{"line":337,"column":24}},"134":{"start":{"line":338,"column":8},"end":{"line":338,"column":46}},"135":{"start":{"line":339,"column":8},"end":{"line":339,"column":40}},"136":{"start":{"line":340,"column":8},"end":{"line":340,"column":21}},"137":{"start":{"line":341,"column":8},"end":{"line":341,"column":40}},"138":{"start":{"line":342,"column":8},"end":{"line":342,"column":33}},"139":{"start":{"line":344,"column":8},"end":{"line":347,"column":11}},"140":{"start":{"line":349,"column":8},"end":{"line":349,"column":38}},"141":{"start":{"line":351,"column":8},"end":{"line":351,"column":54}},"142":{"start":{"line":352,"column":8},"end":{"line":352,"column":53}},"143":{"start":{"line":364,"column":14},"end":{"line":368,"column":3}},"144":{"start":{"line":366,"column":6},"end":{"line":366,"column":78}},"145":{"start":{"line":370,"column":2},"end":{"line":370,"column":37}},"146":{"start":{"line":371,"column":2},"end":{"line":587,"column":4}},"147":{"start":{"line":498,"column":34},"end":{"line":498,"column":53}},"148":{"start":{"line":499,"column":35},"end":{"line":499,"column":55}},"149":{"start":{"line":577,"column":14},"end":{"line":577,"column":49}},"150":{"start":{"line":578,"column":14},"end":{"line":578,"column":40}}},"fnMap":{"0":{"name":"App","decl":{"start":{"line":41,"column":9},"end":{"line":41,"column":12}},"loc":{"start":{"line":41,"column":15},"end":{"line":588,"column":1}},"line":41},"1":{"name":"(anonymous_1)","decl":{"start":{"line":63,"column":12},"end":{"line":63,"column":13}},"loc":{"start":{"line":63,"column":18},"end":{"line":65,"column":3}},"line":63},"2":{"name":"(anonymous_2)","decl":{"start":{"line":67,"column":12},"end":{"line":67,"column":13}},"loc":{"start":{"line":67,"column":18},"end":{"line":77,"column":3}},"line":67},"3":{"name":"(anonymous_3)","decl":{"start":{"line":68,"column":31},"end":{"line":68,"column":32}},"loc":{"start":{"line":68,"column":42},"end":{"line":72,"column":5}},"line":68},"4":{"name":"(anonymous_4)","decl":{"start":{"line":74,"column":11},"end":{"line":74,"column":12}},"loc":{"start":{"line":74,"column":17},"end":{"line":76,"column":5}},"line":74},"5":{"name":"(anonymous_5)","decl":{"start":{"line":79,"column":12},"end":{"line":79,"column":13}},"loc":{"start":{"line":79,"column":18},"end":{"line":85,"column":3}},"line":79},"6":{"name":"(anonymous_6)","decl":{"start":{"line":87,"column":12},"end":{"line":87,"column":13}},"loc":{"start":{"line":87,"column":18},"end":{"line":113,"column":3}},"line":87},"7":{"name":"(anonymous_7)","decl":{"start":{"line":115,"column":12},"end":{"line":115,"column":13}},"loc":{"start":{"line":115,"column":18},"end":{"line":128,"column":3}},"line":115},"8":{"name":"(anonymous_8)","decl":{"start":{"line":121,"column":12},"end":{"line":121,"column":13}},"loc":{"start":{"line":121,"column":22},"end":{"line":124,"column":7}},"line":121},"9":{"name":"(anonymous_9)","decl":{"start":{"line":125,"column":13},"end":{"line":125,"column":14}},"loc":{"start":{"line":125,"column":20},"end":{"line":127,"column":7}},"line":125},"10":{"name":"(anonymous_10)","decl":{"start":{"line":131,"column":4},"end":{"line":131,"column":5}},"loc":{"start":{"line":131,"column":11},"end":{"line":135,"column":5}},"line":131},"11":{"name":"(anonymous_11)","decl":{"start":{"line":132,"column":23},"end":{"line":132,"column":24}},"loc":{"start":{"line":132,"column":29},"end":{"line":134,"column":7}},"line":132},"12":{"name":"(anonymous_12)","decl":{"start":{"line":133,"column":16},"end":{"line":133,"column":17}},"loc":{"start":{"line":133,"column":31},"end":{"line":133,"column":70}},"line":133},"13":{"name":"(anonymous_13)","decl":{"start":{"line":139,"column":22},"end":{"line":139,"column":23}},"loc":{"start":{"line":139,"column":32},"end":{"line":148,"column":3}},"line":139},"14":{"name":"(anonymous_14)","decl":{"start":{"line":141,"column":11},"end":{"line":141,"column":12}},"loc":{"start":{"line":141,"column":18},"end":{"line":143,"column":7}},"line":141},"15":{"name":"(anonymous_15)","decl":{"start":{"line":145,"column":14},"end":{"line":145,"column":15}},"loc":{"start":{"line":145,"column":21},"end":{"line":147,"column":7}},"line":145},"16":{"name":"(anonymous_16)","decl":{"start":{"line":151,"column":4},"end":{"line":151,"column":5}},"loc":{"start":{"line":151,"column":20},"end":{"line":157,"column":5}},"line":151},"17":{"name":"(anonymous_17)","decl":{"start":{"line":153,"column":49},"end":{"line":153,"column":50}},"loc":{"start":{"line":153,"column":59},"end":{"line":156,"column":9}},"line":153},"18":{"name":"(anonymous_18)","decl":{"start":{"line":161,"column":12},"end":{"line":161,"column":13}},"loc":{"start":{"line":161,"column":18},"end":{"line":165,"column":3}},"line":161},"19":{"name":"(anonymous_19)","decl":{"start":{"line":167,"column":30},"end":{"line":167,"column":31}},"loc":{"start":{"line":167,"column":36},"end":{"line":183,"column":3}},"line":167},"20":{"name":"(anonymous_20)","decl":{"start":{"line":172,"column":23},"end":{"line":172,"column":24}},"loc":{"start":{"line":172,"column":44},"end":{"line":182,"column":5}},"line":172},"21":{"name":"(anonymous_21)","decl":{"start":{"line":174,"column":14},"end":{"line":174,"column":15}},"loc":{"start":{"line":174,"column":23},"end":{"line":177,"column":9}},"line":174},"22":{"name":"(anonymous_22)","decl":{"start":{"line":178,"column":15},"end":{"line":178,"column":16}},"loc":{"start":{"line":178,"column":22},"end":{"line":181,"column":9}},"line":178},"23":{"name":"(anonymous_23)","decl":{"start":{"line":185,"column":22},"end":{"line":185,"column":23}},"loc":{"start":{"line":185,"column":28},"end":{"line":219,"column":3}},"line":185},"24":{"name":"(anonymous_24)","decl":{"start":{"line":189,"column":14},"end":{"line":189,"column":15}},"loc":{"start":{"line":189,"column":23},"end":{"line":189,"column":56}},"line":189},"25":{"name":"(anonymous_25)","decl":{"start":{"line":198,"column":24},"end":{"line":198,"column":25}},"loc":{"start":{"line":198,"column":45},"end":{"line":210,"column":15}},"line":198},"26":{"name":"(anonymous_26)","decl":{"start":{"line":221,"column":26},"end":{"line":221,"column":27}},"loc":{"start":{"line":221,"column":32},"end":{"line":238,"column":3}},"line":221},"27":{"name":"(anonymous_27)","decl":{"start":{"line":228,"column":23},"end":{"line":228,"column":24}},"loc":{"start":{"line":228,"column":44},"end":{"line":237,"column":5}},"line":228},"28":{"name":"(anonymous_28)","decl":{"start":{"line":230,"column":14},"end":{"line":230,"column":15}},"loc":{"start":{"line":230,"column":26},"end":{"line":232,"column":9}},"line":230},"29":{"name":"(anonymous_29)","decl":{"start":{"line":233,"column":15},"end":{"line":233,"column":16}},"loc":{"start":{"line":233,"column":22},"end":{"line":236,"column":9}},"line":233},"30":{"name":"(anonymous_30)","decl":{"start":{"line":240,"column":24},"end":{"line":240,"column":25}},"loc":{"start":{"line":240,"column":30},"end":{"line":307,"column":3}},"line":240},"31":{"name":"(anonymous_31)","decl":{"start":{"line":244,"column":14},"end":{"line":244,"column":15}},"loc":{"start":{"line":244,"column":34},"end":{"line":262,"column":7}},"line":244},"32":{"name":"(anonymous_32)","decl":{"start":{"line":264,"column":12},"end":{"line":264,"column":13}},"loc":{"start":{"line":264,"column":22},"end":{"line":272,"column":7}},"line":264},"33":{"name":"(anonymous_33)","decl":{"start":{"line":274,"column":11},"end":{"line":274,"column":12}},"loc":{"start":{"line":274,"column":18},"end":{"line":276,"column":7}},"line":274},"34":{"name":"(anonymous_34)","decl":{"start":{"line":278,"column":12},"end":{"line":278,"column":13}},"loc":{"start":{"line":278,"column":22},"end":{"line":286,"column":7}},"line":278},"35":{"name":"(anonymous_35)","decl":{"start":{"line":288,"column":30},"end":{"line":288,"column":31}},"loc":{"start":{"line":288,"column":37},"end":{"line":290,"column":5}},"line":288},"36":{"name":"(anonymous_36)","decl":{"start":{"line":291,"column":33},"end":{"line":291,"column":34}},"loc":{"start":{"line":291,"column":40},"end":{"line":293,"column":5}},"line":291},"37":{"name":"(anonymous_37)","decl":{"start":{"line":295,"column":34},"end":{"line":295,"column":35}},"loc":{"start":{"line":295,"column":44},"end":{"line":297,"column":5}},"line":295},"38":{"name":"(anonymous_38)","decl":{"start":{"line":311,"column":22},"end":{"line":311,"column":23}},"loc":{"start":{"line":311,"column":34},"end":{"line":354,"column":3}},"line":311},"39":{"name":"(anonymous_39)","decl":{"start":{"line":313,"column":53},"end":{"line":313,"column":54}},"loc":{"start":{"line":313,"column":63},"end":{"line":323,"column":9}},"line":313},"40":{"name":"(anonymous_40)","decl":{"start":{"line":331,"column":24},"end":{"line":331,"column":25}},"loc":{"start":{"line":331,"column":29},"end":{"line":331,"column":39}},"line":331},"41":{"name":"(anonymous_41)","decl":{"start":{"line":332,"column":21},"end":{"line":332,"column":22}},"loc":{"start":{"line":332,"column":26},"end":{"line":332,"column":30}},"line":332},"42":{"name":"(anonymous_42)","decl":{"start":{"line":365,"column":4},"end":{"line":365,"column":5}},"loc":{"start":{"line":366,"column":6},"end":{"line":366,"column":78}},"line":366},"43":{"name":"(anonymous_43)","decl":{"start":{"line":498,"column":28},"end":{"line":498,"column":29}},"loc":{"start":{"line":498,"column":34},"end":{"line":498,"column":53}},"line":498},"44":{"name":"(anonymous_44)","decl":{"start":{"line":499,"column":29},"end":{"line":499,"column":30}},"loc":{"start":{"line":499,"column":35},"end":{"line":499,"column":55}},"line":499},"45":{"name":"(anonymous_45)","decl":{"start":{"line":576,"column":22},"end":{"line":576,"column":23}},"loc":{"start":{"line":576,"column":28},"end":{"line":579,"column":13}},"line":576}},"branchMap":{"0":{"loc":{"start":{"line":64,"column":12},"end":{"line":64,"column":46}},"type":"cond-expr","locations":[{"start":{"line":64,"column":30},"end":{"line":64,"column":36}},{"start":{"line":64,"column":39},"end":{"line":64,"column":46}}],"line":64},"1":{"loc":{"start":{"line":70,"column":6},"end":{"line":71,"column":69}},"type":"if","locations":[{"start":{"line":70,"column":6},"end":{"line":71,"column":69}},{"start":{},"end":{}}],"line":70},"2":{"loc":{"start":{"line":80,"column":4},"end":{"line":84,"column":65}},"type":"if","locations":[{"start":{"line":80,"column":4},"end":{"line":84,"column":65}},{"start":{},"end":{}}],"line":80},"3":{"loc":{"start":{"line":81,"column":6},"end":{"line":82,"column":54}},"type":"binary-expr","locations":[{"start":{"line":81,"column":6},"end":{"line":81,"column":38}},{"start":{"line":82,"column":6},"end":{"line":82,"column":54}}],"line":81},"4":{"loc":{"start":{"line":89,"column":4},"end":{"line":99,"column":5}},"type":"if","locations":[{"start":{"line":89,"column":4},"end":{"line":99,"column":5}},{"start":{},"end":{}}],"line":89},"5":{"loc":{"start":{"line":90,"column":6},"end":{"line":92,"column":46}},"type":"binary-expr","locations":[{"start":{"line":90,"column":6},"end":{"line":90,"column":15}},{"start":{"line":91,"column":6},"end":{"line":91,"column":28}},{"start":{"line":92,"column":6},"end":{"line":92,"column":46}}],"line":90},"6":{"loc":{"start":{"line":102,"column":4},"end":{"line":112,"column":5}},"type":"if","locations":[{"start":{"line":102,"column":4},"end":{"line":112,"column":5}},{"start":{},"end":{}}],"line":102},"7":{"loc":{"start":{"line":103,"column":6},"end":{"line":105,"column":69}},"type":"binary-expr","locations":[{"start":{"line":103,"column":6},"end":{"line":103,"column":15}},{"start":{"line":104,"column":6},"end":{"line":104,"column":26}},{"start":{"line":105,"column":6},"end":{"line":105,"column":69}}],"line":103},"8":{"loc":{"start":{"line":116,"column":4},"end":{"line":119,"column":5}},"type":"if","locations":[{"start":{"line":116,"column":4},"end":{"line":119,"column":5}},{"start":{},"end":{}}],"line":116},"9":{"loc":{"start":{"line":133,"column":31},"end":{"line":133,"column":70}},"type":"cond-expr","locations":[{"start":{"line":133,"column":54},"end":{"line":133,"column":60}},{"start":{"line":133,"column":63},"end":{"line":133,"column":70}}],"line":133},"10":{"loc":{"start":{"line":152,"column":6},"end":{"line":156,"column":11}},"type":"if","locations":[{"start":{"line":152,"column":6},"end":{"line":156,"column":11}},{"start":{},"end":{}}],"line":152},"11":{"loc":{"start":{"line":162,"column":4},"end":{"line":164,"column":5}},"type":"if","locations":[{"start":{"line":162,"column":4},"end":{"line":164,"column":5}},{"start":{},"end":{}}],"line":162},"12":{"loc":{"start":{"line":186,"column":4},"end":{"line":218,"column":5}},"type":"if","locations":[{"start":{"line":186,"column":4},"end":{"line":218,"column":5}},{"start":{},"end":{}}],"line":186},"13":{"loc":{"start":{"line":204,"column":16},"end":{"line":209,"column":20}},"type":"binary-expr","locations":[{"start":{"line":204,"column":16},"end":{"line":204,"column":23}},{"start":{"line":205,"column":18},"end":{"line":209,"column":20}}],"line":204},"14":{"loc":{"start":{"line":252,"column":12},"end":{"line":252,"column":78}},"type":"binary-expr","locations":[{"start":{"line":252,"column":12},"end":{"line":252,"column":45}},{"start":{"line":252,"column":49},"end":{"line":252,"column":78}}],"line":252},"15":{"loc":{"start":{"line":257,"column":12},"end":{"line":258,"column":42}},"type":"binary-expr","locations":[{"start":{"line":257,"column":12},"end":{"line":257,"column":46}},{"start":{"line":258,"column":12},"end":{"line":258,"column":42}}],"line":257},"16":{"loc":{"start":{"line":265,"column":8},"end":{"line":267,"column":9}},"type":"if","locations":[{"start":{"line":265,"column":8},"end":{"line":267,"column":9}},{"start":{},"end":{}}],"line":265},"17":{"loc":{"start":{"line":268,"column":8},"end":{"line":270,"column":9}},"type":"if","locations":[{"start":{"line":268,"column":8},"end":{"line":270,"column":9}},{"start":{},"end":{}}],"line":268},"18":{"loc":{"start":{"line":279,"column":8},"end":{"line":281,"column":9}},"type":"if","locations":[{"start":{"line":279,"column":8},"end":{"line":281,"column":9}},{"start":{},"end":{}}],"line":279},"19":{"loc":{"start":{"line":282,"column":8},"end":{"line":284,"column":9}},"type":"if","locations":[{"start":{"line":282,"column":8},"end":{"line":284,"column":9}},{"start":{},"end":{}}],"line":282},"20":{"loc":{"start":{"line":380,"column":27},"end":{"line":382,"column":21}},"type":"cond-expr","locations":[{"start":{"line":381,"column":16},"end":{"line":381,"column":24}},{"start":{"line":382,"column":16},"end":{"line":382,"column":21}}],"line":380},"21":{"loc":{"start":{"line":495,"column":53},"end":{"line":495,"column":77}},"type":"cond-expr","locations":[{"start":{"line":495,"column":66},"end":{"line":495,"column":72}},{"start":{"line":495,"column":75},"end":{"line":495,"column":77}}],"line":495},"22":{"loc":{"start":{"line":512,"column":27},"end":{"line":514,"column":28}},"type":"cond-expr","locations":[{"start":{"line":513,"column":22},"end":{"line":513,"column":30}},{"start":{"line":514,"column":22},"end":{"line":514,"column":28}}],"line":512}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0,0],"6":[0,0],"7":[0,0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0]}}
+,"/Users/vc/Desktop/17313/app/src/components/ResultsOptions.js": {"path":"/Users/vc/Desktop/17313/app/src/components/ResultsOptions.js","statementMap":{"0":{"start":{"line":31,"column":36},"end":{"line":31,"column":70}},"1":{"start":{"line":32,"column":26},"end":{"line":32,"column":35}},"2":{"start":{"line":33,"column":38},"end":{"line":33,"column":50}},"3":{"start":{"line":34,"column":30},"end":{"line":34,"column":58}},"4":{"start":{"line":36,"column":2},"end":{"line":39,"column":23}},"5":{"start":{"line":37,"column":4},"end":{"line":37,"column":43}},"6":{"start":{"line":38,"column":4},"end":{"line":38,"column":45}},"7":{"start":{"line":41,"column":2},"end":{"line":47,"column":63}},"8":{"start":{"line":42,"column":4},"end":{"line":46,"column":5}},"9":{"start":{"line":43,"column":24},"end":{"line":43,"column":45}},"10":{"start":{"line":44,"column":6},"end":{"line":44,"column":51}},"11":{"start":{"line":45,"column":6},"end":{"line":45,"column":37}},"12":{"start":{"line":49,"column":2},"end":{"line":213,"column":4}},"13":{"start":{"line":69,"column":12},"end":{"line":69,"column":32}},"14":{"start":{"line":72,"column":30},"end":{"line":72,"column":51}},"15":{"start":{"line":73,"column":12},"end":{"line":73,"column":42}},"16":{"start":{"line":74,"column":12},"end":{"line":74,"column":43}},"17":{"start":{"line":87,"column":12},"end":{"line":87,"column":42}},"18":{"start":{"line":128,"column":32},"end":{"line":128,"column":53}},"19":{"start":{"line":129,"column":14},"end":{"line":129,"column":65}},"20":{"start":{"line":130,"column":14},"end":{"line":130,"column":45}},"21":{"start":{"line":146,"column":32},"end":{"line":146,"column":53}},"22":{"start":{"line":147,"column":14},"end":{"line":147,"column":62}},"23":{"start":{"line":148,"column":14},"end":{"line":148,"column":45}},"24":{"start":{"line":170,"column":14},"end":{"line":174,"column":19}},"25":{"start":{"line":175,"column":14},"end":{"line":175,"column":30}},"26":{"start":{"line":185,"column":14},"end":{"line":185,"column":55}},"27":{"start":{"line":186,"column":14},"end":{"line":196,"column":15}},"28":{"start":{"line":187,"column":16},"end":{"line":191,"column":21}},"29":{"start":{"line":192,"column":16},"end":{"line":192,"column":60}},"30":{"start":{"line":194,"column":16},"end":{"line":194,"column":59}},"31":{"start":{"line":195,"column":16},"end":{"line":195,"column":63}}},"fnMap":{"0":{"name":"ResultsOptions","decl":{"start":{"line":21,"column":24},"end":{"line":21,"column":38}},"loc":{"start":{"line":30,"column":3},"end":{"line":214,"column":1}},"line":30},"1":{"name":"(anonymous_1)","decl":{"start":{"line":36,"column":12},"end":{"line":36,"column":13}},"loc":{"start":{"line":36,"column":18},"end":{"line":39,"column":3}},"line":36},"2":{"name":"(anonymous_2)","decl":{"start":{"line":41,"column":10},"end":{"line":41,"column":11}},"loc":{"start":{"line":41,"column":16},"end":{"line":47,"column":3}},"line":41},"3":{"name":"(anonymous_3)","decl":{"start":{"line":68,"column":20},"end":{"line":68,"column":21}},"loc":{"start":{"line":68,"column":34},"end":{"line":70,"column":11}},"line":68},"4":{"name":"(anonymous_4)","decl":{"start":{"line":71,"column":29},"end":{"line":71,"column":30}},"loc":{"start":{"line":71,"column":43},"end":{"line":75,"column":11}},"line":71},"5":{"name":"(anonymous_5)","decl":{"start":{"line":86,"column":20},"end":{"line":86,"column":21}},"loc":{"start":{"line":86,"column":27},"end":{"line":88,"column":11}},"line":86},"6":{"name":"(anonymous_6)","decl":{"start":{"line":127,"column":22},"end":{"line":127,"column":23}},"loc":{"start":{"line":127,"column":33},"end":{"line":131,"column":13}},"line":127},"7":{"name":"(anonymous_7)","decl":{"start":{"line":145,"column":22},"end":{"line":145,"column":23}},"loc":{"start":{"line":145,"column":33},"end":{"line":149,"column":13}},"line":145},"8":{"name":"(anonymous_8)","decl":{"start":{"line":169,"column":21},"end":{"line":169,"column":22}},"loc":{"start":{"line":169,"column":27},"end":{"line":176,"column":13}},"line":169},"9":{"name":"(anonymous_9)","decl":{"start":{"line":184,"column":21},"end":{"line":184,"column":22}},"loc":{"start":{"line":184,"column":33},"end":{"line":197,"column":13}},"line":184}},"branchMap":{"0":{"loc":{"start":{"line":42,"column":4},"end":{"line":46,"column":5}},"type":"if","locations":[{"start":{"line":42,"column":4},"end":{"line":46,"column":5}},{"start":{},"end":{}}],"line":42},"1":{"loc":{"start":{"line":161,"column":11},"end":{"line":166,"column":11}},"type":"binary-expr","locations":[{"start":{"line":161,"column":11},"end":{"line":161,"column":22}},{"start":{"line":162,"column":12},"end":{"line":165,"column":14}}],"line":161},"2":{"loc":{"start":{"line":170,"column":14},"end":{"line":174,"column":18}},"type":"binary-expr","locations":[{"start":{"line":170,"column":14},"end":{"line":170,"column":21}},{"start":{"line":171,"column":16},"end":{"line":174,"column":18}}],"line":170},"3":{"loc":{"start":{"line":187,"column":16},"end":{"line":191,"column":20}},"type":"binary-expr","locations":[{"start":{"line":187,"column":16},"end":{"line":187,"column":23}},{"start":{"line":188,"column":18},"end":{"line":191,"column":20}}],"line":187}},"s":{"0":3,"1":3,"2":3,"3":3,"4":3,"5":3,"6":3,"7":3,"8":3,"9":0,"10":0,"11":0,"12":3,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":2,"27":2,"28":2,"29":2,"30":1,"31":1},"f":{"0":3,"1":3,"2":3,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":2},"b":{"0":[0,3],"1":[3,0],"2":[0,0],"3":[2,2]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"6a84881d31a106229ce160ae38fc2e3e4bfc3c78"}
+}
diff --git a/coverage/lcov-report/App.js.html b/coverage/lcov-report/App.js.html
new file mode 100644
index 0000000..c896cb5
--- /dev/null
+++ b/coverage/lcov-report/App.js.html
@@ -0,0 +1,1855 @@
+
+
+
+
+
+ Code coverage report for App.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0%
+ Statements
+ 0/151
+
+
+
+
+ 0%
+ Branches
+ 0/48
+
+
+
+
+ 0%
+ Functions
+ 0/46
+
+
+
+
+ 0%
+ Lines
+ 0/149
+
+
+
+
+
+ Press n or j to go to the next uncovered block, b, p or k for the previous block.
+
+
+
+ Filter:
+
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591 |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | import React, { useState, useEffect, useMemo, useCallback } from "react";
+import {
+ Container,
+ Box,
+ Slide,
+ useMediaQuery,
+ Link,
+ Typography,
+ Rating,
+} from "@mui/material";
+import { HashRouter as Router, Switch, Route } from "react-router-dom";
+import Upload from "./Upload";
+import Results from "./Results";
+import Login from "./Login";
+import CssBaseline from "@mui/material/CssBaseline";
+import { getDesignTokens, getThemedComponents } from "../conf/theme.ts";
+import {
+ createTheme,
+ ThemeProvider,
+ responsiveFontSizes,
+} from "@mui/material/styles";
+import { simplifyApi } from "../utilities/simplifyApi";
+import HarmonyAppBar from "./AppBar";
+import pattern from "../img/pattern.svg";
+import logoWithText from "../img/Logo-04-min.svg";
+import ResultsOptions from "./ResultsOptions";
+import { deepmerge } from "@mui/utils";
+import { ColorModeContext } from "../contexts/ColorModeContext";
+import { useData } from "../contexts/DataContext";
+import { utils as XLSXutils, writeFile as XLSXwriteFile } from "xlsx";
+import ReactGA from "react-ga4";
+import CookieConsent, { getCookieConsentValue } from "react-cookie-consent";
+import { ToastContainer, toast } from "react-toastify";
+import MakeMeJSON from "./MakeMeJSON.js";
+import "react-toastify/dist/ReactToastify.css";
+import YouTube from "react-youtube";
+import "../css/youtube.css";
+import { useHistory } from "react-router-dom";
+import HarmonyPDFExport from './HarmonyPDFExport';
+
+function App() {
+ const history = useHistory();
+ const [fullscreen, setFullscreen] = useState(false);
+ const [existingInstruments, setExistingInstruments] = useState([]);
+ const [apiData, setApiData] = useState({});
+ const [resultsOptions, setResultsOptions] = useState({
+ threshold: [70, 100],
+ searchTerm: "",
+ intraInstrument: false,
+ });
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
+ const [mode, setMode] = useState();
+ const {
+ storeHarmonisation,
+ reportRating,
+ exampleInstruments,
+ match,
+ currentModel,
+ } = useData();
+ const [ratingValue, setRatingValue] = useState();
+ const [computedMatches, setComputedMatches] = useState();
+ const [fileInfos, setFileInfos] = useState();
+ useEffect(() => {
+ setMode(prefersDarkMode ? "dark" : "light");
+ }, [prefersDarkMode]);
+
+ useEffect(() => {
+ const handleBeforeUnload = (event) => {
+ // stash the current fileInfos to sessionStorage so they can be retreived in the case of handling an import link
+ if (fileInfos.length)
+ sessionStorage["harmonyStashed"] = JSON.stringify(fileInfos);
+ };
+ window.addEventListener("beforeunload", handleBeforeUnload);
+ return () => {
+ window.removeEventListener("beforeunload", handleBeforeUnload);
+ };
+ }, [fileInfos]);
+
+ useEffect(() => {
+ if (
+ sessionStorage["harmonyStashed"] &&
+ sessionStorage["harmonyStashed"] !== "undefined"
+ )
+ setFileInfos(JSON.parse(sessionStorage["harmonyStashed"]));
+ }, []);
+
+ useEffect(() => {
+ //default to intraInstrument ON in the case of just one instument in the model
+ if (
+ fileInfos &&
+ fileInfos.length === 1 &&
+ resultsOptions.intraInstrument === false
+ ) {
+ let newResultsOptions = { ...resultsOptions };
+ newResultsOptions.intraInstrument = true;
+ newResultsOptions.intraInstrumentPreviousState =
+ resultsOptions.intraInstrument;
+ setResultsOptions(newResultsOptions);
+ }
+
+ // If there is now more than 1 switch it back to what it was before we forced it.
+ if (
+ fileInfos &&
+ fileInfos.length > 1 &&
+ typeof resultsOptions.intraInstrumentPreviousState == "boolean"
+ ) {
+ let newResultsOptions = { ...resultsOptions };
+ newResultsOptions.intraInstrument =
+ newResultsOptions.intraInstrumentPreviousState;
+ delete newResultsOptions.intraInstrumentPreviousState;
+ setResultsOptions(newResultsOptions);
+ }
+ }, [fileInfos, resultsOptions]);
+
+ useEffect(() => {
+ if (getCookieConsentValue("harmonyCookieConsent")) {
+ ReactGA.initialize("G-S79J6E39ZP");
+ console.log("GA enabled");
+ }
+ exampleInstruments()
+ .then((data) => {
+ setExistingInstruments(data);
+ console.log(data);
+ })
+ .catch((e) => {
+ console.log(e);
+ });
+ }, [exampleInstruments]);
+
+ const colorMode = useMemo(
+ () => ({
+ toggleColorMode: () => {
+ setMode((prevMode) => (prevMode === "light" ? "dark" : "light"));
+ },
+ }),
+ []
+ );
+
+ const getQuestion = (qidx) => {
+ return apiData.instruments
+ .map((i) => {
+ return i.questions;
+ })
+ .flat()
+ .filter((q) => {
+ return q.question_index === qidx;
+ })[0];
+ };
+
+ const executeMatch = useCallback(
+ (forceModel) => {
+ if (fileInfos)
+ return match(fileInfos, forceModel).then((data) => {
+ let simpleApi = simplifyApi(data, fileInfos);
+ setApiData(simpleApi);
+ });
+ },
+ [history, fileInfos]
+ );
+
+ useEffect(() => {
+ if (window.location.href.includes("/model")) {
+ executeMatch(currentModel);
+ }
+ }, [currentModel, executeMatch]);
+
+ const makePublicShareLink = () => {
+ let h = {};
+ h.apiData = apiData;
+ h.resultsOptions = resultsOptions;
+ h.public = true;
+ return new Promise((resolve, reject) => {
+ storeHarmonisation(h)
+ .then((doc) => {
+ console.log(doc);
+ resolve(window.location.origin + "/app/#/model/" + doc.id);
+ })
+ .catch((e) => {
+ console.log(e);
+ reject("Could not create share link");
+ });
+ });
+ };
+
+ const ratingToast = () => {
+ if (
+ !document.cookie
+ .split("; ")
+ .find((row) => row.startsWith("harmonyHasRated"))
+ ) {
+ toast(
+ <Box>
+ <Typography component="legend">Are you enjoying Harmony?</Typography>
+ <Box>
+ <Rating
+ name="simple-controlled"
+ value={ratingValue}
+ onChange={(event, newValue) => {
+ console.log(newValue);
+ setRatingValue(newValue);
+ reportRating(newValue);
+ document.cookie =
+ "harmonyHasRated=true; expires=Fri, 31 Dec 9999 23:59:59 GMT; SameSite=None; Secure";
+ ReactGA &&
+ ReactGA.event({
+ category: "Actions",
+ action: "Rating",
+ value: Number(newValue),
+ });
+ }}
+ />
+ </Box>
+ </Box>,
+ {
+ autoClose: false,
+ }
+ );
+ }
+ };
+
+ const saveToMyHarmony = () => {
+ setTimeout(ratingToast, 1000);
+ let h = {};
+ h.apiData = JSON.parse(JSON.stringify(apiData));
+ h.resultsOptions = resultsOptions;
+ h.public = false;
+ h.created = new Date();
+ return new Promise((resolve, reject) => {
+ storeHarmonisation(h)
+ .then((docRef) => {
+ resolve(window.location.origin + "/#/match/" + docRef);
+ })
+ .catch((e) => {
+ console.log(e);
+ reject("Could not create share link");
+ });
+ });
+ };
+
+ const downloadExcel = () => {
+ setTimeout(ratingToast, 1000);
+
+ const matchSheet = computedMatches
+ .reduce(function (a, cm, i) {
+ let q = getQuestion(cm.qi);
+ let mq = getQuestion(cm.mqi);
+ a.push({
+ instrument1: q.instrument.name,
+ question1_no: q.question_no,
+ question1_text: q.question_text,
+ question1_topics:
+ Array.isArray(q.topics_strengths) && q.topics_strengths.join(", "),
+ instrument2: mq.instrument.name,
+ question2_no: mq.question_no,
+ question2_text: mq.question_text,
+ question2_topics:
+ Array.isArray(mq.topics_strengths) &&
+ mq.topics_strengths.join(", "),
+ match: cm.match,
+ });
+ return a;
+ }, [])
+ .flat()
+ .sort((a, b) => {
+ if (Math.abs(a.match) < Math.abs(b.match)) {
+ return 1;
+ }
+ if (Math.abs(a.match) > Math.abs(b.match)) {
+ return -1;
+ }
+ return 0;
+ });
+ const allQs = apiData.instruments
+ .map((i) => {
+ return i.questions;
+ })
+ .flat()
+ .sort((a, b) => {
+ if (a.question_index > b.question_index) {
+ return 1;
+ }
+ if (a.question_index < b.question_index) {
+ return -1;
+ }
+ return 0;
+ });
+
+ const headers = allQs.map((q) => {
+ return q.instrument.name + " " + q.question_no;
+ });
+ const subheaders = allQs.map((q) => {
+ return q.question_text;
+ });
+
+ const matrixSheet = allQs.map((q, i) => {
+ return Array(i + 1).concat(q.matches);
+ });
+ matrixSheet.unshift(subheaders);
+ matrixSheet.unshift(headers);
+
+ const matches = XLSXutils.json_to_sheet(matchSheet);
+ const matrix = XLSXutils.aoa_to_sheet(matrixSheet);
+ const workbook = XLSXutils.book_new();
+ XLSXutils.book_append_sheet(workbook, matches, "Matches");
+ XLSXutils.book_append_sheet(workbook, matrix, "Matrix");
+ XLSXwriteFile(workbook, "Harmony.xlsx");
+ };
+
+
+
+ const downloadPDF = async () => {
+ try {
+ const formattedMatches = computedMatches.map(match => ({
+ score: match.match,
+ question1: {
+ question_text: getQuestion(match.qi).question_text,
+ instrument_name: getQuestion(match.qi).instrument.name
+ },
+ question2: {
+ question_text: getQuestion(match.mqi).question_text,
+ instrument_name: getQuestion(match.mqi).instrument.name
+ }
+ }));
+
+ const pdfExport = new HarmonyPDFExport();
+ const pdfBlob = await pdfExport.generateReport({
+ matches: formattedMatches,
+ instruments: apiData.instruments,
+ threshold: resultsOptions.threshold[0],
+ selectedMatches: computedMatches
+ .filter(m => m.selected)
+ .map(m => m.id)
+ });
+
+ const url = URL.createObjectURL(pdfBlob);
+ const link = document.createElement('a');
+ link.href = url;
+ link.download = 'harmony_matches.pdf';
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ URL.revokeObjectURL(url);
+
+ ReactGA?.event({
+ category: "Actions",
+ action: "Export PDF"
+ });
+
+ setTimeout(ratingToast, 1000);
+ } catch (error) {
+ console.error('Error generating PDF:', error);
+ toast.error('Failed to generate PDF report');
+ }
+ };
+
+
+
+
+
+
+
+
+
+ let theme = useMemo(
+ () =>
+ createTheme(deepmerge(getDesignTokens(mode), getThemedComponents(mode))),
+ [mode]
+ );
+
+ theme = responsiveFontSizes(theme);
+ return (
+ <ColorModeContext.Provider value={colorMode}>
+ <ThemeProvider theme={theme}>
+ <CssBaseline />
+ <Container
+ disableGutters={true}
+ //
+ sx={{
+ display: { lg: "flex", md: "block" },
+ flexDirection: useMediaQuery(theme.breakpoints.down("lg"))
+ ? "column"
+ : "row",
+ justifyContent: "center",
+ alignItems: "center",
+ height: "100vh",
+ width: "100%",
+ maxWidth: "100%!important",
+ }}
+ >
+ <ToastContainer theme={theme.palette.mode} />
+ <Router>
+ {/* Side bar for wide screens - narrow screens at top of screen and only on upload page*/}
+ <Box
+ sx={{
+ display: "flex",
+ boxSizing: "border-box",
+ width: { lg: "35%", md: "100%" },
+ minWidth: 300,
+ top: 0,
+ marginLeft: 0,
+ marginRight: "auto",
+ height: { lg: "100%", md: "unset" },
+ background: "linear-gradient(-135deg,#0de5b2, #2b45ed)",
+ backgroundImage: `linear-gradient(-135deg,#0de5b2DD, #2b45edAA), url(${pattern}), linear-gradient(-135deg,#0de5b2, #2b45ed)`,
+ backgroundSize: "cover",
+ backgroundRepeat: "no-repeat",
+ flexDirection: "column",
+ justifyContent: "space-between",
+ padding: "2rem",
+ color: "white",
+ }}
+ >
+ <Link href="#" sx={{ width: "80%", maxWidth: 700, mx: "auto" }}>
+ <img src={logoWithText} alt="Harmony Logo" />
+ </Link>
+
+ <Switch>
+ <Route path="/model/:stateHash?">
+ <ResultsOptions
+ resultsOptions={resultsOptions}
+ setResultsOptions={setResultsOptions}
+ makePublicShareLink={makePublicShareLink}
+ saveToMyHarmony={saveToMyHarmony}
+ downloadExcel={downloadExcel}
+ downloadPDF={downloadPDF}
+ toaster={toast}
+ ReactGA={ReactGA}
+ />
+ </Route>
+ <Route path="*">
+ <div>
+ <h1 style={{ color: "white" }}>
+ Harmonise questionnaire items
+ </h1>
+ <p>
+ Harmony is an AI tool which can read questionnaires and
+ find questions with similar meanings, such as{" "}
+ <i>anxiety</i> vs <i>I feel anxious</i>.
+ </p>
+ <p>
+ Psychologists sometimes need to combine survey results,
+ especially when surveys have been run by different
+ organisations or in different countries.
+ </p>
+ <p>
+ Try two example PDFs:{" "}
+ <a
+ target="gad7-pdf"
+ style={{ color: "white" }}
+ href="https://adaa.org/sites/default/files/GAD-7_Anxiety-updated_0.pdf"
+ >
+ GAD-7 PDF
+ </a>{" "}
+ vs{" "}
+ <a
+ target="phq-pdf"
+ style={{ color: "white" }}
+ href="https://www.apa.org/depression-guideline/patient-health-questionnaire.pdf"
+ >
+ PHQ-9 PDF
+ </a>
+ .
+ </p>
+ <p>
+ <a
+ style={{ color: "white" }}
+ href="https://harmonydata.ac.uk/frequently-asked-questions"
+ >
+ FAQs
+ </a>{" "}
+ -{" "}
+ <a
+ style={{ color: "white" }}
+ href="https://harmonydata.ac.uk/privacy-policy"
+ >
+ Privacy policy
+ </a>{" "}
+ -{" "}
+ <a
+ style={{ color: "white" }}
+ href="https://harmonydata.ac.uk/formatting-help/"
+ >
+ Help with formatting
+ </a>{" "}
+ -{" "}
+ <a
+ style={{ color: "white" }}
+ href="https://harmonydata.ac.uk/troubleshooting-harmony/"
+ >
+ Troubleshooting
+ </a>
+ </p>
+ </div>
+ <YouTube
+ className={"youtubeContainer" + (fullscreen ? "Full" : "")}
+ iframeClassName="youtubeIframe"
+ videoId="cEZppTBj1NI"
+ onPlay={() => setFullscreen(true)}
+ onPause={() => setFullscreen(false)}
+ />
+ </Route>
+ </Switch>
+ </Box>
+ <HarmonyAppBar></HarmonyAppBar>
+ <Slide in={true} direction="up">
+ <Box
+ sx={{
+ width: { lg: "65%", md: "100%" },
+ maxHeight: { lg: "100%" },
+ paddingTop: { lg: "4rem" },
+ overflow: "auto",
+ padding: useMediaQuery(theme.breakpoints.only("xs"))
+ ? "0.5rem"
+ : "2rem",
+ }}
+ >
+ <Switch>
+ {/* <Route path="/signup" component={Signup} /> */}
+ {/* <Route path="/forgot-password" component={ForgotPassword} /> */}
+ <Route path="/login">
+ <Login />
+ </Route>
+ <Route path="/model/:stateHash?">
+ <Results
+ fileInfos={fileInfos}
+ apiData={apiData}
+ setApiData={setApiData}
+ setResultsOptions={setResultsOptions}
+ resultsOptions={resultsOptions}
+ toaster={toast}
+ computedMatches={computedMatches}
+ setComputedMatches={setComputedMatches}
+ ReactGA={ReactGA}
+ />
+ </Route>
+ <Route path="/makeMeJSON">
+ <MakeMeJSON
+ appFileInfos={fileInfos}
+ setAppFileInfos={setFileInfos}
+ setApiData={setApiData}
+ existingInstruments={existingInstruments}
+ ReactGA={ReactGA}
+ />
+ </Route>
+ <Route path="/import/:importId">
+ <Upload
+ executeMatch={executeMatch}
+ appFileInfos={fileInfos}
+ setAppFileInfos={setFileInfos}
+ existingInstruments={existingInstruments}
+ ReactGA={ReactGA}
+ />
+ </Route>
+ <Route path="*">
+ <Upload
+ appFileInfos={fileInfos}
+ setAppFileInfos={setFileInfos}
+ executeMatch={executeMatch}
+ existingInstruments={existingInstruments}
+ ReactGA={ReactGA}
+ />
+ </Route>
+ </Switch>
+ </Box>
+ </Slide>
+ </Router>
+
+ <CookieConsent
+ acceptOnScroll={false}
+ location="bottom"
+ buttonText="That's fine"
+ cookieName="harmonyCookieConsent"
+ style={{ background: "#2B373B" }}
+ buttonStyle={{ color: "#4e503b", fontSize: "13px" }}
+ expires={150}
+ onAccept={() => {
+ ReactGA.initialize("G-S79J6E39ZP");
+ console.log("GA enabled");
+ }}
+ >
+ This website uses analytics cookies to allow us to improve the user
+ experience.{" "}
+ </CookieConsent>
+ </Container>
+ </ThemeProvider>
+ </ColorModeContext.Provider>
+ );
+}
+
+export default App;
+ |
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/coverage/lcov-report/ResultsOptions.js.html b/coverage/lcov-report/ResultsOptions.js.html
new file mode 100644
index 0000000..5990bce
--- /dev/null
+++ b/coverage/lcov-report/ResultsOptions.js.html
@@ -0,0 +1,727 @@
+
+
+
+
+
+ Code coverage report for ResultsOptions.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 50%
+ Statements
+ 16/32
+
+
+
+
+ 50%
+ Branches
+ 4/8
+
+
+
+
+ 40%
+ Functions
+ 4/10
+
+
+
+
+ 50%
+ Lines
+ 16/32
+
+
+
+
+
+ Press n or j to go to the next uncovered block, b, p or k for the previous block.
+
+
+
+ Filter:
+
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215 |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3x
+3x
+3x
+3x
+
+3x
+3x
+3x
+
+
+3x
+3x
+
+
+
+
+
+
+3x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2x
+2x
+2x
+
+
+
+
+2x
+
+1x
+1x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | import React, { useEffect, useMemo, useState } from "react";
+import {
+ Divider,
+ Card,
+ Slider,
+ Switch,
+ Typography,
+ Stack,
+ Button,
+ TextField,
+ InputAdornment,
+} from "@mui/material";
+import { ReactComponent as xlsxSVG } from "../img/file-excel-solid.svg";
+import { ReactComponent as pdfSVG } from "../img/pdf.svg";
+import DropdownShareButton from "./DropdownShareButton";
+import SvgIcon from "@mui/material/SvgIcon";
+import { useAuth } from "../contexts/AuthContext";
+import { useDebounce } from "react-use-custom-hooks";
+import PopperHelp from "./PopperHelp";
+
+export default function ResultsOptions({
+ resultsOptions,
+ setResultsOptions,
+ makePublicShareLink,
+ saveToMyHarmony,
+ downloadExcel,
+ downloadPDF,
+ ReactGA,
+ toaster,
+}) {
+ const [threshold, setThreshold] = useState(resultsOptions.threshold);
+ const { currentUser } = useAuth();
+ const [searchTerm, setSearchTerm] = useState("");
+ const debouncedSearchTerm = useDebounce(searchTerm, 500);
+
+ useEffect(() => {
+ setThreshold(resultsOptions.threshold);
+ setSearchTerm(resultsOptions.searchTerm);
+ }, [resultsOptions]);
+
+ useMemo(() => {
+ Iif (debouncedSearchTerm !== resultsOptions.searchTerm) {
+ let thisOptions = { ...resultsOptions };
+ thisOptions.searchTerm = debouncedSearchTerm;
+ setResultsOptions(thisOptions);
+ }
+ }, [debouncedSearchTerm, resultsOptions, setResultsOptions]);
+
+ return (
+ <Card
+ sx={{
+ display: "flex",
+ flexDirection: "column",
+ width: { xs: "100%", sm: "75%" },
+ margin: "auto",
+ padding: "1rem",
+ }}
+ >
+ <h2 style={{ marginTop: 0 }}>Options</h2>
+ <Stack>
+ <div>
+ <Typography id="Threshold">Match Threshold</Typography>
+ </div>
+ <Slider
+ value={threshold}
+ min={0}
+ valueLabelDisplay="auto"
+ onChange={(e, value) => {
+ setThreshold(value);
+ }}
+ onChangeCommitted={(e, value) => {
+ let thisOptions = { ...resultsOptions };
+ thisOptions.threshold = value;
+ setResultsOptions(thisOptions);
+ }}
+ />
+ <Divider sx={{ mt: 1, mb: 1 }} />
+ <TextField
+ sx={{ mt: 1, mb: 1 }}
+ id="outlined-basic"
+ label="Search"
+ autoComplete="off"
+ inputProps={{
+ autoComplete: "off",
+ }}
+ onChange={(e) => {
+ setSearchTerm(e.target.value);
+ }}
+ value={searchTerm}
+ variant="outlined"
+ InputProps={{
+ endAdornment: (
+ <InputAdornment position="end">
+ <PopperHelp>
+ <Typography>
+ This supports Lucene-like queries. So you can use wildcards,
+ logical operators, parentheses, and negation to create
+ precise and complex searches. You can also search within
+ specific data fields (instrument, question, or topic) e.g.
+ <br />
+ <br />
+ <b>instrument:RCAD and instrument:GAD</b>
+ <br />
+ <br />
+ which will show matches in your results between these two
+ instruments only.
+ </Typography>
+ </PopperHelp>
+ </InputAdornment>
+ ),
+ }}
+ />
+ <Divider sx={{ mt: 1, mb: 1 }} />
+ <Stack
+ direction="row"
+ sx={{
+ width: "100%",
+ alignItems: "center",
+ justifyContent: "space-between",
+ }}
+ >
+ <Typography id="withinInstruments">
+ Show within-instrument matches
+ </Typography>
+ <Switch
+ checked={resultsOptions.intraInstrument}
+ onChange={(event) => {
+ let thisOptions = { ...resultsOptions };
+ thisOptions.intraInstrument = event.target.checked;
+ setResultsOptions(thisOptions);
+ }}
+ />
+ </Stack>
+ <Stack
+ direction="row"
+ sx={{
+ width: "100%",
+ alignItems: "center",
+ justifyContent: "space-between",
+ }}
+ >
+ <Typography id="withinInstruments">Just selected matches</Typography>
+ <Switch
+ checked={resultsOptions.onlySelected}
+ onChange={(event) => {
+ let thisOptions = { ...resultsOptions };
+ thisOptions.onlySelected = event.target.checked;
+ setResultsOptions(thisOptions);
+ }}
+ />
+ </Stack>
+ <Divider sx={{ mt: 1, mb: 1 }} />
+ <Stack
+ direction="row"
+ sx={{
+ width: "100%",
+ alignItems: "center",
+ justifyContent: "space-around",
+ }}
+ >
+ {currentUser && (
+ <DropdownShareButton
+ getShareLink={makePublicShareLink}
+ ReactGA={ReactGA}
+ />
+ )}
+ <Button
+ variant="contained"
+ onClick={() => {
+ ReactGA &&
+ ReactGA.event({
+ category: "Actions",
+ action: "Export Matches",
+ });
+ downloadExcel();
+ }}
+ >
+ <SvgIcon component={xlsxSVG} inheritViewBox />
+ <Typography> Excel Export</Typography>
+ </Button>
+
+ <Button
+ variant="contained"
+ onClick={async () => {
+ console.log('PDF Export Button Clicked');
+ try {
+ ReactGA &&
+ ReactGA.event({
+ category: "Actions",
+ action: "Export PDF",
+ });
+ await downloadPDF(resultsOptions.threshold);
+ } catch (error) {
+ console.error('PDF Export Failed:', error);
+ toaster.error('Failed to generate PDF report');
+ }
+ }}
+ >
+ <SvgIcon component={pdfSVG} inheritViewBox />
+ <Typography>PDF Export</Typography>
+ </Button>
+
+
+
+
+
+
+
+
+ </Stack>
+ </Stack>
+ </Card>
+ );
+}
+ |
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/coverage/lcov-report/base.css b/coverage/lcov-report/base.css
new file mode 100644
index 0000000..f418035
--- /dev/null
+++ b/coverage/lcov-report/base.css
@@ -0,0 +1,224 @@
+body, html {
+ margin:0; padding: 0;
+ height: 100%;
+}
+body {
+ font-family: Helvetica Neue, Helvetica, Arial;
+ font-size: 14px;
+ color:#333;
+}
+.small { font-size: 12px; }
+*, *:after, *:before {
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ box-sizing:border-box;
+ }
+h1 { font-size: 20px; margin: 0;}
+h2 { font-size: 14px; }
+pre {
+ font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ margin: 0;
+ padding: 0;
+ -moz-tab-size: 2;
+ -o-tab-size: 2;
+ tab-size: 2;
+}
+a { color:#0074D9; text-decoration:none; }
+a:hover { text-decoration:underline; }
+.strong { font-weight: bold; }
+.space-top1 { padding: 10px 0 0 0; }
+.pad2y { padding: 20px 0; }
+.pad1y { padding: 10px 0; }
+.pad2x { padding: 0 20px; }
+.pad2 { padding: 20px; }
+.pad1 { padding: 10px; }
+.space-left2 { padding-left:55px; }
+.space-right2 { padding-right:20px; }
+.center { text-align:center; }
+.clearfix { display:block; }
+.clearfix:after {
+ content:'';
+ display:block;
+ height:0;
+ clear:both;
+ visibility:hidden;
+ }
+.fl { float: left; }
+@media only screen and (max-width:640px) {
+ .col3 { width:100%; max-width:100%; }
+ .hide-mobile { display:none!important; }
+}
+
+.quiet {
+ color: #7f7f7f;
+ color: rgba(0,0,0,0.5);
+}
+.quiet a { opacity: 0.7; }
+
+.fraction {
+ font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
+ font-size: 10px;
+ color: #555;
+ background: #E8E8E8;
+ padding: 4px 5px;
+ border-radius: 3px;
+ vertical-align: middle;
+}
+
+div.path a:link, div.path a:visited { color: #333; }
+table.coverage {
+ border-collapse: collapse;
+ margin: 10px 0 0 0;
+ padding: 0;
+}
+
+table.coverage td {
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+}
+table.coverage td.line-count {
+ text-align: right;
+ padding: 0 5px 0 20px;
+}
+table.coverage td.line-coverage {
+ text-align: right;
+ padding-right: 10px;
+ min-width:20px;
+}
+
+table.coverage td span.cline-any {
+ display: inline-block;
+ padding: 0 5px;
+ width: 100%;
+}
+.missing-if-branch {
+ display: inline-block;
+ margin-right: 5px;
+ border-radius: 3px;
+ position: relative;
+ padding: 0 4px;
+ background: #333;
+ color: yellow;
+}
+
+.skip-if-branch {
+ display: none;
+ margin-right: 10px;
+ position: relative;
+ padding: 0 4px;
+ background: #ccc;
+ color: white;
+}
+.missing-if-branch .typ, .skip-if-branch .typ {
+ color: inherit !important;
+}
+.coverage-summary {
+ border-collapse: collapse;
+ width: 100%;
+}
+.coverage-summary tr { border-bottom: 1px solid #bbb; }
+.keyline-all { border: 1px solid #ddd; }
+.coverage-summary td, .coverage-summary th { padding: 10px; }
+.coverage-summary tbody { border: 1px solid #bbb; }
+.coverage-summary td { border-right: 1px solid #bbb; }
+.coverage-summary td:last-child { border-right: none; }
+.coverage-summary th {
+ text-align: left;
+ font-weight: normal;
+ white-space: nowrap;
+}
+.coverage-summary th.file { border-right: none !important; }
+.coverage-summary th.pct { }
+.coverage-summary th.pic,
+.coverage-summary th.abs,
+.coverage-summary td.pct,
+.coverage-summary td.abs { text-align: right; }
+.coverage-summary td.file { white-space: nowrap; }
+.coverage-summary td.pic { min-width: 120px !important; }
+.coverage-summary tfoot td { }
+
+.coverage-summary .sorter {
+ height: 10px;
+ width: 7px;
+ display: inline-block;
+ margin-left: 0.5em;
+ background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
+}
+.coverage-summary .sorted .sorter {
+ background-position: 0 -20px;
+}
+.coverage-summary .sorted-desc .sorter {
+ background-position: 0 -10px;
+}
+.status-line { height: 10px; }
+/* yellow */
+.cbranch-no { background: yellow !important; color: #111; }
+/* dark red */
+.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
+.low .chart { border:1px solid #C21F39 }
+.highlighted,
+.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
+ background: #C21F39 !important;
+}
+/* medium red */
+.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
+/* light red */
+.low, .cline-no { background:#FCE1E5 }
+/* light green */
+.high, .cline-yes { background:rgb(230,245,208) }
+/* medium green */
+.cstat-yes { background:rgb(161,215,106) }
+/* dark green */
+.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
+.high .chart { border:1px solid rgb(77,146,33) }
+/* dark yellow (gold) */
+.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
+.medium .chart { border:1px solid #f9cd0b; }
+/* light yellow */
+.medium { background: #fff4c2; }
+
+.cstat-skip { background: #ddd; color: #111; }
+.fstat-skip { background: #ddd; color: #111 !important; }
+.cbranch-skip { background: #ddd !important; color: #111; }
+
+span.cline-neutral { background: #eaeaea; }
+
+.coverage-summary td.empty {
+ opacity: .5;
+ padding-top: 4px;
+ padding-bottom: 4px;
+ line-height: 1;
+ color: #888;
+}
+
+.cover-fill, .cover-empty {
+ display:inline-block;
+ height: 12px;
+}
+.chart {
+ line-height: 0;
+}
+.cover-empty {
+ background: white;
+}
+.cover-full {
+ border-right: none !important;
+}
+pre.prettyprint {
+ border: none !important;
+ padding: 0 !important;
+ margin: 0 !important;
+}
+.com { color: #999 !important; }
+.ignore-none { color: #999; font-weight: normal; }
+
+.wrapper {
+ min-height: 100%;
+ height: auto !important;
+ height: 100%;
+ margin: 0 auto -48px;
+}
+.footer, .push {
+ height: 48px;
+}
diff --git a/coverage/lcov-report/block-navigation.js b/coverage/lcov-report/block-navigation.js
new file mode 100644
index 0000000..cc12130
--- /dev/null
+++ b/coverage/lcov-report/block-navigation.js
@@ -0,0 +1,87 @@
+/* eslint-disable */
+var jumpToCode = (function init() {
+ // Classes of code we would like to highlight in the file view
+ var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
+
+ // Elements to highlight in the file listing view
+ var fileListingElements = ['td.pct.low'];
+
+ // We don't want to select elements that are direct descendants of another match
+ var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
+
+ // Selecter that finds elements on the page to which we can jump
+ var selector =
+ fileListingElements.join(', ') +
+ ', ' +
+ notSelector +
+ missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
+
+ // The NodeList of matching elements
+ var missingCoverageElements = document.querySelectorAll(selector);
+
+ var currentIndex;
+
+ function toggleClass(index) {
+ missingCoverageElements
+ .item(currentIndex)
+ .classList.remove('highlighted');
+ missingCoverageElements.item(index).classList.add('highlighted');
+ }
+
+ function makeCurrent(index) {
+ toggleClass(index);
+ currentIndex = index;
+ missingCoverageElements.item(index).scrollIntoView({
+ behavior: 'smooth',
+ block: 'center',
+ inline: 'center'
+ });
+ }
+
+ function goToPrevious() {
+ var nextIndex = 0;
+ if (typeof currentIndex !== 'number' || currentIndex === 0) {
+ nextIndex = missingCoverageElements.length - 1;
+ } else if (missingCoverageElements.length > 1) {
+ nextIndex = currentIndex - 1;
+ }
+
+ makeCurrent(nextIndex);
+ }
+
+ function goToNext() {
+ var nextIndex = 0;
+
+ if (
+ typeof currentIndex === 'number' &&
+ currentIndex < missingCoverageElements.length - 1
+ ) {
+ nextIndex = currentIndex + 1;
+ }
+
+ makeCurrent(nextIndex);
+ }
+
+ return function jump(event) {
+ if (
+ document.getElementById('fileSearch') === document.activeElement &&
+ document.activeElement != null
+ ) {
+ // if we're currently focused on the search input, we don't want to navigate
+ return;
+ }
+
+ switch (event.which) {
+ case 78: // n
+ case 74: // j
+ goToNext();
+ break;
+ case 66: // b
+ case 75: // k
+ case 80: // p
+ goToPrevious();
+ break;
+ }
+ };
+})();
+window.addEventListener('keydown', jumpToCode);
diff --git a/coverage/lcov-report/components/App.js.html b/coverage/lcov-report/components/App.js.html
new file mode 100644
index 0000000..1dc44aa
--- /dev/null
+++ b/coverage/lcov-report/components/App.js.html
@@ -0,0 +1,1855 @@
+
+
+
+
+
+ Code coverage report for components/App.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0%
+ Statements
+ 0/151
+
+
+
+
+ 0%
+ Branches
+ 0/48
+
+
+
+
+ 0%
+ Functions
+ 0/46
+
+
+
+
+ 0%
+ Lines
+ 0/149
+
+
+
+
+
+ Press n or j to go to the next uncovered block, b, p or k for the previous block.
+
+
+
+ Filter:
+
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591 |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | import React, { useState, useEffect, useMemo, useCallback } from "react";
+import {
+ Container,
+ Box,
+ Slide,
+ useMediaQuery,
+ Link,
+ Typography,
+ Rating,
+} from "@mui/material";
+import { HashRouter as Router, Switch, Route } from "react-router-dom";
+import Upload from "./Upload";
+import Results from "./Results";
+import Login from "./Login";
+import CssBaseline from "@mui/material/CssBaseline";
+import { getDesignTokens, getThemedComponents } from "../conf/theme.ts";
+import {
+ createTheme,
+ ThemeProvider,
+ responsiveFontSizes,
+} from "@mui/material/styles";
+import { simplifyApi } from "../utilities/simplifyApi";
+import HarmonyAppBar from "./AppBar";
+import pattern from "../img/pattern.svg";
+import logoWithText from "../img/Logo-04-min.svg";
+import ResultsOptions from "./ResultsOptions";
+import { deepmerge } from "@mui/utils";
+import { ColorModeContext } from "../contexts/ColorModeContext";
+import { useData } from "../contexts/DataContext";
+import { utils as XLSXutils, writeFile as XLSXwriteFile } from "xlsx";
+import ReactGA from "react-ga4";
+import CookieConsent, { getCookieConsentValue } from "react-cookie-consent";
+import { ToastContainer, toast } from "react-toastify";
+import MakeMeJSON from "./MakeMeJSON.js";
+import "react-toastify/dist/ReactToastify.css";
+import YouTube from "react-youtube";
+import "../css/youtube.css";
+import { useHistory } from "react-router-dom";
+import HarmonyPDFExport from './HarmonyPDFExport';
+
+function App() {
+ const history = useHistory();
+ const [fullscreen, setFullscreen] = useState(false);
+ const [existingInstruments, setExistingInstruments] = useState([]);
+ const [apiData, setApiData] = useState({});
+ const [resultsOptions, setResultsOptions] = useState({
+ threshold: [70, 100],
+ searchTerm: "",
+ intraInstrument: false,
+ });
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
+ const [mode, setMode] = useState();
+ const {
+ storeHarmonisation,
+ reportRating,
+ exampleInstruments,
+ match,
+ currentModel,
+ } = useData();
+ const [ratingValue, setRatingValue] = useState();
+ const [computedMatches, setComputedMatches] = useState();
+ const [fileInfos, setFileInfos] = useState();
+ useEffect(() => {
+ setMode(prefersDarkMode ? "dark" : "light");
+ }, [prefersDarkMode]);
+
+ useEffect(() => {
+ const handleBeforeUnload = (event) => {
+ // stash the current fileInfos to sessionStorage so they can be retreived in the case of handling an import link
+ if (fileInfos.length)
+ sessionStorage["harmonyStashed"] = JSON.stringify(fileInfos);
+ };
+ window.addEventListener("beforeunload", handleBeforeUnload);
+ return () => {
+ window.removeEventListener("beforeunload", handleBeforeUnload);
+ };
+ }, [fileInfos]);
+
+ useEffect(() => {
+ if (
+ sessionStorage["harmonyStashed"] &&
+ sessionStorage["harmonyStashed"] !== "undefined"
+ )
+ setFileInfos(JSON.parse(sessionStorage["harmonyStashed"]));
+ }, []);
+
+ useEffect(() => {
+ //default to intraInstrument ON in the case of just one instument in the model
+ if (
+ fileInfos &&
+ fileInfos.length === 1 &&
+ resultsOptions.intraInstrument === false
+ ) {
+ let newResultsOptions = { ...resultsOptions };
+ newResultsOptions.intraInstrument = true;
+ newResultsOptions.intraInstrumentPreviousState =
+ resultsOptions.intraInstrument;
+ setResultsOptions(newResultsOptions);
+ }
+
+ // If there is now more than 1 switch it back to what it was before we forced it.
+ if (
+ fileInfos &&
+ fileInfos.length > 1 &&
+ typeof resultsOptions.intraInstrumentPreviousState == "boolean"
+ ) {
+ let newResultsOptions = { ...resultsOptions };
+ newResultsOptions.intraInstrument =
+ newResultsOptions.intraInstrumentPreviousState;
+ delete newResultsOptions.intraInstrumentPreviousState;
+ setResultsOptions(newResultsOptions);
+ }
+ }, [fileInfos, resultsOptions]);
+
+ useEffect(() => {
+ if (getCookieConsentValue("harmonyCookieConsent")) {
+ ReactGA.initialize("G-S79J6E39ZP");
+ console.log("GA enabled");
+ }
+ exampleInstruments()
+ .then((data) => {
+ setExistingInstruments(data);
+ console.log(data);
+ })
+ .catch((e) => {
+ console.log(e);
+ });
+ }, [exampleInstruments]);
+
+ const colorMode = useMemo(
+ () => ({
+ toggleColorMode: () => {
+ setMode((prevMode) => (prevMode === "light" ? "dark" : "light"));
+ },
+ }),
+ []
+ );
+
+ const getQuestion = (qidx) => {
+ return apiData.instruments
+ .map((i) => {
+ return i.questions;
+ })
+ .flat()
+ .filter((q) => {
+ return q.question_index === qidx;
+ })[0];
+ };
+
+ const executeMatch = useCallback(
+ (forceModel) => {
+ if (fileInfos)
+ return match(fileInfos, forceModel).then((data) => {
+ let simpleApi = simplifyApi(data, fileInfos);
+ setApiData(simpleApi);
+ });
+ },
+ [history, fileInfos]
+ );
+
+ useEffect(() => {
+ if (window.location.href.includes("/model")) {
+ executeMatch(currentModel);
+ }
+ }, [currentModel, executeMatch]);
+
+ const makePublicShareLink = () => {
+ let h = {};
+ h.apiData = apiData;
+ h.resultsOptions = resultsOptions;
+ h.public = true;
+ return new Promise((resolve, reject) => {
+ storeHarmonisation(h)
+ .then((doc) => {
+ console.log(doc);
+ resolve(window.location.origin + "/app/#/model/" + doc.id);
+ })
+ .catch((e) => {
+ console.log(e);
+ reject("Could not create share link");
+ });
+ });
+ };
+
+ const ratingToast = () => {
+ if (
+ !document.cookie
+ .split("; ")
+ .find((row) => row.startsWith("harmonyHasRated"))
+ ) {
+ toast(
+ <Box>
+ <Typography component="legend">Are you enjoying Harmony?</Typography>
+ <Box>
+ <Rating
+ name="simple-controlled"
+ value={ratingValue}
+ onChange={(event, newValue) => {
+ console.log(newValue);
+ setRatingValue(newValue);
+ reportRating(newValue);
+ document.cookie =
+ "harmonyHasRated=true; expires=Fri, 31 Dec 9999 23:59:59 GMT; SameSite=None; Secure";
+ ReactGA &&
+ ReactGA.event({
+ category: "Actions",
+ action: "Rating",
+ value: Number(newValue),
+ });
+ }}
+ />
+ </Box>
+ </Box>,
+ {
+ autoClose: false,
+ }
+ );
+ }
+ };
+
+ const saveToMyHarmony = () => {
+ setTimeout(ratingToast, 1000);
+ let h = {};
+ h.apiData = JSON.parse(JSON.stringify(apiData));
+ h.resultsOptions = resultsOptions;
+ h.public = false;
+ h.created = new Date();
+ return new Promise((resolve, reject) => {
+ storeHarmonisation(h)
+ .then((docRef) => {
+ resolve(window.location.origin + "/#/match/" + docRef);
+ })
+ .catch((e) => {
+ console.log(e);
+ reject("Could not create share link");
+ });
+ });
+ };
+
+ const downloadExcel = () => {
+ setTimeout(ratingToast, 1000);
+
+ const matchSheet = computedMatches
+ .reduce(function (a, cm, i) {
+ let q = getQuestion(cm.qi);
+ let mq = getQuestion(cm.mqi);
+ a.push({
+ instrument1: q.instrument.name,
+ question1_no: q.question_no,
+ question1_text: q.question_text,
+ question1_topics:
+ Array.isArray(q.topics_strengths) && q.topics_strengths.join(", "),
+ instrument2: mq.instrument.name,
+ question2_no: mq.question_no,
+ question2_text: mq.question_text,
+ question2_topics:
+ Array.isArray(mq.topics_strengths) &&
+ mq.topics_strengths.join(", "),
+ match: cm.match,
+ });
+ return a;
+ }, [])
+ .flat()
+ .sort((a, b) => {
+ if (Math.abs(a.match) < Math.abs(b.match)) {
+ return 1;
+ }
+ if (Math.abs(a.match) > Math.abs(b.match)) {
+ return -1;
+ }
+ return 0;
+ });
+ const allQs = apiData.instruments
+ .map((i) => {
+ return i.questions;
+ })
+ .flat()
+ .sort((a, b) => {
+ if (a.question_index > b.question_index) {
+ return 1;
+ }
+ if (a.question_index < b.question_index) {
+ return -1;
+ }
+ return 0;
+ });
+
+ const headers = allQs.map((q) => {
+ return q.instrument.name + " " + q.question_no;
+ });
+ const subheaders = allQs.map((q) => {
+ return q.question_text;
+ });
+
+ const matrixSheet = allQs.map((q, i) => {
+ return Array(i + 1).concat(q.matches);
+ });
+ matrixSheet.unshift(subheaders);
+ matrixSheet.unshift(headers);
+
+ const matches = XLSXutils.json_to_sheet(matchSheet);
+ const matrix = XLSXutils.aoa_to_sheet(matrixSheet);
+ const workbook = XLSXutils.book_new();
+ XLSXutils.book_append_sheet(workbook, matches, "Matches");
+ XLSXutils.book_append_sheet(workbook, matrix, "Matrix");
+ XLSXwriteFile(workbook, "Harmony.xlsx");
+ };
+
+
+
+ const downloadPDF = async () => {
+ try {
+ const formattedMatches = computedMatches.map(match => ({
+ score: match.match,
+ question1: {
+ question_text: getQuestion(match.qi).question_text,
+ instrument_name: getQuestion(match.qi).instrument.name
+ },
+ question2: {
+ question_text: getQuestion(match.mqi).question_text,
+ instrument_name: getQuestion(match.mqi).instrument.name
+ }
+ }));
+
+ const pdfExport = new HarmonyPDFExport();
+ const pdfBlob = await pdfExport.generateReport({
+ matches: formattedMatches,
+ instruments: apiData.instruments,
+ threshold: resultsOptions.threshold[0],
+ selectedMatches: computedMatches
+ .filter(m => m.selected)
+ .map(m => m.id)
+ });
+
+ const url = URL.createObjectURL(pdfBlob);
+ const link = document.createElement('a');
+ link.href = url;
+ link.download = 'harmony_matches.pdf';
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ URL.revokeObjectURL(url);
+
+ ReactGA?.event({
+ category: "Actions",
+ action: "Export PDF"
+ });
+
+ setTimeout(ratingToast, 1000);
+ } catch (error) {
+ console.error('Error generating PDF:', error);
+ toast.error('Failed to generate PDF report');
+ }
+ };
+
+
+
+
+
+
+
+
+
+ let theme = useMemo(
+ () =>
+ createTheme(deepmerge(getDesignTokens(mode), getThemedComponents(mode))),
+ [mode]
+ );
+
+ theme = responsiveFontSizes(theme);
+ return (
+ <ColorModeContext.Provider value={colorMode}>
+ <ThemeProvider theme={theme}>
+ <CssBaseline />
+ <Container
+ disableGutters={true}
+ //
+ sx={{
+ display: { lg: "flex", md: "block" },
+ flexDirection: useMediaQuery(theme.breakpoints.down("lg"))
+ ? "column"
+ : "row",
+ justifyContent: "center",
+ alignItems: "center",
+ height: "100vh",
+ width: "100%",
+ maxWidth: "100%!important",
+ }}
+ >
+ <ToastContainer theme={theme.palette.mode} />
+ <Router>
+ {/* Side bar for wide screens - narrow screens at top of screen and only on upload page*/}
+ <Box
+ sx={{
+ display: "flex",
+ boxSizing: "border-box",
+ width: { lg: "35%", md: "100%" },
+ minWidth: 300,
+ top: 0,
+ marginLeft: 0,
+ marginRight: "auto",
+ height: { lg: "100%", md: "unset" },
+ background: "linear-gradient(-135deg,#0de5b2, #2b45ed)",
+ backgroundImage: `linear-gradient(-135deg,#0de5b2DD, #2b45edAA), url(${pattern}), linear-gradient(-135deg,#0de5b2, #2b45ed)`,
+ backgroundSize: "cover",
+ backgroundRepeat: "no-repeat",
+ flexDirection: "column",
+ justifyContent: "space-between",
+ padding: "2rem",
+ color: "white",
+ }}
+ >
+ <Link href="#" sx={{ width: "80%", maxWidth: 700, mx: "auto" }}>
+ <img src={logoWithText} alt="Harmony Logo" />
+ </Link>
+
+ <Switch>
+ <Route path="/model/:stateHash?">
+ <ResultsOptions
+ resultsOptions={resultsOptions}
+ setResultsOptions={setResultsOptions}
+ makePublicShareLink={makePublicShareLink}
+ saveToMyHarmony={saveToMyHarmony}
+ downloadExcel={downloadExcel}
+ downloadPDF={downloadPDF}
+ toaster={toast}
+ ReactGA={ReactGA}
+ />
+ </Route>
+ <Route path="*">
+ <div>
+ <h1 style={{ color: "white" }}>
+ Harmonise questionnaire items
+ </h1>
+ <p>
+ Harmony is an AI tool which can read questionnaires and
+ find questions with similar meanings, such as{" "}
+ <i>anxiety</i> vs <i>I feel anxious</i>.
+ </p>
+ <p>
+ Psychologists sometimes need to combine survey results,
+ especially when surveys have been run by different
+ organisations or in different countries.
+ </p>
+ <p>
+ Try two example PDFs:{" "}
+ <a
+ target="gad7-pdf"
+ style={{ color: "white" }}
+ href="https://adaa.org/sites/default/files/GAD-7_Anxiety-updated_0.pdf"
+ >
+ GAD-7 PDF
+ </a>{" "}
+ vs{" "}
+ <a
+ target="phq-pdf"
+ style={{ color: "white" }}
+ href="https://www.apa.org/depression-guideline/patient-health-questionnaire.pdf"
+ >
+ PHQ-9 PDF
+ </a>
+ .
+ </p>
+ <p>
+ <a
+ style={{ color: "white" }}
+ href="https://harmonydata.ac.uk/frequently-asked-questions"
+ >
+ FAQs
+ </a>{" "}
+ -{" "}
+ <a
+ style={{ color: "white" }}
+ href="https://harmonydata.ac.uk/privacy-policy"
+ >
+ Privacy policy
+ </a>{" "}
+ -{" "}
+ <a
+ style={{ color: "white" }}
+ href="https://harmonydata.ac.uk/formatting-help/"
+ >
+ Help with formatting
+ </a>{" "}
+ -{" "}
+ <a
+ style={{ color: "white" }}
+ href="https://harmonydata.ac.uk/troubleshooting-harmony/"
+ >
+ Troubleshooting
+ </a>
+ </p>
+ </div>
+ <YouTube
+ className={"youtubeContainer" + (fullscreen ? "Full" : "")}
+ iframeClassName="youtubeIframe"
+ videoId="cEZppTBj1NI"
+ onPlay={() => setFullscreen(true)}
+ onPause={() => setFullscreen(false)}
+ />
+ </Route>
+ </Switch>
+ </Box>
+ <HarmonyAppBar></HarmonyAppBar>
+ <Slide in={true} direction="up">
+ <Box
+ sx={{
+ width: { lg: "65%", md: "100%" },
+ maxHeight: { lg: "100%" },
+ paddingTop: { lg: "4rem" },
+ overflow: "auto",
+ padding: useMediaQuery(theme.breakpoints.only("xs"))
+ ? "0.5rem"
+ : "2rem",
+ }}
+ >
+ <Switch>
+ {/* <Route path="/signup" component={Signup} /> */}
+ {/* <Route path="/forgot-password" component={ForgotPassword} /> */}
+ <Route path="/login">
+ <Login />
+ </Route>
+ <Route path="/model/:stateHash?">
+ <Results
+ fileInfos={fileInfos}
+ apiData={apiData}
+ setApiData={setApiData}
+ setResultsOptions={setResultsOptions}
+ resultsOptions={resultsOptions}
+ toaster={toast}
+ computedMatches={computedMatches}
+ setComputedMatches={setComputedMatches}
+ ReactGA={ReactGA}
+ />
+ </Route>
+ <Route path="/makeMeJSON">
+ <MakeMeJSON
+ appFileInfos={fileInfos}
+ setAppFileInfos={setFileInfos}
+ setApiData={setApiData}
+ existingInstruments={existingInstruments}
+ ReactGA={ReactGA}
+ />
+ </Route>
+ <Route path="/import/:importId">
+ <Upload
+ executeMatch={executeMatch}
+ appFileInfos={fileInfos}
+ setAppFileInfos={setFileInfos}
+ existingInstruments={existingInstruments}
+ ReactGA={ReactGA}
+ />
+ </Route>
+ <Route path="*">
+ <Upload
+ appFileInfos={fileInfos}
+ setAppFileInfos={setFileInfos}
+ executeMatch={executeMatch}
+ existingInstruments={existingInstruments}
+ ReactGA={ReactGA}
+ />
+ </Route>
+ </Switch>
+ </Box>
+ </Slide>
+ </Router>
+
+ <CookieConsent
+ acceptOnScroll={false}
+ location="bottom"
+ buttonText="That's fine"
+ cookieName="harmonyCookieConsent"
+ style={{ background: "#2B373B" }}
+ buttonStyle={{ color: "#4e503b", fontSize: "13px" }}
+ expires={150}
+ onAccept={() => {
+ ReactGA.initialize("G-S79J6E39ZP");
+ console.log("GA enabled");
+ }}
+ >
+ This website uses analytics cookies to allow us to improve the user
+ experience.{" "}
+ </CookieConsent>
+ </Container>
+ </ThemeProvider>
+ </ColorModeContext.Provider>
+ );
+}
+
+export default App;
+ |
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/coverage/lcov-report/components/ResultsOptions.js.html b/coverage/lcov-report/components/ResultsOptions.js.html
new file mode 100644
index 0000000..0f8c6c8
--- /dev/null
+++ b/coverage/lcov-report/components/ResultsOptions.js.html
@@ -0,0 +1,727 @@
+
+
+
+
+
+ Code coverage report for components/ResultsOptions.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 50%
+ Statements
+ 16/32
+
+
+
+
+ 50%
+ Branches
+ 4/8
+
+
+
+
+ 40%
+ Functions
+ 4/10
+
+
+
+
+ 50%
+ Lines
+ 16/32
+
+
+
+
+
+ Press n or j to go to the next uncovered block, b, p or k for the previous block.
+
+
+
+ Filter:
+
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215 |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3x
+3x
+3x
+3x
+
+3x
+3x
+3x
+
+
+3x
+3x
+
+
+
+
+
+
+3x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2x
+2x
+2x
+
+
+
+
+2x
+
+1x
+1x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | import React, { useEffect, useMemo, useState } from "react";
+import {
+ Divider,
+ Card,
+ Slider,
+ Switch,
+ Typography,
+ Stack,
+ Button,
+ TextField,
+ InputAdornment,
+} from "@mui/material";
+import { ReactComponent as xlsxSVG } from "../img/file-excel-solid.svg";
+import { ReactComponent as pdfSVG } from "../img/pdf.svg";
+import DropdownShareButton from "./DropdownShareButton";
+import SvgIcon from "@mui/material/SvgIcon";
+import { useAuth } from "../contexts/AuthContext";
+import { useDebounce } from "react-use-custom-hooks";
+import PopperHelp from "./PopperHelp";
+
+export default function ResultsOptions({
+ resultsOptions,
+ setResultsOptions,
+ makePublicShareLink,
+ saveToMyHarmony,
+ downloadExcel,
+ downloadPDF,
+ ReactGA,
+ toaster,
+}) {
+ const [threshold, setThreshold] = useState(resultsOptions.threshold);
+ const { currentUser } = useAuth();
+ const [searchTerm, setSearchTerm] = useState("");
+ const debouncedSearchTerm = useDebounce(searchTerm, 500);
+
+ useEffect(() => {
+ setThreshold(resultsOptions.threshold);
+ setSearchTerm(resultsOptions.searchTerm);
+ }, [resultsOptions]);
+
+ useMemo(() => {
+ Iif (debouncedSearchTerm !== resultsOptions.searchTerm) {
+ let thisOptions = { ...resultsOptions };
+ thisOptions.searchTerm = debouncedSearchTerm;
+ setResultsOptions(thisOptions);
+ }
+ }, [debouncedSearchTerm, resultsOptions, setResultsOptions]);
+
+ return (
+ <Card
+ sx={{
+ display: "flex",
+ flexDirection: "column",
+ width: { xs: "100%", sm: "75%" },
+ margin: "auto",
+ padding: "1rem",
+ }}
+ >
+ <h2 style={{ marginTop: 0 }}>Options</h2>
+ <Stack>
+ <div>
+ <Typography id="Threshold">Match Threshold</Typography>
+ </div>
+ <Slider
+ value={threshold}
+ min={0}
+ valueLabelDisplay="auto"
+ onChange={(e, value) => {
+ setThreshold(value);
+ }}
+ onChangeCommitted={(e, value) => {
+ let thisOptions = { ...resultsOptions };
+ thisOptions.threshold = value;
+ setResultsOptions(thisOptions);
+ }}
+ />
+ <Divider sx={{ mt: 1, mb: 1 }} />
+ <TextField
+ sx={{ mt: 1, mb: 1 }}
+ id="outlined-basic"
+ label="Search"
+ autoComplete="off"
+ inputProps={{
+ autoComplete: "off",
+ }}
+ onChange={(e) => {
+ setSearchTerm(e.target.value);
+ }}
+ value={searchTerm}
+ variant="outlined"
+ InputProps={{
+ endAdornment: (
+ <InputAdornment position="end">
+ <PopperHelp>
+ <Typography>
+ This supports Lucene-like queries. So you can use wildcards,
+ logical operators, parentheses, and negation to create
+ precise and complex searches. You can also search within
+ specific data fields (instrument, question, or topic) e.g.
+ <br />
+ <br />
+ <b>instrument:RCAD and instrument:GAD</b>
+ <br />
+ <br />
+ which will show matches in your results between these two
+ instruments only.
+ </Typography>
+ </PopperHelp>
+ </InputAdornment>
+ ),
+ }}
+ />
+ <Divider sx={{ mt: 1, mb: 1 }} />
+ <Stack
+ direction="row"
+ sx={{
+ width: "100%",
+ alignItems: "center",
+ justifyContent: "space-between",
+ }}
+ >
+ <Typography id="withinInstruments">
+ Show within-instrument matches
+ </Typography>
+ <Switch
+ checked={resultsOptions.intraInstrument}
+ onChange={(event) => {
+ let thisOptions = { ...resultsOptions };
+ thisOptions.intraInstrument = event.target.checked;
+ setResultsOptions(thisOptions);
+ }}
+ />
+ </Stack>
+ <Stack
+ direction="row"
+ sx={{
+ width: "100%",
+ alignItems: "center",
+ justifyContent: "space-between",
+ }}
+ >
+ <Typography id="withinInstruments">Just selected matches</Typography>
+ <Switch
+ checked={resultsOptions.onlySelected}
+ onChange={(event) => {
+ let thisOptions = { ...resultsOptions };
+ thisOptions.onlySelected = event.target.checked;
+ setResultsOptions(thisOptions);
+ }}
+ />
+ </Stack>
+ <Divider sx={{ mt: 1, mb: 1 }} />
+ <Stack
+ direction="row"
+ sx={{
+ width: "100%",
+ alignItems: "center",
+ justifyContent: "space-around",
+ }}
+ >
+ {currentUser && (
+ <DropdownShareButton
+ getShareLink={makePublicShareLink}
+ ReactGA={ReactGA}
+ />
+ )}
+ <Button
+ variant="contained"
+ onClick={() => {
+ ReactGA &&
+ ReactGA.event({
+ category: "Actions",
+ action: "Export Matches",
+ });
+ downloadExcel();
+ }}
+ >
+ <SvgIcon component={xlsxSVG} inheritViewBox />
+ <Typography> Excel Export</Typography>
+ </Button>
+
+ <Button
+ variant="contained"
+ onClick={async () => {
+ console.log('PDF Export Button Clicked');
+ try {
+ ReactGA &&
+ ReactGA.event({
+ category: "Actions",
+ action: "Export PDF",
+ });
+ await downloadPDF(resultsOptions.threshold);
+ } catch (error) {
+ console.error('PDF Export Failed:', error);
+ toaster.error('Failed to generate PDF report');
+ }
+ }}
+ >
+ <SvgIcon component={pdfSVG} inheritViewBox />
+ <Typography>PDF Export</Typography>
+ </Button>
+
+
+
+
+
+
+
+
+ </Stack>
+ </Stack>
+ </Card>
+ );
+}
+ |
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/coverage/lcov-report/components/index.html b/coverage/lcov-report/components/index.html
new file mode 100644
index 0000000..32abca8
--- /dev/null
+++ b/coverage/lcov-report/components/index.html
@@ -0,0 +1,131 @@
+
+
+
+
+
+ Code coverage report for components
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 8.74%
+ Statements
+ 16/183
+
+
+
+
+ 7.14%
+ Branches
+ 4/56
+
+
+
+
+ 7.14%
+ Functions
+ 4/56
+
+
+
+
+ 8.83%
+ Lines
+ 16/181
+
+
+
+
+
+ Press n or j to go to the next uncovered block, b, p or k for the previous block.
+
+
+
+ Filter:
+
+
+
+
+
+
+
+
+
+ File |
+ |
+ Statements |
+ |
+ Branches |
+ |
+ Functions |
+ |
+ Lines |
+ |
+
+
+
+ App.js |
+
+
+ |
+ 0% |
+ 0/151 |
+ 0% |
+ 0/48 |
+ 0% |
+ 0/46 |
+ 0% |
+ 0/149 |
+
+
+
+ ResultsOptions.js |
+
+
+ |
+ 50% |
+ 16/32 |
+ 50% |
+ 4/8 |
+ 40% |
+ 4/10 |
+ 50% |
+ 16/32 |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/coverage/lcov-report/favicon.png b/coverage/lcov-report/favicon.png
new file mode 100644
index 0000000..c1525b8
Binary files /dev/null and b/coverage/lcov-report/favicon.png differ
diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html
new file mode 100644
index 0000000..a8b69be
--- /dev/null
+++ b/coverage/lcov-report/index.html
@@ -0,0 +1,131 @@
+
+
+
+
+
+ Code coverage report for All files
+
+
+
+
+
+
+
+
+
+
+
+
All files
+
+
+
+ 8.74%
+ Statements
+ 16/183
+
+
+
+
+ 7.14%
+ Branches
+ 4/56
+
+
+
+
+ 7.14%
+ Functions
+ 4/56
+
+
+
+
+ 8.83%
+ Lines
+ 16/181
+
+
+
+
+
+ Press n or j to go to the next uncovered block, b, p or k for the previous block.
+
+
+
+ Filter:
+
+
+
+
+
+
+
+
+
+ File |
+ |
+ Statements |
+ |
+ Branches |
+ |
+ Functions |
+ |
+ Lines |
+ |
+
+
+
+ App.js |
+
+
+ |
+ 0% |
+ 0/151 |
+ 0% |
+ 0/48 |
+ 0% |
+ 0/46 |
+ 0% |
+ 0/149 |
+
+
+
+ ResultsOptions.js |
+
+
+ |
+ 50% |
+ 16/32 |
+ 50% |
+ 4/8 |
+ 40% |
+ 4/10 |
+ 50% |
+ 16/32 |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/coverage/lcov-report/prettify.css b/coverage/lcov-report/prettify.css
new file mode 100644
index 0000000..b317a7c
--- /dev/null
+++ b/coverage/lcov-report/prettify.css
@@ -0,0 +1 @@
+.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
diff --git a/coverage/lcov-report/prettify.js b/coverage/lcov-report/prettify.js
new file mode 100644
index 0000000..b322523
--- /dev/null
+++ b/coverage/lcov-report/prettify.js
@@ -0,0 +1,2 @@
+/* eslint-disable */
+window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^
+
+
+
+