narrat 0.9.4 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
- // Version: 0.9.4 - June 5, 2022 23:02:23
1
+ // Version: 0.10.0 - June 8, 2022 02:13:08
2
2
  import 'es6-promise/auto';
3
- import { ref, reactive, readonly, defineComponent, openBlock, createElementBlock, normalizeStyle, createElementVNode, createCommentVNode, Fragment, renderList, createBlock, Transition, withCtx, normalizeClass, renderSlot, createTextVNode, resolveComponent, withDirectives, vModelText, toDisplayString, TransitionGroup, createVNode, createApp } from 'vue';
3
+ import { ref, reactive, readonly, defineComponent, openBlock, createElementBlock, normalizeStyle, createElementVNode, createCommentVNode, Fragment, renderList, normalizeClass, createBlock, Transition, withCtx, renderSlot, createTextVNode, resolveComponent, withDirectives, vModelText, toDisplayString, TransitionGroup, createVNode, createApp } from 'vue';
4
4
  import { createLogger, createStore } from 'vuex';
5
5
 
6
6
  function styleInject(css, ref) {
@@ -30,7 +30,7 @@ function styleInject(css, ref) {
30
30
  }
31
31
  }
32
32
 
33
- var css_248z = "/*! @import */\n\n/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'],\n[type='reset'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their instrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity));\n}\n\n.border {\n border-width: 1px;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.hidden {\n display: none;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.flex-shrink {\n flex-shrink: 1;\n}\n\n.list-disc {\n list-style-type: disc;\n}\n\n.absolute {\n position: absolute;\n}\n\n.resize {\n resize: both;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.table-auto {\n table-layout: auto;\n}\n\n.line-through {\n text-decoration: line-through;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n:root {\n --bg-color: #131720;\n --text-color: #d9e1f2;\n --primary: hsl(255, 30%, 55%);\n --focus: hsl(210, 90%, 50%);\n --secondary: #42b983;\n --border-color: hsla(0, 0%, 100%, 0.2);\n --light-1: hsl(210, 30%, 40%);\n --light-2: hsl(255, 30%, 50%);\n --light-background: linear-gradient(to right, var(--light-1), var(--light-2));\n --shadow-1: hsla(236, 50%, 50%, 0.3);\n --shadow-2: hsla(236, 50%, 50%, 0.4);\n --hud-background: rgba(0, 0, 0, 0.4);\n --hud-text-color: var(--text-color);\n --notifications-bg: darkslateblue;\n --skills-text-background: rgba(0, 0, 0, 0.5);\n --skills-text-color: var(--text-color);\n --skills-level-background: rgba(0, 0, 0, 0.5);\n --skills-level-color: orange;\n}\n\n.list-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.list-enter-active,\n.list-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .list-move {\n transition: transform 0.3s ease;\n} */\n\n.list-enter-from,\n.list-leave-to {\n opacity: 0;\n transform: translateX(300px);\n}\n\n.notification-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.notification-enter-active,\n.notification-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .notification-move {\n transition: transform 0.3s ease;\n} */\n\n.notification-enter-from,\n.notification-leave-to {\n opacity: 0;\n transform: translateY(-300px);\n}\n\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\n.fade-leave-to {\n opacity: 0;\n}\n\n.fade-in-enter-active {\n transition: opacity 0.1s ease;\n}\n\n.fade-in-enter-from {\n opacity: 0;\n}\n\nbody {\n padding: 0;\n margin: 0;\n font-family: Arial, sans-serif;\n background-color: black;\n}\n\n.select {\n background: var(--light-background);\n padding: 10px;\n}\n\n.option {\n background-color: var(--light-2);\n padding: 5px;\n color: var(--text-color);\n}\n\n.button {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.button:focus,\n.button:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\n.input {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.input:focus,\n.input:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\ntd {\n padding: 4px;\n border: 1px solid var(--text-color);\n text-align: center;\n}\n\n#game-holder {\n width: 100vw;\n height: 100vh;\n padding: 0;\n margin: 0;\n top: 0;\n left: 0;\n background-color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: -webkit-fill-available;\n}\n\n.title {\n font-size: 30px;\n font-weight: 700;\n text-align: center;\n}\n\n.container {\n padding: 20px;\n}\n\nh1,\nh2,\nh3,\nh4 {\n font-weight: 700;\n}\n\nh1 {\n font-size: 30px;\n}\n\nh2 {\n font-size: 26px;\n}\n\nh3 {\n font-size: 24px;\n}\n\nhr.solid {\n border: 1px solid var(--text-color);\n margin-top: 30px;\n margin-bottom: 30px;\n}\n\n.card-1 {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.card-1:hover {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-2 {\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-3 {\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-4 {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-5 {\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);\n}\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\n";
33
+ var css_248z = "/*! @import */\n\n/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'],\n[type='reset'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their instrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity));\n}\n\n.border {\n border-width: 1px;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.hidden {\n display: none;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.flex-shrink {\n flex-shrink: 1;\n}\n\n.list-disc {\n list-style-type: disc;\n}\n\n.absolute {\n position: absolute;\n}\n\n.resize {\n resize: both;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.table-auto {\n table-layout: auto;\n}\n\n.line-through {\n text-decoration: line-through;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n:root {\n --bg-color: #131720;\n --text-color: #d9e1f2;\n --primary: hsl(255, 30%, 55%);\n --focus: hsl(210, 90%, 50%);\n --secondary: #42b983;\n --border-color: hsla(0, 0%, 100%, 0.2);\n --light-1: hsl(210, 30%, 40%);\n --light-2: hsl(255, 30%, 50%);\n --light-background: linear-gradient(to right, var(--light-1), var(--light-2));\n --shadow-1: hsla(236, 50%, 50%, 0.3);\n --shadow-2: hsla(236, 50%, 50%, 0.4);\n --hud-background: rgba(0, 0, 0, 0.4);\n --hud-text-color: var(--text-color);\n --notifications-bg: darkslateblue;\n --skills-text-background: rgba(0, 0, 0, 0.5);\n --skills-text-color: var(--text-color);\n --skills-level-background: rgba(0, 0, 0, 0.5);\n --skills-level-color: orange;\n --skills-xp-bar-height: 40px;\n --skill-check-name-color: orange;\n --skill-check-difficulty: orange;\n --skill-check-success: green;\n --skill-check-failed: red;\n --skill-check-color: orange;\n --dialog-choice-color: orange;\n --dialog-choice-hover-color: var(--text-color);\n}\n\n.list-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.list-enter-active,\n.list-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .list-move {\n transition: transform 0.3s ease;\n} */\n\n.list-enter-from,\n.list-leave-to {\n opacity: 0;\n transform: translateX(300px);\n}\n\n.notification-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.notification-enter-active,\n.notification-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .notification-move {\n transition: transform 0.3s ease;\n} */\n\n.notification-enter-from,\n.notification-leave-to {\n opacity: 0;\n transform: translateY(-300px);\n}\n\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\n.fade-leave-to {\n opacity: 0;\n}\n\n.fade-in-enter-active {\n transition: opacity 0.1s ease;\n}\n\n.fade-in-enter-from {\n opacity: 0;\n}\n\nbody {\n padding: 0;\n margin: 0;\n font-family: Arial, sans-serif;\n background-color: black;\n}\n\n.select {\n background: var(--light-background);\n padding: 10px;\n}\n\n.option {\n background-color: var(--light-2);\n padding: 5px;\n color: var(--text-color);\n}\n\n.button {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.button:focus,\n.button:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\n.input {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.input:focus,\n.input:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\ntd {\n padding: 4px;\n border: 1px solid var(--text-color);\n text-align: center;\n}\n\n#game-holder {\n width: 100vw;\n height: 100vh;\n padding: 0;\n margin: 0;\n top: 0;\n left: 0;\n background-color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: -webkit-fill-available;\n}\n\n.title {\n font-size: 30px;\n font-weight: 700;\n text-align: center;\n}\n\n.container {\n padding: 20px;\n}\n\nh1,\nh2,\nh3,\nh4 {\n font-weight: 700;\n}\n\nh1 {\n font-size: 30px;\n}\n\nh2 {\n font-size: 26px;\n}\n\nh3 {\n font-size: 24px;\n}\n\nhr.solid {\n border: 1px solid var(--text-color);\n margin-top: 30px;\n margin-bottom: 30px;\n}\n\n.card-1 {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.card-1:hover {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-2 {\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-3 {\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-4 {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-5 {\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);\n}\n\n.dialog-choice {\n transition: 0.2s;\n}\n\n.dialog-choice:hover {\n transform: scale(1.05, 1.05);\n transform-origin: center;\n}\n\n/* Somewhat arcane CSS to force the hover color to override the child style.\nOtherwise hovering choices doesn't change the color of skill check prompts. */\n\n.dialog-choice:not(:hover) > .skill-check-name,\n.passive-skill-check > .skill-check-name {\n color: var(--skill-check-name-color);\n}\n\n.dialog-choice:not(:hover) > .skill-check-difficulty,\n.passive-skill-check > .skill-check-difficulty {\n color: var(--skill-check-difficulty);\n}\n\n.skill-check-difficulty {\n font-weight: 700;\n}\n\n.dialog-choice:not(:hover) > .skill-check-success,\n.passive-skill-check > .skill-check-success {\n color: var(--skill-check-success);\n}\n\n.dialog-choice:not(:hover) > .skill-check-failed,\n.passive-skill-check > .skill-check-failed {\n color: var(--skill-check-failed);\n}\n\n.dialog-choice:not(:hover) > .skill-check,\n.passive-skill-check.skill-check {\n color: var(--skill-check-color);\n}\n\n/* Looks ugly */\n\n/* @keyframes strike-anim {\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n}\n.strike-anim {\n position: relative;\n}\n.strike-anim::after {\n content: ' ';\n position: absolute;\n top: 50%;\n left: 0;\n width: 100%;\n height: 1px;\n background: var(--text-color);\n animation-name: strike-anim;\n animation-duration: 0.5s;\n animation-timing-function: linear;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n} */\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\n";
34
34
  styleInject(css_248z);
