@overmap-ai/core 1.0.58-export-overmap-reducer.15 → 1.0.58-export-overmap-reducer.16

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.
@@ -1,3 +1,2 @@
1
1
  export * from "./api";
2
2
  export * from "./issue";
3
- export * from "./map";
@@ -436,13 +436,6 @@ var IssueStatus = /* @__PURE__ */ ((IssueStatus2) => {
436
436
  IssueStatus2[IssueStatus2["DONE"] = 4] = "DONE";
437
437
  return IssueStatus2;
438
438
  })(IssueStatus || {});
439
- var MapStyle = /* @__PURE__ */ ((MapStyle2) => {
440
- MapStyle2["LIGHT"] = "LIGHT";
441
- MapStyle2["DARK"] = "DARK";
442
- MapStyle2["SATELLITE"] = "SATELLITE";
443
- MapStyle2["NONE"] = "NONE";
444
- return MapStyle2;
445
- })(MapStyle || {});
446
439
  const VERSION_REDUCER_KEY$1 = "versioning";
447
440
  const latestVersion = () => migrations.length - 1;
448
441
  const initialVersioning = (state) => {
@@ -469,15 +462,15 @@ const wrapMigration = (migrator) => (state) => {
469
462
  };
470
463
  const migrations = [initialVersioning, signOut, signOut, createOutboxState];
471
464
  const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
472
- const initialState$s = {
465
+ const initialState$r = {
473
466
  accessToken: "",
474
467
  refreshToken: "",
475
468
  isLoggedIn: false
476
469
  };
477
470
  const authSlice = createSlice({
478
471
  name: "auth",
479
- initialState: initialState$s,
480
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$s)),
472
+ initialState: initialState$r,
473
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$r)),
481
474
  reducers: {
482
475
  setTokens: (state, action) => {
483
476
  state.accessToken = action.payload.accessToken;
@@ -1121,7 +1114,7 @@ const getLocalRelativeDateString = memoize((date, min2, max2) => {
1121
1114
  return getLocalDateString(date);
1122
1115
  return relative.format(days, "days");
1123
1116
  });
1124
- const initialState$r = {
1117
+ const initialState$q = {
1125
1118
  categories: {},
1126
1119
  usedCategoryColors: [],
1127
1120
  categoryVisibility: {
@@ -1131,8 +1124,8 @@ const initialState$r = {
1131
1124
  };
1132
1125
  const categorySlice = createSlice({
1133
1126
  name: "categories",
1134
- initialState: initialState$r,
1135
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$r)),
1127
+ initialState: initialState$q,
1128
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$q)),
1136
1129
  reducers: {
1137
1130
  setCategories: (state, action) => {
1138
1131
  if (!Array.isArray(action.payload))
@@ -1316,15 +1309,15 @@ function removeAttachments(state, action) {
1316
1309
  delete state.attachments[attachmentId];
1317
1310
  }
1318
1311
  }
1319
- const initialState$q = {
1312
+ const initialState$p = {
1320
1313
  assetTypes: {},
1321
1314
  hiddenAssetTypeIds: {},
1322
1315
  attachments: {}
1323
1316
  };
1324
1317
  const assetTypeSlice = createSlice({
1325
1318
  name: "assetTypes",
1326
- initialState: initialState$q,
1327
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$q)),
1319
+ initialState: initialState$p,
1320
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
1328
1321
  reducers: {
1329
1322
  addAssetType: (state, action) => {
1330
1323
  state.assetTypes[action.payload.offline_id] = action.payload;
@@ -1434,14 +1427,14 @@ const selectAttachmentsOfAssetTypeByType = restructureCreateSelectorWithArgs(
1434
1427
  )
1435
1428
  );
1436
1429
  const assetTypeReducer = assetTypeSlice.reducer;
1437
- const initialState$p = {
1430
+ const initialState$o = {
1438
1431
  assets: {},
1439
1432
  attachments: {}
1440
1433
  };
1441
1434
  const assetSlice = createSlice({
1442
1435
  name: "assets",
1443
- initialState: initialState$p,
1444
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
1436
+ initialState: initialState$o,
1437
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
1445
1438
  reducers: {
1446
1439
  addAsset: (state, action) => {
1447
1440
  state.assets[action.payload.offline_id] = action.payload;
@@ -1614,13 +1607,13 @@ const selectAttachmentsOfAssetByType = restructureCreateSelectorWithArgs(
1614
1607
  )
1615
1608
  );
1616
1609
  const assetReducer = assetSlice.reducer;
1617
- const initialState$o = {
1610
+ const initialState$n = {
1618
1611
  completionsByAssetId: {}
1619
1612
  };
1620
1613
  const assetStageCompletionSlice = createSlice({
1621
1614
  name: "assetStageCompletions",
1622
- initialState: initialState$o,
1623
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
1615
+ initialState: initialState$n,
1616
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
1624
1617
  reducers: {
1625
1618
  addStageCompletion: (state, action) => {
1626
1619
  let stageToCompletionDateMapping = state.completionsByAssetId[action.payload.asset];
@@ -1669,13 +1662,13 @@ const selectCompletedStageIdsForAsset = (asset) => (state) => {
1669
1662
  return Object.keys(state.assetStageCompletionReducer.completionsByAssetId[asset.offline_id] ?? {});
1670
1663
  };
1671
1664
  const assetStageCompletionReducer = assetStageCompletionSlice.reducer;
1672
- const initialState$n = {
1665
+ const initialState$m = {
1673
1666
  stages: {}
1674
1667
  };
1675
1668
  const assetStageSlice = createSlice({
1676
1669
  name: "assetStages",
1677
- initialState: initialState$n,
1678
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
1670
+ initialState: initialState$m,
1671
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$m)),
1679
1672
  reducers: {
1680
1673
  addStages: (state, action) => {
1681
1674
  Object.assign(state.stages, toOfflineIdRecord(action.payload));
@@ -1776,13 +1769,13 @@ const selectStageFormIdsFromStageIds = restructureCreateSelectorWithArgs(
1776
1769
  );
1777
1770
  const { addStages, updateStages, removeStages, linkStageToForm, unlinkStageToForm } = assetStageSlice.actions;
1778
1771
  const assetStageReducer = assetStageSlice.reducer;
1779
- const initialState$m = {
1772
+ const initialState$l = {
1780
1773
  workspaces: {},
1781
1774
  activeWorkspaceId: null
1782
1775
  };
1783
1776
  const workspaceSlice = createSlice({
1784
1777
  name: "workspace",
1785
- initialState: initialState$m,
1778
+ initialState: initialState$l,
1786
1779
  // The `reducers` field lets us define reducers and generate associated actions
1787
1780
  reducers: {
1788
1781
  setWorkspaces: (state, action) => {
@@ -1839,7 +1832,7 @@ const selectPermittedWorkspaceIds = createSelector(
1839
1832
  );
1840
1833
  const workspaceReducer = workspaceSlice.reducer;
1841
1834
  const maxRecentIssues = 10;
1842
- const initialState$l = {
1835
+ const initialState$k = {
1843
1836
  issues: {},
1844
1837
  attachments: {},
1845
1838
  comments: {},
@@ -1851,9 +1844,9 @@ const initialState$l = {
1851
1844
  };
1852
1845
  const issueSlice = createSlice({
1853
1846
  name: "issues",
1854
- initialState: initialState$l,
1847
+ initialState: initialState$k,
1855
1848
  extraReducers: (builder) => builder.addCase("RESET", (state) => {
1856
- Object.assign(state, initialState$l);
1849
+ Object.assign(state, initialState$k);
1857
1850
  }),
1858
1851
  reducers: {
1859
1852
  setIssues: (state, action) => {
@@ -2289,14 +2282,14 @@ const selectRecentIssuesAsSearchResults = createSelector(
2289
2282
  }
2290
2283
  );
2291
2284
  const issueReducer = issueSlice.reducer;
2292
- const initialState$k = {
2285
+ const initialState$j = {
2293
2286
  issueTypes: {}
2294
2287
  };
2295
2288
  const issueTypeSlice = createSlice({
2296
2289
  name: "issueTypes",
2297
- initialState: initialState$k,
2290
+ initialState: initialState$j,
2298
2291
  extraReducers: (builder) => builder.addCase("RESET", (state) => {
2299
- Object.assign(state, initialState$k);
2292
+ Object.assign(state, initialState$j);
2300
2293
  }),
2301
2294
  reducers: {
2302
2295
  setIssueTypes: (state, action) => {
@@ -2363,15 +2356,15 @@ const selectIssuesOfIssueTypeCount = (issueTypeId) => (state) => {
2363
2356
  return ((_a2 = selectIssuesOfIssueType(issueTypeId)(state)) == null ? void 0 : _a2.length) ?? 0;
2364
2357
  };
2365
2358
  const issueTypeReducer = issueTypeSlice.reducer;
2366
- const initialState$j = {
2359
+ const initialState$i = {
2367
2360
  s3Urls: {}
2368
2361
  };
2369
2362
  const msPerHour = 1e3 * 60 * 60;
2370
2363
  const msPerWeek = msPerHour * 24 * 7;
2371
2364
  const fileSlice = createSlice({
2372
2365
  name: "file",
2373
- initialState: initialState$j,
2374
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$j)),
2366
+ initialState: initialState$i,
2367
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$i)),
2375
2368
  reducers: {
2376
2369
  setUploadUrl: (state, action) => {
2377
2370
  const { url, fields, sha1 } = action.payload;
@@ -2398,33 +2391,6 @@ const selectUploadUrl = (sha1) => (state) => {
2398
2391
  return url;
2399
2392
  };
2400
2393
  const fileReducer = fileSlice.reducer;
2401
- const initialState$i = {
2402
- // TODO: Change first MapStyle.SATELLITE to MaptStyle.None when project creation map is fixed
2403
- mapStyle: MapStyle.SATELLITE,
2404
- showTooltips: false,
2405
- centerMapToProject: false
2406
- };
2407
- const mapSlice = createSlice({
2408
- name: "map",
2409
- initialState: initialState$i,
2410
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$i)),
2411
- reducers: {
2412
- setMapStyle: (state, action) => {
2413
- state.mapStyle = action.payload;
2414
- },
2415
- setShowTooltips: (state, action) => {
2416
- state.showTooltips = action.payload;
2417
- },
2418
- setCenterMapToProject: (state, action) => {
2419
- state.centerMapToProject = action.payload;
2420
- }
2421
- }
2422
- });
2423
- const { setMapStyle, setShowTooltips, setCenterMapToProject } = mapSlice.actions;
2424
- const selectMapStyle = (state) => state.mapReducer.mapStyle;
2425
- const selectShowTooltips = (state) => state.mapReducer.showTooltips;
2426
- const selectCenterMapToProject = (state) => state.mapReducer.centerMapToProject;
2427
- const mapReducer = mapSlice.reducer;
2428
2394
  var ProjectAccessLevel = /* @__PURE__ */ ((ProjectAccessLevel2) => {
2429
2395
  ProjectAccessLevel2[ProjectAccessLevel2["BASIC"] = 0] = "BASIC";
2430
2396
  ProjectAccessLevel2[ProjectAccessLevel2["ADMIN"] = 2] = "ADMIN";
@@ -2453,11 +2419,6 @@ var IssueUpdateChange = /* @__PURE__ */ ((IssueUpdateChange2) => {
2453
2419
  IssueUpdateChange2["DUE_DATE"] = "due_date";
2454
2420
  return IssueUpdateChange2;
2455
2421
  })(IssueUpdateChange || {});
2456
- var ProjectType = /* @__PURE__ */ ((ProjectType2) => {
2457
- ProjectType2[ProjectType2["PERSONAL"] = 0] = "PERSONAL";
2458
- ProjectType2[ProjectType2["ORGANIZATION"] = 2] = "ORGANIZATION";
2459
- return ProjectType2;
2460
- })(ProjectType || {});
2461
2422
  var VerificationCodeType = /* @__PURE__ */ ((VerificationCodeType2) => {
2462
2423
  VerificationCodeType2[VerificationCodeType2["USER_REGISTRATION"] = 0] = "USER_REGISTRATION";
2463
2424
  VerificationCodeType2[VerificationCodeType2["APPLICATION_INVITE"] = 2] = "APPLICATION_INVITE";
@@ -2755,9 +2716,6 @@ const projectAccessReducer = projectAccessSlice.reducer;
2755
2716
  const initialState$d = {
2756
2717
  projects: {},
2757
2718
  activeProjectId: null,
2758
- recentProjectIds: [],
2759
- recentSearchableQueries: [],
2760
- createProjectType: ProjectType.PERSONAL,
2761
2719
  attachments: {}
2762
2720
  };
2763
2721
  const projectSlice = createSlice({
@@ -2770,20 +2728,9 @@ const projectSlice = createSlice({
2770
2728
  projectsMap[project.id] = project;
2771
2729
  });
2772
2730
  state.projects = projectsMap;
2773
- if (state.recentProjectIds.length === 0) {
2774
- state.recentProjectIds = action.payload.map((project) => project.id);
2775
- } else {
2776
- state.recentProjectIds.unshift(
2777
- ...action.payload.map((project) => project.id).filter((id) => !state.recentProjectIds.includes(id))
2778
- );
2779
- }
2780
2731
  },
2781
2732
  setActiveProjectId: (state, action) => {
2782
2733
  state.activeProjectId = action.payload;
2783
- if (action.payload !== null) {
2784
- state.recentProjectIds = state.recentProjectIds.filter((id) => id !== action.payload);
2785
- state.recentProjectIds.push(action.payload);
2786
- }
2787
2734
  },
2788
2735
  updateOrCreateProject: (state, action) => {
2789
2736
  state.projects[action.payload.id] = action.payload;
@@ -2795,12 +2742,8 @@ const projectSlice = createSlice({
2795
2742
  state.projects[project.id] = project;
2796
2743
  });
2797
2744
  },
2798
- setCreateProjectType: (state, action) => {
2799
- state.createProjectType = action.payload;
2800
- },
2801
2745
  deleteProject: (state, action) => {
2802
2746
  delete state.projects[action.payload.id];
2803
- state.recentProjectIds = state.recentProjectIds.filter((id) => id !== action.payload.id);
2804
2747
  },
2805
2748
  acceptProjectInvite: (state, action) => {
2806
2749
  if (action.payload in state.projects) {
@@ -2846,7 +2789,6 @@ const {
2846
2789
  updateOrCreateProject,
2847
2790
  updateOrCreateProjects: addOrReplaceProjects,
2848
2791
  setActiveProjectId,
2849
- setCreateProjectType,
2850
2792
  deleteProject,
2851
2793
  acceptProjectInvite,
2852
2794
  addActiveProjectIssuesCount,
@@ -2870,9 +2812,6 @@ const selectActiveProject = (state) => {
2870
2812
  }
2871
2813
  return state.projectReducer.projects[activeProjectId] ?? null;
2872
2814
  };
2873
- const selectRecentProjects = (state) => {
2874
- return state.projectReducer.recentProjectIds;
2875
- };
2876
2815
  const selectProject = restructureCreateSelectorWithArgs(
2877
2816
  createSelector(
2878
2817
  [selectProjects, (_state, projectId) => projectId],
@@ -2894,7 +2833,6 @@ const selectSortedProjects = createSelector(
2894
2833
  });
2895
2834
  }
2896
2835
  );
2897
- const selectCreateProjectType = (state) => state.projectReducer.createProjectType;
2898
2836
  const projectReducer = projectSlice.reducer;
2899
2837
  const selectProjectUsersIds = createSelector(
2900
2838
  [selectProjectAccesses],
@@ -3254,18 +3192,9 @@ const { setRehydrated } = rehydratedSlice.actions;
3254
3192
  const selectRehydrated = (state) => state.rehydratedReducer.isRehydrated;
3255
3193
  const rehydratedReducer = rehydratedSlice.reducer;
3256
3194
  const initialState$8 = {
3257
- useIssueTemplate: false,
3258
- // TODO: marked for deletion
3259
3195
  placementMode: false,
3260
3196
  enableClustering: false,
3261
3197
  svgLayout: false,
3262
- expandedSections: {
3263
- // TODO: marked for deletion
3264
- Issues: true,
3265
- "Map Layers": false,
3266
- Components: false,
3267
- Experimental: false
3268
- },
3269
3198
  appearance: "dark",
3270
3199
  isFetchingInitialData: false,
3271
3200
  // TODO: this is being used only in the custom hook in /web called useRetrySDK, which has something to do with licences
@@ -3277,18 +3206,12 @@ const settingSlice = createSlice({
3277
3206
  initialState: initialState$8,
3278
3207
  extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$8)),
3279
3208
  reducers: {
3280
- setEnableDuplicateIssues: (state, action) => {
3281
- state.useIssueTemplate = action.payload;
3282
- },
3283
3209
  setEnablePlacementMode: (state, action) => {
3284
3210
  state.placementMode = action.payload;
3285
3211
  },
3286
3212
  setEnableSvgLayout: (state, action) => {
3287
3213
  state.svgLayout = action.payload;
3288
3214
  },
3289
- setSectionExpanded: (state, action) => {
3290
- Object.assign(state.expandedSections, action.payload);
3291
- },
3292
3215
  setEnableClustering: (state, action) => {
3293
3216
  state.enableClustering = action.payload;
3294
3217
  },
@@ -3304,20 +3227,16 @@ const settingSlice = createSlice({
3304
3227
  }
3305
3228
  });
3306
3229
  const {
3307
- setEnableDuplicateIssues,
3308
3230
  setEnablePlacementMode,
3309
3231
  setEnableSvgLayout,
3310
3232
  // TODO: needs to actually be used in /web
3311
- setSectionExpanded,
3312
3233
  setEnableClustering,
3313
3234
  setAppearance,
3314
3235
  setIsFetchingInitialData,
3315
3236
  setIsLoading
3316
3237
  } = settingSlice.actions;
3317
3238
  const selectEnablePlacementMode = (state) => state.settingReducer.placementMode;
3318
- const selectEnableDuplicateIssues = (state) => state.settingReducer.useIssueTemplate;
3319
3239
  const selectEnableSvgLayout = (state) => state.settingReducer.svgLayout;
3320
- const selectExpandedSections = (state) => state.settingReducer.expandedSections;
3321
3240
  const selectEnableClustering = (state) => state.settingReducer.enableClustering;
3322
3241
  const selectAppearance = (state) => state.settingReducer.appearance;
3323
3242
  const settingReducer = settingSlice.reducer;
@@ -4305,7 +4224,6 @@ const overmapReducers = {
4305
4224
  assetTypeReducer,
4306
4225
  issueReducer,
4307
4226
  issueTypeReducer,
4308
- mapReducer,
4309
4227
  organizationReducer,
4310
4228
  outboxReducer,
4311
4229
  projectReducer,
@@ -19913,7 +19831,6 @@ export {
19913
19831
  LicenseService,
19914
19832
  LicenseStatus,
19915
19833
  MainService,
19916
- MapStyle,
19917
19834
  MultiSelectField,
19918
19835
  MultiSelectInput,
19919
19836
  MultiStringField,
@@ -19938,7 +19855,6 @@ export {
19938
19855
  ProjectAttachmentService,
19939
19856
  ProjectFileService,
19940
19857
  ProjectService,
19941
- ProjectType,
19942
19858
  QrField,
19943
19859
  QrInput,
19944
19860
  QrScanner,
@@ -20124,8 +20040,6 @@ export {
20124
20040
  literalToCoordinates,
20125
20041
  logOnlyOnce,
20126
20042
  makeClient,
20127
- mapReducer,
20128
- mapSlice,
20129
20043
  markAsDeleted,
20130
20044
  markForDeletion,
20131
20045
  markerCoordinatesToText,
@@ -20255,7 +20169,6 @@ export {
20255
20169
  selectCategory,
20256
20170
  selectCategoryMapping,
20257
20171
  selectCategoryVisibility,
20258
- selectCenterMapToProject,
20259
20172
  selectCommentMapping,
20260
20173
  selectCommentsOfIssue,
20261
20174
  selectCompletedStageIdsForAsset,
@@ -20263,7 +20176,6 @@ export {
20263
20176
  selectConversation,
20264
20177
  selectConversationMapping,
20265
20178
  selectConversations,
20266
- selectCreateProjectType,
20267
20179
  selectCurrentUser,
20268
20180
  selectDeletedRequests,
20269
20181
  selectDocument,
@@ -20273,12 +20185,10 @@ export {
20273
20185
  selectDocumentsMapping,
20274
20186
  selectEmailDomainsAsMapping,
20275
20187
  selectEnableClustering,
20276
- selectEnableDuplicateIssues,
20277
20188
  selectEnablePlacementMode,
20278
20189
  selectEnableSvgLayout,
20279
20190
  selectEnabledProjectFileMapping,
20280
20191
  selectEnabledProjectFiles,
20281
- selectExpandedSections,
20282
20192
  selectFavouriteProjects,
20283
20193
  selectFileAttachmentsOfIssue,
20284
20194
  selectFilteredForms,
@@ -20332,7 +20242,6 @@ export {
20332
20242
  selectLicenses,
20333
20243
  selectLicensesForProjectsMapping,
20334
20244
  selectMainWorkspace,
20335
- selectMapStyle,
20336
20245
  selectNumberOfAssetTypesMatchingCaseInsensitiveName,
20337
20246
  selectNumberOfAssetsOfAssetType,
20338
20247
  selectOrganization,
@@ -20362,10 +20271,8 @@ export {
20362
20271
  selectProjectsWithAccess,
20363
20272
  selectRecentIssueIds,
20364
20273
  selectRecentIssuesAsSearchResults,
20365
- selectRecentProjects,
20366
20274
  selectRehydrated,
20367
20275
  selectRootDocuments,
20368
- selectShowTooltips,
20369
20276
  selectSortedEmailDomains,
20370
20277
  selectSortedFormSubmissionsOfForm,
20371
20278
  selectSortedOrganizationLicenses,
@@ -20407,17 +20314,14 @@ export {
20407
20314
  setAssetTypes,
20408
20315
  setAssets,
20409
20316
  setCategories,
20410
- setCenterMapToProject,
20411
20317
  setConversation,
20412
20318
  setConversations,
20413
- setCreateProjectType,
20414
20319
  setCurrentUser,
20415
20320
  setDocumentAttachment,
20416
20321
  setDocumentAttachments,
20417
20322
  setDocuments,
20418
20323
  setEmailDomains,
20419
20324
  setEnableClustering,
20420
- setEnableDuplicateIssues,
20421
20325
  setEnablePlacementMode,
20422
20326
  setEnableSvgLayout,
20423
20327
  setFormRevision,
@@ -20440,7 +20344,6 @@ export {
20440
20344
  setIssues,
20441
20345
  setLicenses,
20442
20346
  setLoggedIn,
20443
- setMapStyle,
20444
20347
  setOrganizationAccesses,
20445
20348
  setOrganizations,
20446
20349
  setProfilePicture,
@@ -20450,8 +20353,6 @@ export {
20450
20353
  setProjectFileVisible,
20451
20354
  setProjects,
20452
20355
  setRehydrated,
20453
- setSectionExpanded,
20454
- setShowTooltips,
20455
20356
  setStageCompletions,
20456
20357
  setTeam,
20457
20358
  setTeams,