@textadventures/quest-viva-wasmplayer 6.0.0-beta.50

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.
Files changed (227) hide show
  1. package/.stamp +0 -0
  2. package/WasmPlayer.runtimeconfig.json +46 -0
  3. package/_framework/Common.wasm +0 -0
  4. package/_framework/Engine.wasm +0 -0
  5. package/_framework/ExtendedNumerics.BigDecimal.wasm +0 -0
  6. package/_framework/Legacy.wasm +0 -0
  7. package/_framework/Microsoft.CSharp.wasm +0 -0
  8. package/_framework/Microsoft.Extensions.DependencyInjection.Abstractions.wasm +0 -0
  9. package/_framework/Microsoft.Extensions.Logging.Abstractions.wasm +0 -0
  10. package/_framework/Microsoft.VisualBasic.Core.wasm +0 -0
  11. package/_framework/Microsoft.VisualBasic.wasm +0 -0
  12. package/_framework/Microsoft.Win32.Primitives.wasm +0 -0
  13. package/_framework/Microsoft.Win32.Registry.wasm +0 -0
  14. package/_framework/NCalc.Async.wasm +0 -0
  15. package/_framework/NCalc.Core.wasm +0 -0
  16. package/_framework/NCalc.Domain.wasm +0 -0
  17. package/_framework/NCalc.Parser.wasm +0 -0
  18. package/_framework/Parlot.wasm +0 -0
  19. package/_framework/PlayerCore.wasm +0 -0
  20. package/_framework/System.AppContext.wasm +0 -0
  21. package/_framework/System.Buffers.wasm +0 -0
  22. package/_framework/System.Collections.Concurrent.wasm +0 -0
  23. package/_framework/System.Collections.Immutable.wasm +0 -0
  24. package/_framework/System.Collections.NonGeneric.wasm +0 -0
  25. package/_framework/System.Collections.Specialized.wasm +0 -0
  26. package/_framework/System.Collections.wasm +0 -0
  27. package/_framework/System.ComponentModel.Annotations.wasm +0 -0
  28. package/_framework/System.ComponentModel.DataAnnotations.wasm +0 -0
  29. package/_framework/System.ComponentModel.EventBasedAsync.wasm +0 -0
  30. package/_framework/System.ComponentModel.Primitives.wasm +0 -0
  31. package/_framework/System.ComponentModel.TypeConverter.wasm +0 -0
  32. package/_framework/System.ComponentModel.wasm +0 -0
  33. package/_framework/System.Configuration.wasm +0 -0
  34. package/_framework/System.Console.wasm +0 -0
  35. package/_framework/System.Core.wasm +0 -0
  36. package/_framework/System.Data.Common.wasm +0 -0
  37. package/_framework/System.Data.DataSetExtensions.wasm +0 -0
  38. package/_framework/System.Data.wasm +0 -0
  39. package/_framework/System.Diagnostics.Contracts.wasm +0 -0
  40. package/_framework/System.Diagnostics.Debug.wasm +0 -0
  41. package/_framework/System.Diagnostics.DiagnosticSource.wasm +0 -0
  42. package/_framework/System.Diagnostics.FileVersionInfo.wasm +0 -0
  43. package/_framework/System.Diagnostics.Process.wasm +0 -0
  44. package/_framework/System.Diagnostics.StackTrace.wasm +0 -0
  45. package/_framework/System.Diagnostics.TextWriterTraceListener.wasm +0 -0
  46. package/_framework/System.Diagnostics.Tools.wasm +0 -0
  47. package/_framework/System.Diagnostics.TraceSource.wasm +0 -0
  48. package/_framework/System.Diagnostics.Tracing.wasm +0 -0
  49. package/_framework/System.Drawing.Primitives.wasm +0 -0
  50. package/_framework/System.Drawing.wasm +0 -0
  51. package/_framework/System.Dynamic.Runtime.wasm +0 -0
  52. package/_framework/System.Formats.Asn1.wasm +0 -0
  53. package/_framework/System.Formats.Tar.wasm +0 -0
  54. package/_framework/System.Globalization.Calendars.wasm +0 -0
  55. package/_framework/System.Globalization.Extensions.wasm +0 -0
  56. package/_framework/System.Globalization.wasm +0 -0
  57. package/_framework/System.IO.Compression.Brotli.wasm +0 -0
  58. package/_framework/System.IO.Compression.FileSystem.wasm +0 -0
  59. package/_framework/System.IO.Compression.ZipFile.wasm +0 -0
  60. package/_framework/System.IO.Compression.wasm +0 -0
  61. package/_framework/System.IO.FileSystem.AccessControl.wasm +0 -0
  62. package/_framework/System.IO.FileSystem.DriveInfo.wasm +0 -0
  63. package/_framework/System.IO.FileSystem.Primitives.wasm +0 -0
  64. package/_framework/System.IO.FileSystem.Watcher.wasm +0 -0
  65. package/_framework/System.IO.FileSystem.wasm +0 -0
  66. package/_framework/System.IO.IsolatedStorage.wasm +0 -0
  67. package/_framework/System.IO.MemoryMappedFiles.wasm +0 -0
  68. package/_framework/System.IO.Pipelines.wasm +0 -0
  69. package/_framework/System.IO.Pipes.AccessControl.wasm +0 -0
  70. package/_framework/System.IO.Pipes.wasm +0 -0
  71. package/_framework/System.IO.UnmanagedMemoryStream.wasm +0 -0
  72. package/_framework/System.IO.wasm +0 -0
  73. package/_framework/System.Linq.AsyncEnumerable.wasm +0 -0
  74. package/_framework/System.Linq.Expressions.wasm +0 -0
  75. package/_framework/System.Linq.Parallel.wasm +0 -0
  76. package/_framework/System.Linq.Queryable.wasm +0 -0
  77. package/_framework/System.Linq.wasm +0 -0
  78. package/_framework/System.Memory.wasm +0 -0
  79. package/_framework/System.Net.Http.Json.wasm +0 -0
  80. package/_framework/System.Net.Http.wasm +0 -0
  81. package/_framework/System.Net.HttpListener.wasm +0 -0
  82. package/_framework/System.Net.Mail.wasm +0 -0
  83. package/_framework/System.Net.NameResolution.wasm +0 -0
  84. package/_framework/System.Net.NetworkInformation.wasm +0 -0
  85. package/_framework/System.Net.Ping.wasm +0 -0
  86. package/_framework/System.Net.Primitives.wasm +0 -0
  87. package/_framework/System.Net.Quic.wasm +0 -0
  88. package/_framework/System.Net.Requests.wasm +0 -0
  89. package/_framework/System.Net.Security.wasm +0 -0
  90. package/_framework/System.Net.ServerSentEvents.wasm +0 -0
  91. package/_framework/System.Net.ServicePoint.wasm +0 -0
  92. package/_framework/System.Net.Sockets.wasm +0 -0
  93. package/_framework/System.Net.WebClient.wasm +0 -0
  94. package/_framework/System.Net.WebHeaderCollection.wasm +0 -0
  95. package/_framework/System.Net.WebProxy.wasm +0 -0
  96. package/_framework/System.Net.WebSockets.Client.wasm +0 -0
  97. package/_framework/System.Net.WebSockets.wasm +0 -0
  98. package/_framework/System.Net.wasm +0 -0
  99. package/_framework/System.Numerics.Vectors.wasm +0 -0
  100. package/_framework/System.Numerics.wasm +0 -0
  101. package/_framework/System.ObjectModel.wasm +0 -0
  102. package/_framework/System.Private.CoreLib.wasm +0 -0
  103. package/_framework/System.Private.DataContractSerialization.wasm +0 -0
  104. package/_framework/System.Private.Uri.wasm +0 -0
  105. package/_framework/System.Private.Xml.Linq.wasm +0 -0
  106. package/_framework/System.Private.Xml.wasm +0 -0
  107. package/_framework/System.Reflection.DispatchProxy.wasm +0 -0
  108. package/_framework/System.Reflection.Emit.ILGeneration.wasm +0 -0
  109. package/_framework/System.Reflection.Emit.Lightweight.wasm +0 -0
  110. package/_framework/System.Reflection.Emit.wasm +0 -0
  111. package/_framework/System.Reflection.Extensions.wasm +0 -0
  112. package/_framework/System.Reflection.Metadata.wasm +0 -0
  113. package/_framework/System.Reflection.Primitives.wasm +0 -0
  114. package/_framework/System.Reflection.TypeExtensions.wasm +0 -0
  115. package/_framework/System.Reflection.wasm +0 -0
  116. package/_framework/System.Resources.Reader.wasm +0 -0
  117. package/_framework/System.Resources.ResourceManager.wasm +0 -0
  118. package/_framework/System.Resources.Writer.wasm +0 -0
  119. package/_framework/System.Runtime.CompilerServices.Unsafe.wasm +0 -0
  120. package/_framework/System.Runtime.CompilerServices.VisualC.wasm +0 -0
  121. package/_framework/System.Runtime.Extensions.wasm +0 -0
  122. package/_framework/System.Runtime.Handles.wasm +0 -0
  123. package/_framework/System.Runtime.InteropServices.JavaScript.wasm +0 -0
  124. package/_framework/System.Runtime.InteropServices.RuntimeInformation.wasm +0 -0
  125. package/_framework/System.Runtime.InteropServices.wasm +0 -0
  126. package/_framework/System.Runtime.Intrinsics.wasm +0 -0
  127. package/_framework/System.Runtime.Loader.wasm +0 -0
  128. package/_framework/System.Runtime.Numerics.wasm +0 -0
  129. package/_framework/System.Runtime.Serialization.Formatters.wasm +0 -0
  130. package/_framework/System.Runtime.Serialization.Json.wasm +0 -0
  131. package/_framework/System.Runtime.Serialization.Primitives.wasm +0 -0
  132. package/_framework/System.Runtime.Serialization.Xml.wasm +0 -0
  133. package/_framework/System.Runtime.Serialization.wasm +0 -0
  134. package/_framework/System.Runtime.wasm +0 -0
  135. package/_framework/System.Security.AccessControl.wasm +0 -0
  136. package/_framework/System.Security.Claims.wasm +0 -0
  137. package/_framework/System.Security.Cryptography.Algorithms.wasm +0 -0
  138. package/_framework/System.Security.Cryptography.Cng.wasm +0 -0
  139. package/_framework/System.Security.Cryptography.Csp.wasm +0 -0
  140. package/_framework/System.Security.Cryptography.Encoding.wasm +0 -0
  141. package/_framework/System.Security.Cryptography.OpenSsl.wasm +0 -0
  142. package/_framework/System.Security.Cryptography.Primitives.wasm +0 -0
  143. package/_framework/System.Security.Cryptography.X509Certificates.wasm +0 -0
  144. package/_framework/System.Security.Cryptography.wasm +0 -0
  145. package/_framework/System.Security.Principal.Windows.wasm +0 -0
  146. package/_framework/System.Security.Principal.wasm +0 -0
  147. package/_framework/System.Security.SecureString.wasm +0 -0
  148. package/_framework/System.Security.wasm +0 -0
  149. package/_framework/System.ServiceModel.Web.wasm +0 -0
  150. package/_framework/System.ServiceProcess.wasm +0 -0
  151. package/_framework/System.Text.Encoding.CodePages.wasm +0 -0
  152. package/_framework/System.Text.Encoding.Extensions.wasm +0 -0
  153. package/_framework/System.Text.Encoding.wasm +0 -0
  154. package/_framework/System.Text.Encodings.Web.wasm +0 -0
  155. package/_framework/System.Text.Json.wasm +0 -0
  156. package/_framework/System.Text.RegularExpressions.wasm +0 -0
  157. package/_framework/System.Threading.AccessControl.wasm +0 -0
  158. package/_framework/System.Threading.Channels.wasm +0 -0
  159. package/_framework/System.Threading.Overlapped.wasm +0 -0
  160. package/_framework/System.Threading.Tasks.Dataflow.wasm +0 -0
  161. package/_framework/System.Threading.Tasks.Extensions.wasm +0 -0
  162. package/_framework/System.Threading.Tasks.Parallel.wasm +0 -0
  163. package/_framework/System.Threading.Tasks.wasm +0 -0
  164. package/_framework/System.Threading.Thread.wasm +0 -0
  165. package/_framework/System.Threading.ThreadPool.wasm +0 -0
  166. package/_framework/System.Threading.Timer.wasm +0 -0
  167. package/_framework/System.Threading.wasm +0 -0
  168. package/_framework/System.Transactions.Local.wasm +0 -0
  169. package/_framework/System.Transactions.wasm +0 -0
  170. package/_framework/System.ValueTuple.wasm +0 -0
  171. package/_framework/System.Web.HttpUtility.wasm +0 -0
  172. package/_framework/System.Web.wasm +0 -0
  173. package/_framework/System.Windows.wasm +0 -0
  174. package/_framework/System.Xml.Linq.wasm +0 -0
  175. package/_framework/System.Xml.ReaderWriter.wasm +0 -0
  176. package/_framework/System.Xml.Serialization.wasm +0 -0
  177. package/_framework/System.Xml.XDocument.wasm +0 -0
  178. package/_framework/System.Xml.XPath.XDocument.wasm +0 -0
  179. package/_framework/System.Xml.XPath.wasm +0 -0
  180. package/_framework/System.Xml.XmlDocument.wasm +0 -0
  181. package/_framework/System.Xml.XmlSerializer.wasm +0 -0
  182. package/_framework/System.Xml.wasm +0 -0
  183. package/_framework/System.wasm +0 -0
  184. package/_framework/WasmPlayer.wasm +0 -0
  185. package/_framework/WindowsBase.wasm +0 -0
  186. package/_framework/dotnet.boot.js +1003 -0
  187. package/_framework/dotnet.js +4 -0
  188. package/_framework/dotnet.native.js +6687 -0
  189. package/_framework/dotnet.native.wasm +0 -0
  190. package/_framework/dotnet.runtime.js +4 -0
  191. package/_framework/icudt_CJK.dat +0 -0
  192. package/_framework/icudt_EFIGS.dat +0 -0
  193. package/_framework/icudt_no_CJK.dat +0 -0
  194. package/_framework/mscorlib.wasm +0 -0
  195. package/_framework/netstandard.wasm +0 -0
  196. package/chrome.css +22 -0
  197. package/favicon.svg +1 -0
  198. package/grid.js +446 -0
  199. package/index.html +214 -0
  200. package/lib/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  201. package/lib/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  202. package/lib/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  203. package/lib/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  204. package/lib/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  205. package/lib/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  206. package/lib/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  207. package/lib/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  208. package/lib/images/ui-icons_217bc0_256x240.png +0 -0
  209. package/lib/images/ui-icons_2e83ff_256x240.png +0 -0
  210. package/lib/images/ui-icons_469bdd_256x240.png +0 -0
  211. package/lib/images/ui-icons_6da8d5_256x240.png +0 -0
  212. package/lib/images/ui-icons_cd0a0a_256x240.png +0 -0
  213. package/lib/images/ui-icons_d8e7f3_256x240.png +0 -0
  214. package/lib/images/ui-icons_f9bd01_256x240.png +0 -0
  215. package/lib/jquery-2.1.1.min.js +4 -0
  216. package/lib/jquery-ui.min.css +7 -0
  217. package/lib/jquery-ui.min.js +13 -0
  218. package/lib/jquery.multi-open-accordion-1.5.3.js +261 -0
  219. package/lib/paper.js +12848 -0
  220. package/logo.svg +1 -0
  221. package/package.json +13 -0
  222. package/player.js +258 -0
  223. package/playercore.css +293 -0
  224. package/playercore.htm +206 -0
  225. package/playercore.js +2639 -0
  226. package/quest-config.js +13 -0
  227. package/wasm-player.js +2024 -0