35
35
 
36
36
  const f=ref([]),v=ref(null),m=ref(null),g=ref(null),h=reactive({current:""}),y=[],b=ref(!1),k=readonly(f),w=readonly(v),M=readonly(m),q=readonly(g),x=readonly(h),$=(e=w.value)=>{h.current=e;const t=k.value.findIndex((t=>t.name===e)),n=k.value.map((e=>e.name));for(let a=0;a<n.length;a++){if(a>0&&a<n.length-1){const e=n[a]+"Minus",r=n[a]+"Plus";h[e]=t<=a,h[r]=t>=a;}h[n[a]]=n[a]===e;}},V=(e=M.value)=>{h.orientation=e,h.isLandscape="landscape"===e,h.isPortrait="portrait"===e;},O=(e=q.value||"light")=>{h.theme=e,h.isDark="dark"===e,h.isLight="light"===e;};function j(e,t){if("undefined"==typeof window||!window.matchMedia)return !1;if("undefined"!=typeof window&&!window.matchMedia)return console.error("Vue3 Mq: No MatchMedia support detected in this browser. Responsive breakpoints not available."),!1;{b.value=!0;const n=window.matchMedia(e),a=({matches:e})=>{e&&t();};y.push({mql:n,cb:a});n.addEventListener&&"function"==typeof n.addEventListener?n.addEventListener("change",a):n.addListener(a),a(n);}}var L=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",bootstrap5:{xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},bootstrap4:{xs:0,sm:576,md:768,lg:992,xl:1200},bootstrap3:{xs:0,sm:768,md:992,lg:1200},vuetify:{xs:0,sm:600,md:960,lg:1264,xl:1904},tailwind:{xs:0,sm:640,md:768,lg:1024,xl:1280,xxl:1536},devices:{phone:0,tablet:768,laptop:1370,desktop:1906}});const T=e=>{if(!e||"object"!=typeof e)return !1;const t=[];for(let n in e){const a=parseFloat(e[n]);n&&"string"==typeof n?/^[^a-z]/i.test(n)||/[^a-zA-Z0-9_]/.test(n)?console.warn(`Vue3 Mq: "${n}" is an invalid breakpoint key. Breakpoint keys must start with a letter and contain only alphanumeric characters and underscores. Skipping.`):!a&&0!==a||isNaN(a)||a<0?console.warn(`Vue3 Mq: "${n}: ${e[n]}" is not a valid breakpoint. Breakpoints should be a number of zero or above. Skipping.`):t.push({name:n,min:a}):console.warn(`Vue3 Mq: Invalid or missing breakpoint key (${JSON.stringify(n)}). Skipping.`);}t.some((e=>0===e.min))||console.warn("Vue3 Mq: You have not declared a breakpoint with a minimum value of 0. There may be screen sizes to which Vue3Mq does not respond.");return new Set(t.map((e=>e.min))).size<t.length&&console.warn("Vue3 Mq: Your breakpoint configuration contains duplicate values. Behaviour may be unpredictable."),0!==t.length&&t.sort(((e,t)=>e.min-t.min))};function R({breakpoints:e,preset:t}){const n=(e=>{if("string"==typeof e&&L[e])return L[e];{const t=Object.keys(L);return console.error(`Vue3 Mq: "${e}" is not a valid preset. Available options are: ${t.join(", ")}`),!1}})(t),a=T(e);if(!1===n&&!a)throw new TypeError("Vue3 Mq: You must provide a valid preset, or valid breakpoint settings.");var r;r=a||T(n),f.value=r,function(){for(;y.length>0;){const e=y.shift();if(e&&"object"==typeof e){const{mql:t,cb:n}=e;t.addEventListener&&"function"==typeof t.addEventListener?t.removeEventListener("change",n):t.removeListener(n);}}}(),(()=>{const e=Object.keys(h);for(let t of e)delete h[t];$(),V(),O();})();const o=k.value.reduce(((e,t,n,a)=>{const r=`(min-width: ${t.min}px)`,o=n<a.length-1?`(max-width: ${a[n+1].min-1}px)`:null,i=r+(o?" and "+o:"");return Object.assign(e,{[t.name]:i})}),{});for(const i in o){j(o[i],(()=>{$(i);}));}["portrait","landscape"].forEach((e=>{j(`(orientation: ${e})`,(()=>{V(e);}));})),["light","dark"].forEach((e=>{j(`(prefers-color-scheme: ${e})`,(()=>{O(e);}));}));}var N={install:(e,{preset:t="bootstrap5",breakpoints:n,defaultBreakpoint:a,defaultOrientation:r="landscape",defaultTheme:o}={})=>{try{const l=!1===["landscape","portrait"].includes(s=r)?(console.error(`Vue3 Mq: "${s}" is not a valid default orientation. Reverting to unset value.`),null):s,u=((e=null)=>!1===["dark","light"].includes(e)&&null!==e?(console.error(`Vue3 Mq: "${e}" is not a valid default theme. Reverting to unset value.`),null):e)(o);i=a,v.value=i,(e=>{m.value=e;})(l),(e=>{g.value=e;})(u),e.provide("mq",x),e.provide("updateBreakpoints",R),R({breakpoints:n,preset:t});}catch(l){console.error(l);}var i,s;}};
