@strands.gg/accui 1.4.1 → 1.5.0

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 (42) hide show
  1. package/dist/nuxt/runtime/composables/useStrandsAuth.cjs.js +1 -1
  2. package/dist/nuxt/runtime/composables/useStrandsAuth.d.ts +11 -0
  3. package/dist/nuxt/runtime/composables/useStrandsAuth.d.ts.map +1 -1
  4. package/dist/nuxt/runtime/composables/useStrandsAuth.es.js +1 -1
  5. package/dist/nuxt/runtime/plugin.client.cjs.js +1 -1
  6. package/dist/nuxt/runtime/plugin.client.es.js +1 -1
  7. package/dist/nuxt/runtime/plugin.server.cjs.js +1 -1
  8. package/dist/nuxt/runtime/plugin.server.es.js +1 -1
  9. package/dist/nuxt-v4/runtime/composables/useStrandsAuth.cjs.js +1 -1
  10. package/dist/nuxt-v4/runtime/composables/useStrandsAuth.es.js +1 -1
  11. package/dist/nuxt-v4/runtime/plugin.client.cjs.js +1 -1
  12. package/dist/nuxt-v4/runtime/plugin.client.es.js +1 -1
  13. package/dist/nuxt-v4/runtime/plugin.server.cjs.js +1 -1
  14. package/dist/nuxt-v4/runtime/plugin.server.es.js +1 -1
  15. package/dist/strands-auth-ui.cjs.js +341 -104
  16. package/dist/strands-auth-ui.cjs.js.map +1 -1
  17. package/dist/strands-auth-ui.es.js +342 -105
  18. package/dist/strands-auth-ui.es.js.map +1 -1
  19. package/dist/types/index.d.ts +5 -0
  20. package/dist/types/index.d.ts.map +1 -1
  21. package/dist/{useStrandsAuth-zR8fRWme.cjs → useStrandsAuth-CVR23cd8.cjs} +77 -2
  22. package/dist/useStrandsAuth-CVR23cd8.cjs.map +1 -0
  23. package/dist/{useStrandsAuth-SdmBCyFS.js → useStrandsAuth-if4J5WT8.js} +77 -2
  24. package/dist/useStrandsAuth-if4J5WT8.js.map +1 -0
  25. package/dist/{useStrandsConfig-COEj6nFc.js → useStrandsConfig-Bdk-g0jS.js} +9 -1
  26. package/dist/useStrandsConfig-Bdk-g0jS.js.map +1 -0
  27. package/dist/{useStrandsConfig-DW4ez8t4.cjs → useStrandsConfig-CtmQtE7Y.cjs} +9 -1
  28. package/dist/useStrandsConfig-CtmQtE7Y.cjs.map +1 -0
  29. package/dist/vue/components/SignedIn.vue.d.ts +2 -0
  30. package/dist/vue/components/SignedIn.vue.d.ts.map +1 -1
  31. package/dist/vue/components/SignedOut.vue.d.ts +2 -0
  32. package/dist/vue/components/SignedOut.vue.d.ts.map +1 -1
  33. package/dist/vue/components/StrandsUserProfile.vue.d.ts.map +1 -1
  34. package/dist/vue/composables/useStrandsAuth.d.ts +11 -0
  35. package/dist/vue/composables/useStrandsAuth.d.ts.map +1 -1
  36. package/dist/vue/composables/useStrandsConfig.d.ts.map +1 -1
  37. package/dist/vue/ui/UiAvatarEditorSimple.vue.d.ts.map +1 -1
  38. package/package.json +1 -1
  39. package/dist/useStrandsAuth-SdmBCyFS.js.map +0 -1
  40. package/dist/useStrandsAuth-zR8fRWme.cjs.map +0 -1
  41. package/dist/useStrandsConfig-COEj6nFc.js.map +0 -1
  42. package/dist/useStrandsConfig-DW4ez8t4.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, createCommentVNode, toDisplayString, renderSlot, createTextVNode, normalizeStyle, useSlots, ref, createBlock, resolveDynamicComponent, mergeProps, withCtx, onMounted, nextTick, toRefs, watch, Fragment, renderList, reactive, withModifiers, createStaticVNode, withDirectives, vModelText, createVNode, Teleport, createSlots, onBeforeUnmount, withKeys, Transition, h } from "vue";
