@dartcom/ui-kit 10.5.8 → 10.5.10

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 (352) hide show
  1. package/README.md +5 -100
  2. package/dist/_virtual/_commonjsHelpers.esm.js +1 -0
  3. package/dist/_virtual/index.esm.js +1 -0
  4. package/dist/_virtual/index.esm2.js +1 -0
  5. package/dist/_virtual/index.esm3.js +1 -0
  6. package/dist/_virtual/index.esm4.js +1 -0
  7. package/dist/_virtual/index.esm5.js +1 -0
  8. package/dist/_virtual/index.esm6.js +1 -0
  9. package/dist/_virtual/leaflet-arrows.esm.js +1 -0
  10. package/dist/_virtual/leaflet-arrows.esm2.js +1 -0
  11. package/dist/_virtual/leaflet-src.esm.js +1 -0
  12. package/dist/_virtual/leaflet-src.esm2.js +1 -0
  13. package/dist/_virtual/leaflet.polylineoffset.esm.js +1 -0
  14. package/dist/_virtual/leaflet.polylineoffset.esm2.js +1 -0
  15. package/dist/_virtual/papaparse.min.esm.js +1 -0
  16. package/dist/_virtual/papaparse.min.esm2.js +1 -0
  17. package/dist/_virtual/screenfull.esm.js +1 -0
  18. package/dist/_virtual/screenfull.esm2.js +1 -0
  19. package/dist/_virtual/use-sync-external-store-shim.development.esm.js +1 -0
  20. package/dist/_virtual/use-sync-external-store-shim.production.esm.js +1 -0
  21. package/dist/_virtual/uuid.esm.js +1 -0
  22. package/dist/components/accordion/accordion.esm.js +1 -0
  23. package/dist/components/alert-dialog/alert-dialog.esm.js +1 -0
  24. package/dist/components/buttons/button/button.esm.js +1 -0
  25. package/dist/components/buttons/delete/delete.esm.js +1 -0
  26. package/dist/components/buttons/delete/types.d.ts +1 -2
  27. package/dist/components/buttons/delete/types.d.ts.map +1 -1
  28. package/dist/components/buttons/icon/constants.esm.js +1 -0
  29. package/dist/components/buttons/icon/icon.esm.js +1 -0
  30. package/dist/components/buttons/upload/styles.esm.js +1 -0
  31. package/dist/components/buttons/upload/upload.esm.js +1 -0
  32. package/dist/components/card/card.esm.js +1 -0
  33. package/dist/components/checkbox/checkbox.esm.js +1 -0
  34. package/dist/components/copy-text/copy-text.esm.js +1 -0
  35. package/dist/components/copy-text/styles.esm.js +1 -0
  36. package/dist/components/date-field/date-field.esm.js +1 -0
  37. package/dist/components/drag-list/drag-list.esm.js +1 -0
  38. package/dist/components/drag-list/draggable/draggable.esm.js +1 -0
  39. package/dist/components/draggable-container/constants.esm.js +1 -0
  40. package/dist/components/draggable-container/draggable-container.d.ts.map +1 -1
  41. package/dist/components/draggable-container/draggable-container.esm.js +1 -0
  42. package/dist/components/error-boundary/error-boundary.esm.js +1 -0
  43. package/dist/components/form/error-message/error-message.esm.js +1 -0
  44. package/dist/components/form/form.esm.js +1 -0
  45. package/dist/components/form/hooks/useFormContext.esm.js +1 -0
  46. package/dist/components/input/input.esm.js +1 -0
  47. package/dist/components/layers/leaflet/config/constants.esm.js +1 -0
  48. package/dist/components/layers/leaflet/layers/POI/constants.esm.js +1 -0
  49. package/dist/components/layers/leaflet/layers/POI/utils.esm.js +1 -0
  50. package/dist/components/layers/leaflet/layers/admin-area/utils.esm.js +1 -0
  51. package/dist/components/layers/leaflet/layers/building/utils.esm.js +1 -0
  52. package/dist/components/layers/leaflet/layers/builtup-area/utils.esm.js +1 -0
  53. package/dist/components/layers/leaflet/layers/camera/config/constants.esm.js +1 -0
  54. package/dist/components/layers/leaflet/layers/camera/lib/utils.esm.js +1 -0
  55. package/dist/components/layers/leaflet/layers/city-POI/utils.esm.js +1 -0
  56. package/dist/components/layers/leaflet/layers/condition/types.esm.js +1 -0
  57. package/dist/components/layers/leaflet/layers/condition/utils.esm.js +1 -0
  58. package/dist/components/layers/leaflet/layers/facility-area/utils.esm.js +1 -0
  59. package/dist/components/layers/leaflet/layers/landuse-area/constants.esm.js +1 -0
  60. package/dist/components/layers/leaflet/layers/landuse-area/utils.esm.js +1 -0
  61. package/dist/components/layers/leaflet/layers/lane-marking-arrow/utils.esm.js +1 -0
  62. package/dist/components/layers/leaflet/layers/lane-marking-line/constants.esm.js +1 -0
  63. package/dist/components/layers/leaflet/layers/lane-marking-line/utils.esm.js +1 -0
  64. package/dist/components/layers/leaflet/layers/lane-marking-poly/utils.esm.js +1 -0
  65. package/dist/components/layers/leaflet/layers/link/constants.esm.js +1 -0
  66. package/dist/components/layers/leaflet/layers/link/utils.esm.js +1 -0
  67. package/dist/components/layers/leaflet/layers/nature-field/constants.esm.js +1 -0
  68. package/dist/components/layers/leaflet/layers/nature-field/utils.esm.js +1 -0
  69. package/dist/components/layers/leaflet/layers/nature-forest/constants.esm.js +1 -0
  70. package/dist/components/layers/leaflet/layers/nature-forest/utils.esm.js +1 -0
  71. package/dist/components/layers/leaflet/layers/ocean-area/utils.esm.js +1 -0
  72. package/dist/components/layers/leaflet/layers/one-way/utils.esm.js +1 -0
  73. package/dist/components/layers/leaflet/layers/parking-line/utils.esm.js +1 -0
  74. package/dist/components/layers/leaflet/layers/pillar/config/constants.esm.js +1 -0
  75. package/dist/components/layers/leaflet/layers/pillar/lib/utils.esm.js +1 -0
  76. package/dist/components/layers/leaflet/layers/point-address/utils.esm.js +1 -0
  77. package/dist/components/layers/leaflet/layers/railroad/utils.esm.js +1 -0
  78. package/dist/components/layers/leaflet/layers/road-poly/constants.esm.js +1 -0
  79. package/dist/components/layers/leaflet/layers/road-poly/types.esm.js +1 -0
  80. package/dist/components/layers/leaflet/layers/road-poly/utils.esm.js +1 -0
  81. package/dist/components/layers/leaflet/layers/traffic-sign/config/constants.esm.js +1 -0
  82. package/dist/components/layers/leaflet/layers/traffic-sign/lib/utils.esm.js +1 -0
  83. package/dist/components/layers/leaflet/layers/traffic-signal/config/constants.esm.js +1 -0
  84. package/dist/components/layers/leaflet/layers/traffic-signal/lib/utils.esm.js +1 -0
  85. package/dist/components/layers/leaflet/layers/water-area/utils.esm.js +1 -0
  86. package/dist/components/layers/leaflet/layers/water-link/utils.esm.js +1 -0
  87. package/dist/components/layers/leaflet/leaflet.esm.js +1 -0
  88. package/dist/components/layers/leaflet/lib/types.d.ts +3 -4
  89. package/dist/components/layers/leaflet/lib/types.d.ts.map +1 -1
  90. package/dist/components/layers/leaflet/lib/types.esm.js +1 -0
  91. package/dist/components/layers/leaflet/lib/utils.esm.js +1 -0
  92. package/dist/components/layers/leaflet/scene.yaml.esm.js +1 -0
  93. package/dist/components/layers/leaflet/services/tangram-layer.esm.js +1 -0
  94. package/dist/components/list/list.esm.js +1 -0
  95. package/dist/components/loader/loader.esm.js +1 -0
  96. package/dist/components/modal/modal.esm.js +1 -0
  97. package/dist/components/modal/styles.esm.js +1 -0
  98. package/dist/components/no-data/no-data.esm.js +1 -0
  99. package/dist/components/paragraph/paragraph.esm.js +1 -0
  100. package/dist/components/paragraph/styles.esm.js +1 -0
  101. package/dist/components/select/select.esm.js +1 -0
  102. package/dist/components/tabs/tabs.esm.js +1 -0
  103. package/dist/components/text-field/text-field.esm.js +1 -0
  104. package/dist/components/uploader/csv/csv.esm.js +1 -0
  105. package/dist/components/uploader/excel/excel.esm.js +1 -0
  106. package/dist/configs/global/constants.esm.js +1 -0
  107. package/dist/configs/global/global.esm.js +1 -0
  108. package/dist/constants/api.esm.js +1 -0
  109. package/dist/constants/map.esm.js +1 -0
  110. package/dist/constants/schema.esm.js +1 -0
  111. package/dist/index.cjs +110 -18
  112. package/dist/index.esm.js +1 -33
  113. package/dist/layouts/auth/auth.esm.js +1 -0
  114. package/dist/lib/hooks/useDeviceType.esm.js +1 -0
  115. package/dist/lib/hooks/useGetUser.esm.js +1 -0
  116. package/dist/lib/hooks/useShowErrorSnackbar.esm.js +1 -0
  117. package/dist/lib/hooks/useShowSnackbar.esm.js +1 -0
  118. package/dist/lib/hooks/useSignIn.esm.js +1 -0
  119. package/dist/lib/hooks/useSignOut.esm.js +1 -0
  120. package/dist/lib/types.esm.js +1 -0
  121. package/dist/lib/utils.esm.js +1 -0
  122. package/dist/library/leaflet-arrows.esm.js +1 -0
  123. package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.esm.js +1 -0
  124. package/dist/node_modules/@dnd-kit/core/dist/core.esm.esm.js +1 -0
  125. package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.esm.js +1 -0
  126. package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.esm.js +1 -0
  127. package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.esm.js +1 -0
  128. package/dist/node_modules/@hookform/error-message/dist/index.esm.esm.js +1 -0
  129. package/dist/node_modules/@hookform/resolvers/dist/resolvers.esm.js +1 -0
  130. package/dist/node_modules/@hookform/resolvers/yup/dist/yup.esm.js +1 -0
  131. package/dist/node_modules/@react-leaflet/core/lib/component.esm.js +1 -0
  132. package/dist/node_modules/@react-leaflet/core/lib/context.esm.js +1 -0
  133. package/dist/node_modules/@react-leaflet/core/lib/control.esm.js +1 -0
  134. package/dist/node_modules/@react-leaflet/core/lib/element.esm.js +1 -0
  135. package/dist/node_modules/@reactuses/core/dist/index.esm.js +1 -0
  136. package/dist/node_modules/@tanstack/query-core/build/modern/focusManager.esm.js +1 -0
  137. package/dist/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.esm.js +1 -0
  138. package/dist/node_modules/@tanstack/query-core/build/modern/mutation.esm.js +1 -0
  139. package/dist/node_modules/@tanstack/query-core/build/modern/mutationCache.esm.js +1 -0
  140. package/dist/node_modules/@tanstack/query-core/build/modern/mutationObserver.esm.js +1 -0
  141. package/dist/node_modules/@tanstack/query-core/build/modern/notifyManager.esm.js +1 -0
  142. package/dist/node_modules/@tanstack/query-core/build/modern/onlineManager.esm.js +1 -0
  143. package/dist/node_modules/@tanstack/query-core/build/modern/query.esm.js +1 -0
  144. package/dist/node_modules/@tanstack/query-core/build/modern/queryCache.esm.js +1 -0
  145. package/dist/node_modules/@tanstack/query-core/build/modern/queryClient.esm.js +1 -0
  146. package/dist/node_modules/@tanstack/query-core/build/modern/queryObserver.esm.js +1 -0
  147. package/dist/node_modules/@tanstack/query-core/build/modern/removable.esm.js +1 -0
  148. package/dist/node_modules/@tanstack/query-core/build/modern/retryer.esm.js +1 -0
  149. package/dist/node_modules/@tanstack/query-core/build/modern/subscribable.esm.js +1 -0
  150. package/dist/node_modules/@tanstack/query-core/build/modern/thenable.esm.js +1 -0
  151. package/dist/node_modules/@tanstack/query-core/build/modern/timeoutManager.esm.js +1 -0
  152. package/dist/node_modules/@tanstack/query-core/build/modern/utils.esm.js +1 -0
  153. package/dist/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.esm.js +1 -0
  154. package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.esm.js +1 -0
  155. package/dist/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.esm.js +1 -0
  156. package/dist/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.esm.js +1 -0
  157. package/dist/node_modules/@tanstack/react-query/build/modern/suspense.esm.js +1 -0
  158. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.esm.js +1 -0
  159. package/dist/node_modules/@tanstack/react-query/build/modern/useMutation.esm.js +1 -0
  160. package/dist/node_modules/@tanstack/react-query/build/modern/useQuery.esm.js +1 -0
  161. package/dist/node_modules/date-fns/_lib/addLeadingZeros.esm.js +1 -0
  162. package/dist/node_modules/date-fns/_lib/defaultOptions.esm.js +1 -0
  163. package/dist/node_modules/date-fns/_lib/format/formatters.esm.js +1 -0
  164. package/dist/node_modules/date-fns/_lib/format/lightFormatters.esm.js +1 -0
  165. package/dist/node_modules/date-fns/_lib/format/longFormatters.esm.js +1 -0
  166. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.esm.js +1 -0
  167. package/dist/node_modules/date-fns/_lib/normalizeDates.esm.js +1 -0
  168. package/dist/node_modules/date-fns/_lib/protectedTokens.esm.js +1 -0
  169. package/dist/node_modules/date-fns/constants.esm.js +1 -0
  170. package/dist/node_modules/date-fns/constructFrom.esm.js +1 -0
  171. package/dist/node_modules/date-fns/differenceInCalendarDays.esm.js +1 -0
  172. package/dist/node_modules/date-fns/format.esm.js +1 -0
  173. package/dist/node_modules/date-fns/getDayOfYear.esm.js +1 -0
  174. package/dist/node_modules/date-fns/getISOWeek.esm.js +1 -0
  175. package/dist/node_modules/date-fns/getISOWeekYear.esm.js +1 -0
  176. package/dist/node_modules/date-fns/getWeek.esm.js +1 -0
  177. package/dist/node_modules/date-fns/getWeekYear.esm.js +1 -0
  178. package/dist/node_modules/date-fns/isDate.esm.js +1 -0
  179. package/dist/node_modules/date-fns/isSameWeek.esm.js +1 -0
  180. package/dist/node_modules/date-fns/isValid.esm.js +1 -0
  181. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.esm.js +1 -0
  182. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.esm.js +1 -0
  183. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.esm.js +1 -0
  184. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.esm.js +1 -0
  185. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.esm.js +1 -0
  186. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.esm.js +1 -0
  187. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.esm.js +1 -0
  188. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.esm.js +1 -0
  189. package/dist/node_modules/date-fns/locale/en-US/_lib/match.esm.js +1 -0
  190. package/dist/node_modules/date-fns/locale/en-US.esm.js +1 -0
  191. package/dist/node_modules/date-fns/locale/ru/_lib/formatDistance.esm.js +1 -0
  192. package/dist/node_modules/date-fns/locale/ru/_lib/formatLong.esm.js +1 -0
  193. package/dist/node_modules/date-fns/locale/ru/_lib/formatRelative.esm.js +1 -0
  194. package/dist/node_modules/date-fns/locale/ru/_lib/localize.esm.js +1 -0
  195. package/dist/node_modules/date-fns/locale/ru/_lib/match.esm.js +1 -0
  196. package/dist/node_modules/date-fns/locale/ru.esm.js +1 -0
  197. package/dist/node_modules/date-fns/startOfDay.esm.js +1 -0
  198. package/dist/node_modules/date-fns/startOfISOWeek.esm.js +1 -0
  199. package/dist/node_modules/date-fns/startOfISOWeekYear.esm.js +1 -0
  200. package/dist/node_modules/date-fns/startOfWeek.esm.js +1 -0
  201. package/dist/node_modules/date-fns/startOfWeekYear.esm.js +1 -0
  202. package/dist/node_modules/date-fns/startOfYear.esm.js +1 -0
  203. package/dist/node_modules/date-fns/toDate.esm.js +1 -0
  204. package/dist/node_modules/fflate/esm/browser.esm.js +1 -0
  205. package/dist/node_modules/goober/dist/goober.modern.esm.js +1 -0
  206. package/dist/node_modules/js-cookie/dist/js.cookie.esm.js +2 -0
  207. package/dist/node_modules/leaflet/dist/leaflet-src.esm.js +5 -0
  208. package/dist/node_modules/leaflet-area-select/dist/index.esm.js +9 -0
  209. package/dist/node_modules/leaflet-path-drag/dist/index.esm.js +7 -0
  210. package/dist/node_modules/leaflet-polylineoffset/leaflet.polylineoffset.esm.js +1 -0
  211. package/dist/node_modules/leaflet-rotatedmarker/leaflet.rotatedMarker.esm.js +1 -0
  212. package/dist/node_modules/mobx/dist/mobx.esm.esm.js +1 -0
  213. package/dist/node_modules/mobx-react-lite/es/ObserverComponent.esm.js +1 -0
  214. package/dist/node_modules/mobx-react-lite/es/index.esm.js +1 -0
  215. package/dist/node_modules/mobx-react-lite/es/observer.esm.js +1 -0
  216. package/dist/node_modules/mobx-react-lite/es/useObserver.esm.js +1 -0
  217. package/dist/node_modules/mobx-react-lite/es/utils/UniversalFinalizationRegistry.esm.js +1 -0
  218. package/dist/node_modules/mobx-react-lite/es/utils/assertEnvironment.esm.js +1 -0
  219. package/dist/node_modules/mobx-react-lite/es/utils/observerBatching.esm.js +1 -0
  220. package/dist/node_modules/mobx-react-lite/es/utils/observerFinalizationRegistry.esm.js +1 -0
  221. package/dist/node_modules/mobx-react-lite/es/utils/printDebugValue.esm.js +1 -0
  222. package/dist/node_modules/notistack/node_modules/clsx/dist/clsx.m.esm.js +1 -0
  223. package/dist/node_modules/notistack/notistack.esm.esm.js +1 -0
  224. package/dist/node_modules/papaparse/papaparse.min.esm.js +7 -0
  225. package/dist/node_modules/property-expr/index.esm.js +1 -0
  226. package/dist/node_modules/react-copy-to-clipboard-ts/dist/index.esm.js +1 -0
  227. package/dist/node_modules/react-error-boundary/dist/react-error-boundary.esm.js +1 -0
  228. package/dist/node_modules/react-hook-form/dist/index.esm.esm.js +1 -0
  229. package/dist/node_modules/react-leaflet/lib/LayersControl.esm.js +1 -0
  230. package/dist/node_modules/react-leaflet/lib/hooks.esm.js +1 -0
  231. package/dist/node_modules/react-papaparse/dist/react-papaparse.es.esm.js +1 -0
  232. package/dist/node_modules/react-uuid/uuid.esm.js +1 -0
  233. package/dist/node_modules/read-excel-file/modules/read/coordinates.esm.js +1 -0
  234. package/dist/node_modules/read-excel-file/modules/read/dropEmptyColumns.esm.js +1 -0
  235. package/dist/node_modules/read-excel-file/modules/read/dropEmptyRows.esm.js +1 -0
  236. package/dist/node_modules/read-excel-file/modules/read/getData.esm.js +1 -0
  237. package/dist/node_modules/read-excel-file/modules/read/isDateTimestamp.esm.js +1 -0
  238. package/dist/node_modules/read-excel-file/modules/read/parseCell.esm.js +1 -0
  239. package/dist/node_modules/read-excel-file/modules/read/parseCellValue.esm.js +1 -0
  240. package/dist/node_modules/read-excel-file/modules/read/parseCells.esm.js +1 -0
  241. package/dist/node_modules/read-excel-file/modules/read/parseDate.esm.js +1 -0
  242. package/dist/node_modules/read-excel-file/modules/read/parseDimensions.esm.js +1 -0
  243. package/dist/node_modules/read-excel-file/modules/read/parseFilePaths.esm.js +1 -0
  244. package/dist/node_modules/read-excel-file/modules/read/parseProperties.esm.js +1 -0
  245. package/dist/node_modules/read-excel-file/modules/read/parseSharedStrings.esm.js +1 -0
  246. package/dist/node_modules/read-excel-file/modules/read/parseSheet.esm.js +1 -0
  247. package/dist/node_modules/read-excel-file/modules/read/parseStyles.esm.js +1 -0
  248. package/dist/node_modules/read-excel-file/modules/read/readXlsx.esm.js +1 -0
  249. package/dist/node_modules/read-excel-file/modules/read/readXlsxFileBrowser.esm.js +1 -0
  250. package/dist/node_modules/read-excel-file/modules/read/readXlsxFileContents.esm.js +1 -0
  251. package/dist/node_modules/read-excel-file/modules/read/schema/mapToObjects.esm.js +1 -0
  252. package/dist/node_modules/read-excel-file/modules/read/unpackXlsxFileBrowser.esm.js +1 -0
  253. package/dist/node_modules/read-excel-file/modules/types/Boolean.esm.js +1 -0
  254. package/dist/node_modules/read-excel-file/modules/types/Date.esm.js +1 -0
  255. package/dist/node_modules/read-excel-file/modules/types/InvalidError.esm.js +1 -0
  256. package/dist/node_modules/read-excel-file/modules/types/Number.esm.js +1 -0
  257. package/dist/node_modules/read-excel-file/modules/types/String.esm.js +1 -0
  258. package/dist/node_modules/read-excel-file/modules/xml/dom.esm.js +1 -0
  259. package/dist/node_modules/read-excel-file/modules/xml/xlsx.esm.js +1 -0
  260. package/dist/node_modules/read-excel-file/modules/xml/xmlBrowser.esm.js +1 -0
  261. package/dist/node_modules/screenfull/dist/screenfull.esm.js +6 -0
  262. package/dist/node_modules/tangram/dist/tangram.min.esm.js +1 -0
  263. package/dist/node_modules/tiny-case/index.esm.js +1 -0
  264. package/dist/node_modules/toposort/index.esm.js +1 -0
  265. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.esm.js +10 -0
  266. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.esm.js +10 -0
  267. package/dist/node_modules/use-sync-external-store/shim/index.esm.js +1 -0
  268. package/dist/node_modules/yup/index.esm.esm.js +1 -0
  269. package/dist/pages/auth/auth.esm.js +1 -0
  270. package/dist/pages/auth/constants.esm.js +1 -0
  271. package/dist/pages/auth/schema.esm.js +1 -0
  272. package/dist/providers/auth/auth.esm.js +1 -0
  273. package/dist/providers/initialize/initialize.esm.js +1 -0
  274. package/dist/providers/localization/localization.esm.js +1 -0
  275. package/dist/providers/map/map.esm.js +1 -0
  276. package/dist/providers/mobx/mobx.esm.js +1 -0
  277. package/dist/providers/mobx/store.esm.js +1 -0
  278. package/dist/providers/mobx/stores/alert.esm.js +1 -0
  279. package/dist/providers/mobx/stores/auth.esm.js +1 -0
  280. package/dist/providers/mobx/stores/modal.esm.js +1 -0
  281. package/dist/providers/providers.esm.js +1 -0
  282. package/dist/providers/query/query.esm.js +1 -0
  283. package/dist/providers/theme/theme.esm.js +1 -0
  284. package/dist/services/api/api.esm.js +1 -0
  285. package/dist/services/local-state/local-state.esm.js +1 -0
  286. package/dist/services/localization/localization.esm.js +1 -0
  287. package/dist/services/logger/logger.esm.js +1 -0
  288. package/dist/services/map/map.d.ts +18 -0
  289. package/dist/services/map/map.d.ts.map +1 -1
  290. package/dist/services/map/map.esm.js +1 -0
  291. package/dist/services/query/query.esm.js +1 -0
  292. package/package.json +4 -3
  293. package/dist/__test__/types.d.ts +0 -4
  294. package/dist/__test__/types.d.ts.map +0 -1
  295. package/dist/components/accordion/accordion.stories.d.ts +0 -8
  296. package/dist/components/accordion/accordion.stories.d.ts.map +0 -1
  297. package/dist/components/alert-dialog/alert-dialog.stories.d.ts +0 -13
  298. package/dist/components/alert-dialog/alert-dialog.stories.d.ts.map +0 -1
  299. package/dist/components/buttons/button/button.stories.d.ts +0 -10
  300. package/dist/components/buttons/button/button.stories.d.ts.map +0 -1
  301. package/dist/components/buttons/delete/button.spec.d.ts +0 -2
  302. package/dist/components/buttons/delete/button.spec.d.ts.map +0 -1
  303. package/dist/components/buttons/delete/delete.stories.d.ts +0 -10
  304. package/dist/components/buttons/delete/delete.stories.d.ts.map +0 -1
  305. package/dist/components/buttons/icon/icon.stories.d.ts +0 -16
  306. package/dist/components/buttons/icon/icon.stories.d.ts.map +0 -1
  307. package/dist/components/card/card.stories.d.ts +0 -9
  308. package/dist/components/card/card.stories.d.ts.map +0 -1
  309. package/dist/components/checkbox/checkbox.stories.d.ts +0 -8
  310. package/dist/components/checkbox/checkbox.stories.d.ts.map +0 -1
  311. package/dist/components/copy-text/copy-text.stories.d.ts +0 -8
  312. package/dist/components/copy-text/copy-text.stories.d.ts.map +0 -1
  313. package/dist/components/date-field/date-field.stories.d.ts +0 -7
  314. package/dist/components/date-field/date-field.stories.d.ts.map +0 -1
  315. package/dist/components/drag-list/drag-list.stories.d.ts +0 -8
  316. package/dist/components/drag-list/drag-list.stories.d.ts.map +0 -1
  317. package/dist/components/draggable-container/draggable-container.stories.d.ts +0 -10
  318. package/dist/components/draggable-container/draggable-container.stories.d.ts.map +0 -1
  319. package/dist/components/form/form.stories.d.ts +0 -8
  320. package/dist/components/form/form.stories.d.ts.map +0 -1
  321. package/dist/components/layers/leaflet/leaflet.stories.d.ts +0 -8
  322. package/dist/components/layers/leaflet/leaflet.stories.d.ts.map +0 -1
  323. package/dist/components/list/list.stories.d.ts +0 -13
  324. package/dist/components/list/list.stories.d.ts.map +0 -1
  325. package/dist/components/loader/card.stories.d.ts +0 -7
  326. package/dist/components/loader/card.stories.d.ts.map +0 -1
  327. package/dist/components/loader/loader.stories.d.ts +0 -7
  328. package/dist/components/loader/loader.stories.d.ts.map +0 -1
  329. package/dist/components/modal/modal.stories.d.ts +0 -8
  330. package/dist/components/modal/modal.stories.d.ts.map +0 -1
  331. package/dist/components/no-data/no-data.stories.d.ts +0 -7
  332. package/dist/components/no-data/no-data.stories.d.ts.map +0 -1
  333. package/dist/components/select/select.stories.d.ts +0 -8
  334. package/dist/components/select/select.stories.d.ts.map +0 -1
  335. package/dist/components/tabs/tabs.stories.d.ts +0 -7
  336. package/dist/components/tabs/tabs.stories.d.ts.map +0 -1
  337. package/dist/components/uploader/csv/csv.stories.d.ts +0 -8
  338. package/dist/components/uploader/csv/csv.stories.d.ts.map +0 -1
  339. package/dist/components/uploader/excel/excel.stories.d.ts +0 -7
  340. package/dist/components/uploader/excel/excel.stories.d.ts.map +0 -1
  341. package/dist/index.cjs.map +0 -1
  342. package/dist/index.esm.js.map +0 -1
  343. package/dist/lib/hooks/useSignIn.spec.d.ts +0 -2
  344. package/dist/lib/hooks/useSignIn.spec.d.ts.map +0 -1
  345. package/dist/lib/utils.spec.d.ts +0 -2
  346. package/dist/lib/utils.spec.d.ts.map +0 -1
  347. package/dist/pages/auth/auth.stories.d.ts +0 -7
  348. package/dist/pages/auth/auth.stories.d.ts.map +0 -1
  349. package/dist/services/localization/localization.spec.d.ts +0 -2
  350. package/dist/services/localization/localization.spec.d.ts.map +0 -1
  351. package/dist/setupTests.d.ts +0 -1
  352. package/dist/setupTests.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import"react";import"@mui/icons-material/ArrowDownward";import{Box as s}from"@mui/material";import"../../components/alert-dialog/alert-dialog.esm.js";import"@mui/material/IconButton";import"../../components/buttons/delete/delete.esm.js";import"../../components/buttons/icon/icon.esm.js";import"@mui/icons-material/CloudUpload";import"../../components/buttons/upload/styles.esm.js";import o from"../../components/card/card.esm.js";import"../../components/checkbox/checkbox.esm.js";import"../../node_modules/react-copy-to-clipboard-ts/dist/index.esm.js";import"../../lib/types.esm.js";import"../../_virtual/uuid.esm.js";import"../../node_modules/notistack/notistack.esm.esm.js";import"../../providers/mobx/stores/alert.esm.js";import"../../providers/mobx/stores/auth.esm.js";import"../../providers/mobx/stores/modal.esm.js";import"../../providers/mobx/mobx.esm.js";import"axios";import"../../_virtual/leaflet-src.esm.js";import"../../services/query/query.esm.js";import"../../components/copy-text/styles.esm.js";import"@mui/x-date-pickers/DateField";import"../../components/paragraph/styles.esm.js";import"../../node_modules/@dnd-kit/core/dist/core.esm.esm.js";import"../../node_modules/@dnd-kit/sortable/dist/sortable.esm.esm.js";import"../../node_modules/react-error-boundary/dist/react-error-boundary.esm.js";import"../../components/layers/leaflet/lib/types.esm.js";import"../../components/layers/leaflet/layers/condition/types.esm.js";import"../../components/layers/leaflet/layers/landuse-area/constants.esm.js";import"../../components/layers/leaflet/layers/nature-field/constants.esm.js";import"../../components/layers/leaflet/layers/nature-forest/constants.esm.js";import"../../components/layers/leaflet/layers/POI/utils.esm.js";import"../../components/layers/leaflet/layers/traffic-sign/config/constants.esm.js";import"../../components/layers/leaflet/layers/road-poly/types.esm.js";import"../../components/layers/leaflet/layers/road-poly/constants.esm.js";import"../../components/layers/leaflet/config/constants.esm.js";import"../../components/layers/leaflet/scene.yaml.esm.js";import"../../components/modal/modal.esm.js";import"@mui/lab";import"../../node_modules/react-papaparse/dist/react-papaparse.es.esm.js";const t=({children:t})=>e(s,{sx:{display:"flex",alignItems:"center",height:"100vh",width:"100vw",overflow:"hidden"},children:e(s,{sx:{margin:"auto",maxWidth:"400px",width:"100%"},children:e(o,{children:t})})});export{t as default};