@@ -135,7 +135,7 @@ var script = defineComponent({
135
135
  dialogBoxStyle() {
136
136
  const style = getCharacterStyle(this.options.styleId);
137
137
  const css = {
138
- opacity: this.options.old ? '0.5' : '1',
138
+ opacity: this.options.old ? '0.7' : '1',
139
139
  };
140
140
  if (!this.options.title) {
141
141
  css.marginTop = '-20px';
@@ -174,6 +174,11 @@ var script = defineComponent({
174
174
  }
175
175
  return style;
176
176
  },
177
+ dialogClass(choice) {
178
+ if (!choice.allowed) {
179
+ return 'strike-anim';
180
+ }
181
+ },
177
182
  },
178
183
  });
179
184
 
@@ -221,10 +226,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
221
226
  return (openBlock(), createElementBlock("p", {
222
227
  key: index,
223
228
  style: normalizeStyle(_ctx.dialogStyle(choice)),
229
+ class: normalizeClass([_ctx.dialogClass(choice), "dialog-choice override"]),
224
230
  onClick: $event => (_ctx.chooseOption(choice)),
225
- class: "dialog-choice override",
226
231
  innerHTML: `${index + 1}. –  ${choice.choice}`
227
- }, null, 12, _hoisted_6))
232
+ }, null, 14, _hoisted_6))
228
233
  }), 128))
229
234
  ]))
230
235
  : (_ctx.canInteract)
@@ -239,7 +244,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
239
244
  ], 4))
240
245
  }
241
246
 
242
- var css_248z$1 = ".dialog-title {\n font-size: 20px;\n font-weight: bold;\n}\n\n.dialog-text {\n font-size: 16px;\n}\n\n.dialog-box {\n /* border-radius: 10px; */\n /* border: 1px solid #a8a8a8; */\n color: var(--text-color);\n /* background-color: #2e2e2e; */\n padding: 10px;\n padding-left: 2em;\n margin-bottom: 10px;\n}\n\n.dialog-choice {\n color: orange;\n}\n\n.dialog-choice:hover {\n color: var(--text-color);\n cursor: pointer;\n}\n\n.buttons-container {\n width: 100%;\n padding: 10px;\n display: flex;\n justify-content: space-evenly;\n align-items: stretch;\n box-sizing: border-box;\n}\n\n.interact-button {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n height: 50px;\n color: var(--text-color);\n border: 1px solid black;\n font-weight: bold;\n font-size: 24px;\n text-align: center;\n flex-grow: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.interact-button:not(:last-child) {\n margin-right: 10px;\n}\n";
247
+ var css_248z$1 = ".dialog-title {\n font-size: 20px;\n font-weight: bold;\n}\n\n.dialog-text {\n font-size: 16px;\n}\n\n.dialog-box {\n /* border-radius: 10px; */\n /* border: 1px solid #a8a8a8; */\n color: var(--text-color);\n /* background-color: #2e2e2e; */\n padding: 10px;\n padding-left: 2em;\n margin-bottom: 10px;\n}\n\n.dialog-choice {\n color: var(--dialog-choice-color);\n}\n\n.dialog-choice:hover {\n color: var(--dialog-choice-hover-color);\n cursor: pointer;\n}\n\n.buttons-container {\n width: 100%;\n padding: 10px;\n display: flex;\n justify-content: space-evenly;\n align-items: stretch;\n box-sizing: border-box;\n}\n\n.interact-button {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n height: 50px;\n color: var(--text-color);\n border: 1px solid black;\n font-weight: bold;\n font-size: 24px;\n text-align: center;\n flex-grow: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.interact-button:not(:last-child) {\n margin-right: 10px;\n}\n";
243
248
  styleInject(css_248z$1);
