@royalschedule/maps 4.0.31 → 4.0.33

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 (286) hide show
  1. package/dist/Additio/from/courses.js.map +1 -1
  2. package/dist/Additio/from/events.js.map +1 -1
  3. package/dist/Additio/from/groups.js.map +1 -1
  4. package/dist/Additio/from/index.js.map +1 -1
  5. package/dist/Additio/from/locations.js.map +1 -1
  6. package/dist/Additio/from/persons.js.map +1 -1
  7. package/dist/Additio/from/schedules.d.ts +1 -0
  8. package/dist/Additio/from/schedules.js +2 -4
  9. package/dist/Additio/from/schedules.js.map +1 -1
  10. package/dist/Additio/from/teachers.js.map +1 -1
  11. package/dist/Additio/to/index.d.ts +4 -2
  12. package/dist/Additio/to/schedules.js +2 -4
  13. package/dist/Additio/to/schedules.js.map +1 -1
  14. package/dist/Admentum/from/courses.js.map +1 -1
  15. package/dist/Admentum/from/events.js.map +1 -1
  16. package/dist/Admentum/from/groups.js.map +1 -1
  17. package/dist/Admentum/from/index.js.map +1 -1
  18. package/dist/Admentum/from/locations.js.map +1 -1
  19. package/dist/Admentum/from/persons.js.map +1 -1
  20. package/dist/Admentum/from/schedules.d.ts +1 -0
  21. package/dist/Admentum/from/schedules.js +3 -6
  22. package/dist/Admentum/from/schedules.js.map +1 -1
  23. package/dist/Admentum/from/teachers.js.map +1 -1
  24. package/dist/Admentum/to/index.d.ts +1 -0
  25. package/dist/Admentum/to/schedules.js +4 -7
  26. package/dist/Admentum/to/schedules.js.map +1 -1
  27. package/dist/Excel/index.d.ts +1 -0
  28. package/dist/Excel/v1/from/index.js +1 -1
  29. package/dist/Excel/v1/from/index.js.map +1 -1
  30. package/dist/Excel/v1/index.d.ts +4 -3
  31. package/dist/Excel/v2/from/index.js +45 -54
  32. package/dist/Excel/v2/from/index.js.map +1 -1
  33. package/dist/Excel/v2/index.d.ts +4 -3
  34. package/dist/IdunSoft/from/courses.js.map +1 -1
  35. package/dist/IdunSoft/from/events.js +1 -2
  36. package/dist/IdunSoft/from/events.js.map +1 -1
  37. package/dist/IdunSoft/from/groups.js.map +1 -1
  38. package/dist/IdunSoft/from/index.js.map +1 -1
  39. package/dist/IdunSoft/from/locations.js.map +1 -1
  40. package/dist/IdunSoft/from/schedules.d.ts +1 -0
  41. package/dist/IdunSoft/from/schedules.js.map +1 -1
  42. package/dist/IdunSoft/from/teachers.js.map +1 -1
  43. package/dist/IdunSoft/to/index.d.ts +1 -0
  44. package/dist/IdunSoft/to/schedules.js +3 -6
  45. package/dist/IdunSoft/to/schedules.js.map +1 -1
  46. package/dist/InfoMentor/to/index.d.ts +1 -0
  47. package/dist/InfoMentor/to/schedules.js +1 -2
  48. package/dist/InfoMentor/to/schedules.js.map +1 -1
  49. package/dist/PlanDigital/from/index.js.map +1 -1
  50. package/dist/PlanDigital/from/schedules.js +9 -11
  51. package/dist/PlanDigital/from/schedules.js.map +1 -1
  52. package/dist/PlanDigital/index.d.ts +1 -0
  53. package/dist/Quiculum/file/to/index.d.ts +1 -0
  54. package/dist/Quiculum/file/to/schedules.js +5 -9
  55. package/dist/Quiculum/file/to/schedules.js.map +1 -1
  56. package/dist/RS/from/division.d.ts +1 -0
  57. package/dist/RS/from/division.js +1 -2
  58. package/dist/RS/from/division.js.map +1 -1
  59. package/dist/RS/from/index.js.map +1 -1
  60. package/dist/RS/from/schedules.d.ts +1 -0
  61. package/dist/RS/from/schedules.js.map +1 -1
  62. package/dist/RS/make-connected.d.ts +3 -1
  63. package/dist/RS/make-connected.js +34 -42
  64. package/dist/RS/make-connected.js.map +1 -1
  65. package/dist/RS/to/index.js.map +1 -1
  66. package/dist/RS/to/initial-configuration.js +4 -6
  67. package/dist/RS/to/initial-configuration.js.map +1 -1
  68. package/dist/RS/to/input/collections.js.map +1 -1
  69. package/dist/RS/to/input/default.js +1 -2
  70. package/dist/RS/to/input/default.js.map +1 -1
  71. package/dist/RS/to/input/dependencies.js +1 -2
  72. package/dist/RS/to/input/dependencies.js.map +1 -1
  73. package/dist/RS/to/input/dynamic-locked-times.js +1 -2
  74. package/dist/RS/to/input/dynamic-locked-times.js.map +1 -1
  75. package/dist/RS/to/input/events.js.map +1 -1
  76. package/dist/RS/to/input/groups.js.map +1 -1
  77. package/dist/RS/to/input/individuals.js +1 -2
  78. package/dist/RS/to/input/individuals.js.map +1 -1
  79. package/dist/RS/to/input/input.js +1 -2
  80. package/dist/RS/to/input/input.js.map +1 -1
  81. package/dist/RS/to/input/intervals.js +2 -4
  82. package/dist/RS/to/input/intervals.js.map +1 -1
  83. package/dist/RS/to/input/periods.js +2 -4
  84. package/dist/RS/to/input/periods.js.map +1 -1
  85. package/dist/RS/to/input/settings.js.map +1 -1
  86. package/dist/RS/to/input/teachers.js +1 -1
  87. package/dist/RS/to/input/teachers.js.map +1 -1
  88. package/dist/RS/to/input/util/attach-locked-times.js.map +1 -1
  89. package/dist/RS/to/input/util/parse-days.js.map +1 -1
  90. package/dist/RS/to/input/util/parse-group-references.js.map +1 -1
  91. package/dist/RS/to/input/util/parse-intervals.js +2 -4
  92. package/dist/RS/to/input/util/parse-intervals.js.map +1 -1
  93. package/dist/RS/to/input/util/parse-location-references.js +1 -2
  94. package/dist/RS/to/input/util/parse-location-references.js.map +1 -1
  95. package/dist/RS/to/input/util/parse-max-working-hours.js.map +1 -1
  96. package/dist/RS/to/input/util/parse-minimum-break-length.js.map +1 -1
  97. package/dist/RS/to/input/util/util.js +1 -2
  98. package/dist/RS/to/input/util/util.js.map +1 -1
  99. package/dist/RS/to/schedules.js.map +1 -1
  100. package/dist/RS/types/to.d.ts +1 -0
  101. package/dist/SS12000/from/activities.js +1 -2
  102. package/dist/SS12000/from/activities.js.map +1 -1
  103. package/dist/SS12000/from/calendar-events.js.map +1 -1
  104. package/dist/SS12000/from/duties.js.map +1 -1
  105. package/dist/SS12000/from/groups.js.map +1 -1
  106. package/dist/SS12000/from/index.js.map +1 -1
  107. package/dist/SS12000/from/persons.js.map +1 -1
  108. package/dist/SS12000/from/resources.js.map +1 -1
  109. package/dist/SS12000/from/rooms.js.map +1 -1
  110. package/dist/SS12000/from/syllabuses.js.map +1 -1
  111. package/dist/SS12000/index.d.ts +41 -6
  112. package/dist/SS12000/to/activities.js.map +1 -1
  113. package/dist/SS12000/to/calendar-events.js.map +1 -1
  114. package/dist/SS12000/to/common.js.map +1 -1
  115. package/dist/SS12000/to/duties.js.map +1 -1
  116. package/dist/SS12000/to/groups.js.map +1 -1
  117. package/dist/SS12000/to/index.d.ts +1 -0
  118. package/dist/SS12000/to/persons.js.map +1 -1
  119. package/dist/SS12000/to/resources.js.map +1 -1
  120. package/dist/SS12000/to/rooms.js.map +1 -1
  121. package/dist/SS12000/to/syllabuses.js.map +1 -1
  122. package/dist/SchoolSoft/api/from/index.js.map +1 -1
  123. package/dist/SchoolSoft/api/from/schedules.js +8 -12
  124. package/dist/SchoolSoft/api/from/schedules.js.map +1 -1
  125. package/dist/SchoolSoft/api/index.d.ts +6 -5
  126. package/dist/SchoolSoft/file/from/index.js.map +1 -1
  127. package/dist/SchoolSoft/file/from/schedules.js +83 -87
  128. package/dist/SchoolSoft/file/from/schedules.js.map +1 -1
  129. package/dist/SchoolSoft/file/index.d.ts +1 -0
  130. package/dist/SchoolSoft/file/to/index.d.ts +3 -2
  131. package/dist/SchoolSoft/file/to/schedules.js +1 -2
  132. package/dist/SchoolSoft/file/to/schedules.js.map +1 -1
  133. package/dist/SchoolSoft/index.d.ts +1 -0
  134. package/dist/Schoolity/txt/to/index.d.ts +1 -0
  135. package/dist/Schoolity/txt/to/schedules.js +5 -12
  136. package/dist/Schoolity/txt/to/schedules.js.map +1 -1
  137. package/dist/Skola24/mdb/from/course-and-events.js +3 -5
  138. package/dist/Skola24/mdb/from/course-and-events.js.map +1 -1
  139. package/dist/Skola24/mdb/from/groups.js.map +1 -1
  140. package/dist/Skola24/mdb/from/index.js.map +1 -1
  141. package/dist/Skola24/mdb/from/locations.js.map +1 -1
  142. package/dist/Skola24/mdb/from/schedule.d.ts +1 -0
  143. package/dist/Skola24/mdb/from/schedule.js.map +1 -1
  144. package/dist/Skola24/mdb/from/teachers.js.map +1 -1
  145. package/dist/Skola24/txt/from/calendar-exceptions.js +1 -2
  146. package/dist/Skola24/txt/from/calendar-exceptions.js.map +1 -1
  147. package/dist/Skola24/txt/from/division.js.map +1 -1
  148. package/dist/Skola24/txt/from/index.js.map +1 -1
  149. package/dist/Skola24/txt/from/period.js +31 -34
  150. package/dist/Skola24/txt/from/period.js.map +1 -1
  151. package/dist/Skola24/txt/from/schedules.d.ts +1 -0
  152. package/dist/Skola24/txt/from/schedules.js +6 -10
  153. package/dist/Skola24/txt/from/schedules.js.map +1 -1
  154. package/dist/Skola24/txt/from/util.js.map +1 -1
  155. package/dist/Skola24/txt/index.d.ts +1 -0
  156. package/dist/Skola24/txt/to/index.d.ts +1 -0
  157. package/dist/Skola24/txt/to/schedules.js +5 -12
  158. package/dist/Skola24/txt/to/schedules.js.map +1 -1
  159. package/dist/common/constants.js.map +1 -1
  160. package/dist/common/functions.js.map +1 -1
  161. package/dist/common/get-date.js.map +1 -1
  162. package/dist/common/make-chainable/index.js.map +1 -1
  163. package/dist/common/types.d.ts +1 -3
  164. package/dist/core/from/configurations.js.map +1 -1
  165. package/dist/core/from/courses.js.map +1 -1
  166. package/dist/core/from/events.js.map +1 -1
  167. package/dist/core/from/exceptions.js.map +1 -1
  168. package/dist/core/from/groups.js.map +1 -1
  169. package/dist/core/from/index.js.map +1 -1
  170. package/dist/core/from/locations.js.map +1 -1
  171. package/dist/core/from/locked-times.js.map +1 -1
  172. package/dist/core/from/overlap-groups.js.map +1 -1
  173. package/dist/core/from/periods.js.map +1 -1
  174. package/dist/core/from/persons.js.map +1 -1
  175. package/dist/core/from/root-intervals.js.map +1 -1
  176. package/dist/core/from/schedules.js.map +1 -1
  177. package/dist/core/from/settings.js.map +1 -1
  178. package/dist/core/from/syllabuses.js.map +1 -1
  179. package/dist/core/from/teachers.js.map +1 -1
  180. package/dist/core/index.d.ts +1 -0
  181. package/dist/core/interfaces/index.d.ts +23 -0
  182. package/dist/core/interfaces/other/companies.d.ts +1 -0
  183. package/dist/core/interfaces/other/companies.js.map +1 -1
  184. package/dist/core/interfaces/other/index.d.ts +6 -0
  185. package/dist/core/interfaces/other/operations.d.ts +1 -0
  186. package/dist/core/interfaces/vertices/companies.d.ts +1 -0
  187. package/dist/core/interfaces/vertices/configurations.d.ts +1 -0
  188. package/dist/core/interfaces/vertices/courses.d.ts +1 -0
  189. package/dist/core/interfaces/vertices/division-settings.d.ts +2 -0
  190. package/dist/core/interfaces/vertices/divisions.d.ts +1 -0
  191. package/dist/core/interfaces/vertices/events.d.ts +1 -0
  192. package/dist/core/interfaces/vertices/exceptions.d.ts +1 -0
  193. package/dist/core/interfaces/vertices/generations.d.ts +2 -0
  194. package/dist/core/interfaces/vertices/groups.d.ts +1 -0
  195. package/dist/core/interfaces/vertices/index.d.ts +1 -0
  196. package/dist/core/interfaces/vertices/locations.d.ts +1 -0
  197. package/dist/core/interfaces/vertices/locked-times.d.ts +2 -0
  198. package/dist/core/interfaces/vertices/overlap-groups.d.ts +1 -0
  199. package/dist/core/interfaces/vertices/periods.d.ts +3 -0
  200. package/dist/core/interfaces/vertices/persons.d.ts +1 -0
  201. package/dist/core/interfaces/vertices/properties/belongs-to.d.ts +1 -0
  202. package/dist/core/interfaces/vertices/properties/coalesced.d.ts +1 -0
  203. package/dist/core/interfaces/vertices/root-intervals.d.ts +2 -0
  204. package/dist/core/interfaces/vertices/syllabuses.d.ts +1 -0
  205. package/dist/core/interfaces/vertices/teachers.d.ts +1 -0
  206. package/dist/core/interfaces/vertices/threads.d.ts +6 -4
  207. package/dist/core/interfaces/vertices/users.d.ts +1 -0
  208. package/dist/core/interfaces/vertices/util/custom-vertex-export/index.d.ts +6 -6
  209. package/dist/core/interfaces/vertices/util/custom-vertex-export/util.d.ts +4 -4
  210. package/dist/core/interfaces/vertices/util/deep-vertex-export/index.d.ts +9 -9
  211. package/dist/core/interfaces/vertices/util/edges.d.ts +7 -7
  212. package/dist/core/interfaces/vertices/util/index.d.ts +6 -0
  213. package/dist/core/interfaces/vertices/util/util.d.ts +20 -24
  214. package/dist/core/interfaces/vertices/util/vertex-query/index.d.ts +11 -11
  215. package/dist/core/interfaces/vertices/util/vertex.d.ts +1 -1
  216. package/dist/core/interfaces/vertices/vertex-query.d.ts +27 -26
  217. package/dist/core/interfaces/vertices/vertex-query.js.map +1 -1
  218. package/dist/core/to/configurations.js +1 -2
  219. package/dist/core/to/configurations.js.map +1 -1
  220. package/dist/core/to/courses.js +1 -2
  221. package/dist/core/to/courses.js.map +1 -1
  222. package/dist/core/to/division.js.map +1 -1
  223. package/dist/core/to/events.js +1 -2
  224. package/dist/core/to/events.js.map +1 -1
  225. package/dist/core/to/exceptions.js +1 -2
  226. package/dist/core/to/exceptions.js.map +1 -1
  227. package/dist/core/to/groups.js +1 -2
  228. package/dist/core/to/groups.js.map +1 -1
  229. package/dist/core/to/locations.js +1 -2
  230. package/dist/core/to/locations.js.map +1 -1
  231. package/dist/core/to/locked-times.js +1 -2
  232. package/dist/core/to/locked-times.js.map +1 -1
  233. package/dist/core/to/overlap-groups.js +1 -2
  234. package/dist/core/to/overlap-groups.js.map +1 -1
  235. package/dist/core/to/periods.js +1 -2
  236. package/dist/core/to/periods.js.map +1 -1
  237. package/dist/core/to/persons.js +1 -2
  238. package/dist/core/to/persons.js.map +1 -1
  239. package/dist/core/to/root-intervals.js +1 -2
  240. package/dist/core/to/root-intervals.js.map +1 -1
  241. package/dist/core/to/schedules.d.ts +1 -0
  242. package/dist/core/to/schedules.js.map +1 -1
  243. package/dist/core/to/settings.js +1 -2
  244. package/dist/core/to/settings.js.map +1 -1
  245. package/dist/core/to/syllabuses.js +1 -2
  246. package/dist/core/to/syllabuses.js.map +1 -1
  247. package/dist/core/to/teachers.js +1 -2
  248. package/dist/core/to/teachers.js.map +1 -1
  249. package/dist/core/to/util.d.ts +2 -0
  250. package/dist/core/to/util.js +1 -2
  251. package/dist/core/to/util.js.map +1 -1
  252. package/dist/core/types/index.d.ts +6 -0
  253. package/dist/core/util.js +1 -2
  254. package/dist/core/util.js.map +1 -1
  255. package/dist/identify/constants/index.js.map +1 -1
  256. package/dist/identify/index.js +1 -2
  257. package/dist/identify/index.js.map +1 -1
  258. package/dist/sdui/from/classes.js.map +1 -1
  259. package/dist/sdui/from/courses.js.map +1 -1
  260. package/dist/sdui/from/holidays.js.map +1 -1
  261. package/dist/sdui/from/index.js.map +1 -1
  262. package/dist/sdui/from/lessons.js.map +1 -1
  263. package/dist/sdui/from/rooms.js.map +1 -1
  264. package/dist/sdui/from/schedules.d.ts +2 -0
  265. package/dist/sdui/from/schedules.js.map +1 -1
  266. package/dist/sdui/from/school-years.js.map +1 -1
  267. package/dist/sdui/from/substitution-plans.js.map +1 -1
  268. package/dist/sdui/from/teachers.js.map +1 -1
  269. package/dist/sdui/to/classes.js.map +1 -1
  270. package/dist/sdui/to/courses.js.map +1 -1
  271. package/dist/sdui/to/holidays.js.map +1 -1
  272. package/dist/sdui/to/hours.js.map +1 -1
  273. package/dist/sdui/to/index.d.ts +2 -0
  274. package/dist/sdui/to/lessons.js.map +1 -1
  275. package/dist/sdui/to/rooms.js.map +1 -1
  276. package/dist/sdui/to/schedules.js.map +1 -1
  277. package/dist/sdui/to/school-years.js.map +1 -1
  278. package/dist/sdui/to/substitution-plans.js +3 -6
  279. package/dist/sdui/to/substitution-plans.js.map +1 -1
  280. package/dist/sdui/to/teachers.js.map +1 -1
  281. package/dist/vKlass/from/index.js.map +1 -1
  282. package/dist/vKlass/from/schedule.d.ts +1 -0
  283. package/dist/vKlass/from/schedule.js.map +1 -1
  284. package/dist/vKlass/to/schedules.js +6 -17
  285. package/dist/vKlass/to/schedules.js.map +1 -1
  286. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"schedules.js","names":["t","teachers","g","groups","locations"],"sources":["../../../../src/Skola24/txt/to/schedules.ts"],"sourcesContent":["import Papa from 'papaparse';\nimport moment from 'moment';\nimport { isString } from 'lodash-es';\nimport type { Types as MongooseTypes } from 'mongoose';\nimport { isObjectIdOrHexString } from 'mongoose';\nimport type { CoreTypes } from '../../../core';\nimport type { BaseOptions } from '../../../common/types';\nimport { getVertexId } from '../../../core/util';\n\nconst papaOptions = {\n quotes: false, //or array of booleans\n quoteChar: '\"',\n escapeChar: '\"',\n delimiter: '\\t',\n header: true,\n newline: '\\r\\n',\n skipEmptyLines: false, //other option is 'greedy', meaning skip delimiters, quotes, and whitespace.\n // columns: null //or array of strings\n} as Papa.UnparseConfig;\n\nconst uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n\nexport default (\n data: CoreTypes.Mixed.Schedule,\n options: BaseOptions = {}\n): string => {\n const { locations, teachers, groups, persons, events, courses, periods, syllabuses, divisions } = data;\n const { start, /* end, */ displayName } = divisions ?? data as unknown as CoreTypes.Mixed.Division;\n\n const startYear = moment.utc(start).year();\n const startMonth = moment.utc(start).month();\n\n // Set cvs to the source section\n let csv = `[Source]${papaOptions.newline}ApplicationVerMajor=4${papaOptions.newline}ApplicationVerMinor=0${papaOptions.newline}DatabaseRevNo=527${papaOptions.newline}CurrentNovaschemDatabase=${papaOptions.newline}User=${papaOptions.newline}`;\n csv += `SchoolID=RS${papaOptions.newline}School=${displayName}${papaOptions.newline}County=RS${papaOptions.newline}`;\n csv += `BaseYear=${startYear}${papaOptions.newline}OffsetYear=0${papaOptions.newline}OffsetMonth=${startMonth}${papaOptions.newline}CreationDate=${moment().format('YYYY-MM-DD')}${papaOptions.newline}${papaOptions.newline}`;\n // add destination section to csv\n csv += `[Destination]${papaOptions.newline}Application=${papaOptions.newline}ApplicationID=${papaOptions.newline}${papaOptions.newline}`;\n\n // add database options to csv\n csv += `[DatabaseOptions]${papaOptions.newline}Update=TRUE${papaOptions.newline}AddNew=TRUE${papaOptions.newline}${papaOptions.newline}`;\n\n // start tables section\n csv += `[Tables]${papaOptions.newline}${papaOptions.newline}`;\n\n // append teachers to csv\n const t = teachers?.map(teacher => {\n return {\n 'Teacher (6001)': teacher.signature,\n 'GUID (5800)': (teacher.ids && uuid.test(teacher.ids)) ? `{${teacher.ids}}` : '',\n 'Category (6002)': '',\n 'Title (6006)': '',\n 'Phone (6033)': '',\n 'EvaluationNumber (6014)': '',\n ... 'person' in teacher && typeof teacher.person == 'object'\n ? {\n 'PersonalCode (6028)': 'SSN' in teacher.person ? (teacher.person?.SSN?.value ?? '') : '',\n 'LastName (6003)': 'lastName' in teacher.person ? (teacher.person?.lastName ?? '') : '',\n 'FirstName (6004)': 'firstName' in teacher.person ? (teacher.person?.firstName ?? '') : '',\n 'EMail (6034)': 'emails' in teacher.person ? (teacher.person?.emails?.[0]?.value ?? '') : '',\n }\n : null\n };\n }) ?? [];\n csv += `${papaOptions.newline}Teacher (6000)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (t.length) {\n csv += Papa.unparse(t, papaOptions);\n } else {\n csv += ['Teacher (6001)', 'GUID (5800)', 'Category (6002)', 'PersonalCode (6028)', 'LastName (6003)', 'Title (6006)', 'FirstName (6004)', 'Phone (6033)', 'EMail (6034)', 'EvaluationNumber (6014)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n // append students to csv\n const s = persons?.filter(person => {\n return person.type != 'Teacher';\n }).map(person => {\n return {\n 'Student (7201)': person.SSN?.value,\n 'GUID (5800)': (person.ids && uuid.test(person.ids)) ? `{${person.ids}}` : '',\n 'Category (7305)': '',\n 'LastName (7202)': person.lastName ?? '',\n 'FirstName (7211)': person.firstName ?? '',\n 'EMail (7215)': person.emails?.[0]?.value ?? ''\n };\n }) ?? [];\n csv += `${papaOptions.newline}Student (7200)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (s.length) {\n csv += Papa.unparse(s, papaOptions);\n } else {\n csv += ['Student (7201)', 'GUID (5800)', 'Category (7305)', 'LastName (7202)', 'FirstName (7211)', 'EMail (7215)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n // create a map of students.id to students.SSN\n const studentMap = new Map(persons?.filter(x => x.type != 'Teacher').map(x => [getVertexId(x, options), x.SSN?.value ?? '']));\n\n // append groups to csv\n const g = groups?.map(group => {\n return {\n 'Group (6201)': group.displayName!,\n 'GUID (5800)': (group.ids && uuid.test(group.ids)) ? `{${group.ids}}` : '',\n 'Class (6210)': group.species == 'class' ? 1 : 0,\n 'Teacher (6204)': '',\n 'IClass (6206)': '',\n 'Student (6205)': group.members?.map(x => getVertexId(x, options)).map(x => studentMap.get(x)).filter(Boolean).join(',')\n };\n }) ?? [];\n csv += `${papaOptions.newline}Group (6200)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (g.length) {\n csv += Papa.unparse(g, papaOptions);\n } else {\n csv += ['Group (6201)', 'GUID (5800)', 'Class (6210)', 'Teacher (6204)', 'IClass (6206)', 'Student (6205)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n // append locations to csv\n const l = locations?.map(location => {\n return {\n 'Room (6601)': location.displayName!,\n 'GUID (5800)': (location.ids && uuid.test(location.ids)) ? `{${location.ids}}` : '',\n 'Category (6602)': location.tags?.find(tag => tag.type == 'category')?.value ?? '',\n 'SeatingCapacity (6607)': location.maximumCapacity,\n };\n }) ?? [];\n csv += `${papaOptions.newline}Room (6600)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (l.length) {\n csv += Papa.unparse(l, papaOptions);\n } else {\n csv += ['Room (6601)', 'GUID (5800)', 'Category (6602)', 'SeatingCapacity (6607)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n // append periods to csv\n const p = periods?.map(period => {\n return {\n 'Period (8001)': period.displayName!,\n 'GUID (5800)': (period.ids && uuid.test(period.ids)) ? `{${period.ids}}` : '',\n 'TextBelowSchedule (8002)': period.displayName!,\n 'Category (8006)': '',\n 'Calendar (8005)': period.ranges?.map(range => `${moment.utc(range.start).format('D/M')}-${moment.utc(range.end).format('D/M')}`).join(', ')\n };\n }) ?? [];\n csv += `${papaOptions.newline}Period (8000)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (p.length) {\n csv += Papa.unparse(p, papaOptions);\n } else {\n csv += ['Period (8001)', 'GUID (5800)', 'TextBelowSchedule (8002)', 'Category (8006)', 'Calendar (8005)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n const courseMap = new Map(data.courses ?.map(x => [getVertexId(x, options), x]));\n const periodMap = new Map(data.periods ?.map(x => [getVertexId(x, options), x]));\n const teacherMap = new Map(data.teachers ?.map(x => [getVertexId(x, options), x]));\n const groupMap = new Map(data.groups ?.map(x => [getVertexId(x, options), x]));\n const locationMap = new Map(data.locations ?.map(x => [getVertexId(x, options), x]));\n const syllabusMap = new Map(data.syllabuses?.map(x => [getVertexId(x, options), x]));\n\n // append lessons to csv\n const e = events\n // ?.filter(x => !isNaN(Date.parse(x.start?.toString() ?? '')))\n .map((event, index) => {\n if (!event.start || !event.end) return;\n\n const courseId = event.course ? getVertexId(event.course, options) : undefined;\n const course = courseId ? courseMap.get(courseId) : undefined;\n\n // Only use deserialize period\n let period = event.period == null ? course?.period : event.period;\n if (isString(period))\n period = periodMap.get(period);\n if ((period && !('ranges' in period)))\n period = undefined;\n\n // Only use deserialize teachers\n const t = event.teachers == null ? course?.teachers : event.teachers;\n const teacherIds = t?.map(x => getVertexId(x.to, options));\n const teachers = teacherIds?.map(id => teacherMap.get(id)).filter(Boolean) ?? [];\n\n // Only use deserialize groups\n const g = event.groups == null ? course?.groups : event.groups;\n const groupIds = g?.map(x => getVertexId(x.to, options));\n const groups = groupIds?.map(id => groupMap.get(id)).filter(Boolean) ?? [];\n\n // Only use deserialize locations\n const locationIds = event.inLocations?.map(x => x ? getVertexId(x, options) : null).filter(x => x != null);\n const locations = locationIds?.map(id => locationMap.get(id)).filter(Boolean) ?? [];\n const dayOfWeek = moment.utc(event.start).toDate().toLocaleDateString('sv-SE', { weekday: 'long', timeZone: 'UTC' });\n\n // Syllabus of the course\n const syllabusId = isString(course?.syllabus) ? course.syllabus : (course?.syllabus && isObjectIdOrHexString(course?.syllabus)) ? (course?.syllabus as MongooseTypes.ObjectId | string).toString() : undefined;\n const syllabus = syllabusId ? syllabusMap.get(syllabusId) : course?.syllabus as CoreTypes.Deep.Syllabus | undefined;\n\n // capitalize first letter of dayOfWeek\n const dayOfWeekCapitalized = dayOfWeek.charAt(0).toUpperCase() + dayOfWeek.slice(1);\n return {\n 'PK (7100)': index + 1,\n 'GUID (5800)': (event.ids && uuid.test(event.ids)) ? `{${event.ids}}` : '',\n 'DayOfWeek (7101)': dayOfWeekCapitalized,\n 'Starttime (7102)': moment.utc(event.start).format('HH:mm'),\n 'Length (7115)': event.duration,\n 'Course (7106)': syllabus?.courseCode,\n 'Subject (7103)': syllabus?.subjectCode ?? course?.subject ?? '',\n 'Teacher (7104)': teachers ?.map(x => x?.signature ).filter(Boolean).join(','),\n 'Group (7105)': groups ?.map(x => x?.displayName).filter(Boolean).join(','),\n 'Room (7107)': locations?.map(x => x?.displayName).filter(Boolean).join(','),\n 'Period (7108)': '',\n 'Week (7109)': '',\n 'ActualWeeks (7167)': period?.ranges?.map(range => `${moment.utc(range.start).week()}-${moment.utc(range.end).week()}`).join(',')\n };\n }) ?? [];\n csv += `${papaOptions.newline}Lesson (7100)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (e.length) {\n csv += Papa.unparse(e, papaOptions);\n } else {\n csv += ['PK (7100)', 'GUID (5800)', 'DayOfWeek (7101)', 'Starttime (7102)', 'Length (7115)', 'Course (7106)', 'Subject (7103)', 'Period (7108)', 'Week (7109)', 'ActualWeeks (7167)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n // append subjects to csv, is empty for now\n // csv += `Subject (6400)${options.newline}[Rows]${options.newline}`;\n // csv += ['Subject (6401)', 'GUID (5800)', 'Category (6402)', 'FullText (6403)', 'BackgroundColor (6432)', 'TextColor (6433)', 'EvaluationNumber (6429)'].join(options.delimiter);\n // csv += options.newline;\n\n // append syllabus to csv\n const courseSyllabuses = syllabuses?.filter(syllabus => !!syllabus.courseName).map(syllabus => {\n return {\n 'Course (7601)': syllabus.courseCode,\n 'GUID (5800)': syllabus.ids,\n 'FullText (7602)': syllabus.courseName,\n 'Subject (7603)': syllabus.subjectCode ?? '',\n 'Points (7604)': syllabus.points\n };\n }) ?? [];\n csv += `${papaOptions.newline}Course (7600)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (courseSyllabuses.length) {\n csv += Papa.unparse(courseSyllabuses, papaOptions);\n } else {\n csv += ['PK (7100)', 'GUID (5800)', 'DayOfWeek (7101)', 'Starttime (7102)', 'Length (7115)', 'Course (7106)', 'Subject (7103)', 'Period (7108)', 'Week (7109)', 'ActualWeeks (7167)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n const subjectSyllabuses = syllabuses?.reduce((unique, syllabus) => {\n if (syllabus.subjectCode && !unique.seen.has(syllabus.subjectCode)) {\n unique.seen.add(syllabus.subjectCode);\n unique.result.push({\n 'Subject (6401)': syllabus.subjectCode,\n 'GUID (5800)': syllabus.ids,\n 'FullText (6403)': syllabus.subjectName,\n });\n }\n return unique;\n }, {\n seen: new Set<string>(),\n result: [] as Array<{\n 'Subject (6401)': string;\n 'GUID (5800)': string | undefined;\n 'FullText (6403)': string;\n }>\n })?.result ?? [];\n csv += `Subject (6400)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (subjectSyllabuses.length) {\n csv += Papa.unparse(subjectSyllabuses, papaOptions);\n } else {\n csv += ['Subject (6401)', 'GUID (5800)', 'Category (6402)', 'FullText (6403)', 'BackgroundColor (6432)', 'TextColor (6433)', 'EvaluationNumber (6429)'].join(papaOptions.delimiter);\n }\n\n const totalHoursRegex = /(\\d+) hrs/;\n const weekTimeRegex = /(\\d+) min\\/week/;\n const c = courses?.map(course => {\n // Only use deserialize teachers\n const teacherIds = course.teachers?.map(x => getVertexId(x.to, options)).filter(Boolean);\n const teachers = teacherIds?.map(id => teacherMap.get(id)!).filter(Boolean) ?? [];\n\n // Only use deserialize groups\n const groupIds = course.groups?.map(x => getVertexId(x.to, options)).filter(Boolean);\n const groups = groupIds?.map(id => groupMap.get(id)!).filter(Boolean) ?? [];\n\n // Only use deserialize syllabus\n const syllabusId = isString(course?.syllabus) ? course.syllabus : (course?.syllabus && isObjectIdOrHexString(course?.syllabus)) ? (course?.syllabus as MongooseTypes.ObjectId | string).toString() : undefined;\n const syllabus = syllabusId ? syllabusMap.get(syllabusId) : course?.syllabus as CoreTypes.Deep.Syllabus | undefined;\n\n return {\n 'PK (8200)': '',\n 'GUID (5800)': course.ids,\n 'OriginalRecord (8224)': '1',\n 'CreateLesson (8227)': '1',\n 'Course (8202)': syllabus?.courseCode,\n 'Subject (8209)': syllabus?.subjectCode ?? course.subject, // Nikos ansvarig för framtida buggar\n 'Teacher (8210)': teachers?.map(teacher => teacher.signature).filter(Boolean).join(','),\n 'Group (8203)': groups?.map(group => group.displayName).filter(Boolean).join(','),\n 'TotalHours (8204)': (course.plannedDuration && totalHoursRegex.test(course.plannedDuration)) ? totalHoursRegex.exec(course.plannedDuration)![1] : '',\n 'Weektime (8208)': (course.plannedDuration && weekTimeRegex.test(course.plannedDuration)) ? weekTimeRegex.exec(course.plannedDuration)![1] : '',\n 'Blockname (8215)': '',\n 'Period (8206)': '',\n 'Week (8207)': '',\n 'NotPeriod (8212)': '',\n 'NotWeek (8213)': ''\n };\n }) ?? [];\n csv += `${papaOptions.newline}TA (8200)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (c.length) {\n csv += Papa.unparse(c, papaOptions);\n } else {\n csv += ['Course (8202)', 'GUID (5800)', 'Subject (8209)', 'Teacher (8210)', 'Group (8203)', 'TotalHours (8204)', 'Weektime (8208)', 'Blockname (8215)', 'Period (8206)', 'Week (8207)', 'NotPeriod (8212)', 'NotWeek (8213)'].join(papaOptions.delimiter);\n }\n\n return csv;\n};"],"mappings":";;;;;;;AASA,M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IAAI,UAAU,OAAO;EAC9E,MAAME,WAAa,UAAU,KAAI,OAAM,SAAS,IAAI,KAAM,OAAO,YAAY;EAG7E,MAAM,aAAa,SAAS,QAAQ,YAAY,OAAO,WAAY,QAAQ,YAAY,sBAAsB,QAAQ,aAAc,QAAQ,UAA6C,aAAa;EACrM,MAAM,WAAW,aAAa,YAAY,IAAI,cAAc,QAAQ;AAEpE,SAAO;GACL,aAAyB;GACzB,eAAyB,OAAO;GAChC,yBAAyB;GACzB,uBAAyB;GACzB,iBAAyB,UAAU;GACnC,kBAAyB,UAAU,eAAe,OAAO;GACzD,kBAAyBF,YAAU,KAAI,YAAW,QAAQ,WAAW,OAAO,SAAS,KAAK;GAC1F,gBAAyBE,UAAQ,KAAI,UAAS,MAAM,aAAa,OAAO,SAAS,KAAK;GACtF,qBAA0B,OAAO,mBAAmB,gBAAgB,KAAK,OAAO,mBAAoB,gBAAgB,KAAK,OAAO,iBAAkB,KAAK;GACvJ,mBAA0B,OAAO,mBAAmB,cAAc,KAAK,OAAO,mBAAoB,cAAc,KAAK,OAAO,iBAAkB,KAAK;GACnJ,oBAAyB;GACzB,iBAAyB;GACzB,eAAyB;GACzB,oBAAyB;GACzB,kBAAyB;;OAEvB;AACN,QAAO,GAAG,YAAY,QAAQ,WAAW,YAAY,QAAQ,QAAQ,YAAY;AACjF,KAAI,EAAE,OACJ,QAAO,KAAK,QAAQ,GAAG;KAEvB,QAAO;EAAC;EAAiB;EAAe;EAAkB;EAAkB;EAAgB;EAAqB;EAAmB;EAAoB;EAAiB;EAAe;EAAoB;GAAkB,KAAK,YAAY;AAGjP,QAAO"}
