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,CAAM,OAAA,CAAU,MAH/C,C,4D","sources":["","frontend/global/helpers.js"],"sourcesContent":["var $d5dc89801813ffec$exports = {};\nconst $d5dc89801813ffec$var$DEFAULT_CONFIG = {\n schedule: {},\n foreground_color: \"#1a2741\",\n background_color: \"#c34614\",\n foreground_text_color: \"#ffffff\",\n background_text_color: \"#ffffff\",\n include_period_name: true,\n use_schedule_color: true\n};\n// Start helpers\nlet $d5dc89801813ffec$var$lastFetchedData = null;\nconst $d5dc89801813ffec$var$serverOffset = null;\nasync function $d5dc89801813ffec$var$get(endpoint = \"/api/v1/today/now/near\") {\n return fetch(`${endpoint}?timestamp=${Math.floor($d5dc89801813ffec$var$current_date().getTime() / 1000)}`).then((x)=>x.json().catch(()=>null)).catch(()=>null);\n}\nlet $d5dc89801813ffec$var$config;\nfunction $d5dc89801813ffec$var$updateConfig() {\n $d5dc89801813ffec$var$config = Object.assign($d5dc89801813ffec$var$DEFAULT_CONFIG, JSON.parse(localStorage.getItem(\"schedule\") || \"{}\"));\n return $d5dc89801813ffec$var$config;\n}\n$d5dc89801813ffec$var$updateConfig();\nfunction $d5dc89801813ffec$var$replace_period(period) {\n if (!period) return period;\n if (Array.isArray(period)) return period.map((v)=>$d5dc89801813ffec$var$replace_period(v));\n const period_tmp = Object.assign({}, period);\n const class_id = period_tmp.kind.Class || period_tmp.kind.ClassOrLunch;\n const class_cfg = $d5dc89801813ffec$var$config.schedule[class_id] || $d5dc89801813ffec$var$config.schedule[period_tmp.friendly_name];\n if (class_cfg) {\n if (class_cfg.name) period_tmp.friendly_name = $d5dc89801813ffec$var$config.include_period_name || $d5dc89801813ffec$var$config.include_period_name === undefined ? `${period_tmp.friendly_name} - ${class_cfg.name}` : class_cfg.name;\n if (class_cfg.url) period_tmp.url = class_cfg.url;\n }\n return period_tmp;\n}\nfunction $d5dc89801813ffec$var$process(data) {\n if ($d5dc89801813ffec$var$config) return data.map((v)=>$d5dc89801813ffec$var$replace_period(v));\n return data;\n}\nfunction $d5dc89801813ffec$var$period_html(period) {\n return period ? period.url ? `${period.friendly_name.replaceAll(\"<\", \"<\").replaceAll(\">\", \">\")}` : period.friendly_name.replaceAll(\"<\", \"<\").replaceAll(\">\", \">\") : \"None\";\n}\nfunction $d5dc89801813ffec$var$getel(id) {\n return document.querySelector(`#${id}`);\n}\nasync function $d5dc89801813ffec$var$go(display) {\n if ($d5dc89801813ffec$var$lastFetchedData) display($d5dc89801813ffec$var$lastFetchedData);\n const now = Date.now();\n const endOfMinute = Math.ceil(now / 60000) * 60000;\n setTimeout(()=>$d5dc89801813ffec$var$go(display), endOfMinute - now);\n let data = await $d5dc89801813ffec$var$get();\n if (!data) return;\n data = $d5dc89801813ffec$var$process(data);\n $d5dc89801813ffec$var$lastFetchedData = data;\n display(data);\n}\nfunction $d5dc89801813ffec$var$human_list(items) {\n let output = \"\";\n if (items.length === 1) return items[0].toString();\n for(let i = 0; i < items.length; i++){\n if (i === items.length - 1) output += `${items.length > 2 ? \", \" : \" \"}and ${items[i].toString()}`;\n else if (i === 0) output += items[i].toString();\n else output += `, ${items[i].toString()}`;\n }\n return output;\n}\n// Add plural suffix to a unit\nfunction $d5dc89801813ffec$var$plural_suffix(number, string) {\n return `${string}${number === 1 ? \"\" : \"s\"}`;\n}\n// Gets current date\n// If timestamp query string is provided, that is used instead of current.\nfunction $d5dc89801813ffec$var$current_date() {\n const timestampQueryString = new URLSearchParams(window.location.search).get(\"timestamp\");\n if (timestampQueryString) return new Date(Number.parseInt(timestampQueryString, 10) * 1000);\n return new Date();\n}\nfunction $d5dc89801813ffec$var$date_from_api(time, now = $d5dc89801813ffec$var$current_date()) {\n const [h, m, s] = time.split(\":\");\n const date = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), h, m, s);\n return date;\n}\n// YYYY-MM-DD to Date object\nfunction $d5dc89801813ffec$var$date_string_to_date(dateString) {\n const [y, m, d] = dateString.split(\"-\");\n return new Date(Number.parseInt(y, 10), Number.parseInt(m, 10) - 1, Number.parseInt(d, 10));\n}\nfunction $d5dc89801813ffec$var$human_time(time) {\n const date = $d5dc89801813ffec$var$date_from_api(time);\n return date.toLocaleTimeString(\"en-US\", {\n hour: \"numeric\",\n minute: \"2-digit\"\n });\n}\n// Gets a human readable duration from an epoch timestamp\nfunction $d5dc89801813ffec$var$human_time_left(endTime, startTime = null, short = false) {\n const startDate = startTime ? $d5dc89801813ffec$var$date_from_api(startTime).getTime() : $d5dc89801813ffec$var$current_date().getTime();\n const endDate = $d5dc89801813ffec$var$date_from_api(endTime).getTime();\n const timeLeft = Math.floor((endDate - startDate) / 1000);\n const h = Math.floor(timeLeft / 60 / 60);\n const m = Math.ceil(timeLeft / 60 % 60);\n if (short) {\n if (h > 0) return `${h}h ${m}m`;\n return `${m}m`;\n }\n if (h > 0) return `${h} ${$d5dc89801813ffec$var$plural_suffix(h, \"hour\")} and ${m} ${$d5dc89801813ffec$var$plural_suffix(m, \"minute\")}`;\n return `${m} ${$d5dc89801813ffec$var$plural_suffix(m, \"minute\")}`;\n}\n// Convert date object to YYYY-MM-DD\nfunction $d5dc89801813ffec$var$date_to_string(date = $d5dc89801813ffec$var$current_date(), utc = true) {\n if (utc) return `${date.getUTCFullYear()}-${(\"0\" + (date.getUTCMonth() + 1)).slice(-2)}-${(\"0\" + date.getUTCDate()).slice(-2)}`;\n return `${date.getFullYear()}-${(\"0\" + (date.getMonth() + 1)).slice(-2)}-${(\"0\" + date.getDate()).slice(-2)}`;\n}\n// Helper functions for full screen\nfunction $d5dc89801813ffec$var$enterFullScreen(element = document.documentElement) {\n if (element.requestFullscreen) element.requestFullscreen();\n else if (element.webkitRequestFullscreen) element.webkitRequestFullscreen();\n else if (element.mozRequestFullScreen) element.mozRequestFullScreen();\n else if (element.msRequestFullscreen) element.msRequestFullscreen();\n}\nfunction $d5dc89801813ffec$var$exitFullscreen() {\n if (document.exitFullscreen) document.exitFullscreen();\n else if (document.webkitExitFullscreen) document.webkitExitFullscreen();\n else if (document.mozExitFullScreen) document.mozExitFullScreen();\n else if (document.msExitFullscreen) document.msExitFullscreen();\n}\nfunction $d5dc89801813ffec$var$canFullScreen() {\n return document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled;\n}\nfunction $d5dc89801813ffec$var$isFullScreen() {\n return (document.fullscreenElement || document.mozFullScreenElement || document.webkitIsFullScreen || document.msFullscreenElement || null) !== null;\n}\nfunction $d5dc89801813ffec$var$toggleFullScreen(element) {\n if ($d5dc89801813ffec$var$canFullScreen()) {\n if ($d5dc89801813ffec$var$isFullScreen()) $d5dc89801813ffec$var$exitFullscreen();\n else $d5dc89801813ffec$var$enterFullScreen(element);\n }\n}\nwindow.addEventListener(\"load\", ()=>{\n if (!document.querySelector(\"nav\")) return;\n const nav_links = document.querySelector(\"#nav-links\");\n document.querySelector(\"#nav-toggle-button\").addEventListener(\"click\", ()=>{\n nav_links.classList.toggle(\"show\");\n nav_links.style.maxHeight = nav_links.classList.contains(\"show\") ? nav_links.querySelector(\"ul\").clientHeight + \"px\" : \"\";\n });\n});\nwindow.addEventListener(\"resize\", ()=>{\n if (!document.querySelector(\"nav\")) return;\n const nav_links = document.querySelector(\"#nav-links\");\n if (nav_links.classList.contains(\"show\")) nav_links.style.maxHeight = nav_links.querySelector(\"ul\").clientHeight + \"px\";\n});\n// Convert array of RGB to hex\nfunction $d5dc89801813ffec$var$bytes_to_color(bytes) {\n return \"#\" + bytes.map((b)=>(\"0\" + b.toString(16)).slice(-2)).join(\"\");\n}\n// Detect whether text should be black or white based on the background color\nfunction $d5dc89801813ffec$var$black_or_white(color, opacity = 1) {\n if (!color.startsWith(\"#\")) color = `#${color}`;\n const r = Number.parseInt(color.slice(1, 3), 16);\n const g = Number.parseInt(color.slice(3, 5), 16);\n const b = Number.parseInt(color.slice(5, 7), 16);\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n return luma > 128 ? `rgba(0, 0, 0, ${opacity})` : `rgba(255, 255, 255, ${opacity})`;\n}\nasync function $d5dc89801813ffec$var$getServerOffset() {\n const response = await fetch(\"/api/v1/what-time-is-it\");\n const data = await response.text();\n const offset = data.split(\" \")[5];\n const h = Number.parseInt(offset.slice(0, -2), 10);\n const m = Number.parseInt(offset.slice(-2), 10);\n const serverUTCOffset = h * 60 + m;\n const utcOffset = new Date().getTimezoneOffset();\n const serverOffset = -serverUTCOffset - utcOffset;\n return serverOffset * 60000;\n}\n// Apply user colors\nwindow.addEventListener(\"load\", ()=>{\n $d5dc89801813ffec$var$setTheme();\n});\nfunction $d5dc89801813ffec$var$setTheme() {\n const cfg = $d5dc89801813ffec$var$config || {};\n const setBg = !(window.location.pathname === \"/\" && cfg.use_schedule_color);\n document.querySelector(\"meta[name=theme-color]\").setAttribute(\"content\", cfg.foreground_color || \"#1a2741\");\n if (setBg && cfg.background_color) document.querySelector(\"body\").style.setProperty(\"--background_color\", cfg.background_color || \"#c34614\");\n if (cfg.foreground_color) document.querySelector(\"body\").style.setProperty(\"--foreground_color\", cfg.foreground_color || \"#1a2741\");\n if (setBg && cfg.background_text_color) document.querySelector(\"body\").style.setProperty(\"--background_text_color\", cfg.background_text_color || \"#ffffff\");\n if (cfg.foreground_text_color) document.querySelector(\"body\").style.setProperty(\"--foreground_text_color\", cfg.foreground_text_color || \"#ffffff\");\n}\nfunction $d5dc89801813ffec$var$broadcastConfigToExtension() {\n $d5dc89801813ffec$var$updateConfig();\n if (typeof chrome !== \"undefined\" && typeof chrome.runtime !== \"undefined\") chrome.runtime.sendMessage(\"gbkjjbecehodfeijbdmoieepgmfdlgle\", {\n message: \"schedule\",\n data: JSON.stringify($d5dc89801813ffec$var$config)\n });\n}\nfunction $d5dc89801813ffec$var$setCookie(name, value, expires = 2 ** 31 * 1000, path = \"/\") {\n document.cookie = `${name}=${encodeURIComponent(value)}; ${expires ? `expires=${new Date(expires).toUTCString()}; ` : \"\"}path=${path}`;\n}\nfunction $d5dc89801813ffec$var$getCookie(name) {\n return document.cookie.split(\"; \").reduce((r, v)=>{\n const parts = v.split(\"=\");\n return parts[0] === name ? decodeURIComponent(parts[1]) : r;\n }, \"\");\n}\nfunction $d5dc89801813ffec$var$deleteCookie(name, path) {\n $d5dc89801813ffec$var$setCookie(name, \"\", null, path);\n}\n$d5dc89801813ffec$var$broadcastConfigToExtension();\nObject.assign(window, {\n black_or_white: $d5dc89801813ffec$var$black_or_white,\n bytes_to_color: $d5dc89801813ffec$var$bytes_to_color,\n canFullScreen: $d5dc89801813ffec$var$canFullScreen,\n current_date: $d5dc89801813ffec$var$current_date,\n date_from_api: $d5dc89801813ffec$var$date_from_api,\n date_string_to_date: $d5dc89801813ffec$var$date_string_to_date,\n date_to_string: $d5dc89801813ffec$var$date_to_string,\n enterFullScreen: $d5dc89801813ffec$var$enterFullScreen,\n exitFullscreen: $d5dc89801813ffec$var$exitFullscreen,\n get: $d5dc89801813ffec$var$get,\n getel: $d5dc89801813ffec$var$getel,\n go: $d5dc89801813ffec$var$go,\n human_list: $d5dc89801813ffec$var$human_list,\n human_time: $d5dc89801813ffec$var$human_time,\n human_time_left: $d5dc89801813ffec$var$human_time_left,\n isFullScreen: $d5dc89801813ffec$var$isFullScreen,\n period_html: $d5dc89801813ffec$var$period_html,\n plural_suffix: $d5dc89801813ffec$var$plural_suffix,\n process: $d5dc89801813ffec$var$process,\n replace_period: $d5dc89801813ffec$var$replace_period,\n toggleFullScreen: $d5dc89801813ffec$var$toggleFullScreen,\n put_period_to_element: $d5dc89801813ffec$var$put_period_to_element,\n setTheme: $d5dc89801813ffec$var$setTheme,\n broadcastConfigToExtension: $d5dc89801813ffec$var$broadcastConfigToExtension,\n setCookie: $d5dc89801813ffec$var$setCookie,\n getCookie: $d5dc89801813ffec$var$getCookie,\n deleteCookie: $d5dc89801813ffec$var$deleteCookie,\n config: $d5dc89801813ffec$var$config,\n DEFAULT_CONFIG: $d5dc89801813ffec$var$DEFAULT_CONFIG\n});\n// Writes a period to an element and its children\nfunction $d5dc89801813ffec$var$put_period_to_element(element, period) {\n if (period) {\n if (period.kind === \"BeforeSchool\") {\n element.innerHTML = \"School hasn't started yet!\";\n return false;\n }\n if (period.kind === \"AfterSchool\") {\n element.innerHTML = \"School's out!\";\n return false;\n }\n element.innerHTML = element.innerHTML.replaceAll(\"{START}\", $d5dc89801813ffec$var$human_time(period.start)).replaceAll(\"{END}\", $d5dc89801813ffec$var$human_time(period.end)).replaceAll(\"{START_IN}\", $d5dc89801813ffec$var$human_time_left(period.start, undefined, true)).replaceAll(\"{END_IN}\", $d5dc89801813ffec$var$human_time_left(period.end, undefined, true)).replaceAll(\"{NAME}\", period.url ? `${period.friendly_name}` : period.friendly_name);\n return true;\n }\n element.innerHTML = \"No School\";\n return false;\n}\nif (new URLSearchParams(window.location.search).get(\"fullscreen\") !== null) document.querySelector(\"nav\").style.display = \"none\";\n\n\n//# sourceMappingURL=index.0a17b35c.js.map\n","const DEFAULT_CONFIG = {\n\tschedule: {},\n\tforeground_color: '#1a2741',\n\tbackground_color: '#c34614',\n\tforeground_text_color: '#ffffff',\n\tbackground_text_color: '#ffffff',\n\tinclude_period_name: true,\n\tuse_schedule_color: true,\n};\n\n// Start helpers\nlet lastFetchedData = null;\nconst serverOffset = null;\n\nasync function get(endpoint = '/api/v1/today/now/near') {\n\treturn fetch(\n\t\t`${endpoint}?timestamp=${Math.floor(current_date().getTime() / 1000)}`,\n\t)\n\t\t.then(x => x.json().catch(() => null))\n\t\t.catch(() => null);\n}\n\nlet config;\nfunction updateConfig() {\n\tconfig = Object.assign(\n\t\tDEFAULT_CONFIG,\n\t\tJSON.parse(localStorage.getItem('schedule') || '{}'),\n\t);\n\treturn config;\n}\n\nupdateConfig();\n\nfunction replace_period(period) {\n\tif (!period) {\n\t\treturn period;\n\t}\n\n\tif (Array.isArray(period)) {\n\t\treturn period.map(v => replace_period(v));\n\t}\n\n\tconst period_tmp = Object.assign({}, period);\n\n\tconst class_id = period_tmp.kind.Class || period_tmp.kind.ClassOrLunch;\n\tconst class_cfg\n\t\t= config.schedule[class_id] || config.schedule[period_tmp.friendly_name];\n\tif (class_cfg) {\n\t\tif (class_cfg.name) {\n\t\t\tperiod_tmp.friendly_name\n\t\t\t\t= config.include_period_name\n\t\t\t\t|| config.include_period_name === undefined\n\t\t\t\t\t? `${period_tmp.friendly_name} - ${class_cfg.name}`\n\t\t\t\t\t: class_cfg.name;\n\t\t}\n\n\t\tif (class_cfg.url) {\n\t\t\tperiod_tmp.url = class_cfg.url;\n\t\t}\n\t}\n\n\treturn period_tmp;\n}\n\nfunction process(data) {\n\tif (config) {\n\t\treturn data.map(v => replace_period(v));\n\t}\n\n\treturn data;\n}\n\nfunction period_html(period) {\n\treturn period\n\t\t? (period.url\n\t\t\t? `${period.friendly_name\n\t\t\t\t.replaceAll('<', '<')\n\t\t\t\t.replaceAll('>', '>')}`\n\t\t\t: period.friendly_name\n\t\t\t\t.replaceAll('<', '<')\n\t\t\t\t.replaceAll('>', '>'))\n\t\t: 'None';\n}\n\nfunction getel(id) {\n\treturn document.querySelector(`#${id}`);\n}\n\nasync function go(display) {\n\tif (lastFetchedData) {\n\t\tdisplay(lastFetchedData);\n\t}\n\n\tconst now = Date.now();\n\tconst endOfMinute = Math.ceil(now / 60000) * 60000;\n\tsetTimeout(() => go(display), endOfMinute - now);\n\tlet data = await get();\n\tif (!data) {\n\t\treturn;\n\t}\n\n\tdata = process(data);\n\tlastFetchedData = data;\n\tdisplay(data);\n}\n\nfunction human_list(items) {\n\tlet output = '';\n\tif (items.length === 1) {\n\t\treturn items[0].toString();\n\t}\n\n\tfor (let i = 0; i < items.length; i++) {\n\t\tif (i === items.length - 1) {\n\t\t\toutput += `${items.length > 2 ? ', ' : ' '}and ${items[\n\t\t\t\ti\n\t\t\t].toString()}`;\n\t\t} else if (i === 0) {\n\t\t\toutput += items[i].toString();\n\t\t} else {\n\t\t\toutput += `, ${items[i].toString()}`;\n\t\t}\n\t}\n\n\treturn output;\n}\n\n// Add plural suffix to a unit\nfunction plural_suffix(number, string) {\n\treturn `${string}${number === 1 ? '' : 's'}`;\n}\n\n// Gets current date\n// If timestamp query string is provided, that is used instead of current.\nfunction current_date() {\n\tconst timestampQueryString = new URLSearchParams(\n\t\twindow.location.search,\n\t).get('timestamp');\n\tif (timestampQueryString) {\n\t\treturn new Date(Number.parseInt(timestampQueryString, 10) * 1000);\n\t}\n\n\treturn new Date();\n}\n\nfunction date_from_api(time, now = current_date()) {\n\tconst [h, m, s] = time.split(':');\n\tconst date = new Date(\n\t\tnow.getUTCFullYear(),\n\t\tnow.getUTCMonth(),\n\t\tnow.getUTCDate(),\n\t\th,\n\t\tm,\n\t\ts,\n\t);\n\treturn date;\n}\n\n// YYYY-MM-DD to Date object\nfunction date_string_to_date(dateString) {\n\tconst [y, m, d] = dateString.split('-');\n\treturn new Date(\n\t\tNumber.parseInt(y, 10),\n\t\tNumber.parseInt(m, 10) - 1,\n\t\tNumber.parseInt(d, 10),\n\t);\n}\n\nfunction human_time(time) {\n\tconst date = date_from_api(time);\n\treturn date.toLocaleTimeString('en-US', {\n\t\thour: 'numeric',\n\t\tminute: '2-digit',\n\t});\n}\n\n// Gets a human readable duration from an epoch timestamp\nfunction human_time_left(endTime, startTime = null, short = false) {\n\tconst startDate = startTime\n\t\t? date_from_api(startTime).getTime()\n\t\t: current_date().getTime();\n\tconst endDate = date_from_api(endTime).getTime();\n\tconst timeLeft = Math.floor((endDate - startDate) / 1000);\n\tconst h = Math.floor(timeLeft / 60 / 60);\n\tconst m = Math.ceil((timeLeft / 60) % 60);\n\tif (short) {\n\t\tif (h > 0) {\n\t\t\treturn `${h}h ${m}m`;\n\t\t}\n\n\t\treturn `${m}m`;\n\t}\n\n\tif (h > 0) {\n\t\treturn `${h} ${plural_suffix(h, 'hour')} and ${m} ${plural_suffix(\n\t\t\tm,\n\t\t\t'minute',\n\t\t)}`;\n\t}\n\n\treturn `${m} ${plural_suffix(m, 'minute')}`;\n}\n\n// Convert date object to YYYY-MM-DD\nfunction date_to_string(date = current_date(), utc = true) {\n\tif (utc) {\n\t\treturn `${date.getUTCFullYear()}-${(\n\t\t\t'0'\n\t\t\t+ (date.getUTCMonth() + 1)\n\t\t).slice(-2)}-${('0' + date.getUTCDate()).slice(-2)}`;\n\t}\n\n\treturn `${date.getFullYear()}-${('0' + (date.getMonth() + 1)).slice(-2)}-${(\n\t\t'0' + date.getDate()\n\t).slice(-2)}`;\n}\n\n// Helper functions for full screen\nfunction enterFullScreen(element = document.documentElement) {\n\tif (element.requestFullscreen) {\n\t\telement.requestFullscreen();\n\t} else if (element.webkitRequestFullscreen) {\n\t\telement.webkitRequestFullscreen();\n\t} else if (element.mozRequestFullScreen) {\n\t\telement.mozRequestFullScreen();\n\t} else if (element.msRequestFullscreen) {\n\t\telement.msRequestFullscreen();\n\t}\n}\n\nfunction exitFullscreen() {\n\tif (document.exitFullscreen) {\n\t\tdocument.exitFullscreen();\n\t} else if (document.webkitExitFullscreen) {\n\t\tdocument.webkitExitFullscreen();\n\t} else if (document.mozExitFullScreen) {\n\t\tdocument.mozExitFullScreen();\n\t} else if (document.msExitFullscreen) {\n\t\tdocument.msExitFullscreen();\n\t}\n}\n\nfunction canFullScreen() {\n\treturn (\n\t\tdocument.fullscreenEnabled\n\t\t|| document.mozFullScreenEnabled\n\t\t|| document.webkitFullscreenEnabled\n\t\t|| document.msFullscreenEnabled\n\t);\n}\n\nfunction isFullScreen() {\n\treturn (\n\t\t(document.fullscreenElement\n\t\t\t|| document.mozFullScreenElement\n\t\t\t|| document.webkitIsFullScreen\n\t\t\t|| document.msFullscreenElement\n\t\t\t|| null) !== null\n\t);\n}\n\nfunction toggleFullScreen(element) {\n\tif (canFullScreen()) {\n\t\tif (isFullScreen()) {\n\t\t\texitFullscreen();\n\t\t} else {\n\t\t\tenterFullScreen(element);\n\t\t}\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tif (!document.querySelector('nav')) {\n\t\treturn;\n\t}\n\n\tconst nav_links = document.querySelector('#nav-links');\n\tdocument\n\t\t.querySelector('#nav-toggle-button')\n\t\t.addEventListener('click', () => {\n\t\t\tnav_links.classList.toggle('show');\n\t\t\tnav_links.style.maxHeight = nav_links.classList.contains('show')\n\t\t\t\t? nav_links.querySelector('ul').clientHeight + 'px'\n\t\t\t\t: '';\n\t\t});\n});\n\nwindow.addEventListener('resize', () => {\n\tif (!document.querySelector('nav')) {\n\t\treturn;\n\t}\n\n\tconst nav_links = document.querySelector('#nav-links');\n\tif (nav_links.classList.contains('show')) {\n\t\tnav_links.style.maxHeight\n\t\t\t= nav_links.querySelector('ul').clientHeight + 'px';\n\t}\n});\n\n// Convert array of RGB to hex\nfunction bytes_to_color(bytes) {\n\treturn '#' + bytes.map(b => ('0' + b.toString(16)).slice(-2)).join('');\n}\n\n// Detect whether text should be black or white based on the background color\nfunction black_or_white(color, opacity = 1) {\n\tif (!color.startsWith('#')) {\n\t\tcolor = `#${color}`;\n\t}\n\n\tconst r = Number.parseInt(color.slice(1, 3), 16);\n\tconst g = Number.parseInt(color.slice(3, 5), 16);\n\tconst b = Number.parseInt(color.slice(5, 7), 16);\n\tconst luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\treturn luma > 128\n\t\t? `rgba(0, 0, 0, ${opacity})`\n\t\t: `rgba(255, 255, 255, ${opacity})`;\n}\n\nasync function getServerOffset() {\n\tconst response = await fetch('/api/v1/what-time-is-it');\n\tconst data = await response.text();\n\tconst offset = data.split(' ')[5];\n\tconst h = Number.parseInt(offset.slice(0, -2), 10);\n\tconst m = Number.parseInt(offset.slice(-2), 10);\n\tconst serverUTCOffset = h * 60 + m;\n\tconst utcOffset = new Date().getTimezoneOffset();\n\tconst serverOffset = -serverUTCOffset - utcOffset;\n\treturn serverOffset * 60 * 1000;\n}\n\n// Apply user colors\nwindow.addEventListener('load', () => {\n\tsetTheme();\n});\n\nfunction setTheme() {\n\tconst cfg = config || {};\n\tconst setBg = !(window.location.pathname === '/' && cfg.use_schedule_color);\n\n\tdocument\n\t\t.querySelector('meta[name=theme-color]')\n\t\t.setAttribute('content', cfg.foreground_color || '#1a2741');\n\n\tif (setBg && cfg.background_color) {\n\t\tdocument\n\t\t\t.querySelector('body')\n\t\t\t.style.setProperty('--background_color', cfg.background_color || '#c34614');\n\t}\n\n\tif (cfg.foreground_color) {\n\t\tdocument\n\t\t\t.querySelector('body')\n\t\t\t.style.setProperty('--foreground_color', cfg.foreground_color || '#1a2741');\n\t}\n\n\tif (setBg && cfg.background_text_color) {\n\t\tdocument\n\t\t\t.querySelector('body')\n\t\t\t.style.setProperty(\n\t\t\t\t'--background_text_color',\n\t\t\t\tcfg.background_text_color || '#ffffff',\n\t\t\t);\n\t}\n\n\tif (cfg.foreground_text_color) {\n\t\tdocument\n\t\t\t.querySelector('body')\n\t\t\t.style.setProperty(\n\t\t\t\t'--foreground_text_color',\n\t\t\t\tcfg.foreground_text_color || '#ffffff',\n\t\t\t);\n\t}\n}\n\nfunction broadcastConfigToExtension() {\n\tupdateConfig();\n\tif (\n\t\ttypeof chrome !== 'undefined'\n\t\t&& typeof chrome.runtime !== 'undefined'\n\t) {\n\t\tchrome.runtime.sendMessage('gbkjjbecehodfeijbdmoieepgmfdlgle', {\n\t\t\tmessage: 'schedule',\n\t\t\tdata: JSON.stringify(config),\n\t\t});\n\t}\n}\n\nfunction setCookie(name, value, expires = (2 ** 31 * 1000), path = '/') {\n\tdocument.cookie = `${name}=${encodeURIComponent(value)}; ${\n\t\texpires ? `expires=${new Date(expires).toUTCString()}; ` : ''\n\t}path=${path}`;\n}\n\nfunction getCookie(name) {\n\treturn document.cookie.split('; ').reduce((r, v) => {\n\t\tconst parts = v.split('=');\n\t\treturn parts[0] === name ? decodeURIComponent(parts[1]) : r;\n\t}, '');\n}\n\nfunction deleteCookie(name, path) {\n\tsetCookie(name, '', null, path);\n}\n\nbroadcastConfigToExtension();\n\nObject.assign(window, {\n\tblack_or_white,\n\tbytes_to_color,\n\tcanFullScreen,\n\tcurrent_date,\n\tdate_from_api,\n\tdate_string_to_date,\n\tdate_to_string,\n\tenterFullScreen,\n\texitFullscreen,\n\tget,\n\tgetel,\n\tgo,\n\thuman_list,\n\thuman_time,\n\thuman_time_left,\n\tisFullScreen,\n\tperiod_html,\n\tplural_suffix,\n\tprocess,\n\treplace_period,\n\ttoggleFullScreen,\n\tput_period_to_element,\n\tsetTheme,\n\tbroadcastConfigToExtension,\n\tsetCookie,\n\tgetCookie,\n\tdeleteCookie,\n\tconfig,\n\tDEFAULT_CONFIG,\n});\n\n// Writes a period to an element and its children\nfunction put_period_to_element(element, period) {\n\tif (period) {\n\t\tif (period.kind === 'BeforeSchool') {\n\t\t\telement.innerHTML = 'School hasn\\'t started yet!';\n\t\t\treturn false;\n\t\t}\n\n\t\tif (period.kind === 'AfterSchool') {\n\t\t\telement.innerHTML = 'School\\'s out!';\n\t\t\treturn false;\n\t\t}\n\n\t\telement.innerHTML = element.innerHTML\n\t\t\t.replaceAll('{START}', human_time(period.start))\n\t\t\t.replaceAll('{END}', human_time(period.end))\n\t\t\t.replaceAll(\n\t\t\t\t'{START_IN}',\n\t\t\t\thuman_time_left(period.start, undefined, true),\n\t\t\t)\n\t\t\t.replaceAll(\n\t\t\t\t'{END_IN}',\n\t\t\t\thuman_time_left(period.end, undefined, true),\n\t\t\t)\n\t\t\t.replaceAll(\n\t\t\t\t'{NAME}',\n\t\t\t\tperiod.url\n\t\t\t\t\t? `${period.friendly_name}`\n\t\t\t\t\t: period.friendly_name,\n\t\t\t);\n\t\treturn true;\n\t}\n\n\telement.innerHTML = 'No School';\n\treturn false;\n}\n\nif (new URLSearchParams(\n\twindow.location.search,\n).get('fullscreen') !== null) {\n\tdocument.querySelector('nav').style.display = 'none';\n}\n"],"names":["$d5dc89801813ffec$var$config","$d5dc89801813ffec$var$DEFAULT_CONFIG","schedule","foreground_color","background_color","foreground_text_color","background_text_color","include_period_name","use_schedule_color","$d5dc89801813ffec$var$lastFetchedData","$d5dc89801813ffec$var$get","endpoint","fetch","Math","floor","$d5dc89801813ffec$var$current_date","getTime","then","x","json","catch","$d5dc89801813ffec$var$updateConfig","Object","assign","JSON","parse","localStorage","getItem","$d5dc89801813ffec$var$replace_period","period","Array","isArray","map","v","period_tmp","class_id","kind","Class","ClassOrLunch","class_cfg","friendly_name","name","undefined","url","$d5dc89801813ffec$var$process","data","$d5dc89801813ffec$var$go","display","now","Date","setTimeout","endOfMinute","ceil","$d5dc89801813ffec$var$plural_suffix","number","string","timestampQueryString","URLSearchParams","window","location","search","get","Number","parseInt","$d5dc89801813ffec$var$date_from_api","time","h","m","s","split","date","getUTCFullYear","getUTCMonth","getUTCDate","$d5dc89801813ffec$var$human_time","toLocaleTimeString","hour","minute","$d5dc89801813ffec$var$human_time_left","endTime","startTime","short","startDate","endDate","timeLeft","$d5dc89801813ffec$var$enterFullScreen","element","document","documentElement","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","$d5dc89801813ffec$var$exitFullscreen","exitFullscreen","webkitExitFullscreen","mozExitFullScreen","msExitFullscreen","$d5dc89801813ffec$var$canFullScreen","fullscreenEnabled","mozFullScreenEnabled","webkitFullscreenEnabled","msFullscreenEnabled","$d5dc89801813ffec$var$isFullScreen","fullscreenElement","mozFullScreenElement","webkitIsFullScreen","msFullscreenElement","$d5dc89801813ffec$var$setTheme","cfg","setBg","pathname","querySelector","setAttribute","style","setProperty","$d5dc89801813ffec$var$broadcastConfigToExtension","chrome","runtime","sendMessage","message","stringify","$d5dc89801813ffec$var$setCookie","value","expires","path","cookie","encodeURIComponent","toUTCString","addEventListener","nav_links","classList","toggle","maxHeight","contains","clientHeight","black_or_white","color","opacity","startsWith","r","slice","g","b","luma","bytes_to_color","bytes","toString","join","canFullScreen","current_date","date_from_api","date_string_to_date","dateString","y","d","date_to_string","utc","getFullYear","getMonth","getDate","enterFullScreen","getel","id","go","human_list","items","output","length","i","human_time","human_time_left","isFullScreen","period_html","replaceAll","plural_suffix","process","replace_period","toggleFullScreen","put_period_to_element","innerHTML","start","end","setTheme","broadcastConfigToExtension","setCookie","getCookie","reduce","parts","decodeURIComponent","deleteCookie","config","DEFAULT_CONFIG"],"version":3,"file":"index.0a17b35c.js.map"}