244
249
 
245
250
  script.render = render;
@@ -275,6 +280,9 @@ const defaultConfig = {
275
280
  },
276
281
  buttons: {},
277
282
  skills: {},
283
+ skillOptions: {
284
+ xpPerLevel: 10,
285
+ },
278
286
  skillChecks: {
279
287
  rollRange: 100,
280
288
  skillMultiplier: 10,
@@ -319,6 +327,13 @@ function setConfig(conf) {
319
327
  }
320
328
  function getConfig() {
321
329
  return config$1;
330
+ }
331
+ function getSkillConfig(commit, id) {
332
+ const skill = config$1.skills[id];
333
+ if (!skill) {
334
+ error(commit, `Skill config for skill ${id} doesn't exist`);
335
+ }
336
+ return skill;
322
337
  }
323
338
 
324
339
  var script$1 = defineComponent({
@@ -367,21 +382,20 @@ styleInject(css_248z$2);
367
382
 
368
383
  script$1.render = render$1;
369
384
 
370
- class Logger {
385
+ class LogManager {
371
386
  debug;
372
- constructor(debug) {
373
- this.debug = debug;
374
- }
375
- setDebug(debug) {
387
+ logger = {
388
+ log: () => { },
389
+ };
390
+ setupDebugger(debug) {
376
391
  this.debug = debug;
377
- }
378
- log(...args) {
379
- if (this.debug) {
380
- console.log(...args);
392
+ if (debug) {
393
+ this.logger.log = console.log.bind(window.console);
381
394
  }
382
395
  }
383
396
  }
384
- const logger = new Logger(false);
397
+ const logManager = new LogManager();
398
+ const logger = logManager.logger;
385
399
 
386
400
  function getPlayTime(startedAt, previousTime) {
387
401
  return Date.now() - startedAt + previousTime;
@@ -6349,18 +6363,12 @@ function stopAudio(commit, key) {
6349
6363
  if (sound) {
6350
6364
  sound.stop();
6351
6365
  }
6352
- else {
6353
- error(commit, `Sound effect ${key} not found!`);
6354
- }
6355
6366
  }
6356
6367
  function pauseAudio(commit, key) {
6357
6368
  const sound = getAudio(key);
6358
6369
  if (sound) {
6359
6370
  sound.pause();
6360
6371
  }
6361
- else {
6362
- error(commit, `Sound effect ${key} not found!`);
6363
- }
6364
6372
  }
6365
6373
 
6366
6374
  function debounce(func, waitMilliseconds = 50, options = {}) {
@@ -6576,6 +6584,11 @@ var script$a = defineComponent({
6576
6584
  closeSkill() {
6577
6585
  this.chosenSkill = false;
6578
6586
  },
6587
+ xpBarWidth(xp) {
6588
+ return {
6589
+ width: `${Math.floor((xp / this.xpPerLevel) * 100)}%`,
6590
+ };
6591
+ },
6579
6592
  },
6580
6593
  computed: {
6581
6594
  skillsToDisplay() {
@@ -6595,6 +6608,9 @@ var script$a = defineComponent({
6595
6608
  skillConf() {
6596
6609
  return getConfig().skills;
6597
6610
  },
6611
+ xpPerLevel() {
6612
+ return getConfig().skillOptions.xpPerLevel;
6613
+ },
6598
6614
  },
6599
6615
  });
6600
6616
 
@@ -6606,14 +6622,16 @@ const _hoisted_3$4 = {
6606
6622
  };
6607
6623
  const _hoisted_4$3 = ["onClick"];
6608
6624
  const _hoisted_5$3 = { class: "skill-title" };
6609
- const _hoisted_6$3 = { class: "skill-level" };
6610
- const _hoisted_7$2 = {
6625
+ const _hoisted_6$3 = { class: "skill-xp-container" };
6626
+ const _hoisted_7$2 = { class: "skill-xp-text" };
6627
+ const _hoisted_8$1 = { class: "skill-level" };
6628
+ const _hoisted_9$1 = {
6611
6629
  key: 1,
6612
6630
  class: "flex flex-row skill-description-container"
6613
6631
  };
6614
- const _hoisted_8$1 = { class: "flex skill-left" };
6615
- const _hoisted_9$1 = { class: "flex skill-right" };
6616
- const _hoisted_10$1 = /*#__PURE__*/createElementVNode("hr", { class: "hr-solid" }, null, -1);
6632
+ const _hoisted_10$1 = { class: "flex skill-left" };
6633
+ const _hoisted_11$1 = { class: "flex skill-right" };
6634
+ const _hoisted_12$1 = /*#__PURE__*/createElementVNode("hr", { class: "hr-solid" }, null, -1);
6617
6635
 
6618
6636
  function render$a(_ctx, _cache, $props, $setup, $data, $options) {
6619
6637
  const _component_modal = resolveComponent("modal");
@@ -6634,16 +6652,24 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) {
6634
6652
  return (openBlock(), createElementBlock("button", {
6635
6653
  onClick: () => _ctx.clickSkill(key),
6636
6654
  class: "skill-display",
6637
- style: normalizeStyle(_ctx.getSkillStyle(key))
6655
+ style: normalizeStyle(_ctx.getSkillStyle(key)),
6656
+ key: key
6638
6657
  }, [
6639
6658
  createElementVNode("h3", _hoisted_5$3, toDisplayString(_ctx.getSkillName(key)), 1),
6640
- createElementVNode("h3", _hoisted_6$3, toDisplayString(skill.level), 1)
6659
+ createElementVNode("div", _hoisted_6$3, [
6660
+ createElementVNode("div", {
6661
+ class: "skill-xp-bar",
6662
+ style: normalizeStyle(_ctx.xpBarWidth(skill.xp))
6663
+ }, null, 4),
6664
+ createElementVNode("h3", _hoisted_7$2, toDisplayString(skill.xp) + " / " + toDisplayString(_ctx.xpPerLevel) + " XP ", 1)
6665
+ ]),
6666
+ createElementVNode("h3", _hoisted_8$1, toDisplayString(skill.level), 1)
6641
6667
  ], 12, _hoisted_4$3))
6642
- }), 256))
6668
+ }), 128))
6643
6669
  ]))
6644
6670
  : (typeof _ctx.chosenSkill === 'string')
6645
- ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
6646
- createElementVNode("div", _hoisted_8$1, [
6671
+ ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
6672
+ createElementVNode("div", _hoisted_10$1, [
6647
6673
  createElementVNode("button", {
6648
6674
  class: "button",
6649
6675
  onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.closeSkill && _ctx.closeSkill(...args)))
@@ -6653,9 +6679,9 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) {
6653
6679
  style: normalizeStyle(_ctx.getSkillStyle(_ctx.chosenSkill))
6654
6680
  }, null, 4)
6655
6681
  ]),
6656
- createElementVNode("div", _hoisted_9$1, [
6682
+ createElementVNode("div", _hoisted_11$1, [
6657
6683
  createElementVNode("h2", null, toDisplayString(_ctx.getSkillName(_ctx.chosenSkill)), 1),
6658
- _hoisted_10$1,
6684
+ _hoisted_12$1,
6659
6685
  createElementVNode("h3", null, "Level: " + toDisplayString(_ctx.skills[_ctx.chosenSkill].level), 1),
6660
6686
  createElementVNode("p", null, toDisplayString(_ctx.skillConf[_ctx.chosenSkill].description), 1)
6661
6687
  ])
@@ -6667,7 +6693,7 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) {
6667
6693
  }, 8, ["onClose"]))