@@ -0,0 +1 @@
1
+ import{useTheme as e,useMediaQuery as t}from"@mui/material";const o=()=>{const o=e();return{isMobile:t(o.breakpoints.down("sm")),isTablet:t(o.breakpoints.between("sm","md")),isDesktop:t(o.breakpoints.up("md"))}};export{o as useDeviceType};
@@ -0,0 +1 @@
1
+ import{GlobalConfig as e}from"../../configs/global/global.esm.js";import{useQuery as r}from"../../node_modules/@tanstack/react-query/build/modern/useQuery.esm.js";import{useMutation as t}from"../../node_modules/@tanstack/react-query/build/modern/useMutation.esm.js";const s=()=>r({queryKey:["user"],queryFn:async()=>await e.instance.apiService.get({url:"user/"})}),a=()=>t({mutationKey:["user"],mutationFn:async()=>await e.instance.apiService.get({url:"user/"})});export{s as useGetUser,a as useLazyGetUser};
@@ -0,0 +1 @@
1
+ import{useShowSnackbar as o}from"./useShowSnackbar.esm.js";const r=()=>{const r=o();return o=>{const{response:s}=o;if(s){const{data:o}=s;if(o){const{detail:s}=o;s&&s.forEach(o=>{r({variant:"error",message:o})})}}}};export{r as useShowErrorSnackbar};
@@ -0,0 +1 @@
1
+ import{useSnackbar as t}from"../../node_modules/notistack/notistack.esm.esm.js";const a=()=>{const{enqueueSnackbar:a}=t();return({variant:t,message:e})=>{a({variant:t,message:e,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})}};export{a as useShowSnackbar};
@@ -0,0 +1 @@
1
+ import{GlobalConfig as s}from"../../configs/global/global.esm.js";import{getUrlencodedBody as e,encodeString as o}from"../utils.esm.js";import"../../providers/mobx/stores/alert.esm.js";import"../../providers/mobx/stores/auth.esm.js";import"../../providers/mobx/stores/modal.esm.js";import"../../providers/mobx/mobx.esm.js";import{localStateService as t}from"../../services/local-state/local-state.esm.js";import"axios";import"../../_virtual/leaflet-src.esm.js";import"../../services/query/query.esm.js";import{useMutation as r}from"../../node_modules/@tanstack/react-query/build/modern/useMutation.esm.js";const m=()=>r({mutationKey:["sign-in-mutation"],mutationFn:async({body:{username:t,password:r}})=>{const m=e({username:t,password:o(r)});return await s.instance.apiService.post({url:"token",body:m,config:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}})},onSuccess:({access_token:s,token_type:e})=>{t.save("access_token",s),t.save("token_type",e)}});export{m as useSignIn};
@@ -0,0 +1 @@
1
+ import{GlobalConfig as o}from"../../configs/global/global.esm.js";import{queryService as e}from"../../services/query/query.esm.js";import{useMutation as r}from"../../node_modules/@tanstack/react-query/build/modern/useMutation.esm.js";import{useShowErrorSnackbar as t}from"./useShowErrorSnackbar.esm.js";const s=()=>{const s=t();return r({mutationKey:["logout-mutation"],mutationFn:async e=>await o.instance.apiService.post({url:"logout"}),onError:s,onSuccess:()=>{e.client.invalidateQueries({queryKey:["user"]})}})};export{s as useSignOut};
@@ -0,0 +1 @@
1
+ var e;!function(e){e.CREATE="create",e.UPDATE="update",e.DELETE="delete"}(e||(e={}));export{e as Operations};
@@ -0,0 +1 @@
1
+ import t from"../_virtual/uuid.esm.js";import{enqueueSnackbar as r}from"../node_modules/notistack/notistack.esm.esm.js";const a=t=>{const r=(new Date).getUTCHours();return encodeURIComponent([...t].reduce((a,e,n)=>{const o=(t.charCodeAt(n)-32+r)%95+32;return a+String.fromCharCode(o)},""))},e=t=>new URLSearchParams(Object.entries(t).map(([t,r])=>[t,String(r)])).toString(),n=({variant:t,message:a})=>{r?.({variant:t,message:a,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})},o=async t=>{const r=JSON.stringify(t,null,2);return await navigator.clipboard.writeText(r).then(()=>!0).catch(()=>!1)},i=()=>t(),s=t=>{const r=Math.pow(10,t-1)+1,a=Math.pow(10,t)-1;return-Math.floor(Math.random()*(a-r+1)+r)},c=({entity:t,names:r})=>{const a={};return r.forEach(r=>{a[r]=`${t}_${r}`}),a},m=t=>`https://dalganmap.ru/api-image/images/${t}`;export{o as copyInformation,a as encodeString,c as getEntityNames,m as getImageSrc,s as getNewId,i as getUniqueKey,e as getUrlencodedBody,n as showSnackbar};
@@ -0,0 +1 @@
1
+ import{__module as t}from"../_virtual/leaflet-arrows.esm2.js";import{__require as i}from"../node_modules/leaflet/dist/leaflet-src.esm.js";var a;function s(){return a||(a=1,s=t,function(t,a){s.exports=t(i()),void 0!==a&&a.L&&(a.L.Arrow=t(L))}(function(t){return t.FeatureGroup.extend({options:{distanceUnit:"km",stretchFactor:1,arrowheadLength:4,arrowheadClosingLine:!1,arrowheadDegree:155,clickableWidth:10,validator:function(t){return void 0!==t.latlng&&void 0!==t.distance&&!isNaN(t.distance)},colorScheme:function(){return this.color},circleRadiusInvalidPoint:1e3,color:"#333",opacity:.9,fillOpacity:.9,weight:4,smoothFactor:0,radius:5,defaultPointOptions:{stroke:!1,fillOpacity:.8,fillColor:"#111",radius:7},invalidPointOptions:{stroke:!1,fillOpacity:.8,fillColor:"red",radius:7},drawSourceMarker:!1,sourceMarkerOptions:{stroke:!1,fillOpacity:1,fillColor:"#333",radius:5}},initialize:function(i,a){t.Util.setOptions(this,a),this.setData(i)},onAdd:function(t){this._map=t,this.redraw(),t.on("viewreset",this._reset,this)},onRemove:function(){for(const t in this._layers)this._layers.hasOwnProperty(t)&&this._map.removeLayer(this._layers[t]);void 0!==this._sourceMarker&&this._map.removeLayer(this._sourceMarker),this._map.off("viewreset",this._reset,this)},redraw:function(){if(this._map)if(this._layers={},"function"==typeof this.options.popupContent&&this.bindPopup(this.options.popupContent(this._data)),this._data.valid&&"function"==typeof this.options.colorScheme&&(this.options.color=this.options.colorScheme(this._data)),this._data.distance=parseFloat(this._data.distance),this._data.valid&&this._data.distance&&this._data.angle){const i=[this._data.latlng,this._calculateEndPoint(this._data.latlng,this._data.distance,this._data.angle)],a=this._calculateArrowArray(i[1]),s=t.Util.setOptions({},this.pathOptions);s.opacity=0,s.weight=this.options.clickableWidth;const o=new t.Polyline([i,a],s),e=new t.Polyline([i,a],this.options);this.addLayer(o),this.addLayer(e),this.options.drawSourceMarker&&(void 0===this._sourceMarker?(this.options.sourceMarkerOptions.fillColor=this.color,this._sourceMarker=t.circleMarker(this._data.latlng,this.options.sourceMarkerOptions)):this._sourceMarker.setLatLng(this._data.latlng))}else{let i;const a=this._data.valid?this.options.defaultPointOptions:this.options.invalidPointOptions;i="km"===this.options.distanceUnit.toLowerCase()?t.circle(this._data.latlng,this.options.radius/10,a):t.circleMarker(this._data.latlng,a),this.addLayer(i)}},setAngle:function(t){isNaN(t)?this._data.angle=0:this.options.isWindDegree?(this._data.angle=t-180,"px"===this.options.distanceUnit.toLowerCase()&&(this._data.angle-=90)):this._data.angle=t,this.redraw()},setDistance:function(t){isNaN(t)?this._data.distance=0:this._data.distance=parseFloat(t),this.redraw()},setData:function(t){this._data=t,this.options.validator(this._data)?(this._data.valid=!0,this.setAngle(t.degree)):(this._data.valid=!1,this._data.distance=NaN,this._data.degree=NaN)},_reset:function(){"px"===this.options.distanceUnit.toLowerCase()&&this.redraw()},_calculateEndPoint:function(i,a,s){let o=a*this.options.stretchFactor,e=Math.PI/180,n=180/Math.PI;if("km"===this.options.distanceUnit.toLowerCase()){const a=s*e;o/=6378.137;const r=Math.acos(Math.cos(o)*Math.cos((90-i.lat)*e)+Math.sin((90-i.lat)*e)*Math.sin(o)*Math.cos(a)),h=Math.asin(Math.sin(o)*Math.sin(a)/Math.sin(r));return new t.LatLng(90-r*n,h*n+i.lng)}if("px"===this.options.distanceUnit.toLowerCase()){const a=this._map.latLngToLayerPoint(i),n=s*e,r=t.point(Math.cos(n)*o,Math.sin(n)*o),h=a.add(r);return this._map.layerPointToLatLng(h)}throw Error("calculate end point undefined for distanceUnit: "+this.options.distanceUnit)},_calculateArrowArray:function(i){const a=this._data.angle;void 0!==i.length&&(i=new t.LatLng(i));const s=this._calculateEndPoint(i,this.options.arrowheadLength,a-this.options.arrowheadDegree),o=[s,i,this._calculateEndPoint(i,this.options.arrowheadLength,a+this.options.arrowheadDegree)];return this.options.arrowheadClosingLine&&o.push(s),o}})},window)),t.exports;var s}export{s as __require};
@@ -0,0 +1 @@
1
+ import e,{useState as t,useCallback as n}from"react";const i={display:"none"};function r(t){let{id:n,value:r}=t;return e.createElement("div",{id:n,style:i},r)}function a(t){let{id:n,announcement:i,ariaLiveType:r="assertive"}=t;return e.createElement("div",{id:n,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},i)}function o(){const[e,i]=t("");return{announce:n(e=>{null!=e&&i(e)},[]),announcement:e}}export{r as HiddenText,a as LiveRegion,o as useAnnouncement};
@@ -0,0 +1 @@
1
+ import e,{createContext as t,useMemo as n,memo as r,useReducer as o,useState as i,useRef as a,useCallback as l,useEffect as s,useContext as c}from"react";import{unstable_batchedUpdates as d,createPortal as u}from"react-dom";import{useLatestValue as h,useUniqueId as v,getEventCoordinates as g,getWindow as p,add as f,useIsomorphicLayoutEffect as b,getOwnerDocument as m,isKeyboardEvent as y,subtract as w,useLazyMemo as x,isHTMLElement as D,useNodeRef as C,canUseDOM as E,useInterval as R,usePrevious as S,findFirstFocusableNode as N,useEvent as M,isWindow as A,isNode as T,isDocument as k,isSVGElement as L}from"../../utilities/dist/utilities.esm.esm.js";import{useAnnouncement as O,HiddenText as B,LiveRegion as P}from"../../accessibility/dist/accessibility.esm.esm.js";const z=t(null);function I(e){const t=c(z);s(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}const F={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},K={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function W(t){let{announcements:r=K,container:o,hiddenTextDescribedById:a,screenReaderInstructions:l=F}=t;const{announce:c,announcement:d}=O(),h=v("DndLiveRegion"),[g,p]=i(!1);if(s(()=>{p(!0)},[]),I(n(()=>({onDragStart(e){let{active:t}=e;c(r.onDragStart({active:t}))},onDragMove(e){let{active:t,over:n}=e;r.onDragMove&&c(r.onDragMove({active:t,over:n}))},onDragOver(e){let{active:t,over:n}=e;c(r.onDragOver({active:t,over:n}))},onDragEnd(e){let{active:t,over:n}=e;c(r.onDragEnd({active:t,over:n}))},onDragCancel(e){let{active:t,over:n}=e;c(r.onDragCancel({active:t,over:n}))}}),[c,r])),!g)return null;const f=e.createElement(e.Fragment,null,e.createElement(B,{id:a,value:l.draggable}),e.createElement(P,{id:h,announcement:d}));return o?u(f,o):f}var j;function U(){}function H(e,t){return n(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}function X(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n(()=>[...t].filter(e=>null!=e),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(j||(j={}));const Y=Object.freeze({x:0,y:0});function J(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function q(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function V(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function G(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}function Q(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Z=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Q(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=J(Q(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(q)};function $(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const _=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=$(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(V)};function ee(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Y}function te(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const ne=te(1);const re={ignoreTransform:!1};function oe(e,t){void 0===t&&(t=re);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=p(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),c=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:c,right:s+d,bottom:c+u,left:s}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:l,right:s}=n;return{top:r,left:o,width:i,height:a,bottom:l,right:s}}function ie(e){return oe(e,{ignoreTransform:!0})}function ae(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(k(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!D(o)||L(o))return n;if(n.includes(o))return n;const i=p(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=p(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=p(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function le(e){const[t]=ae(e,1);return null!=t?t:null}function se(e){return E&&e?A(e)?e:T(e)?k(e)||e===m(e).scrollingElement?window:D(e)?e:null:null:null}function ce(e){return A(e)?e.scrollX:e.scrollLeft}function de(e){return A(e)?e.scrollY:e.scrollTop}function ue(e){return{x:ce(e),y:de(e)}}var he;function ve(e){return!(!E||!e)&&e===document.scrollingElement}function ge(e){const t={x:0,y:0},n=ve(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(he||(he={}));const pe={x:.2,y:.2};function fe(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=pe);const{isTop:c,isBottom:d,isLeft:u,isRight:h}=ge(e),v={x:0,y:0},g={x:0,y:0},p=t.height*o.y,f=t.width*o.x;return!c&&i<=t.top+p?(v.y=he.Backward,g.y=r*Math.abs((t.top+p-i)/p)):!d&&s>=t.bottom-p&&(v.y=he.Forward,g.y=r*Math.abs((t.bottom-p-s)/p)),!h&&l>=t.right-f?(v.x=he.Forward,g.x=r*Math.abs((t.right-f-l)/f)):!u&&a<=t.left+f&&(v.x=he.Backward,g.x=r*Math.abs((t.left+f-a)/f)),{direction:v,speed:g}}function be(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function me(e){return e.reduce((e,t)=>f(e,ue(t)),Y)}const ye=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+ce(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+de(t),0)}]];class we{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=ae(t),r=me(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of ye)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class xe{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function De(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var Ce,Ee;function Re(e){e.preventDefault()}function Se(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Ce||(Ce={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Ee||(Ee={}));const Ne={start:[Ee.Space,Ee.Enter],cancel:[Ee.Esc],end:[Ee.Space,Ee.Enter,Ee.Tab]},Me=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ee.Right:return{...n,x:n.x+25};case Ee.Left:return{...n,x:n.x-25};case Ee.Down:return{...n,y:n.y+25};case Ee.Up:return{...n,y:n.y-25}}};class Ae{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new xe(m(t)),this.windowListeners=new xe(p(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ce.Resize,this.handleCancel),this.windowListeners.add(Ce.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ce.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=oe),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);le(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Y)}handleKeyDown(e){if(y(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=Ne,coordinateGetter:i=Me,scrollBehavior:a="smooth"}=r,{code:l}=e;if(o.end.includes(l))return void this.handleEnd(e);if(o.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:s}=n.current,c=s?{x:s.left,y:s.top}:Y;this.referenceCoordinates||(this.referenceCoordinates=c);const d=i(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=w(d,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:l,isLeft:s,isBottom:c,maxScroll:u,minScroll:h}=ge(n),v=be(n),g={x:Math.min(o===Ee.Right?v.right-v.width/2:v.right,Math.max(o===Ee.Right?v.left:v.left+v.width/2,d.x)),y:Math.min(o===Ee.Down?v.bottom-v.height/2:v.bottom,Math.max(o===Ee.Down?v.top:v.top+v.height/2,d.y))},p=o===Ee.Right&&!l||o===Ee.Left&&!s,f=o===Ee.Down&&!c||o===Ee.Up&&!i;if(p&&g.x!==d.x){const e=n.scrollLeft+t.x,i=o===Ee.Right&&e<=u.x||o===Ee.Left&&e>=h.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===Ee.Right?n.scrollLeft-u.x:n.scrollLeft-h.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(f&&g.y!==d.y){const e=n.scrollTop+t.y,i=o===Ee.Down&&e<=u.y||o===Ee.Up&&e>=h.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===Ee.Down?n.scrollTop-u.y:n.scrollTop-h.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,f(w(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Te(e){return Boolean(e&&"distance"in e)}function ke(e){return Boolean(e&&"delay"in e)}Ae.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ne,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class Le{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=p(e);return e instanceof t?e:m(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=m(i),this.documentListeners=new xe(this.document),this.listeners=new xe(n),this.windowListeners=new xe(p(i)),this.initialCoordinates=null!=(r=g(o))?r:Y,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Ce.Resize,this.handleCancel),this.windowListeners.add(Ce.DragStart,Re),this.windowListeners.add(Ce.VisibilityChange,this.handleCancel),this.windowListeners.add(Ce.ContextMenu,Re),this.documentListeners.add(Ce.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ke(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Te(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Ce.Click,Se,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ce.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const l=null!=(t=g(e))?t:Y,s=w(r,l);if(!n&&a){if(Te(a)){if(null!=a.tolerance&&De(s,a.tolerance))return this.handleCancel();if(De(s,a.distance))return this.handleStart()}return ke(a)&&De(s,a.tolerance)?this.handleCancel():void this.handlePending(a,s)}e.cancelable&&e.preventDefault(),i(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Ee.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Oe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Be extends Le{constructor(e){const{event:t}=e,n=m(t.target);super(e,Oe,n)}}Be.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const Pe={move:{name:"mousemove"},end:{name:"mouseup"}};var ze;!function(e){e[e.RightClick=2]="RightClick"}(ze||(ze={}));class Ie extends Le{constructor(e){super(e,Pe,m(e.event.target))}}Ie.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ze.RightClick&&(null==r||r({event:n}),!0)}}];const Fe={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Ke extends Le{constructor(e){super(e,Fe)}static setup(){return window.addEventListener(Fe.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Fe.move.name,e)};function e(){}}}var We,je;function Ue(e){let{acceleration:t,activator:r=We.Pointer,canScroll:o,draggingRect:i,enabled:c,interval:d=5,order:u=je.TreeOrder,pointerCoordinates:h,scrollableAncestors:v,scrollableAncestorRects:g,delta:p,threshold:f}=e;const b=function(e){let{delta:t,disabled:n}=e;const r=S(t);return x(e=>{if(n||!r||!e)return He;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[he.Backward]:e.x[he.Backward]||-1===o.x,[he.Forward]:e.x[he.Forward]||1===o.x},y:{[he.Backward]:e.y[he.Backward]||-1===o.y,[he.Forward]:e.y[he.Forward]||1===o.y}}},[n,t,r])}({delta:p,disabled:!c}),[m,y]=R(),w=a({x:0,y:0}),D=a({x:0,y:0}),C=n(()=>{switch(r){case We.Pointer:return h?{top:h.y,bottom:h.y,left:h.x,right:h.x}:null;case We.DraggableRect:return i}},[r,i,h]),E=a(null),N=l(()=>{const e=E.current;if(!e)return;const t=w.current.x*D.current.x,n=w.current.y*D.current.y;e.scrollBy(t,n)},[]),M=n(()=>u===je.TreeOrder?[...v].reverse():v,[u,v]);s(()=>{if(c&&v.length&&C){for(const e of M){if(!1===(null==o?void 0:o(e)))continue;const n=v.indexOf(e),r=g[n];if(!r)continue;const{direction:i,speed:a}=fe(e,r,C,t,f);for(const e of["x","y"])b[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return y(),E.current=e,m(N,d),w.current=a,void(D.current=i)}w.current={x:0,y:0},D.current={x:0,y:0},y()}else y()},[t,N,o,y,c,d,JSON.stringify(C),JSON.stringify(b),m,v,M,g,JSON.stringify(f)])}Ke.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(We||(We={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(je||(je={}));const He={x:{[he.Backward]:!1,[he.Forward]:!1},y:{[he.Backward]:!1,[he.Forward]:!1}};var Xe,Ye;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Xe||(Xe={})),function(e){e.Optimized="optimized"}(Ye||(Ye={}));const Je=new Map;function qe(e,t){return x(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Ve(e){let{callback:t,disabled:r}=e;const o=M(t),i=n(()=>{if(r||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)},[r]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function Ge(e){return new we(oe(e),e)}function Qe(e,t,r){void 0===t&&(t=Ge);const[o,a]=i(null);function l(){a(n=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=n?n:r)?o:null;const i=t(e);return JSON.stringify(n)===JSON.stringify(i)?n:i})}const c=function(e){let{callback:t,disabled:r}=e;const o=M(t),i=n(()=>{if(r||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)},[o,r]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){l();break}}}}),d=Ve({callback:l});return b(()=>{l(),e?(null==d||d.observe(e),null==c||c.observe(document.body,{childList:!0,subtree:!0})):(null==d||d.disconnect(),null==c||c.disconnect())},[e]),o}const Ze=[];function $e(e,t){void 0===t&&(t=[]);const n=a(null);return s(()=>{n.current=null},t),s(()=>{const t=e!==Y;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?w(e,n.current):Y}function _e(e){return n(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const et=[];function tt(e){let{measure:t}=e;const[r,o]=i(null),a=l(e=>{for(const{target:n}of e)if(D(n)){o(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t]),s=Ve({callback:a}),c=l(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return D(t)?t:e}(e);null==s||s.disconnect(),n&&(null==s||s.observe(n)),o(n?t(n):null)},[t,s]),[d,u]=C(c);return n(()=>({nodeRef:d,rect:r,setRef:u}),[r,d,u])}const nt=[{sensor:Be,options:{}},{sensor:Ae,options:{}}],rt={current:{}},ot={draggable:{measure:ie},droppable:{measure:ie,strategy:Xe.WhileDragging,frequency:Ye.Optimized},dragOverlay:{measure:oe}};class it extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const at={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new it,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:U},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ot,measureDroppableContainers:U,windowRect:null,measuringScheduled:!1},lt=t({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:U,draggableNodes:new Map,over:null,measureDroppableContainers:U}),st=t(at);function ct(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new it}}}function dt(e,t){switch(t.type){case j.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case j.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case j.DragEnd:case j.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case j.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new it(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case j.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new it(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case j.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new it(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function ut(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=c(lt),i=S(r),a=S(null==n?void 0:n.id);return s(()=>{if(!t&&!r&&i&&null!=a){if(!y(i))return;if(document.activeElement===i.target)return;const e=o.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=N(e);if(t){t.focus();break}}})}},[r,t,o,a,i]),null}function ht(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}const vt=t({...Y,scaleX:1,scaleY:1});var gt;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(gt||(gt={}));const pt=r(function(t){var r,c,u,m;let{id:y,accessibility:w,autoScroll:D=!0,children:C,sensors:R=nt,collisionDetection:S=_,measuring:N,modifiers:M,...A}=t;const T=o(dt,void 0,ct),[k,L]=T,[O,B]=function(){const[e]=i(()=>new Set),t=l(t=>(e.add(t),()=>e.delete(t)),[e]);return[l(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[P,I]=i(gt.Uninitialized),F=P===gt.Initialized,{draggable:{active:K,nodes:U,translate:H},droppable:{containers:X}}=k,J=null!=K?U.get(K):null,q=a({initial:null,translated:null}),V=n(()=>{var e;return null!=K?{id:K,data:null!=(e=null==J?void 0:J.data)?e:rt,rect:q}:null},[K,J]),Q=a(null),[Z,$]=i(null),[te,re]=i(null),ie=h(A,Object.values(A)),ce=v("DndDescribedBy",y),de=n(()=>X.getEnabled(),[X]),he=n(()=>({draggable:{...ot.draggable,...null==ge?void 0:ge.draggable},droppable:{...ot.droppable,...null==ge?void 0:ge.droppable},dragOverlay:{...ot.dragOverlay,...null==ge?void 0:ge.dragOverlay}}),[null==(ge=N)?void 0:ge.draggable,null==ge?void 0:ge.droppable,null==ge?void 0:ge.dragOverlay]);var ge;const{droppableRects:pe,measureDroppableContainers:fe,measuringScheduled:be}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[c,d]=i(null),{frequency:u,measure:v,strategy:g}=o,p=a(e),f=function(){switch(g){case Xe.Always:return!1;case Xe.BeforeDragging:return n;default:return!n}}(),b=h(f),m=l(function(e){void 0===e&&(e=[]),b.current||d(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[b]),y=a(null),w=x(t=>{if(f&&!n)return Je;if(!t||t===Je||p.current!==e||null!=c){const t=new Map;for(let n of e){if(!n)continue;if(c&&c.length>0&&!c.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new we(v(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,c,n,f,v]);return s(()=>{p.current=e},[e]),s(()=>{f||m()},[n,f]),s(()=>{c&&c.length>0&&d(null)},[JSON.stringify(c)]),s(()=>{f||"number"!=typeof u||null!==y.current||(y.current=setTimeout(()=>{m(),y.current=null},u))},[u,f,m,...r]),{droppableRects:w,measureDroppableContainers:m,measuringScheduled:null!=c}}(de,{dragging:F,dependencies:[H.x,H.y],config:he.droppable}),ye=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return x(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(U,K),xe=n(()=>te?g(te):null,[te]),De=function(){const e=!1===(null==Z?void 0:Z.autoScrollEnabled),t="object"==typeof D?!1===D.enabled:!1===D,n=F&&!e&&!t;if("object"==typeof D)return{...D,enabled:n};return{enabled:n}}(),Ce=function(e,t){return qe(e,t)}(ye,he.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=a(!1),{x:l,y:s}="boolean"==typeof o?{x:o,y:o}:o;b(()=>{if(!l&&!s||!t)return void(i.current=!1);if(i.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=ee(n(e),r);if(l||(o.x=0),s||(o.y=0),i.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=le(e);t&&t.scrollBy({top:o.y,left:o.x})}},[t,l,s,r,n])}({activeNode:null!=K?U.get(K):null,config:De.layoutShiftCompensation,initialRect:Ce,measure:he.draggable.measure});const Ee=Qe(ye,he.draggable.measure,Ce),Re=Qe(ye?ye.parentElement:null),Se=a({activatorEvent:null,active:null,activeNode:ye,collisionRect:null,collisions:null,droppableRects:pe,draggableNodes:U,draggingNode:null,draggingNodeRect:null,droppableContainers:X,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ne=X.getNodeFor(null==(r=Se.current.over)?void 0:r.id),Me=tt({measure:he.dragOverlay.measure}),Ae=null!=(c=Me.nodeRef.current)?c:ye,Te=F?null!=(u=Me.rect)?u:Ee:null,ke=Boolean(Me.nodeRef.current&&Me.rect),Le=ee(Oe=ke?null:Ee,qe(Oe));var Oe;const Be=_e(Ae?p(Ae):null),Pe=function(e){const t=a(e),n=x(n=>e?n&&n!==Ze&&e&&t.current&&e.parentNode===t.current.parentNode?n:ae(e):Ze,[e]);return s(()=>{t.current=e},[e]),n}(F?null!=Ne?Ne:ye:null),ze=function(e,t){void 0===t&&(t=oe);const[n]=e,r=_e(n?p(n):null),[o,a]=i(et);function l(){a(()=>e.length?e.map(e=>ve(e)?r:new we(t(e),e)):et)}const s=Ve({callback:l});return b(()=>{null==s||s.disconnect(),l(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),o}(Pe),Ie=ht(M,{transform:{x:H.x-Le.x,y:H.y-Le.y,scaleX:1,scaleY:1},activatorEvent:te,active:V,activeNodeRect:Ee,containerNodeRect:Re,draggingNodeRect:Te,over:Se.current.over,overlayNodeRect:Me.rect,scrollableAncestors:Pe,scrollableAncestorRects:ze,windowRect:Be}),Fe=xe?f(xe,H):null,Ke=function(e){const[t,r]=i(null),o=a(e),c=l(e=>{const t=se(e.target);t&&r(e=>e?(e.set(t,ue(t)),new Map(e)):null)},[]);return s(()=>{const t=o.current;if(e!==t){n(t);const i=e.map(e=>{const t=se(e);return t?(t.addEventListener("scroll",c,{passive:!0}),[t,ue(t)]):null}).filter(e=>null!=e);r(i.length?new Map(i):null),o.current=e}return()=>{n(e),n(t)};function n(e){e.forEach(e=>{const t=se(e);null==t||t.removeEventListener("scroll",c)})}},[c,e]),n(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>f(e,t),Y):me(e):Y,[e,t])}(Pe),We=$e(Ke),je=$e(Ke,[Ee]),He=f(Ie,We),Ye=Te?ne(Te,Ie):null,Ge=V&&Ye?S({active:V,collisionRect:Ye,droppableRects:pe,droppableContainers:de,pointerCoordinates:Fe}):null,it=G(Ge,"id"),[at,pt]=i(null),ft=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ke?Ie:f(Ie,je),null!=(m=null==at?void 0:at.rect)?m:null,Ee),bt=a(null),mt=l((e,t)=>{let{sensor:n,options:r}=t;if(null==Q.current)return;const o=U.get(Q.current);if(!o)return;const i=e.nativeEvent,a=new n({active:Q.current,activeNode:o,event:i,options:r,context:Se,onAbort(e){if(!U.get(e))return;const{onDragAbort:t}=ie.current,n={id:e};null==t||t(n),O({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!U.get(e))return;const{onDragPending:o}=ie.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),O({type:"onDragPending",event:i})},onStart(e){const t=Q.current;if(null==t)return;const n=U.get(t);if(!n)return;const{onDragStart:r}=ie.current,o={activatorEvent:i,active:{id:t,data:n.data,rect:q}};d(()=>{null==r||r(o),I(gt.Initializing),L({type:j.DragStart,initialCoordinates:e,active:t}),O({type:"onDragStart",event:o}),$(bt.current),re(i)})},onMove(e){L({type:j.DragMove,coordinates:e})},onEnd:l(j.DragEnd),onCancel:l(j.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=Se.current;let a=null;if(t&&o){const{cancelDrop:l}=ie.current;if(a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===j.DragEnd&&"function"==typeof l){await Promise.resolve(l(a))&&(e=j.DragCancel)}}Q.current=null,d(()=>{L({type:e}),I(gt.Uninitialized),pt(null),$(null),re(null),bt.current=null;const t=e===j.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=ie.current[t];null==e||e(a),O({type:t,event:a})}})}}bt.current=a},[U]),yt=l((e,t)=>(n,r)=>{const o=n.nativeEvent,i=U.get(r);if(null!==Q.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},Q.current=r,mt(n,t))},[U,mt]),wt=function(e,t){return n(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(R,yt);!function(e){s(()=>{if(!E)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(R),b(()=>{Ee&&P===gt.Initializing&&I(gt.Initialized)},[Ee,P]),s(()=>{const{onDragMove:e}=ie.current,{active:t,activatorEvent:n,collisions:r,over:o}=Se.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:He.x,y:He.y},over:o};d(()=>{null==e||e(i),O({type:"onDragMove",event:i})})},[He.x,He.y]),s(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=Se.current;if(!e||null==Q.current||!t||!o)return;const{onDragOver:i}=ie.current,a=r.get(it),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:l};d(()=>{pt(l),null==i||i(s),O({type:"onDragOver",event:s})})},[it]),b(()=>{Se.current={activatorEvent:te,active:V,activeNode:ye,collisionRect:Ye,collisions:Ge,droppableRects:pe,draggableNodes:U,draggingNode:Ae,draggingNodeRect:Te,droppableContainers:X,over:at,scrollableAncestors:Pe,scrollAdjustedTranslate:He},q.current={initial:Te,translated:Ye}},[V,ye,Ge,Ye,U,Ae,Te,pe,X,at,Pe,He]),Ue({...De,delta:H,draggingRect:Ye,pointerCoordinates:Fe,scrollableAncestors:Pe,scrollableAncestorRects:ze});const xt=n(()=>({active:V,activeNode:ye,activeNodeRect:Ee,activatorEvent:te,collisions:Ge,containerNodeRect:Re,dragOverlay:Me,draggableNodes:U,droppableContainers:X,droppableRects:pe,over:at,measureDroppableContainers:fe,scrollableAncestors:Pe,scrollableAncestorRects:ze,measuringConfiguration:he,measuringScheduled:be,windowRect:Be}),[V,ye,Ee,te,Ge,Re,Me,U,X,pe,at,fe,Pe,ze,he,be,Be]),Dt=n(()=>({activatorEvent:te,activators:wt,active:V,activeNodeRect:Ee,ariaDescribedById:{draggable:ce},dispatch:L,draggableNodes:U,over:at,measureDroppableContainers:fe}),[te,wt,V,Ee,L,ce,U,at,fe]);return e.createElement(z.Provider,{value:B},e.createElement(lt.Provider,{value:Dt},e.createElement(st.Provider,{value:xt},e.createElement(vt.Provider,{value:ft},C)),e.createElement(ut,{disabled:!1===(null==w?void 0:w.restoreFocus)})),e.createElement(W,{...w,hiddenTextDescribedById:ce}))}),ft=t(null),bt="button";function mt(e){let{id:t,data:r,disabled:o=!1,attributes:i}=e;const a=v("Draggable"),{activators:l,activatorEvent:s,active:d,activeNodeRect:u,ariaDescribedById:g,draggableNodes:p,over:f}=c(lt),{role:m=bt,roleDescription:y="draggable",tabIndex:w=0}=null!=i?i:{},x=(null==d?void 0:d.id)===t,D=c(x?vt:ft),[E,R]=C(),[S,N]=C(),M=function(e,t){return n(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(l,t),A=h(r);b(()=>(p.set(t,{id:t,key:a,node:E,activatorNode:S,data:A}),()=>{const e=p.get(t);e&&e.key===a&&p.delete(t)}),[p,t]);return{active:d,activatorEvent:s,activeNodeRect:u,attributes:n(()=>({role:m,tabIndex:w,"aria-disabled":o,"aria-pressed":!(!x||m!==bt)||void 0,"aria-roledescription":y,"aria-describedby":g.draggable}),[o,m,w,x,y,g.draggable]),isDragging:x,listeners:o?void 0:M,node:E,over:f,setNodeRef:R,setActivatorNodeRef:N,transform:D}}function yt(){return c(st)}const wt={timeout:25};function xt(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=v("Droppable"),{active:d,dispatch:u,over:g,measureDroppableContainers:p}=c(lt),f=a({disabled:n}),b=a(!1),m=a(null),y=a(null),{disabled:w,updateMeasurementsFor:x,timeout:D}={...wt,...o},E=h(null!=x?x:r),R=Ve({callback:l(()=>{b.current?(null!=y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{p(Array.isArray(E.current)?E.current:[E.current]),y.current=null},D)):b.current=!0},[D]),disabled:w||!d}),S=l((e,t)=>{R&&(t&&(R.unobserve(t),b.current=!1),e&&R.observe(e))},[R]),[N,M]=C(S),A=h(t);return s(()=>{R&&N.current&&(R.disconnect(),b.current=!1,R.observe(N.current))},[N,R]),s(()=>(u({type:j.RegisterDroppable,element:{id:r,key:i,disabled:n,node:N,rect:m,data:A}}),()=>u({type:j.UnregisterDroppable,key:i,id:r})),[r]),s(()=>{n!==f.current.disabled&&(u({type:j.SetDroppableDisabled,id:r,key:i,disabled:n}),f.current.disabled=n)},[r,i,n,u]),{active:d,rect:m,isOver:(null==g?void 0:g.id)===r,node:N,over:g,setNodeRef:M}}export{We as AutoScrollActivator,pt as DndContext,Ee as KeyboardCode,Ae as KeyboardSensor,Ye as MeasuringFrequency,Xe as MeasuringStrategy,Ie as MouseSensor,Be as PointerSensor,Ke as TouchSensor,je as TraversalOrder,ht as applyModifiers,Z as closestCenter,K as defaultAnnouncements,Y as defaultCoordinates,Me as defaultKeyboardCoordinateGetter,F as defaultScreenReaderInstructions,oe as getClientRect,G as getFirstCollision,ae as getScrollableAncestors,_ as rectIntersection,yt as useDndContext,I as useDndMonitor,mt as useDraggable,xt as useDroppable,H as useSensor,X as useSensors};
@@ -0,0 +1 @@
1
+ import"react";const t=t=>{let{transform:o,draggingNodeRect:e,windowRect:r}=t;return e&&r?function(t,o,e){const r={...t};return o.top+t.y<=e.top?r.y=e.top-o.top:o.bottom+t.y>=e.top+e.height&&(r.y=e.top+e.height-o.bottom),o.left+t.x<=e.left?r.x=e.left-o.left:o.right+t.x>=e.left+e.width&&(r.x=e.left+e.width-o.right),r}(o,e,r):o};export{t as restrictToWindowEdges};
@@ -0,0 +1 @@
1
+ import e,{useMemo as t,useRef as r,useEffect as n,useContext as i,useState as o}from"react";import{KeyboardCode as a,useDndContext as d,useDroppable as s,useDraggable as l,getClientRect as c}from"../../core/dist/core.esm.esm.js";import{useUniqueId as u,useIsomorphicLayoutEffect as g,useCombinedRefs as f,isKeyboardEvent as p,CSS as v}from"../../utilities/dist/utilities.esm.esm.js";function x(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function I(e,t){return e.reduce((e,r,n)=>{const i=t.get(r);return i&&(e[n]=i),e},Array(e.length))}function b(e){return null!==e&&e>=0}const m=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const o=x(t,n,r),a=t[i],d=o[i];return d&&a?{x:d.left-a.left,y:d.top-a.top,scaleX:d.width/a.width,scaleY:d.height/a.height}:null},h={scaleX:1,scaleY:1},y=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:i,rects:o,overIndex:a}=e;const d=null!=(t=o[r])?t:n;if(!d)return null;if(i===r){const e=o[a];return e?{x:0,y:r<a?e.top+e.height-(d.top+d.height):e.top-d.top,...h}:null}const s=function(e,t,r){const n=e[t],i=e[t-1],o=e[t+1];if(!n)return 0;if(r<t)return i?n.top-(i.top+i.height):o?o.top-(n.top+n.height):0;return o?o.top-(n.top+n.height):i?n.top-(i.top+i.height):0}(o,i,r);return i>r&&i<=a?{x:0,y:-d.height-s,...h}:i<r&&i>=a?{x:0,y:d.height+s,...h}:{x:0,y:0,...h}};const w="Sortable",R=e.createContext({activeIndex:-1,containerId:w,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:m,disabled:{draggable:!1,droppable:!1}});function D(i){let{children:o,id:a,items:s,strategy:l=m,disabled:c=!1}=i;const{active:f,dragOverlay:p,droppableRects:v,over:x,measureDroppableContainers:b}=d(),h=u(w,a),y=Boolean(null!==p.rect),D=t(()=>s.map(e=>"object"==typeof e&&"id"in e?e.id:e),[s]),O=null!=f,N=f?D.indexOf(f.id):-1,T=x?D.indexOf(x.id):-1,C=r(D),S=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(D,C.current),j=-1!==T&&-1===N||S,A=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(c);g(()=>{S&&O&&b(D)},[S,D,O,b]),n(()=>{C.current=D},[D]);const X=t(()=>({activeIndex:N,containerId:h,disabled:A,disableTransforms:j,items:D,overIndex:T,useDragOverlay:y,sortedRects:I(D,v),strategy:l}),[N,h,A.draggable,A.droppable,j,D,T,v,y,l]);return e.createElement(R.Provider,{value:X},o)}const O=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return x(r,n,i).indexOf(t)},N=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:o,newIndex:a,previousItems:d,previousContainerId:s,transition:l}=e;return!(!l||!n)&&((d===o||i!==a)&&(!!r||a!==i&&t===s))},T={duration:200,easing:"ease"},C="transform",S=v.Transition.toString({property:C,duration:0,easing:"linear"}),j={roleDescription:"sortable"};function A(e){let{animateLayoutChanges:a=N,attributes:d,disabled:u,data:x,getNewIndex:I=O,id:m,strategy:h,resizeObserverConfig:y,transition:w=T}=e;const{items:D,containerId:A,activeIndex:X,disabled:Y,disableTransforms:z,sortedRects:B,overIndex:E,useDragOverlay:L,strategy:F}=i(R),M=function(e,t){var r,n;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(r=null==e?void 0:e.draggable)?r:t.draggable,droppable:null!=(n=null==e?void 0:e.droppable)?n:t.droppable}}(u,Y),P=D.indexOf(m),U=t(()=>({sortable:{containerId:A,index:P,items:D},...x}),[A,x,P,D]),k=t(()=>D.slice(D.indexOf(m)),[D,m]),{rect:q,node:G,isOver:H,setNodeRef:J}=s({id:m,data:U,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:k,...y}}),{active:K,activatorEvent:Q,activeNodeRect:V,attributes:W,setNodeRef:Z,listeners:$,isDragging:_,over:ee,setActivatorNodeRef:te,transform:re}=l({id:m,data:U,attributes:{...j,...d},disabled:M.draggable}),ne=f(J,Z),ie=Boolean(K),oe=ie&&!z&&b(X)&&b(E),ae=!L&&_,de=ae&&oe?re:null,se=oe?null!=de?de:(null!=h?h:F)({rects:B,activeNodeRect:V,activeIndex:X,overIndex:E,index:P}):null,le=b(X)&&b(E)?I({id:m,items:D,activeIndex:X,overIndex:E}):P,ce=null==K?void 0:K.id,ue=r({activeId:ce,items:D,newIndex:le,containerId:A}),ge=D!==ue.current.items,fe=a({active:K,containerId:A,isDragging:_,isSorting:ie,id:m,index:P,items:D,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:w,wasDragging:null!=ue.current.activeId}),pe=function(e){let{disabled:t,index:i,node:a,rect:d}=e;const[s,l]=o(null),u=r(i);return g(()=>{if(!t&&i!==u.current&&a.current){const e=d.current;if(e){const t=c(a.current,{ignoreTransform:!0}),r={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(r.x||r.y)&&l(r)}}i!==u.current&&(u.current=i)},[t,i,a,d]),n(()=>{s&&l(null)},[s]),s}({disabled:!fe,index:P,node:G,rect:q});return n(()=>{ie&&ue.current.newIndex!==le&&(ue.current.newIndex=le),A!==ue.current.containerId&&(ue.current.containerId=A),D!==ue.current.items&&(ue.current.items=D)},[ie,le,A,D]),n(()=>{if(ce===ue.current.activeId)return;if(null!=ce&&null==ue.current.activeId)return void(ue.current.activeId=ce);const e=setTimeout(()=>{ue.current.activeId=ce},50);return()=>clearTimeout(e)},[ce]),{active:K,activeIndex:X,attributes:W,data:U,rect:q,index:P,newIndex:le,items:D,isOver:H,isSorting:ie,isDragging:_,listeners:$,node:G,overIndex:E,over:ee,setNodeRef:ne,setActivatorNodeRef:te,setDroppableNodeRef:J,setDraggableNodeRef:Z,transform:null!=pe?pe:se,transition:function(){if(pe||ge&&ue.current.newIndex===P)return S;if(ae&&!p(Q)||!w)return;if(ie||fe)return v.Transition.toString({...w,property:C});return}()}}a.Down,a.Right,a.Up,a.Left;export{D as SortableContext,x as arrayMove,N as defaultAnimateLayoutChanges,O as defaultNewIndexGetter,m as rectSortingStrategy,A as useSortable,y as verticalListSortingStrategy};
@@ -0,0 +1 @@
1
+ import{useRef as n,useMemo as t,useLayoutEffect as e,useEffect as r,useCallback as o}from"react";function c(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return t(()=>n=>{e.forEach(t=>t(n))},e)}const u="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function i(n){const t=Object.prototype.toString.call(n);return"[object Window]"===t||"[object global]"===t}function l(n){return"nodeType"in n}function a(n){var t,e;return n?i(n)?n:l(n)&&null!=(t=null==(e=n.ownerDocument)?void 0:e.defaultView)?t:window:window}function s(n){const{Document:t}=a(n);return n instanceof t}function f(n){return!i(n)&&n instanceof a(n).HTMLElement}function d(n){return n instanceof a(n).SVGElement}function h(n){return n?i(n)?n.document:l(n)?s(n)?n:f(n)||d(n)?n.ownerDocument:document:document:document}const g=u?e:r;function m(t){const e=n(t);return g(()=>{e.current=t}),o(function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return null==e.current?void 0:e.current(...t)},[])}function w(){const t=n(null);return[o((n,e)=>{t.current=setInterval(n,e)},[]),o(()=>{null!==t.current&&(clearInterval(t.current),t.current=null)},[])]}function y(t,e){void 0===e&&(e=[t]);const r=n(t);return g(()=>{r.current!==t&&(r.current=t)},e),r}function b(e,r){const o=n();return t(()=>{const n=e(o.current);return o.current=n,n},[...r])}function v(t){const e=m(t),r=n(null),c=o(n=>{n!==r.current&&(null==e||e(n,r.current)),r.current=n},[]);return[r,c]}function p(t){const e=n();return r(()=>{e.current=t},[t]),e.current}let S={};function T(n,e){return t(()=>{if(e)return e;const t=null==S[n]?0:S[n]+1;return S[n]=t,n+"-"+t},[n,e])}function x(n){return function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return r.reduce((t,e)=>{const r=Object.entries(e);for(const[e,o]of r){const r=t[e];null!=r&&(t[e]=r+n*o)}return t},{...t})}}const j=x(1),E=x(-1);function X(n){return"clientX"in n&&"clientY"in n}function Y(n){if(!n)return!1;const{KeyboardEvent:t}=a(n.target);return t&&n instanceof t}function A(n){if(!n)return!1;const{TouchEvent:t}=a(n.target);return t&&n instanceof t}function D(n){if(A(n)){if(n.touches&&n.touches.length){const{clientX:t,clientY:e}=n.touches[0];return{x:t,y:e}}if(n.changedTouches&&n.changedTouches.length){const{clientX:t,clientY:e}=n.changedTouches[0];return{x:t,y:e}}}return X(n)?{x:n.clientX,y:n.clientY}:null}const M=Object.freeze({Translate:{toString(n){if(!n)return;const{x:t,y:e}=n;return"translate3d("+(t?Math.round(t):0)+"px, "+(e?Math.round(e):0)+"px, 0)"}},Scale:{toString(n){if(!n)return;const{scaleX:t,scaleY:e}=n;return"scaleX("+t+") scaleY("+e+")"}},Transform:{toString(n){if(n)return[M.Translate.toString(n),M.Scale.toString(n)].join(" ")}},Transition:{toString(n){let{property:t,duration:e,easing:r}=n;return t+" "+e+"ms "+r}}}),O="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function I(n){return n.matches(O)?n:n.querySelector(O)}export{M as CSS,j as add,u as canUseDOM,I as findFirstFocusableNode,D as getEventCoordinates,h as getOwnerDocument,a as getWindow,X as hasViewportRelativeCoordinates,s as isDocument,f as isHTMLElement,Y as isKeyboardEvent,l as isNode,d as isSVGElement,A as isTouchEvent,i as isWindow,E as subtract,c as useCombinedRefs,m as useEvent,w as useInterval,g as useIsomorphicLayoutEffect,y as useLatestValue,b as useLazyMemo,v as useNodeRef,p as usePrevious,T as useUniqueId};
@@ -0,0 +1 @@
1
+ import*as e from"react";import{useFormContext as r,get as s}from"../../../react-hook-form/dist/index.esm.esm.js";var n=function(n){var a=n.as,t=n.errors,m=n.name,o=n.message,i=n.render,l=function(e,r){if(null==e)return{};var s,n,a={},t=Object.keys(e);for(n=0;n<t.length;n++)r.indexOf(s=t[n])>=0||(a[s]=e[s]);return a}(n,["as","errors","name","message","render"]),f=r(),c=s(t||f.formState.errors,m);if(!c)return null;var g=c.message,u=c.types,d=Object.assign({},l,{children:g||o});return e.isValidElement(a)?e.cloneElement(a,d):i?i({message:g||o,messages:u}):e.createElement(a||e.Fragment,d)};export{n as ErrorMessage};
@@ -0,0 +1 @@
1
+ import{get as e,set as s}from"../../../react-hook-form/dist/index.esm.esm.js";const t=(s,t,r)=>{if(s&&"reportValidity"in s){const o=e(r,t);s.setCustomValidity(o&&o.message||""),s.reportValidity()}},r=(e,s)=>{for(const r in s.fields){const o=s.fields[r];o&&o.ref&&"reportValidity"in o.ref?t(o.ref,r,e):o&&o.refs&&o.refs.forEach(s=>t(s,r,e))}},o=(t,o)=>{o.shouldUseNativeValidation&&r(t,o);const n={};for(const r in t){const a=e(o.fields,r),f=Object.assign(t[r]||{},{ref:a&&a.ref});if(i(o.names||Object.keys(t),r)){const t=Object.assign({},e(n,r));s(t,"root",f),s(n,r,t)}else s(n,r,f)}return n},i=(e,s)=>{const t=n(s);return e.some(e=>n(e).match(`^${t}\\.\\d+`))};function n(e){return e.replace(/\]|\[/g,"")}export{o as toNestErrors,r as validateFieldsNatively};
@@ -0,0 +1 @@
1
+ import{validateFieldsNatively as e,toNestErrors as t}from"../../dist/resolvers.esm.js";import{appendErrors as r}from"../../../../react-hook-form/dist/index.esm.esm.js";function s(s,o,n){return void 0===n&&(n={}),function(a,i,c){try{return Promise.resolve(function(t,r){try{var u=(null!=o&&o.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(s["sync"===n.mode?"validateSync":"validate"](a,Object.assign({abortEarly:!1},o,{context:i}))).then(function(t){return c.shouldUseNativeValidation&&e({},c),{values:n.raw?Object.assign({},a):t,errors:{}}}))}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return{values:{},errors:t((s=e,o=!c.shouldUseNativeValidation&&"all"===c.criteriaMode,(s.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),o){var s=e[t.path].types,n=s&&s[t.type];e[t.path]=r(t.path,o,e,t.type,n?[].concat(n,t.message):t.message)}return e},{})),c)};var s,o}))}catch(e){return Promise.reject(e)}}}export{s as yupResolver};
@@ -0,0 +1 @@
1
+ import t,{forwardRef as n,useImperativeHandle as e}from"react";import"react-dom";import{LeafletContext as r}from"./context.esm.js";function o(o){function c(n,c){const{instance:m,context:u}=o(n).current;e(c,()=>m);const{children:i}=n;return null==i?null:t.createElement(r,{value:u},i)}return n(c)}export{o as createContainerComponent};
@@ -0,0 +1 @@
1
+ import{use as e,createContext as n}from"react";function t(e,n){return Object.freeze({...e,...n})}const o=n(null);function r(){const n=e(o);if(null==n)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return n}export{o as LeafletContext,t as extendContext,r as useLeafletContext};
@@ -0,0 +1 @@
1
+ import{useRef as n,useEffect as t}from"react";import{useLeafletContext as o}from"./context.esm.js";function r(r){return function(e){const i=o(),c=r(e,i),{instance:u}=c.current,m=n(e.position),{position:s}=e;return t(function(){return u.addTo(i.map),function(){u.remove()}},[i.map,u]),t(function(){null!=s&&s!==m.current&&(u.setPosition(s),m.current=s)},[u,s]),c}}export{r as createControlHook};
@@ -0,0 +1 @@
1
+ import{useRef as n,useEffect as r}from"react";function t(n,r,t){return Object.freeze({instance:n,context:r,container:t})}function c(t,c){return null==c?function(r,c){const e=n(void 0);return e.current||(e.current=t(r,c)),e}:function(e,u){const o=n(void 0);o.current||(o.current=t(e,u));const i=n(e),{instance:f}=o.current;return r(function(){i.current!==e&&(c(f,e,i.current),i.current=e)},[f,e,c]),o}}export{c as createElementHook,t as createElementObject};
@@ -0,0 +1 @@
1
+ import e,{useRef as n}from"react";import"../../../js-cookie/dist/js.cookie.esm.js";import{s as t}from"../../../../_virtual/index.esm.js";import"../../../../_virtual/screenfull.esm.js";var r,i;"development"===process.env.NODE_ENV||process.env.NODE_ENV;const o="undefined"!=typeof window,s="undefined"!=typeof navigator;o&&(null==(i=window)||null==(r=i.navigator)?void 0:r.userAgent)&&/iP(?:ad|hone|od)/.test(window.navigator.userAgent);const d=s?navigator:void 0;function c(e){return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}d&&(d.connection||d.mozConnection||d.webkitConnection);const u=()=>{const e=n({}).current,r=n({width:0,height:0}),i=t.useSyncExternalStore(c,()=>{const n={width:window.innerWidth,height:window.innerHeight};return((n,t)=>{for(const r in e){const e=r;if(t[e]!==n[e])return!1}return!0})(r.current,n)?r.current:(r.current=n,n)},()=>r.current);return{get width(){return e.width=!0,i.width},get height(){return e.height=!0,i.height}}};e.use;export{u as useWindowSize};
@@ -0,0 +1 @@
1
+ import{Subscribable as s}from"./subscribable.esm.js";import{isServer as e}from"./utils.esm.js";var t=class extends s{#s;#e;#t;constructor(){super(),this.#t=s=>{if(!e&&window.addEventListener){const e=()=>s();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(s){this.#t=s,this.#e?.(),this.#e=s(s=>{"boolean"==typeof s?this.setFocused(s):this.onFocus()})}setFocused(s){this.#s!==s&&(this.#s=s,this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(e=>{e(s)})}isFocused(){return"boolean"==typeof this.#s?this.#s:"hidden"!==globalThis.document?.visibilityState}},i=new t;export{t as FocusManager,i as focusManager};
@@ -0,0 +1 @@
1
+ import{ensureQueryFn as e,addToStart as t,addToEnd as a,addConsumeAwareSignal as n}from"./utils.esm.js";function s(s){return{onFetch:(o,g)=>{const c=o.options,p=o.fetchOptions?.meta?.fetchMore?.direction,l=o.state.data?.pages||[],m=o.state.data?.pageParams||[];let u={pages:[],pageParams:[]},P=0;const f=async()=>{let g=!1;const f=e(o.options,o.fetchOptions),h=async(e,s,r)=>{if(g)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);const i=(()=>{const e={client:o.client,queryKey:o.queryKey,pageParam:s,direction:r?"backward":"forward",meta:o.options.meta};return n(e,()=>o.signal,()=>g=!0),e})(),c=await f(i),{maxPages:p}=o.options,l=r?t:a;return{pages:l(e.pages,c,p),pageParams:l(e.pageParams,s,p)}};if(p&&l.length){const e="backward"===p,t={pages:l,pageParams:m},a=(e?i:r)(c,t);u=await h(t,a,e)}else{const e=s??l.length;do{const e=0===P?m[0]??c.initialPageParam:r(c,u);if(P>0&&null==e)break;u=await h(u,e),P++}while(P<e)}return u};o.options.persister?o.fetchFn=()=>o.options.persister?.(f,{client:o.client,queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},g):o.fetchFn=f}}}function r(e,{pages:t,pageParams:a}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,a[n],a):void 0}function i(e,{pages:t,pageParams:a}){return t.length>0?e.getPreviousPageParam?.(t[0],t,a[0],a):void 0}export{s as infiniteQueryBehavior};
@@ -0,0 +1 @@
1
+ import{notifyManager as t}from"./notifyManager.esm.js";import{Removable as e}from"./removable.esm.js";import{createRetryer as s}from"./retryer.esm.js";var i=class extends e{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#a({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=s({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const a="pending"===this.state.status,o=!this.#i.canStart();try{if(a)e();else{this.#a({type:"pending",variables:t,isPaused:o}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,i);const e=await(this.options.onMutate?.(t,i));e!==this.state.context&&this.#a({type:"pending",context:e,variables:t,isPaused:o})}const s=await this.#i.start();return await(this.#s.config.onSuccess?.(s,t,this.state.context,this,i)),await(this.options.onSuccess?.(s,t,this.state.context,i)),await(this.#s.config.onSettled?.(s,null,this.state.variables,this.state.context,this,i)),await(this.options.onSettled?.(s,null,t,this.state.context,i)),this.#a({type:"success",data:s}),s}catch(e){try{await(this.#s.config.onError?.(e,t,this.state.context,this,i))}catch(t){Promise.reject(t)}try{await(this.options.onError?.(e,t,this.state.context,i))}catch(t){Promise.reject(t)}try{await(this.#s.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,i))}catch(t){Promise.reject(t)}try{await(this.options.onSettled?.(void 0,e,t,this.state.context,i))}catch(t){Promise.reject(t)}throw this.#a({type:"error",error:e}),e}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}export{i as Mutation,a as getDefaultState};
@@ -0,0 +1 @@
1
+ import{notifyManager as t}from"./notifyManager.esm.js";import{Mutation as s}from"./mutation.esm.js";import{matchMutation as e,noop as i}from"./utils.esm.js";import{Subscribable as o}from"./subscribable.esm.js";var n=class extends o{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#s=new Map,this.#e=0}#t;#s;#e;build(t,e,i){const o=new s({client:t,mutationCache:this,mutationId:++this.#e,options:t.defaultMutationOptions(e),state:i});return this.add(o),o}add(t){this.#t.add(t);const s=r(t);if("string"==typeof s){const e=this.#s.get(s);e?e.push(t):this.#s.set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const s=r(t);if("string"==typeof s){const e=this.#s.get(s);if(e)if(e.length>1){const s=e.indexOf(t);-1!==s&&e.splice(s,1)}else e[0]===t&&this.#s.delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=r(t);if("string"==typeof s){const e=this.#s.get(s),i=e?.find(t=>"pending"===t.state.status);return!i||i===t}return!0}runNext(t){const s=r(t);if("string"==typeof s){const e=this.#s.get(s)?.find(s=>s!==t&&s.state.isPaused);return e?.continue()??Promise.resolve()}return Promise.resolve()}clear(){t.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#s.clear()})}getAll(){return Array.from(this.#t)}find(t){const s={exact:!0,...t};return this.getAll().find(t=>e(s,t))}findAll(t={}){return this.getAll().filter(s=>e(t,s))}notify(s){t.batch(()=>{this.listeners.forEach(t=>{t(s)})})}resumePausedMutations(){const s=this.getAll().filter(t=>t.state.isPaused);return t.batch(()=>Promise.all(s.map(t=>t.continue().catch(i))))}};function r(t){return t.options.scope?.id}export{n as MutationCache};
@@ -0,0 +1 @@
1
+ import{getDefaultState as t}from"./mutation.esm.js";import{notifyManager as s}from"./notifyManager.esm.js";import{Subscribable as e}from"./subscribable.esm.js";import{shallowEqualObjects as i,hashKey as r}from"./utils.esm.js";var n=class extends e{#t;#s=void 0;#e;#i;constructor(t,s){super(),this.#t=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#t.defaultMutationOptions(t),i(this.options,s)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#e,observer:this}),s?.mutationKey&&this.options.mutationKey&&r(s.mutationKey)!==r(this.options.mutationKey)?this.reset():"pending"===this.#e?.state.status&&this.#e.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#e?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#n(t)}getCurrentResult(){return this.#s}reset(){this.#e?.removeObserver(this),this.#e=void 0,this.#r(),this.#n()}mutate(t,s){return this.#i=s,this.#e?.removeObserver(this),this.#e=this.#t.getMutationCache().build(this.#t,this.options),this.#e.addObserver(this),this.#e.execute(t)}#r(){const s=this.#e?.state??t();this.#s={...s,isPending:"pending"===s.status,isSuccess:"success"===s.status,isError:"error"===s.status,isIdle:"idle"===s.status,mutate:this.mutate,reset:this.reset}}#n(t){s.batch(()=>{if(this.#i&&this.hasListeners()){const s=this.#s.variables,e=this.#s.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if("success"===t?.type){try{this.#i.onSuccess?.(t.data,s,e,i)}catch(t){Promise.reject(t)}try{this.#i.onSettled?.(t.data,null,s,e,i)}catch(t){Promise.reject(t)}}else if("error"===t?.type){try{this.#i.onError?.(t.error,s,e,i)}catch(t){Promise.reject(t)}try{this.#i.onSettled?.(void 0,t.error,s,e,i)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#s)})})}};export{n as MutationObserver};
@@ -0,0 +1 @@
1
+ import{systemSetTimeoutZero as t}from"./timeoutManager.esm.js";var e=t;function n(){let t=[],n=0,r=t=>{t()},o=t=>{t()},c=e;const a=e=>{n?t.push(e):c(()=>{r(e)})};return{batch:e=>{let a;n++;try{a=e()}finally{n--,n||(()=>{const e=t;t=[],e.length&&c(()=>{o(()=>{e.forEach(t=>{r(t)})})})})()}return a},batchCalls:t=>(...e)=>{a(()=>{t(...e)})},schedule:a,setNotifyFunction:t=>{r=t},setBatchNotifyFunction:t=>{o=t},setScheduler:t=>{c=t}}}var r=n();export{n as createNotifyManager,e as defaultScheduler,r as notifyManager};
@@ -0,0 +1 @@
1
+ import{Subscribable as e}from"./subscribable.esm.js";import{isServer as n}from"./utils.esm.js";var s=class extends e{#e=!0;#n;#s;constructor(){super(),this.#s=e=>{if(!n&&window.addEventListener){const n=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#n||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#s=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},i=new s;export{s as OnlineManager,i as onlineManager};
@@ -0,0 +1 @@
1
+ import{replaceData as t,noop as e,resolveEnabled as s,skipToken as i,resolveStaleTime as r,timeUntilStale as a,ensureQueryFn as n}from"./utils.esm.js";import{notifyManager as o}from"./notifyManager.esm.js";import{createRetryer as h,CancelledError as c,canFetch as u}from"./retryer.esm.js";import{Removable as d}from"./removable.esm.js";var l=class extends d{#t;#e;#s;#i;#r;#a;#n;constructor(t){super(),this.#n=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#s=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=y(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#a,...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const t=y(this.options);void 0!==t.data&&(this.setState(f(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#s.remove(this)}setData(e,s){const i=t(this.state.data,e,this.options);return this.#o({data:i,type:"success",dataUpdatedAt:s?.updatedAt,manual:s?.manual}),i}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){const s=this.#r?.promise;return this.#r?.cancel(t),s?s.then(e).catch(e):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>!1!==s(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===i||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===r(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!a(this.state.dataUpdatedAt,t))}onFocus(){const t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){const t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#r&&(this.#n?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#r?.status())if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise;if(t&&this.setOptions(t),!this.options.queryFn){const t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}"production"!==process.env.NODE_ENV&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const s=new AbortController,i=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#n=!0,s.signal)})},r=()=>{const t=n(this.options,e),s=(()=>{const t={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(t),t})();return this.#n=!1,this.options.persister?this.options.persister(t,s,this):t(s)},a=(()=>{const t={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:r};return i(t),t})();this.options.behavior?.onFetch(a,this),this.#e=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===a.fetchOptions?.meta||this.#o({type:"fetch",meta:a.fetchOptions?.meta}),this.#r=h({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:t=>{t instanceof c&&t.revert&&this.setState({...this.#e,fetchStatus:"idle"}),s.abort()},onFail:(t,e)=>{this.#o({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const t=await this.#r.start();if(void 0===t)throw"production"!==process.env.NODE_ENV&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#s.config.onSuccess?.(t,this),this.#s.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof c){if(t.silent)return this.#r.promise;if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#o({type:"error",error:t}),this.#s.config.onError?.(t,this),this.#s.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#o(t){this.state=(e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...p(e.data,this.options),fetchMeta:t.meta??null};case"success":const s={...e,...f(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?s:void 0,s;case"error":const i=t.error;return{...e,error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),o.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:t})})}};function p(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:u(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function f(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function y(t){const e="function"==typeof t.initialData?t.initialData():t.initialData,s=void 0!==e,i=s?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}export{l as Query,p as fetchState};
@@ -0,0 +1 @@
1
+ import{hashQueryKeyByOptions as e,matchQuery as t}from"./utils.esm.js";import{Query as s}from"./query.esm.js";import{notifyManager as r}from"./notifyManager.esm.js";import{Subscribable as i}from"./subscribable.esm.js";var o=class extends i{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(t,r,i){const o=r.queryKey,u=r.queryHash??e(o,r);let n=this.get(u);return n||(n=new s({client:t,queryKey:o,queryHash:u,options:t.defaultQueryOptions(r),state:i,defaultOptions:t.getQueryDefaults(o)}),this.add(n)),n}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){r.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t(s,e))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(s=>t(e,s)):s}notify(e){r.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){r.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){r.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};export{o as QueryCache};
@@ -0,0 +1 @@
1
+ import{resolveStaleTime as e,functionalUpdate as t,noop as s,hashKey as r,partialMatchKey as u,hashQueryKeyByOptions as i,skipToken as a}from"./utils.esm.js";import{QueryCache as n}from"./queryCache.esm.js";import{MutationCache as h}from"./mutationCache.esm.js";import{focusManager as o}from"./focusManager.esm.js";import{onlineManager as c}from"./onlineManager.esm.js";import{notifyManager as l}from"./notifyManager.esm.js";import{infiniteQueryBehavior as f}from"./infiniteQueryBehavior.esm.js";var y=class{#e;#t;#s;#r;#u;#i;#a;#n;constructor(e={}){this.#e=e.queryCache||new n,this.#t=e.mutationCache||new h,this.#s=e.defaultOptions||{},this.#r=new Map,this.#u=new Map,this.#i=0}mount(){this.#i++,1===this.#i&&(this.#a=o.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#n=c.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,0===this.#i&&(this.#a?.(),this.#a=void 0,this.#n?.(),this.#n=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(t){const s=this.defaultQueryOptions(t),r=this.#e.build(this,s),u=r.state.data;return void 0===u?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(e(s.staleTime,r))&&this.prefetchQuery(s),Promise.resolve(u))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,s,r){const u=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(u.queryHash),a=i?.state.data,n=t(s,a);if(void 0!==n)return this.#e.build(this,u).setData(n,{...r,manual:!0})}setQueriesData(e,t,s){return l.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;l.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const s=this.#e;return l.batch(()=>(s.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},u=l.batch(()=>this.#e.findAll(e).map(e=>e.cancel(r)));return Promise.all(u).then(s).catch(s)}invalidateQueries(e,t={}){return l.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},u=l.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(s)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(u).then(s)}fetchQuery(t){const s=this.defaultQueryOptions(t);void 0===s.retry&&(s.retry=!1);const r=this.#e.build(this,s);return r.isStaleByTime(e(s.staleTime,r))?r.fetch(s):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(s).catch(s)}fetchInfiniteQuery(e){return e.behavior=f(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(s).catch(s)}ensureInfiniteQueryData(e){return e.behavior=f(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return c.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#s}setDefaultOptions(e){this.#s=e}setQueryDefaults(e,t){this.#r.set(r(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],s={};return t.forEach(t=>{u(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#u.set(r(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#u.values()],s={};return t.forEach(t=>{u(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#s.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=i(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===a&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#s.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};export{y as QueryClient};
@@ -0,0 +1 @@
1
+ import{focusManager as t}from"./focusManager.esm.js";import{notifyManager as e}from"./notifyManager.esm.js";import{fetchState as r}from"./query.esm.js";import{Subscribable as s}from"./subscribable.esm.js";import{pendingThenable as i}from"./thenable.esm.js";import{resolveEnabled as n,shallowEqualObjects as a,resolveStaleTime as u,noop as h,isServer as o,isValidTimeout as c,timeUntilStale as l,replaceData as d}from"./utils.esm.js";import{timeoutManager as p}from"./timeoutManager.esm.js";var f=class extends s{constructor(t,e){super(),this.options=e,this.#t=t,this.#e=null,this.#r=i(),this.bindMethods(),this.setOptions(e)}#t;#s=void 0;#i=void 0;#n=void 0;#a;#u;#r;#e;#h;#o;#c;#l;#d;#p;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),y(this.#s,this.options)?this.#y():this.updateResult(),this.#R())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return R(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return R(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#m(),this.#b(),this.#s.removeObserver(this)}setOptions(t){const e=this.options,r=this.#s;if(this.options=this.#t.defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof n(this.options.enabled,this.#s))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#s.setOptions(this.options),e._defaulted&&!a(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});const s=this.hasListeners();s&&m(this.#s,r,this.options,e)&&this.#y(),this.updateResult(),!s||this.#s===r&&n(this.options.enabled,this.#s)===n(e.enabled,this.#s)&&u(this.options.staleTime,this.#s)===u(e.staleTime,this.#s)||this.#Q();const i=this.#I();!s||this.#s===r&&n(this.options.enabled,this.#s)===n(e.enabled,this.#s)&&i===this.#p||this.#g(i)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(e,t);return function(t,e){if(!a(t.getCurrentResult(),e))return!0;return!1}(this,r)&&(this.#n=r,this.#u=this.options,this.#a=this.#s.state),r}getCurrentResult(){return this.#n}trackResult(t,e){return new Proxy(t,{get:(t,r)=>(this.trackProp(r),e?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,r))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#s}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#y({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#y(t){this.#v();let e=this.#s.fetch(this.options,t);return t?.throwOnError||(e=e.catch(h)),e}#Q(){this.#m();const t=u(this.options.staleTime,this.#s);if(o||this.#n.isStale||!c(t))return;const e=l(this.#n.dataUpdatedAt,t)+1;this.#l=p.setTimeout(()=>{this.#n.isStale||this.updateResult()},e)}#I(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#g(e){this.#b(),this.#p=e,!o&&!1!==n(this.options.enabled,this.#s)&&c(this.#p)&&0!==this.#p&&(this.#d=p.setInterval(()=>{(this.options.refetchIntervalInBackground||t.isFocused())&&this.#y()},this.#p))}#R(){this.#Q(),this.#g(this.#I())}#m(){this.#l&&(p.clearTimeout(this.#l),this.#l=void 0)}#b(){this.#d&&(p.clearInterval(this.#d),this.#d=void 0)}createResult(t,e){const s=this.#s,a=this.options,u=this.#n,h=this.#a,o=this.#u,c=t!==s?t.state:this.#i,{state:l}=t;let p,f={...l},R=!1;if(e._optimisticResults){const i=this.hasListeners(),n=!i&&y(t,e),u=i&&m(t,s,e,a);(n||u)&&(f={...f,...r(l.data,t.options)}),"isRestoring"===e._optimisticResults&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:Q,status:I}=f;p=f.data;let g=!1;if(void 0!==e.placeholderData&&void 0===p&&"pending"===I){let t;u?.isPlaceholderData&&e.placeholderData===o?.placeholderData?(t=u.data,g=!0):t="function"==typeof e.placeholderData?e.placeholderData(this.#c?.state.data,this.#c):e.placeholderData,void 0!==t&&(I="success",p=d(u?.data,t,e),R=!0)}if(e.select&&void 0!==p&&!g)if(u&&p===h?.data&&e.select===this.#h)p=this.#o;else try{this.#h=e.select,p=e.select(p),p=d(u?.data,p,e),this.#o=p,this.#e=null}catch(t){this.#e=t}this.#e&&(v=this.#e,p=this.#o,Q=Date.now(),I="error");const T="fetching"===f.fetchStatus,S="pending"===I,O="error"===I,C=S&&T,F=void 0!==p,D={status:I,fetchStatus:f.fetchStatus,isPending:S,isSuccess:"success"===I,isError:O,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:Q,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:T,isRefetching:T&&!S,isLoadingError:O&&!F,isPaused:"paused"===f.fetchStatus,isPlaceholderData:R,isRefetchError:O&&F,isStale:b(t,e),refetch:this.refetch,promise:this.#r,isEnabled:!1!==n(e.enabled,t)};if(this.options.experimental_prefetchInRender){const e=void 0!==D.data,r="error"===D.status&&!e,n=t=>{r?t.reject(D.error):e&&t.resolve(D.data)},a=()=>{const t=this.#r=D.promise=i();n(t)},u=this.#r;switch(u.status){case"pending":t.queryHash===s.queryHash&&n(u);break;case"fulfilled":(r||D.data!==u.value)&&a();break;case"rejected":r&&D.error===u.reason||a()}}return D}updateResult(){const t=this.#n,e=this.createResult(this.#s,this.options);if(this.#a=this.#s.state,this.#u=this.options,void 0!==this.#a.data&&(this.#c=this.#s),a(e,t))return;this.#n=e;this.#T({listeners:(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!this.#f.size)return!0;const s=new Set(r??this.#f);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(e=>{const r=e;return this.#n[r]!==t[r]&&s.has(r)})})()})}#v(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#s)return;const e=this.#s;this.#s=t,this.#i=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#R()}#T(t){e.batch(()=>{t.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#t.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function y(t,e){return function(t,e){return!1!==n(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===e.retryOnMount)}(t,e)||void 0!==t.state.data&&R(t,e,e.refetchOnMount)}function R(t,e,r){if(!1!==n(e.enabled,t)&&"static"!==u(e.staleTime,t)){const s="function"==typeof r?r(t):r;return"always"===s||!1!==s&&b(t,e)}return!1}function m(t,e,r,s){return(t!==e||!1===n(s.enabled,t))&&(!r.suspense||"error"!==t.state.status)&&b(t,r)}function b(t,e){return!1!==n(e.enabled,t)&&t.isStaleByTime(u(e.staleTime,t))}export{f as QueryObserver};
@@ -0,0 +1 @@
1
+ import{timeoutManager as e}from"./timeoutManager.esm.js";import{isValidTimeout as i,isServer as t}from"./utils.esm.js";var m=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),i(this.gcTime)&&(this.#e=e.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(t?1/0:3e5))}clearGcTimeout(){this.#e&&(e.clearTimeout(this.#e),this.#e=void 0)}};export{m as Removable};
@@ -0,0 +1 @@
1
+ import{focusManager as e}from"./focusManager.esm.js";import{onlineManager as n}from"./onlineManager.esm.js";import{pendingThenable as t}from"./thenable.esm.js";import{isServer as r,sleep as o}from"./utils.esm.js";function s(e){return Math.min(1e3*2**e,3e4)}function i(e){return"online"!==(e??"online")||n.isOnline()}var c=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function a(a){let u,l=!1,m=0;const f=t(),h=()=>"pending"!==f.status,p=()=>e.isFocused()&&("always"===a.networkMode||n.isOnline())&&a.canRun(),y=()=>i(a.networkMode)&&a.canRun(),d=e=>{h()||(u?.(),f.resolve(e))},v=e=>{h()||(u?.(),f.reject(e))},j=()=>new Promise(e=>{u=n=>{(h()||p())&&e(n)},a.onPause?.()}).then(()=>{u=void 0,h()||a.onContinue?.()}),w=()=>{if(h())return;let e;const n=0===m?a.initialPromise:void 0;try{e=n??a.fn()}catch(n){e=Promise.reject(n)}Promise.resolve(e).then(d).catch(e=>{if(h())return;const n=a.retry??(r?0:3),t=a.retryDelay??s,i="function"==typeof t?t(m,e):t,c=!0===n||"number"==typeof n&&m<n||"function"==typeof n&&n(m,e);!l&&c?(m++,a.onFail?.(m,e),o(i).then(()=>p()?void 0:j()).then(()=>{l?v(e):w()})):v(e)})};return{promise:f,status:()=>f.status,cancel:e=>{if(!h()){const n=new c(e);v(n),a.onCancel?.(n)}},continue:()=>(u?.(),f),cancelRetry:()=>{l=!0},continueRetry:()=>{l=!1},canStart:y,start:()=>(y()?w():j().then(w),f)}}export{c as CancelledError,i as canFetch,a as createRetryer};
@@ -0,0 +1 @@
1
+ var s=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};export{s as Subscribable};
@@ -0,0 +1 @@
1
+ function e(){let e,t;const s=new Promise((s,n)=>{e=s,t=n});function n(e){Object.assign(s,e),delete s.resolve,delete s.reject}return s.status="pending",s.catch(()=>{}),s.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},s.reject=e=>{n({status:"rejected",reason:e}),t(e)},s}export{e as pendingThenable};
@@ -0,0 +1 @@
1
+ var e={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)},r=class{#e=e;#r=!1;setTimeoutProvider(e){"production"!==process.env.NODE_ENV&&this.#r&&e!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:e}),this.#e=e,"production"!==process.env.NODE_ENV&&(this.#r=!1)}setTimeout(e,r){return"production"!==process.env.NODE_ENV&&(this.#r=!0),this.#e.setTimeout(e,r)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,r){return"production"!==process.env.NODE_ENV&&(this.#r=!0),this.#e.setInterval(e,r)}clearInterval(e){this.#e.clearInterval(e)}},t=new r;function i(e){setTimeout(e,0)}export{r as TimeoutManager,e as defaultTimeoutProvider,i as systemSetTimeoutZero,t as timeoutManager};
@@ -0,0 +1 @@
1
+ import{timeoutManager as t}from"./timeoutManager.esm.js";var e="undefined"==typeof window||"Deno"in globalThis;function n(){}function r(t,e){return"function"==typeof t?t(e):t}function o(t){return"number"==typeof t&&t>=0&&t!==1/0}function i(t,e){return Math.max(t+(e||0)-Date.now(),0)}function u(t,e){return"function"==typeof t?t(e):t}function c(t,e){return"function"==typeof t?t(e):t}function s(t,e){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:u,stale:c}=t;if(u)if(r){if(e.queryHash!==a(u,e.options))return!1}else if(!l(e.queryKey,u))return!1;if("all"!==n){const t=e.isActive();if("active"===n&&!t)return!1;if("inactive"===n&&t)return!1}return("boolean"!=typeof c||e.isStale()===c)&&((!o||o===e.state.fetchStatus)&&!(i&&!i(e)))}function f(t,e){const{exact:n,status:r,predicate:o,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(y(e.options.mutationKey)!==y(i))return!1}else if(!l(e.options.mutationKey,i))return!1}return(!r||e.state.status===r)&&!(o&&!o(e))}function a(t,e){return(e?.queryKeyHashFn||y)(t)}function y(t){return JSON.stringify(t,(t,e)=>O(e)?Object.keys(e).sort().reduce((t,n)=>(t[n]=e[n],t),{}):e)}function l(t,e){return t===e||typeof t==typeof e&&(!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&Object.keys(e).every(n=>l(t[n],e[n])))}var p=Object.prototype.hasOwnProperty;function h(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=g(t)&&g(e);if(!(r||O(t)&&O(e)))return e;const o=(r?t:Object.keys(t)).length,i=r?e:Object.keys(e),u=i.length,c=r?new Array(u):{};let s=0;for(let f=0;f<u;f++){const u=r?f:i[f],a=t[u],y=e[u];if(a===y){c[u]=a,(r?f<o:p.call(t,u))&&s++;continue}if(null===a||null===y||"object"!=typeof a||"object"!=typeof y){c[u]=y;continue}const l=h(a,y,n+1);c[u]=l,l===a&&s++}return o===u&&s===o?t:c}function b(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function g(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function O(t){if(!j(t))return!1;const e=t.constructor;if(void 0===e)return!0;const n=e.prototype;return!!j(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype)}function j(t){return"[object Object]"===Object.prototype.toString.call(t)}function m(e){return new Promise(n=>{t.setTimeout(n,e)})}function d(t,e,n){if("function"==typeof n.structuralSharing)return n.structuralSharing(t,e);if(!1!==n.structuralSharing){if("production"!==process.env.NODE_ENV)try{return h(t,e)}catch(t){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${t}`),t}return h(t,e)}return e}function q(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function S(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var v=Symbol();function k(t,e){return"production"!==process.env.NODE_ENV&&t.queryFn===v&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`),!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==v?t.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`))}function w(t,e){return"function"==typeof t?t(...e):!!t}function F(t,e,n){let r,o=!1;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(r??=e(),o||(o=!0,r.aborted?n():r.addEventListener("abort",n,{once:!0})),r)}),t}export{F as addConsumeAwareSignal,q as addToEnd,S as addToStart,k as ensureQueryFn,r as functionalUpdate,y as hashKey,a as hashQueryKeyByOptions,g as isPlainArray,O as isPlainObject,e as isServer,o as isValidTimeout,f as matchMutation,s as matchQuery,n as noop,l as partialMatchKey,d as replaceData,h as replaceEqualDeep,c as resolveEnabled,u as resolveStaleTime,b as shallowEqualObjects,w as shouldThrowError,v as skipToken,m as sleep,i as timeUntilStale};
@@ -0,0 +1 @@
1
+ import*as e from"react";var r=e.createContext(!1),t=()=>e.useContext(r);r.Provider;export{t as useIsRestoring};
@@ -0,0 +1 @@
1
+ import*as e from"react";import{jsx as r}from"react/jsx-runtime";var t=e.createContext(void 0),o=r=>{const o=e.useContext(t);if(!o)throw new Error("No QueryClient set, use QueryClientProvider to set one");return o},n=({client:o,children:n})=>(e.useEffect(()=>(o.mount(),()=>{o.unmount()}),[o]),r(t.Provider,{value:o,children:n}));export{t as QueryClientContext,n as QueryClientProvider,o as useQueryClient};
@@ -0,0 +1 @@
1
+ import*as e from"react";import"react/jsx-runtime";var t=e.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),r=()=>e.useContext(t);export{r as useQueryErrorResetBoundary};
@@ -0,0 +1 @@
1
+ import*as r from"react";import{shouldThrowError as e}from"../../../query-core/build/modern/utils.esm.js";var t=(r,t,o)=>{const s=o?.state.error&&"function"==typeof r.throwOnError?e(r.throwOnError,[o.state.error,o]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||s)&&(t.isReset()||(r.retryOnMount=!1))},o=e=>{r.useEffect(()=>{e.clearReset()},[e])},s=({result:r,errorResetBoundary:t,throwOnError:o,query:s,suspense:n})=>r.isError&&!t.isReset()&&!r.isFetching&&s&&(n&&void 0===r.data||e(o,[r.error,s]));export{t as ensurePreventErrorBoundaryRetry,s as getHasError,o as useClearResetErrorBoundary};
@@ -0,0 +1 @@
1
+ var e=e=>{if(e.suspense){const i=1e3,t=e=>"static"===e?e:Math.max(e??i,i),s=e.staleTime;e.staleTime="function"==typeof s?(...e)=>t(s(...e)):t(s),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,i))}},i=(e,i)=>e.isLoading&&e.isFetching&&!i,t=(e,i)=>e?.suspense&&i.isPending,s=(e,i,t)=>i.fetchOptimistic(e).catch(()=>{t.clearReset()});export{e as ensureSuspenseTimers,s as fetchOptimistic,t as shouldSuspend,i as willFetch};
@@ -0,0 +1 @@
1
+ import*as e from"react";import{notifyManager as r}from"../../../query-core/build/modern/notifyManager.esm.js";import{noop as t,isServer as s}from"../../../query-core/build/modern/utils.esm.js";import{useQueryClient as o}from"./QueryClientProvider.esm.js";import{useQueryErrorResetBoundary as n}from"./QueryErrorResetBoundary.esm.js";import{ensurePreventErrorBoundaryRetry as u,useClearResetErrorBoundary as i,getHasError as a}from"./errorBoundaryUtils.esm.js";import{useIsRestoring as c}from"./IsRestoringProvider.esm.js";import{ensureSuspenseTimers as l,shouldSuspend as p,fetchOptimistic as m,willFetch as f}from"./suspense.esm.js";function y(y,d,h){if("production"!==process.env.NODE_ENV&&("object"!=typeof y||Array.isArray(y)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const g=c(),q=n(),w=o(),b=w.defaultQueryOptions(y);w.getDefaultOptions().queries?._experimental_beforeQuery?.(b);const R=w.getQueryCache().get(b.queryHash);"production"!==process.env.NODE_ENV&&(b.queryFn||console.error(`[${b.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),b._optimisticResults=g?"isRestoring":"optimistic",l(b),u(b,q,R),i(q);const O=!w.getQueryCache().get(b.queryHash),[j]=e.useState(()=>new d(w,b)),E=j.getOptimisticResult(b),C=!g&&!1!==y.subscribed;if(e.useSyncExternalStore(e.useCallback(e=>{const s=C?j.subscribe(r.batchCalls(e)):t;return j.updateResult(),s},[j,C]),()=>j.getCurrentResult(),()=>j.getCurrentResult()),e.useEffect(()=>{j.setOptions(b)},[b,j]),p(b,E))throw m(b,j,q);if(a({result:E,errorResetBoundary:q,throwOnError:b.throwOnError,query:R,suspense:b.suspense}))throw E.error;if(w.getDefaultOptions().queries?._experimental_afterQuery?.(b,E),b.experimental_prefetchInRender&&!s&&f(E,g)){const e=O?m(b,j,q):R?.promise;e?.catch(t).finally(()=>{j.updateResult()})}return b.notifyOnChangeProps?E:j.trackResult(E)}export{y as useBaseQuery};
@@ -0,0 +1 @@
1
+ import*as r from"react";import{MutationObserver as e}from"../../../query-core/build/modern/mutationObserver.esm.js";import{notifyManager as t}from"../../../query-core/build/modern/notifyManager.esm.js";import{noop as o,shouldThrowError as s}from"../../../query-core/build/modern/utils.esm.js";import{useQueryClient as u}from"./QueryClientProvider.esm.js";function m(m,n){const a=u(),[i]=r.useState(()=>new e(a,m));r.useEffect(()=>{i.setOptions(m)},[i,m]);const c=r.useSyncExternalStore(r.useCallback(r=>i.subscribe(t.batchCalls(r)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=r.useCallback((r,e)=>{i.mutate(r,e).catch(o)},[i]);if(c.error&&s(i.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:l,mutateAsync:c.mutate}}export{m as useMutation};
@@ -0,0 +1 @@
1
+ import{QueryObserver as r}from"../../../query-core/build/modern/queryObserver.esm.js";import{useBaseQuery as e}from"./useBaseQuery.esm.js";function o(o,m){return e(o,r)}export{o as useQuery};
@@ -0,0 +1 @@
1
+ function t(t,r){return(t<0?"-":"")+Math.abs(t).toString().padStart(r,"0")}export{t as addLeadingZeros};
@@ -0,0 +1 @@
1
+ let t={};function e(){return t}export{e as getDefaultOptions};
@@ -0,0 +1 @@
1
+ import{getDayOfYear as t}from"../../getDayOfYear.esm.js";import{getISOWeek as e}from"../../getISOWeek.esm.js";import{getISOWeekYear as n}from"../../getISOWeekYear.esm.js";import{getWeek as r}from"../../getWeek.esm.js";import{getWeekYear as a}from"../../getWeekYear.esm.js";import{addLeadingZeros as o}from"../addLeadingZeros.esm.js";import{lightFormatters as i}from"./lightFormatters.esm.js";const c="midnight",u="noon",s="morning",d="afternoon",f="evening",h="night",m={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){const e=t.getFullYear(),r=e>0?e:1-e;return n.ordinalNumber(r,{unit:"year"})}return i.y(t,e)},Y:function(t,e,n,r){const i=a(t,r),c=i>0?i:1-i;if("YY"===e){return o(c%100,2)}return"Yo"===e?n.ordinalNumber(c,{unit:"year"}):o(c,e.length)},R:function(t,e){const r=n(t);return o(r,e.length)},u:function(t,e){const n=t.getFullYear();return o(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return o(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return o(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return i.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return o(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,a){const i=r(t,a);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):o(i,e.length)},I:function(t,n,r){const a=e(t);return"Io"===n?r.ordinalNumber(a,{unit:"week"}):o(a,n.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):i.d(t,e)},D:function(e,n,r){const a=t(e);return"Do"===n?r.ordinalNumber(a,{unit:"dayOfYear"}):o(a,n.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return o(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return o(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return o(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(a=12===r?u:0===r?c:r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(a=r>=17?f:r>=12?d:r>=4?s:h,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return i.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):i.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):o(r,e.length)},k:function(t,e,n){let r=t.getHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):o(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):i.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):i.s(t,e)},S:function(t,e){return i.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return g(r);case"XXXX":case"XX":return l(r);default:return l(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return g(r);case"xxxx":case"xx":return l(r);default:return l(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+w(r,":");default:return"GMT"+l(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+w(r,":");default:return"GMT"+l(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return o(r,e.length)},T:function(t,e,n){return o(+t,e.length)}};function w(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return 0===i?n+String(a):n+String(a)+e+o(i,2)}function g(t,e){if(t%60==0){return(t>0?"-":"+")+o(Math.abs(t)/60,2)}return l(t,e)}function l(t,e=""){const n=t>0?"-":"+",r=Math.abs(t);return n+o(Math.trunc(r/60),2)+e+o(r%60,2)}export{m as formatters};
@@ -0,0 +1 @@
1
+ import{addLeadingZeros as t}from"../addLeadingZeros.esm.js";const e={y(e,a){const n=e.getFullYear(),r=n>0?n:1-n;return t("yy"===a?r%100:r,a.length)},M(e,a){const n=e.getMonth();return"M"===a?String(n+1):t(n+1,2)},d:(e,a)=>t(e.getDate(),a.length),a(t,e){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];default:return"am"===a?"a.m.":"p.m."}},h:(e,a)=>t(e.getHours()%12||12,a.length),H:(e,a)=>t(e.getHours(),a.length),m:(e,a)=>t(e.getMinutes(),a.length),s:(e,a)=>t(e.getSeconds(),a.length),S(e,a){const n=a.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return t(s,a.length)}};export{e as lightFormatters};
@@ -0,0 +1 @@
1
+ const e=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},t=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},r={p:t,P:(r,i)=>{const a=r.match(/(P+)(p+)?/)||[],d=a[1],h=a[2];if(!h)return e(r,i);let u;switch(d){case"P":u=i.dateTime({width:"short"});break;case"PP":u=i.dateTime({width:"medium"});break;case"PPP":u=i.dateTime({width:"long"});break;default:u=i.dateTime({width:"full"})}return u.replace("{{date}}",e(d,i)).replace("{{time}}",t(h,i))}};export{r as longFormatters};
@@ -0,0 +1 @@
1
+ import{toDate as e}from"../toDate.esm.js";function t(t){const o=e(t),n=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return n.setUTCFullYear(o.getFullYear()),+t-+n}export{t as getTimezoneOffsetInMilliseconds};
@@ -0,0 +1 @@
1
+ import{constructFrom as o}from"../constructFrom.esm.js";function t(t,...n){const r=o.bind(null,t||n.find(o=>"object"==typeof o));return n.map(r)}export{t as normalizeDates};
@@ -0,0 +1 @@
1
+ const t=/^D+$/,n=/^Y+$/,o=["D","DD","YY","YYYY"];function e(n){return t.test(n)}function s(t){return n.test(t)}function r(t,n,e){const s=function(t,n,o){const e="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${e} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,n,e);if(console.warn(s),o.includes(t))throw new RangeError(s)}export{e as isProtectedDayOfYearToken,s as isProtectedWeekYearToken,r as warnOrThrowProtectedError};
@@ -0,0 +1 @@
1
+ const o=6048e5,t=864e5,e=Symbol.for("constructDateFrom");export{e as constructFromSymbol,t as millisecondsInDay,o as millisecondsInWeek};
@@ -0,0 +1 @@
1
+ import{constructFromSymbol as t}from"./constants.esm.js";function n(n,o){return"function"==typeof n?n(o):n&&"object"==typeof n&&t in n?n[t](o):n instanceof Date?new n.constructor(o):new Date(o)}export{n as constructFrom};
@@ -0,0 +1 @@
1
+ import{getTimezoneOffsetInMilliseconds as o}from"./_lib/getTimezoneOffsetInMilliseconds.esm.js";import{normalizeDates as s}from"./_lib/normalizeDates.esm.js";import{millisecondsInDay as t}from"./constants.esm.js";import{startOfDay as m}from"./startOfDay.esm.js";function r(r,e,i){const[n,f]=s(i?.in,r,e),a=m(n),l=m(f),p=+a-o(a),c=+l-o(l);return Math.round((p-c)/t)}export{r as differenceInCalendarDays};
@@ -0,0 +1 @@
1
+ import{getDefaultOptions as e}from"./_lib/defaultOptions.esm.js";import{formatters as t}from"./_lib/format/formatters.esm.js";import{longFormatters as r}from"./_lib/format/longFormatters.esm.js";import{isProtectedWeekYearToken as o,isProtectedDayOfYearToken as n,warnOrThrowProtectedError as a}from"./_lib/protectedTokens.esm.js";import{isValid as s}from"./isValid.esm.js";import{toDate as i}from"./toDate.esm.js";import{enUS as m}from"./locale/en-US.esm.js";const l=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,c=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,f=/^'([^]*?)'?$/,p=/''/g,u=/[a-zA-Z]/;function k(f,p,k){const h=e(),j=h.locale??m,w=h.firstWeekContainsDate??h.locale?.options?.firstWeekContainsDate??1,v=h.weekStartsOn??h.locale?.options?.weekStartsOn??0,d=i(f,k?.in);if(!s(d))throw new RangeError("Invalid time value");let D=p.match(c).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,r[t])(e,j.formatLong)}return e}).join("").match(l).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const r=e[0];if("'"===r)return{isToken:!1,value:g(e)};if(t[r])return{isToken:!0,value:e};if(r.match(u))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return{isToken:!1,value:e}});j.localize.preprocessor&&(D=j.localize.preprocessor(d,D));const T={firstWeekContainsDate:w,weekStartsOn:v,locale:j};return D.map(e=>{if(!e.isToken)return e.value;const r=e.value;(o(r)||n(r))&&a(r,p,String(f));return(0,t[r[0]])(d,r,j.localize,T)}).join("")}function g(e){const t=e.match(f);return t?t[1].replace(p,"'"):e}export{k as format,k as formatDate,t as formatters,r as longFormatters};
@@ -0,0 +1 @@
1
+ import{differenceInCalendarDays as r}from"./differenceInCalendarDays.esm.js";import{startOfYear as e}from"./startOfYear.esm.js";import{toDate as t}from"./toDate.esm.js";function o(o,m){const s=t(o,m?.in);return r(s,e(s))+1}export{o as getDayOfYear};
@@ -0,0 +1 @@
1
+ import{millisecondsInWeek as t}from"./constants.esm.js";import{startOfISOWeek as r}from"./startOfISOWeek.esm.js";import{startOfISOWeekYear as o}from"./startOfISOWeekYear.esm.js";import{toDate as s}from"./toDate.esm.js";function e(e,m){const n=s(e,m?.in),f=+r(n)-+o(n);return Math.round(f/t)+1}export{e as getISOWeek};
@@ -0,0 +1 @@
1
+ import{constructFrom as e}from"./constructFrom.esm.js";import{startOfISOWeek as t}from"./startOfISOWeek.esm.js";import{toDate as r}from"./toDate.esm.js";function s(s,o){const m=r(s,o?.in),i=m.getFullYear(),n=e(m,0);n.setFullYear(i+1,0,4),n.setHours(0,0,0,0);const u=t(n),c=e(m,0);c.setFullYear(i,0,4),c.setHours(0,0,0,0);const l=t(c);return m.getTime()>=u.getTime()?i+1:m.getTime()>=l.getTime()?i:i-1}export{s as getISOWeekYear};
@@ -0,0 +1 @@
1
+ import{millisecondsInWeek as t}from"./constants.esm.js";import{startOfWeek as r}from"./startOfWeek.esm.js";import{startOfWeekYear as o}from"./startOfWeekYear.esm.js";import{toDate as s}from"./toDate.esm.js";function e(e,m){const n=s(e,m?.in),f=+r(n,m)-+o(n,m);return Math.round(f/t)+1}export{e as getWeek};
@@ -0,0 +1 @@
1
+ import{getDefaultOptions as t}from"./_lib/defaultOptions.esm.js";import{constructFrom as e}from"./constructFrom.esm.js";import{startOfWeek as s}from"./startOfWeek.esm.js";import{toDate as o}from"./toDate.esm.js";function r(r,n){const i=o(r,n?.in),a=i.getFullYear(),m=t(),l=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??m.firstWeekContainsDate??m.locale?.options?.firstWeekContainsDate??1,f=e(n?.in||r,0);f.setFullYear(a+1,0,l),f.setHours(0,0,0,0);const u=s(f,n),c=e(n?.in||r,0);c.setFullYear(a,0,l),c.setHours(0,0,0,0);const p=s(c,n);return+i>=+u?a+1:+i>=+p?a:a-1}export{r as getWeekYear};
@@ -0,0 +1 @@
1
+ function t(t){return t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)}export{t as isDate};
@@ -0,0 +1 @@
1
+ import{normalizeDates as r}from"./_lib/normalizeDates.esm.js";import{startOfWeek as t}from"./startOfWeek.esm.js";function e(e,o,m){const[s,i]=r(m?.in,e,o);return+t(s,m)===+t(i,m)}export{e as isSameWeek};
@@ -0,0 +1 @@
1
+ import{isDate as t}from"./isDate.esm.js";import{toDate as e}from"./toDate.esm.js";function o(o){return!(!t(o)&&"number"!=typeof o||isNaN(+e(o)))}export{o as isValid};
@@ -0,0 +1 @@
1
+ function t(t){return(r={})=>{const d=r.width?String(r.width):t.defaultWidth;return t.formats[d]||t.formats[t.defaultWidth]}}export{t as buildFormatLongFn};
@@ -0,0 +1 @@
1
+ function t(t){return(a,e)=>{let n;if("formatting"===(e?.context?String(e.context):"standalone")&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,i=e?.width?String(e.width):a;n=t.formattingValues[i]||t.formattingValues[a]}else{const a=t.defaultWidth,i=e?.width?String(e.width):t.defaultWidth;n=t.values[i]||t.values[a]}return n[t.argumentCallback?t.argumentCallback(a):a]}}export{t as buildLocalizeFn};
@@ -0,0 +1 @@
1
+ function t(t){return(e,r={})=>{const a=r.width,n=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],l=e.match(n);if(!l)return null;const u=l[0],c=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth],s=Array.isArray(c)?function(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r;return}(c,t=>t.test(u)):function(t,e){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r;return}(c,t=>t.test(u));let i;i=t.valueCallback?t.valueCallback(s):s,i=r.valueCallback?r.valueCallback(i):i;return{value:i,rest:e.slice(u.length)}}}export{t as buildMatchFn};
@@ -0,0 +1 @@
1
+ function l(l){return(a,t={})=>{const e=a.match(l.matchPattern);if(!e)return null;const n=e[0],r=a.match(l.parsePattern);if(!r)return null;let u=l.valueCallback?l.valueCallback(r[0]):r[0];u=t.valueCallback?t.valueCallback(u):u;return{value:u,rest:a.slice(n.length)}}}export{l as buildMatchPatternFn};
@@ -0,0 +1 @@
1
+ const o={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},e=(e,t,n)=>{let s;const a=o[e];return s="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+s:s+" ago":s};export{e as formatDistance};
@@ -0,0 +1 @@
1
+ import{buildFormatLongFn as t}from"../../_lib/buildFormatLongFn.esm.js";const m={date:t({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:t({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:t({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};export{m as formatLong};
@@ -0,0 +1 @@
1
+ const e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},t=(t,a,o,r)=>e[t];export{t as formatRelative};
@@ -0,0 +1 @@
1
+ import{buildLocalizeFn as n}from"../../_lib/buildLocalizeFn.esm.js";const e={ordinalNumber:(n,e)=>{const i=Number(n),t=i%100;if(t>20||t<10)switch(t%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:n({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:n({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:n=>n-1}),month:n({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:n({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:n({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};export{e as localize};
@@ -0,0 +1 @@
1
+ import{buildMatchFn as a}from"../../_lib/buildMatchFn.esm.js";import{buildMatchPatternFn as i}from"../../_lib/buildMatchPatternFn.esm.js";const t={ordinalNumber:i({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:a=>parseInt(a,10)}),era:a({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:a({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:a=>a+1}),month:a({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:a({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:a({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};export{t as match};