1
+ {"version":3,"file":"schedules.js","names":["teachers","groups","locations"],"sources":["../../../../src/Skola24/txt/to/schedules.ts"],"sourcesContent":["import Papa from 'papaparse';\nimport moment from 'moment';\nimport { isString } from 'lodash-es';\nimport type { Types as MongooseTypes } from 'mongoose';\nimport { isObjectIdOrHexString } from 'mongoose';\nimport type { CoreTypes } from '../../../core';\nimport type { BaseOptions } from '../../../common/types';\nimport { getVertexId } from '../../../core/util';\n\nconst papaOptions = {\n quotes: false, //or array of booleans\n quoteChar: '\"',\n escapeChar: '\"',\n delimiter: '\\t',\n header: true,\n newline: '\\r\\n',\n skipEmptyLines: false, //other option is 'greedy', meaning skip delimiters, quotes, and whitespace.\n // columns: null //or array of strings\n} as Papa.UnparseConfig;\n\nconst uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n\nexport default (\n data: CoreTypes.Mixed.Schedule,\n options: BaseOptions = {}\n): string => {\n const { locations, teachers, groups, persons, events, courses, periods, syllabuses, divisions } = data;\n const { start, /* end, */ displayName } = divisions ?? data as unknown as CoreTypes.Mixed.Division;\n\n const startYear = moment.utc(start).year();\n const startMonth = moment.utc(start).month();\n\n // Set cvs to the source section\n let csv = `[Source]${papaOptions.newline}ApplicationVerMajor=4${papaOptions.newline}ApplicationVerMinor=0${papaOptions.newline}DatabaseRevNo=527${papaOptions.newline}CurrentNovaschemDatabase=${papaOptions.newline}User=${papaOptions.newline}`;\n csv += `SchoolID=RS${papaOptions.newline}School=${displayName}${papaOptions.newline}County=RS${papaOptions.newline}`;\n csv += `BaseYear=${startYear}${papaOptions.newline}OffsetYear=0${papaOptions.newline}OffsetMonth=${startMonth}${papaOptions.newline}CreationDate=${moment().format('YYYY-MM-DD')}${papaOptions.newline}${papaOptions.newline}`;\n // add destination section to csv\n csv += `[Destination]${papaOptions.newline}Application=${papaOptions.newline}ApplicationID=${papaOptions.newline}${papaOptions.newline}`;\n\n // add database options to csv\n csv += `[DatabaseOptions]${papaOptions.newline}Update=TRUE${papaOptions.newline}AddNew=TRUE${papaOptions.newline}${papaOptions.newline}`;\n\n // start tables section\n csv += `[Tables]${papaOptions.newline}${papaOptions.newline}`;\n\n // append teachers to csv\n const t = teachers?.map(teacher => {\n return {\n 'Teacher (6001)': teacher.signature,\n 'GUID (5800)': (teacher.ids && uuid.test(teacher.ids)) ? `{${teacher.ids}}` : '',\n 'Category (6002)': '',\n 'Title (6006)': '',\n 'Phone (6033)': '',\n 'EvaluationNumber (6014)': '',\n ... 'person' in teacher && typeof teacher.person == 'object'\n ? {\n 'PersonalCode (6028)': 'SSN' in teacher.person ? (teacher.person?.SSN?.value ?? '') : '',\n 'LastName (6003)': 'lastName' in teacher.person ? (teacher.person?.lastName ?? '') : '',\n 'FirstName (6004)': 'firstName' in teacher.person ? (teacher.person?.firstName ?? '') : '',\n 'EMail (6034)': 'emails' in teacher.person ? (teacher.person?.emails?.[0]?.value ?? '') : '',\n }\n : null\n };\n }) ?? [];\n csv += `${papaOptions.newline}Teacher (6000)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (t.length) {\n csv += Papa.unparse(t, papaOptions);\n } else {\n csv += ['Teacher (6001)', 'GUID (5800)', 'Category (6002)', 'PersonalCode (6028)', 'LastName (6003)', 'Title (6006)', 'FirstName (6004)', 'Phone (6033)', 'EMail (6034)', 'EvaluationNumber (6014)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n // append students to csv\n const s = persons?.filter(person => {\n return person.type != 'Teacher';\n }).map(person => {\n return {\n 'Student (7201)': person.SSN?.value,\n 'GUID (5800)': (person.ids && uuid.test(person.ids)) ? `{${person.ids}}` : '',\n 'Category (7305)': '',\n 'LastName (7202)': person.lastName ?? '',\n 'FirstName (7211)': person.firstName ?? '',\n 'EMail (7215)': person.emails?.[0]?.value ?? ''\n };\n }) ?? [];\n csv += `${papaOptions.newline}Student (7200)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (s.length) {\n csv += Papa.unparse(s, papaOptions);\n } else {\n csv += ['Student (7201)', 'GUID (5800)', 'Category (7305)', 'LastName (7202)', 'FirstName (7211)', 'EMail (7215)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n // create a map of students.id to students.SSN\n const studentMap = new Map(persons?.filter(x => x.type != 'Teacher').map(x => [getVertexId(x, options), x.SSN?.value ?? '']));\n\n // append groups to csv\n const g = groups?.map(group => {\n return {\n 'Group (6201)': group.displayName!,\n 'GUID (5800)': (group.ids && uuid.test(group.ids)) ? `{${group.ids}}` : '',\n 'Class (6210)': group.species == 'class' ? 1 : 0,\n 'Teacher (6204)': '',\n 'IClass (6206)': '',\n 'Student (6205)': group.members?.map(x => getVertexId(x, options)).map(x => studentMap.get(x)).filter(Boolean).join(',')\n };\n }) ?? [];\n csv += `${papaOptions.newline}Group (6200)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (g.length) {\n csv += Papa.unparse(g, papaOptions);\n } else {\n csv += ['Group (6201)', 'GUID (5800)', 'Class (6210)', 'Teacher (6204)', 'IClass (6206)', 'Student (6205)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n // append locations to csv\n const l = locations?.map(location => {\n return {\n 'Room (6601)': location.displayName!,\n 'GUID (5800)': (location.ids && uuid.test(location.ids)) ? `{${location.ids}}` : '',\n 'Category (6602)': location.tags?.find(tag => tag.type == 'category')?.value ?? '',\n 'SeatingCapacity (6607)': location.maximumCapacity,\n };\n }) ?? [];\n csv += `${papaOptions.newline}Room (6600)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (l.length) {\n csv += Papa.unparse(l, papaOptions);\n } else {\n csv += ['Room (6601)', 'GUID (5800)', 'Category (6602)', 'SeatingCapacity (6607)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n // append periods to csv\n const p = periods?.map(period => {\n return {\n 'Period (8001)': period.displayName!,\n 'GUID (5800)': (period.ids && uuid.test(period.ids)) ? `{${period.ids}}` : '',\n 'TextBelowSchedule (8002)': period.displayName!,\n 'Category (8006)': '',\n 'Calendar (8005)': period.ranges?.map(range => `${moment.utc(range.start).format('D/M')}-${moment.utc(range.end).format('D/M')}`).join(', ')\n };\n }) ?? [];\n csv += `${papaOptions.newline}Period (8000)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (p.length) {\n csv += Papa.unparse(p, papaOptions);\n } else {\n csv += ['Period (8001)', 'GUID (5800)', 'TextBelowSchedule (8002)', 'Category (8006)', 'Calendar (8005)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n const courseMap = new Map(data.courses ?.map(x => [getVertexId(x, options), x]));\n const periodMap = new Map(data.periods ?.map(x => [getVertexId(x, options), x]));\n const teacherMap = new Map(data.teachers ?.map(x => [getVertexId(x, options), x]));\n const groupMap = new Map(data.groups ?.map(x => [getVertexId(x, options), x]));\n const locationMap = new Map(data.locations ?.map(x => [getVertexId(x, options), x]));\n const syllabusMap = new Map(data.syllabuses?.map(x => [getVertexId(x, options), x]));\n\n // append lessons to csv\n const e = events\n // ?.filter(x => !isNaN(Date.parse(x.start?.toString() ?? '')))\n .map((event, index) => {\n if (!event.start || !event.end) return;\n\n const courseId = event.course ? getVertexId(event.course, options) : undefined;\n const course = courseId ? courseMap.get(courseId) : undefined;\n\n // Only use deserialize period\n let period = event.period == null ? course?.period : event.period;\n if (isString(period))\n period = periodMap.get(period);\n if ((period && !('ranges' in period)))\n period = undefined;\n\n // Only use deserialize teachers\n const t = event.teachers == null ? course?.teachers : event.teachers;\n const teacherIds = t?.map(x => getVertexId(x.to, options));\n const teachers = teacherIds?.map(id => teacherMap.get(id)).filter(Boolean) ?? [];\n\n // Only use deserialize groups\n const g = event.groups == null ? course?.groups : event.groups;\n const groupIds = g?.map(x => getVertexId(x.to, options));\n const groups = groupIds?.map(id => groupMap.get(id)).filter(Boolean) ?? [];\n\n // Only use deserialize locations\n const locationIds = event.inLocations?.map(x => x ? getVertexId(x, options) : null).filter(x => x != null);\n const locations = locationIds?.map(id => locationMap.get(id)).filter(Boolean) ?? [];\n const dayOfWeek = moment.utc(event.start).toDate().toLocaleDateString('sv-SE', { weekday: 'long', timeZone: 'UTC' });\n\n // Syllabus of the course\n const syllabusId = isString(course?.syllabus) ? course.syllabus : (course?.syllabus && isObjectIdOrHexString(course?.syllabus)) ? (course?.syllabus as MongooseTypes.ObjectId | string).toString() : undefined;\n const syllabus = syllabusId ? syllabusMap.get(syllabusId) : course?.syllabus as CoreTypes.Deep.Syllabus | undefined;\n\n // capitalize first letter of dayOfWeek\n const dayOfWeekCapitalized = dayOfWeek.charAt(0).toUpperCase() + dayOfWeek.slice(1);\n return {\n 'PK (7100)': index + 1,\n 'GUID (5800)': (event.ids && uuid.test(event.ids)) ? `{${event.ids}}` : '',\n 'DayOfWeek (7101)': dayOfWeekCapitalized,\n 'Starttime (7102)': moment.utc(event.start).format('HH:mm'),\n 'Length (7115)': event.duration,\n 'Course (7106)': syllabus?.courseCode,\n 'Subject (7103)': syllabus?.subjectCode ?? course?.subject ?? '',\n 'Teacher (7104)': teachers ?.map(x => x?.signature ).filter(Boolean).join(','),\n 'Group (7105)': groups ?.map(x => x?.displayName).filter(Boolean).join(','),\n 'Room (7107)': locations?.map(x => x?.displayName).filter(Boolean).join(','),\n 'Period (7108)': '',\n 'Week (7109)': '',\n 'ActualWeeks (7167)': period?.ranges?.map(range => `${moment.utc(range.start).week()}-${moment.utc(range.end).week()}`).join(',')\n };\n }) ?? [];\n csv += `${papaOptions.newline}Lesson (7100)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (e.length) {\n csv += Papa.unparse(e, papaOptions);\n } else {\n csv += ['PK (7100)', 'GUID (5800)', 'DayOfWeek (7101)', 'Starttime (7102)', 'Length (7115)', 'Course (7106)', 'Subject (7103)', 'Period (7108)', 'Week (7109)', 'ActualWeeks (7167)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n // append subjects to csv, is empty for now\n // csv += `Subject (6400)${options.newline}[Rows]${options.newline}`;\n // csv += ['Subject (6401)', 'GUID (5800)', 'Category (6402)', 'FullText (6403)', 'BackgroundColor (6432)', 'TextColor (6433)', 'EvaluationNumber (6429)'].join(options.delimiter);\n // csv += options.newline;\n\n // append syllabus to csv\n const courseSyllabuses = syllabuses?.filter(syllabus => !!syllabus.courseName).map(syllabus => {\n return {\n 'Course (7601)': syllabus.courseCode,\n 'GUID (5800)': syllabus.ids,\n 'FullText (7602)': syllabus.courseName,\n 'Subject (7603)': syllabus.subjectCode ?? '',\n 'Points (7604)': syllabus.points\n };\n }) ?? [];\n csv += `${papaOptions.newline}Course (7600)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (courseSyllabuses.length) {\n csv += Papa.unparse(courseSyllabuses, papaOptions);\n } else {\n csv += ['PK (7100)', 'GUID (5800)', 'DayOfWeek (7101)', 'Starttime (7102)', 'Length (7115)', 'Course (7106)', 'Subject (7103)', 'Period (7108)', 'Week (7109)', 'ActualWeeks (7167)'].join(papaOptions.delimiter);\n }\n csv += papaOptions.newline;\n\n const subjectSyllabuses = syllabuses?.reduce((unique, syllabus) => {\n if (syllabus.subjectCode && !unique.seen.has(syllabus.subjectCode)) {\n unique.seen.add(syllabus.subjectCode);\n unique.result.push({\n 'Subject (6401)': syllabus.subjectCode,\n 'GUID (5800)': syllabus.ids,\n 'FullText (6403)': syllabus.subjectName,\n });\n }\n return unique;\n }, {\n seen: new Set<string>(),\n result: [] as Array<{\n 'Subject (6401)': string;\n 'GUID (5800)': string | undefined;\n 'FullText (6403)': string;\n }>\n })?.result ?? [];\n csv += `Subject (6400)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (subjectSyllabuses.length) {\n csv += Papa.unparse(subjectSyllabuses, papaOptions);\n } else {\n csv += ['Subject (6401)', 'GUID (5800)', 'Category (6402)', 'FullText (6403)', 'BackgroundColor (6432)', 'TextColor (6433)', 'EvaluationNumber (6429)'].join(papaOptions.delimiter);\n }\n\n const totalHoursRegex = /(\\d+) hrs/;\n const weekTimeRegex = /(\\d+) min\\/week/;\n const c = courses?.map(course => {\n // Only use deserialize teachers\n const teacherIds = course.teachers?.map(x => getVertexId(x.to, options)).filter(Boolean);\n const teachers = teacherIds?.map(id => teacherMap.get(id)!).filter(Boolean) ?? [];\n\n // Only use deserialize groups\n const groupIds = course.groups?.map(x => getVertexId(x.to, options)).filter(Boolean);\n const groups = groupIds?.map(id => groupMap.get(id)!).filter(Boolean) ?? [];\n\n // Only use deserialize syllabus\n const syllabusId = isString(course?.syllabus) ? course.syllabus : (course?.syllabus && isObjectIdOrHexString(course?.syllabus)) ? (course?.syllabus as MongooseTypes.ObjectId | string).toString() : undefined;\n const syllabus = syllabusId ? syllabusMap.get(syllabusId) : course?.syllabus as CoreTypes.Deep.Syllabus | undefined;\n\n return {\n 'PK (8200)': '',\n 'GUID (5800)': course.ids,\n 'OriginalRecord (8224)': '1',\n 'CreateLesson (8227)': '1',\n 'Course (8202)': syllabus?.courseCode,\n 'Subject (8209)': syllabus?.subjectCode ?? course.subject, // Nikos ansvarig för framtida buggar\n 'Teacher (8210)': teachers?.map(teacher => teacher.signature).filter(Boolean).join(','),\n 'Group (8203)': groups?.map(group => group.displayName).filter(Boolean).join(','),\n 'TotalHours (8204)': (course.plannedDuration && totalHoursRegex.test(course.plannedDuration)) ? totalHoursRegex.exec(course.plannedDuration)![1] : '',\n 'Weektime (8208)': (course.plannedDuration && weekTimeRegex.test(course.plannedDuration)) ? weekTimeRegex.exec(course.plannedDuration)![1] : '',\n 'Blockname (8215)': '',\n 'Period (8206)': '',\n 'Week (8207)': '',\n 'NotPeriod (8212)': '',\n 'NotWeek (8213)': ''\n };\n }) ?? [];\n csv += `${papaOptions.newline}TA (8200)${papaOptions.newline}[Rows]${papaOptions.newline}`;\n if (c.length) {\n csv += Papa.unparse(c, papaOptions);\n } else {\n csv += ['Course (8202)', 'GUID (5800)', 'Subject (8209)', 'Teacher (8210)', 'Group (8203)', 'TotalHours (8204)', 'Weektime (8208)', 'Blockname (8215)', 'Period (8206)', 'Week (8207)', 'NotPeriod (8212)', 'NotWeek (8213)'].join(papaOptions.delimiter);\n }\n\n return csv;\n};"],"mappings":";;;;;;;AASA,MAAM,cAAc;CAClB,QAAgB;CAChB,WAAgB;CAChB,YAAgB;CAChB,WAAgB;CAChB,QAAgB;CAChB,SAAgB;CAChB,gBAAgB;CAEjB;AAED,MAAM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AW,QAAQ,UAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;GAC9F,gBAAyBC,UAAQ,KAAI,UAAS,MAAM,YAAY,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;GAC1F,qBAA0B,OAAO,mBAAmB,gBAAgB,KAAK,OAAO,gBAAgB,GAAI,gBAAgB,KAAK,OAAO,gBAAgB,CAAE,KAAK;GACvJ,mBAA0B,OAAO,mBAAmB,cAAc,KAAK,OAAO,gBAAgB,GAAI,cAAc,KAAK,OAAO,gBAAgB,CAAE,KAAK;GACnJ,oBAAyB;GACzB,iBAAyB;GACzB,eAAyB;GACzB,oBAAyB;GACzB,kBAAyB;GAC1B;GACD,IAAI,EAAE;AACR,QAAO,GAAG,YAAY,QAAQ,WAAW,YAAY,QAAQ,QAAQ,YAAY;AACjF,KAAI,EAAE,OACJ,QAAO,KAAK,QAAQ,GAAG,YAAY;KAEnC,QAAO;EAAC;EAAiB;EAAe;EAAkB;EAAkB;EAAgB;EAAqB;EAAmB;EAAoB;EAAiB;EAAe;EAAoB;EAAiB,CAAC,KAAK,YAAY,UAAU;AAG3P,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../../src/common/constants.ts"],"sourcesContent":["import moment from 'moment';\n\nexport const Constants = {\n FIRST_DAY: moment.utc('1970-01-05')\n};"],"mappings":";;;AAEA,MAAa,YAAY,EACvB,WAAW,OAAO,IAAI"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../../src/common/constants.ts"],"sourcesContent":["import moment from 'moment';\n\nexport const Constants = {\n FIRST_DAY: moment.utc('1970-01-05')\n};"],"mappings":";;;AAEA,MAAa,YAAY,EACvB,WAAW,OAAO,IAAI,aAAa,EACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"functions.js","names":["MongooseTypes","range"],"sources":["../../src/common/functions.ts"],"sourcesContent":["import moment from 'moment';\nimport type { DateType } from './types';\nimport { Types as MongooseTypes } from 'mongoose';\n\nexport function toISOString (\n date: DateType | null | undefined\n): string | null {\n if (typeof date === 'string') return date;\n if (date instanceof Date ) return date.toISOString();\n if (moment.isMoment(date) ) return date.toISOString();\n return null;\n}\n\n\n/**\n * Check if value is a Mongoose ObjectId.\n */\nexport function isMongooseObjectId (value: unknown): value is MongooseTypes.ObjectId {\n return value instanceof MongooseTypes.ObjectId;\n}\n\nexport type Range = {\n start: moment.Moment;\n end: moment.Moment;\n};\n\nexport namespace range {\n export type Type = Range;\n\n /**\n * Create a date range.\n */\n export function create (start: DateType, end: DateType): Range {\n return {\n start: moment(start),\n end: moment(end ),\n };\n }\n\n /**\n * Clone a date range.\n */\n export function clone (range: Range): Range {\n return {\n start: range.start.clone(),\n end: range.end .clone(),\n };\n }\n\n /**\n * Check if a date is contained within a date range.\n */\n export function contains (range: Range, date: moment.Moment) {\n return !date.isBefore(range.start) && !date.isAfter(range.end);\n }\n\n /**\n * Check if two date ranges overlap.\n */\n export function overlaps (a: Range, b: Range): boolean;\n /**\n * Checks if there is any overlap between two arrays of date ranges.\n */\n export function overlaps (a: Range[], b: Range[]): boolean;\n export function overlaps (a: Range | Range[], b: Range | Range[]) {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.some(x => b.some(y => overlaps(x, y)));\n }\n if (!Array.isArray(a) && !Array.isArray(b)) {\n return !(a.end.isBefore(b.start) || a.start.isAfter(b.end));\n }\n throw new Error('Invalid arguments for range.overlaps');\n }\n\n\n\n /**\n * Check if two date ranges are equal.\n */\n export function isEqual (a: Range, b: Range) {\n return a.start.isSame(b.start) && a.end.isSame(b.end);\n }\n\n /**\n * Get intersection of two ranges, or null if they do not overlap.\n */\n export function intersect (a: Range, b: Range): Range | null {\n const start = moment.max(a.start, b.start);\n const end = moment.min(a.end, b.end );\n if (start.isAfter(end)) return null;\n return { start, end };\n }\n}"],"mappings":";;;;AAIA,SAAgB,YACd,MACe;AACf,KAAI,OAAO,SAAS,SAAU,QAAO;AACrC,KAAI,gBAAgB,KAAU,QAAO,KAAK;AAC1C,KAAI,OAAO,SAAS,MAAU,QAAO,KAAK;AAC1C,QAAO;;;;;AAOT,SAAgB,mBAAoB,OAAiD;AACnF,QAAO,iBAAiBA,MAAc;;;;CAc/B,SAAS,OAAQ,OAAiB,KAAsB;AAC7D,SAAO;GACL,OAAO,OAAO;GACd,KAAO,OAAO;;;;CAOX,SAAS,MAAO,SAAqB;AAC1C,SAAO;GACL,OAAOC,QAAM,MAAM;GACnB,KAAOA,QAAM,IAAM;;;;CAOhB,SAAS,SAAU,SAAc,MAAqB;AAC3D,SAAO,CAAC,KAAK,SAASA,QAAM,UAAU,CAAC,KAAK,QAAQA,QAAM;;;CAWrD,SAAS,SAAU,GAAoB,GAAoB;AAChE,MAAI,MAAM,QAAQ,MAAM,MAAM,QAAQ,GACpC,QAAO,EAAE,MAAK,MAAK,EAAE,MAAK,MAAK,SAAS,GAAG;AAE7C,MAAI,CAAC,MAAM,QAAQ,MAAM,CAAC,MAAM,QAAQ,GACtC,QAAO,EAAE,EAAE,IAAI,SAAS,EAAE,UAAU,EAAE,MAAM,QAAQ,EAAE;AAExD,QAAM,IAAI,MAAM;;;CAQX,SAAS,QAAS,GAAU,GAAU;AAC3C,SAAO,EAAE,MAAM,OAAO,EAAE,UAAU,EAAE,IAAI,OAAO,EAAE;;;CAM5C,SAAS,UAAW,GAAU,GAAwB;EAC3D,MAAM,QAAQ,OAAO,IAAI,EAAE,OAAO,EAAE;EACpC,MAAM,MAAQ,OAAO,IAAI,EAAE,KAAO,EAAE;AACpC,MAAI,MAAM,QAAQ,KAAM,QAAO;AAC/B,SAAO;GAAE;GAAO"}
1
+ {"version":3,"file":"functions.js","names":["MongooseTypes","range"],"sources":["../../src/common/functions.ts"],"sourcesContent":["import moment from 'moment';\nimport type { DateType } from './types';\nimport { Types as MongooseTypes } from 'mongoose';\n\nexport function toISOString (\n date: DateType | null | undefined\n): string | null {\n if (typeof date === 'string') return date;\n if (date instanceof Date ) return date.toISOString();\n if (moment.isMoment(date) ) return date.toISOString();\n return null;\n}\n\n\n/**\n * Check if value is a Mongoose ObjectId.\n */\nexport function isMongooseObjectId (value: unknown): value is MongooseTypes.ObjectId {\n return value instanceof MongooseTypes.ObjectId;\n}\n\nexport type Range = {\n start: moment.Moment;\n end: moment.Moment;\n};\n\nexport namespace range {\n export type Type = Range;\n\n /**\n * Create a date range.\n */\n export function create (start: DateType, end: DateType): Range {\n return {\n start: moment(start),\n end: moment(end ),\n };\n }\n\n /**\n * Clone a date range.\n */\n export function clone (range: Range): Range {\n return {\n start: range.start.clone(),\n end: range.end .clone(),\n };\n }\n\n /**\n * Check if a date is contained within a date range.\n */\n export function contains (range: Range, date: moment.Moment) {\n return !date.isBefore(range.start) && !date.isAfter(range.end);\n }\n\n /**\n * Check if two date ranges overlap.\n */\n export function overlaps (a: Range, b: Range): boolean;\n /**\n * Checks if there is any overlap between two arrays of date ranges.\n */\n export function overlaps (a: Range[], b: Range[]): boolean;\n export function overlaps (a: Range | Range[], b: Range | Range[]) {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.some(x => b.some(y => overlaps(x, y)));\n }\n if (!Array.isArray(a) && !Array.isArray(b)) {\n return !(a.end.isBefore(b.start) || a.start.isAfter(b.end));\n }\n throw new Error('Invalid arguments for range.overlaps');\n }\n\n\n\n /**\n * Check if two date ranges are equal.\n */\n export function isEqual (a: Range, b: Range) {\n return a.start.isSame(b.start) && a.end.isSame(b.end);\n }\n\n /**\n * Get intersection of two ranges, or null if they do not overlap.\n */\n export function intersect (a: Range, b: Range): Range | null {\n const start = moment.max(a.start, b.start);\n const end = moment.min(a.end, b.end );\n if (start.isAfter(end)) return null;\n return { start, end };\n }\n}"],"mappings":";;;;AAIA,SAAgB,YACd,MACe;AACf,KAAI,OAAO,SAAS,SAAU,QAAO;AACrC,KAAI,gBAAgB,KAAU,QAAO,KAAK,aAAa;AACvD,KAAI,OAAO,SAAS,KAAK,CAAK,QAAO,KAAK,aAAa;AACvD,QAAO;;;;;AAOT,SAAgB,mBAAoB,OAAiD;AACnF,QAAO,iBAAiBA,MAAc;;;;CAc/B,SAAS,OAAQ,OAAiB,KAAsB;AAC7D,SAAO;GACL,OAAO,OAAO,MAAM;GACpB,KAAO,OAAO,IAAM;GACrB;;;CAMI,SAAS,MAAO,SAAqB;AAC1C,SAAO;GACL,OAAOC,QAAM,MAAM,OAAO;GAC1B,KAAOA,QAAM,IAAM,OAAO;GAC3B;;;CAMI,SAAS,SAAU,SAAc,MAAqB;AAC3D,SAAO,CAAC,KAAK,SAASA,QAAM,MAAM,IAAI,CAAC,KAAK,QAAQA,QAAM,IAAI;;;CAWzD,SAAS,SAAU,GAAoB,GAAoB;AAChE,MAAI,MAAM,QAAQ,EAAE,IAAI,MAAM,QAAQ,EAAE,CACtC,QAAO,EAAE,MAAK,MAAK,EAAE,MAAK,MAAK,SAAS,GAAG,EAAE,CAAC,CAAC;AAEjD,MAAI,CAAC,MAAM,QAAQ,EAAE,IAAI,CAAC,MAAM,QAAQ,EAAE,CACxC,QAAO,EAAE,EAAE,IAAI,SAAS,EAAE,MAAM,IAAI,EAAE,MAAM,QAAQ,EAAE,IAAI;AAE5D,QAAM,IAAI,MAAM,uCAAuC;;;CAQlD,SAAS,QAAS,GAAU,GAAU;AAC3C,SAAO,EAAE,MAAM,OAAO,EAAE,MAAM,IAAI,EAAE,IAAI,OAAO,EAAE,IAAI;;;CAMhD,SAAS,UAAW,GAAU,GAAwB;EAC3D,MAAM,QAAQ,OAAO,IAAI,EAAE,OAAO,EAAE,MAAM;EAC1C,MAAM,MAAQ,OAAO,IAAI,EAAE,KAAO,EAAE,IAAM;AAC1C,MAAI,MAAM,QAAQ,IAAI,CAAE,QAAO;AAC/B,SAAO;GAAE;GAAO;GAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-date.js","names":[],"sources":["../../src/common/get-date.ts"],"sourcesContent":["import type { Moment } from 'moment';\nimport type { CoreTypes } from '../core';\nimport { Constants } from './constants';\n\nexport default (day: number | CoreTypes.day, time: string): Moment => {\n if (day == null) throw new Error('Day is null or undefined');\n\n const _day = typeof day == 'number' ? day : day.day;\n const [hours, minutes] = time.split(':').map(x => parseInt(x));\n\n const date = Constants.FIRST_DAY.clone()\n .add(_day, 'day')\n .set('hour', hours)\n .set('minute', minutes);\n\n if (!date.isValid()) throw new Error(`Day ${ _day } and time ${ time } is not a valid date`);\n\n return date;\n};"],"mappings":";;;AAIA,wBAAgB,KAA6B,SAAyB;AACpE,KAAI,OAAO,KAAM,OAAM,IAAI,MAAM;CAEjC,MAAM,OAAO,OAAO,OAAO,WAAW,MAAM,IAAI;CAChD,MAAM,CAAC,OAAO,WAAW,KAAK,MAAM,KAAK,KAAI,MAAK,SAAS;CAE3D,MAAM,OAAO,UAAU,UAAU,QAC9B,IAAI,MAAM,OACV,IAAI,QAAQ,OACZ,IAAI,UAAU;AAEjB,KAAI,CAAC,KAAK,UAAW,OAAM,IAAI,MAAM,OAAQ,KAAM,YAAa,KAAM;AAEtE,QAAO"}
1
+ {"version":3,"file":"get-date.js","names":[],"sources":["../../src/common/get-date.ts"],"sourcesContent":["import type { Moment } from 'moment';\nimport type { CoreTypes } from '../core';\nimport { Constants } from './constants';\n\nexport default (day: number | CoreTypes.day, time: string): Moment => {\n if (day == null) throw new Error('Day is null or undefined');\n\n const _day = typeof day == 'number' ? day : day.day;\n const [hours, minutes] = time.split(':').map(x => parseInt(x));\n\n const date = Constants.FIRST_DAY.clone()\n .add(_day, 'day')\n .set('hour', hours)\n .set('minute', minutes);\n\n if (!date.isValid()) throw new Error(`Day ${ _day } and time ${ time } is not a valid date`);\n\n return date;\n};"],"mappings":";;;AAIA,wBAAgB,KAA6B,SAAyB;AACpE,KAAI,OAAO,KAAM,OAAM,IAAI,MAAM,2BAA2B;CAE5D,MAAM,OAAO,OAAO,OAAO,WAAW,MAAM,IAAI;CAChD,MAAM,CAAC,OAAO,WAAW,KAAK,MAAM,IAAI,CAAC,KAAI,MAAK,SAAS,EAAE,CAAC;CAE9D,MAAM,OAAO,UAAU,UAAU,OAAO,CACrC,IAAI,MAAM,MAAM,CAChB,IAAI,QAAQ,MAAM,CAClB,IAAI,UAAU,QAAQ;AAEzB,KAAI,CAAC,KAAK,SAAS,CAAE,OAAM,IAAI,MAAM,OAAQ,KAAM,YAAa,KAAM,sBAAsB;AAE5F,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_value: T"],"sources":["../../../src/common/make-chainable/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-explicit-any */\ntype Fn<In, Out> = (x: In) => Out;\n\nclass Chainable<T> {\n constructor (private _value: T) {}\n\n get value () { return this._value }\n\n chain (): Chainable<T>;\n chain<A1>(fn1: Fn<T, A1>): Chainable<A1>;\n chain<A1, A2>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>): Chainable<A2>;\n chain<A1, A2, A3>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>): Chainable<A3>;\n chain<A1, A2, A3, A4>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>): Chainable<A4>;\n chain<A1, A2, A3, A4, A5>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>): Chainable<A5>;\n chain<A1, A2, A3, A4, A5, A6>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>): Chainable<A6>;\n chain<A1, A2, A3, A4, A5, A6, A7>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>): Chainable<A7>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>): Chainable<A8>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8, A9>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>, fn9: Fn<A8, A9>): Chainable<A9>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8, A9>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>, fn9: Fn<A8, A9>, ...fns: Fn<any, any>[]): Chainable<unknown>;\n chain (...fns: Fn<any, any>[]): Chainable<any> {\n if (fns.length === 0) return this;\n return new Chainable(fns.reduce((prev, fn) => fn(prev), this.value));\n }\n}\n\n/**\n * Wraps a value in a Chainable to build a strongly-typed function pipeline with .chain().\n * Each chained function is applied in order, and the final result is available via .value.\n *\n * @param x - The value to wrap.\n * @returns A Chainable<T> around the given value.\n *\n * @example\n * const result = makeChainable([1, 2, 3])\n * .chain(\n * xs => xs.map(x => x * 2)), // [2, 4, 6]\n * xs => xs.reduce((acc, x) => acc + x, 0) // 12\n * );\n *\n * console.log(result.value); // 12\n */\nexport function makeChainable<T> (x: T) { return new Chainable(x) }\n"],"mappings":";AAIA,IAAM,YAAN,MAAM,UAAa;CACjB,YAAa,AAAQA,QAAW;EAAX;;CAErB,IAAI,QAAS;AAAE,SAAO,KAAK;;CAa3B,MAAO,GAAG,KAAqC;AAC7C,MAAI,IAAI,WAAW,EAAG,QAAO;AAC7B,SAAO,IAAI,UAAU,IAAI,QAAQ,MAAM,OAAO,GAAG,OAAO,KAAK;;;;;;;;;;;;;;;;;;;AAoBjE,SAAgB,cAAkB,GAAM;AAAE,QAAO,IAAI,UAAU"}
1
+ {"version":3,"file":"index.js","names":["_value: T"],"sources":["../../../src/common/make-chainable/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-explicit-any */\ntype Fn<In, Out> = (x: In) => Out;\n\nclass Chainable<T> {\n constructor (private _value: T) {}\n\n get value () { return this._value }\n\n chain (): Chainable<T>;\n chain<A1>(fn1: Fn<T, A1>): Chainable<A1>;\n chain<A1, A2>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>): Chainable<A2>;\n chain<A1, A2, A3>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>): Chainable<A3>;\n chain<A1, A2, A3, A4>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>): Chainable<A4>;\n chain<A1, A2, A3, A4, A5>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>): Chainable<A5>;\n chain<A1, A2, A3, A4, A5, A6>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>): Chainable<A6>;\n chain<A1, A2, A3, A4, A5, A6, A7>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>): Chainable<A7>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>): Chainable<A8>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8, A9>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>, fn9: Fn<A8, A9>): Chainable<A9>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8, A9>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>, fn9: Fn<A8, A9>, ...fns: Fn<any, any>[]): Chainable<unknown>;\n chain (...fns: Fn<any, any>[]): Chainable<any> {\n if (fns.length === 0) return this;\n return new Chainable(fns.reduce((prev, fn) => fn(prev), this.value));\n }\n}\n\n/**\n * Wraps a value in a Chainable to build a strongly-typed function pipeline with .chain().\n * Each chained function is applied in order, and the final result is available via .value.\n *\n * @param x - The value to wrap.\n * @returns A Chainable<T> around the given value.\n *\n * @example\n * const result = makeChainable([1, 2, 3])\n * .chain(\n * xs => xs.map(x => x * 2)), // [2, 4, 6]\n * xs => xs.reduce((acc, x) => acc + x, 0) // 12\n * );\n *\n * console.log(result.value); // 12\n */\nexport function makeChainable<T> (x: T) { return new Chainable(x) }\n"],"mappings":";AAIA,IAAM,YAAN,MAAM,UAAa;CACjB,YAAa,AAAQA,QAAW;EAAX;;CAErB,IAAI,QAAS;AAAE,SAAO,KAAK;;CAa3B,MAAO,GAAG,KAAqC;AAC7C,MAAI,IAAI,WAAW,EAAG,QAAO;AAC7B,SAAO,IAAI,UAAU,IAAI,QAAQ,MAAM,OAAO,GAAG,KAAK,EAAE,KAAK,MAAM,CAAC;;;;;;;;;;;;;;;;;;;AAoBxE,SAAgB,cAAkB,GAAM;AAAE,QAAO,IAAI,UAAU,EAAE"}
@@ -1,4 +1,5 @@
1
1
  import { IdKey } from "../core/types/common/index.js";