6668
6694
  }
6669
6695
 
6670
- var css_248z$b = ".skills-modal {\n width: 800px;\n}\n\n.skills-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.skill-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-size: cover;\n}\n\n.skill-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--skills-text-color);\n background: var(--skills-text-background);\n}\n\n.skill-level {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--skills-level-color);\n width: 40px;\n height: 40px;\n background-color: var(--skills-level-background);\n}\n\n.skill-description-container {\n justify-content: space-between;\n align-items: center;\n}\n\n.skill-left {\n flex-direction: column;\n}\n\n.skill-right {\n flex-direction: column;\n align-items: baseline;\n}\n";
6696
+ var css_248z$b = ".skills-modal {\n width: 800px;\n}\n\n.skills-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.skill-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-size: cover;\n}\n\n.skill-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--skills-text-color);\n background: var(--skills-text-background);\n}\n\n.skill-level {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--skills-level-color);\n width: var(--skills-xp-bar-height);\n height: var(--skills-xp-bar-height);\n background-color: var(--skills-level-background);\n}\n\n.skill-description-container {\n justify-content: space-between;\n align-items: center;\n}\n\n.skill-left {\n flex-direction: column;\n}\n\n.skill-right {\n flex-direction: column;\n align-items: baseline;\n}\n\n.skill-xp-container {\n position: absolute;\n top: 0;\n left: 0;\n height: var(--skills-xp-bar-height);\n width: calc(100% - var(--skills-xp-bar-height));\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.skill-xp-bar {\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n background-color: rgba(0, 0, 250, 0.5);\n}\n\n.skill-xp-text {\n z-index: 2;\n}\n";
6671
6697
  styleInject(css_248z$b);
6672
6698
 
6673
6699
  script$a.render = render$a;
@@ -7130,6 +7156,85 @@ function getSkillCheckState(ctx, skillCheckId) {
7130
7156
  });
7131
7157
  }
7132
7158
  return skillCheck;