package/chrome.css ADDED
@@ -0,0 +1,22 @@
1
+ @property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}
2
+ @property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}
3
+ @property --tw-font-weight{syntax:"*";inherits:false}
4
+ @property --tw-tracking{syntax:"*";inherits:false}
5
+ @property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
6
+ @property --tw-shadow-color{syntax:"*";inherits:false}
7
+ @property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}
8
+ @property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
9
+ @property --tw-inset-shadow-color{syntax:"*";inherits:false}
10
+ @property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}
11
+ @property --tw-ring-color{syntax:"*";inherits:false}
12
+ @property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
13
+ @property --tw-inset-ring-color{syntax:"*";inherits:false}
14
+ @property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
15
+ @property --tw-ring-inset{syntax:"*";inherits:false}
16
+ @property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}
17
+ @property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}
18
+ @property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
19
+ @scope (.qv-chrome) {
20
+ /*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
21
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:scope, :host {--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--container-md:28rem;--text-xs:calc(.75rem * var(--text-scaling));--text-xs--line-height:calc(calc(1 / .75) * var(--text-scaling));--text-sm:calc(.875rem * var(--text-scaling));--text-sm--line-height:calc(calc(1.25 / .875) * var(--text-scaling));--text-base:calc(1rem * var(--text-scaling));--text-base--line-height:calc(calc(1.5 / 1) * var(--text-scaling));--text-2xl:calc(1.5rem * var(--text-scaling));--text-2xl--line-height:calc(calc(2 / 1.5) * var(--text-scaling));--text-3xl:calc(1.875rem * var(--text-scaling));--text-3xl--line-height:calc(calc(2.25 / 1.875) * var(--text-scaling));--text-4xl:calc(2.25rem * var(--text-scaling));--text-4xl--line-height:calc(calc(2.5 / 2.25) * var(--text-scaling));--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--shadow-xl:0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--text-scaling:1;--base-font-color:inherit;--base-font-color-dark:inherit;--base-font-family:inherit;--base-font-size:inherit;--base-line-height:inherit;--base-font-weight:inherit;--base-font-style:inherit;--base-letter-spacing:inherit;--heading-font-color:inherit;--heading-font-color-dark:inherit;--heading-font-family:inherit;--heading-font-weight:inherit;--heading-font-style:inherit;--heading-letter-spacing:inherit;--anchor-font-color:inherit;--anchor-font-color-dark:inherit;--anchor-font-family:inherit;--anchor-font-size:inherit;--anchor-line-height:inherit;--anchor-font-weight:inherit;--anchor-font-style:inherit;--anchor-letter-spacing:inherit;--anchor-text-decoration:inherit;--anchor-text-decoration-hover:underline;--anchor-text-decoration-active:inherit;--anchor-text-decoration-focus:inherit;--radius-base:.25rem;--radius-container:.25rem;--default-ring-width:1px;--color-primary-50:oklch(98.5% 0 0);--color-primary-100:oklch(97% 0 0);--color-primary-500:oklch(55.6% 0 0);--color-primary-600:oklch(43.9% 0 0);--color-primary-900:oklch(20.5% 0 0);--color-primary-950:oklch(14.5% 0 0);--color-primary-contrast-dark:var(--color-primary-950);--color-primary-contrast-light:var(--color-primary-50);--color-primary-contrast-50:var(--color-primary-contrast-dark);--color-primary-contrast-500:var(--color-primary-contrast-light);--color-primary-contrast-950:var(--color-primary-contrast-light);--color-secondary-50:oklch(98.5% 0 0);--color-secondary-950:oklch(14.5% 0 0);--color-secondary-contrast-dark:var(--color-secondary-950);--color-secondary-contrast-light:var(--color-secondary-50);--color-tertiary-50:oklch(98.5% 0 0);--color-tertiary-950:oklch(14.5% 0 0);--color-tertiary-contrast-dark:var(--color-tertiary-950);--color-tertiary-contrast-light:var(--color-tertiary-50);--color-success-50:oklch(98.5% 0 0);--color-success-950:oklch(14.5% 0 0);--color-success-contrast-dark:var(--color-success-950);--color-success-contrast-light:var(--color-success-50);--color-warning-50:oklch(98.5% 0 0);--color-warning-950:oklch(14.5% 0 0);--color-warning-contrast-dark:var(--color-warning-950);--color-warning-contrast-light:var(--color-warning-50);--color-error-50:oklch(98.5% 0 0);--color-error-500:oklch(55.6% 0 0);--color-error-950:oklch(14.5% 0 0);--color-error-contrast-dark:var(--color-error-950);--color-error-contrast-light:var(--color-error-50);--color-error-contrast-500:var(--color-error-contrast-light);--color-surface-50:oklch(98.5% 0 0);--color-surface-100:oklch(97% 0 0);--color-surface-200:oklch(92.2% 0 0);--color-surface-300:oklch(87% 0 0);--color-surface-400:oklch(70.8% 0 0);--color-surface-500:oklch(55.6% 0 0);--color-surface-600:oklch(43.9% 0 0);--color-surface-700:oklch(37.1% 0 0);--color-surface-800:oklch(26.9% 0 0);--color-surface-900:oklch(20.5% 0 0);--color-surface-950:oklch(14.5% 0 0);--color-surface-contrast-dark:var(--color-surface-950);--color-surface-contrast-light:var(--color-surface-50);--color-surface-contrast-100:var(--color-surface-contrast-dark);--color-surface-contrast-900:var(--color-surface-contrast-light);--body-background-color:var(--color-surface-50);--body-background-color-dark:var(--color-surface-950);--color-primary-50-950:light-dark(var(--color-primary-50),var(--color-primary-950));--color-primary-contrast-50-950:light-dark(var(--color-primary-contrast-50),var(--color-primary-contrast-950));--color-primary-100-900:light-dark(var(--color-primary-100),var(--color-primary-900));--color-primary-950-50:light-dark(var(--color-primary-950),var(--color-primary-50));--color-error-50-950:light-dark(var(--color-error-50),var(--color-error-950));--color-error-950-50:light-dark(var(--color-error-950),var(--color-error-50));--color-surface-50-950:light-dark(var(--color-surface-50),var(--color-surface-950));--color-surface-100-900:light-dark(var(--color-surface-100),var(--color-surface-900));--color-surface-contrast-100-900:light-dark(var(--color-surface-contrast-100),var(--color-surface-contrast-900));--color-surface-200-800:light-dark(var(--color-surface-200),var(--color-surface-800));--color-surface-300-700:light-dark(var(--color-surface-300),var(--color-surface-700));--color-surface-400-600:light-dark(var(--color-surface-400),var(--color-surface-600));--color-surface-600-400:light-dark(var(--color-surface-600),var(--color-surface-400));--color-surface-700-300:light-dark(var(--color-surface-700),var(--color-surface-300));--color-surface-900-100:light-dark(var(--color-surface-900),var(--color-surface-100));--color-surface-950-50:light-dark(var(--color-surface-950),var(--color-surface-50))}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{color-scheme:light}@media (prefers-color-scheme:dark){:root{color-scheme:dark}}:root{scrollbar-color:var(--color-surface-300-700) var(--color-surface-100-900);scrollbar-width:thin}html{-webkit-tap-highlight-color:color-mix(in srgb, light-dark(var(--color-surface-50),var(--color-surface-950)) 30%, transparent)}@supports (color:color-mix(in lab, red, red)){html{-webkit-tap-highlight-color:color-mix(in oklab, var(--color-surface-50-950) 30%, transparent)}}body{background-color:var(--body-background-color)}@media (prefers-color-scheme:dark){body{background-color:var(--body-background-color-dark)}}body{color:var(--base-font-color);font-family:var(--base-font-family);font-size:var(--base-font-size);line-height:var(--base-line-height);font-weight:var(--base-font-weight);font-style:var(--base-font-style);letter-spacing:var(--base-letter-spacing)}@media (prefers-color-scheme:dark){body{color:var(--base-font-color-dark)}}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}.input::placeholder,.textarea::placeholder,.ig-input::placeholder,.ig-textarea::placeholder{color:var(--color-surface-700-300)}::selection{background-color:#73737380}@supports (color:color-mix(in lab, red, red)){::selection{background-color:color-mix(in srgb, var(--color-primary-500) 50%, transparent)}}:disabled,.disabled{opacity:.5}:is(:disabled,.disabled)>*{pointer-events:none}}@layer components;@layer utilities{.invisible{visibility:hidden}.visible{visibility:visible}.table{font-size:var(--text-sm);line-height:var(--text-sm--line-height);width:100%;position:relative}.table thead{color:var(--color-surface-700-300);border-bottom-width:1px;border-color:var(--color-surface-200-800)}.table th{text-align:left;font-weight:400}.table tbody>:not(:last-child){border-color:var(--color-surface-200-800);border-top-width:0;border-bottom-width:1px}.table tfoot{border-top-width:1px;border-color:var(--color-surface-200-800);background-color:var(--color-surface-100-900)}.table th,.table td{padding:calc(var(--spacing) * 2)}.table caption{color:var(--color-surface-600-400);font-size:var(--text-xs);line-height:var(--text-xs--line-height)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.label{width:100%;display:block}.label>*+*,.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.input{border-radius:var(--radius-base);width:100%;font-size:var(--text-base);line-height:var(--text-base--line-height);padding-block:var(--spacing);padding-inline:calc(var(--spacing) * 3);--tw-ring-inset:inset;--tw-ring-color:var(--color-surface-200-800);--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 var(--default-ring-width) var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);background-color:#0000;border-width:0;outline-color:#0000;display:block}.input:active,.input:focus,.input:focus-within{--tw-ring-color:var(--color-primary-500)}.input[type=file]::file-selector-button{cursor:pointer;border-radius:var(--radius-base);background-color:var(--color-surface-950-50);color:var(--color-surface-50-950);transform:translateY(calc(var(--spacing) * -.5));margin-right:calc(var(--spacing) * 2);text-transform:capitalize;font-size:var(--text-xs);height:var(--text-xs--line-height);padding-block:0;padding-inline:calc(var(--spacing) * 3)}.input[type=range]{accent-color:var(--color-surface-950-50);box-shadow:none;padding-inline:initial}.input[type=color]{border-radius:var(--radius-base);width:calc(var(--spacing) * 8.5);height:calc(var(--spacing) * 8.5);-webkit-appearance:none;border:none;outline:none;padding:0}.input[type=color]::-webkit-color-swatch-wrapper{padding:0}.input[type=color]::-webkit-color-swatch{border-radius:var(--radius-base);border:none}.input[type=color]::-moz-color-swatch{border:none}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.btn-icon{box-sizing:content-box;border-radius:var(--radius-base);white-space:nowrap;font-size:var(--text-base);width:var(--text-base);height:var(--text-base);padding:calc(var(--spacing) * 2);justify-content:center;align-items:center;text-decoration-line:none;display:inline-flex}@media (hover:hover){.btn-icon:not(:disabled):hover{filter:brightness(125%)}@media (prefers-color-scheme:dark){.btn-icon:not(:disabled):hover{filter:brightness(75%)}}}.hr{border-color:var(--color-surface-200-800);border-top-width:1px;width:100%;display:block}.btn{border-radius:var(--radius-base);justify-content:center;align-items:center;gap:calc(var(--spacing) * 2);white-space:nowrap;font-size:var(--text-base);line-height:var(--text-base--line-height);padding-block:var(--spacing);padding-inline:calc(var(--spacing) * 4);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--default-transition-timing-function);transition-duration:var(--default-transition-duration);flex-direction:row;text-decoration-line:none;display:inline-flex}@media (hover:hover){.btn:not(:disabled):hover{filter:brightness(125%)}@media (prefers-color-scheme:dark){.btn:not(:disabled):hover{filter:brightness(75%)}}}.label-text{font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-medium);text-decoration-line:none;display:block}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-full{height:100%}.placeholder{background-color:var(--color-surface-200-800);border-radius:var(--radius-base);min-height:calc(var(--spacing) * 4)}.w-2{width:calc(var(--spacing) * 2)}.w-8{width:calc(var(--spacing) * 8)}.w-48{width:calc(var(--spacing) * 48)}.w-full{width:100%}.max-w-md{max-width:var(--container-md)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-start{justify-content:flex-start}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.code:not(pre .code,.ec-line .code){background-color:var(--color-primary-100-900);border-radius:var(--radius-base);color:var(--color-primary-contrast-50-950);font-family:var(--font-mono);font-size:var(--text-xs);white-space:nowrap;padding-inline:calc(var(--spacing) * 1.5);padding-block:calc(var(--spacing) * .75);overflow-x:auto}.overflow-y-auto{overflow-y:auto}.card{border-radius:var(--radius-container)}a.card{transition-property:all;transition-timing-function:var(--default-transition-timing-function);transition-duration:var(--default-transition-duration)}@media (hover:hover){a.card:hover{filter:brightness(95%)}@media (prefers-color-scheme:dark){a.card:hover{filter:brightness(110%)}}}.rounded-full{border-radius:3.40282e38px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-surface-300{border-color:var(--color-surface-300)}.border-surface-400-600{border-color:light-dark(var(--color-surface-400),var(--color-surface-600))}.border-t-transparent{border-top-color:#0000}.preset-filled-error-500{background-color:var(--color-error-500);color:var(--color-error-contrast-500)}.preset-filled-primary-500{background-color:var(--color-primary-500);color:var(--color-primary-contrast-500)}.preset-filled-surface-100-900{background-color:var(--color-surface-100-900);color:var(--color-surface-contrast-100-900)}.preset-tonal-error{background-color:var(--color-error-50-950);color:var(--color-error-950-50)}.preset-tonal-primary{background-color:var(--color-primary-50-950);color:var(--color-primary-950-50)}.preset-tonal-surface{background-color:var(--color-surface-50-950);color:var(--color-surface-950-50)}.bg-current{background-color:currentColor}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.btn-sm{font-size:var(--text-xs);line-height:var(--text-xs--line-height);padding-block:var(--spacing);padding-inline:calc(var(--spacing) * 3)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.text-center{text-align:center}.text-left{text-align:left}.anchor{color:var(--anchor-font-color);font-family:var(--anchor-font-family);font-size:var(--anchor-font-size);line-height:var(--anchor-line-height);font-weight:var(--anchor-font-weight);font-style:var(--anchor-font-style);letter-spacing:var(--anchor-letter-spacing);-webkit-text-decoration:var(--anchor-text-decoration);-webkit-text-decoration:var(--anchor-text-decoration);text-decoration:var(--anchor-text-decoration)}@media (hover:hover){.anchor:hover{-webkit-text-decoration:var(--anchor-text-decoration-hover);-webkit-text-decoration:var(--anchor-text-decoration-hover);text-decoration:var(--anchor-text-decoration-hover)}}.anchor:active{-webkit-text-decoration:var(--anchor-text-decoration-active);-webkit-text-decoration:var(--anchor-text-decoration-active);text-decoration:var(--anchor-text-decoration-active)}.anchor:focus{-webkit-text-decoration:var(--anchor-text-decoration-focus);-webkit-text-decoration:var(--anchor-text-decoration-focus);text-decoration:var(--anchor-text-decoration-focus)}@media (prefers-color-scheme:dark){.anchor{color:var(--anchor-font-color-dark)}}.h2{color:var(--heading-font-color);font-family:var(--heading-font-family);font-weight:var(--heading-font-weight);font-style:var(--heading-font-style);letter-spacing:var(--heading-letter-spacing);font-size:var(--text-3xl);line-height:var(--text-3xl--line-height)}@media (min-width:48rem){.h2{font-size:var(--text-4xl);line-height:var(--text-4xl--line-height)}}@media (prefers-color-scheme:dark){.h2{color:var(--heading-font-color-dark)}}.h3{color:var(--heading-font-color);font-family:var(--heading-font-family);font-weight:var(--heading-font-weight);font-style:var(--heading-font-style);letter-spacing:var(--heading-letter-spacing);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height)}@media (min-width:48rem){.h3{font-size:var(--text-3xl);line-height:var(--text-3xl--line-height)}}@media (prefers-color-scheme:dark){.h3{color:var(--heading-font-color-dark)}}.text-sm{font-size:calc(.875rem * var(--text-scaling));line-height:var(--tw-leading,calc(calc(1.25 / .875) * var(--text-scaling)))}.text-xs{font-size:calc(.75rem * var(--text-scaling));line-height:var(--tw-leading,calc(calc(1 / .75) * var(--text-scaling)))}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-surface-100{color:var(--color-surface-100)}.text-surface-500{color:var(--color-surface-500)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}@keyframes progress-circular-indeterminate{0%{stroke-dasharray:1 var(--circumference);stroke-dashoffset:0}50%{stroke-dasharray:calc(var(--circumference) * .75) var(--circumference);stroke-dashoffset:calc(-1 * var(--circumference) * .5)}to{stroke-dasharray:1 var(--circumference);stroke-dashoffset:calc(-1 * var(--circumference))}}@keyframes progress-linear-indeterminate-horizontal{0%{transform:translate(-200%)}to{transform:translate(200%)}}@keyframes progress-linear-indeterminate-vertical{0%{transform:translateY(-200%)}to{transform:translateY(200%)}}[data-theme=wintry]{--text-scaling:1.067;--base-font-color:var(--color-surface-950);--base-font-color-dark:var(--color-surface-50);--base-font-family:system-ui, sans-serif;--base-font-size:inherit;--base-line-height:inherit;--base-font-weight:normal;--base-font-style:normal;--base-letter-spacing:0em;--heading-font-color:inherit;--heading-font-color-dark:inherit;--heading-font-family:Inter, Roboto, "Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif;--heading-font-weight:bold;--heading-font-style:normal;--heading-letter-spacing:inherit;--anchor-font-color:var(--color-primary-500);--anchor-font-color-dark:var(--color-primary-500);--anchor-font-family:inherit;--anchor-font-size:inherit;--anchor-line-height:inherit;--anchor-font-weight:inherit;--anchor-font-style:inherit;--anchor-letter-spacing:inherit;--anchor-text-decoration:none;--anchor-text-decoration-hover:underline;--anchor-text-decoration-active:none;--anchor-text-decoration-focus:none;--spacing:.25rem;--radius-base:.375rem;--radius-container:.75rem;--default-border-width:1px;--default-divide-width:1px;--default-ring-width:1px;--body-background-color:oklch(100% 0 0);--body-background-color-dark:var(--color-surface-950);--color-primary-50:oklch(96.19% .04 201.62);--color-primary-100:oklch(89.29% .06 230.4);--color-primary-200:oklch(82.2% .09 245.96);--color-primary-300:oklch(75.45% .12 253.41);--color-primary-400:oklch(68.61% .15 257.7);--color-primary-500:oklch(62.31% .19 259.81);--color-primary-600:oklch(56.01% .18 260.79);--color-primary-700:oklch(49.59% .18 261.77);--color-primary-800:oklch(43.07% .17 262.89);--color-primary-900:oklch(36.42% .16 263.66);--color-primary-950:oklch(29.67% .16 263.4);--color-primary-contrast-dark:var(--color-primary-950);--color-primary-contrast-light:var(--color-primary-50);--color-primary-contrast-50:var(--color-primary-contrast-dark);--color-primary-contrast-100:var(--color-primary-contrast-dark);--color-primary-contrast-200:var(--color-primary-contrast-dark);--color-primary-contrast-300:var(--color-primary-contrast-dark);--color-primary-contrast-400:var(--color-primary-contrast-dark);--color-primary-contrast-500:var(--color-primary-contrast-light);--color-primary-contrast-600:var(--color-primary-contrast-light);--color-primary-contrast-700:var(--color-primary-contrast-light);--color-primary-contrast-800:var(--color-primary-contrast-light);--color-primary-contrast-900:var(--color-primary-contrast-light);--color-primary-contrast-950:var(--color-primary-contrast-light);--color-secondary-50:oklch(95.68% .06 196.1);--color-secondary-100:oklch(89.83% .08 209.36);--color-secondary-200:oklch(84.09% .1 217.66);--color-secondary-300:oklch(78.56% .12 224.65);--color-secondary-400:oklch(73.31% .13 230.6);--color-secondary-500:oklch(68.47% .15 237.31);--color-secondary-600:oklch(62% .14 240.02);--color-secondary-700:oklch(55.31% .13 242.76);--color-secondary-800:oklch(48.5% .12 246.43);--color-secondary-900:oklch(41.38% .12 250.13);--color-secondary-950:oklch(34.06% .11 254.48);--color-secondary-contrast-dark:var(--color-secondary-950);--color-secondary-contrast-light:var(--color-secondary-50);--color-secondary-contrast-50:var(--color-secondary-contrast-dark);--color-secondary-contrast-100:var(--color-secondary-contrast-dark);--color-secondary-contrast-200:var(--color-secondary-contrast-dark);--color-secondary-contrast-300:var(--color-secondary-contrast-dark);--color-secondary-contrast-400:var(--color-secondary-contrast-dark);--color-secondary-contrast-500:var(--color-secondary-contrast-dark);--color-secondary-contrast-600:var(--color-secondary-contrast-light);--color-secondary-contrast-700:var(--color-secondary-contrast-light);--color-secondary-contrast-800:var(--color-secondary-contrast-light);--color-secondary-contrast-900:var(--color-secondary-contrast-light);--color-secondary-contrast-950:var(--color-secondary-contrast-light);--color-tertiary-50:oklch(92.26% .05 306.01);--color-tertiary-100:oklch(86.96% .07 296.34);--color-tertiary-200:oklch(81.6% .1 290.49);--color-tertiary-300:oklch(76.55% .13 286.63);--color-tertiary-400:oklch(71.31% .15 283.43);--color-tertiary-500:oklch(66.28% .18 280.87);--color-tertiary-600:oklch(58.39% .18 282.35);--color-tertiary-700:oklch(50.63% .18 283.21);--color-tertiary-800:oklch(42.59% .18 283.85);--color-tertiary-900:oklch(34.95% .18 283.03);--color-tertiary-950:oklch(27.57% .17 280.45);--color-tertiary-contrast-dark:var(--color-tertiary-950);--color-tertiary-contrast-light:var(--color-tertiary-50);--color-tertiary-contrast-50:var(--color-tertiary-contrast-dark);--color-tertiary-contrast-100:var(--color-tertiary-contrast-dark);--color-tertiary-contrast-200:var(--color-tertiary-contrast-dark);--color-tertiary-contrast-300:var(--color-tertiary-contrast-dark);--color-tertiary-contrast-400:var(--color-tertiary-contrast-dark);--color-tertiary-contrast-500:var(--color-tertiary-contrast-dark);--color-tertiary-contrast-600:var(--color-tertiary-contrast-dark);--color-tertiary-contrast-700:var(--color-tertiary-contrast-light);--color-tertiary-contrast-800:var(--color-tertiary-contrast-light);--color-tertiary-contrast-900:var(--color-tertiary-contrast-light);--color-tertiary-contrast-950:var(--color-tertiary-contrast-light);--color-success-50:oklch(97.96% .12 108.35);--color-success-100:oklch(93.56% .14 115.38);--color-success-200:oklch(89.31% .16 120.22);--color-success-300:oklch(84.86% .18 124.21);--color-success-400:oklch(80.8% .19 127.53);--color-success-500:oklch(76.81% .2 130.85);--color-success-600:oklch(69.44% .19 133.05);--color-success-700:oklch(61.88% .18 135.65);--color-success-800:oklch(54.52% .17 138.28);--color-success-900:oklch(46.76% .15 140.76);--color-success-950:oklch(38.95% .13 142.5);--color-success-contrast-dark:var(--color-success-950);--color-success-contrast-light:var(--color-success-50);--color-success-contrast-50:var(--color-success-contrast-dark);--color-success-contrast-100:var(--color-success-contrast-dark);--color-success-contrast-200:var(--color-success-contrast-dark);--color-success-contrast-300:var(--color-success-contrast-dark);--color-success-contrast-400:var(--color-success-contrast-dark);--color-success-contrast-500:var(--color-success-contrast-dark);--color-success-contrast-600:var(--color-success-contrast-dark);--color-success-contrast-700:var(--color-success-contrast-light);--color-success-contrast-800:var(--color-success-contrast-light);--color-success-contrast-900:var(--color-success-contrast-light);--color-success-contrast-950:var(--color-success-contrast-light);--color-warning-50:oklch(97.87% .12 108.45);--color-warning-100:oklch(94.1% .14 103.73);--color-warning-200:oklch(90.39% .15 99.65);--color-warning-300:oklch(86.48% .16 95.56);--color-warning-400:oklch(82.95% .16 91.25);--color-warning-500:oklch(79.53% .16 86.04);--color-warning-600:oklch(70.68% .14 85.14);--color-warning-700:oklch(61.76% .12 84.62);--color-warning-800:oklch(52.18% .1 83.48);--color-warning-900:oklch(42.49% .08 81.81);--color-warning-950:oklch(31.98% .06 75.91);--color-warning-contrast-dark:var(--color-warning-950);--color-warning-contrast-light:var(--color-warning-50);--color-warning-contrast-50:var(--color-warning-contrast-dark);--color-warning-contrast-100:var(--color-warning-contrast-dark);--color-warning-contrast-200:var(--color-warning-contrast-dark);--color-warning-contrast-300:var(--color-warning-contrast-dark);--color-warning-contrast-400:var(--color-warning-contrast-dark);--color-warning-contrast-500:var(--color-warning-contrast-dark);--color-warning-contrast-600:var(--color-warning-contrast-dark);--color-warning-contrast-700:var(--color-warning-contrast-light);--color-warning-contrast-800:var(--color-warning-contrast-light);--color-warning-contrast-900:var(--color-warning-contrast-light);--color-warning-contrast-950:var(--color-warning-contrast-light);--color-error-50:oklch(91.14% .07 332.14);--color-error-100:oklch(82.94% .11 339.91);--color-error-200:oklch(75.2% .14 345.21);--color-error-300:oklch(68.13% .18 348.96);--color-error-400:oklch(62.02% .21 353.41);--color-error-500:oklch(57.22% .22 358.61);--color-error-600:oklch(51.7% .2 358.74);--color-error-700:oklch(46.21% .18 358.64);--color-error-800:oklch(40.37% .16 358.83);--color-error-900:oklch(34.48% .13 358.66);--color-error-950:oklch(28.04% .11 358.71);--color-error-contrast-dark:var(--color-error-950);--color-error-contrast-light:var(--color-error-50);--color-error-contrast-50:var(--color-error-contrast-dark);--color-error-contrast-100:var(--color-error-contrast-dark);--color-error-contrast-200:var(--color-error-contrast-dark);--color-error-contrast-300:var(--color-error-contrast-dark);--color-error-contrast-400:var(--color-error-contrast-dark);--color-error-contrast-500:var(--color-error-contrast-light);--color-error-contrast-600:var(--color-error-contrast-light);--color-error-contrast-700:var(--color-error-contrast-light);--color-error-contrast-800:var(--color-error-contrast-light);--color-error-contrast-900:var(--color-error-contrast-light);--color-error-contrast-950:var(--color-error-contrast-light);--color-surface-50:oklch(97.59% 0 264.7);--color-surface-100:oklch(88.12% .01 261.81);--color-surface-200:oklch(78.51% .02 265.97);--color-surface-300:oklch(68.49% .03 264.38);--color-surface-400:oklch(58.25% .04 265.77);--color-surface-500:oklch(47.47% .05 264.53);--color-surface-600:oklch(42.05% .05 264.5);--color-surface-700:oklch(36.45% .05 264.44);--color-surface-800:oklch(31.02% .04 264.35);--color-surface-900:oklch(24.95% .04 264.15);--color-surface-950:oklch(18.53% .04 263.67);--color-surface-contrast-dark:var(--color-surface-950);--color-surface-contrast-light:var(--color-surface-50);--color-surface-contrast-50:var(--color-surface-contrast-dark);--color-surface-contrast-100:var(--color-surface-contrast-dark);--color-surface-contrast-200:var(--color-surface-contrast-dark);--color-surface-contrast-300:var(--color-surface-contrast-dark);--color-surface-contrast-400:var(--color-surface-contrast-dark);--color-surface-contrast-500:var(--color-surface-contrast-light);--color-surface-contrast-600:var(--color-surface-contrast-light);--color-surface-contrast-700:var(--color-surface-contrast-light);--color-surface-contrast-800:var(--color-surface-contrast-light);--color-surface-contrast-900:var(--color-surface-contrast-light);--color-surface-contrast-950:var(--color-surface-contrast-light)}:scope#qv-start,:scope#qv-saves,:scope#questVivaDebugger,:scope#qv-restarting,:scope#qv-recording{font-family:var(--font-sans)}:scope#qv-start{z-index:9999;background:var(--color-surface-950);justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}:scope#qv-restarting{z-index:9999;background:var(--color-surface-950);justify-content:center;align-items:center;display:flex;position:fixed;inset:0}:scope#qv-restarting.hidden{display:none}:scope#qv-recording{z-index:1400;position:fixed;top:.75rem;right:.75rem}:scope#qv-recording.hidden{display:none}:scope#qv-saves{border:none;border-radius:.75rem;width:100%;max-width:28rem;padding:0}:scope#qv-saves::backdrop{background:#00000080}:scope#qv-saves[data-mode=boot] .qv-manage-only,:scope#qv-saves[data-mode=boot] [data-delete-slot],:scope#qv-saves[data-mode=manage] [data-mode-text=boot]{display:none}:scope#questVivaDebugger{border:1px solid var(--color-surface-300-700);z-index:1500;box-shadow:var(--shadow-xl,0 20px 25px -5px #00000026, 0 8px 10px -6px #00000026);border-radius:.75rem;margin:0;padding:0;position:fixed}#qv-debugger-titlebar{cursor:move;touch-action:none}:scope.qv-debugger-drag-active{-webkit-user-select:none;user-select:none}#qv-debugger-card{position:relative;container:qv-debugger-card/inline-size}#qv-debugger-resize-handle{cursor:nwse-resize;touch-action:none;width:1rem;height:1rem;position:absolute;bottom:0;right:0}#qv-debugger-resize-handle:before{content:"";border-right:2px solid var(--color-surface-400-600);border-bottom:2px solid var(--color-surface-400-600);width:.5rem;height:.5rem;position:absolute;bottom:.25rem;right:.25rem}#qv-debugger-splitter{cursor:col-resize;touch-action:none;flex-shrink:0;width:.75rem;margin-inline:-.25rem;position:relative}#qv-debugger-splitter:after{content:"";background:var(--color-surface-300-700);inset-block:0;width:1px;position:absolute;left:50%}#qv-debugger-splitter:hover:after,#qv-debugger-splitter.qv-debugger-dragging:after{background:var(--color-primary-500);width:2px}#qv-debugger-list{overflow-y:auto}#qv-debugger-detail{flex-direction:column;padding-left:.5rem;display:flex}.qv-debugger-scroll{flex:auto;min-height:0;overflow:auto}.qv-debugger-footer{border-top:1px solid var(--color-surface-300-700);flex-shrink:0;margin-top:.75rem;padding-top:.75rem}@container qv-debugger-card (max-width:640px){#qv-debugger-panes{flex-direction:column}#qv-debugger-list{flex-shrink:0;max-height:40%;width:100%!important}#qv-debugger-splitter{display:none}#qv-debugger-detail{padding-top:.75rem;padding-left:0}}.qv-debugger-list-item{text-align:left;border-radius:var(--radius-base);width:100%;font-size:var(--text-sm);padding:.375rem .5rem;display:block}.qv-debugger-list-item:hover{background:var(--color-surface-200-800)}.qv-debugger-list-item.qv-debugger-row-selected:hover{background:var(--color-primary-600)}.qv-debugger-input{border-radius:var(--radius-base);width:100%;padding-block:var(--spacing);padding-inline:calc(var(--spacing) * 3);border:1px solid var(--color-surface-300-700);background-color:var(--color-surface-50-950);color:inherit}.qv-debugger-input:focus{outline:2px solid var(--color-primary-500);outline-offset:-1px}.qv-debugger-table{table-layout:fixed;width:100%}.qv-debugger-table th,.qv-debugger-table td{overflow-wrap:break-word;vertical-align:top}.qv-debugger-table tbody td{border-bottom:1px solid var(--color-surface-200-800);padding-block:.375rem}.qv-debugger-table thead th{text-align:left;font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.05em;color:var(--color-surface-500);border-bottom:1px solid var(--color-surface-300-700);padding-bottom:.5rem;position:relative}.qv-debugger-col-resize{cursor:col-resize;touch-action:none;z-index:1;width:.75rem;position:absolute;top:0;bottom:0;right:-.375rem}.qv-debugger-col-resize:hover,.qv-debugger-col-resize.qv-debugger-dragging{background:var(--color-primary-500);opacity:.5}#qv-debugger-detail [data-attr-row]{cursor:pointer}#qv-debugger-detail [data-sort-col]{cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}#qv-debugger-detail [data-sort-col]:hover{color:var(--color-surface-900-100)}.qv-debugger-row-inherited{color:var(--color-surface-500)}.qv-debugger-row-selected{background:var(--color-primary-500);color:var(--color-primary-contrast-500)}.qv-icon{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;width:1.25rem;height:1.25rem}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
22
+ }
package/favicon.svg ADDED
@@ -0,0 +1 @@
1
+ <svg version="1.1" viewBox="0.0 0.0 256.0 256.0" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"><clipPath id="g33f5cd2a327_0_4.0"><path d="m0 0l256.0 0l0 256.0l-256.0 0l0 -256.0z" clip-rule="nonzero"/></clipPath><g clip-path="url(#g33f5cd2a327_0_4.0)"><path fill="#000000" fill-opacity="0.0" d="m0 0l256.0 0l0 256.0l-256.0 0z" fill-rule="evenodd"/><path fill="#000000" fill-opacity="0.0" d="m-0.001312336 -6.56168E-4l256.0 0l0 158.11023l-256.0 0z" fill-rule="evenodd"/><path fill="#6d9eeb" d="m120.86978 137.6556l0 -24.609375q0 -7.53125 -1.078125 -14.40625q-1.0625 -6.890625 -3.21875 -12.9375q-2.921875 -8.59375 -8.0 -15.53125q-5.078125 -6.9375 -11.828125 -11.71875q-5.953125 -4.109375 -13.28125 -6.34375q-7.3125 -2.25 -15.71875 -2.25q-8.390625 0 -15.53125 2.25q-7.125 2.234375 -12.890625 6.34375q-6.34375 4.484375 -10.9375 10.890625q-4.578125 6.390625 -7.3125 14.296875q-2.34375 6.359375 -3.578125 13.828125q-1.21875 7.46875 -1.21875 15.578125l0 24.609375q0 7.03125 1.265625 13.71875q1.28125 6.6875 3.71875 12.640625q2.734375 6.84375 7.171875 12.796875q4.453125 5.953125 10.40625 10.25q5.859375 4.203125 13.078125 6.546875q7.234375 2.34375 15.828125 2.34375q3.8125 0 7.375 -0.484375q3.5625 -0.484375 6.984375 -1.375l27.046875 25.0l17.671875 -15.71875l-23.53125 -21.296875q3.8125 -3.609375 6.78125 -7.953125q2.984375 -4.34375 5.140625 -9.125q2.734375 -6.15625 4.140625 -13.09375q1.421875 -6.9375 1.515625 -14.25zm-27.828125 -24.8125l0 24.8125q0 3.90625 -0.5 7.765625q-0.484375 3.84375 -1.453125 7.46875q-1.375 4.78125 -3.765625 8.984375q-2.390625 4.1875 -5.8125 7.03125q-2.734375 2.046875 -6.15625 3.265625q-3.40625 1.21875 -7.609375 1.21875q-4.09375 0 -7.375 -1.171875q-3.265625 -1.171875 -5.703125 -3.3125q-3.421875 -2.84375 -5.671875 -7.140625q-2.25 -4.296875 -3.421875 -9.5625q-0.78125 -3.421875 -1.125 -7.125q-0.328125 -3.71875 -0.328125 -7.421875l0 -24.8125q0 -4.390625 0.28125 -8.4375q0.296875 -4.0625 0.890625 -7.671875q0.96875 -6.25 3.15625 -11.28125q2.203125 -5.03125 5.921875 -8.25q2.53125 -2.25 5.84375 -3.421875q3.328125 -1.171875 7.53125 -1.171875q4.390625 0 7.953125 1.28125q3.578125 1.265625 6.3125 3.5q2.828125 2.640625 5.0625 6.40625q2.25 3.75 3.421875 8.34375q1.375 4.390625 1.953125 9.671875q0.59375 5.265625 0.59375 11.03125z" fill-rule="nonzero"/><path fill="#e06666" d="m173.99869 193.99934l27.921875 0l43.078125 -142.1875l-30.28125 0l-24.21875 92.765625l-2.640625 9.671875l-2.4375 -9.5625l-24.125 -92.875l-30.265625 0l42.96875 142.1875z" fill-rule="nonzero"/></g></svg>
package/grid.js ADDED
@@ -0,0 +1,446 @@
1
+ var scale, gridX, gridY, player,
2
+ playerVector, playerDestination,
3
+ offsetVector, offsetDestination,
4
+ allPaths = [],
5
+ customLayerPaths = [],
6
+ customLayerObjects = {},
7
+ customLayerSvg = {},
8
+ customLayerImages = {},
9
+ layers = [],
10
+ maxLayer = 7,
11
+ currentLayer = 0,
12
+ offset = new Point(0, 0),
13
+ symbols = {},
14
+ newShapePoints = [];
15
+
16
+ for (var i = -maxLayer; i <= maxLayer; i++) {
17
+ var layer = new Layer();
18
+ layers.push(project.activeLayer);
19
+ }
20
+
21
+ var customLayer = new Layer(),
22
+ customLayerOffset = new Point(0, 0);
23
+
24
+ customLayer.visible = false;
25
+
26
+ function activateLayer(index) {
27
+ showCustomLayer(false);
28
+ layers[getLayerIndex(index)].activate();
29
+ layers[getLayerIndex(index)].opacity = 1;
30
+ if (currentLayer != index) {
31
+ layers[getLayerIndex(currentLayer)].opacity = 0.2;
32
+ currentLayer = index;
33
+ }
34
+ }
35
+
36
+ function getLayerIndex(index) {
37
+ if (index < -maxLayer || index > maxLayer) {
38
+ alert("Layer out of bounds. Current layer range: -" + maxLayer + " to " + maxLayer);
39
+ }
40
+ // layers array represents z-indexes from -maxLayer to maxLayer
41
+ return index + maxLayer;
42
+ }
43
+
44
+ activateLayer(currentLayer);
45
+
46
+ gridApi.setScale = function (newScale) {
47
+ scale = newScale;
48
+ gridX = new Point(scale, 0);
49
+ gridY = new Point(0, scale);
50
+ };
51
+
52
+ gridApi.setZoom = function (zoom) {
53
+ paper.view.zoom = zoom;
54
+ };
55
+
56
+ gridApi.zoomIn = function (amount) {
57
+ zoom = paper.view.zoom * (Math.pow(1.1, amount));
58
+ if (zoom > 0.0001) {
59
+ paper.view.zoom = zoom;
60
+ }
61
+ };
62
+
63
+ function onMouseDrag(event) {
64
+ updateOffset(event.delta);
65
+ }
66
+
67
+
68
+ function onMouseUp(event) {
69
+ if (_respondToGridClicks) {
70
+ var x = getGridSquareX(event.point);
71
+ var y = getGridSquareY(event.point);
72
+ ASLEvent("JS_GridSquareClick", x + ";" + y);
73
+ }
74
+ }
75
+
76
+ function updateOffset(delta) {
77
+ setOffset(getOffset() + delta);
78
+ var paths;
79
+ if (project.activeLayer == customLayer) {
80
+ paths = customLayerPaths;
81
+ } else {
82
+ paths = allPaths;
83
+ }
84
+ for (var i = 0; i < paths.length; i++) {
85
+ paths[i].position += delta;
86
+ }
87
+ if (playerDestination && project.activeLayer != customLayer) {
88
+ playerDestination += delta;
89
+ }
90
+ }
91
+
92
+ function getOffset() {
93
+ if (project.activeLayer == customLayer) {
94
+ return customLayerOffset;
95
+ }
96
+ return offset;
97
+ }
98
+
99
+ function setOffset(value) {
100
+ if (project.activeLayer == customLayer) {
101
+ customLayerOffset = value;
102
+ } else {
103
+ offset = value;
104
+ }
105
+ }
106
+
107
+ function onFrame(event) {
108
+ if (playerVector) {
109
+ var distance = player.position - playerDestination;
110
+ if (distance.length > playerVector.length) {
111
+ player.position += playerVector;
112
+ } else {
113
+ player.position = playerDestination;
114
+ playerVector = null;
115
+ playerDestination = null;
116
+
117
+ var playerPositionAbsolute = player.position - offset;
118
+ offsetDestination = paper.view.center - playerPositionAbsolute;
119
+
120
+ offsetVector = (offsetDestination - offset) / 10;
121
+ }
122
+ }
123
+ if (offsetVector) {
124
+ var distance = offset - offsetDestination;
125
+ if (distance.length > offsetVector.length) {
126
+ updateOffset(offsetVector);
127
+ } else {
128
+ updateOffset(offsetDestination - offset);
129
+ offsetVector = null;
130
+ offsetDestination = null;
131
+ }
132
+ }
133
+ }
134
+
135
+ gridApi.drawGrid = function (minX, minY, maxX, maxY, border) {
136
+
137
+ function gridLine(start, end) {
138
+ var path = new Path();
139
+ path.strokeColor = border;
140
+ path.add(start, end);
141
+ addPathToCurrentLayerList(path);
142
+ }
143
+
144
+ // draw the vertical lines
145
+ for (var x = minX; x <= maxX; x++) {
146
+ var start = gridPoint(x, minY);
147
+ var end = gridPoint(x, maxY);
148
+ gridLine(start, end);
149
+ }
150
+
151
+ // draw the horizontal lines
152
+ for (var y = minY; y <= maxY; y++) {
153
+ var start = gridPoint(minX, y);
154
+ var end = gridPoint(maxX, y);
155
+ gridLine(start, end);
156
+ }
157
+ };
158
+
159
+ function gridPoint(x, y) {
160
+ return (gridX * x) + (gridY * y) + getOffset();
161
+ }
162
+
163
+ function getGridSquareX(point) {
164
+ return Math.floor(((point - getOffset()) / gridX).x);
165
+ }
166
+
167
+ function getGridSquareY(point) {
168
+ return Math.floor(((point - getOffset()) / gridY).y);
169
+ }
170
+
171
+ function gridPointNudge(x, y, nudgeX, nudgeY) {
172
+ var result = gridPoint(x, y);
173
+ result.x += nudgeX;
174
+ result.y += nudgeY;
175
+ return result;
176
+ }
177
+
178
+ var firstBox = true;
179
+
180
+ gridApi.drawBox = function (x, y, z, width, height, border, borderWidth, fill, sides) {
181
+ activateLayer(z);
182
+ // if this is the very first room, centre the canvas by updating the offset
183
+ if (firstBox) {
184
+ var centrePoint = gridPoint(x + width / 2, y + height / 2);
185
+ var offsetX = paper.view.center.x - centrePoint.x;
186
+ var offsetY = paper.view.center.y - centrePoint.y;
187
+ updateOffset(new Point(offsetX, offsetY));
188
+ firstBox = false;
189
+ }
190
+ var path = null;
191
+ var points = [gridPoint(x, y), gridPoint(x + width, y), gridPoint(x + width, y + height), gridPoint(x, y + height)];
192
+ // sides is encoded with bits to represent NESW
193
+ var draw = [sides & 8, sides & 4, sides & 2, sides & 1];
194
+ for (var i = 0; i < 4; i++) {
195
+ var next = (i + 1) % 4;
196
+ if (draw[i]) {
197
+ if (path == null) {
198
+ path = new Path();
199
+ allPaths.push(path);
200
+ if (borderWidth > 0) {
201
+ path.strokeColor = border;
202
+ path.strokeWidth = borderWidth;
203
+ }
204
+ path.add(points[i]);
205
+ }
206
+ path.add(points[next]);
207
+ } else {
208
+ path = null;
209
+ }
210
+ }
211
+ var fillPath;
212
+ if (sides == 15) {
213
+ fillPath = path;
214
+ } else {
215
+ fillPath = new Path();
216
+ fillPath.add(points[0], points[1], points[2], points[3]);
217
+ allPaths.push(fillPath);
218
+ }
219
+ fillPath.fillColor = fill;
220
+ fillPath.closed = true;
221
+ };
222
+
223
+ gridApi.drawLine = function (x1, y1, x2, y2, border, borderWidth) {
224
+ var path = new Path;
225
+ path.strokeColor = border;
226
+ path.strokeWidth = borderWidth;
227
+ path.add(gridPoint(x1, y1));
228
+ path.add(gridPoint(x2, y2));
229
+ addPathToCurrentLayerList(path);
230
+ };
231
+
232
+ gridApi.drawArrow = function (id, x1, y1, x2, y2, border, borderWidth) {
233
+ clearExistingObject(id);
234
+
235
+ var linePath = new Path;
236
+ var start = gridPoint(x1, y1);
237
+ var end = gridPoint(x2, y2);
238
+ linePath.strokeColor = border;
239
+ linePath.strokeWidth = borderWidth;
240
+ linePath.add(start);
241
+ linePath.add(end);
242
+ addPathToCurrentLayerList(linePath);
243
+
244
+ var vector = end - start;
245
+ var arrowVector = vector.normalize(10);
246
+ var arrowheadPath = new Path([
247
+ end + arrowVector.rotate(150),
248
+ end,
249
+ end + arrowVector.rotate(-150)
250
+ ]);
251
+ arrowheadPath.strokeColor = border;
252
+ arrowheadPath.strokeWidth = borderWidth;
253
+ addPathToCurrentLayerList(arrowheadPath);
254
+
255
+ customLayerObjects[id] = [linePath, arrowheadPath];
256
+ };
257
+
258
+ function addPathToCurrentLayerList(path) {
259
+ if (project.activeLayer == customLayer) {
260
+ customLayerPaths.push(path);
261
+ } else {
262
+ allPaths.push(path);
263
+ }
264
+ }
265
+
266
+ gridApi.drawPlayer = function (x, y, z, radius, border, borderWidth, fill) {
267
+ activateLayer(z);
268
+ if (!player) {
269
+ player = new Path.Circle(gridPoint(x, y), radius);
270
+ player.strokeColor = border;
271
+ player.strokeWidth = borderWidth;
272
+ player.fillColor = fill;
273
+ player.fillColor = fill;
274
+ allPaths.push(player);
275
+
276
+ var playerPositionAbsolute = player.position - offset;
277
+ var offsetDestinationX = paper.view.center.x - playerPositionAbsolute.x;
278
+ var offsetDestinationY = paper.view.center.y - playerPositionAbsolute.y;
279
+
280
+ offsetDestination = new Point(offsetDestinationX, offsetDestinationY);
281
+ offsetVector = (offsetDestination - offset);
282
+ } else {
283
+ playerDestination = gridPoint(x, y);
284
+ playerVector = (playerDestination - player.position) / 10;
285
+ // move player to the end of the activeLayer so it gets drawn on top
286
+ project.activeLayer.addChild(player);
287
+ }
288
+ };
289
+
290
+
291
+ gridApi.drawLabel = function (x, y, z, text, col) {
292
+ if (col === undefined) col = "black";
293
+ activateLayer(z);
294
+ var pointText = new PointText(gridPoint(x, y));
295
+ pointText.justification = "center";
296
+ pointText.fillColor = col;
297
+ pointText.content = text;
298
+ allPaths.push(pointText);
299
+ };
300
+
301
+ function showCustomLayer(visible) {
302
+ if (visible != customLayer.visible) {
303
+ customLayer.visible = visible;
304
+ for (var idx = 0; idx < layers.length; idx++) {
305
+ layers[idx].visible = !visible;
306
+ }
307
+ if (visible) {
308
+ customLayer.activate();
309
+ } else {
310
+ layers[getLayerIndex(currentLayer)].activate();
311
+ }
312
+ }
313
+ }
314
+
315
+ gridApi.showCustomLayer = function (visible) {
316
+ showCustomLayer(visible);
317
+ };
318
+
319
+ gridApi.clearCustomLayer = function () {
320
+ customLayer.removeChildren();
321
+ };
322
+
323
+ gridApi.clearAllLayers = function () {
324
+ player = null;
325
+ playerVector = null;
326
+ playerDestination = null;
327
+ offsetVector = null;
328
+ offsetDestination = null;
329
+ $.each(layers, function (idx, layer) {
330
+ layer.removeChildren();
331
+ });
332
+ };
333
+
334
+ gridApi.setCentre = function (x, y) {
335
+ var centrePoint = gridPoint(x, y);
336
+ var offsetX = paper.view.center.x - centrePoint.x;
337
+ var offsetY = paper.view.center.y - centrePoint.y;
338
+ var curOffset = getOffset();
339
+ updateOffset(new Point(offsetX, offsetY));
340
+ };
341
+
342
+ gridApi.drawCustomLayerSquare = function (id, x, y, width, height, text, fill) {
343
+ var points = [];
344
+ points.push(gridPointNudge(x, y, 1, 1));
345
+ points.push(gridPointNudge(x + width, y, -1, 1));
346
+ points.push(gridPointNudge(x + width, y + height, -1, -1));
347
+ points.push(gridPointNudge(x, y + height, 1, -1));
348
+
349
+ var textPoint = gridPoint(x + width / 2, y + height / 2);
350
+ gridApi.drawCustomLayerObject(id, points, text, textPoint, fill, fill);
351
+ };
352
+
353
+ function clearExistingObject(id) {
354
+ var existing = customLayerObjects[id];
355
+ if (existing) {
356
+ for (var idx in existing) {
357
+ var path = existing[idx];
358
+ // TO DO: Should remove path from layer and layerlist array
359
+ path.visible = false;
360
+ }
361
+ }
362
+ }
363
+
364
+ gridApi.drawCustomLayerObject = function (id, points, text, textPoint, border, fill, opacity) {
365
+ clearExistingObject(id);
366
+
367
+ var paths = new Array();
368
+ path = new Path();
369
+ path.strokeColor = border;
370
+ $.each(points, function (index, value) {
371
+ path.add(value);
372
+ });
373
+ path.fillColor = fill;
374
+ path.closed = true;
375
+ if (typeof opacity != "undefined") {
376
+ path.opacity = opacity;
377
+ }
378
+ addPathToCurrentLayerList(path);
379
+ paths.push(path);
380
+
381
+ if (text) {
382
+ var pointText = new PointText(textPoint);
383
+ pointText.justification = "center";
384
+ pointText.fillColor = "black";
385
+ pointText.content = text;
386
+ if (typeof opacity != "undefined") {
387
+ pointText.opacity = opacity;
388
+ }
389
+ addPathToCurrentLayerList(pointText);
390
+ paths.push(pointText);
391
+ }
392
+
393
+ customLayerObjects[id] = paths;
394
+ };
395
+
396
+ gridApi.loadSvg = function (data, id) {
397
+ var svg = paper.project.importSVG(data);
398
+ if (svg) {
399
+ symbols[id] = new Symbol(svg);
400
+ }
401
+ };
402
+
403
+ gridApi.drawCustomLayerSvg = function (id, symbolId, x, y, width, height) {
404
+ if (symbolId in symbols) {
405
+ var existing = customLayerSvg[id];
406
+ var placedSymbol = existing ? existing : symbols[symbolId].place();
407
+ placedSymbol.scale(gridX.x * width / placedSymbol.bounds.width, gridY.y * height / placedSymbol.bounds.height);
408
+ placedSymbol.position = gridPoint(x, y) + placedSymbol.bounds.size / 2;
409
+ if (!existing) addPathToCurrentLayerList(placedSymbol);
410
+ customLayerSvg[id] = placedSymbol;
411
+ } else {
412
+ console.log("No symbol loaded with id '" + symbolId + "'");
413
+ }
414
+ };
415
+
416
+ gridApi.drawCustomLayerImage = function (id, url, x, y, width, height) {
417
+ var existing = customLayerImages[id];
418
+ var raster = existing ? existing : new Raster(url);
419
+ var resizeRaster = function () {
420
+ raster.scale(gridX.x * width / raster.bounds.width, gridY.y * height / raster.bounds.height);
421
+ raster.position = gridPoint(x, y) + raster.bounds.size / 2;
422
+ };
423
+ if (existing) {
424
+ resizeRaster();
425
+ } else {
426
+ raster.onLoad = resizeRaster;
427
+ addPathToCurrentLayerList(raster);
428
+ customLayerImages[id] = raster;
429
+ }
430
+ }
431
+
432
+ gridApi.addNewShapePoint = function (x, y) {
433
+ newShapePoints.push([x, y]);
434
+ };
435
+
436
+ gridApi.drawShape = function (id, border, fill, opacity) {
437
+ var points = [];
438
+ for (var idx in newShapePoints) {
439
+ var xy = newShapePoints[idx];
440
+ points.push(gridPoint(xy[0], xy[1]));
441
+ }
442
+ gridApi.drawCustomLayerObject(id, points, null, null, border, fill, opacity);
443
+ newShapePoints = [];
444
+ };
445
+
446
+ gridApi.onLoad();