2
+ import "../core/index.js";
2
3
  import { Moment } from "moment";
3
4
 
4
5
  //#region src/common/types.d.ts
@@ -10,9 +11,6 @@ type Intersect<T> = (T extends any ? ((x: T) => 0) : never) extends ((x: infer R
10
11
  type BaseOptions = {
11
12
  idKey?: IdKey;
12
13
  };
13
- /**
14
- * The interface required for the "from" mapping functions.
15
- */
16
14
  //#endregion
17
15
  export { BaseOptions, Intersect };
18
16
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"configurations.js","names":[],"sources":["../../../src/core/from/configurations.ts"],"sourcesContent":["import type transform from '../to/configurations';\n\nexport default (configurations: ReturnType<typeof transform>) => {\n if (configurations.length != new Set(configurations.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Configurations) Configuration array have two or more configurations with the same ID');\n\n return configurations\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Configurations) Configuration id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,mBAAiD;AAC/D,KAAI,eAAe,UAAU,IAAI,IAAI,eAAe,KAAI,MAAK,EAAE,KAAK,KAClE,OAAM,IAAI,MAAM;AAElB,QAAO,eACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"configurations.js","names":[],"sources":["../../../src/core/from/configurations.ts"],"sourcesContent":["import type transform from '../to/configurations';\n\nexport default (configurations: ReturnType<typeof transform>) => {\n if (configurations.length != new Set(configurations.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Configurations) Configuration array have two or more configurations with the same ID');\n\n return configurations\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Configurations) Configuration id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,mBAAiD;AAC/D,KAAI,eAAe,UAAU,IAAI,IAAI,eAAe,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAClE,OAAM,IAAI,MAAM,wGAAwG;AAE1H,QAAO,eACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,iEAAiE;AAEnF,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"courses.js","names":[],"sources":["../../../src/core/from/courses.ts"],"sourcesContent":["import type transform from '../to/courses';\n\nexport default (courses: ReturnType<typeof transform>) => {\n if (courses.length != new Set(courses.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Courses) Course array have two or more courses with the same ID');\n\n return courses\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Courses) Course id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,KAAK,KACpD,OAAM,IAAI,MAAM;AAElB,QAAO,QACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"courses.js","names":[],"sources":["../../../src/core/from/courses.ts"],"sourcesContent":["import type transform from '../to/courses';\n\nexport default (courses: ReturnType<typeof transform>) => {\n if (courses.length != new Set(courses.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Courses) Course array have two or more courses with the same ID');\n\n return courses\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Courses) Course id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KACpD,OAAM,IAAI,MAAM,mFAAmF;AAErG,QAAO,QACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,mDAAmD;AAErE,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","names":[],"sources":["../../../src/core/from/events.ts"],"sourcesContent":["import type transform from '../to/events';\n\nexport default (events: ReturnType<typeof transform>) => {\n if (events.length != new Set(events.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Events) Events array have two or more events with the same ID');\n\n return events\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Events) Event id is undefined');\n\n // backwards compatibility for file upload: use duration if preferredDuration does not exist\n if (x.duration) x.preferredDuration ??= x.duration;\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,sBAAgB,WAAyC;AACvD,KAAI,OAAO,UAAU,IAAI,IAAI,OAAO,KAAI,MAAK,EAAE,KAAK,KAClD,OAAM,IAAI,MAAM;AAElB,QAAO,OACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAGlB,MAAI,EAAE,SAAU,GAAE,sBAAsB,EAAE;AAE1C,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"events.js","names":[],"sources":["../../../src/core/from/events.ts"],"sourcesContent":["import type transform from '../to/events';\n\nexport default (events: ReturnType<typeof transform>) => {\n if (events.length != new Set(events.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Events) Events array have two or more events with the same ID');\n\n return events\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Events) Event id is undefined');\n\n // backwards compatibility for file upload: use duration if preferredDuration does not exist\n if (x.duration) x.preferredDuration ??= x.duration;\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,sBAAgB,WAAyC;AACvD,KAAI,OAAO,UAAU,IAAI,IAAI,OAAO,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAClD,OAAM,IAAI,MAAM,iFAAiF;AAEnG,QAAO,OACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,iDAAiD;AAGnE,MAAI,EAAE,SAAU,GAAE,sBAAsB,EAAE;AAE1C,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"exceptions.js","names":[],"sources":["../../../src/core/from/exceptions.ts"],"sourcesContent":["import type transform from '../to/exceptions';\n\nexport default (exceptions: ReturnType<typeof transform>) => {\n if (exceptions.length != new Set(exceptions.map(x => x.id)).size)\n throw new Error('(Core::From::V2::exceptions) exceptions array have two or more exceptions with the same ID');\n\n return exceptions\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::exceptions) Calendar exceptions id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,0BAAgB,eAA6C;AAC3D,KAAI,WAAW,UAAU,IAAI,IAAI,WAAW,KAAI,MAAK,EAAE,KAAK,KAC1D,OAAM,IAAI,MAAM;AAElB,QAAO,WACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"exceptions.js","names":[],"sources":["../../../src/core/from/exceptions.ts"],"sourcesContent":["import type transform from '../to/exceptions';\n\nexport default (exceptions: ReturnType<typeof transform>) => {\n if (exceptions.length != new Set(exceptions.map(x => x.id)).size)\n throw new Error('(Core::From::V2::exceptions) exceptions array have two or more exceptions with the same ID');\n\n return exceptions\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::exceptions) Calendar exceptions id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,0BAAgB,eAA6C;AAC3D,KAAI,WAAW,UAAU,IAAI,IAAI,WAAW,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAC1D,OAAM,IAAI,MAAM,6FAA6F;AAE/G,QAAO,WACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,mEAAmE;AAErF,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"groups.js","names":[],"sources":["../../../src/core/from/groups.ts"],"sourcesContent":["import type transform from '../to/groups';\n\nexport default (groups: ReturnType<typeof transform>) => {\n if (groups.length != new Set(groups.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Groups) Groups array have two or more groups with the same ID');\n\n return groups\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Groups) Group id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,sBAAgB,WAAyC;AACvD,KAAI,OAAO,UAAU,IAAI,IAAI,OAAO,KAAI,MAAK,EAAE,KAAK,KAClD,OAAM,IAAI,MAAM;AAElB,QAAO,OACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"groups.js","names":[],"sources":["../../../src/core/from/groups.ts"],"sourcesContent":["import type transform from '../to/groups';\n\nexport default (groups: ReturnType<typeof transform>) => {\n if (groups.length != new Set(groups.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Groups) Groups array have two or more groups with the same ID');\n\n return groups\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Groups) Group id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,sBAAgB,WAAyC;AACvD,KAAI,OAAO,UAAU,IAAI,IAAI,OAAO,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAClD,OAAM,IAAI,MAAM,iFAAiF;AAEnG,QAAO,OACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,iDAAiD;AAEnE,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_schedules"],"sources":["../../../src/core/from/index.ts"],"sourcesContent":["import type { FromInterface } from '../../common/types';\nimport type { Types } from '../types';\nimport _schedules from './schedules';\n\n\nfunction division (data: unknown): Pick<Types.Serialized.Division, 'displayName' | 'start' | 'end'> | undefined {\n\n if ( !data || typeof data !== 'object'\n || !('division' in data) || !data.division || typeof data.division !== 'object'\n ) return;\n\n const d = data.division;\n if (!('displayName' in d && typeof d.displayName == 'string')) return;\n if (!('start' in d && typeof d.start == 'string')) return;\n if (!('end' in d && typeof d.end == 'string')) return;\n\n return {\n displayName: d.displayName,\n start: d.start,\n end: d.end\n };\n}\n\nexport default {\n division: division,\n schedules: _schedules\n} satisfies FromInterface;"],"mappings":";;;AAKA,SAAS,SAAU,MAA6F;AAE9G,KAA8B,CAAC,QAAiB,OAAO,SAAkB,YACpE,EAAE,cAAc,SAAS,CAAC,KAAK,YAAY,OAAO,KAAK,aAAa,SACvE;CAEF,MAAM,IAAI,KAAK;AACf,KAAI,EAAE,iBAAiB,KAAK,OAAO,EAAE,eAAe,UAAW;AAC/D,KAAI,EAAE,WAAiB,KAAK,OAAO,EAAE,SAAe,UAAW;AAC/D,KAAI,EAAE,SAAiB,KAAK,OAAO,EAAE,OAAe,UAAW;AAE/D,QAAO;EACL,aAAa,EAAE;EACf,OAAa,EAAE;EACf,KAAa,EAAE;;;AAInB,mBAAe;CACF;CACX,WAAWA"}
1
+ {"version":3,"file":"index.js","names":["_schedules"],"sources":["../../../src/core/from/index.ts"],"sourcesContent":["import type { FromInterface } from '../../common/types';\nimport type { Types } from '../types';\nimport _schedules from './schedules';\n\n\nfunction division (data: unknown): Pick<Types.Serialized.Division, 'displayName' | 'start' | 'end'> | undefined {\n\n if ( !data || typeof data !== 'object'\n || !('division' in data) || !data.division || typeof data.division !== 'object'\n ) return;\n\n const d = data.division;\n if (!('displayName' in d && typeof d.displayName == 'string')) return;\n if (!('start' in d && typeof d.start == 'string')) return;\n if (!('end' in d && typeof d.end == 'string')) return;\n\n return {\n displayName: d.displayName,\n start: d.start,\n end: d.end\n };\n}\n\nexport default {\n division: division,\n schedules: _schedules\n} satisfies FromInterface;"],"mappings":";;;AAKA,SAAS,SAAU,MAA6F;AAE9G,KAA8B,CAAC,QAAiB,OAAO,SAAkB,YACpE,EAAE,cAAc,SAAS,CAAC,KAAK,YAAY,OAAO,KAAK,aAAa,SACvE;CAEF,MAAM,IAAI,KAAK;AACf,KAAI,EAAE,iBAAiB,KAAK,OAAO,EAAE,eAAe,UAAW;AAC/D,KAAI,EAAE,WAAiB,KAAK,OAAO,EAAE,SAAe,UAAW;AAC/D,KAAI,EAAE,SAAiB,KAAK,OAAO,EAAE,OAAe,UAAW;AAE/D,QAAO;EACL,aAAa,EAAE;EACf,OAAa,EAAE;EACf,KAAa,EAAE;EAChB;;AAGH,mBAAe;CACF;CACX,WAAWA;CACZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"locations.js","names":[],"sources":["../../../src/core/from/locations.ts"],"sourcesContent":["import type transform from '../to/locations';\n\nexport default (locations: ReturnType<typeof transform>) => {\n if (locations.length != new Set(locations.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Locations) Location array have two or more locations with the same ID');\n\n return locations\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Locations) Location id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,yBAAgB,cAA4C;AAC1D,KAAI,UAAU,UAAU,IAAI,IAAI,UAAU,KAAI,MAAK,EAAE,KAAK,KACxD,OAAM,IAAI,MAAM;AAElB,QAAO,UACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"locations.js","names":[],"sources":["../../../src/core/from/locations.ts"],"sourcesContent":["import type transform from '../to/locations';\n\nexport default (locations: ReturnType<typeof transform>) => {\n if (locations.length != new Set(locations.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Locations) Location array have two or more locations with the same ID');\n\n return locations\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Locations) Location id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,yBAAgB,cAA4C;AAC1D,KAAI,UAAU,UAAU,IAAI,IAAI,UAAU,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KACxD,OAAM,IAAI,MAAM,yFAAyF;AAE3G,QAAO,UACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,uDAAuD;AAEzE,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"locked-times.js","names":[],"sources":["../../../src/core/from/locked-times.ts"],"sourcesContent":["import type transform from '../to/locked-times';\n\nexport default (LockedTimes: ReturnType<typeof transform>) => {\n if (LockedTimes.length != new Set(LockedTimes.map(x => x.id)).size)\n throw new Error('(Core::From::V2::LockedTimes) LockedTimes array have two or more LockedTimes with the same ID');\n\n return LockedTimes\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::LockedTimes) Locked time id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,4BAAgB,gBAA8C;AAC5D,KAAI,YAAY,UAAU,IAAI,IAAI,YAAY,KAAI,MAAK,EAAE,KAAK,KAC5D,OAAM,IAAI,MAAM;AAElB,QAAO,YACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"locked-times.js","names":[],"sources":["../../../src/core/from/locked-times.ts"],"sourcesContent":["import type transform from '../to/locked-times';\n\nexport default (LockedTimes: ReturnType<typeof transform>) => {\n if (LockedTimes.length != new Set(LockedTimes.map(x => x.id)).size)\n throw new Error('(Core::From::V2::LockedTimes) LockedTimes array have two or more LockedTimes with the same ID');\n\n return LockedTimes\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::LockedTimes) Locked time id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,4BAAgB,gBAA8C;AAC5D,KAAI,YAAY,UAAU,IAAI,IAAI,YAAY,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAC5D,OAAM,IAAI,MAAM,gGAAgG;AAElH,QAAO,YACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,4DAA4D;AAE9E,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"overlap-groups.js","names":[],"sources":["../../../src/core/from/overlap-groups.ts"],"sourcesContent":["import type transform from '../to/overlap-groups';\n\nexport default (overlapGroups: ReturnType<typeof transform>) => {\n if (overlapGroups.length != new Set(overlapGroups.map(x => x.id)).size)\n throw new Error('(Core::From::V2::OverlapGroup) overlapGroups array have two or more overlapGroups with the same ID');\n\n return overlapGroups\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::OverlapGroup) Overlap group id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,kBAAgD;AAC9D,KAAI,cAAc,UAAU,IAAI,IAAI,cAAc,KAAI,MAAK,EAAE,KAAK,KAChE,OAAM,IAAI,MAAM;AAElB,QAAO,cACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"overlap-groups.js","names":[],"sources":["../../../src/core/from/overlap-groups.ts"],"sourcesContent":["import type transform from '../to/overlap-groups';\n\nexport default (overlapGroups: ReturnType<typeof transform>) => {\n if (overlapGroups.length != new Set(overlapGroups.map(x => x.id)).size)\n throw new Error('(Core::From::V2::OverlapGroup) overlapGroups array have two or more overlapGroups with the same ID');\n\n return overlapGroups\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::OverlapGroup) Overlap group id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,kBAAgD;AAC9D,KAAI,cAAc,UAAU,IAAI,IAAI,cAAc,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAChE,OAAM,IAAI,MAAM,qGAAqG;AAEvH,QAAO,cACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,+DAA+D;AAEjF,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"periods.js","names":[],"sources":["../../../src/core/from/periods.ts"],"sourcesContent":["import type transform from '../to/periods';\n\nexport default (periods: ReturnType<typeof transform>) => {\n if (periods.length != new Set(periods.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Periods) Periods array have two or more periods with the same ID');\n\n return periods\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Periods) Period id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,KAAK,KACpD,OAAM,IAAI,MAAM;AAElB,QAAO,QACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"periods.js","names":[],"sources":["../../../src/core/from/periods.ts"],"sourcesContent":["import type transform from '../to/periods';\n\nexport default (periods: ReturnType<typeof transform>) => {\n if (periods.length != new Set(periods.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Periods) Periods array have two or more periods with the same ID');\n\n return periods\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Periods) Period id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KACpD,OAAM,IAAI,MAAM,oFAAoF;AAEtG,QAAO,QACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,mDAAmD;AAErE,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"persons.js","names":[],"sources":["../../../src/core/from/persons.ts"],"sourcesContent":["import type transform from '../to/persons';\n\nexport default (persons: ReturnType<typeof transform>) => {\n if (persons.length != new Set(persons.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Persons) Persons array have two or more persons with the same ID');\n\n return persons\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Persons) Person id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,KAAK,KACpD,OAAM,IAAI,MAAM;AAElB,QAAO,QACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"persons.js","names":[],"sources":["../../../src/core/from/persons.ts"],"sourcesContent":["import type transform from '../to/persons';\n\nexport default (persons: ReturnType<typeof transform>) => {\n if (persons.length != new Set(persons.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Persons) Persons array have two or more persons with the same ID');\n\n return persons\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Persons) Person id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KACpD,OAAM,IAAI,MAAM,oFAAoF;AAEtG,QAAO,QACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,mDAAmD;AAErE,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"root-intervals.js","names":[],"sources":["../../../src/core/from/root-intervals.ts"],"sourcesContent":["import type transform from '../to/root-intervals';\n\nexport default (rootIntervals: ReturnType<typeof transform>) => {\n if (rootIntervals.length != new Set(rootIntervals.map(x => x.id)).size)\n throw new Error('(Core::From::V2::RootIntervals) RootInterval array have two or more root intervals with the same ID');\n\n return rootIntervals\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::RootIntervals) RootInterval id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,kBAAgD;AAC9D,KAAI,cAAc,UAAU,IAAI,IAAI,cAAc,KAAI,MAAK,EAAE,KAAK,KAChE,OAAM,IAAI,MAAM;AAElB,QAAO,cACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"root-intervals.js","names":[],"sources":["../../../src/core/from/root-intervals.ts"],"sourcesContent":["import type transform from '../to/root-intervals';\n\nexport default (rootIntervals: ReturnType<typeof transform>) => {\n if (rootIntervals.length != new Set(rootIntervals.map(x => x.id)).size)\n throw new Error('(Core::From::V2::RootIntervals) RootInterval array have two or more root intervals with the same ID');\n\n return rootIntervals\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::RootIntervals) RootInterval id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,kBAAgD;AAC9D,KAAI,cAAc,UAAU,IAAI,IAAI,cAAc,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAChE,OAAM,IAAI,MAAM,sGAAsG;AAExH,QAAO,cACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,+DAA+D;AAEjF,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"schedules.js","names":["_settings","_periods","_groups","_teachers","_persons","_locations","_courses","_events","_overlapGroups","_lockedTimes","_rootIntervals","_exceptions","_syllabuses","_configurations"],"sources":["../../../src/core/from/schedules.ts"],"sourcesContent":["import _exceptions from './exceptions';\nimport _periods from './periods';\nimport _locations from './locations';\nimport _teachers from './teachers';\nimport _groups from './groups';\nimport _persons from './persons';\nimport _courses from './courses';\nimport _overlapGroups from './overlap-groups';\nimport _lockedTimes from './locked-times';\nimport _rootIntervals from './root-intervals';\nimport _events from './events';\nimport _syllabuses from './syllabuses';\nimport _configurations from './configurations';\nimport _settings from './settings';\nimport type transform from '../to/schedules';\n\nexport default function (schedule: ReturnType<typeof transform>): Omit<ReturnType<typeof transform>, 'meta'> {\n return {\n ...schedule.settings && { settings: _settings (schedule.settings ) },\n ...schedule.periods && { periods: _periods (schedule.periods ) },\n ...schedule.groups && { groups: _groups (schedule.groups ) },\n ...schedule.teachers && { teachers: _teachers (schedule.teachers ) },\n ...schedule.persons && { persons: _persons (schedule.persons ) },\n ...schedule.locations && { locations: _locations (schedule.locations ) },\n ...schedule.courses && { courses: _courses (schedule.courses ) },\n ...schedule.events && { events: _events (schedule.events ) },\n ...schedule.overlapGroups && { overlapGroups: _overlapGroups (schedule.overlapGroups ) },\n ...schedule.lockedTimes && { lockedTimes: _lockedTimes (schedule.lockedTimes ) },\n ...schedule.rootIntervals && { rootIntervals: _rootIntervals (schedule.rootIntervals ) },\n ...schedule.exceptions && { exceptions: _exceptions (schedule.exceptions ) },\n ...schedule.syllabuses && { syllabuses: _syllabuses (schedule.syllabuses ) },\n ...schedule.configurations && { configurations: _configurations(schedule.configurations) }\n };\n}"],"mappings":";;;;;;;;;;;;;;;;AAgBA,2BAAyB,UAAoF;AAC3G,QAAO;EACL,GAAG,SAAS,YAAkB,EAAE,UAAgBA,iBAAgB,SAAS;EACzE,GAAG,SAAS,WAAkB,EAAE,SAAgBC,gBAAgB,SAAS;EACzE,GAAG,SAAS,UAAkB,EAAE,QAAgBC,eAAgB,SAAS;EACzE,GAAG,SAAS,YAAkB,EAAE,UAAgBC,iBAAgB,SAAS;EACzE,GAAG,SAAS,WAAkB,EAAE,SAAgBC,gBAAgB,SAAS;EACzE,GAAG,SAAS,aAAkB,EAAE,WAAgBC,kBAAgB,SAAS;EACzE,GAAG,SAAS,WAAkB,EAAE,SAAgBC,gBAAgB,SAAS;EACzE,GAAG,SAAS,UAAkB,EAAE,QAAgBC,eAAgB,SAAS;EACzE,GAAG,SAAS,iBAAkB,EAAE,eAAgBC,uBAAgB,SAAS;EACzE,GAAG,SAAS,eAAkB,EAAE,aAAgBC,qBAAgB,SAAS;EACzE,GAAG,SAAS,iBAAkB,EAAE,eAAgBC,uBAAgB,SAAS;EACzE,GAAG,SAAS,cAAkB,EAAE,YAAgBC,mBAAgB,SAAS;EACzE,GAAG,SAAS,cAAkB,EAAE,YAAgBC,mBAAgB,SAAS;EACzE,GAAG,SAAS,kBAAkB,EAAE,gBAAgBC,uBAAgB,SAAS"}
1
+ {"version":3,"file":"schedules.js","names":["_settings","_periods","_groups","_teachers","_persons","_locations","_courses","_events","_overlapGroups","_lockedTimes","_rootIntervals","_exceptions","_syllabuses","_configurations"],"sources":["../../../src/core/from/schedules.ts"],"sourcesContent":["import _exceptions from './exceptions';\nimport _periods from './periods';\nimport _locations from './locations';\nimport _teachers from './teachers';\nimport _groups from './groups';\nimport _persons from './persons';\nimport _courses from './courses';\nimport _overlapGroups from './overlap-groups';\nimport _lockedTimes from './locked-times';\nimport _rootIntervals from './root-intervals';\nimport _events from './events';\nimport _syllabuses from './syllabuses';\nimport _configurations from './configurations';\nimport _settings from './settings';\nimport type transform from '../to/schedules';\n\nexport default function (schedule: ReturnType<typeof transform>): Omit<ReturnType<typeof transform>, 'meta'> {\n return {\n ...schedule.settings && { settings: _settings (schedule.settings ) },\n ...schedule.periods && { periods: _periods (schedule.periods ) },\n ...schedule.groups && { groups: _groups (schedule.groups ) },\n ...schedule.teachers && { teachers: _teachers (schedule.teachers ) },\n ...schedule.persons && { persons: _persons (schedule.persons ) },\n ...schedule.locations && { locations: _locations (schedule.locations ) },\n ...schedule.courses && { courses: _courses (schedule.courses ) },\n ...schedule.events && { events: _events (schedule.events ) },\n ...schedule.overlapGroups && { overlapGroups: _overlapGroups (schedule.overlapGroups ) },\n ...schedule.lockedTimes && { lockedTimes: _lockedTimes (schedule.lockedTimes ) },\n ...schedule.rootIntervals && { rootIntervals: _rootIntervals (schedule.rootIntervals ) },\n ...schedule.exceptions && { exceptions: _exceptions (schedule.exceptions ) },\n ...schedule.syllabuses && { syllabuses: _syllabuses (schedule.syllabuses ) },\n ...schedule.configurations && { configurations: _configurations(schedule.configurations) }\n };\n}"],"mappings":";;;;;;;;;;;;;;;;AAgBA,2BAAyB,UAAoF;AAC3G,QAAO;EACL,GAAG,SAAS,YAAkB,EAAE,UAAgBA,iBAAgB,SAAS,SAAe,EAAE;EAC1F,GAAG,SAAS,WAAkB,EAAE,SAAgBC,gBAAgB,SAAS,QAAe,EAAE;EAC1F,GAAG,SAAS,UAAkB,EAAE,QAAgBC,eAAgB,SAAS,OAAe,EAAE;EAC1F,GAAG,SAAS,YAAkB,EAAE,UAAgBC,iBAAgB,SAAS,SAAe,EAAE;EAC1F,GAAG,SAAS,WAAkB,EAAE,SAAgBC,gBAAgB,SAAS,QAAe,EAAE;EAC1F,GAAG,SAAS,aAAkB,EAAE,WAAgBC,kBAAgB,SAAS,UAAe,EAAE;EAC1F,GAAG,SAAS,WAAkB,EAAE,SAAgBC,gBAAgB,SAAS,QAAe,EAAE;EAC1F,GAAG,SAAS,UAAkB,EAAE,QAAgBC,eAAgB,SAAS,OAAe,EAAE;EAC1F,GAAG,SAAS,iBAAkB,EAAE,eAAgBC,uBAAgB,SAAS,cAAe,EAAE;EAC1F,GAAG,SAAS,eAAkB,EAAE,aAAgBC,qBAAgB,SAAS,YAAe,EAAE;EAC1F,GAAG,SAAS,iBAAkB,EAAE,eAAgBC,uBAAgB,SAAS,cAAe,EAAE;EAC1F,GAAG,SAAS,cAAkB,EAAE,YAAgBC,mBAAgB,SAAS,WAAe,EAAE;EAC1F,GAAG,SAAS,cAAkB,EAAE,YAAgBC,mBAAgB,SAAS,WAAe,EAAE;EAC1F,GAAG,SAAS,kBAAkB,EAAE,gBAAgBC,uBAAgB,SAAS,eAAe,EAAE;EAC3F"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","names":[],"sources":["../../../src/core/from/settings.ts"],"sourcesContent":["import moment from 'moment';\nimport type transform from '../to/settings';\n\nexport default (settings: ReturnType<typeof transform>) => {\n\n settings.calendarExceptions = settings.calendarExceptions?.map(exception => {\n // the start time should not be later than 23:55 of the specified date\n let start = moment.utc(exception.start);\n if (start.hour() === 23 && start.minute() > 55) start = start.minute(55);\n\n // the end time should not be before 00:05 of the specified date, in such a case set it to the end of day\n // (this has to do with backwards compatibility with older versions)\n let end = moment.utc(exception.end);\n if (end.hour() === 0 && end.minute() < 5) end = end.endOf('day');\n\n return { ...exception, start, end };\n });\n\n return settings;\n};\n"],"mappings":";;;AAGA,wBAAgB,aAA2C;AAEzD,UAAS,qBAAqB,SAAS,oBAAoB,KAAI,cAAa;EAE1E,IAAI,QAAQ,OAAO,IAAI,UAAU;AACjC,MAAI,MAAM,WAAW,MAAM,MAAM,WAAW,GAAI,SAAQ,MAAM,OAAO;EAIrE,IAAI,MAAM,OAAO,IAAI,UAAU;AAC/B,MAAI,IAAI,WAAW,KAAK,IAAI,WAAW,EAAG,OAAM,IAAI,MAAM;AAE1D,SAAO;GAAE,GAAG;GAAW;GAAO;;;AAGhC,QAAO"}
1
+ {"version":3,"file":"settings.js","names":[],"sources":["../../../src/core/from/settings.ts"],"sourcesContent":["import moment from 'moment';\nimport type transform from '../to/settings';\n\nexport default (settings: ReturnType<typeof transform>) => {\n\n settings.calendarExceptions = settings.calendarExceptions?.map(exception => {\n // the start time should not be later than 23:55 of the specified date\n let start = moment.utc(exception.start);\n if (start.hour() === 23 && start.minute() > 55) start = start.minute(55);\n\n // the end time should not be before 00:05 of the specified date, in such a case set it to the end of day\n // (this has to do with backwards compatibility with older versions)\n let end = moment.utc(exception.end);\n if (end.hour() === 0 && end.minute() < 5) end = end.endOf('day');\n\n return { ...exception, start, end };\n });\n\n return settings;\n};\n"],"mappings":";;;AAGA,wBAAgB,aAA2C;AAEzD,UAAS,qBAAqB,SAAS,oBAAoB,KAAI,cAAa;EAE1E,IAAI,QAAQ,OAAO,IAAI,UAAU,MAAM;AACvC,MAAI,MAAM,MAAM,KAAK,MAAM,MAAM,QAAQ,GAAG,GAAI,SAAQ,MAAM,OAAO,GAAG;EAIxE,IAAI,MAAM,OAAO,IAAI,UAAU,IAAI;AACnC,MAAI,IAAI,MAAM,KAAK,KAAK,IAAI,QAAQ,GAAG,EAAG,OAAM,IAAI,MAAM,MAAM;AAEhE,SAAO;GAAE,GAAG;GAAW;GAAO;GAAK;GACnC;AAEF,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"syllabuses.js","names":[],"sources":["../../../src/core/from/syllabuses.ts"],"sourcesContent":["import type transform from '../to/syllabuses';\n\nexport default (syllabuses: ReturnType<typeof transform>) => {\n syllabuses = syllabuses.filter(({ id }) => id != undefined);\n\n if (syllabuses.length != Array.from(new Set(syllabuses.map(({ id }) => id))).length)\n throw new Error('(Core::From::V2::Syllabuses) Syllabuses array have two or more syllabuses with the same ID');\n\n return syllabuses.map(syllabus => {\n if (!syllabus.id)\n throw new Error('(Core::From::V2::Syllabuses) Syllabus id is undefined');\n\n return { ...syllabus };\n }, []) satisfies ReturnType<typeof transform>;\n};"],"mappings":";AAEA,0BAAgB,eAA6C;AAC3D,cAAa,WAAW,QAAQ,EAAE,SAAS,MAAM;AAEjD,KAAI,WAAW,UAAU,MAAM,KAAK,IAAI,IAAI,WAAW,KAAK,EAAE,SAAS,MAAM,OAC3E,OAAM,IAAI,MAAM;AAElB,QAAO,WAAW,KAAI,aAAY;AAChC,MAAI,CAAC,SAAS,GACZ,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG;IACX"}
1
+ {"version":3,"file":"syllabuses.js","names":[],"sources":["../../../src/core/from/syllabuses.ts"],"sourcesContent":["import type transform from '../to/syllabuses';\n\nexport default (syllabuses: ReturnType<typeof transform>) => {\n syllabuses = syllabuses.filter(({ id }) => id != undefined);\n\n if (syllabuses.length != Array.from(new Set(syllabuses.map(({ id }) => id))).length)\n throw new Error('(Core::From::V2::Syllabuses) Syllabuses array have two or more syllabuses with the same ID');\n\n return syllabuses.map(syllabus => {\n if (!syllabus.id)\n throw new Error('(Core::From::V2::Syllabuses) Syllabus id is undefined');\n\n return { ...syllabus };\n }, []) satisfies ReturnType<typeof transform>;\n};"],"mappings":";AAEA,0BAAgB,eAA6C;AAC3D,cAAa,WAAW,QAAQ,EAAE,SAAS,MAAM,OAAU;AAE3D,KAAI,WAAW,UAAU,MAAM,KAAK,IAAI,IAAI,WAAW,KAAK,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC,OAC3E,OAAM,IAAI,MAAM,6FAA6F;AAE/G,QAAO,WAAW,KAAI,aAAY;AAChC,MAAI,CAAC,SAAS,GACZ,OAAM,IAAI,MAAM,wDAAwD;AAE1E,SAAO,EAAE,GAAG,UAAU;IACrB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"teachers.js","names":[],"sources":["../../../src/core/from/teachers.ts"],"sourcesContent":["import type transform from '../to/teachers';\n\nexport default (teachers: ReturnType<typeof transform>) => {\n if (teachers.length != new Set(teachers.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Teachers) Teachers array have two or more teachers with the same ID');\n\n return teachers\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Teachers) Teacher id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,wBAAgB,aAA2C;AACzD,KAAI,SAAS,UAAU,IAAI,IAAI,SAAS,KAAI,MAAK,EAAE,KAAK,KACtD,OAAM,IAAI,MAAM;AAElB,QAAO,SACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM;AAElB,SAAO,EAAE,GAAG"}
1
+ {"version":3,"file":"teachers.js","names":[],"sources":["../../../src/core/from/teachers.ts"],"sourcesContent":["import type transform from '../to/teachers';\n\nexport default (teachers: ReturnType<typeof transform>) => {\n if (teachers.length != new Set(teachers.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Teachers) Teachers array have two or more teachers with the same ID');\n\n return teachers\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Teachers) Teacher id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,wBAAgB,aAA2C;AACzD,KAAI,SAAS,UAAU,IAAI,IAAI,SAAS,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KACtD,OAAM,IAAI,MAAM,uFAAuF;AAEzG,QAAO,SACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,qDAAqD;AAEvE,SAAO,EAAE,GAAG,GAAG;GACf"}
@@ -22,6 +22,7 @@ import { CalendarExceptionAction, ExceptionStatus } from "./interfaces/vertices/
22
22
  import { LockedTimeType } from "./interfaces/vertices/locked-times.js";
23
23
  import { Infer, VertexQuery, createVertexQuery } from "./interfaces/vertices/vertex-query.js";
24
24
  import { Deep, DeepWithoutPrivateId, Mixed, MixedWithOptionalId, Serialized, SerializedWithOptionalId } from "./interfaces/vertices/index.js";
25
+ import "./interfaces/index.js";
25
26
  import { Types } from "./types/index.js";
26
27
 
27
28
  //#region src/core/index.d.ts
@@ -0,0 +1,23 @@
1
+ import { Coalesced } from "./vertices/properties/coalesced.js";
2
+ import { Species } from "./vertices/properties/species.js";
3
+ import { AllWeeks, Week, allWeeks } from "./vertices/properties/week.js";
4
+ import { Day } from "./vertices/properties/days.js";
5
+ import { Interval } from "./vertices/properties/intervals.js";
6
+ import { Tag, TagType } from "./vertices/properties/tags.js";
7
+ import { MaximumScheduleSpan } from "./vertices/properties/maximum-schedule-span.js";
8
+ import { PlannedScheduledDuration } from "./vertices/properties/planned-scheduled-duration.js";
9
+ import { MinBreakLength } from "./vertices/properties/min-break-length.js";
10
+ import { PublicId } from "./vertices/properties/index.js";
11
+ import { CalendarException } from "./vertices/division-settings.js";
12
+ import { Address, AutoSyncConfig, Company, GlobalDefaultValues, INACTIVITY_ACTIONS, InactivityAction, InactivitySettings, PublicConfig, TimeRosterSection } from "./other/companies.js";
13
+ import { Integration } from "./other/integrations.js";
14
+ import { User } from "./other/users.js";
15
+ import { Action, Policy, Statement } from "./other/policies.js";
16
+ import { Operation, OperationType, operationType } from "./other/operations.js";
17
+ import { ErrorCode, SyncLog } from "./other/sync-logs.js";
18
+ import "./other/index.js";
19
+ import { StepGuideProgress } from "./vertices/divisions.js";
20
+ import { CalendarExceptionAction, ExceptionStatus } from "./vertices/exceptions.js";
21
+ import { LockedTimeType } from "./vertices/locked-times.js";
22
+ import { Infer, VertexQuery, createVertexQuery } from "./vertices/vertex-query.js";
23
+ import { Deep, DeepWithoutPrivateId, Mixed, MixedWithOptionalId, Serialized, SerializedWithOptionalId } from "./vertices/index.js";
@@ -84,6 +84,7 @@ type GlobalDefaultValues = {
84
84
  dayEnd: string;
85
85
  numDays: number;
86
86
  potentialCenter?: string;
87
+ minimizeTeacherGaps?: boolean;
87
88
  defaultGroupMinimumBreakLength?: number;
88
89
  defaultEventMinimumBreakLength?: number;
89
90
  defaultDependencyMinimumBreakLength?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"companies.js","names":[],"sources":["../../../../src/core/interfaces/other/companies.ts"],"sourcesContent":["import type { Partner, IntegrationTypes, OrganizationType, Theme, SamlProvider } from './etc';\nimport type { PlannedScheduledDuration } from '../vertices/properties/planned-scheduled-duration';\nimport type { MaximumScheduleSpan } from '../vertices/properties/maximum-schedule-span';\nimport type { PublicId } from '../vertices/properties';\n\n\ntype Identifier = {\n value: string;\n type: 'VAT' | 'SchoolCode' | 'MunicipalityCode' | 'SchoolSoft' | 'Sdui' | 'Edlevo' | 'Edaktus';\n country: string;\n};\n\ntype AppFeature = {\n substitutionPlanner?: {\n enabled: boolean;\n };\n statisticsModule?: {\n /**\n * Enables the whole statistics module.\n */\n enabled?: boolean;\n\n scb?: boolean;\n lunchCongestion?: boolean;\n };\n includeStepGuide?: boolean;\n};\n\nexport type Address = {\n type: string; // Type of address (e.g., home, work, etc.)\n streetAddress: string; // Street address (e.g., 123 Main St)\n addressLine2?: string; // Optional second line of the address (e.g., Apt 4B)sss\n addressLine3?: string; // Optional third line of the address\n postalCode: string; // Postal code (e.g., 12345)\n locality: string; // City or locality (e.g., New York)\n state?: string; // Optional state or province (e.g., NY)\n region?: string; // Optional region (e.g., Northeast)\n country: string; // Country (e.g., USA)\n geoCoordinates: {\n latitude: string;\n longitude: string;\n };\n};\n\nexport type TimeRosterSection = {\n start: string; // In HH:mm format\n end: string; // In HH:mm format\n id: string;\n name: string;\n};\n\nexport type PublicConfig = {\n filters: {\n groups: boolean;\n teachers: boolean;\n inLocations: boolean;\n tags: boolean;\n subjects: boolean;\n subGroups: boolean;\n };\n showTeacherWorkingHours: boolean;\n multipleSelection: boolean;\n timeFilters: {\n all: boolean;\n periods: boolean;\n };\n lockedTimes: boolean;\n};\n\nexport type AutoSyncConfig = {\n enabled: boolean;\n integration?: IntegrationTypes;\n weekdaysOnly?: boolean;\n time?: string;\n};\n\nexport const INACTIVITY_ACTIONS = {\n REFRESH: 'refresh',\n LOGOUT: 'logout',\n} as const;\nexport type InactivityAction =\n (typeof INACTIVITY_ACTIONS)[keyof typeof INACTIVITY_ACTIONS];\n\nexport type InactivitySettings = {\n /**\n * In units of minutes\n */\n time: number;\n action: InactivityAction;\n};\n\nexport type GlobalDefaultValues = {\n dayStart: string;\n dayEnd: string;\n numDays: number;\n potentialCenter?: string;\n defaultGroupMinimumBreakLength?: number;\n defaultEventMinimumBreakLength?: number;\n defaultDependencyMinimumBreakLength?: number;\n defaultPlannedScheduledDuration?: PlannedScheduledDuration;\n defaultMaximumScheduleSpan?: MaximumScheduleSpan;\n defaultEventDurationVariance?: number;\n};\n\nexport namespace Company {\n export type core = {\n readonly id: PublicId;\n associatedPartner?: Partner | null;\n createdAt?: string;\n };\n\n type optionals = {\n name?: string;\n logo?: string; // URL to the company's logo\n timezone?: string;\n environment: {\n theme?: Theme;\n organizationType?: OrganizationType;\n appFeatures?: AppFeature;\n canCreateCompanies?: boolean;\n };\n identifiers: Identifier[];\n addresses: Address[];\n constituentTypes: string[];\n samlProviders?: SamlProvider[];\n publicSettings?: PublicConfig;\n autoSync?: AutoSyncConfig;\n organization?: {\n name?: string;\n logo?: string;\n inactivitySettings?: InactivitySettings;\n constituentTypes?: string[];\n environment?: Company.complete['environment'];\n };\n inactivitySettings?: InactivitySettings;\n timeRoster?: TimeRosterSection[];\n globalDefaultValues?: GlobalDefaultValues;\n };\n\n export type complete = core & optionals;\n}\n"],"mappings":";AA4EA,MAAa,qBAAqB;CAChC,SAAS;CACT,QAAS"}
1
+ {"version":3,"file":"companies.js","names":[],"sources":["../../../../src/core/interfaces/other/companies.ts"],"sourcesContent":["import type { Partner, IntegrationTypes, OrganizationType, Theme, SamlProvider } from './etc';\nimport type { PlannedScheduledDuration } from '../vertices/properties/planned-scheduled-duration';\nimport type { MaximumScheduleSpan } from '../vertices/properties/maximum-schedule-span';\nimport type { PublicId } from '../vertices/properties';\n\n\ntype Identifier = {\n value: string;\n type: 'VAT' | 'SchoolCode' | 'MunicipalityCode' | 'SchoolSoft' | 'Sdui' | 'Edlevo' | 'Edaktus';\n country: string;\n};\n\ntype AppFeature = {\n substitutionPlanner?: {\n enabled: boolean;\n };\n statisticsModule?: {\n /**\n * Enables the whole statistics module.\n */\n enabled?: boolean;\n\n scb?: boolean;\n lunchCongestion?: boolean;\n };\n includeStepGuide?: boolean;\n};\n\nexport type Address = {\n type: string; // Type of address (e.g., home, work, etc.)\n streetAddress: string; // Street address (e.g., 123 Main St)\n addressLine2?: string; // Optional second line of the address (e.g., Apt 4B)sss\n addressLine3?: string; // Optional third line of the address\n postalCode: string; // Postal code (e.g., 12345)\n locality: string; // City or locality (e.g., New York)\n state?: string; // Optional state or province (e.g., NY)\n region?: string; // Optional region (e.g., Northeast)\n country: string; // Country (e.g., USA)\n geoCoordinates: {\n latitude: string;\n longitude: string;\n };\n};\n\nexport type TimeRosterSection = {\n start: string; // In HH:mm format\n end: string; // In HH:mm format\n id: string;\n name: string;\n};\n\nexport type PublicConfig = {\n filters: {\n groups: boolean;\n teachers: boolean;\n inLocations: boolean;\n tags: boolean;\n subjects: boolean;\n subGroups: boolean;\n };\n showTeacherWorkingHours: boolean;\n multipleSelection: boolean;\n timeFilters: {\n all: boolean;\n periods: boolean;\n };\n lockedTimes: boolean;\n};\n\nexport type AutoSyncConfig = {\n enabled: boolean;\n integration?: IntegrationTypes;\n weekdaysOnly?: boolean;\n time?: string;\n};\n\nexport const INACTIVITY_ACTIONS = {\n REFRESH: 'refresh',\n LOGOUT: 'logout',\n} as const;\nexport type InactivityAction =\n (typeof INACTIVITY_ACTIONS)[keyof typeof INACTIVITY_ACTIONS];\n\nexport type InactivitySettings = {\n /**\n * In units of minutes\n */\n time: number;\n action: InactivityAction;\n};\n\nexport type GlobalDefaultValues = {\n dayStart: string;\n dayEnd: string;\n numDays: number;\n potentialCenter?: string;\n minimizeTeacherGaps?: boolean;\n defaultGroupMinimumBreakLength?: number;\n defaultEventMinimumBreakLength?: number;\n defaultDependencyMinimumBreakLength?: number;\n defaultPlannedScheduledDuration?: PlannedScheduledDuration;\n defaultMaximumScheduleSpan?: MaximumScheduleSpan;\n defaultEventDurationVariance?: number;\n};\n\nexport namespace Company {\n export type core = {\n readonly id: PublicId;\n associatedPartner?: Partner | null;\n createdAt?: string;\n };\n\n type optionals = {\n name?: string;\n logo?: string; // URL to the company's logo\n timezone?: string;\n environment: {\n theme?: Theme;\n organizationType?: OrganizationType;\n appFeatures?: AppFeature;\n canCreateCompanies?: boolean;\n };\n identifiers: Identifier[];\n addresses: Address[];\n constituentTypes: string[];\n samlProviders?: SamlProvider[];\n publicSettings?: PublicConfig;\n autoSync?: AutoSyncConfig;\n organization?: {\n name?: string;\n logo?: string;\n inactivitySettings?: InactivitySettings;\n constituentTypes?: string[];\n environment?: Company.complete['environment'];\n };\n inactivitySettings?: InactivitySettings;\n timeRoster?: TimeRosterSection[];\n globalDefaultValues?: GlobalDefaultValues;\n };\n\n export type complete = core & optionals;\n}\n"],"mappings":";AA4EA,MAAa,qBAAqB;CAChC,SAAS;CACT,QAAS;CACV"}
@@ -0,0 +1,6 @@
1
+ import { Address, AutoSyncConfig, Company, GlobalDefaultValues, INACTIVITY_ACTIONS, InactivityAction, InactivitySettings, PublicConfig, TimeRosterSection } from "./companies.js";
2
+ import { Integration } from "./integrations.js";
3
+ import { User } from "./users.js";
4
+ import { Action, Policy, Statement } from "./policies.js";
5
+ import { Operation, OperationType, operationType } from "./operations.js";
6
+ import { ErrorCode, SyncLog } from "./sync-logs.js";
@@ -1,4 +1,5 @@
1
1
  import { RealCollection } from "../vertices/util/vertex.js";
2
+ import "../vertices/util/index.js";
2
3
  import { IntegrationTypes } from "./etc.js";
3
4
  import { Company } from "./companies.js";
4
5
  import { User } from "./users.js";
@@ -1,4 +1,5 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
+ import "./util/index.js";
2
3
 
3
4
  //#region src/core/interfaces/vertices/companies.d.ts
4
5
  type CompanyVertex = VertexFactory<'companies', object>;
@@ -1,5 +1,6 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
2
  import { Coalesced, EdgeWrapper } from "./util/edges.js";
3
+ import "./util/index.js";
3
4
  import { DivisionVertex } from "./divisions.js";
4
5
  import { UserVertex } from "./users.js";
5
6
  import { CompanyVertex } from "./companies.js";
@@ -1,5 +1,6 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
2
  import { AvailableLocation, EdgeWrapper, GroupWithExclude, Plain, Wrapped } from "./util/edges.js";
3
+ import "./util/index.js";
3
4
  import { Day } from "./properties/days.js";
4
5
  import { Interval } from "./properties/intervals.js";
5
6
  import { Tag } from "./properties/tags.js";
@@ -1,5 +1,6 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
2
  import { EdgeWrapper, Plain } from "./util/edges.js";
3
+ import "./util/index.js";
3
4
  import { MaximumScheduleSpan } from "./properties/maximum-schedule-span.js";
4
5
  import { PlannedScheduledDuration } from "./properties/planned-scheduled-duration.js";
5
6
  import { PeriodVertex } from "./periods.js";
@@ -25,6 +26,7 @@ type DivisionSettingsVertex = VertexFactory<'settings', BelongsTo & {
25
26
  dayEnd: string;
26
27
  discretization: number;
27
28
  potentialCenter: string;
29
+ minimizeTeacherGaps?: boolean;
28
30
  defaultEventMinimumBreakLength?: number;
29
31
  defaultGroupMinimumBreakLength?: number;
30
32
  defaultDependencyMinimumBreakLength?: number;
@@ -1,5 +1,6 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
2
  import { EdgeWrapper, Plain } from "./util/edges.js";
3
+ import "./util/index.js";
3
4
  import { DateType, Partner } from "../other/etc.js";
4
5
  import { DivisionSettingsVertex } from "./division-settings.js";
5
6
  import { GenerationVertex } from "./generations.js";
@@ -1,5 +1,6 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
2
  import { AvailableLocation, EdgeWrapper, GroupWithExclude, Plain, Wrapped } from "./util/edges.js";
3
+ import "./util/index.js";
3
4
  import { Day } from "./properties/days.js";
4
5
  import { Interval } from "./properties/intervals.js";
5
6
  import { Tag } from "./properties/tags.js";
@@ -1,5 +1,6 @@
1
1
  import { Collection, Vertex, VertexFactory } from "./util/vertex.js";
2
2
  import { Coalesced, EdgeWrapper, Plain } from "./util/edges.js";
3
+ import "./util/index.js";
3
4
  import { PersonVertex } from "./persons.js";
4
5
  import { LocationVertex } from "./locations.js";
5
6
  import { EventVertex } from "./events.js";
@@ -1,5 +1,7 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
+ import "./util/index.js";
2
3
  import { User } from "../other/users.js";
4
+ import "../other/index.js";
3
5
  import { BelongsTo } from "./properties/belongs-to.js";
4
6
  import { Moment } from "moment";
5
7
 
@@ -1,5 +1,6 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
2
  import { EdgeWrapper, Plain, Wrapped } from "./util/edges.js";
3
+ import "./util/index.js";
3
4
  import { Day } from "./properties/days.js";
4
5
  import { Interval } from "./properties/intervals.js";
5
6
  import { Tag } from "./properties/tags.js";
@@ -2,6 +2,7 @@ import { Collection, Vertex } from "./util/vertex.js";
2
2
  import { IdKey, InternalIdKey } from "../../types/common/index.js";
3
3
  import { DeepVertexExport, DeepVertexExportOmitPrivateId, MixedVertexExport, MixedWithOptionalIdVertexExport } from "./util/deep-vertex-export/index.js";
4
4
  import { SerializedVertexExport } from "./util/serialized-vertex-export.js";
5
+ import "./util/index.js";
5
6
  import { PeriodVertex } from "./periods.js";
6
7
  import { RootIntervalVertex } from "./root-intervals.js";
7
8
  import { CalendarException, DivisionSettingsVertex } from "./division-settings.js";
@@ -1,5 +1,6 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
2
  import { EdgeWrapper, Plain } from "./util/edges.js";
3
+ import "./util/index.js";
3
4
  import { Day } from "./properties/days.js";
4
5
  import { Tag } from "./properties/tags.js";
5
6
  import { BelongsTo } from "./properties/belongs-to.js";
@@ -1,7 +1,9 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
2
  import { Coalesced, EdgeWrapper } from "./util/edges.js";
3
+ import "./util/index.js";
3
4
  import { Interval } from "./properties/intervals.js";
4
5
  import { Tag } from "./properties/tags.js";
6
+ import "./properties/index.js";
5
7
  import { BelongsTo } from "./properties/belongs-to.js";
6
8
  import { LocationVertex } from "./locations.js";
7
9
  import { EventVertex } from "./events.js";
@@ -1,5 +1,6 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
2
  import { Coalesced, EdgeWrapper } from "./util/edges.js";
3
+ import "./util/index.js";
3
4
  import { BelongsTo } from "./properties/belongs-to.js";
4
5
  import { EventVertex } from "./events.js";
5
6
  import { CourseVertex } from "./courses.js";
@@ -1,5 +1,7 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
+ import "./util/index.js";
2
3
  import { Interval } from "./properties/intervals.js";
4
+ import "./properties/index.js";
3
5
  import { BelongsTo } from "./properties/belongs-to.js";
4
6
  import { Moment } from "moment";
5
7
 
@@ -7,6 +9,7 @@ import { Moment } from "moment";
7
9
  type PeriodVertex = VertexFactory<'periods', BelongsTo & {
8
10
  ranges: Interval<string | Moment | Date>[];
9
11
  displayIndex?: number;
12
+ inline?: boolean;
10
13
  }>;
11
14
  //#endregion
12
15
  export { PeriodVertex };
@@ -1,5 +1,6 @@
1
1
  import { VertexFactory } from "./util/vertex.js";
2
2
  import { EdgeWrapper, Plain } from "./util/edges.js";
3
+ import "./util/index.js";
3
4
  import { Tag } from "./properties/tags.js";
4
5
  import { BelongsTo } from "./properties/belongs-to.js";
5
6
  import { GroupVertex } from "./groups.js";