{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"Cookies\"","webpack:///external \"jQuery\"","webpack:///./src/domain/globals.ts","webpack:///./src/domain/layout.ts","webpack:///./src/cookie-handler.ts","webpack:///./src/domain/letter.ts","webpack:///./src/layout-renderer.ts","webpack:///./src/uhr-renderer.ts","webpack:///./src/uhr.ts","webpack:///./src/theme-autodetector.ts","webpack:///./src/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Cookies","jQuery","Globals","registerTheme","styleClass","themes","some","console","warn","push","hasThemes","length","hasMultipleThemes","getFirstTheme","getTheme","index","getThemes","registerLayout","layout","layouts","element","code","prettyName","error","sort","a","b","localeCompare","hasLayouts","hasMultipleLayouts","getFirstLayout","getLayouts","EMPTY_LAYOUT","hours","letters","minutes","permanent","version","cookie_handler_CookieHandler","CookieHandler","widgetId","cookiePath","this","getLayout","oldCookie","getCookie","removeCookie","setLayout","setCookie","getMode","setMode","getStatus","setStatus","status","setTheme","theme","cookieName","external_Cookies_","cookieValue","options","expires","path","Letter","style","addStyle","toString","layout_renderer_LayoutRendererV2Delegate","LayoutRendererV2Delegate","parse","forEach","lineString","line","parseArrayOrObject","seconds","parseTimeDefinition","parseObject","keys","map","Number","y","x","input","_this","Array","isArray","item","definition","listString","timeValues","split","highlightLetters","timeValue","vorne0","3","4","5","6","7","8","9","hinten0","vorne1","hinten1","vorne2","hinten2","vorne3","hinten3","vorne4","hinten4","vorne5","hinten5","hinten6","hinten7","hinten8","hinten9","0","1","2","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","LayoutRenderer","renderarea","render","beforeshow","undefined","parsed","parsedLayout","writable","configurable","fadeOut","empty","array","letter","append","fadeIn","uhr_renderer_UhrRenderer","UhrRenderer","uhr","$element","id","cookieHandler","setupHTML","wireFunctionality","setWidth","width","css","realWidth","height","addClass","controls","controlpanel","$","content","toggleSwitch","modeSwitch","languageChooser_1","themeChooser_1","closebutton","on","click","hide","after","configlink","toggleConfigScreen","toggle","force","prop","start","stop","languageChooser","change","languageKey","val","selectedLayout","language","found","fallbackLanguage","themeChooser","themeKey","selectedTheme","fallbackTheme","autoresize","window","resize","$parent","parent","$window","parentWidth","parentHeight","windowWidth","windowHeight","size","Math","min","uhr_Uhr","Uhr","widgetInstance","timer","currentMinute","userTime","time","Date","uuid","parseHash","renderer","setTime","destroy","clearInterval","removeAttr","remove","isOn","setInterval","update","getCurrentLayout","find","removeClass","getMinutes","show","clear","second","getSecond","dotMinute","getDotMinute","hour","getHour","coarseMinute","getCoarseMinute","highlight","itemClass","getSeconds","date","getHours","hash","location","charAt","substring","decodeURIComponent","pair","matchingLanguages","filter","external_jQuery_","each","styleSheet","attr","name_1","widgetPrototype","_fritteliUhrInstance","_create","_destroy","widget","fritteli","register"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAA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AAUA,GACZuD,KAAK4P,qBAAqBpP,QAAQ/D,IAEtC6M,MAAO,SAAUA,GACbtJ,KAAK4P,qBAAqBvG,SAASC,IAGvCuG,QAAS,WACL7P,KAAK4P,qBAAuB,IAAIpD,EAAIxM,OAGxC8P,SAAU,WACN9P,KAAK4P,qBAAqBxC,WAE9BwC,qBAAsB,MAE1B/F,EAAEkG,OAAO,eAAgBJ,GAEzB9F,EAAEmG,SAASjH,IAAIkH,SAAWzS,EAAQe","file":"lib/uhr.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, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\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 = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 12);\n","module.exports = Cookies;","module.exports = jQuery;","/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n */\n\nimport {Layout} from './layout';\nimport {Theme} from './theme';\n\nexport class Globals {\n private static layouts: Layout[] = [];\n private static themes: Theme[] = [];\n\n public static registerTheme(name: string, styleClass: string): void {\n if (Globals.themes.some((value): boolean => value.name === name)) {\n console.warn(`Theme with name '${name}' already registered; ignoring register request for styleClass '${styleClass}'.`);\n } else {\n Globals.themes.push({\n name,\n styleClass\n });\n }\n }\n\n public static hasThemes(): boolean {\n return Globals.themes.length > 0;\n }\n\n public static hasMultipleThemes(): boolean {\n return Globals.themes.length > 1;\n }\n\n public static getFirstTheme(): Theme {\n return Globals.getTheme(0);\n }\n\n public static getTheme(index: number): Theme {\n return Globals.themes[index];\n }\n\n public static getThemes(): Theme[] {\n return Globals.themes;\n }\n\n public static registerLayout(layout: Layout): void {\n const available = !Globals.layouts.some((element): boolean => {\n if (layout.code === element.code) {\n if (layout.prettyName !== element.prettyName) {\n console.error(\n `Error: Language code '${layout.code}' cannot be registered for layout '${layout.prettyName}' because it is already registered for layout '${element.prettyName}'!`\n );\n }\n return true;\n }\n return false;\n });\n if (available) {\n Globals.layouts.push(layout);\n Globals.layouts.sort((a, b): number => a.prettyName.localeCompare(b.prettyName));\n }\n }\n\n public static hasLayouts(): boolean {\n return Globals.layouts.length > 0;\n }\n\n public static hasMultipleLayouts(): boolean {\n return Globals.layouts.length > 1;\n }\n\n public static getFirstLayout(): Layout {\n return Globals.layouts[0];\n }\n\n public static getLayouts(): Layout[] {\n return Globals.layouts;\n }\n}\n","/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n */\n\nimport {Letter} from './letter';\n\nexport interface Layout {\n readonly code: string;\n getCoarseMinute?: (time: Date) => number;\n getDotMinute?: (time: Date) => number;\n getHour?: (time: Date) => number;\n getSeconds?: (time: Date) => number;\n readonly hours: TimeDefinition;\n readonly letters: string[];\n readonly minutes: TimeDefinition;\n parsed?: Letter[][];\n readonly permanent: WordDefinition | WordDefinition[];\n readonly prettyName: string;\n seconds?: TimeDefinition;\n readonly version: number;\n}\n\nexport interface WordDefinition {\n [line: number]: number[];\n}\n\nexport interface TimeDefinition {\n [values: string]: WordDefinition | WordDefinition[];\n}\n\nexport const EMPTY_LAYOUT: Layout = {\n code: null,\n hours: null,\n letters: [],\n minutes: null,\n permanent: [],\n prettyName: null,\n version: 2\n};\n","/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n */\n\nimport * as Cookies from 'js-cookie';\n\nexport class CookieHandler {\n public constructor(private readonly widgetId: string, private readonly cookiePath?: string) {\n }\n\n public getLayout(): string {\n const oldCookie = this.getCookie('uhr-language');\n if (oldCookie) {\n // aha, old cookie is set. migrate to new one!\n this.removeCookie('uhr-language');\n this.setLayout(oldCookie);\n }\n return this.getCookie('uhr-layout');\n }\n\n public setLayout(layout: string): void {\n this.setCookie('uhr-layout', layout);\n }\n\n public getMode(): string {\n return this.getCookie('uhr-mode');\n }\n\n public setMode(mode: string): void {\n this.setCookie('uhr-mode', mode);\n }\n\n public getStatus(): string {\n return this.getCookie('uhr-status');\n }\n\n public setStatus(status: string): void {\n this.setCookie('uhr-status', status);\n }\n\n public getTheme(): string {\n return this.getCookie('uhr-theme');\n }\n\n public setTheme(theme: string): void {\n this.setCookie('uhr-theme', theme);\n }\n\n private getCookie(cookieName: string): string {\n return Cookies.get(cookieName + this.widgetId);\n }\n\n private setCookie(cookieName: string, cookieValue: string): void {\n let options;\n if (this.cookiePath) {\n options = {expires: 365, path: this.cookiePath};\n } else {\n options = {expires: 365};\n }\n Cookies.set(cookieName + this.widgetId, cookieValue, options);\n }\n\n private removeCookie(cookieName: string): void {\n if (this.cookiePath) {\n Cookies.remove(cookieName + this.widgetId, {path: this.cookiePath});\n } else {\n Cookies.remove(cookieName + this.widgetId);\n }\n }\n}\n","/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n */\n\n/**\n * Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays.\n * @param value Der Buchstabe, der Dargestellt werden soll.\n * @param style Die CSS-Styleklassen des Buchstabens.\n */\nexport class Letter {\n // private readonly value: string;\n private style: string;\n\n public constructor(private readonly value: string, style: string = '') {\n this.value = value;\n this.style = style;\n // if (style) {\n // this.style = style;\n // }\n }\n\n public addStyle(style: string): void {\n if (this.style === '') {\n this.style = style;\n } else {\n this.style += ` ${style}`;\n }\n }\n\n public toString(): string {\n return `${this.value}`;\n }\n}\n","/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n */\n\nimport {Layout, TimeDefinition, WordDefinition} from './domain/layout';\nimport {Letter} from './domain/letter';\n\nclass LayoutRendererV2Delegate {\n private static readonly vorne0: WordDefinition = {\n 3: [2, 3, 4],\n 4: [1, 5],\n 5: [1, 4, 5],\n 6: [1, 3, 5],\n 7: [1, 2, 5],\n 8: [1, 5],\n 9: [2, 3, 4]\n };\n private static readonly hinten0: WordDefinition = {\n 3: [8, 9, 10],\n 4: [7, 11],\n 5: [7, 10, 11],\n 6: [7, 9, 11],\n 7: [7, 8, 11],\n 8: [7, 11],\n 9: [8, 9, 10]\n };\n private static readonly vorne1: WordDefinition = {\n 3: [3],\n 4: [2, 3],\n 5: [3],\n 6: [3],\n 7: [3],\n 8: [3],\n 9: [2, 3, 4]\n };\n private static readonly hinten1: WordDefinition = {\n 3: [9],\n 4: [8, 9],\n 5: [9],\n 6: [9],\n 7: [9],\n 8: [9],\n 9: [8, 9, 10]\n };\n private static readonly vorne2: WordDefinition = {\n 3: [2, 3, 4],\n 4: [1, 5],\n 5: [5],\n 6: [4],\n 7: [3],\n 8: [2],\n 9: [1, 2, 3, 4, 5]\n };\n private static readonly hinten2: WordDefinition = {\n 3: [8, 9, 10],\n 4: [7, 11],\n 5: [11],\n 6: [10],\n 7: [9],\n 8: [8],\n 9: [7, 8, 9, 10, 11]\n };\n private static readonly vorne3: WordDefinition = {\n 3: [1, 2, 3, 4, 5],\n 4: [4],\n 5: [3],\n 6: [4],\n 7: [5],\n 8: [1, 5],\n 9: [2, 3, 4]\n };\n private static readonly hinten3: WordDefinition = {\n 3: [7, 8, 9, 10, 11],\n 4: [10],\n 5: [9],\n 6: [10],\n 7: [11],\n 8: [7, 11],\n 9: [8, 9, 10]\n };\n private static readonly vorne4: WordDefinition = {\n 3: [4],\n 4: [3, 4],\n 5: [2, 4],\n 6: [1, 4],\n 7: [1, 2, 3, 4, 5],\n 8: [4],\n 9: [4]\n };\n private static readonly hinten4: WordDefinition = {\n 3: [10],\n 4: [9, 10],\n 5: [8, 10],\n 6: [7, 10],\n 7: [7, 8, 9, 10, 11],\n 8: [10],\n 9: [10]\n };\n private static readonly vorne5: WordDefinition = {\n 3: [1, 2, 3, 4, 5],\n 4: [1],\n 5: [1, 2, 3, 4],\n 6: [5],\n 7: [5],\n 8: [1, 5],\n 9: [2, 3, 4]\n };\n private static readonly hinten5: WordDefinition = {\n 3: [7, 8, 9, 10, 11],\n 4: [7],\n 5: [7, 8, 9, 10],\n 6: [11],\n 7: [11],\n 8: [7, 11],\n 9: [8, 9, 10]\n };\n private static readonly hinten6: WordDefinition = {\n 3: [9, 10],\n 4: [8],\n 5: [7],\n 6: [7, 8, 9, 10],\n 7: [7, 11],\n 8: [7, 11],\n 9: [8, 9, 10]\n };\n private static readonly hinten7: WordDefinition = {\n 3: [7, 8, 9, 10, 11],\n 4: [11],\n 5: [10],\n 6: [9],\n 7: [8],\n 8: [8],\n 9: [8]\n };\n private static readonly hinten8: WordDefinition = {\n 3: [8, 9, 10],\n 4: [7, 11],\n 5: [7, 11],\n 6: [8, 9, 10],\n 7: [7, 11],\n 8: [7, 11],\n 9: [8, 9, 10]\n };\n private static readonly hinten9: WordDefinition = {\n 3: [8, 9, 10],\n 4: [7, 11],\n 5: [7, 11],\n 6: [8, 9, 10, 11],\n 7: [11],\n 8: [10],\n 9: [8, 9]\n };\n private static readonly seconds: TimeDefinition = {\n '0': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten0],\n '1': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten1],\n '2': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten2],\n '3': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten3],\n '4': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten4],\n '5': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten5],\n '6': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten6],\n '7': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten7],\n '8': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten8],\n '9': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten9],\n '10': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten0],\n '11': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten1],\n '12': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten2],\n '13': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten3],\n '14': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten4],\n '15': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten5],\n '16': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten6],\n '17': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten7],\n '18': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten8],\n '19': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten9],\n '20': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten0],\n '21': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten1],\n '22': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten2],\n '23': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten3],\n '24': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten4],\n '25': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten5],\n '26': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten6],\n '27': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten7],\n '28': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten8],\n '29': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten9],\n '30': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten0],\n '31': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten1],\n '32': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten2],\n '33': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten3],\n '34': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten4],\n '35': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten5],\n '36': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten6],\n '37': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten7],\n '38': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten8],\n '39': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten9],\n '40': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten0],\n '41': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten1],\n '42': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten2],\n '43': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten3],\n '44': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten4],\n '45': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten5],\n '46': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten6],\n '47': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten7],\n '48': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten8],\n '49': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten9],\n '50': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten0],\n '51': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten1],\n '52': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten2],\n '53': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten3],\n '54': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten4],\n '55': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten5],\n '56': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten6],\n '57': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten7],\n '58': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten8],\n '59': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten9]\n };\n\n public constructor(private readonly layout: Layout) {\n }\n\n public parse(): Letter[][] {\n const letters: Letter[][] = [];\n this.layout.letters.forEach((lineString: string): void => {\n const line: Letter[] = [];\n for (let c = 0; c < lineString.length; c++) {\n line.push(new Letter(lineString[c]));\n }\n letters.push(line);\n });\n this.parseArrayOrObject(letters, 'on', this.layout.permanent);\n if (typeof this.layout.seconds !== 'undefined' && this.layout.seconds !== null) {\n this.parseTimeDefinition(letters, 'second', this.layout.seconds);\n } else {\n this.parseTimeDefinition(letters, 'second', LayoutRendererV2Delegate.seconds);\n }\n this.parseTimeDefinition(letters, 'minute', this.layout.minutes);\n this.parseTimeDefinition(letters, 'hour', this.layout.hours);\n return letters;\n }\n\n private parseObject(letters: Letter[][], styleClass: string, object: WordDefinition): void {\n if (typeof object !== 'undefined' && object !== null) {\n Object.keys(object)\n .map((key: string): number => Number(key))\n .forEach(\n (y: number): void => object[y].forEach(\n (x: number): void => letters[y - 1][x - 1].addStyle(styleClass)\n )\n );\n }\n }\n\n private parseArrayOrObject(letters: Letter[][], styleClass: string, input: WordDefinition | WordDefinition[]): void {\n if (typeof input !== 'undefined' && input !== null) {\n if (Array.isArray(input)) {\n input.forEach((item: WordDefinition): void => this.parseObject(letters, styleClass, item));\n } else {\n this.parseObject(letters, styleClass, input);\n }\n }\n }\n\n private parseTimeDefinition(letters: Letter[][], styleClass: string, definition: TimeDefinition): void {\n if (typeof definition !== 'undefined' && definition !== null) {\n Object.keys(definition).forEach((listString: string): void => {\n const timeValues: string[] = listString.split(',');\n const highlightLetters: WordDefinition | WordDefinition[] = definition[listString];\n timeValues.forEach((timeValue: string): void => this.parseArrayOrObject(letters, styleClass + timeValue, highlightLetters));\n });\n }\n }\n}\n\n/**\n * Hilfsklasse zum Rendern der Buchstaben der Uhr.\n * @param layout Layout-Objekt, das gerendert werden soll.\n * @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll.\n */\nexport class LayoutRenderer {\n public constructor(private readonly layout: Layout, private readonly renderarea: JQuery) {\n }\n\n public render(beforeshow?: () => void): void {\n if (this.layout.parsed === undefined) {\n if (this.layout.version === 2) {\n const delegate: LayoutRendererV2Delegate = new LayoutRendererV2Delegate(this.layout);\n const parsedLayout: Letter[][] = delegate.parse();\n Object.defineProperty(this.layout, 'parsed', {\n value: parsedLayout,\n writable: false,\n configurable: false\n });\n } else {\n console.warn(`Unknown layout version: '${this.layout.version}', expecting '2'`);\n return;\n }\n }\n const letters: Letter[][] = this.layout.parsed;\n this.renderarea.fadeOut('fast', (): void => {\n this.renderarea.empty();\n letters.forEach((line, index, array): void => {\n line.forEach((letter): JQuery => this.renderarea.append(letter.toString()));\n if (index < array.length - 1) {\n this.renderarea.append(' ');\n }\n });\n if (beforeshow) {\n beforeshow();\n }\n this.renderarea.fadeIn('fast');\n });\n }\n}\n","/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n */\n\nimport {CookieHandler} from './cookie-handler';\nimport {Globals} from './domain/globals';\nimport {Layout} from './domain/layout';\nimport {Options} from './widget/options';\nimport {Theme} from './domain/theme';\nimport {Uhr} from './uhr';\n\ndeclare var $: JQueryStatic;\n\nexport class UhrRenderer {\n private cookieHandler: CookieHandler;\n\n public constructor(\n private readonly uhr: Uhr,\n private readonly $element: JQuery,\n private readonly options: Options,\n private readonly id: string\n ) {\n this.cookieHandler = new CookieHandler(id, options.cookiePath);\n }\n\n public render(): void {\n this.setupHTML();\n this.wireFunctionality();\n }\n\n public setWidth(width: string): void {\n this.$element.css('width', width);\n const realWidth: number = this.$element.width();\n this.$element.width(realWidth);\n this.$element.height(realWidth);\n this.$element.css('font-size', (realWidth / 40) + 'px');\n }\n\n private setupHTML(): void {\n // Base clock area\n this.$element.addClass('uhr')\n .empty()\n .append('')\n .append('')\n .append('')\n .append('')\n .append('')\n .append('');\n\n this.setWidth(this.options.width);\n\n if (this.options.controls) {\n const controlpanel = $(``);\n const content = $('');\n controlpanel.append(content);\n // on/off switch\n const toggleSwitch = $(``);\n toggleSwitch.append(``);\n toggleSwitch.append(``);\n content.append(toggleSwitch);\n\n // time mode switch\n const modeSwitch = $(``);\n modeSwitch.append(``);\n modeSwitch.append(``);\n content.append(modeSwitch);\n // language chooser\n if (Globals.hasMultipleLayouts()) {\n const languageChooser = $(``);\n Globals.getLayouts().forEach((layout: Layout): void => {\n languageChooser.append(``);\n });\n content.append(languageChooser);\n }\n\n // theme chooser\n if (Globals.hasMultipleThemes()) {\n const themeChooser = $(``);\n Globals.getThemes().forEach((theme: Theme): void => {\n themeChooser.append(``);\n });\n content.append(themeChooser);\n }\n const closebutton: JQuery = $(``);\n closebutton.on({click: (): JQuery => $(`#uhr-controlpanel${this.id}`).hide('fast')});\n content.append(closebutton);\n this.$element.after(controlpanel);\n controlpanel.hide();\n const configlink: JQuery = $(``);\n configlink.on({click: (): void => this.toggleConfigScreen()});\n this.$element.after(configlink);\n }\n }\n\n private wireFunctionality(): void {\n // on/off switch\n const toggleSwitch: JQuery = $(`#uhr-onoffswitch-checkbox${this.id}`);\n toggleSwitch.on({click: (): void => this.uhr.toggle()});\n let status = this.cookieHandler.getStatus();\n if (status === undefined || this.options.force) {\n status = this.options.status;\n }\n toggleSwitch.prop('checked', status === 'on');\n if (status === 'on') {\n this.uhr.start();\n } else {\n this.uhr.stop();\n }\n\n // time mode switch\n const modeSwitch: JQuery = $(`#uhr-modeswitch-checkbox${this.id}`);\n modeSwitch.on({\n click: (): void => {\n if (this.options.mode === 'seconds') {\n this.uhr.setMode('normal');\n } else {\n this.uhr.setMode('seconds');\n }\n }\n });\n\n let mode = this.cookieHandler.getMode();\n if (mode === undefined || this.options.force) {\n mode = this.options.mode;\n }\n modeSwitch.prop('checked', mode !== 'seconds');\n if (mode === 'seconds') {\n this.uhr.setMode('seconds');\n } else {\n this.uhr.setMode('normal');\n }\n\n // language chooser\n const languageChooser: JQuery = $(`#uhr-languagechooser${this.id}`);\n languageChooser.on({\n change: (): void => {\n const languageKey = $(`#uhr-languagechooser${this.id}`).val() as string;\n this.uhr.setLayout(languageKey);\n }\n });\n let selectedLayout = this.cookieHandler.getLayout();\n if (selectedLayout === undefined || this.options.force) {\n selectedLayout = this.options.language;\n }\n let found = Globals.getLayouts().some((item: Layout): boolean => selectedLayout === item.code);\n if (!found) {\n let fallbackLanguage;\n if (Globals.hasLayouts()) {\n fallbackLanguage = Globals.getFirstLayout().code;\n } else {\n fallbackLanguage = '';\n }\n console.warn(`Language '${selectedLayout}' not found! Using fallback '${fallbackLanguage}'.`);\n selectedLayout = fallbackLanguage;\n }\n languageChooser.val(selectedLayout);\n this.options.language = '';\n this.uhr.setLayout(selectedLayout);\n\n // theme chooser\n const themeChooser: JQuery = $(`#uhr-themechooser${this.id}`);\n themeChooser.on({\n change: (): void => {\n const themeKey = $(`#uhr-themechooser${this.id}`).val() as string;\n this.uhr.setTheme(themeKey);\n }\n });\n let selectedTheme = this.cookieHandler.getTheme();\n if (selectedTheme === undefined || this.options.force) {\n selectedTheme = this.options.theme;\n }\n found = Globals.getThemes().some((item: Theme): boolean => selectedTheme === item.styleClass);\n if (!found) {\n const fallbackTheme = Globals.getFirstTheme().styleClass;\n console.warn(`Theme '${selectedTheme}' not found! Using fallback '${fallbackTheme}'.`);\n selectedTheme = fallbackTheme;\n }\n themeChooser.val(selectedTheme);\n this.options.theme = '';\n this.uhr.setTheme(selectedTheme);\n if (this.options.autoresize) {\n $(window).on({\n resize: (): void => {\n const $parent: JQuery = this.$element.parent();\n const $window: JQuery = $(window);\n const parentWidth: number = $parent.width();\n const parentHeight: number = $parent.height();\n const windowWidth: number = $window.width();\n const windowHeight: number = $window.height();\n const size: string = `${Math.min(parentWidth, parentHeight, windowWidth, windowHeight)}px`;\n this.setWidth(size);\n }\n });\n }\n }\n\n private toggleConfigScreen(): void {\n $(`#uhr-controlpanel${this.id}`).toggle('fast');\n }\n}\n","/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n */\n\n/*eslint no-undef: \"warn\"*/\nimport WidgetCommonProperties = JQueryUI.WidgetCommonProperties;\nimport {EMPTY_LAYOUT, Layout} from './domain/layout';\nimport {CookieHandler} from './cookie-handler';\nimport {Globals} from './domain/globals';\nimport {LayoutRenderer} from './layout-renderer';\nimport {UhrRenderer} from './uhr-renderer';\nimport {WidgetPrototype} from './widget/widget-prototype';\n\ndeclare var $: JQueryStatic;\n\nexport class Uhr {\n private timer: number = null;\n private currentMinute: number = null;\n private renderer: UhrRenderer;\n private cookieHandler: CookieHandler;\n\n public constructor(private readonly widgetInstance: WidgetPrototype & WidgetCommonProperties) {\n const userTime = this.widgetInstance.options.time;\n if (this.widgetInstance.options.time === undefined) {\n this.widgetInstance.options.time = new Date();\n }\n this.cookieHandler = new CookieHandler(this.widgetInstance.uuid, this.widgetInstance.options.cookiePath);\n this.parseHash();\n this.renderer = new UhrRenderer(this, this.widgetInstance.element, this.widgetInstance.options, this.widgetInstance.uuid);\n this.renderer.render();\n if (userTime !== undefined) {\n this.setTime(userTime);\n }\n }\n\n public destroy(): void {\n if (this.timer) {\n window.clearInterval(this.timer);\n this.timer = null;\n }\n this.widgetInstance.element\n .removeAttr('style')\n .removeAttr('class')\n .empty();\n $(`#uhr-configlink${this.widgetInstance.uuid}`).remove();\n $(`#uhr-controlpanel${this.widgetInstance.uuid}`).remove();\n }\n\n public start(): void {\n if (!this.isOn()) {\n this.timer = window.setInterval((): void => {\n this.widgetInstance.options.time = new Date();\n this.update();\n }, 1000);\n this.update();\n this.cookieHandler.setStatus('on');\n }\n }\n\n public stop(): void {\n if (this.isOn()) {\n window.clearInterval(this.timer);\n this.timer = null;\n this.update();\n this.cookieHandler.setStatus('off');\n }\n }\n\n public toggle(): void {\n if (this.isOn()) {\n this.stop();\n } else {\n this.start();\n }\n }\n\n public setLayout(key: string): void {\n if (key !== this.widgetInstance.options.language) {\n this.widgetInstance.options.language = key;\n const renderer = new LayoutRenderer(this.getCurrentLayout(), this.widgetInstance.element.find('.letterarea'));\n renderer.render((): void => {\n this.currentMinute = -1;\n this.update();\n });\n this.cookieHandler.setLayout(key);\n this.update();\n }\n }\n\n public setTheme(styleClass: string): void {\n if (styleClass !== this.widgetInstance.options.theme) {\n this.widgetInstance.element.removeClass(this.widgetInstance.options.theme).addClass(styleClass);\n $(`#uhr-onoffswitch${this.widgetInstance.uuid}`).removeClass(this.widgetInstance.options.theme).addClass(styleClass);\n this.widgetInstance.options.theme = styleClass;\n this.cookieHandler.setTheme(styleClass);\n }\n }\n\n public setTime(time: Date): void {\n this.currentMinute = null;\n if (time === null) {\n this.widgetInstance.options.time = new Date();\n } else {\n if (this.timer !== null) {\n window.clearInterval(this.timer);\n }\n this.widgetInstance.options.time = time;\n }\n this.update();\n }\n\n public setMode(mode: string): void {\n this.widgetInstance.options.mode = mode;\n this.currentMinute = null;\n this.update();\n this.cookieHandler.setMode(mode);\n }\n\n public setWidth(width: string): void {\n this.renderer.setWidth(width);\n }\n\n private isOn(): boolean {\n return this.timer !== null;\n }\n\n private update(): void {\n if (this.isOn()) {\n const time = this.widgetInstance.options.time;\n if (!this.getCurrentLayout().hasOwnProperty('seconds') && this.widgetInstance.options.mode !== 'seconds') {\n if (time.getMinutes() === this.currentMinute) {\n return;\n }\n this.currentMinute = time.getMinutes();\n }\n this.show(time);\n } else {\n this.clear();\n this.currentMinute = -1;\n }\n }\n\n private show(time: Date): void {\n const second = this.getSecond(time);\n const dotMinute = this.getDotMinute(time);\n const hour = this.getHour(time);\n const coarseMinute = this.getCoarseMinute(time);\n this.clear();\n if (this.widgetInstance.options.mode === 'seconds') {\n this.highlight(`second${second}`);\n } else {\n this.highlight('on');\n for (let i = 1; i <= dotMinute; i++) {\n this.highlight(`dot${i}`);\n }\n this.highlight(`minute${coarseMinute}`);\n this.highlight(`hour${hour}`);\n }\n }\n\n private clear(): void {\n this.widgetInstance.element.find('.item').removeClass('active');\n }\n\n private highlight(itemClass: string): void {\n this.widgetInstance.element.find(`.item.${itemClass}`).addClass('active');\n }\n\n private getSecond(time: Date): number {\n if (typeof this.getCurrentLayout().getSeconds === 'function') {\n return this.getCurrentLayout().getSeconds(time);\n }\n return time.getSeconds();\n }\n\n private getDotMinute(date: Date): number {\n if (typeof this.getCurrentLayout().getDotMinute === 'function') {\n return this.getCurrentLayout().getDotMinute(date);\n }\n return date.getMinutes() % 5;\n }\n\n private getCoarseMinute(date: Date): number {\n if (typeof this.getCurrentLayout().getCoarseMinute === 'function') {\n return this.getCurrentLayout().getCoarseMinute(date);\n }\n return date.getMinutes();\n }\n\n private getHour(date: Date): number {\n if (typeof this.getCurrentLayout().getHour === 'function') {\n return this.getCurrentLayout().getHour(date);\n }\n const hour = date.getHours();\n if (date.getMinutes() >= 25) {\n return (hour + 1) % 24;\n }\n return hour;\n }\n\n private parseHash(): void {\n let hash: string = window.location.hash;\n if (hash !== undefined && hash.charAt(0) === '#') {\n hash = hash.substring(1);\n hash = decodeURIComponent(hash);\n const params: string[] = hash.split('&');\n params.forEach((element: string): void => {\n const pair: string[] = element.split('=');\n const key = pair[0];\n const value = pair[1];\n switch (key) {\n case 'l':\n case 'language':\n this.widgetInstance.options.language = value;\n this.widgetInstance.options.force = true;\n break;\n case 't':\n case 'theme':\n this.widgetInstance.options.theme = value;\n this.widgetInstance.options.force = true;\n break;\n case 'm':\n case 'mode':\n this.widgetInstance.options.mode = value;\n this.widgetInstance.options.force = true;\n break;\n case 's':\n case 'status':\n this.widgetInstance.options.status = value;\n this.widgetInstance.options.force = true;\n break;\n }\n });\n }\n }\n\n private getCurrentLayout(): Layout {\n const matchingLanguages: Layout[] = Globals.getLayouts().filter((element: Layout): boolean => element.code === this.widgetInstance.options.language, this);\n if (matchingLanguages.length > 0) {\n return matchingLanguages[0];\n }\n // fallback: return empty object\n return EMPTY_LAYOUT;\n }\n}\n","/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n */\n\nimport * as $ from 'jquery';\nimport {Globals} from './domain/globals';\n\nexport function autodetectThemes(): void {\n $('link[rel=stylesheet]').each((index, item): void => {\n const styleSheet = $(item);\n const styleClass: string = styleSheet.attr('data-class');\n if (styleClass !== undefined) {\n let name: string = styleSheet.attr('data-name');\n if (name === undefined) {\n name = styleClass;\n }\n Globals.registerTheme(name, styleClass);\n }\n });\n\n // fall-back if no theme was included\n if (!Globals.hasThemes()) {\n Globals.registerTheme('', '');\n }\n}\n","/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n */\n\nimport {Globals} from './domain/globals';\nimport {Layout} from './domain/layout';\nimport {Uhr} from './uhr';\nimport {WidgetPrototype} from './widget/widget-prototype';\nimport {autodetectThemes} from './theme-autodetector';\n\ndeclare namespace Fritteli {\n interface Fritteli {\n uhr: Uhr;\n }\n\n interface Uhr {\n register: (layout: Layout) => void;\n }\n}\ndeclare namespace $ {\n const fritteli: Fritteli.Fritteli;\n const widget: JQueryUI.Widget;\n}\n\n// First things first: discover included themes and register them\nautodetectThemes();\n\nconst widgetPrototype: WidgetPrototype = {\n options: {\n width: '100%',\n status: 'on',\n language: 'de_CH',\n theme: Globals.getFirstTheme().styleClass,\n force: false,\n controls: true,\n cookiePath: undefined,\n autoresize: true,\n mode: 'normal'\n },\n start: function (): void {\n this._fritteliUhrInstance.start();\n },\n stop: function (): void {\n this._fritteliUhrInstance.stop();\n },\n toggle: function (): void {\n this._fritteliUhrInstance.toggle();\n },\n language: function (key: string): void {\n this._fritteliUhrInstance.setLayout(key);\n },\n theme: function (styleClass: string): void {\n this._fritteliUhrInstance.setTheme(styleClass);\n },\n time: function (time: Date): void {\n this._fritteliUhrInstance.setTime(time);\n },\n mode: function (mode: string): void {\n this._fritteliUhrInstance.setMode(mode);\n },\n width: function (width: string): void {\n this._fritteliUhrInstance.setWidth(width);\n },\n // constructor method\n _create: function (): void {\n this._fritteliUhrInstance = new Uhr(this);\n },\n // destructor method\n _destroy: function (): void {\n this._fritteliUhrInstance.destroy();\n },\n _fritteliUhrInstance: null\n};\n$.widget('fritteli.uhr', widgetPrototype);\n\n$.fritteli.uhr.register = Globals.registerLayout;\n"],"sourceRoot":""}