narrat 0.8.1 → 0.8.4
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/LICENSE +21 -21
- package/README.md +30 -30
- package/lib/components/menu.vue.d.ts +61 -0
- package/lib/index.esm.js +222 -108
- package/lib/index.js +221 -107
- package/lib/utils/images-loader.d.ts +1 -1
- package/lib/utils/logger.d.ts +8 -0
- package/package.json +82 -82
- package/CHANGELOG.md +0 -123
package/lib/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// Version: 0.8.
|
|
1
|
+
// Version: 0.8.4 - June 4, 2022 18:58:52
|
|
2
2
|
import 'es6-promise/auto';
|
|
3
|
-
import { ref, reactive, readonly, defineComponent, openBlock, createElementBlock, normalizeStyle, createElementVNode, createCommentVNode, Fragment, renderList, createBlock, Transition, withCtx, renderSlot, createTextVNode, resolveComponent, toDisplayString,
|
|
3
|
+
import { ref, reactive, readonly, defineComponent, openBlock, createElementBlock, normalizeStyle, createElementVNode, createCommentVNode, Fragment, renderList, createBlock, Transition, withCtx, renderSlot, createTextVNode, resolveComponent, 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.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.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.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}\n\nselect {\n background-color: grey;\n}\n\nbutton {\n background-color: #72080f;\n color: white;\n border-radius: 30px;\n padding: 5px;\n font-weight: 800;\n font-size: 16px;\n margin: 5px;\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\ntd {\n padding: 4px;\n border: 1px solid white;\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@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.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.list-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.list-enter-active,\r\n.list-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .list-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.list-enter-from,\r\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,\r\n.notification-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .notification-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.notification-enter-from,\r\n.notification-leave-to {\n opacity: 0;\n transform: translateY(-300px);\n}\n\n.fade-enter-active,\r\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\r\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}\n\nselect {\n background-color: grey;\n}\n\n.button {\n background-color: #72080f;\n color: white;\n border-radius: 15px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\r\ntd {\n padding: 4px;\n border: 1px solid white;\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\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}\r\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;}};
|
|
@@ -239,7 +239,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
239
239
|
], 4))
|
|
240
240
|
}
|
|
241
241
|
|
|
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: white;\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: white;\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 height: 50px;\n background-color: #72080f;\n color: white;\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";
|
|
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: white;\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: white;\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 height: 50px;\n background-color: #72080f;\n color: white;\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}\r\n";
|
|
243
243
|
styleInject(css_248z$1);
|
|
244
244
|
|
|
245
245
|
script.render = render;
|
|
@@ -303,11 +303,27 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
303
303
|
], 4))
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
var css_248z$2 = ".dialog-picture {\n position: absolute;\n width: 80px;\n height: 80px;\n border: 2px solid white;\n border-radius: 10px;\n background-color: grey;\n z-index: 99;\n}\n\n.dialog-picture img {\n width: 100%;\n height: 100%;\n}\n";
|
|
306
|
+
var css_248z$2 = ".dialog-picture {\n position: absolute;\n width: 80px;\n height: 80px;\n border: 2px solid white;\n border-radius: 10px;\n background-color: grey;\n z-index: 99;\n}\n\n.dialog-picture img {\n width: 100%;\n height: 100%;\n}\r\n";
|
|
307
307
|
styleInject(css_248z$2);
|
|
308
308
|
|
|
309
309
|
script$1.render = render$1;
|
|
310
310
|
|
|
311
|
+
class Logger {
|
|
312
|
+
debug;
|
|
313
|
+
constructor(debug) {
|
|
314
|
+
this.debug = debug;
|
|
315
|
+
}
|
|
316
|
+
setDebug(debug) {
|
|
317
|
+
this.debug = debug;
|
|
318
|
+
}
|
|
319
|
+
log(...args) {
|
|
320
|
+
if (this.debug) {
|
|
321
|
+
console.log(...args);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
const logger = new Logger(false);
|
|
326
|
+
|
|
311
327
|
function getPlayTime(startedAt, previousTime) {
|
|
312
328
|
return Date.now() - startedAt + previousTime;
|
|
313
329
|
}
|
|
@@ -360,7 +376,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
360
376
|
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
361
377
|
_hoisted_9,
|
|
362
378
|
createElementVNode("button", {
|
|
363
|
-
class: "modal-default-button",
|
|
379
|
+
class: "modal-default-button button",
|
|
364
380
|
onClick: _cache[0] || (_cache[0] = $event => (_ctx.$emit('close')))
|
|
365
381
|
}, " Close ")
|
|
366
382
|
])
|
|
@@ -373,7 +389,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
373
389
|
}))
|
|
374
390
|
}
|
|
375
391
|
|
|
376
|
-
var css_248z$3 = ".modal-mask {\n position: fixed;\n z-index: 9998;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: table;\n transition: opacity 0.3s ease;\n}\n\n.modal-wrapper {\n display: table-cell;\n vertical-align: middle;\n}\n\n.modal-container {\n min-width: 300px;\n max-width: 90vw;\n max-height: 75vh;\n overflow-y: auto;\n margin: 0px auto;\n padding: 20px 30px;\n border-radius: 2px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);\n transition: all 0.3s ease;\n font-family: Helvetica, Arial, sans-serif;\n}\n\n.modal-header h3 {\n margin-top: 0;\n color: #42b983;\n}\n\n.modal-body {\n margin: 20px 0;\n}\n\n.modal-default-button {\n float: right;\n}\n\n/*\n * The following styles are auto-applied to elements with\n * transition=\"modal\" when their visibility is toggled\n * by Vue.js.\n *\n * You can easily play with the modal transition by editing\n * these styles.\n */\n\n.modal-enter {\n opacity: 0;\n}\n\n.modal-leave-active {\n opacity: 0;\n}\n\n.modal-enter .modal-container,\n.modal-leave-active .modal-container {\n transform: scale(1.1);\n}\n";
|
|
392
|
+
var css_248z$3 = ".modal-mask {\n position: fixed;\n z-index: 9998;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: table;\n transition: opacity 0.3s ease;\n}\n\n.modal-wrapper {\n display: table-cell;\n vertical-align: middle;\n}\n\n.modal-container {\n min-width: 300px;\n max-width: 90vw;\n max-height: 75vh;\n overflow-y: auto;\n margin: 0px auto;\n padding: 20px 30px;\n border-radius: 2px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);\n transition: all 0.3s ease;\n font-family: Helvetica, Arial, sans-serif;\n}\n\n.modal-header h3 {\n margin-top: 0;\n color: #42b983;\n}\n\n.modal-body {\n margin: 20px 0;\n}\n\n.modal-default-button {\n float: right;\n}\n\n/*\r\n * The following styles are auto-applied to elements with\r\n * transition=\"modal\" when their visibility is toggled\r\n * by Vue.js.\r\n *\r\n * You can easily play with the modal transition by editing\r\n * these styles.\r\n */\n\n.modal-enter {\n opacity: 0;\n}\n\n.modal-leave-active {\n opacity: 0;\n}\n\n.modal-enter .modal-container,\r\n.modal-leave-active .modal-container {\n transform: scale(1.1);\n}\r\n";
|
|
377
393
|
styleInject(css_248z$3);
|
|
378
394
|
|
|
379
395
|
script$2.render = render$2;
|
|
@@ -408,7 +424,7 @@ var script$3 = defineComponent({
|
|
|
408
424
|
wordCount() {
|
|
409
425
|
const scripts = Object.values(this.$store.state.machine.script);
|
|
410
426
|
const count = scripts.reduce((count, script) => {
|
|
411
|
-
|
|
427
|
+
logger.log(count);
|
|
412
428
|
return count + this.countWordsInScriptBranch(script);
|
|
413
429
|
}, 0);
|
|
414
430
|
alert(`You have ${count} words`);
|
|
@@ -475,26 +491,27 @@ var script$3 = defineComponent({
|
|
|
475
491
|
});
|
|
476
492
|
|
|
477
493
|
const _hoisted_1$3 = { class: "debug-menu" };
|
|
478
|
-
const _hoisted_2$2 = /*#__PURE__*/createElementVNode("h3",
|
|
494
|
+
const _hoisted_2$2 = /*#__PURE__*/createElementVNode("h3", { class: "title" }, "Error(s)", -1);
|
|
479
495
|
const _hoisted_3$2 = /*#__PURE__*/createTextVNode(" There are errors in your dialogue scripts. Open the developer console for more details. ");
|
|
480
496
|
const _hoisted_4$2 = ["innerHTML"];
|
|
481
|
-
const _hoisted_5$2 = /*#__PURE__*/createElementVNode("h3",
|
|
482
|
-
const _hoisted_6$2 =
|
|
483
|
-
const _hoisted_7$2 = /*#__PURE__*/
|
|
497
|
+
const _hoisted_5$2 = /*#__PURE__*/createElementVNode("h3", { class: "title" }, "Debug Menu!", -1);
|
|
498
|
+
const _hoisted_6$2 = { class: "container" };
|
|
499
|
+
const _hoisted_7$2 = /*#__PURE__*/createTextVNode(" Hello this is the debug menu. ");
|
|
500
|
+
const _hoisted_8$1 = /*#__PURE__*/createElementVNode("option", {
|
|
484
501
|
selected: "",
|
|
485
502
|
disabled: ""
|
|
486
503
|
}, "Jump to a label", -1);
|
|
487
|
-
const
|
|
488
|
-
const
|
|
489
|
-
const
|
|
490
|
-
const
|
|
491
|
-
const
|
|
504
|
+
const _hoisted_9$1 = ["value"];
|
|
505
|
+
const _hoisted_10 = { class: "grid grid-cols-3 gap-4" };
|
|
506
|
+
const _hoisted_11 = /*#__PURE__*/createElementVNode("h2", null, "Skills", -1);
|
|
507
|
+
const _hoisted_12 = { class: "table-auto" };
|
|
508
|
+
const _hoisted_13 = /*#__PURE__*/createElementVNode("tr", null, [
|
|
492
509
|
/*#__PURE__*/createElementVNode("th", null, "Skill"),
|
|
493
510
|
/*#__PURE__*/createElementVNode("th", null, "Level")
|
|
494
511
|
], -1);
|
|
495
|
-
const
|
|
496
|
-
const
|
|
497
|
-
const
|
|
512
|
+
const _hoisted_14 = /*#__PURE__*/createElementVNode("h2", null, "Skill Checks", -1);
|
|
513
|
+
const _hoisted_15 = { class: "table-auto" };
|
|
514
|
+
const _hoisted_16 = /*#__PURE__*/createElementVNode("thead", null, [
|
|
498
515
|
/*#__PURE__*/createElementVNode("tr", null, [
|
|
499
516
|
/*#__PURE__*/createElementVNode("th", null, "Skill Check"),
|
|
500
517
|
/*#__PURE__*/createElementVNode("th", null, "Available"),
|
|
@@ -508,7 +525,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
508
525
|
return (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
509
526
|
createElementVNode("button", {
|
|
510
527
|
onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.open && _ctx.open(...args))),
|
|
511
|
-
class: "debug-button"
|
|
528
|
+
class: "button debug-button"
|
|
512
529
|
}, "Debug Menu"),
|
|
513
530
|
(_ctx.errors.length > 0)
|
|
514
531
|
? (openBlock(), createBlock(_component_modal, {
|
|
@@ -542,49 +559,53 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
542
559
|
_hoisted_5$2
|
|
543
560
|
]),
|
|
544
561
|
body: withCtx(() => [
|
|
545
|
-
_hoisted_6$2,
|
|
546
|
-
createElementVNode("select", {
|
|
547
|
-
name: "label-selector",
|
|
548
|
-
onChange: _cache[1] || (_cache[1] = $event => (_ctx.labelSelected($event)))
|
|
549
|
-
}, [
|
|
562
|
+
createElementVNode("div", _hoisted_6$2, [
|
|
550
563
|
_hoisted_7$2,
|
|
551
|
-
(
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
createElementVNode("table", _hoisted_14, [
|
|
579
|
-
_hoisted_15,
|
|
580
|
-
createElementVNode("tbody", null, [
|
|
581
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.skillChecks, (check, key) => {
|
|
564
|
+
createElementVNode("select", {
|
|
565
|
+
name: "label-selector",
|
|
566
|
+
onChange: _cache[1] || (_cache[1] = $event => (_ctx.labelSelected($event)))
|
|
567
|
+
}, [
|
|
568
|
+
_hoisted_8$1,
|
|
569
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels, (label) => {
|
|
570
|
+
return (openBlock(), createElementBlock("option", {
|
|
571
|
+
value: label,
|
|
572
|
+
key: label
|
|
573
|
+
}, toDisplayString(label), 9, _hoisted_9$1))
|
|
574
|
+
}), 128))
|
|
575
|
+
], 32),
|
|
576
|
+
createElementVNode("div", _hoisted_10, [
|
|
577
|
+
createElementVNode("button", {
|
|
578
|
+
onClick: _cache[2] || (_cache[2] = (...args) => (_ctx.wordCount && _ctx.wordCount(...args))),
|
|
579
|
+
class: "button"
|
|
580
|
+
}, "Word Count"),
|
|
581
|
+
createElementVNode("button", {
|
|
582
|
+
onClick: _cache[3] || (_cache[3] = (...args) => (_ctx.save && _ctx.save(...args))),
|
|
583
|
+
class: "button"
|
|
584
|
+
}, "Save Game")
|
|
585
|
+
]),
|
|
586
|
+
createElementVNode("h3", null, "Play time: " + toDisplayString(_ctx.getPlayTimeString()), 1),
|
|
587
|
+
_hoisted_11,
|
|
588
|
+
createElementVNode("table", _hoisted_12, [
|
|
589
|
+
_hoisted_13,
|
|
590
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.skills, (skill, key) => {
|
|
582
591
|
return (openBlock(), createElementBlock("tr", { key: key }, [
|
|
583
592
|
createElementVNode("td", null, toDisplayString(key), 1),
|
|
584
|
-
createElementVNode("td", null, toDisplayString(
|
|
585
|
-
createElementVNode("td", null, toDisplayString(check.passed ? '✅' : '❌'), 1)
|
|
593
|
+
createElementVNode("td", null, toDisplayString(skill.level), 1)
|
|
586
594
|
]))
|
|
587
595
|
}), 128))
|
|
596
|
+
]),
|
|
597
|
+
_hoisted_14,
|
|
598
|
+
createElementVNode("table", _hoisted_15, [
|
|
599
|
+
_hoisted_16,
|
|
600
|
+
createElementVNode("tbody", null, [
|
|
601
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.skillChecks, (check, key) => {
|
|
602
|
+
return (openBlock(), createElementBlock("tr", { key: key }, [
|
|
603
|
+
createElementVNode("td", null, toDisplayString(key), 1),
|
|
604
|
+
createElementVNode("td", null, toDisplayString(check.available ? '✅' : '❌'), 1),
|
|
605
|
+
createElementVNode("td", null, toDisplayString(check.passed ? '✅' : '❌'), 1)
|
|
606
|
+
]))
|
|
607
|
+
}), 128))
|
|
608
|
+
])
|
|
588
609
|
])
|
|
589
610
|
])
|
|
590
611
|
]),
|
|
@@ -594,7 +615,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
594
615
|
]))
|
|
595
616
|
}
|
|
596
617
|
|
|
597
|
-
var css_248z$4 = ".debug-menu {\n z-index: 9999;\n}\n\n.debug-button {\n background-color: #4fc08d;\n position: fixed;\n bottom: 10px;\n right: 10px;\n padding:
|
|
618
|
+
var css_248z$4 = ".debug-menu {\n z-index: 9999;\n}\n\n.debug-button {\n background-color: #4fc08d;\n position: fixed;\n bottom: 10px;\n right: 10px;\n padding: 5px;\n}\n\n.error-message {\n color: orangered;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n\n.error-filename {\n color: grey;\n text-decoration: underline;\n}\r\n";
|
|
598
619
|
styleInject(css_248z$4);
|
|
599
620
|
|
|
600
621
|
script$3.render = render$3;
|
|
@@ -3853,14 +3874,13 @@ var script$4 = defineComponent({
|
|
|
3853
3874
|
};
|
|
3854
3875
|
},
|
|
3855
3876
|
mounted() {
|
|
3856
|
-
howler.Howler.volume(
|
|
3877
|
+
const volume = howler.Howler.volume();
|
|
3878
|
+
this.$refs.slider.value = volume;
|
|
3857
3879
|
},
|
|
3858
3880
|
methods: {
|
|
3859
3881
|
changeVolume(event) {
|
|
3860
|
-
console.log(event);
|
|
3861
3882
|
const target = event.target;
|
|
3862
3883
|
howler.Howler.volume(target.value);
|
|
3863
|
-
console.log(target.value);
|
|
3864
3884
|
},
|
|
3865
3885
|
toggleMute() {
|
|
3866
3886
|
if (this.muted) {
|
|
@@ -3876,12 +3896,16 @@ var script$4 = defineComponent({
|
|
|
3876
3896
|
});
|
|
3877
3897
|
|
|
3878
3898
|
const _hoisted_1$4 = { class: "volume-controls" };
|
|
3879
|
-
const _hoisted_2$3 = /*#__PURE__*/createElementVNode("label", {
|
|
3899
|
+
const _hoisted_2$3 = /*#__PURE__*/createElementVNode("label", {
|
|
3900
|
+
for: "volume",
|
|
3901
|
+
class: "volume-label"
|
|
3902
|
+
}, "Volume:", -1);
|
|
3880
3903
|
|
|
3881
3904
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3882
3905
|
return (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
3883
3906
|
_hoisted_2$3,
|
|
3884
3907
|
createElementVNode("input", {
|
|
3908
|
+
ref: "slider",
|
|
3885
3909
|
class: "volume-slider",
|
|
3886
3910
|
type: "range",
|
|
3887
3911
|
id: "volume",
|
|
@@ -3891,11 +3915,11 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3891
3915
|
step: "0.1",
|
|
3892
3916
|
value: "0.5",
|
|
3893
3917
|
onChange: _cache[0] || (_cache[0] = (...args) => (_ctx.changeVolume && _ctx.changeVolume(...args)))
|
|
3894
|
-
}, null,
|
|
3918
|
+
}, null, 544)
|
|
3895
3919
|
]))
|
|
3896
3920
|
}
|
|
3897
3921
|
|
|
3898
|
-
var css_248z$5 = ".volume-controls {\n color: white;\n font-size:
|
|
3922
|
+
var css_248z$5 = ".volume-label {\n margin: 5px 20px;\n}\n\n.volume-controls {\n color: white;\n font-size: 20px;\n display: flex;\n align-items: center;\n}\n\n.volume-slider {\n width: 200px;\n background-color: blue;\n}\r\n";
|
|
3899
3923
|
styleInject(css_248z$5);
|
|
3900
3924
|
|
|
3901
3925
|
script$4.render = render$4;
|
|
@@ -3930,13 +3954,10 @@ const _hoisted_2$4 = { class: "bold" };
|
|
|
3930
3954
|
const _hoisted_3$3 = /*#__PURE__*/createTextVNode(": ");
|
|
3931
3955
|
|
|
3932
3956
|
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3933
|
-
const _component_VolumeControls = resolveComponent("VolumeControls");
|
|
3934
|
-
|
|
3935
3957
|
return (openBlock(), createElementBlock("div", {
|
|
3936
3958
|
class: "hud",
|
|
3937
3959
|
style: normalizeStyle(_ctx.hudStyle)
|
|
3938
3960
|
}, [
|
|
3939
|
-
createVNode(_component_VolumeControls),
|
|
3940
3961
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.stats, (value, key) => {
|
|
3941
3962
|
return (openBlock(), createElementBlock("div", {
|
|
3942
3963
|
key: key,
|
|
@@ -3954,7 +3975,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3954
3975
|
], 4))
|
|
3955
3976
|
}
|
|
3956
3977
|
|
|
3957
|
-
var css_248z$6 = ".hud {\n position: absolute;\n right: 0;\n top: 0;\n display: flex;\n flex-direction: row-reverse;\n z-index: 3;\n}\n\n.hud-stat {\n border: 1px dotted white;\n background-color: rgba(0, 0, 0, 0.4);\n color: white;\n padding: 5px;\n}\n\n.hud-icon {\n display: inline-block;\n height: 1em;\n}\n";
|
|
3978
|
+
var css_248z$6 = ".hud {\n position: absolute;\n right: 0;\n top: 0;\n display: flex;\n flex-direction: row-reverse;\n z-index: 3;\n}\n\n.hud-stat {\n border: 1px dotted white;\n background-color: rgba(0, 0, 0, 0.4);\n color: white;\n padding: 5px;\n}\n\n.hud-icon {\n display: inline-block;\n height: 1em;\n}\r\n";
|
|
3958
3979
|
styleInject(css_248z$6);
|
|
3959
3980
|
|
|
3960
3981
|
script$5.render = render$5;
|
|
@@ -3991,7 +4012,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3991
4012
|
]))
|
|
3992
4013
|
}
|
|
3993
4014
|
|
|
3994
|
-
var css_248z$7 = ".loading-bar {\n position: relative;\n width: 40vw;\n height: 10vh;\n border: 1px solid black;\n background-color: lightgrey;\n}\n\n.inner-loading-bar {\n height: 100%;\n background-color: lightgreen;\n color: black;\n}\n\n.loading-text {\n z-index: 99999;\n display: flex;\n align-items: center;\n justify-content: space-around;\n position: absolute;\n width: 100%;\n height: 100%;\n color: black;\n top: 0;\n}\n";
|
|
4015
|
+
var css_248z$7 = ".loading-bar {\n position: relative;\n width: 40vw;\n height: 10vh;\n border: 1px solid black;\n background-color: lightgrey;\n}\n\n.inner-loading-bar {\n height: 100%;\n background-color: lightgreen;\n color: black;\n}\n\n.loading-text {\n z-index: 99999;\n display: flex;\n align-items: center;\n justify-content: space-around;\n position: absolute;\n width: 100%;\n height: 100%;\n color: black;\n top: 0;\n}\r\n";
|
|
3995
4016
|
styleInject(css_248z$7);
|
|
3996
4017
|
|
|
3997
4018
|
script$6.render = render$6;
|
|
@@ -4026,7 +4047,7 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4026
4047
|
}))
|
|
4027
4048
|
}
|
|
4028
4049
|
|
|
4029
|
-
var css_248z$8 = ".notifications-holder {\n position: fixed;\n top: 0;\n left: 0;\n padding: 10px;\n display: flex;\n flex-direction: column-reverse;\n align-items: center;\n pointer-events: none;\n}\n\n.notification {\n margin-top: 10px;\n margin-bottom: 10px;\n border-radius: 10px;\n padding: 15px;\n background-color: darkslateblue;\n color: white;\n width: 40vh;\n text-align: center;\n}\n";
|
|
4050
|
+
var css_248z$8 = ".notifications-holder {\n position: fixed;\n top: 0;\n left: 0;\n padding: 10px;\n display: flex;\n flex-direction: column-reverse;\n align-items: center;\n pointer-events: none;\n}\n\n.notification {\n margin-top: 10px;\n margin-bottom: 10px;\n border-radius: 10px;\n padding: 15px;\n background-color: darkslateblue;\n color: white;\n width: 40vh;\n text-align: center;\n}\r\n";
|
|
4030
4051
|
styleInject(css_248z$8);
|
|
4031
4052
|
|
|
4032
4053
|
script$7.render = render$7;
|
|
@@ -4125,7 +4146,7 @@ const images = {};
|
|
|
4125
4146
|
let imagesToLoad = 0;
|
|
4126
4147
|
let imagesLoaded = 0;
|
|
4127
4148
|
function loadImages(config) {
|
|
4128
|
-
|
|
4149
|
+
logger.log(`Loading images`);
|
|
4129
4150
|
return new Promise((resolve, reject) => {
|
|
4130
4151
|
for (const key in config.images) {
|
|
4131
4152
|
const path = config.images[key];
|
|
@@ -4135,27 +4156,28 @@ function loadImages(config) {
|
|
|
4135
4156
|
}
|
|
4136
4157
|
function loadImage(key, path, resolver, rejecter) {
|
|
4137
4158
|
imagesToLoad++;
|
|
4138
|
-
|
|
4159
|
+
logger.log(`Loading image ${key} at ${path}`);
|
|
4139
4160
|
const image = new Image();
|
|
4140
4161
|
image.onload = () => {
|
|
4141
4162
|
imagesLoaded += 1;
|
|
4142
4163
|
images[key] = image;
|
|
4143
|
-
|
|
4164
|
+
logger.log(`Loaded image ${key} successfully`);
|
|
4144
4165
|
if (imagesLoaded >= imagesToLoad) {
|
|
4145
|
-
|
|
4166
|
+
logger.log(`All images loaded`);
|
|
4146
4167
|
resolver();
|
|
4147
4168
|
}
|
|
4148
4169
|
};
|
|
4149
4170
|
image.onerror = (e) => {
|
|
4150
|
-
console.
|
|
4171
|
+
console.error(`Error loading image ${key}`);
|
|
4151
4172
|
rejecter(e);
|
|
4152
4173
|
};
|
|
4153
4174
|
image.src = path;
|
|
4154
4175
|
}
|
|
4155
4176
|
|
|
4156
4177
|
const audio = {};
|
|
4178
|
+
howler.Howler.volume(0.5);
|
|
4157
4179
|
async function loadAudioAssets(config) {
|
|
4158
|
-
|
|
4180
|
+
logger.log(`Loading audio`);
|
|
4159
4181
|
const loadingPromises = [];
|
|
4160
4182
|
for (const key in config.music) {
|
|
4161
4183
|
// Backward compatibility with old music list
|
|
@@ -4185,7 +4207,7 @@ async function loadAudioAssets(config) {
|
|
|
4185
4207
|
}
|
|
4186
4208
|
async function loadAudio(key, config) {
|
|
4187
4209
|
return new Promise((resolve, reject) => {
|
|
4188
|
-
|
|
4210
|
+
logger.log(`Loading audio ${config.src}`);
|
|
4189
4211
|
const sound = new howler.Howl({
|
|
4190
4212
|
...config,
|
|
4191
4213
|
});
|
|
@@ -4297,8 +4319,86 @@ function debounce(func, waitMilliseconds = 50, options = {}) {
|
|
|
4297
4319
|
return debouncedFunction;
|
|
4298
4320
|
}
|
|
4299
4321
|
|
|
4300
|
-
console.log('hello app');
|
|
4301
4322
|
var script$8 = defineComponent({
|
|
4323
|
+
components: {
|
|
4324
|
+
Modal: script$2,
|
|
4325
|
+
VolumeControls: script$4,
|
|
4326
|
+
},
|
|
4327
|
+
props: {},
|
|
4328
|
+
data() {
|
|
4329
|
+
return {
|
|
4330
|
+
menuActive: false,
|
|
4331
|
+
};
|
|
4332
|
+
},
|
|
4333
|
+
mounted() {
|
|
4334
|
+
document.addEventListener('keydown', (event) => {
|
|
4335
|
+
const key = event.key;
|
|
4336
|
+
if (key === 'Escape') {
|
|
4337
|
+
this.toggleMenu();
|
|
4338
|
+
}
|
|
4339
|
+
});
|
|
4340
|
+
},
|
|
4341
|
+
methods: {
|
|
4342
|
+
openMenu() {
|
|
4343
|
+
this.menuActive = true;
|
|
4344
|
+
},
|
|
4345
|
+
closeMenu() {
|
|
4346
|
+
this.menuActive = false;
|
|
4347
|
+
},
|
|
4348
|
+
toggleMenu() {
|
|
4349
|
+
this.menuActive = !this.menuActive;
|
|
4350
|
+
},
|
|
4351
|
+
quit() {
|
|
4352
|
+
window.close();
|
|
4353
|
+
// quit
|
|
4354
|
+
},
|
|
4355
|
+
},
|
|
4356
|
+
computed: {},
|
|
4357
|
+
});
|
|
4358
|
+
|
|
4359
|
+
const _hoisted_1$7 = { class: "menu-container" };
|
|
4360
|
+
const _hoisted_2$6 = /*#__PURE__*/createElementVNode("h3", { class: "title" }, "Menu", -1);
|
|
4361
|
+
const _hoisted_3$4 = { class: "menu-content" };
|
|
4362
|
+
|
|
4363
|
+
function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4364
|
+
const _component_VolumeControls = resolveComponent("VolumeControls");
|
|
4365
|
+
const _component_modal = resolveComponent("modal");
|
|
4366
|
+
|
|
4367
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
4368
|
+
createElementVNode("button", {
|
|
4369
|
+
class: "button menu-toggle-button",
|
|
4370
|
+
onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.openMenu && _ctx.openMenu(...args)))
|
|
4371
|
+
}, "Menu"),
|
|
4372
|
+
(_ctx.menuActive)
|
|
4373
|
+
? (openBlock(), createBlock(_component_modal, {
|
|
4374
|
+
key: 0,
|
|
4375
|
+
class: "menu",
|
|
4376
|
+
onClose: _ctx.closeMenu
|
|
4377
|
+
}, {
|
|
4378
|
+
header: withCtx(() => [
|
|
4379
|
+
_hoisted_2$6
|
|
4380
|
+
]),
|
|
4381
|
+
body: withCtx(() => [
|
|
4382
|
+
createElementVNode("div", _hoisted_3$4, [
|
|
4383
|
+
createVNode(_component_VolumeControls),
|
|
4384
|
+
createElementVNode("button", {
|
|
4385
|
+
class: "button title quit-button",
|
|
4386
|
+
onClick: _cache[1] || (_cache[1] = (...args) => (_ctx.quit && _ctx.quit(...args)))
|
|
4387
|
+
}, "Quit")
|
|
4388
|
+
])
|
|
4389
|
+
]),
|
|
4390
|
+
_: 1
|
|
4391
|
+
}, 8, ["onClose"]))
|
|
4392
|
+
: createCommentVNode("", true)
|
|
4393
|
+
]))
|
|
4394
|
+
}
|
|
4395
|
+
|
|
4396
|
+
var css_248z$9 = ".menu-content {\n margin: 50px;\n text-align: center;\n}\n\n.menu-toggle-button {\n margin: 0;\n padding: 2px;\n border-radius: 5px;\n}\n\n.quit-button {\n margin: 50px;\n text-align: center;\n}\r\n";
|
|
4397
|
+
styleInject(css_248z$9);
|
|
4398
|
+
|
|
4399
|
+
script$8.render = render$8;
|
|
4400
|
+
|
|
4401
|
+
var script$9 = defineComponent({
|
|
4302
4402
|
$refs: {
|
|
4303
4403
|
dialogContainer: HTMLInputElement,
|
|
4304
4404
|
},
|
|
@@ -4310,6 +4410,7 @@ var script$8 = defineComponent({
|
|
|
4310
4410
|
LoadingBar: script$6,
|
|
4311
4411
|
NotificationToast: script$7,
|
|
4312
4412
|
Hud: script$5,
|
|
4413
|
+
Menu: script$8,
|
|
4313
4414
|
},
|
|
4314
4415
|
data() {
|
|
4315
4416
|
return {
|
|
@@ -4356,7 +4457,6 @@ var script$8 = defineComponent({
|
|
|
4356
4457
|
dialogLength(newCount, oldCount) {
|
|
4357
4458
|
if (this.$refs.dialog) {
|
|
4358
4459
|
const dialog = this.$refs.dialog;
|
|
4359
|
-
console.log('hello dialog');
|
|
4360
4460
|
dialog.scrollTop = dialog.scrollHeight + 100000;
|
|
4361
4461
|
}
|
|
4362
4462
|
},
|
|
@@ -4579,16 +4679,17 @@ var script$8 = defineComponent({
|
|
|
4579
4679
|
},
|
|
4580
4680
|
});
|
|
4581
4681
|
|
|
4582
|
-
const _hoisted_1$
|
|
4583
|
-
const _hoisted_2$
|
|
4584
|
-
const _hoisted_3$
|
|
4682
|
+
const _hoisted_1$8 = ["width", "height"];
|
|
4683
|
+
const _hoisted_2$7 = /*#__PURE__*/createElementVNode("div", { class: "anchor" }, null, -1);
|
|
4684
|
+
const _hoisted_3$5 = {
|
|
4585
4685
|
key: 1,
|
|
4586
4686
|
class: "flex flex-col"
|
|
4587
4687
|
};
|
|
4588
4688
|
const _hoisted_4$3 = { key: 2 };
|
|
4589
4689
|
|
|
4590
|
-
function render$
|
|
4690
|
+
function render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4591
4691
|
const _component_Hud = resolveComponent("Hud");
|
|
4692
|
+
const _component_Menu = resolveComponent("Menu");
|
|
4592
4693
|
const _component_DialogPicture = resolveComponent("DialogPicture");
|
|
4593
4694
|
const _component_DialogBox = resolveComponent("DialogBox");
|
|
4594
4695
|
const _component_LoadingBar = resolveComponent("LoadingBar");
|
|
@@ -4606,6 +4707,7 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4606
4707
|
class: "game",
|
|
4607
4708
|
style: normalizeStyle(_ctx.gameStyle)
|
|
4608
4709
|
}, [
|
|
4710
|
+
createVNode(_component_Menu, { class: "menu-toggle" }),
|
|
4609
4711
|
createVNode(Transition, { name: "fade" }, {
|
|
4610
4712
|
default: withCtx(() => [
|
|
4611
4713
|
(_ctx.picture)
|
|
@@ -4627,7 +4729,7 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4627
4729
|
width: _ctx.layoutWidth,
|
|
4628
4730
|
height: _ctx.layoutHeight,
|
|
4629
4731
|
id: "background-canvas"
|
|
4630
|
-
}, null, 8, _hoisted_1$
|
|
4732
|
+
}, null, 8, _hoisted_1$8)
|
|
4631
4733
|
], 4))
|
|
4632
4734
|
: createCommentVNode("", true),
|
|
4633
4735
|
(_ctx.dialogPlaying)
|
|
@@ -4654,12 +4756,12 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4654
4756
|
]),
|
|
4655
4757
|
_: 1
|
|
4656
4758
|
}, 8, ["style"]),
|
|
4657
|
-
_hoisted_2$
|
|
4759
|
+
_hoisted_2$7
|
|
4658
4760
|
], 4))
|
|
4659
4761
|
: createCommentVNode("", true)
|
|
4660
4762
|
], 4))
|
|
4661
4763
|
: (_ctx.gameLoaded)
|
|
4662
|
-
? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
4764
|
+
? (openBlock(), createElementBlock("div", _hoisted_3$5, [
|
|
4663
4765
|
createElementVNode("button", {
|
|
4664
4766
|
class: "button menu-button start-button override",
|
|
4665
4767
|
onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.startGame && _ctx.startGame(...args)))
|
|
@@ -4685,10 +4787,10 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4685
4787
|
], 4))
|
|
4686
4788
|
}
|
|
4687
4789
|
|
|
4688
|
-
var css_248z$
|
|
4689
|
-
styleInject(css_248z$
|
|
4790
|
+
var css_248z$a = "#app {\n background-color: black;\n width: 100%;\n height: 100%;\n position: absolute;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n color: white;\n box-sizing: border-box;\n overflow: hidden;\n transform-origin: center center;\n}\n\n.game {\n background-color: black;\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n.interact-button {\n height: 50px;\n background-color: #72080f;\n border: 1px solid black;\n font-weight: bold;\n font-size: 20px;\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\n.dialog-container {\n flex-shrink: 2;\n /* padding: 20px; */\n min-height: 100%;\n width: 100%;\n background-color: #171717;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: center;\n overflow-x: hidden;\n}\n\n.dialog {\n overflow-y: auto;\n overflow-x: hidden;\n position: relative;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n}\n\n.dialog::-webkit-scrollbar {\n display: none; /* webkit */\n}\n\n.dialog * {\n overflow-anchor: none;\n}\n\n.background {\n margin: 0;\n}\n\n#background-canvas {\n height: 100%;\n}\n\n.anchor {\n overflow-anchor: auto;\n height: 1px;\n}\n\n.menu-toggle {\n position: fixed;\n bottom: 0px;\n right: 15%;\n z-index: 108398;\n}\r\n";
|
|
4791
|
+
styleInject(css_248z$a);
|
|
4690
4792
|
|
|
4691
|
-
script$
|
|
4793
|
+
script$9.render = render$9;
|
|
4692
4794
|
|
|
4693
4795
|
function timeout(durationMs) {
|
|
4694
4796
|
return new Promise((resolve, reject) => {
|
|
@@ -4734,7 +4836,7 @@ function runSkillCheck(ctx, params) {
|
|
|
4734
4836
|
}
|
|
4735
4837
|
roll += state.skills[params.skill].level * skillChecks.skillMultiplier;
|
|
4736
4838
|
const skill = skills[params.skill];
|
|
4737
|
-
|
|
4839
|
+
logger.log(`roll `, roll, params.value);
|
|
4738
4840
|
if (roll < params.value) {
|
|
4739
4841
|
success = false;
|
|
4740
4842
|
}
|
|
@@ -4750,7 +4852,7 @@ function runSkillCheck(ctx, params) {
|
|
|
4750
4852
|
function runConditionCommand(ctx, command) {
|
|
4751
4853
|
const options = command.options;
|
|
4752
4854
|
const result = runCondition(ctx, options.condition);
|
|
4753
|
-
|
|
4855
|
+
logger.log(result);
|
|
4754
4856
|
if (result) {
|
|
4755
4857
|
return options.success;
|
|
4756
4858
|
}
|
|
@@ -4821,6 +4923,7 @@ async function runCommand(context, cmd, choices) {
|
|
|
4821
4923
|
currentIndex: 0,
|
|
4822
4924
|
};
|
|
4823
4925
|
commit('setStack', newStack);
|
|
4926
|
+
await dispatch('saveGame');
|
|
4824
4927
|
await dispatch('runLine');
|
|
4825
4928
|
break;
|
|
4826
4929
|
case 'text':
|
|
@@ -4871,7 +4974,6 @@ async function runCommand(context, cmd, choices) {
|
|
|
4871
4974
|
commit('clearDialog');
|
|
4872
4975
|
return dispatch('nextLine');
|
|
4873
4976
|
case 'set_button':
|
|
4874
|
-
console.log(cmd.args);
|
|
4875
4977
|
commit('changeButton', {
|
|
4876
4978
|
button: cmd.args[0],
|
|
4877
4979
|
enabled: cmd.args[1],
|
|
@@ -4958,11 +5060,11 @@ async function runCommand(context, cmd, choices) {
|
|
|
4958
5060
|
}
|
|
4959
5061
|
}
|
|
4960
5062
|
catch (err) {
|
|
4961
|
-
|
|
5063
|
+
logger.log(`Error at: `, state.machine.stack[state.machine.stack.length - 1].label);
|
|
4962
5064
|
console.error(err);
|
|
4963
|
-
error(commit, `Narrat script runtime error at <span class="error-filename">${cmd.fileName}:${cmd.line + 1}</span>
|
|
4964
|
-
<b>${err}</b>
|
|
4965
|
-
Script: ${cmd.code}
|
|
5065
|
+
error(commit, `Narrat script runtime error at <span class="error-filename">${cmd.fileName}:${cmd.line + 1}</span>
|
|
5066
|
+
<b>${err}</b>
|
|
5067
|
+
Script: ${cmd.code}
|
|
4966
5068
|
Label: ${state.machine.stack[state.machine.stack.length - 1].label}`);
|
|
4967
5069
|
}
|
|
4968
5070
|
}
|
|
@@ -5037,7 +5139,6 @@ async function runChoice(context, cmd) {
|
|
|
5037
5139
|
const skill = config.skills[check.skill];
|
|
5038
5140
|
const level = context.state.skills[check.skill].level;
|
|
5039
5141
|
const difficultyScore = check.value - level * config.skillChecks.skillMultiplier;
|
|
5040
|
-
console.log(`Check `, check, `score `, difficultyScore);
|
|
5041
5142
|
const skillCheckState = getSkillCheckState(context, choice.skillCheck.id);
|
|
5042
5143
|
let found = false;
|
|
5043
5144
|
let i = 0;
|
|
@@ -5324,7 +5425,7 @@ function parseRenpyScript(errorHandler, code, fileName) {
|
|
|
5324
5425
|
};
|
|
5325
5426
|
ctx.indentSize = detectIndentation(ctx, code);
|
|
5326
5427
|
const lines = findRenpyLines(ctx, code);
|
|
5327
|
-
|
|
5428
|
+
logger.log(lines);
|
|
5328
5429
|
const script = {};
|
|
5329
5430
|
for (const line of lines) {
|
|
5330
5431
|
if (line.code.search(':') === -1) {
|
|
@@ -5506,7 +5607,7 @@ function detectIndentation(ctx, script) {
|
|
|
5506
5607
|
if (result.length < 2) {
|
|
5507
5608
|
ctx.error(0, `Can't detect indentation level. Make sure you indent with at least 2 spaces and consistently`);
|
|
5508
5609
|
}
|
|
5509
|
-
|
|
5610
|
+
logger.log(result);
|
|
5510
5611
|
return result[1].length;
|
|
5511
5612
|
}
|
|
5512
5613
|
|
|
@@ -5520,7 +5621,8 @@ function setupStore(options) {
|
|
|
5520
5621
|
}
|
|
5521
5622
|
// define injection key
|
|
5522
5623
|
key = Symbol('Store Injection Key');
|
|
5523
|
-
|
|
5624
|
+
logger.setDebug(options.debug);
|
|
5625
|
+
logger.log('setup store');
|
|
5524
5626
|
store = createStore({
|
|
5525
5627
|
state: {
|
|
5526
5628
|
machine: {
|
|
@@ -5590,7 +5692,7 @@ function setupStore(options) {
|
|
|
5590
5692
|
};
|
|
5591
5693
|
}
|
|
5592
5694
|
const end = Date.now();
|
|
5593
|
-
|
|
5695
|
+
logger.log(`script parsed in ${end - start} ms`);
|
|
5594
5696
|
commit('setButtons', payload.config.buttons);
|
|
5595
5697
|
commit('setScript', scripts);
|
|
5596
5698
|
commit('setupSkills', payload.config.skills);
|
|
@@ -5612,7 +5714,6 @@ function setupStore(options) {
|
|
|
5612
5714
|
this.dispatch('runLine');
|
|
5613
5715
|
},
|
|
5614
5716
|
async runLine(context) {
|
|
5615
|
-
await this.dispatch('saveGame');
|
|
5616
5717
|
await runLine(context);
|
|
5617
5718
|
},
|
|
5618
5719
|
nextLine(context) {
|
|
@@ -5630,13 +5731,22 @@ function setupStore(options) {
|
|
|
5630
5731
|
lastLabel: state.lastLabel,
|
|
5631
5732
|
skillChecks: state.skillChecks,
|
|
5632
5733
|
playTime: getPlayTime(state.playTime.start, state.playTime.previousPlaytime),
|
|
5734
|
+
hudStats: state.hudStats,
|
|
5735
|
+
currentScreen: state.currentScreen,
|
|
5736
|
+
audio: {
|
|
5737
|
+
currentMusic: state.audio.currentMusic,
|
|
5738
|
+
},
|
|
5633
5739
|
};
|
|
5634
5740
|
localStorage.setItem(SAVE_FILE, JSON.stringify(save));
|
|
5635
5741
|
},
|
|
5636
|
-
loadGame(
|
|
5742
|
+
loadGame(ctx, saveFile) {
|
|
5743
|
+
const { commit, dispatch } = ctx;
|
|
5637
5744
|
if (saveFile) {
|
|
5638
5745
|
const save = JSON.parse(saveFile);
|
|
5639
5746
|
commit('setLoadedData', save);
|
|
5747
|
+
if (save.audio.currentMusic) {
|
|
5748
|
+
changeMusic(ctx, save.audio.currentMusic);
|
|
5749
|
+
}
|
|
5640
5750
|
dispatch('runLabel', save.lastLabel);
|
|
5641
5751
|
}
|
|
5642
5752
|
},
|
|
@@ -5659,6 +5769,9 @@ function setupStore(options) {
|
|
|
5659
5769
|
state.lastLabel = save.lastLabel;
|
|
5660
5770
|
state.skillChecks = save.skillChecks;
|
|
5661
5771
|
state.playTime.previousPlaytime = save.playTime;
|
|
5772
|
+
state.hudStats = save.hudStats;
|
|
5773
|
+
state.currentScreen = save.currentScreen;
|
|
5774
|
+
state.audio = save.audio;
|
|
5662
5775
|
},
|
|
5663
5776
|
reset(state) {
|
|
5664
5777
|
state.ready = false;
|
|
@@ -5728,6 +5841,7 @@ function setupStore(options) {
|
|
|
5728
5841
|
},
|
|
5729
5842
|
setStack(state, newStack) {
|
|
5730
5843
|
state.machine.stack = [];
|
|
5844
|
+
state.lastLabel = newStack.label;
|
|
5731
5845
|
state.machine.stack.push(newStack);
|
|
5732
5846
|
},
|
|
5733
5847
|
setData(state, { path, value }) {
|
|
@@ -5787,7 +5901,7 @@ function setupStore(options) {
|
|
|
5787
5901
|
return id;
|
|
5788
5902
|
},
|
|
5789
5903
|
deleteNotification(state, id) {
|
|
5790
|
-
|
|
5904
|
+
logger.log('delete notif', id);
|
|
5791
5905
|
delete state.notifications[id];
|
|
5792
5906
|
},
|
|
5793
5907
|
},
|
|
@@ -5812,10 +5926,10 @@ async function startApp(config, options) {
|
|
|
5812
5926
|
mousePos.x = e.clientX;
|
|
5813
5927
|
mousePos.y = e.clientY;
|
|
5814
5928
|
});
|
|
5815
|
-
console.log('%c Narrat game engine – 0.8.
|
|
5929
|
+
console.log('%c Narrat game engine – 0.8.4 - June 4, 2022 18:58:52', 'background: #222; color: #bada55');
|
|
5816
5930
|
const storeSetup = setupStore(options);
|
|
5817
5931
|
store$1 = storeSetup.store;
|
|
5818
|
-
app = createApp(script$
|
|
5932
|
+
app = createApp(script$9, {
|
|
5819
5933
|
config,
|
|
5820
5934
|
options,
|
|
5821
5935
|
});
|