﻿var Hashtable = (function () {
    function _1(_2) { return (typeof _2 === "undefined"); }; function _3(_4) { return (typeof _4 === "function"); }; function _5(_6) { return (typeof _6 === "string"); }; function _7(_8, _9) { return _3(_8[_9]); }; function _a(_b) { return _7(_b, "equals"); }; function _c(_d) { return _7(_d, "hashCode"); }; function _e(_f) {
        if (_5(_f)) { return _f; } else {
            if (_c(_f)) {
                var _10 = _f.hashCode(); if (!_5(_10)) { return _e(_10); }
                return _10;
            } else { if (_7(_f, "toString")) { return _f.toString(); } else { return String(_f); } }
        }
    }; function _11(_12, _13) { return _12.equals(_13); }; function _14(_15, _16) { if (_a(_16)) { return _16.equals(_15); } else { return _15 === _16; } }; function _17(o1, o2) { return o1 === o2; }; function _1a(arr, _1c, _1d, _1e, _1f) {
        var _20; for (var i = 0, len = arr.length; i < len; i++) { _20 = arr[i]; if (_1f(_1c, _1d(_20))) { return _1e ? [i, _20] : true; } }
        return false;
    }; function _23(arr, idx) { if (_7(arr, "splice")) { arr.splice(idx, 1); } else { if (idx === arr.length - 1) { arr.length = idx; } else { var _26 = arr.slice(idx + 1); arr.length = idx; for (var i = 0, len = _26.length; i < len; i++) { arr[idx + i] = _26[i]; } } } }; function _29(kv, _2b) { if (kv === null) { throw new Error("null is not a valid " + _2b); } else { if (_1(kv)) { throw new Error(_2b + " must not be undefined"); } } }; var _2c = "key", _2d = "value"; function _2e(key) { _29(key, _2c); }; function _30(_31) { _29(_31, _2d); }; function _32(_33, _34, _35) { this.entries = []; this.addEntry(_33, _34); if (_35 !== null) { this.getEqualityFunction = function () { return _35; }; } }; function _36(_37) { return _37[0]; }; function _38(_39) { return _39[1]; }; _32.prototype = { getEqualityFunction: function (_3a) { if (_a(_3a)) { return _11; } else { return _14; } }, searchForEntry: function (key) { return _1a(this.entries, key, _36, true, this.getEqualityFunction(key)); }, getEntryForKey: function (key) { return this.searchForEntry(key)[1]; }, getEntryIndexForKey: function (key) { return this.searchForEntry(key)[0]; }, removeEntryForKey: function (key) {
        var _3f = this.searchForEntry(key); if (_3f) { _23(this.entries, _3f[0]); return true; }
        return false;
    }, addEntry: function (key, _41) { this.entries[this.entries.length] = [key, _41]; }, size: function () { return this.entries.length; }, keys: function (_42) { var _43 = _42.length; for (var i = 0, len = this.entries.length; i < len; i++) { _42[_43 + i] = this.entries[i][0]; } }, values: function (_46) { var _47 = _46.length; for (var i = 0, len = this.entries.length; i < len; i++) { _46[_47 + i] = this.entries[i][1]; } }, containsKey: function (key) { return _1a(this.entries, key, _36, false, this.getEqualityFunction(key)); }, containsValue: function (_4b) { return _1a(this.entries, _4b, _38, false, _17); }
    }; function _4c() { }; _4c.prototype = []; function _4d(_4e) { return _4e[0]; }; function _4f(_50, _51, _52) { return _1a(_50, _51, _4d, true, _52); }; function _53(_54, _55) {
        var _56 = _54[_55]; if (_56 && (_56 instanceof _4c)) { return _56[1]; }
        return null;
    }; function _57(_58, _59) {
        var _5a = []; var _5b = {}; _58 = _3(_58) ? _58 : _e; _59 = _3(_59) ? _59 : null; this.put = function (key, _5d) { _2e(key); _30(_5d); var _5e = _58(key); var _5f = _53(_5b, _5e); if (_5f) { var _60 = _5f.getEntryForKey(key); if (_60) { _60[1] = _5d; } else { _5f.addEntry(key, _5d); } } else { var _61 = new _4c(); _61[0] = _5e; _61[1] = new _32(key, _5d, _59); _5a[_5a.length] = _61; _5b[_5e] = _61; } }; this.get = function (key) {
            _2e(key); var _63 = _58(key); var _64 = _53(_5b, _63); if (_64) { var _65 = _64.getEntryForKey(key); if (_65) { return _65[1]; } }
            return null;
        }; this.containsKey = function (key) {
            _2e(key); var _67 = _58(key); var _68 = _53(_5b, _67); if (_68) { return _68.containsKey(key); }
            return false;
        }; this.containsValue = function (_69) {
            _30(_69); for (var i = 0, len = _5a.length; i < len; i++) { if (_5a[i][1].containsValue(_69)) { return true; } }
            return false;
        }; this.clear = function () { _5a.length = 0; _5b = {}; }; this.isEmpty = function () { return _5a.length === 0; }; this.keys = function () {
            var _6c = []; for (var i = 0, len = _5a.length; i < len; i++) { _5a[i][1].keys(_6c); }
            return _6c;
        }; this.values = function () {
            var _6f = []; for (var i = 0, len = _5a.length; i < len; i++) { _5a[i][1].values(_6f); }
            return _6f;
        }; this.remove = function (key) { _2e(key); var _73 = _58(key); var _74 = _53(_5b, _73); if (_74) { if (_74.removeEntryForKey(key)) { if (_74.size() === 0) { var _75 = _4f(_5a, _73, _74.getEqualityFunction(key)); _23(_5a, _75[0]); delete _5b[_73]; } } } }; this.size = function () {
            var _76 = 0; for (var i = 0, len = _5a.length; i < len; i++) { _76 += _5a[i][1].size(); }
            return _76;
        };
    }; return _57;
})();