2
- import { u as useStrandsConfig, p as provideStrandsConfig } from "./useStrandsConfig-COEj6nFc.js";
3
- import { s } from "./useStrandsConfig-COEj6nFc.js";
4
- import { u as useStrandsAuth } from "./useStrandsAuth-SdmBCyFS.js";
2
+ import { u as useStrandsConfig, p as provideStrandsConfig } from "./useStrandsConfig-Bdk-g0jS.js";
3
+ import { s } from "./useStrandsConfig-Bdk-g0jS.js";
4
+ import { u as useStrandsAuth } from "./useStrandsAuth-if4J5WT8.js";
5
5
  const _sfc_main$w = /* @__PURE__ */ defineComponent({
6
6
  __name: "UiAlert",
7
7
  props: {
@@ -1883,17 +1883,18 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1883
1883
  img.onload = () => {
1884
1884
  originalImage.value = img;
1885
1885
  isResetting.value = true;
1886
- const scale = Math.min(
1886
+ const scale = Math.max(
1887
1887
  cropRadius.value * 2 / img.width,
1888
1888
  cropRadius.value * 2 / img.height
1889
1889
  );
1890
- const initialZoom = scale;
1890
+ const initialZoom = scale * 1.2;
1891
1891
  minZoom.value = scale;
1892
1892
  const scaledWidth = img.width * initialZoom;
1893
1893
  const scaledHeight = img.height * initialZoom;
1894
1894
  imagePos.x = (canvasSize.value - scaledWidth) / 2;
1895
1895
  imagePos.y = (canvasSize.value - scaledHeight) / 2;
1896
1896
  zoom.value = initialZoom;
1897
+ constrainImagePosition();
1897
1898
  nextTick(() => {
1898
1899
  isResetting.value = false;
1899
1900
  });
@@ -1910,6 +1911,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1910
1911
  const scaledHeight = img.height * zoom.value;
1911
1912
  imagePos.x = (canvasSize.value - scaledWidth) / 2;
1912
1913
  imagePos.y = (canvasSize.value - scaledHeight) / 2;
1914
+ constrainImagePosition();
1913
1915
  };
1914
1916
  const updateCanvas = () => {
1915
1917
  if (!originalImage.value || !canvas2.value) return;
@@ -1959,12 +1961,29 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1959
1961
  document.addEventListener("mousemove", handleDrag);
1960
1962
  document.addEventListener("mouseup", stopDrag);
1961
1963
  };
1964
+ const constrainImagePosition = () => {
1965
+ if (!originalImage.value) return;
1966
+ const img = originalImage.value;
1967
+ const scaledWidth = img.width * zoom.value;
1968
+ const scaledHeight = img.height * zoom.value;
1969
+ const circleLeft = canvasSize.value / 2 - cropRadius.value;
1970
+ const circleTop = canvasSize.value / 2 - cropRadius.value;
1971
+ const circleRight = canvasSize.value / 2 + cropRadius.value;
1972
+ const circleBottom = canvasSize.value / 2 + cropRadius.value;
1973
+ const maxX = circleRight - scaledWidth;
1974
+ const minX = circleLeft;
1975
+ const maxY = circleBottom - scaledHeight;
1976
+ const minY = circleTop;
1977
+ imagePos.x = Math.min(minX, Math.max(maxX, imagePos.x));
1978
+ imagePos.y = Math.min(minY, Math.max(maxY, imagePos.y));
1979
+ };
1962
1980
  const handleDrag = (event) => {
1963
1981
  if (!isDragging.value) return;
1964
1982
  const deltaX = event.clientX - dragStart.x;
1965
1983
  const deltaY = event.clientY - dragStart.y;
1966
1984
  imagePos.x = dragStart.imageX + deltaX;
1967
1985
  imagePos.y = dragStart.imageY + deltaY;
1986
+ constrainImagePosition();
1968
1987
  updateCanvas();
1969
1988
  };
1970
1989
  const stopDrag = () => {
@@ -1987,6 +2006,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1987
2006
  imagePos.x = imageCenterX - newWidth / 2;
1988
2007
  imagePos.y = imageCenterY - newHeight / 2;
1989
2008
  zoom.value = newZoom;
2009
+ constrainImagePosition();
1990
2010
  updateCanvas();
1991
2011
  }
1992
2012
  };
@@ -1994,16 +2014,17 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1994
2014
  if (!originalImage.value) return;
1995
2015
  const img = originalImage.value;
1996
2016
  isResetting.value = true;
1997
- const scale = Math.min(
2017
+ const scale = Math.max(
1998
2018
  cropRadius.value * 2 / img.width,
1999
2019
  cropRadius.value * 2 / img.height
2000
2020
  );
2001
- const targetZoom = scale;
2021
+ const targetZoom = scale * 1.2;
2002
2022
  const scaledWidth = img.width * targetZoom;
2003
2023
  const scaledHeight = img.height * targetZoom;
2004
2024
  imagePos.x = (canvasSize.value - scaledWidth) / 2;
2005
2025
  imagePos.y = (canvasSize.value - scaledHeight) / 2;
2006
2026
  zoom.value = targetZoom;
2027
+ constrainImagePosition();
2007
2028
  nextTick(() => {
2008
2029
  isResetting.value = false;
2009
2030
  });
@@ -2077,7 +2098,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
2077
2098
  processFile(file);
2078
2099
  }
2079
2100
  }, { immediate: true });
2080
- const __returned__ = { props, emit, fileInput, canvas: canvas2, previewCanvas, imageData, originalImage, canvasSize, previewSize, cropRadius, imagePos, zoom, minZoom, maxZoom, isDragging, isResetting, dragStart, triggerFileUpload, handleFileSelect, handleDrop, processFile, loadImage, centerImage, updateCanvas, updatePreview, startDrag, handleDrag, stopDrag, handleWheel, resetImage, cropAndUpload, clearImage };
2101
+ const __returned__ = { props, emit, fileInput, canvas: canvas2, previewCanvas, imageData, originalImage, canvasSize, previewSize, cropRadius, imagePos, zoom, minZoom, maxZoom, isDragging, isResetting, dragStart, triggerFileUpload, handleFileSelect, handleDrop, processFile, loadImage, centerImage, updateCanvas, updatePreview, startDrag, constrainImagePosition, handleDrag, stopDrag, handleWheel, resetImage, cropAndUpload, clearImage };
2081
2102
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2082
2103
  return __returned__;
2083
2104
  }
@@ -2118,7 +2139,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2118
2139
  }, ["prevent"]))
2119
2140
  },