7159
+ }
7160
+ function getSkillCheckDifficultyScore(value, level) {
7161
+ return value - level * getConfig().skillChecks.skillMultiplier;
7162
+ }
7163
+ function getSkillCheckDifficultyText(value, level) {
7164
+ const difficultyScore = getSkillCheckDifficultyScore(value, level);
7165
+ const checks = getConfig().skillChecks;
7166
+ let found = false;
7167
+ let i = 0;
7168
+ let checkText = checks.difficultyText[0][1];
7169
+ while (!found) {
7170
+ if (checks.difficultyText.length > i) {
7171
+ if (difficultyScore >= checks.difficultyText[i][0]) {
7172
+ checkText = checks.difficultyText[i][1];
7173
+ }
7174
+ else {
7175
+ found = true;
7176
+ }
7177
+ }
7178
+ else {
7179
+ found = true;
7180
+ }
7181
+ i++;
7182
+ }
7183
+ return checkText;
7184
+ }
7185
+ function getSkillCheckText({ context, skill, skillCheckId, value, }) {
7186
+ const skillCheckState = getSkillCheckState(context, skillCheckId);
7187
+ const skillConfig = getSkillConfig(context.commit, skill);
7188
+ const level = context.state.skills[skill].level;
7189
+ const difficultyText = getSkillCheckDifficultyText(value, level);
7190
+ let allowed = true;
7191
+ let text = `<span class='skill-check'>[<span class='skill-check-name'>${skillConfig.name}</span> - `;
7192
+ if (skillCheckState.available) {
7193
+ text += ` <span class='skill-check-difficulty'>${difficultyText}</span>]</span>`;
7194
+ }
7195
+ else if (skillCheckState.passed) {
7196
+ text = '';
7197
+ }
7198
+ else {
7199
+ allowed = false;
7200
+ text += ` <span class='skill-check-difficulty'>${difficultyText}</span> - <span class='skill-check-failed'>FAILED</span>]</span>`;
7201
+ }
7202
+ return {
7203
+ difficultyText: text,
7204
+ allowed,
7205
+ };
7206
+ }
7207
+ function getPassiveSkillCheckText(ctx, success, params) {
7208
+ const skillConf = getSkillConfig(ctx.commit, params.skill);
7209
+ const difficultyText = getSkillCheckDifficultyText(params.value, ctx.state.skills[params.skill].level);
7210
+ return `<span class='passive-skill-check skill-check'>[<span class='skill-check-name'>${skillConf.name}</span> - <span class='skill-check-difficulty'>${difficultyText}</span> - ${success
7211
+ ? '<span class="skill-check-success">Success</span>'
7212
+ : '<span class="skill-check-failed">Failure</span>'}]</span>`;
7213
+ }
7214
+ function calculateSkillCheckRoll(state, skill) {
7215
+ const { skillChecks } = getConfig();
7216
+ const unmodifiedRoll = Math.floor(Math.random() * skillChecks.rollRange);
7217
+ const rollModifier = state.skills[skill].level * skillChecks.skillMultiplier;
7218
+ const roll = unmodifiedRoll + rollModifier;
7219
+ logger.log(`[SKILL CHECK] Roll: ${roll}. (Base roll: ${unmodifiedRoll}, modifier: ${rollModifier} - Skill level: ${state.skills[skill].level})`);
7220
+ return {
7221
+ roll,
7222
+ unmodifiedRoll,
7223
+ };
7224
+ }
7225
+ function resolveSkillCheck(state, params) {
7226
+ const { skills, skillChecks } = getConfig();
7227
+ let success = true;
7228
+ const { roll } = calculateSkillCheckRoll(state, params.skill);
7229
+ if (roll <= skillChecks.failureChance - 1) {
7230
+ success = false;
7231
+ }
7232
+ const skill = skills[params.skill];
7233
+ if (roll < params.value) {
7234
+ success = false;
7235
+ }
7236
+ logger.log(`[SKILL CHECK ${skill.name}]: ${success ? '✅' : '❌'}`, `(${params.id}) - ${roll}/${params.value}`);
7237
+ return success;
7133
7238
  }
7134
7239
 