//   Glossary of terms
var Glossary = new Hashtable();
// Glossary.put("key".toLowerCase(), "value");
Glossary.put("A1C".toLowerCase(), "A test that measures blood sugar or glucose levels for the previous 3 to 4 months.");
Glossary.put("Bad cholesterol".toLowerCase(), "Low-density lipoprotein (LDL) cholesterol. A high level of bad cholesterol leads to a buildup of cholesterol in arteries and may lead to heart disease.");
Glossary.put("Basal insulin".toLowerCase(), "The insulin that provides the body with a steady, low level of insulin throughout the day and night; may be given by intermediate- or long-acting insulin injections or continuous release of faster-acting insulin in a pump.");
Glossary.put("Bolus insulin".toLowerCase(), "The faster-acting (either regular or rapid-acting) insulin that provides the boost of insulin needed to stop the rise in blood glucose levels that occurs after meals; may be given as a before-meal injection or a before-meal dose via an insulin pump");
Glossary.put("Cholesterol".toLowerCase(), "A fat-like substance that is found in the bloodstream and body tissue. Cholesterol is used by the body to make hormones and build cell walls. However, too much cholesterol can cause a disease that harms blood circulation.");
Glossary.put("Dietitian".toLowerCase(), "A health care professional who advises people about meal planning, weight control,and diabetes management.");
Glossary.put("Endocrinologist".toLowerCase(), " A doctor who treats people who have endocrine gland problems such as diabetes.");
Glossary.put("Fast-acting insulin analog".toLowerCase(), "An insulin that works faster and for a shorter period of time compared with regular human insulin; created by changing the chemical structure of the insulin molecule.");
Glossary.put("Glucose".toLowerCase(), "Also known as blood sugar, glucose is used by the body for fuel. Glucose is produced when the digestive system breaks down food.");
Glossary.put("Good cholesterol".toLowerCase(), "High-density lipoprotein (HDL) cholesterol. Good cholesterol helps the liver remove all cholesterol from your body. The higher your good cholesterol level, the lower your chance of getting heart disease.");
Glossary.put("Hormone".toLowerCase(), "A chemical made by the body to help it work in different ways. For example, insulin is a hormone made in the pancreas to help the body use glucose as energy");
Glossary.put("Hyperglycemia".toLowerCase(), "A condition people with diabetes may experience when their blood glucose levels are too high. Symptoms of hyperglycemia may include having to urinate often, being very thirsty, and losing weight.");
Glossary.put("Hypoglycemia".toLowerCase(), "A condition people with diabetes may experience when their blood glucose levels are too low. Symptoms of hypoglycemia may include feeling anxious or confused, feeling numb in the arms and hands, and shaking or feeling dizzy.");
Glossary.put("Insulin analog".toLowerCase(), "A type of insulin in which the chemical structure of the insulin molecule has been changed in some way.");
Glossary.put("Insulin analogs".toLowerCase(), "A type of insulin in which the chemical structure of the insulin molecule has been changed in some way.");
Glossary.put("Ketoacidosis".toLowerCase(), "A serious condition caused by too little insulin; caused by high levels of glucose and ketones in urine.");
Glossary.put("Ketones".toLowerCase(), "Waste created when fat cells are burned for energy. In large amounts, ketones alter the blood chemistry and can lead to diabetic ketoacidosis.");
Glossary.put("Nutritionist".toLowerCase(), " A person with training in nutrition. A nutritionist may have specialized training and qualifications, but may not.");
Glossary.put("Ophthalmologist".toLowerCase(), "A medical doctor who diagnoses and treats all eye diseases and eye disorders.");
Glossary.put("Pancreas".toLowerCase(), "An organ in the body that produces insulin, which enables the body to use glucose for energy. ");
Glossary.put("Physiologic".toLowerCase(), "Similar to the way the human body works naturally.");
Glossary.put("Podiatrist".toLowerCase(), "Doctor that specializes in the feet. Podiatrists also provide regular foot examinations and treatment.");
Glossary.put("Rapid-acting insulin analog".toLowerCase(), "Also called a fast-acting insulin analog, this is an insulin that works faster and for a shorter period of time compared with regular human insulin; created by changing the chemical structure of the insulin molecule.");
Glossary.put("Regular human insulin".toLowerCase(), "An older form of fast-acting insulin. With regular human insulin, meals are eaten 30 minutes after insulin injection. In newer fast-acting insulins, such as NovoLog®,meals can be eaten within 5 to 10 minutes.");
Glossary.put("rapid or fast-acting insulin analog".toLowerCase(), "an insulin that works faster and for a shorter period of time compared with regular human insulin; created by changing the chemical structure of the insulin molecule");
Glossary.put("analog insulin".toLowerCase(), "A slightly modified version of the insulin produced by the body. This allows the insulin to have different characteristics that may help to manage diabetes more effectively.");
Glossary.put("A1C levels".toLowerCase(), "A test that measures blood sugar or glucose levels for the previous 3 to 4 months.");