2120
2141
  [
2121
- _cache[5] || (_cache[5] = createStaticVNode('<div class="upload-content"><svg class="w-12 h-12 text-gray-400 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg><h3 class="text-lg font-semibold text-gray-900 mb-1">Upload your photo</h3><p class="text-sm text-gray-500 mb-4">Drag and drop or click to browse</p><div class="flex gap-2 justify-center text-xs text-gray-400"><span class="px-2 py-1 bg-gray-100 rounded">JPG</span><span class="px-2 py-1 bg-gray-100 rounded">PNG</span><span class="px-2 py-1 bg-gray-100 rounded">GIF</span></div></div>', 1)),
2142
+ _cache[6] || (_cache[6] = createStaticVNode('<div class="upload-content"><svg class="w-12 h-12 text-gray-400 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg><h3 class="text-lg font-semibold text-gray-900 mb-1">Upload your photo</h3><p class="text-sm text-gray-500 mb-4">Drag and drop or click to browse</p><div class="flex gap-2 justify-center text-xs text-gray-400"><span class="px-2 py-1 bg-gray-100 rounded">JPG</span><span class="px-2 py-1 bg-gray-100 rounded">PNG</span><span class="px-2 py-1 bg-gray-100 rounded">GIF</span></div></div>', 1)),
2122
2143
  createElementVNode(
2123
2144
  "input",
2124
2145
  {
@@ -2200,10 +2221,11 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2200
2221
  createElementVNode("button", {
2201
2222
  onClick: _cache[2] || (_cache[2] = ($event) => {
2202
2223
  $setup.zoom = Math.max($setup.minZoom, $setup.zoom - 0.1);
2224
+ $setup.constrainImagePosition();
2203
2225
  $setup.updateCanvas();
2204
2226
  }),
2205
2227
  class: "zoom-button"
2206
- }, _cache[6] || (_cache[6] = [
2228
+ }, _cache[7] || (_cache[7] = [
2207
2229
  createElementVNode(
2208
2230
  "svg",
2209
2231
  {
@@ -2231,7 +2253,10 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2231
2253
  max: $setup.maxZoom,
2232
2254
  step: 0.01,
2233
2255
  class: "zoom-slider",
2234
- onInput: $setup.updateCanvas
2256
+ onInput: _cache[4] || (_cache[4] = ($event) => {
2257
+ $setup.constrainImagePosition();
2258
+ $setup.updateCanvas();
2259
+ })
2235
2260
  }, null, 40, _hoisted_15$a), [
2236
2261
  [
2237
2262
  vModelText,
@@ -2241,12 +2266,13 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2241
2266
  ]
2242
2267
  ]),
2243
2268
  createElementVNode("button", {
2244
- onClick: _cache[4] || (_cache[4] = ($event) => {
2269
+ onClick: _cache[5] || (_cache[5] = ($event) => {
2245
2270
  $setup.zoom = Math.min($setup.maxZoom, $setup.zoom + 0.1);
2271
+ $setup.constrainImagePosition();
2246
2272
  $setup.updateCanvas();
2247
2273
  }),
2248
2274
  class: "zoom-button"
2249
- }, _cache[7] || (_cache[7] = [
2275
+ }, _cache[8] || (_cache[8] = [
2250
2276
  createElementVNode(
2251
2277
  "svg",
2252
2278
  {
@@ -2288,7 +2314,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2288
2314
  ]),
2289
2315
  createCommentVNode(" Preview "),
2290
2316
  createElementVNode("div", _hoisted_18$7, [
2291
- _cache[8] || (_cache[8] = createElementVNode(
2317
+ _cache[9] || (_cache[9] = createElementVNode(
2292
2318
  "h3",
2293
2319
  { class: "text-sm font-medium text-gray-700 mb-3" },
2294
2320
  "Preview",
@@ -2303,7 +2329,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2303
2329
  class: "preview-canvas"
2304
2330
  }, null, 8, _hoisted_20$6)
2305
2331
  ]),
2306
- _cache[9] || (_cache[9] = createElementVNode(
2332
+ _cache[10] || (_cache[10] = createElementVNode(
2307
2333
  "p",
2308
2334
  { class: "text-xs text-gray-500 mt-3 text-center" },
2309
2335
  [
@@ -12440,7 +12466,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
12440
12466
  const props = __props;
12441
12467
  const emit = __emit;
12442
12468
  const { getSupportEmail, getUrl } = useStrandsConfig(props.config);
12443
- const { fetchProfile, updateProfile, changeEmail, currentUser: authUser, currentSession, isAuthenticated, refreshToken, signOut } = useStrandsAuth();
12469
+ const { fetchProfile, updateProfile, changeEmail, changeUsername, getUsernameCooldown, checkUsernameAvailability, currentUser: authUser, currentSession, isAuthenticated, refreshToken, signOut } = useStrandsAuth();
12444
12470
  const { activeMfaDevices, fetchMfaDevices } = useStrandsMfa();
12445
12471
  const internalUser = ref(null);
12446
12472
  const fetchingProfile = ref(false);
@@ -12461,6 +12487,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
12461
12487
  const showPasswordChange = ref(false);
12462
12488
  const showEmailChange = ref(false);
12463
12489
  const emailChangeLoading = ref(false);
12490
+ const showUsernameChange = ref(false);
12491
+ const usernameChangeLoading = ref(false);
12464
12492
  const showMfaModal = ref(false);
12465
12493
  const showSettingsModal = ref(false);
12466
12494
  const showAvatarEditor = ref(false);
@@ -12468,6 +12496,16 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
12468
12496
  const successMessage = ref("");
12469
12497
  const errorMessage = ref("");
12470
12498
  const activeSessions = ref([]);
12499
+ const usernameChangeData = reactive({
12500
+ canChange: true,
12501
+ cooldownEnd: null,
12502
+ daysRemaining: 0
12503
+ });
12504
+ const usernameAvailability = reactive({
12505
+ available: false,
12506
+ message: "",
12507
+ checking: false
12508
+ });
12471
12509
  const avatarFileInput = ref();
12472
12510
  const form = reactive({
12473
12511
  firstName: "",
@@ -12487,6 +12525,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
12487
12525
  new: "",
12488
12526
  confirm: ""
12489
12527
  });
12528
+ const usernameForm = reactive({
12529
+ username: "",
12530
+ errors: {
12531
+ username: ""
12532
+ }
12533
+ });
12490
12534
  const errors = reactive({
12491
12535
  firstName: "",
12492
12536
  lastName: "",
@@ -12503,6 +12547,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
12503
12547
  const isEmailChangeFormValid = computed(() => {
12504
12548
  return emailChangeForm.newEmail && emailChangeForm.password && emailChangeForm.newEmail !== currentUser.value?.email && emailChangeForm.newEmail.includes("@");
12505
12549
  });
12550
+ const isUsernameChangeFormValid = computed(() => {
12551
+ const usernameRegex = /^[a-zA-Z0-9_-]{3,30}$/;
12552
+ return usernameForm.username && usernameRegex.test(usernameForm.username) && usernameForm.username !== currentUser.value?.username && !usernameAvailability.checking;
12553
+ });
12506
12554
  const passwordLastUpdated = computed(() => {
12507
12555
  const user = currentUser.value;
12508
12556
  if (!user) return "Never";
@@ -12723,6 +12771,86 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
12723
12771
  emailChangeLoading.value = false;
12724
12772
  }
12725
12773
  };
12774
+ const handleToggleUsernameChange = async () => {
12775
+ if (!showUsernameChange.value) {
12776
+ usernameChangeLoading.value = true;
12777
+ try {
12778
+ const cooldownData = await getUsernameCooldown();
12779
+ usernameChangeData.canChange = cooldownData.can_change;
12780
+ usernameChangeData.cooldownEnd = cooldownData.cooldown_end ? new Date(cooldownData.cooldown_end) : null;
12781
+ usernameChangeData.daysRemaining = cooldownData.days_remaining || 0;
12782
+ if (usernameChangeData.canChange) {
12783
+ showUsernameChange.value = true;
12784
+ usernameForm.username = currentUser.value?.username || "";
12785
+ } else {
12786
+ errorMessage.value = `You can change your username again in ${usernameChangeData.daysRemaining} days`;
12787
+ }
12788
+ } catch (err) {
12789
+ errorMessage.value = "Failed to check username cooldown";
12790
+ showUsernameChange.value = true;
12791
+ } finally {
12792
+ usernameChangeLoading.value = false;
12793
+ }
12794
+ } else {
12795
+ showUsernameChange.value = false;
12796
+ usernameForm.username = "";
12797
+ usernameForm.errors.username = "";
12798
+ usernameAvailability.available = false;
12799
+ usernameAvailability.message = "";
12800
+ }
12801
+ };
12802
+ const handleUsernameChange = async () => {
12803
+ if (!isUsernameChangeFormValid.value) {
12804
+ const usernameRegex = /^[a-zA-Z0-9_-]{3,30}$/;
12805
+ if (!usernameRegex.test(usernameForm.username)) {
12806
+ usernameForm.errors.username = "Username must be 3-30 characters and contain only letters, numbers, hyphens, and underscores";
12807
+ return;
12808
+ }
12809
+ usernameAvailability.checking = true;
12810
+ usernameAvailability.message = "Checking availability...";
12811
+ try {
12812
+ const result = await checkUsernameAvailability(usernameForm.username);
12813
+ usernameAvailability.available = result.available;
12814
+ usernameAvailability.message = result.message;
12815
+ if (!result.available) {
12816
+ usernameForm.errors.username = "Username is not available";
12817
+ return;
12818
+ }
12819
+ } catch (err) {
12820
+ usernameForm.errors.username = "Failed to check username availability";
12821
+ return;
12822
+ } finally {
12823
+ usernameAvailability.checking = false;
12824
+ }
12825
+ }
12826
+ clearMessages();
12827
+ usernameChangeLoading.value = true;
12828
+ try {
12829
+ const result = await changeUsername(usernameForm.username);
12830
+ successMessage.value = result.message || "Username updated successfully";
12831
+ showUsernameChange.value = false;
12832
+ usernameForm.username = "";
12833
+ usernameForm.errors.username = "";
12834
+ usernameAvailability.available = false;
12835
+ usernameAvailability.message = "";
12836
+ if (currentUser.value) {
12837
+ emit("profile-updated", currentUser.value);
12838
+ }
12839
+ } catch (err) {
12840
+ const error = err instanceof Error ? err.message : "Failed to update username";
12841
+ if (error.includes("taken")) {
12842
+ usernameForm.errors.username = "Username is already taken";
12843
+ } else if (error.includes("cooldown") || error.includes("30 days")) {
12844
+ errorMessage.value = error;
12845
+ showUsernameChange.value = false;
12846
+ } else {
12847
+ usernameForm.errors.username = error;
12848
+ }
12849
+ emit("error", error);
12850
+ } finally {
12851
+ usernameChangeLoading.value = false;
12852
+ }
12853
+ };
12726
12854
  const triggerAvatarUpload = () => {
12727
12855
  if (uploading.value) return;
12728
12856
  avatarFileInput.value?.click();
@@ -12900,7 +13028,19 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
12900
13028
  signingOut.value = false;
12901
13029
  }
12902
13030
  };
12903
- const __returned__ = { props, emit, getSupportEmail, getUrl, fetchProfile, updateProfile, changeEmail, authUser, currentSession, isAuthenticated, refreshToken, signOut, activeMfaDevices, fetchMfaDevices, internalUser, fetchingProfile, currentUser, loading: loading2, uploading, signingOut, showPasswordChange, showEmailChange, emailChangeLoading, showMfaModal, showSettingsModal, showAvatarEditor, selectedImageFile, successMessage, errorMessage, activeSessions, avatarFileInput, form, emailChangeForm, passwordForm, errors, hasChanges, isPasswordFormValid, isEmailChangeFormValid, passwordLastUpdated, deviceTypeCounts, mfaDeviceChips, getXpForLevel, getLevelFromXp, userLevel, currentExp, expToNextLevel, progressPercentage, totalCircumference, progressLength, progressGapLength, getInitials: getInitials2, fetchUserProfile, clearMessages, handleUpdateProfile, handlePasswordChange, handleEmailChange, triggerAvatarUpload, handleAvatarFileSelect, handleAvatarUpload, handleAvatarError, handleAvatarEditorClose, uploadAvatar, handleMfaUpdated, handleSettingsUpdated, handleCancel, handleSignOut, get StrandsUiButton() {
13031
+ onMounted(async () => {
13032
+ if (currentUser.value && isAuthenticated.value) {
13033
+ try {
13034
+ const cooldownData = await getUsernameCooldown();
13035
+ usernameChangeData.canChange = cooldownData.can_change;
13036
+ usernameChangeData.cooldownEnd = cooldownData.cooldown_end ? new Date(cooldownData.cooldown_end) : null;
13037
+ usernameChangeData.daysRemaining = cooldownData.days_remaining || 0;
13038
+ } catch (err) {
13039
+ console.error("Failed to fetch username cooldown:", err);
13040
+ }
13041
+ }
13042
+ });
13043
+ const __returned__ = { props, emit, getSupportEmail, getUrl, fetchProfile, updateProfile, changeEmail, changeUsername, getUsernameCooldown, checkUsernameAvailability, authUser, currentSession, isAuthenticated, refreshToken, signOut, activeMfaDevices, fetchMfaDevices, internalUser, fetchingProfile, currentUser, loading: loading2, uploading, signingOut, showPasswordChange, showEmailChange, emailChangeLoading, showUsernameChange, usernameChangeLoading, showMfaModal, showSettingsModal, showAvatarEditor, selectedImageFile, successMessage, errorMessage, activeSessions, usernameChangeData, usernameAvailability, avatarFileInput, form, emailChangeForm, passwordForm, usernameForm, errors, hasChanges, isPasswordFormValid, isEmailChangeFormValid, isUsernameChangeFormValid, passwordLastUpdated, deviceTypeCounts, mfaDeviceChips, getXpForLevel, getLevelFromXp, userLevel, currentExp, expToNextLevel, progressPercentage, totalCircumference, progressLength, progressGapLength, getInitials: getInitials2, fetchUserProfile, clearMessages, handleUpdateProfile, handlePasswordChange, handleEmailChange, handleToggleUsernameChange, handleUsernameChange, triggerAvatarUpload, handleAvatarFileSelect, handleAvatarUpload, handleAvatarError, handleAvatarEditorClose, uploadAvatar, handleMfaUpdated, handleSettingsUpdated, handleCancel, handleSignOut, get StrandsUiButton() {
12904
13044
  return StrandsUiButton;
12905
13045
  }, get StrandsUiInput() {
12906
13046
  return StrandsUiInput;
@@ -12948,58 +13088,69 @@ const _hoisted_16$1 = {
12948
13088
  key: 0,
12949
13089
  class: "space-y-3 overflow-hidden"
12950
13090
  };
12951
- const _hoisted_17$1 = { class: "space-y-3 md:space-y-4" };
12952
- const _hoisted_18$1 = { class: "space-y-4 p-4 bg-gray-50 rounded-xl" };
12953
- const _hoisted_19$1 = { class: "flex items-center justify-between gap-2" };
12954
- const _hoisted_20$1 = { class: "text-sm text-gray-600" };
13091
+ const _hoisted_17$1 = { class: "space-y-4 p-4 bg-gray-50 rounded-xl" };
13092
+ const _hoisted_18$1 = { class: "flex items-center justify-between gap-2" };
13093
+ const _hoisted_19$1 = { class: "text-sm text-gray-600" };
13094
+ const _hoisted_20$1 = {
13095
+ key: 0,
13096
+ class: "text-red-600 ml-2"
13097
+ };
12955
13098
  const _hoisted_21 = {
12956
13099
  key: 0,
12957
13100
  class: "space-y-3 overflow-hidden"
12958
13101
  };
12959
- const _hoisted_22 = { class: "p-4 bg-gray-50 rounded-xl" };
12960
- const _hoisted_23 = { class: "flex items-start justify-between gap-4" };
12961
- const _hoisted_24 = { class: "flex-1" };
12962
- const _hoisted_25 = { class: "text-sm text-gray-600 mt-1" };
13102
+ const _hoisted_22 = { class: "space-y-3 md:space-y-4" };
13103
+ const _hoisted_23 = { class: "space-y-4 p-4 bg-gray-50 rounded-xl" };
13104
+ const _hoisted_24 = { class: "flex items-center justify-between gap-2" };
13105
+ const _hoisted_25 = { class: "text-sm text-gray-600" };
12963
13106
  const _hoisted_26 = {
12964
13107
  key: 0,
12965
- class: "flex flex-wrap gap-2 mt-3"
13108
+ class: "space-y-3 overflow-hidden"
12966
13109
  };
12967
- const _hoisted_27 = { class: "ml-1" };
12968
- const _hoisted_28 = { class: "p-4 bg-gray-50 rounded-xl" };
12969
- const _hoisted_29 = { class: "flex items-center justify-between gap-2" };
12970
- const _hoisted_30 = { class: "text-sm text-gray-600" };
13110
+ const _hoisted_27 = { class: "p-4 bg-gray-50 rounded-xl" };
13111
+ const _hoisted_28 = { class: "flex items-start justify-between gap-4" };
13112
+ const _hoisted_29 = { class: "flex-1" };
13113
+ const _hoisted_30 = { class: "text-sm text-gray-600 mt-1" };
12971
13114
  const _hoisted_31 = {
13115
+ key: 0,
13116
+ class: "flex flex-wrap gap-2 mt-3"
13117
+ };
13118
+ const _hoisted_32 = { class: "ml-1" };
13119
+ const _hoisted_33 = { class: "p-4 bg-gray-50 rounded-xl" };
13120
+ const _hoisted_34 = { class: "flex items-center justify-between gap-2" };
13121
+ const _hoisted_35 = { class: "text-sm text-gray-600" };
13122
+ const _hoisted_36 = {
12972
13123
  key: 0,
12973
13124
  class: "flex flex-col sm:flex-row gap-3 pt-6 border-t border-gray-200 animate-slide-up"
12974
13125
  };
12975
- const _hoisted_32 = {
13126
+ const _hoisted_37 = {
12976
13127
  key: 0,
12977
13128
  class: "mt-6 animate-fade-in"
12978
13129
  };
12979
- const _hoisted_33 = { class: "alert-success" };
12980
- const _hoisted_34 = { class: "flex items-start gap-3" };
12981
- const _hoisted_35 = { class: "font-medium" };
12982
- const _hoisted_36 = {
13130
+ const _hoisted_38 = { class: "alert-success" };
13131
+ const _hoisted_39 = { class: "flex items-start gap-3" };
13132
+ const _hoisted_40 = { class: "font-medium" };
13133
+ const _hoisted_41 = {
12983
13134
  key: 1,
12984
13135
  class: "mt-6 animate-fade-in"
12985
13136
  };
12986
- const _hoisted_37 = { class: "alert-error" };
12987
- const _hoisted_38 = { class: "flex items-start gap-3" };
12988
- const _hoisted_39 = { class: "font-medium" };
12989
- const _hoisted_40 = { class: "flex gap-4 items-stretch" };
12990
- const _hoisted_41 = { key: 0 };
12991
- const _hoisted_42 = { class: "text-gray-400 text-sm" };
12992
- const _hoisted_43 = {
13137
+ const _hoisted_42 = { class: "alert-error" };
13138
+ const _hoisted_43 = { class: "flex items-start gap-3" };
13139
+ const _hoisted_44 = { class: "font-medium" };
13140
+ const _hoisted_45 = { class: "flex gap-4 items-stretch" };
13141
+ const _hoisted_46 = { key: 0 };
13142
+ const _hoisted_47 = { class: "text-gray-400 text-sm" };
13143
+ const _hoisted_48 = {
12993
13144
  key: 1,
12994
13145
  class: "fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4"
12995
13146
  };
12996
- const _hoisted_44 = { class: "bg-white rounded-xl shadow-2xl max-w-4xl w-full max-h-[90vh] overflow-y-auto" };
12997
- const _hoisted_45 = { class: "p-6" };
13147
+ const _hoisted_49 = { class: "bg-white rounded-xl shadow-2xl max-w-4xl w-full max-h-[90vh] overflow-y-auto" };
13148
+ const _hoisted_50 = { class: "p-6" };
12998
13149
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
12999
13150
  return openBlock(), createElementBlock("div", _hoisted_1$5, [
13000
13151
  createElementVNode("div", _hoisted_2$4, [
13001
13152
  createCommentVNode(" Header "),
13002
- _cache[29] || (_cache[29] = createElementVNode(
13153
+ _cache[31] || (_cache[31] = createElementVNode(
13003
13154
  "div",
13004
13155
  { class: "text-center mb-6" },
13005
13156
  [
@@ -13048,7 +13199,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13048
13199
  key: 0,
13049
13200
  size: 24,
13050
13201
  variant: "dark"
13051
- })) : (openBlock(), createElementBlock("svg", _hoisted_10$1, _cache[14] || (_cache[14] = [
13202
+ })) : (openBlock(), createElementBlock("svg", _hoisted_10$1, _cache[15] || (_cache[15] = [
13052
13203
  createElementVNode(
13053
13204
  "path",
13054
13205
  {
@@ -13103,7 +13254,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13103
13254
  createElementVNode("div", _hoisted_11$1, [
13104
13255
  createCommentVNode(" Personal Information "),
13105
13256
  createElementVNode("div", _hoisted_12$1, [
13106
- _cache[16] || (_cache[16] = createElementVNode(
13257
+ _cache[18] || (_cache[18] = createElementVNode(
13107
13258
  "h3",
13108
13259
  { class: "text-lg font-semibold text-gray-900 mb-3 md:mb-4" },
13109
13260
  "Personal Information",
@@ -13136,7 +13287,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13136
13287
  createElementVNode("div", _hoisted_13$1, [
13137
13288
  createElementVNode("div", _hoisted_14$1, [
13138
13289
  createElementVNode("div", null, [
13139
- _cache[15] || (_cache[15] = createElementVNode(
13290
+ _cache[16] || (_cache[16] = createElementVNode(
13140
13291
  "h4",
13141
13292
  { class: "font-medium text-gray-900" },
13142
13293
  "Email Address",
@@ -13207,11 +13358,97 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13207
13358
  _: 1
13208
13359
  /* STABLE */
13209
13360
  })
13361
+ ]),
13362
+ createCommentVNode(" Username Change Section "),
13363
+ createElementVNode("div", _hoisted_17$1, [
13364
+ createElementVNode("div", _hoisted_18$1, [
13365
+ createElementVNode("div", null, [
13366
+ _cache[17] || (_cache[17] = createElementVNode(
13367
+ "h4",
13368
+ { class: "font-medium text-gray-900" },
13369
+ "Username",
13370
+ -1
13371
+ /* CACHED */
13372
+ )),
13373
+ createElementVNode("p", _hoisted_19$1, [
13374
+ createTextVNode(
13375
+ toDisplayString($setup.currentUser?.username || "No username set") + " ",
13376
+ 1
13377
+ /* TEXT */
13378
+ ),
13379
+ $setup.usernameChangeData.cooldownEnd ? (openBlock(), createElementBlock(
13380
+ "span",
13381
+ _hoisted_20$1,
13382
+ " (Can change in " + toDisplayString($setup.usernameChangeData.daysRemaining) + " days) ",
13383
+ 1
13384
+ /* TEXT */
13385
+ )) : createCommentVNode("v-if", true)
13386
+ ])
13387
+ ]),
13388
+ createVNode($setup["StrandsUiButton"], {
13389
+ variant: "secondary",
13390
+ size: "sm",
13391
+ disabled: !$setup.usernameChangeData.canChange || $setup.usernameChangeLoading,
13392
+ onClick: $setup.handleToggleUsernameChange
13393
+ }, {
13394
+ default: withCtx(() => [
13395
+ createTextVNode(
13396
+ toDisplayString($setup.showUsernameChange ? "Cancel" : $setup.currentUser?.username ? "Change" : "Set Username"),
13397
+ 1
13398
+ /* TEXT */
13399
+ )
13400
+ ]),
13401
+ _: 1
13402
+ /* STABLE */
13403
+ }, 8, ["disabled"])
13404
+ ]),
13405
+ createVNode(Transition, { name: "expand" }, {
13406
+ default: withCtx(() => [
13407
+ $setup.showUsernameChange ? (openBlock(), createElementBlock("div", _hoisted_21, [
13408
+ createVNode($setup["StrandsUiInput"], {
13409
+ modelValue: $setup.usernameForm.username,
13410
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.usernameForm.username = $event),
13411
+ type: "text",
13412
+ placeholder: "Enter username (3-30 characters)",
13413
+ autocomplete: "username",
13414
+ error: $setup.usernameForm.errors.username
13415
+ }, null, 8, ["modelValue", "error"]),
13416
+ $setup.usernameAvailability.message ? (openBlock(), createElementBlock(
13417
+ "div",
13418
+ {
13419
+ key: 0,
13420
+ class: normalizeClass(["text-xs", $setup.usernameAvailability.available ? "text-green-600" : "text-red-600"])
13421
+ },
13422
+ toDisplayString($setup.usernameAvailability.message),
13423
+ 3
13424
+ /* TEXT, CLASS */
13425
+ )) : createCommentVNode("v-if", true),
13426
+ createVNode($setup["StrandsUiButton"], {
13427
+ variant: "primary",
13428
+ size: "sm",
13429
+ onClick: $setup.handleUsernameChange,
13430
+ disabled: !$setup.isUsernameChangeFormValid || $setup.usernameChangeLoading
13431
+ }, {
13432
+ default: withCtx(() => [
13433
+ createTextVNode(
13434
+ toDisplayString($setup.usernameChangeLoading ? "Updating..." : "Update Username"),
13435
+ 1
13436
+ /* TEXT */
13437
+ )
13438
+ ]),
13439
+ _: 1
13440
+ /* STABLE */
13441
+ }, 8, ["disabled"])
13442
+ ])) : createCommentVNode("v-if", true)
13443
+ ]),
13444
+ _: 1
13445
+ /* STABLE */
13446
+ })
13210
13447
  ])
13211
13448
  ]),
13212
13449
  createCommentVNode(" Security Settings "),
13213
- createElementVNode("div", _hoisted_17$1, [
13214
- _cache[22] || (_cache[22] = createElementVNode(
13450
+ createElementVNode("div", _hoisted_22, [
13451
+ _cache[24] || (_cache[24] = createElementVNode(
13215
13452
  "h3",
13216
13453
  { class: "text-lg font-semibold text-gray-900 mb-3 md:mb-4" },
13217
13454
  "Security Settings",
@@ -13219,10 +13456,10 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13219
13456
  /* CACHED */
13220
13457
  )),
13221
13458
  createCommentVNode(" Password Change "),
13222
- createElementVNode("div", _hoisted_18$1, [
13223
- createElementVNode("div", _hoisted_19$1, [
13459
+ createElementVNode("div", _hoisted_23, [
13460
+ createElementVNode("div", _hoisted_24, [
13224
13461
  createElementVNode("div", null, [
13225
- _cache[17] || (_cache[17] = createElementVNode(
13462
+ _cache[19] || (_cache[19] = createElementVNode(
13226
13463
  "h4",
13227
13464
  { class: "font-medium text-gray-900" },
13228
13465
  "Password",
@@ -13231,7 +13468,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13231
13468
  )),
13232
13469
  createElementVNode(
13233
13470
  "p",
13234
- _hoisted_20$1,
13471
+ _hoisted_25,
13235
13472
  "Last updated " + toDisplayString($setup.passwordLastUpdated),
13236
13473
  1
13237
13474
  /* TEXT */
@@ -13240,7 +13477,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13240
13477
  createVNode($setup["StrandsUiButton"], {
13241
13478
  variant: "secondary",
13242
13479
  size: "sm",
13243
- onClick: _cache[5] || (_cache[5] = ($event) => $setup.showPasswordChange = !$setup.showPasswordChange)
13480
+ onClick: _cache[6] || (_cache[6] = ($event) => $setup.showPasswordChange = !$setup.showPasswordChange)
13244
13481
  }, {
13245
13482
  default: withCtx(() => [
13246
13483
  createTextVNode(
@@ -13255,24 +13492,24 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13255
13492
  ]),
13256
13493
  createVNode(Transition, { name: "expand" }, {
13257
13494
  default: withCtx(() => [
13258
- $setup.showPasswordChange ? (openBlock(), createElementBlock("div", _hoisted_21, [
13495
+ $setup.showPasswordChange ? (openBlock(), createElementBlock("div", _hoisted_26, [
13259
13496
  createVNode($setup["StrandsUiInput"], {
13260
13497
  modelValue: $setup.passwordForm.current,
13261
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.passwordForm.current = $event),
13498
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.passwordForm.current = $event),
13262
13499
  type: "password",
13263
13500
  placeholder: "Current password",
13264
13501
  autocomplete: "current-password"
13265
13502
  }, null, 8, ["modelValue"]),
13266
13503
  createVNode($setup["StrandsUiInput"], {
13267
13504
  modelValue: $setup.passwordForm.new,
13268
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.passwordForm.new = $event),
13505
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.passwordForm.new = $event),
13269
13506
  type: "password",
13270
13507
  placeholder: "New password",
13271
13508
  autocomplete: "new-password"
13272
13509
  }, null, 8, ["modelValue"]),
13273
13510
  createVNode($setup["StrandsUiInput"], {
13274
13511
  modelValue: $setup.passwordForm.confirm,
13275
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.passwordForm.confirm = $event),
13512
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.passwordForm.confirm = $event),
13276
13513
  type: "password",
13277
13514
  placeholder: "Confirm new password",
13278
13515
  autocomplete: "new-password"
@@ -13283,7 +13520,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13283
13520
  onClick: $setup.handlePasswordChange,
13284
13521
  disabled: !$setup.isPasswordFormValid
13285
13522
  }, {
13286
- default: withCtx(() => _cache[18] || (_cache[18] = [
13523
+ default: withCtx(() => _cache[20] || (_cache[20] = [
13287
13524
  createTextVNode(
13288
13525
  " Update Password ",
13289
13526
  -1
@@ -13291,7 +13528,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13291
13528
  )
13292
13529
  ])),
13293
13530
  _: 1,
13294
- __: [18]
13531
+ __: [20]
13295
13532
  }, 8, ["disabled"])
13296
13533
  ])) : createCommentVNode("v-if", true)
13297
13534
  ]),
@@ -13300,10 +13537,10 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13300
13537
  })
13301
13538
  ]),
13302
13539
  createCommentVNode(" Two-Factor Authentication "),
13303
- createElementVNode("div", _hoisted_22, [
13304
- createElementVNode("div", _hoisted_23, [
13305
- createElementVNode("div", _hoisted_24, [
13306
- _cache[19] || (_cache[19] = createElementVNode(
13540
+ createElementVNode("div", _hoisted_27, [
13541
+ createElementVNode("div", _hoisted_28, [
13542
+ createElementVNode("div", _hoisted_29, [
13543
+ _cache[21] || (_cache[21] = createElementVNode(
13307
13544
  "h4",
13308
13545
  { class: "font-medium text-gray-900" },
13309
13546
  "Two-Factor Authentication",
@@ -13312,13 +13549,13 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13312
13549
  )),
13313
13550
  createElementVNode(
13314
13551
  "p",
13315
- _hoisted_25,
13552
+ _hoisted_30,
13316
13553
  toDisplayString($setup.currentUser?.mfaEnabled ? "Enabled" : "Add extra security to your account"),
13317
13554
  1
13318
13555
  /* TEXT */
13319
13556
  ),
13320
13557
  createCommentVNode(" Device Type Chips "),
13321
- $setup.mfaDeviceChips.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_26, [
13558
+ $setup.mfaDeviceChips.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_31, [
13322
13559
  (openBlock(true), createElementBlock(
13323
13560
  Fragment,
13324
13561
  null,
@@ -13346,7 +13583,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13346
13583
  ),
13347
13584
  createElementVNode(
13348
13585
  "span",
13349
- _hoisted_27,
13586
+ _hoisted_32,
13350
13587
  toDisplayString(chip.label),
13351
13588
  1
13352
13589
  /* TEXT */
@@ -13364,7 +13601,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13364
13601
  createVNode($setup["StrandsUiButton"], {
13365
13602
  variant: $setup.currentUser?.mfaEnabled ? "secondary" : "primary",
13366
13603
  size: "sm",
13367
- onClick: _cache[9] || (_cache[9] = ($event) => $setup.showMfaModal = true),
13604
+ onClick: _cache[10] || (_cache[10] = ($event) => $setup.showMfaModal = true),
13368
13605
  class: "flex-shrink-0"
13369
13606
  }, {
13370
13607
  default: withCtx(() => [
@@ -13380,10 +13617,10 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13380
13617
  ])
13381
13618
  ]),
13382
13619
  createCommentVNode(" Active Sessions "),
13383
- createElementVNode("div", _hoisted_28, [
13384
- createElementVNode("div", _hoisted_29, [
13620
+ createElementVNode("div", _hoisted_33, [
13621
+ createElementVNode("div", _hoisted_34, [
13385
13622
  createElementVNode("div", null, [
13386
- _cache[20] || (_cache[20] = createElementVNode(
13623
+ _cache[22] || (_cache[22] = createElementVNode(
13387
13624
  "h4",
13388
13625
  { class: "font-medium text-gray-900" },
13389
13626
  "Active Sessions",
@@ -13392,7 +13629,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13392
13629
  )),
13393
13630
  createElementVNode(
13394
13631
  "p",
13395
- _hoisted_30,
13632
+ _hoisted_35,
13396
13633
  toDisplayString($setup.activeSessions.length) + " active device(s)",
13397
13634
  1
13398
13635
  /* TEXT */
@@ -13401,10 +13638,10 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13401
13638
  createVNode($setup["StrandsUiButton"], {
13402
13639
  variant: "secondary",
13403
13640
  size: "sm",
13404
- onClick: _cache[10] || (_cache[10] = ($event) => _ctx.$emit("manage-sessions")),
13641
+ onClick: _cache[11] || (_cache[11] = ($event) => _ctx.$emit("manage-sessions")),
13405
13642
  disabled: ""
13406
13643
  }, {
13407
- default: withCtx(() => _cache[21] || (_cache[21] = [
13644
+ default: withCtx(() => _cache[23] || (_cache[23] = [
13408
13645
  createTextVNode(
13409
13646
  " Coming Soon ",
13410
13647
  -1
@@ -13412,14 +13649,14 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13412
13649
  )
13413
13650
  ])),
13414
13651
  _: 1,
13415
- __: [21]
13652
+ __: [23]
13416
13653
  })
13417
13654
  ])
13418
13655
  ])
13419
13656
  ])
13420
13657
  ]),
13421
13658
  createCommentVNode(" Action Buttons - Only show when changes are made "),
13422
- $setup.hasChanges ? (openBlock(), createElementBlock("div", _hoisted_31, [
13659
+ $setup.hasChanges ? (openBlock(), createElementBlock("div", _hoisted_36, [
13423
13660
  createVNode($setup["StrandsUiButton"], {
13424
13661
  type: "submit",
13425
13662
  variant: "primary",
@@ -13441,7 +13678,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13441
13678
  onClick: $setup.handleCancel,
13442
13679
  disabled: $setup.loading
13443
13680
  }, {
13444
- default: withCtx(() => _cache[23] || (_cache[23] = [
13681
+ default: withCtx(() => _cache[25] || (_cache[25] = [
13445
13682
  createTextVNode(
13446
13683
  " Cancel ",
13447
13684
  -1
@@ -13449,7 +13686,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13449
13686
  )
13450
13687
  ])),
13451
13688
  _: 1,
13452
- __: [23]
13689
+ __: [25]
13453
13690
  }, 8, ["disabled"])
13454
13691
  ])) : createCommentVNode("v-if", true)
13455
13692
  ],
@@ -13457,10 +13694,10 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13457
13694
  /* NEED_HYDRATION */
13458
13695
  ),
13459
13696
  createCommentVNode(" Success/Error Messages "),
13460
- $setup.successMessage ? (openBlock(), createElementBlock("div", _hoisted_32, [
13461
- createElementVNode("div", _hoisted_33, [
13462
- createElementVNode("div", _hoisted_34, [
13463
- _cache[24] || (_cache[24] = createElementVNode(
13697
+ $setup.successMessage ? (openBlock(), createElementBlock("div", _hoisted_37, [
13698
+ createElementVNode("div", _hoisted_38, [
13699
+ createElementVNode("div", _hoisted_39, [
13700
+ _cache[26] || (_cache[26] = createElementVNode(
13464
13701
  "svg",
13465
13702
  {
13466
13703
  class: "w-4 h-4 mt-0.5 flex-shrink-0",
@@ -13479,7 +13716,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13479
13716
  )),
13480
13717
  createElementVNode(
13481
13718
  "p",
13482
- _hoisted_35,
13719
+ _hoisted_40,
13483
13720
  toDisplayString($setup.successMessage),
13484
13721
  1
13485
13722
  /* TEXT */
@@ -13487,10 +13724,10 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13487
13724
  ])
13488
13725
  ])
13489
13726
  ])) : createCommentVNode("v-if", true),
13490
- $setup.errorMessage ? (openBlock(), createElementBlock("div", _hoisted_36, [
13491
- createElementVNode("div", _hoisted_37, [
13492
- createElementVNode("div", _hoisted_38, [
13493
- _cache[25] || (_cache[25] = createElementVNode(
13727
+ $setup.errorMessage ? (openBlock(), createElementBlock("div", _hoisted_41, [
13728
+ createElementVNode("div", _hoisted_42, [
13729
+ createElementVNode("div", _hoisted_43, [
13730
+ _cache[27] || (_cache[27] = createElementVNode(
13494
13731
  "svg",
13495
13732
  {
13496
13733
  class: "w-4 h-4 mt-0.5 flex-shrink-0",
@@ -13509,7 +13746,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13509
13746
  )),
13510
13747
  createElementVNode(
13511
13748
  "p",
13512
- _hoisted_39,
13749
+ _hoisted_44,
13513
13750
  toDisplayString($setup.errorMessage),
13514
13751
  1
13515
13752
  /* TEXT */
@@ -13522,7 +13759,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13522
13759
  config: $setup.props.config
13523
13760
  }, {
13524
13761
  default: withCtx(() => [
13525
- createElementVNode("div", _hoisted_40, [
13762
+ createElementVNode("div", _hoisted_45, [
13526
13763
  createCommentVNode(" Sign Out button "),
13527
13764
  createVNode($setup["StrandsUiButton"], {
13528
13765
  variant: "secondary",
@@ -13544,10 +13781,10 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13544
13781
  createCommentVNode(" Settings button "),
13545
13782
  createVNode($setup["StrandsUiButton"], {
13546
13783
  variant: "secondary",
13547
- onClick: _cache[11] || (_cache[11] = ($event) => $setup.showSettingsModal = true),
13784
+ onClick: _cache[12] || (_cache[12] = ($event) => $setup.showSettingsModal = true),
13548
13785
  class: "w-full sm:w-auto"
13549
13786
  }, {
13550
- default: withCtx(() => _cache[26] || (_cache[26] = [
13787
+ default: withCtx(() => _cache[28] || (_cache[28] = [
13551
13788
  createElementVNode(
13552
13789
  "svg",
13553
13790
  {
@@ -13575,13 +13812,13 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13575
13812
  )
13576
13813
  ])),
13577
13814
  _: 1,
13578
- __: [26]
13815
+ __: [28]
13579
13816
  })
13580
13817
  ]),
13581
13818
  createCommentVNode(" Need help "),
13582
- $setup.getSupportEmail() ? (openBlock(), createElementBlock("div", _hoisted_41, [
13583
- createElementVNode("p", _hoisted_42, [
13584
- _cache[28] || (_cache[28] = createTextVNode(
13819
+ $setup.getSupportEmail() ? (openBlock(), createElementBlock("div", _hoisted_46, [
13820
+ createElementVNode("p", _hoisted_47, [
13821
+ _cache[30] || (_cache[30] = createTextVNode(
13585
13822
  " Need help? ",
13586
13823
  -1
13587
13824
  /* CACHED */
@@ -13590,7 +13827,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13590
13827
  variant: "primary",
13591
13828
  href: `mailto:${$setup.getSupportEmail()}`
13592
13829
  }, {
13593
- default: withCtx(() => _cache[27] || (_cache[27] = [
13830
+ default: withCtx(() => _cache[29] || (_cache[29] = [
13594
13831
  createTextVNode(
13595
13832
  " Contact Support ",
13596
13833
  -1
@@ -13598,7 +13835,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13598
13835
  )
13599
13836
  ])),
13600
13837
  _: 1,
13601
- __: [27]
13838
+ __: [29]
13602
13839
  }, 8, ["href"])
13603
13840
  ])
13604
13841
  ])) : createCommentVNode("v-if", true)
@@ -13610,21 +13847,21 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13610
13847
  createCommentVNode(" MFA Management Modal "),
13611
13848
  createVNode($setup["StrandsMfaModal"], {
13612
13849
  show: $setup.showMfaModal,
13613
- onClose: _cache[12] || (_cache[12] = ($event) => $setup.showMfaModal = false),
13850
+ onClose: _cache[13] || (_cache[13] = ($event) => $setup.showMfaModal = false),
13614
13851
  onMfaUpdated: $setup.handleMfaUpdated
13615
13852
  }, null, 8, ["show"]),
13616
13853
  createCommentVNode(" Settings Modal "),
13617
13854
  $setup.showSettingsModal ? (openBlock(), createBlock($setup["StrandsSettingsModal"], {
13618
13855
  key: 0,
13619
- onClose: _cache[13] || (_cache[13] = ($event) => $setup.showSettingsModal = false),
13856
+ onClose: _cache[14] || (_cache[14] = ($event) => $setup.showSettingsModal = false),
13620
13857
  onSettingsUpdated: $setup.handleSettingsUpdated
13621
13858
  })) : createCommentVNode("v-if", true),
13622
13859
  createCommentVNode(" Avatar Editor Modal "),
13623
- $setup.showAvatarEditor ? (openBlock(), createElementBlock("div", _hoisted_43, [
13624
- createElementVNode("div", _hoisted_44, [
13625
- createElementVNode("div", _hoisted_45, [
13860
+ $setup.showAvatarEditor ? (openBlock(), createElementBlock("div", _hoisted_48, [
13861
+ createElementVNode("div", _hoisted_49, [
13862
+ createElementVNode("div", _hoisted_50, [
13626
13863
  createElementVNode("div", { class: "flex items-center justify-between mb-6" }, [
13627
- _cache[31] || (_cache[31] = createElementVNode(
13864
+ _cache[33] || (_cache[33] = createElementVNode(
13628
13865
  "h2",
13629
13866
  { class: "text-xl font-bold text-gray-900" },
13630
13867
  "Edit Avatar",
@@ -13634,7 +13871,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
13634
13871
  createElementVNode("button", {
13635
13872
  onClick: $setup.handleAvatarEditorClose,
13636
13873
  class: "text-gray-400 hover:text-gray-600 transition-colors"
13637
- }, _cache[30] || (_cache[30] = [
13874
+ }, _cache[32] || (_cache[32] = [
13638
13875
  createElementVNode(
13639
13876
  "svg",
13640
13877
  {