// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ // ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃ // ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃ // ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃ // ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃ // ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫ // ┃ Copyright (c) 2017, the Perspective Authors. ┃ // ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃ // ┃ This file is part of the Perspective library, distributed under the terms ┃ // ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃ // ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ import "/node_modules/@perspective-dev/viewer/dist/cdn/perspective-viewer.js"; import "/node_modules/@perspective-dev/workspace/dist/cdn/perspective-workspace.js"; import "/node_modules/@perspective-dev/viewer-datagrid/dist/cdn/perspective-viewer-datagrid.js"; import "/node_modules/@perspective-dev/viewer-charts/dist/cdn/perspective-viewer-charts.js"; import perspective from "/node_modules/@perspective-dev/client/dist/cdn/perspective.js"; let DATA_URL = "nypdccrb.arrow"; let LAYOUTS = localStorage.getItem("layouts") ? JSON.parse(localStorage.getItem("layouts")) : undefined; const worker = await perspective.worker(); const theme_style_node = document.createElement("style"); document.head.appendChild(theme_style_node); let DARK_THEME; let LIGHT_THEME; function toggle_theme() { if (theme_style_node.dataset.theme === "Pro Light") { theme_style_node.textContent = DARK_THEME; document.body.classList.add("dark"); window.theme.textContent = "Light Theme"; for (const view of document.querySelectorAll("perspective-viewer")) { view.setAttribute("theme", "Pro Dark"); view.restyleElement(); } theme_style_node.dataset.theme = "Pro Dark"; } else { theme_style_node.textContent = LIGHT_THEME; document.body.classList.remove("dark"); window.theme.textContent = "Dark Theme"; for (const view of document.querySelectorAll("perspective-viewer")) { view.setAttribute("theme", "Pro Light"); view.restyleElement(); } theme_style_node.dataset.theme = "Pro Light"; } } async function fetch_progress(url) { window.message.textContent = "Downloading..."; const response = await fetch(url); const ab = await new Response(await response.blob()).arrayBuffer(); window.message.style.display = "none"; return ab; } DARK_THEME = await fetch( "/node_modules/@perspective-dev/workspace/dist/css/pro-dark.css", ).then((x) => x.text()); LIGHT_THEME = await fetch( "/node_modules/@perspective-dev/workspace/dist/css/pro.css", ).then((x) => x.text()); document.body.innerHTML = `