{"version":3,"sources":["webpack:///webpack/bootstrap 90cbae86df50abd9adfb","webpack:///./Scripts/ApplyThemeKeywords.ts"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACzDA,CAAC;IACG,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE;QAC1C,IAAI,GAAG,GAAG,IAAI,kBAAkB,EAAE,CAAC;IACvC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,EAAE,CAAC;AAGL;IAKI;QAAA,iBAEC;QANO,gBAAW,GAAY,KAAK,CAAC;QAQ7B,SAAI,GAAG;YACX,IAAI,KAAI,CAAC,WAAW,EAAE;gBAClB,OAAO;aACV;YACD,KAAI,CAAC,KAAK,EAAE,CAAC;YACb,KAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAC5B,CAAC;QAEO,UAAK,GAAG;YACZ,IAAI,IAAI,GAAG,KAAI,CAAC;YAEhB,IAAI,CAAC,cAAc,GAAG,IAAI,KAAK,EAAgB,CAAC;YAEhD,IAAI,QAAQ,GAAG,UAAU,MAAM;gBAC3B,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK;oBAC7B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC9E,CAAC,CAAC,CAAC;gBAEH,CAAC,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAS,EAAE,OAAoB;oBACnE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;YACP,CAAC,CAAC;YAEF,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC;gBAClD,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;YAC7D,CAAC,CAAC,CAAC;QACP,CAAC;QAEO,gBAAW,GAAG,UAAC,OAAoB;YACvC,KAAe,UAAmB,EAAnB,UAAI,CAAC,cAAc,EAAnB,cAAmB,EAAnB,IAAmB,EAAE;gBAA/B,IAAI,EAAE;gBACH,0BAA0B;gBAC1B,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAO,EAAE,CAAC,OAAO,SAAM,EAAE,IAAI,CAAC,EAAE,cAAY,EAAE,CAAC,QAAQ,aAAU,CAAC,CAAC;aACnI;QACL,CAAC;QApCG,IAAI,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;IAoCL,yBAAC;AAAD,CAAC;AA3CY,gDAAkB;AA+C/B;IACI,sBAAmB,OAAe,EAAS,QAAgB;QAAxC,YAAO,GAAP,OAAO,CAAQ;QAAS,aAAQ,GAAR,QAAQ,CAAQ;IAC3D,CAAC;IACL,mBAAC;AAAD,CAAC;AAHY,oCAAY","file":"applyThemeKeywords.bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 90cbae86df50abd9adfb","\r\n\r\n\r\n\r\n(function () {\r\n document.addEventListener(\"DOMContentLoaded\", function () {\r\n var atk = new ApplyThemeKeywords();\r\n });\r\n})();\r\n\r\n\r\nexport class ApplyThemeKeywords {\r\n private initialised: boolean = false;\r\n\r\n private _themeKeywords: Array;\r\n\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n private init = () => {\r\n if (this.initialised) {\r\n return;\r\n }\r\n this.apply();\r\n this.initialised = true;\r\n }\r\n\r\n private apply = (): void => {\r\n let self = this;\r\n\r\n self._themeKeywords = new Array();\r\n\r\n var callback = function (result) {\r\n $.each(result, function (i, field) {\r\n self._themeKeywords.push(new ThemeKeyword(field.keyword, field.themeUrl));\r\n });\r\n \r\n $('.applyThemeKeywords').each(function (i: number, element: HTMLElement) {\r\n self.applyToHtml(element);\r\n });\r\n };\r\n\r\n $.getJSON(\"/api/Themes/ThemeKeywords\", callback).fail(function () {\r\n console.error(\"Error calling /api/Themes/ThemeKeywords\");\r\n }); \r\n }\r\n\r\n private applyToHtml = (element: HTMLElement) : void => {\r\n for (let tk of this._themeKeywords) { \r\n //console.log(tk.keyword);\r\n element.innerHTML = element.innerHTML.replace(new RegExp(`(\\\\b${tk.keyword}\\\\b)`, \"gi\"), `$1`); \r\n }\r\n }\r\n}\r\n\r\n\r\n\r\nexport class ThemeKeyword { \r\n constructor(public keyword: string, public themeUrl: string) { \r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./Scripts/ApplyThemeKeywords.ts"],"sourceRoot":""}