From 6156359673e79ec8d220f686d1634d8ad8adb83e Mon Sep 17 00:00:00 2001 From: Yamazaki Mitsuyoshi Date: Wed, 16 Jun 2021 16:15:33 +0900 Subject: [PATCH 1/8] =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../drawer/vanilla_lsystem_rule.ts | 20 ++- .../flexible_lsystem_rule.ts | 21 +++ .../html_arguments.json | 6 + .../drawer_change_parameter/layout.tsx | 21 +++ .../drawer_change_parameter/source.ts | 147 ++++++++++++++++++ .../flexible_lsystem_rule.test.ts | 22 +++ webpack.config.js | 1 + 7 files changed, 237 insertions(+), 1 deletion(-) create mode 100644 src/simulations/drawer_change_parameter/flexible_lsystem_rule.ts create mode 100644 src/simulations/drawer_change_parameter/html_arguments.json create mode 100644 src/simulations/drawer_change_parameter/layout.tsx create mode 100644 src/simulations/drawer_change_parameter/source.ts create mode 100644 test/simulations/drawer_change_parameter/flexible_lsystem_rule.test.ts diff --git a/src/simulations/drawer/vanilla_lsystem_rule.ts b/src/simulations/drawer/vanilla_lsystem_rule.ts index 355cf23..96ea763 100644 --- a/src/simulations/drawer/vanilla_lsystem_rule.ts +++ b/src/simulations/drawer/vanilla_lsystem_rule.ts @@ -127,7 +127,7 @@ export class VanillaLSystemRule implements LSystemRule { } const condition = keyValue[0] const nextConditions = keyValue[1].split(",").map((stringValue: string): LSystemCondition => { - const numberValue = parseInt(stringValue, 10) + const numberValue = parseFloat(stringValue) if (isNaN(numberValue) === true) { if (stringValue.length <= 0) { throw new Error(`Invalid condition: empty string ${pair}`) @@ -177,6 +177,24 @@ export class VanillaLSystemRule implements LSystemRule { return new VanillaLSystemRule(trimmedRule) } + public encodedWith(encoder: ((condition: LSystemCondition) => string)): string { + const conditionMapper = (condition: LSystemCondition): string => { + if (typeof condition === "string") { + return condition + } else { + return encoder(condition) + } + } + + const result: string[] = [] + this._map.forEach((value, key) => { + const nextCondition = value.map(conditionMapper).join(",") + result.push(`${key}:${nextCondition}`) + }) + + return result.join(";") + } + public nextConditions(currentCondition: string): LSystemCondition[] { const nextConditions = this._map.get(currentCondition) if (nextConditions == null) { diff --git a/src/simulations/drawer_change_parameter/flexible_lsystem_rule.ts b/src/simulations/drawer_change_parameter/flexible_lsystem_rule.ts new file mode 100644 index 0000000..c599d73 --- /dev/null +++ b/src/simulations/drawer_change_parameter/flexible_lsystem_rule.ts @@ -0,0 +1,21 @@ +import { VanillaLSystemRule } from "../drawer/vanilla_lsystem_rule" + +export class FlexibleLsystemRule { + public constructor( + public readonly rule: VanillaLSystemRule, + public readonly changes: number[], + ) { + if (this.canEncode() === false) { + throw new Error(`Number of numbers in rule ${rule.encoded} not match to changes ${changes}`) + } + } + + private canEncode(): boolean { + let changesCount = this.changes.length + this.rule.encodedWith(condition => { + changesCount -= 1 + return `${condition}` + }) + return changesCount === 0 + } +} \ No newline at end of file diff --git a/src/simulations/drawer_change_parameter/html_arguments.json b/src/simulations/drawer_change_parameter/html_arguments.json new file mode 100644 index 0000000..dddc1ae --- /dev/null +++ b/src/simulations/drawer_change_parameter/html_arguments.json @@ -0,0 +1,6 @@ +{ + "page_title": "Title", + "og_description": "Description", + "og_image": "", + "script_path": "../dist/drawer_change_parameter.js" +} \ No newline at end of file diff --git a/src/simulations/drawer_change_parameter/layout.tsx b/src/simulations/drawer_change_parameter/layout.tsx new file mode 100644 index 0000000..700fa5d --- /dev/null +++ b/src/simulations/drawer_change_parameter/layout.tsx @@ -0,0 +1,21 @@ +import p5 from "p5" +import React from "react" +import ReactDOM from "react-dom" +import { DetailPage, ScreenshotButtonDefault } from "../../react-components/lab/detail_page" +import { main, getTimestamp } from "./source" + +const App = () => { + const screenshotButton: ScreenshotButtonDefault = { + kind: "default", + getTimestamp, + getDescription: () => document.location.search + } + return ( + + + ) +} + +ReactDOM.render(, document.getElementById("root")) +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const sketch = new p5(main) diff --git a/src/simulations/drawer_change_parameter/source.ts b/src/simulations/drawer_change_parameter/source.ts new file mode 100644 index 0000000..a24de55 --- /dev/null +++ b/src/simulations/drawer_change_parameter/source.ts @@ -0,0 +1,147 @@ +import p5 from "p5" +import { constants } from "../drawer/constants" +import { Vector } from "../../classes/physics" +import { random } from "../../classes/utilities" +import { ImmortalModel, Model, Result, RuleDescription } from "../drawer/model" +import { defaultCanvasParentId } from "../../react-components/common/default_canvas_parent_id" +import { VanillaLSystemRule } from "../drawer/vanilla_lsystem_rule" +import { exampleRules } from "../drawer/rule_examples" +import { Downloader } from "../drawer/downloader" +import { TransitionColoredModel } from "../drawer/transition_colored_model" + +let t = 0 +const canvasId = "canvas" +const fieldSize = constants.system.fieldSize +const firstRule: string | undefined = constants.system.run ? undefined : + (constants.simulation.lSystemRule.length > 0 ? constants.simulation.lSystemRule : randomExampleRule()) +let currentModel = createModel(firstRule) +const downloader = new Downloader() + +export const canvasWidth = fieldSize + +export const main = (p: p5): void => { + p.setup = () => { + const canvas = p.createCanvas(fieldSize, fieldSize) + canvas.id(canvasId) + canvas.parent(defaultCanvasParentId) + + p.background(0x0, 0xFF) + } + + p.draw = () => { + if (downloader.isSaving === true) { + return + } + + if (["depth", "transition"].includes(constants.draw.colorTheme)) { + p.background(0xFF, 0xFF) + } else { + p.background(0x0, 0xFF) + } + + if (t % constants.simulation.executionInterval === 0) { + currentModel.execute() + } + currentModel.draw(p, constants.draw.showsQuadtree) + + if (constants.system.run && currentModel.result != null) { + const result = currentModel.result + const status = `${result.status.numberOfLines} lines, ${result.status.numberOfNodes} nodes` + const rules = result.rules.sort((lhs: RuleDescription, rhs: RuleDescription) => { + if (lhs.numberOfDrawers === rhs.numberOfDrawers) { + return 0 + } + return lhs.numberOfDrawers < rhs.numberOfDrawers ? 1 : -1 + }) + const ruleDescription = rules.reduce((r, rule) => `${r}\n${rule.numberOfDrawers} drawers: ${rule.rule}`, "") + console.log(`completed at ${t} (${result.t} steps, ${result.reason}, ${status}) ${result.description}\n${ruleDescription}`) + if (constants.system.autoDownload && shouldSave(result)) { + downloader.save("", rules, t, result.t) + } + currentModel = createModel() + } + + t += 1 + } +} + +export const saveCurrentState = (): void => { + const result = currentModel.currentResult("Running") + const rules = result.rules.sort((lhs: RuleDescription, rhs: RuleDescription) => { + if (lhs.numberOfDrawers === rhs.numberOfDrawers) { + return 0 + } + return lhs.numberOfDrawers < rhs.numberOfDrawers ? 1 : -1 + }) + downloader.save("", rules, t, result.t) +} + +function createModel(ruleString?: string): Model { + const rules: VanillaLSystemRule[] = [] + if (ruleString != null) { + try { + rules.push(new VanillaLSystemRule(ruleString)) + } catch (error) { + alert(`Invalid rule ${ruleString}`) + throw error + } + } else { + const initialCondition = VanillaLSystemRule.initialCondition + for (let i = 0; i < constants.simulation.numberOfSeeds; i += 1) { + const tries = 20 + for (let j = 0; j < tries; j += 1) { + const rule = VanillaLSystemRule.trimUnreachableConditions(VanillaLSystemRule.random(), initialCondition) + if (rule.isCirculated(initialCondition)) { + rules.push(rule) + break + } + } + } + if (rules.length === 0) { + rules.push(new VanillaLSystemRule(randomExampleRule())) + } + } + const modelOf = (colorTheme: string): Model => { + if (colorTheme === "transition") { + return new TransitionColoredModel( + new Vector(fieldSize, fieldSize), + constants.simulation.maxLineCount, + rules, + constants.simulation.mutationRate, + constants.simulation.lineLengthType, + colorTheme, + constants.simulation.fixedStartPoint, + constants.simulation.obstacle, + ) + } else { + return new ImmortalModel( + new Vector(fieldSize, fieldSize), + constants.simulation.maxLineCount, + rules, + constants.simulation.mutationRate, + constants.simulation.lineLengthType, + colorTheme, + constants.simulation.fixedStartPoint, + constants.simulation.obstacle, + ) + } + } + const model = modelOf(constants.draw.colorTheme) + model.showsBorderLine = constants.draw.showsBorderLine + model.lineCollisionEnabled = constants.simulation.lineCollisionEnabled + model.quadtreeEnabled = constants.system.quadtreeEnabled + model.concurrentExecutionNumber = constants.simulation.concurrentExecutionNumber + + return model +} + +function shouldSave(result: Result): boolean { + if (result.status.numberOfLines < 100) { + return false + } + return true +} + +function randomExampleRule(): string { + return exampleRules[Math.floor(random(exampleRules.length))] +} \ No newline at end of file diff --git a/test/simulations/drawer_change_parameter/flexible_lsystem_rule.test.ts b/test/simulations/drawer_change_parameter/flexible_lsystem_rule.test.ts new file mode 100644 index 0000000..a08882c --- /dev/null +++ b/test/simulations/drawer_change_parameter/flexible_lsystem_rule.test.ts @@ -0,0 +1,22 @@ +import { VanillaLSystemRule } from "../../../src/simulations/drawer/vanilla_lsystem_rule" +import { FlexibleLsystemRule } from "../../../src/simulations/drawer_change_parameter/flexible_lsystem_rule" + +describe("FlexibleLsystemRule", () => { + test("Instantiate", () => { + const createRule = (rule: string, changes: number[]): FlexibleLsystemRule => { + return new FlexibleLsystemRule(new VanillaLSystemRule(rule), changes) + } + + expect(() => createRule("A:0,A", [])).toThrow() + expect(() => createRule("A:0,A", [1])).not.toThrow() + expect(() => createRule("A:0,A", [1, 1])).toThrow() + + expect(() => createRule("A:0,A,1,A", [1])).toThrow() + expect(() => createRule("A:0,A,1,A", [1, 1])).not.toThrow() + expect(() => createRule("A:0,A,1,A", [1, 1, 1])).toThrow() + + expect(() => createRule("A:0,B;B:1,B", [1])).toThrow() + expect(() => createRule("A:0,B;B:1,B", [1, 1])).not.toThrow() + expect(() => createRule("A:0,B;B:1,B", [1, 1, 1])).toThrow() + }) +}) diff --git a/webpack.config.js b/webpack.config.js index 86014af..6cfab5a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,6 +16,7 @@ module.exports = { drawer_mortal: "./src/simulations/drawer_mortal/layout.tsx", drawer_symmetry: "./src/simulations/drawer_symmetry/layout.tsx", drawer_gallery: "./src/simulations/drawer_gallery/layout.tsx", + drawer_change_parameter: "./src/simulations/drawer_change_parameter/layout.tsx", cellular_automata: "./src/simulations/cellular_automata/layout.tsx", hex_cellular_automata: "./src/simulations/hex_cellular_automata/layout.tsx", hex_cellular_automata_autosearch: "./src/simulations/hex_cellular_automata_autosearch/layout.tsx", From bff8cbbe515aa402700ca7a8d89540ed3572f13f Mon Sep 17 00:00:00 2001 From: Yamazaki Mitsuyoshi Date: Wed, 16 Jun 2021 16:44:08 +0900 Subject: [PATCH 2/8] =?UTF-8?q?=E8=AA=AC=E6=98=8E=E3=82=92=E8=A8=98?= =?UTF-8?q?=E8=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/drawer.js | 4 +- dist/drawer_change_parameter.js | 1711 +++++++++++++++++ dist/drawer_gallery.js | 2 +- dist/drawer_mortal.js | 4 +- dist/drawer_symmetry.js | 2 +- dist/lab.js | 2 +- pages/drawer_change_parameter.html | 27 + src/pages/lab/layout.tsx | 1 + src/simulations/drawer/constants.ts | 11 + .../drawer_change_parameter/layout.tsx | 40 +- .../flexible_lsystem_rule.test.ts | 2 +- 11 files changed, 1790 insertions(+), 16 deletions(-) create mode 100644 dist/drawer_change_parameter.js create mode 100644 pages/drawer_change_parameter.html diff --git a/dist/drawer.js b/dist/drawer.js index 0200808..6579e76 100644 --- a/dist/drawer.js +++ b/dist/drawer.js @@ -1488,7 +1488,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"constants\": () => /* binding */ constants\n/* harmony export */ });\n/* harmony import */ var _classes_url_parameter_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../classes/url_parameter_parser */ \"./src/classes/url_parameter_parser.ts\");\n\nconst parameters = new _classes_url_parameter_parser__WEBPACK_IMPORTED_MODULE_0__.URLParameterParser();\n// 指定できるURLパラメータの一覧\n// parameters.boolean/int/float/string(\"パラメータ名\", 指定されない場合のデフォルト値, \"パラメータ名省略記法\")\nconst constants = {\n system: {\n // Canvasサイズ\n fieldSize: parameters.int(\"system.size\", 600, \"s\"),\n // 1で綺麗そうな絵になるルールを自動探索 \n run: parameters.boolean(\"system.run\", false, \"r\"),\n // system.run=1の場合、1で有望なルールと画像を自動的にダウンロード\n autoDownload: parameters.boolean(\"system.auto_download\", false, \"d\"),\n // 1で四分木による計算量削減を有効化\n quadtreeEnabled: parameters.boolean(\"system.quadtree\", true, \"q\"),\n },\n simulation: {\n // 動作を遅くしたい場合に増やす。1未満の値(高速化)は動作しない\n executionInterval: parameters.int(\"simulation.execution_interval\", 1, \"s.i\"),\n // 描画する線分の上限\n maxLineCount: parameters.int(\"simulation.max_line_count\", 5000, \"s.l\"),\n // 1で線分の衝突判定を有効化し、他と衝突する線分を消す\n lineCollisionEnabled: parameters.boolean(\"simulation.line_collision_enabled\", true, \"s.c\"),\n // L-Systemのルールを指定する。 ルールの例はrule_examples.ts\n lSystemRule: parameters.string(\"simulation.lsystem_rule\", \"\", \"s.r\"),\n // L-Systemの **状態の** 突然変異率(ルールの、ではない)\n mutationRate: parameters.float(\"simulation.mutation_rate\", 0, \"s.m\"),\n // system.run=1のとき、同時に実行するL-Systemルールの数\n numberOfSeeds: parameters.int(\"simulation.number_of_seeds\", 1, \"s.s\"),\n // 1で描画開始位置を固定する。system.run=0のときのみ有効\n fixedStartPoint: parameters.boolean(\"simulation.fixed_start_point\", false, \"s.f\"),\n // 障害物を配置\n obstacle: parameters.boolean(\"simulation.obstacle\", false, \"s.ob\"),\n concurrentExecutionNumber: parameters.int(\"simulation.concurrent_execution\", 100, \"s.ce\"),\n lineLifeSpan: parameters.int(\"simulation.line_life_span\", 10, \"s.ls\"),\n lineLengthType: parameters.int(\"simulation.line_line_length_type\", 0, \"s.ll\"),\n symmetric: parameters.boolean(\"simulation.force_simmetric\", false, \"s.sy\"),\n },\n draw: {\n // 1でcanvas境界に配置した境界線を描画\n showsBorderLine: parameters.boolean(\"draw.shows_border_line\", false, \"d.b\"),\n // 1で四分木のノードを描画\n showsQuadtree: parameters.boolean(\"draw.shows_quadtree\", false, \"d.q\"),\n // 色の設定\n colorTheme: parameters.string(\"draw.color_theme\", \"grayscale\", \"d.c\"),\n },\n};\n\n\n//# sourceURL=webpack://alife-lab/./src/simulations/drawer/constants.ts?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"constants\": () => /* binding */ constants\n/* harmony export */ });\n/* harmony import */ var _classes_url_parameter_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../classes/url_parameter_parser */ \"./src/classes/url_parameter_parser.ts\");\n\nconst parameters = new _classes_url_parameter_parser__WEBPACK_IMPORTED_MODULE_0__.URLParameterParser();\n// 指定できるURLパラメータの一覧\n// parameters.boolean/int/float/string(\"パラメータ名\", 指定されない場合のデフォルト値, \"パラメータ名省略記法\")\nconst constants = {\n system: {\n // Canvasサイズ\n fieldSize: parameters.int(\"system.size\", 600, \"s\"),\n // 1で綺麗そうな絵になるルールを自動探索 \n run: parameters.boolean(\"system.run\", false, \"r\"),\n // system.run=1の場合、1で有望なルールと画像を自動的にダウンロード\n autoDownload: parameters.boolean(\"system.auto_download\", false, \"d\"),\n // 1で四分木による計算量削減を有効化\n quadtreeEnabled: parameters.boolean(\"system.quadtree\", true, \"q\"),\n },\n simulation: {\n // 動作を遅くしたい場合に増やす。1未満の値(高速化)は動作しない\n executionInterval: parameters.int(\"simulation.execution_interval\", 1, \"s.i\"),\n // 描画する線分の上限\n maxLineCount: parameters.int(\"simulation.max_line_count\", 5000, \"s.l\"),\n // 1で線分の衝突判定を有効化し、他と衝突する線分を消す\n lineCollisionEnabled: parameters.boolean(\"simulation.line_collision_enabled\", true, \"s.c\"),\n // L-Systemのルールを指定する。 ルールの例はrule_examples.ts\n lSystemRule: parameters.string(\"simulation.lsystem_rule\", \"\", \"s.r\"),\n // L-Systemの **状態の** 突然変異率(ルールの、ではない)\n mutationRate: parameters.float(\"simulation.mutation_rate\", 0, \"s.m\"),\n // system.run=1のとき、同時に実行するL-Systemルールの数\n numberOfSeeds: parameters.int(\"simulation.number_of_seeds\", 1, \"s.s\"),\n // 1で描画開始位置を固定する。system.run=0のときのみ有効\n fixedStartPoint: parameters.boolean(\"simulation.fixed_start_point\", false, \"s.f\"),\n // 障害物を配置\n obstacle: parameters.boolean(\"simulation.obstacle\", false, \"s.ob\"),\n concurrentExecutionNumber: parameters.int(\"simulation.concurrent_execution\", 100, \"s.ce\"),\n lineLifeSpan: parameters.int(\"simulation.line_life_span\", 10, \"s.ls\"),\n lineLengthType: parameters.int(\"simulation.line_line_length_type\", 0, \"s.ll\"),\n symmetric: parameters.boolean(\"simulation.force_simmetric\", false, \"s.sy\"),\n // drawer_change_parameter.html でのみ有効\n changeParameter: {\n // 変化するパラメータの差分\n // 例: 1,0,2\n // ルール中の数値の数と一致する必要がある\n changes: parameters.string(\"simulation.parameter_changes\", \"\", \"s.pc\"),\n // パラメータ変更が一周するのにかかるstep数\n period: parameters.int(\"simulation.parameter_period\", 360, \"s.pp\"),\n }\n },\n draw: {\n // 1でcanvas境界に配置した境界線を描画\n showsBorderLine: parameters.boolean(\"draw.shows_border_line\", false, \"d.b\"),\n // 1で四分木のノードを描画\n showsQuadtree: parameters.boolean(\"draw.shows_quadtree\", false, \"d.q\"),\n // 色の設定\n colorTheme: parameters.string(\"draw.color_theme\", \"grayscale\", \"d.c\"),\n },\n};\n\n\n//# sourceURL=webpack://alife-lab/./src/simulations/drawer/constants.ts?"); /***/ }), @@ -1620,7 +1620,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LSystemStateTransition\": () => /* binding */ LSystemStateTransition,\n/* harmony export */ \"VanillaLSystemRule\": () => /* binding */ VanillaLSystemRule,\n/* harmony export */ \"possibleLoopPatterns\": () => /* binding */ possibleLoopPatterns\n/* harmony export */ });\n/* harmony import */ var _classes_utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../classes/utilities */ \"./src/classes/utilities.ts\");\n/* harmony import */ var _classes_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../classes/color */ \"./src/classes/color.ts\");\n\n\nconst niceColors = [\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(51, 127, 214),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(182, 11, 145),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(27, 45, 108),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(128, 57, 241),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(39, 86, 26),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(217, 76, 62),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(92, 115, 151),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(172, 84, 60),\n];\nclass LSystemStateTransition {\n constructor(loops) {\n this.loops = loops;\n this.colors = new Map();\n this.maxLoopLength = Math.max(...loops.map(l => l.length));\n for (let i = 0; i < loops.length; i += 1) {\n const loop = loops[i];\n if (i >= niceColors.length) {\n console.log(\"色が足りない\");\n this.colors.set(loop, _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color.random());\n }\n else {\n this.colors.set(loop, niceColors[i]);\n }\n }\n }\n colorOf(loop) {\n var _a;\n return (_a = this.colors.get(loop)) !== null && _a !== void 0 ? _a : _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color.white(0x0);\n }\n}\nclass VanillaLSystemRule {\n constructor(first) {\n if (typeof (first) === \"string\") {\n this._encoded = first;\n this._map = VanillaLSystemRule.decode(first);\n }\n else {\n this._encoded = VanillaLSystemRule.encode(first);\n this._map = first;\n }\n this.transition = this.calculateTransition();\n }\n get possibleConditions() {\n return Array.from(this._map.keys());\n }\n get encoded() {\n return this._encoded;\n }\n static random() {\n const alphabets = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\");\n const conditions = alphabets.slice(0, (0,_classes_utilities__WEBPACK_IMPORTED_MODULE_0__.random)(alphabets.length, 1));\n const map = new Map();\n const maxConditions = 10;\n const randomCondition = () => {\n const index = Math.floor((0,_classes_utilities__WEBPACK_IMPORTED_MODULE_0__.random)(conditions.length));\n return conditions[index];\n };\n conditions.forEach(condition => {\n const nextConditions = [];\n for (let i = 0; i < maxConditions; i += 1) {\n if ((0,_classes_utilities__WEBPACK_IMPORTED_MODULE_0__.random)(1) > 0.5) {\n break;\n }\n const angle = Math.floor((0,_classes_utilities__WEBPACK_IMPORTED_MODULE_0__.random)(360, 0)) - 180;\n nextConditions.push(angle);\n nextConditions.push(randomCondition());\n }\n if (nextConditions.length === 0) {\n nextConditions.push(VanillaLSystemRule.endOfBranch);\n }\n map.set(condition, nextConditions);\n });\n return new VanillaLSystemRule(map);\n }\n static encode(map) {\n const result = [];\n map.forEach((value, key) => {\n const nextCondition = value.map(v => `${v}`).join(\",\");\n result.push(`${key}:${nextCondition}`);\n });\n return result.join(\";\");\n }\n static decode(encoded) {\n const map = new Map();\n encoded.split(\";\").forEach(pair => {\n const keyValue = pair.split(\":\");\n if (keyValue.length !== 2) {\n throw new Error(`Invalid condition: next-condition pair ${pair}`);\n }\n const condition = keyValue[0];\n const nextConditions = keyValue[1].split(\",\").map((stringValue) => {\n const numberValue = parseInt(stringValue, 10);\n if (isNaN(numberValue) === true) {\n if (stringValue.length <= 0) {\n throw new Error(`Invalid condition: empty string ${pair}`);\n }\n else if (stringValue.length > 1) {\n throw new Error(`Invalid condition: multiple characters ${pair}`);\n }\n return stringValue;\n }\n return numberValue;\n });\n map.set(condition, nextConditions);\n });\n return map;\n }\n // Same as optimize_rule.py\n static trimUnreachableConditions(rule, initialCondition) {\n const trimmedRule = new Map();\n let conditionsToCheck = [initialCondition];\n while (conditionsToCheck.length > 0) {\n const additionalConditions = [];\n conditionsToCheck.forEach(condition => {\n const nextConditions = rule.nextConditions(condition);\n trimmedRule.set(condition, nextConditions);\n nextConditions.forEach(nextCondition => {\n if (typeof (nextCondition) !== \"string\") {\n return;\n }\n if (nextCondition === VanillaLSystemRule.endOfBranch) {\n return;\n }\n if (additionalConditions.includes(nextCondition)) {\n return;\n }\n if (Array.from(trimmedRule.keys()).includes(nextCondition)) {\n return;\n }\n additionalConditions.push(nextCondition);\n });\n });\n conditionsToCheck = additionalConditions;\n }\n return new VanillaLSystemRule(trimmedRule);\n }\n nextConditions(currentCondition) {\n const nextConditions = this._map.get(currentCondition);\n if (nextConditions == null) {\n if (currentCondition === VanillaLSystemRule.endOfBranch) {\n return [];\n }\n throw new Error(`Invalid condition \"${currentCondition}\" (rule: ${this.encoded})`);\n }\n return nextConditions;\n }\n nextCoordinates(condition, direction) {\n let newDirection = direction;\n const nextConditions = this.nextConditions(condition);\n const nextCoordinates = [];\n for (const condition of nextConditions) {\n if (typeof (condition) === \"number\") {\n newDirection += condition;\n continue;\n }\n nextCoordinates.push({\n condition: condition,\n direction: newDirection,\n });\n }\n return nextCoordinates;\n }\n // A:A -> true\n // A:B;B:B -> true\n // A:B;B:. -> false\n isCirculated(initialCondition) {\n let isCirculated = false;\n const checked = [];\n let conditionsToCheck = [initialCondition];\n while (isCirculated === false && conditionsToCheck.length > 0) {\n conditionsToCheck = conditionsToCheck.flatMap(condition => {\n checked.push(condition);\n return this.nextConditions(condition).filter(nextCondition => {\n if (typeof (nextCondition) !== \"string\") {\n return false;\n }\n if (nextCondition === VanillaLSystemRule.endOfBranch) {\n return false;\n }\n if (checked.includes(nextCondition)) {\n isCirculated = true;\n return false;\n }\n return true;\n });\n });\n }\n return isCirculated;\n }\n loopOf(condition, conditionHistory, loopCount) {\n if (loopCount < 2) {\n throw new Error(`2未満のloopCountではループを検出できません. loopCount: ${loopCount}`);\n }\n const historyArray = conditionHistory.split(\"\");\n const reversedIndex = historyArray.reverse().indexOf(condition);\n if (reversedIndex < 0) {\n return null;\n }\n const index = conditionHistory.length - reversedIndex - 1;\n const lastLoop = conditionHistory.slice(index);\n for (let i = 1; i < loopCount; i += 1) {\n const startIndex = index - (lastLoop.length * i);\n const endIndex = startIndex + lastLoop.length;\n if (startIndex < 0) {\n return null;\n }\n const loop = conditionHistory.slice(startIndex, endIndex);\n if (loop !== lastLoop) {\n return null;\n }\n }\n const possiblePatterns = possibleLoopPatterns(lastLoop);\n for (let i = 0; i < possiblePatterns.length; i += 1) {\n const pattern = possiblePatterns[i];\n if (this.transition.loops.includes(pattern)) {\n return pattern;\n }\n }\n // TODO: 「状態遷移の切り替わり」がループしている状態を検出できるようにする\n return null;\n }\n /*\n * 複数の状態遷移をもつ場合、状態遷移ごとに分割したルールを返す\n */\n calculateTransition() {\n const initialCondition = VanillaLSystemRule.initialCondition;\n const check = (condition, transition) => {\n var _a;\n const currentTransition = transition + condition;\n const nextConditions = ((_a = this._map.get(condition)) !== null && _a !== void 0 ? _a : []).filter(c => typeof c === \"string\");\n const transitions = [];\n const checked = [];\n nextConditions.forEach(c => {\n if (checked.includes(c)) {\n return;\n }\n checked.push(c);\n const index = currentTransition.indexOf(c);\n if (index >= 0) {\n transitions.push(currentTransition.slice(index));\n return;\n }\n transitions.push(...check(c, currentTransition));\n });\n return transitions;\n };\n const filterDuplicate = (transitions) => {\n const allPossibleLoops = [];\n const r = transitions.filter(loop => {\n if (allPossibleLoops.includes(loop)) {\n return false;\n }\n allPossibleLoops.push(...possibleLoopPatterns(loop));\n return true;\n });\n return r;\n };\n return new LSystemStateTransition(filterDuplicate(check(initialCondition, \"\")));\n }\n}\nVanillaLSystemRule.initialCondition = \"A\";\nVanillaLSystemRule.endOfBranch = \".\";\nfunction possibleLoopPatterns(original) {\n const patterns = [];\n for (let i = 0; i < original.length; i += 1) {\n patterns.push(original.slice(i).concat(original.slice(0, i)));\n }\n return patterns;\n}\n\n\n//# sourceURL=webpack://alife-lab/./src/simulations/drawer/vanilla_lsystem_rule.ts?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LSystemStateTransition\": () => /* binding */ LSystemStateTransition,\n/* harmony export */ \"VanillaLSystemRule\": () => /* binding */ VanillaLSystemRule,\n/* harmony export */ \"possibleLoopPatterns\": () => /* binding */ possibleLoopPatterns\n/* harmony export */ });\n/* harmony import */ var _classes_utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../classes/utilities */ \"./src/classes/utilities.ts\");\n/* harmony import */ var _classes_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../classes/color */ \"./src/classes/color.ts\");\n\n\nconst niceColors = [\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(51, 127, 214),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(182, 11, 145),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(27, 45, 108),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(128, 57, 241),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(39, 86, 26),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(217, 76, 62),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(92, 115, 151),\n new _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color(172, 84, 60),\n];\nclass LSystemStateTransition {\n constructor(loops) {\n this.loops = loops;\n this.colors = new Map();\n this.maxLoopLength = Math.max(...loops.map(l => l.length));\n for (let i = 0; i < loops.length; i += 1) {\n const loop = loops[i];\n if (i >= niceColors.length) {\n console.log(\"色が足りない\");\n this.colors.set(loop, _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color.random());\n }\n else {\n this.colors.set(loop, niceColors[i]);\n }\n }\n }\n colorOf(loop) {\n var _a;\n return (_a = this.colors.get(loop)) !== null && _a !== void 0 ? _a : _classes_color__WEBPACK_IMPORTED_MODULE_1__.Color.white(0x0);\n }\n}\nclass VanillaLSystemRule {\n constructor(first) {\n if (typeof (first) === \"string\") {\n this._encoded = first;\n this._map = VanillaLSystemRule.decode(first);\n }\n else {\n this._encoded = VanillaLSystemRule.encode(first);\n this._map = first;\n }\n this.transition = this.calculateTransition();\n }\n get possibleConditions() {\n return Array.from(this._map.keys());\n }\n get encoded() {\n return this._encoded;\n }\n static random() {\n const alphabets = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\");\n const conditions = alphabets.slice(0, (0,_classes_utilities__WEBPACK_IMPORTED_MODULE_0__.random)(alphabets.length, 1));\n const map = new Map();\n const maxConditions = 10;\n const randomCondition = () => {\n const index = Math.floor((0,_classes_utilities__WEBPACK_IMPORTED_MODULE_0__.random)(conditions.length));\n return conditions[index];\n };\n conditions.forEach(condition => {\n const nextConditions = [];\n for (let i = 0; i < maxConditions; i += 1) {\n if ((0,_classes_utilities__WEBPACK_IMPORTED_MODULE_0__.random)(1) > 0.5) {\n break;\n }\n const angle = Math.floor((0,_classes_utilities__WEBPACK_IMPORTED_MODULE_0__.random)(360, 0)) - 180;\n nextConditions.push(angle);\n nextConditions.push(randomCondition());\n }\n if (nextConditions.length === 0) {\n nextConditions.push(VanillaLSystemRule.endOfBranch);\n }\n map.set(condition, nextConditions);\n });\n return new VanillaLSystemRule(map);\n }\n static encode(map) {\n const result = [];\n map.forEach((value, key) => {\n const nextCondition = value.map(v => `${v}`).join(\",\");\n result.push(`${key}:${nextCondition}`);\n });\n return result.join(\";\");\n }\n static decode(encoded) {\n const map = new Map();\n encoded.split(\";\").forEach(pair => {\n const keyValue = pair.split(\":\");\n if (keyValue.length !== 2) {\n throw new Error(`Invalid condition: next-condition pair ${pair}`);\n }\n const condition = keyValue[0];\n const nextConditions = keyValue[1].split(\",\").map((stringValue) => {\n const numberValue = parseFloat(stringValue);\n if (isNaN(numberValue) === true) {\n if (stringValue.length <= 0) {\n throw new Error(`Invalid condition: empty string ${pair}`);\n }\n else if (stringValue.length > 1) {\n throw new Error(`Invalid condition: multiple characters ${pair}`);\n }\n return stringValue;\n }\n return numberValue;\n });\n map.set(condition, nextConditions);\n });\n return map;\n }\n // Same as optimize_rule.py\n static trimUnreachableConditions(rule, initialCondition) {\n const trimmedRule = new Map();\n let conditionsToCheck = [initialCondition];\n while (conditionsToCheck.length > 0) {\n const additionalConditions = [];\n conditionsToCheck.forEach(condition => {\n const nextConditions = rule.nextConditions(condition);\n trimmedRule.set(condition, nextConditions);\n nextConditions.forEach(nextCondition => {\n if (typeof (nextCondition) !== \"string\") {\n return;\n }\n if (nextCondition === VanillaLSystemRule.endOfBranch) {\n return;\n }\n if (additionalConditions.includes(nextCondition)) {\n return;\n }\n if (Array.from(trimmedRule.keys()).includes(nextCondition)) {\n return;\n }\n additionalConditions.push(nextCondition);\n });\n });\n conditionsToCheck = additionalConditions;\n }\n return new VanillaLSystemRule(trimmedRule);\n }\n encodedWith(encoder) {\n const conditionMapper = (condition) => {\n if (typeof condition === \"string\") {\n return condition;\n }\n else {\n return encoder(condition);\n }\n };\n const result = [];\n this._map.forEach((value, key) => {\n const nextCondition = value.map(conditionMapper).join(\",\");\n result.push(`${key}:${nextCondition}`);\n });\n return result.join(\";\");\n }\n nextConditions(currentCondition) {\n const nextConditions = this._map.get(currentCondition);\n if (nextConditions == null) {\n if (currentCondition === VanillaLSystemRule.endOfBranch) {\n return [];\n }\n throw new Error(`Invalid condition \"${currentCondition}\" (rule: ${this.encoded})`);\n }\n return nextConditions;\n }\n nextCoordinates(condition, direction) {\n let newDirection = direction;\n const nextConditions = this.nextConditions(condition);\n const nextCoordinates = [];\n for (const condition of nextConditions) {\n if (typeof (condition) === \"number\") {\n newDirection += condition;\n continue;\n }\n nextCoordinates.push({\n condition: condition,\n direction: newDirection,\n });\n }\n return nextCoordinates;\n }\n // A:A -> true\n // A:B;B:B -> true\n // A:B;B:. -> false\n isCirculated(initialCondition) {\n let isCirculated = false;\n const checked = [];\n let conditionsToCheck = [initialCondition];\n while (isCirculated === false && conditionsToCheck.length > 0) {\n conditionsToCheck = conditionsToCheck.flatMap(condition => {\n checked.push(condition);\n return this.nextConditions(condition).filter(nextCondition => {\n if (typeof (nextCondition) !== \"string\") {\n return false;\n }\n if (nextCondition === VanillaLSystemRule.endOfBranch) {\n return false;\n }\n if (checked.includes(nextCondition)) {\n isCirculated = true;\n return false;\n }\n return true;\n });\n });\n }\n return isCirculated;\n }\n loopOf(condition, conditionHistory, loopCount) {\n if (loopCount < 2) {\n throw new Error(`2未満のloopCountではループを検出できません. loopCount: ${loopCount}`);\n }\n const historyArray = conditionHistory.split(\"\");\n const reversedIndex = historyArray.reverse().indexOf(condition);\n if (reversedIndex < 0) {\n return null;\n }\n const index = conditionHistory.length - reversedIndex - 1;\n const lastLoop = conditionHistory.slice(index);\n for (let i = 1; i < loopCount; i += 1) {\n const startIndex = index - (lastLoop.length * i);\n const endIndex = startIndex + lastLoop.length;\n if (startIndex < 0) {\n return null;\n }\n const loop = conditionHistory.slice(startIndex, endIndex);\n if (loop !== lastLoop) {\n return null;\n }\n }\n const possiblePatterns = possibleLoopPatterns(lastLoop);\n for (let i = 0; i < possiblePatterns.length; i += 1) {\n const pattern = possiblePatterns[i];\n if (this.transition.loops.includes(pattern)) {\n return pattern;\n }\n }\n // TODO: 「状態遷移の切り替わり」がループしている状態を検出できるようにする\n return null;\n }\n /*\n * 複数の状態遷移をもつ場合、状態遷移ごとに分割したルールを返す\n */\n calculateTransition() {\n const initialCondition = VanillaLSystemRule.initialCondition;\n const check = (condition, transition) => {\n var _a;\n const currentTransition = transition + condition;\n const nextConditions = ((_a = this._map.get(condition)) !== null && _a !== void 0 ? _a : []).filter(c => typeof c === \"string\");\n const transitions = [];\n const checked = [];\n nextConditions.forEach(c => {\n if (checked.includes(c)) {\n return;\n }\n checked.push(c);\n const index = currentTransition.indexOf(c);\n if (index >= 0) {\n transitions.push(currentTransition.slice(index));\n return;\n }\n transitions.push(...check(c, currentTransition));\n });\n return transitions;\n };\n const filterDuplicate = (transitions) => {\n const allPossibleLoops = [];\n const r = transitions.filter(loop => {\n if (allPossibleLoops.includes(loop)) {\n return false;\n }\n allPossibleLoops.push(...possibleLoopPatterns(loop));\n return true;\n });\n return r;\n };\n return new LSystemStateTransition(filterDuplicate(check(initialCondition, \"\")));\n }\n}\nVanillaLSystemRule.initialCondition = \"A\";\nVanillaLSystemRule.endOfBranch = \".\";\nfunction possibleLoopPatterns(original) {\n const patterns = [];\n for (let i = 0; i < original.length; i += 1) {\n patterns.push(original.slice(i).concat(original.slice(0, i)));\n }\n return patterns;\n}\n\n\n//# sourceURL=webpack://alife-lab/./src/simulations/drawer/vanilla_lsystem_rule.ts?"); /***/ }) diff --git a/dist/drawer_change_parameter.js b/dist/drawer_change_parameter.js new file mode 100644 index 0000000..fa5a705 --- /dev/null +++ b/dist/drawer_change_parameter.js @@ -0,0 +1,1711 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _arrayLikeToArray\n/* harmony export */ });\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _arrayWithHoles\n/* harmony export */ });\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _arrayWithoutHoles\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/arrayLikeToArray */ \"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return (0,_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__.default)(arr);\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js": +/*!**************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _assertThisInitialized\n/* harmony export */ });\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***! + \****************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _createClass\n/* harmony export */ });\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/createClass.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _defineProperty\n/* harmony export */ });\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/defineProperty.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/extends.js": +/*!************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***! + \************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _extends\n/* harmony export */ });\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/extends.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js ***! + \******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _inheritsLoose\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\");\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n (0,_babel_runtime_helpers_esm_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__.default)(subClass, superClass);\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js": +/*!********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***! + \********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _iterableToArray\n/* harmony export */ });\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js": +/*!*************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _iterableToArrayLimit\n/* harmony export */ });\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js": +/*!********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***! + \********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _nonIterableRest\n/* harmony export */ });\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _nonIterableSpread\n/* harmony export */ });\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js": +/*!****************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _objectWithoutProperties\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__.default)(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _objectWithoutPropertiesLoose\n/* harmony export */ });\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _setPrototypeOf\n/* harmony export */ });\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***! + \******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _slicedToArray\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/arrayWithHoles */ \"./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_iterableToArrayLimit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/iterableToArrayLimit */ \"./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */ \"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_nonIterableRest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/nonIterableRest */ \"./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js\");\n\n\n\n\nfunction _slicedToArray(arr, i) {\n return (0,_babel_runtime_helpers_esm_arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__.default)(arr) || (0,_babel_runtime_helpers_esm_iterableToArrayLimit__WEBPACK_IMPORTED_MODULE_1__.default)(arr, i) || (0,_babel_runtime_helpers_esm_unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__.default)(arr, i) || (0,_babel_runtime_helpers_esm_nonIterableRest__WEBPACK_IMPORTED_MODULE_3__.default)();\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _toConsumableArray\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_arrayWithoutHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/arrayWithoutHoles */ \"./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_iterableToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/iterableToArray */ \"./node_modules/@babel/runtime/helpers/esm/iterableToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */ \"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_nonIterableSpread__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/nonIterableSpread */ \"./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js\");\n\n\n\n\nfunction _toConsumableArray(arr) {\n return (0,_babel_runtime_helpers_esm_arrayWithoutHoles__WEBPACK_IMPORTED_MODULE_0__.default)(arr) || (0,_babel_runtime_helpers_esm_iterableToArray__WEBPACK_IMPORTED_MODULE_1__.default)(arr) || (0,_babel_runtime_helpers_esm_unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__.default)(arr) || (0,_babel_runtime_helpers_esm_nonIterableSpread__WEBPACK_IMPORTED_MODULE_3__.default)();\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js": +/*!***********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _typeof\n/* harmony export */ });\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/typeof.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ _unsupportedIterableToArray\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/arrayLikeToArray */ \"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return (0,_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);\n}\n\n//# sourceURL=webpack://alife-lab/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js?"); + +/***/ }), + +/***/ "./node_modules/@material-ui/core/esm/AppBar/AppBar.js": +/*!*************************************************************!*\ + !*** ./node_modules/@material-ui/core/esm/AppBar/AppBar.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"styles\": () => /* binding */ styles,\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Paper */ \"./node_modules/@material-ui/core/esm/Paper/Paper.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var backgroundColorDefault = theme.palette.type === 'light' ? theme.palette.grey[100] : theme.palette.grey[900];\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n boxSizing: 'border-box',\n // Prevent padding issue with the Modal and fixed positioned AppBar.\n zIndex: theme.zIndex.appBar,\n flexShrink: 0\n },\n\n /* Styles applied to the root element if `position=\"fixed\"`. */\n positionFixed: {\n position: 'fixed',\n top: 0,\n left: 'auto',\n right: 0,\n '@media print': {\n // Prevent the app bar to be visible on each printed page.\n position: 'absolute'\n }\n },\n\n /* Styles applied to the root element if `position=\"absolute\"`. */\n positionAbsolute: {\n position: 'absolute',\n top: 0,\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the root element if `position=\"sticky\"`. */\n positionSticky: {\n // ⚠️ sticky is not supported by IE 11.\n position: 'sticky',\n top: 0,\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the root element if `position=\"static\"`. */\n positionStatic: {\n position: 'static'\n },\n\n /* Styles applied to the root element if `position=\"relative\"`. */\n positionRelative: {\n position: 'relative'\n },\n\n /* Styles applied to the root element if `color=\"default\"`. */\n colorDefault: {\n backgroundColor: backgroundColorDefault,\n color: theme.palette.getContrastText(backgroundColorDefault)\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"transparent\"`. */\n colorTransparent: {\n backgroundColor: 'transparent',\n color: 'inherit'\n }\n };\n};\nvar AppBar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(function AppBar(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$position = props.position,\n position = _props$position === void 0 ? 'fixed' : _props$position,\n other = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__.default)(props, [\"classes\", \"className\", \"color\", \"position\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_Paper__WEBPACK_IMPORTED_MODULE_5__.default, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n square: true,\n component: \"header\",\n elevation: 4,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)(classes.root, classes[\"position\".concat((0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__.default)(position))], classes[\"color\".concat((0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__.default)(color))], className, position === 'fixed' && 'mui-fixed'),\n ref: ref\n }, other));\n});\n true ? AppBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().node),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object),\n\n /**\n * @ignore\n */\n className: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string),\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(['default', 'inherit', 'primary', 'secondary', 'transparent']),\n\n /**\n * The positioning type. The behavior of the different options is described\n * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).\n * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.\n */\n position: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(['absolute', 'fixed', 'relative', 'static', 'sticky'])\n} : 0;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__.default)(styles, {\n name: 'MuiAppBar'\n})(AppBar));\n\n//# sourceURL=webpack://alife-lab/./node_modules/@material-ui/core/esm/AppBar/AppBar.js?"); + +/***/ }), + +/***/ "./node_modules/@material-ui/core/esm/Breadcrumbs/BreadcrumbCollapsed.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/@material-ui/core/esm/Breadcrumbs/BreadcrumbCollapsed.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _internal_svg_icons_MoreHoriz__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../internal/svg-icons/MoreHoriz */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/MoreHoriz.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js\");\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n root: {\n display: 'flex',\n marginLeft: theme.spacing(0.5),\n marginRight: theme.spacing(0.5),\n backgroundColor: theme.palette.grey[100],\n color: theme.palette.grey[700],\n borderRadius: 2,\n cursor: 'pointer',\n '&:hover, &:focus': {\n backgroundColor: theme.palette.grey[200]\n },\n '&:active': {\n boxShadow: theme.shadows[0],\n backgroundColor: (0,_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_4__.emphasize)(theme.palette.grey[200], 0.12)\n }\n },\n icon: {\n width: 24,\n height: 16\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction BreadcrumbCollapsed(props) {\n var classes = props.classes,\n other = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__.default)(props, [\"classes\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_ButtonBase__WEBPACK_IMPORTED_MODULE_5__.default, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n component: \"li\",\n className: classes.root,\n focusRipple: true\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_internal_svg_icons_MoreHoriz__WEBPACK_IMPORTED_MODULE_6__.default, {\n className: classes.icon\n }));\n}\n\n true ? BreadcrumbCollapsed.propTypes = {\n /**\n * @ignore\n */\n classes: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object.isRequired)\n} : 0;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__.default)(styles, {\n name: 'PrivateBreadcrumbCollapsed'\n})(BreadcrumbCollapsed));\n\n//# sourceURL=webpack://alife-lab/./node_modules/@material-ui/core/esm/Breadcrumbs/BreadcrumbCollapsed.js?"); + +/***/ }), + +/***/ "./node_modules/@material-ui/core/esm/Breadcrumbs/Breadcrumbs.js": +/*!***********************************************************************!*\ + !*** ./node_modules/@material-ui/core/esm/Breadcrumbs/Breadcrumbs.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"styles\": () => /* binding */ styles,\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Typography */ \"./node_modules/@material-ui/core/esm/Typography/Typography.js\");\n/* harmony import */ var _BreadcrumbCollapsed__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BreadcrumbCollapsed */ \"./node_modules/@material-ui/core/esm/Breadcrumbs/BreadcrumbCollapsed.js\");\n\n\n\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the ol element. */\n ol: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n padding: 0,\n margin: 0,\n listStyle: 'none'\n },\n\n /* Styles applied to the li element. */\n li: {},\n\n /* Styles applied to the separator element. */\n separator: {\n display: 'flex',\n userSelect: 'none',\n marginLeft: 8,\n marginRight: 8\n }\n};\n\nfunction insertSeparators(items, className, separator) {\n return items.reduce(function (acc, current, index) {\n if (index < items.length - 1) {\n acc = acc.concat(current, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(\"li\", {\n \"aria-hidden\": true,\n key: \"separator-\".concat(index),\n className: className\n }, separator));\n } else {\n acc.push(current);\n }\n\n return acc;\n }, []);\n}\n\nvar Breadcrumbs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.forwardRef(function Breadcrumbs(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'nav' : _props$component,\n _props$expandText = props.expandText,\n expandText = _props$expandText === void 0 ? 'Show path' : _props$expandText,\n _props$itemsAfterColl = props.itemsAfterCollapse,\n itemsAfterCollapse = _props$itemsAfterColl === void 0 ? 1 : _props$itemsAfterColl,\n _props$itemsBeforeCol = props.itemsBeforeCollapse,\n itemsBeforeCollapse = _props$itemsBeforeCol === void 0 ? 1 : _props$itemsBeforeCol,\n _props$maxItems = props.maxItems,\n maxItems = _props$maxItems === void 0 ? 8 : _props$maxItems,\n _props$separator = props.separator,\n separator = _props$separator === void 0 ? '/' : _props$separator,\n other = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__.default)(props, [\"children\", \"classes\", \"className\", \"component\", \"expandText\", \"itemsAfterCollapse\", \"itemsBeforeCollapse\", \"maxItems\", \"separator\"]);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__.useState(false),\n expanded = _React$useState[0],\n setExpanded = _React$useState[1];\n\n var renderItemsBeforeAndAfter = function renderItemsBeforeAndAfter(allItems) {\n var handleClickExpand = function handleClickExpand(event) {\n setExpanded(true); // The clicked element received the focus but gets removed from the DOM.\n // Let's keep the focus in the component after expanding.\n\n var focusable = event.currentTarget.parentNode.querySelector('a[href],button,[tabindex]');\n\n if (focusable) {\n focusable.focus();\n }\n }; // This defends against someone passing weird input, to ensure that if all\n // items would be shown anyway, we just show all items without the EllipsisItem\n\n\n if (itemsBeforeCollapse + itemsAfterCollapse >= allItems.length) {\n if (true) {\n console.error(['Material-UI: You have provided an invalid combination of props to the Breadcrumbs.', \"itemsAfterCollapse={\".concat(itemsAfterCollapse, \"} + itemsBeforeCollapse={\").concat(itemsBeforeCollapse, \"} >= maxItems={\").concat(maxItems, \"}\")].join('\\n'));\n }\n\n return allItems;\n }\n\n return [].concat((0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__.default)(allItems.slice(0, itemsBeforeCollapse)), [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(_BreadcrumbCollapsed__WEBPACK_IMPORTED_MODULE_7__.default, {\n \"aria-label\": expandText,\n key: \"ellipsis\",\n onClick: handleClickExpand\n })], (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__.default)(allItems.slice(allItems.length - itemsAfterCollapse, allItems.length)));\n };\n\n var allItems = react__WEBPACK_IMPORTED_MODULE_3__.Children.toArray(children).filter(function (child) {\n if (true) {\n if ((0,react_is__WEBPACK_IMPORTED_MODULE_4__.isFragment)(child)) {\n console.error([\"Material-UI: The Breadcrumbs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.isValidElement(child);\n }).map(function (child, index) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(\"li\", {\n className: classes.li,\n key: \"child-\".concat(index)\n }, child);\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(_Typography__WEBPACK_IMPORTED_MODULE_8__.default, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n ref: ref,\n component: Component,\n color: \"textSecondary\",\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_6__.default)(classes.root, className)\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(\"ol\", {\n className: classes.ol\n }, insertSeparators(expanded || maxItems && allItems.length <= maxItems ? allItems : renderItemsBeforeAndAfter(allItems), classes.separator, separator)));\n});\n true ? Breadcrumbs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The breadcrumb children.\n */\n children: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().node),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),\n\n /**\n * @ignore\n */\n className: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().elementType),\n\n /**\n * Override the default label for the expand button.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n */\n expandText: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n\n /**\n * If max items is exceeded, the number of items to show after the ellipsis.\n */\n itemsAfterCollapse: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number),\n\n /**\n * If max items is exceeded, the number of items to show before the ellipsis.\n */\n itemsBeforeCollapse: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number),\n\n /**\n * Specifies the maximum number of breadcrumbs to display. When there are more\n * than the maximum number, only the first `itemsBeforeCollapse` and last `itemsAfterCollapse`\n * will be shown, with an ellipsis in between.\n */\n maxItems: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number),\n\n /**\n * Custom separator node.\n */\n separator: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().node)\n} : 0;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_styles_withStyles__WEBPACK_IMPORTED_MODULE_9__.default)(styles, {\n name: 'MuiBreadcrumbs'\n})(Breadcrumbs));\n\n//# sourceURL=webpack://alife-lab/./node_modules/@material-ui/core/esm/Breadcrumbs/Breadcrumbs.js?"); + +/***/ }), + +/***/ "./node_modules/@material-ui/core/esm/Button/Button.js": +/*!*************************************************************!*\ + !*** ./node_modules/@material-ui/core/esm/Button/Button.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"styles\": () => /* binding */ styles,\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__.default)({}, theme.typography.button, {\n boxSizing: 'border-box',\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.text.primary,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: (0,_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__.fade)(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n },\n '&$disabled': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // Ensure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `variant=\"text\"`. */\n text: {\n padding: '6px 8px'\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"primary\"`. */\n textPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: (0,_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__.fade)(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"secondary\"`. */\n textSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: (0,_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__.fade)(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n padding: '5px 15px',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabledBackground)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat((0,_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__.fade)(theme.palette.primary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.primary.main),\n backgroundColor: (0,_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__.fade)(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat((0,_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__.fade)(theme.palette.secondary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.secondary.main),\n backgroundColor: (0,_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__.fade)(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabled)\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&:active': {\n boxShadow: theme.shadows[8]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"primary\"`. */\n containedPrimary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"secondary\"`. */\n containedSecondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n '&$focusVisible': {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n '&$disabled': {\n boxShadow: 'none'\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit',\n borderColor: 'currentColor'\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"text\"`. */\n textSizeSmall: {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"text\"`. */\n textSizeLarge: {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"outlined\"`. */\n outlinedSizeSmall: {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"outlined\"`. */\n outlinedSizeLarge: {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"contained\"`. */\n containedSizeSmall: {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"contained\"`. */\n containedSizeLarge: {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {},\n\n /* Styles applied to the root element if `size=\"large\"`. */\n sizeLarge: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the startIcon element if supplied. */\n startIcon: {\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4,\n '&$iconSizeSmall': {\n marginLeft: -2\n }\n },\n\n /* Styles applied to the endIcon element if supplied. */\n endIcon: {\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8,\n '&$iconSizeSmall': {\n marginRight: -2\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"small\"`. */\n iconSizeSmall: {\n '& > *:first-child': {\n fontSize: 18\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"medium\"`. */\n iconSizeMedium: {\n '& > *:first-child': {\n fontSize: 20\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"large\"`. */\n iconSizeLarge: {\n '& > *:first-child': {\n fontSize: 22\n }\n }\n };\n};\nvar Button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(function Button(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n endIconProp = props.endIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n startIconProp = props.startIcon,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'text' : _props$variant,\n other = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__.default)(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"]);\n\n var startIcon = startIconProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(\"span\", {\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)(classes.startIcon, classes[\"iconSize\".concat((0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__.default)(size))])\n }, startIconProp);\n var endIcon = endIconProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(\"span\", {\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)(classes.endIcon, classes[\"iconSize\".concat((0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__.default)(size))])\n }, endIconProp);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_ButtonBase__WEBPACK_IMPORTED_MODULE_7__.default, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__.default)({\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)(classes.root, classes[variant], className, color === 'inherit' ? classes.colorInherit : color !== 'default' && classes[\"\".concat(variant).concat((0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__.default)(color))], size !== 'medium' && [classes[\"\".concat(variant, \"Size\").concat((0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__.default)(size))], classes[\"size\".concat((0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__.default)(size))]], disableElevation && classes.disableElevation, disabled && classes.disabled, fullWidth && classes.fullWidth),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: (0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(\"span\", {\n className: classes.label\n }, startIcon, children, endIcon));\n});\n true ? Button.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().node),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object),\n\n /**\n * @ignore\n */\n className: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string),\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().elementType),\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool),\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool),\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool),\n\n /**\n * If `true`, the ripple effect will be disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `focusVisibleClassName`.\n */\n disableRipple: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool),\n\n /**\n * Element placed after the children.\n */\n endIcon: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().node),\n\n /**\n * @ignore\n */\n focusVisibleClassName: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string),\n\n /**\n * If `true`, the button will take up the full width of its container.\n */\n fullWidth: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool),\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(['large', 'medium', 'small']),\n\n /**\n * Element placed before the children.\n */\n startIcon: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().node),\n\n /**\n * @ignore\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(['button', 'reset', 'submit']), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string)]),\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(['contained', 'outlined', 'text'])\n} : 0;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__.default)(styles, {\n name: 'MuiButton'\n})(Button));\n\n//# sourceURL=webpack://alife-lab/./node_modules/@material-ui/core/esm/Button/Button.js?"); + +/***/ }), + +/***/ "./node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"styles\": () => /* binding */ styles,\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/refType.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/useEventCallback */ \"./node_modules/@material-ui/core/esm/utils/useEventCallback.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/useIsFocusVisible */ \"./node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js\");\n/* harmony import */ var _TouchRipple__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TouchRipple */ \"./node_modules/@material-ui/core/esm/ButtonBase/TouchRipple.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$disabled': {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if keyboard focused. */\n focusVisible: {}\n};\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\n\nvar ButtonBase = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(function ButtonBase(props, ref) {\n var action = props.action,\n buttonRefProp = props.buttonRef,\n _props$centerRipple = props.centerRipple,\n centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$disableTouchRi = props.disableTouchRipple,\n disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi,\n _props$focusRipple = props.focusRipple,\n focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple,\n focusVisibleClassName = props.focusVisibleClassName,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onFocusVisible = props.onFocusVisible,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n onMouseDown = props.onMouseDown,\n onMouseLeave = props.onMouseLeave,\n onMouseUp = props.onMouseUp,\n onTouchEnd = props.onTouchEnd,\n onTouchMove = props.onTouchMove,\n onTouchStart = props.onTouchStart,\n onDragLeave = props.onDragLeave,\n _props$tabIndex = props.tabIndex,\n tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,\n TouchRippleProps = props.TouchRippleProps,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n other = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__.default)(props, [\"action\", \"buttonRef\", \"centerRipple\", \"children\", \"classes\", \"className\", \"component\", \"disabled\", \"disableRipple\", \"disableTouchRipple\", \"focusRipple\", \"focusVisibleClassName\", \"onBlur\", \"onClick\", \"onFocus\", \"onFocusVisible\", \"onKeyDown\", \"onKeyUp\", \"onMouseDown\", \"onMouseLeave\", \"onMouseUp\", \"onTouchEnd\", \"onTouchMove\", \"onTouchStart\", \"onDragLeave\", \"tabIndex\", \"TouchRippleProps\", \"type\"]);\n\n var buttonRef = react__WEBPACK_IMPORTED_MODULE_2__.useRef(null);\n\n function getButtonNode() {\n // #StrictMode ready\n return react_dom__WEBPACK_IMPORTED_MODULE_4__.findDOMNode(buttonRef.current);\n }\n\n var rippleRef = react__WEBPACK_IMPORTED_MODULE_2__.useRef(null);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n\n var _useIsFocusVisible = (0,_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_6__.default)(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n react__WEBPACK_IMPORTED_MODULE_2__.useImperativeHandle(action, function () {\n return {\n focusVisible: function focusVisible() {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n };\n }, []);\n react__WEBPACK_IMPORTED_MODULE_2__.useEffect(function () {\n if (focusVisible && focusRipple && !disableRipple) {\n rippleRef.current.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible]);\n\n function useRippleHandler(rippleAction, eventCallback) {\n var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple;\n return (0,_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_7__.default)(function (event) {\n if (eventCallback) {\n eventCallback(event);\n }\n\n var ignore = skipRippleAction;\n\n if (!ignore && rippleRef.current) {\n rippleRef.current[rippleAction](event);\n }\n\n return true;\n });\n }\n\n var handleMouseDown = useRippleHandler('start', onMouseDown);\n var handleDragLeave = useRippleHandler('stop', onDragLeave);\n var handleMouseUp = useRippleHandler('stop', onMouseUp);\n var handleMouseLeave = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n event.preventDefault();\n }\n\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n });\n var handleTouchStart = useRippleHandler('start', onTouchStart);\n var handleTouchEnd = useRippleHandler('stop', onTouchEnd);\n var handleTouchMove = useRippleHandler('stop', onTouchMove);\n var handleBlur = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n onBlurVisible(event);\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n var handleFocus = (0,_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_7__.default)(function (event) {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n\n if (onFocus) {\n onFocus(event);\n }\n });\n\n var isNonNativeButton = function isNonNativeButton() {\n var button = getButtonNode();\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n /**\n * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat\n */\n\n\n var keydownRef = react__WEBPACK_IMPORTED_MODULE_2__.useRef(false);\n var handleKeyDown = (0,_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_7__.default)(function (event) {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {\n keydownRef.current = true;\n event.persist();\n rippleRef.current.stop(event, function () {\n rippleRef.current.start(event);\n });\n }\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n\n if (onClick) {\n onClick(event);\n }\n }\n });\n var handleKeyUp = (0,_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_7__.default)(function (event) {\n // calling preventDefault in keyUp on a