7135
7240
  function processSkillCheck(ctx, skillcheck) {
@@ -7143,25 +7248,13 @@ function processSkillCheck(ctx, skillcheck) {
7143
7248
  }
7144
7249
  function runSkillCheck(ctx, params) {
7145
7250
  const { state } = ctx;
7146
- const { skills, skillChecks } = getConfig();
7147
- let success = true;
7148
- let roll = Math.floor(Math.random() * skillChecks.rollRange);
7149
- if (roll <= skillChecks.failureChance - 1) {
7150
- success = false;
7151
- }
7152
- roll += state.skills[params.skill].level * skillChecks.skillMultiplier;
7153
- const skill = skills[params.skill];
7154
- logger.log(`roll `, roll, params.value);
7155
- if (roll < params.value) {
7156
- success = false;
7157
- }
7251
+ const success = resolveSkillCheck(state, params);
7252
+ writeText(ctx, getPassiveSkillCheckText(ctx, success, params));
7158
7253
  if (success) {
7159
7254
  ctx.commit('passSkillCheck', params.id);
7160
- writeText(ctx, `[${skill.name} - Success] ${params.success || ''}`);
7161
7255
  return true;
7162
7256
  }
7163
7257
  ctx.commit('failSkillCheck', params.id);
7164
- writeText(ctx, `[${skill.name} - Failure] ${params.failure || ''}`);
7165
7258
  return false;
7166
7259
  }
7167
7260
  function runConditionCommand(ctx, command) {
@@ -7336,13 +7429,21 @@ async function runCommand(context, cmd, choices) {
7336
7429
  if (!skillKey || !levelToAdd) {
7337
7430
  error(commit, `add_level command needs a skill id and a value as parameters`);
7338
7431
  }
7339
- commit('incrementSkill', {
7432
+ dispatch('incrementSkill', {
7340
7433
  skill: skillKey,
7341
7434
  amount: levelToAdd,
7342
7435
  });
7343
- const skillName = getConfig().skills[skillKey].name;
7344
- const skillLevel = state.skills[skillKey].level;
7345
- dispatch('addNotification', `Your skill in ${skillName} is now level ${skillLevel}`);
7436
+ return dispatch('nextLine');
7437
+ case 'add_xp':
7438
+ const xpKey = cmd.args[0];
7439
+ const xpToAdd = cmd.args[1];
7440
+ if (!xpKey || !xpToAdd) {
7441
+ error(commit, `add_xp command needs a skill id and a value as parameters`);
7442
+ }
7443
+ dispatch('addXp', {
7444
+ skill: xpKey,
7445
+ amount: xpToAdd,
7446
+ });
7346
7447
  return dispatch('nextLine');
7347
7448
  case 'add_stat':
7348
7449
  const statKey = cmd.args[0];
@@ -7443,6 +7544,12 @@ async function runChoice(context, cmd) {
7443
7544
  if (choice.condition) {
7444
7545
  return runCondition(context, choice.condition);
7445
7546
  }
7547
+ if (choice.skillCheck) {
7548
+ if (!getSkillCheckState(context, choice.skillCheck.id).available &&
7549
+ choice.skillCheck.hideAfterRoll) {
7550
+ return false;
7551
+ }
7552
+ }
7446
7553
  return true;
7447
7554
  })
7448
7555
  .map((choice) => {
@@ -7450,35 +7557,14 @@ async function runChoice(context, cmd) {
7450
7557
  let choiceAllowed = true;
7451
7558
  if (choice.skillCheck) {
7452
7559
  const check = choice.skillCheck;
7453
- const config = getConfig();
7454
- const skill = config.skills[check.skill];
7455
- const level = context.state.skills[check.skill].level;
7456
- const difficultyScore = check.value - level * config.skillChecks.skillMultiplier;
7457
- const skillCheckState = getSkillCheckState(context, choice.skillCheck.id);
7458
- let found = false;
7459
- let i = 0;
7460
- let checkText = config.skillChecks.difficultyText[0][1];
7461
- while (!found) {
7462
- if (config.skillChecks.difficultyText.length > i) {
7463
- if (difficultyScore >= config.skillChecks.difficultyText[i][0]) {
7464
- checkText = config.skillChecks.difficultyText[i][1];
7465
- }
7466
- else {
7467
- found = true;
7468
- }
7469
- }
7470
- else {
7471
- found = true;
7472
- }
7473
- i++;
7474
- }
7475
- if (!skillCheckState.available) {
7476
- choiceAllowed = false;
7477
- text = `[${skill.name} - Failed] ${text}`;
7478
- }
7479
- else if (!skillCheckState.passed) {
7480
- text = `[${skill.name} - ${checkText}] ${text}`;
7481
- }
7560
+ const { difficultyText, allowed } = getSkillCheckText({
7561
+ context,
7562
+ skill: check.skill,
7563
+ skillCheckId: check.id,
7564
+ value: check.value,
7565
+ });
7566
+ text = `${difficultyText} ${text}`;
7567
+ choiceAllowed = allowed;
7482
7568
  }
7483
7569
  const result = {
7484
7570
  choice: text,
@@ -7560,6 +7646,10 @@ function add_level(ctx) {
7560
7646
  ctx.command.commandType = 'add_level';
7561
7647
  ctx.currentLine++;
7562
7648
  }
7649
+ function add_xp(ctx) {
7650
+ ctx.command.commandType = 'add_xp';
7651
+ ctx.currentLine++;
7652
+ }
7563
7653
  function set_stat(ctx) {
7564
7654
  ctx.command.commandType = 'set_stat';
7565
7655
  ctx.currentLine++;
@@ -7680,6 +7770,7 @@ const parserFunctions = {
7680
7770
  wait,
7681
7771
  text,
7682
7772
  add_level,
7773
+ add_xp,
7683
7774
  notify,
7684
7775
  set_stat,
7685
7776
  add_stat,
@@ -7697,6 +7788,7 @@ function parseChoiceOption(ctx, choice, index) {
7697
7788
  ctx.parserContext.error(choice.line, `Skillchecks need 4 arguments!`);
7698
7789
  }
7699
7790
  choiceText = choice.args[3];
7791
+ const hideAfterRoll = choice.args.length >= 5;
7700
7792
  const successBranch = choice.branch[0];
7701
7793
  const failureBranch = choice.branch[1];
7702
7794
  const success = {
@@ -7715,6 +7807,7 @@ function parseChoiceOption(ctx, choice, index) {
7715
7807
  id: choice.args[0],
7716
7808
  skill: choice.args[1],
7717
7809
  value: choice.args[2],
7810
+ hideAfterRoll,
7718
7811
  success,
7719
7812
  failure,
7720
7813
  };
@@ -7930,6 +8023,138 @@ function randomId() {
7930
8023
  return `${Date.now() - Math.floor(Math.random() * 99999999)}`;
7931
8024
  }
7932
8025
 
8026
+ var isMergeableObject = function isMergeableObject(value) {
8027
+ return isNonNullObject(value)
8028
+ && !isSpecial(value)
8029
+ };
8030
+
8031
+ function isNonNullObject(value) {
8032
+ return !!value && typeof value === 'object'
8033
+ }
8034
+
8035
+ function isSpecial(value) {
8036
+ var stringValue = Object.prototype.toString.call(value);
8037
+
8038
+ return stringValue === '[object RegExp]'
8039
+ || stringValue === '[object Date]'
8040
+ || isReactElement(value)
8041
+ }
8042
+
8043
+ // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
8044
+ var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
8045
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
8046
+
8047
+ function isReactElement(value) {
8048
+ return value.$$typeof === REACT_ELEMENT_TYPE
8049
+ }
8050
+
8051
+ function emptyTarget(val) {
8052
+ return Array.isArray(val) ? [] : {}
8053
+ }
8054
+
8055
+ function cloneUnlessOtherwiseSpecified(value, options) {
8056
+ return (options.clone !== false && options.isMergeableObject(value))
8057
+ ? deepmerge(emptyTarget(value), value, options)
8058
+ : value
8059
+ }
8060
+
8061
+ function defaultArrayMerge(target, source, options) {
8062
+ return target.concat(source).map(function(element) {
8063
+ return cloneUnlessOtherwiseSpecified(element, options)
8064
+ })
8065
+ }
8066
+
8067
+ function getMergeFunction(key, options) {
8068
+ if (!options.customMerge) {
8069
+ return deepmerge
8070
+ }
8071
+ var customMerge = options.customMerge(key);
8072
+ return typeof customMerge === 'function' ? customMerge : deepmerge
8073
+ }
8074
+
8075
+ function getEnumerableOwnPropertySymbols(target) {
8076
+ return Object.getOwnPropertySymbols
8077
+ ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
8078
+ return target.propertyIsEnumerable(symbol)
8079
+ })
8080
+ : []
8081
+ }
8082
+
8083
+ function getKeys(target) {
8084
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
8085
+ }
8086
+
8087
+ function propertyIsOnObject(object, property) {
8088
+ try {
8089
+ return property in object
8090
+ } catch(_) {
8091
+ return false
8092
+ }
8093
+ }
8094
+
8095
+ // Protects from prototype poisoning and unexpected merging up the prototype chain.
8096
+ function propertyIsUnsafe(target, key) {
8097
+ return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
8098
+ && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
8099
+ && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
8100
+ }
8101
+
8102
+ function mergeObject(target, source, options) {
8103
+ var destination = {};
8104
+ if (options.isMergeableObject(target)) {
8105
+ getKeys(target).forEach(function(key) {
8106
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
8107
+ });
8108
+ }
8109
+ getKeys(source).forEach(function(key) {
8110
+ if (propertyIsUnsafe(target, key)) {
8111
+ return
8112
+ }
8113
+
8114
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
8115
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
8116
+ } else {
8117
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
8118
+ }
8119
+ });
8120
+ return destination
8121
+ }
8122
+
8123
+ function deepmerge(target, source, options) {
8124
+ options = options || {};
8125
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
8126
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
8127
+ // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
8128
+ // implementations can use it. The caller may not replace it.
8129
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
8130
+
8131
+ var sourceIsArray = Array.isArray(source);
8132
+ var targetIsArray = Array.isArray(target);
8133
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
8134
+
8135
+ if (!sourceAndTargetTypesMatch) {
8136
+ return cloneUnlessOtherwiseSpecified(source, options)
8137
+ } else if (sourceIsArray) {
8138
+ return options.arrayMerge(target, source, options)
8139
+ } else {
8140
+ return mergeObject(target, source, options)
8141
+ }
8142
+ }
8143
+
8144
+ deepmerge.all = function deepmergeAll(array, options) {
8145
+ if (!Array.isArray(array)) {
8146
+ throw new Error('first argument should be an array')
8147
+ }
8148
+
8149
+ return array.reduce(function(prev, next) {
8150
+ return deepmerge(prev, next, options)
8151
+ }, {})
8152
+ };
8153
+
8154
+ var deepmerge_1 = deepmerge;
8155
+
8156
+ var cjs = deepmerge_1;
8157
+
7933
8158
  let key = Symbol('Store Injection Key');
7934
8159
  let store;
7935
8160
  function setupStore(options) {
@@ -7940,7 +8165,6 @@ function setupStore(options) {
7940
8165
  }
7941
8166
  // define injection key
7942
8167
  key = Symbol('Store Injection Key');
7943
- logger.setDebug(options.debug);
7944
8168
  logger.log('setup store');
7945
8169
  store = createStore({
7946
8170
  state: {
@@ -8099,26 +8323,48 @@ function setupStore(options) {
8099
8323
  changeMusic(ctx, getConfig().audioOptions.defaultMusic);
8100
8324
  }
8101
8325
  },
8102
- async addNotification({ commit }, text) {
8326
+ async addNotification(ctx, text) {
8327
+ const { commit } = ctx;
8103
8328
  const id = `${Date.now()}-${Math.random() * 10000}`;
8104
8329
  const notification = {
8105
8330
  text,
8106
8331
  };
8107
8332
  commit('addNotification', { id, notification });
8333
+ if (getConfig().notifications.alsoPrintInDialogue) {
8334
+ writeText(ctx, `[NOTIFICATION] ${text}`);
8335
+ }
8108
8336
  await timeout(getConfig().notifications.timeOnScreen * 1000);
8109
8337
  commit('deleteNotification', id);
8110
8338
  },
8339
+ incrementSkill({ dispatch, state }, { skill, amount }) {
8340
+ state.skills[skill].level += amount;
8341
+ dispatch('levelledUp', skill);
8342
+ },
8343
+ levelledUp({ dispatch, state }, skill) {
8344
+ const skillName = getConfig().skills[skill].name;
8345
+ const skillLevel = state.skills[skill].level;
8346
+ dispatch('addNotification', `Your skill in ${skillName} is now level ${skillLevel}`);
8347
+ },
8348
+ addXp({ state, dispatch }, { skill, amount }) {
8349
+ const skillState = state.skills[skill];
8350
+ skillState.xp += amount;
8351
+ if (skillState.xp > getConfig().skillOptions.xpPerLevel) {
8352
+ skillState.level += 1;
8353
+ skillState.xp = 0;
8354
+ dispatch('levelledUp', skill);
8355
+ }
8356
+ },
8111
8357
  },
8112
8358
  mutations: {
8113
8359
  setLoadedData(state, save) {
8114
8360
  state.machine.data = save.data;
8115
- state.skills = save.skills;
8361
+ state.skills = cjs(state.skillChecks, save.skills);
8116
8362
  state.dialog = save.dialog;
8117
- state.buttons = save.buttons;
8363
+ state.buttons = cjs(state.buttons, save.buttons);
8118
8364
  state.lastLabel = save.lastLabel;
8119
- state.skillChecks = save.skillChecks;
8365
+ state.skillChecks = cjs(state.skillChecks, save.skillChecks);
8120
8366
  state.playTime.previousPlaytime = save.playTime;
8121
- state.hudStats = save.hudStats;
8367
+ state.hudStats = cjs(state.hudStats, save.hudStats);
8122
8368
  state.currentScreen = save.currentScreen;
8123
8369
  state.audio.currentMusic = save.audio.currentMusic;
8124
8370
  },
@@ -8156,6 +8402,7 @@ function setupStore(options) {
8156
8402
  for (const skill in skills) {
8157
8403
  state.skills[skill] = {
8158
8404
  level: skills[skill].startingLevel || 0,
8405
+ xp: 0,
8159
8406
  };
8160
8407
  }
8161
8408
  },
@@ -8164,9 +8411,6 @@ function setupStore(options) {
8164
8411
  state.hudStats[stat] = stats[stat].startingValue;
8165
8412
  }
8166
8413
  },
8167
- incrementSkill(state, { skill, amount }) {
8168
- state.skills[skill].level += amount;
8169
- },
8170
8414
  setStat(state, { stat, amount }) {
8171
8415
  state.hudStats[stat] = amount;
8172
8416
  },
@@ -8383,9 +8627,10 @@ function mouseclick(e) {
8383
8627
  let app;
8384
8628
  let store$2;
8385
8629
  async function startApp(config, options) {
8630
+ logManager.setupDebugger(options.debug);
8386
8631
  const configFile = await getFile('data/config.json');
8387
8632
  setConfig(JSON.parse(configFile));
8388
- console.log('%c Narrat game engine – 0.9.4 - June 5, 2022 23:02:23', 'background: #222; color: #bada55');
8633
+ console.log('%c Narrat game engine – 0.10.0 - June 8, 2022 02:13:08', 'background: #222; color: #bada55');
8389
8634
  const storeSetup = setupStore(options);
8390
8635
  store$2 = storeSetup.store;
8391
8636
  app = createApp(script$b, {