{
  "version": 3,
  "sources": ["/cdn/shop/t/23/assets/dsd-launch-social-activation-p11dz686-g27.js?dsd_cutover=p11dz686-restricted-explicit-shell-178704"],
  "sourcesContent": ["(function () {\r\n  \"use strict\";\n  var VERSION = \"p11dz686-message-route-notification-r138\",\r\n    BUILD = \"p11dz686-standalone-push-first-launch-r204\",\r\n    STALE_ROUTE_STAMPS = [\n      \"p11dz686-ps37-open-gate-repair-20260929-r51\",\n      \"p11dz686-ps37-modal-album-repair-20260929-r47\",\n      \"p11dz686-ps37-map-card-notification-repair-20260929-r46\",\n      \"p11dz686-ps37-physical-repair-20260929-r45\",\n      \"p11dz686-ps37-stage5-albums-20260928-r42\",\n      \"p11dz686-connection-signal-retained-node-sync-20260928-r38\",\n      \"p11dz686-prelaunch-shared-owner-closure-20260926-r33\",\n      \"p11dz686-fresh-account-onboarding-recovery-20260926-r32\",\n      \"p11dz686-release-h-location-owner-read-canonical-20260922-r25\",\n      \"p11dz686-release-h-location-hydration-canonical-20260922-r24\",\n      \"p11dz686-release-h-location-hydration-canonical-20260922-r23\",\n      \"p11dz686-release-h-location-discovery-v2-20260922-r22\",\n      \"p11dz686-release-h-location-discovery-v2-20260922-r21\",\n      \"p11dz686-release-h-location-discovery-v2-20260922-r20\",\n      \"p11dz686-release-h-profile-projection-parity-20260920-r5\",\n      \"p11dz686-release-h-profile-projection-parity-20260920-r4\",\n      \"p11dz686-release-h-profile-projection-parity-20260920-r3\",\n      \"p11dz686-release-h-profile-projection-parity-20260920-r2\",\n      \"p11dz686-release-h-profile-projection-parity-20260920-r1\",\n      \"p11dz686-release-f-profile-pin-filters-20260919-r4\",\n      \"p11dz686-release-e-polls-hashtags-20260918-r5\",\n      \"p11dz686-release-e-polls-hashtags-20260918-r3\",\n      \"p11dz686-release-e-polls-hashtags-20260918-r2\",\n      \"p11dz686-release-e-polls-hashtags-20260918-r1\",\n      \"p11dz686-release-d-glances-20260918-r3\",\n      \"p11dz686-release-d-glances-20260918-r2\",\n      \"p11dz686-release-d-glances-20260918-r1\",\n      \"p11dz686-release-c2-stabilization-20260918-r19\",\n      \"p11dz686-release-c2-stabilization-20260916-r3\",\n      \"p11dz686-release-c2-stabilization-20260916-r1\",\n      \"p11dz686-release-c-story-engagement-20260916-r12\",\n      \"p11dz686-release-c-story-engagement-20260916-r11\",\n      \"p11dz686-new-user-discovery-infinite-scroll-20260915-r8\",\n      \"p11dz686-profile-onboarding-release-a-20260915-r6\",\n      \"p11dz686-profile-onboarding-release-a-20260914-r4\",\n      \"p11dz686-profile-onboarding-release-a-20260914-r3\",\n      \"p11dz686-profile-onboarding-release-a-20260914-r2\",\n      \"p11dz686-profile-onboarding-release-a-20260914-r1\",\n      \"p11dz686-new-user-onboarding-p0-20260914-r3\",\n      \"p11dz686-new-user-onboarding-p0-20260914-r2\",\n      \"p11dz686-new-user-onboarding-p0-20260914-r1\",\n      \"p11dz686-social-product-contract-20260914-r3\",\n      \"p11dz686-social-product-contract-20260914-r2\",\n      \"p11dz686-social-product-contract-20260914-r1\",\n      \"p11dz686-physical-regression-closure-20260912-r13\",\n      \"p11dz686-social-relations-content-persistence-178702\",\r\n      \"p11dz686-profile-policy-story-discovery-178701\",\r\n      \"p11dz686-comment-tooltip-repair-178685\",\r\n      \"p11dz686-batch3-canonical-profile-state-178619\",\r\n      \"p11dz686-terra56-batch3-178579\",\r\n      \"p11dz686-founder-correction-phase-d-178574\",\r\n      \"p11dz686-founder-correction-phase-c-178573\",\r\n      \"p11dz686-terra56-social-type-batch6-178563\",\r\n      \"p11dz686-terra56-overlay-nav-batch5-178562\",\r\n      \"p11dz686-terra56-post-story-batch4-178561\",\r\n      \"p11dz686-terra56-profile-follow-batch3-178560\",\r\n      \"p11dz686-terra56-discovery-batch2-178559\",\r\n      \"p11dz686-terra56-messaging-batch1-178558\",\r\n      \"p11dz686-avatar-focal-propagation-repair-178552\",\r\n      \"p11dz686-avatar-focal-mutation-live-178551\",\r\n      \"p11dz686-avatar-focal-mutation-178536\",\r\n      \"p11dz686-avatar-focus-correction-178535\",\r\n      \"p11dz686-avatar-focus-propagation-178530\",\r\n      \"p11dz686-main-feed-surface-match-178529\",\r\n      \"p11dz686-alerts-comments-178517\",\r\n      \"p11dz686-canonical-composer-modal-contract-1784902200\",\r\n      \"p11dz686-profile-identity-target-fallback-1784901800\",\r\n      \"p11dz686-public-location-grant-safe-1784881900\",\r\n      \"p11dz686-public-profile-location-hydration-1784881000\",\r\n      \"p11dz686-owner-publishing-key-align-1784879900\",\r\n      \"p11dz686-composer-safe-area-repair-1784878800\",\r\n      \"p11dz686-profile-owner-lock-recovery-1784874300\",\r\n      \"p11dz686-mobile-menu-drawer-reconstruct-1784829600\",\r\n      \"p11dz686-discovery-media-read-throttle-1784872500\",\r\n      \"p11dz686-public-profile-anon-select-1784870000\",\r\n      \"p11dz686-post-follow-label-visible-1784696900\",\r\n      \"p11dz686-gate-sprint-profile-discovery-composer-1784698500\",\r\n      \"p11dz686-notification-target-fallback-1784688700\",\r\n      \"p11dz686-g30-orphan-media-runtime-deconstruct-1784513100\",\r\n      \"p11dz686-public-egress-runtime-lock-1784361600\",\r\n      \"p11dz686-renderer-ownership-polish-1784184000\",\r\n      \"p11dz684-video-private-wasabi-url-purge-1783698000\",\r\n      \"p11dz684-launch-held-inline-messages-1783698000\",\r\n    ];\r\n  function hasStaleRouteStamp(value) {\r\n    return (\r\n      (value = String(value || \"\")),\r\n      STALE_ROUTE_STAMPS.some(function (stamp) {\r\n        return value.indexOf(stamp) !== -1;\r\n      }) || value.indexOf(\"public-egress-runtime-lock\") !== -1\r\n    );\r\n  }\r\n  function replaceStaleRouteStamp(value) {\r\n    return (\r\n      (value = String(value || \"\")),\r\n      STALE_ROUTE_STAMPS.forEach(function (stamp) {\r\n        value = value.split(stamp).join(BUILD);\r\n      }),\r\n      value\r\n        .replace(/p11dz686-public-egress-runtime-lock-\\d+/g, BUILD)\r\n        .replace(/public-egress-runtime-lock/g, BUILD)\r\n    );\r\n  }\r\n  function canonicalRouteHref(value) {\r\n    value = String(value || \"\");\r\n    if (!value) return value;\r\n    try {\r\n      var url = new URL(value, window.location.origin);\r\n      if (url.origin !== window.location.origin) return value;\r\n      var nextProfile = String(url.searchParams.get(\"next_profile\") || \"\")\r\n        .trim()\r\n        .replace(/^@+/, \"\");\r\n      if (\r\n        url.pathname === \"/pages/user-profile\" &&\r\n        nextProfile &&\r\n        !url.searchParams.get(\"profile\")\r\n      )\r\n        url.searchParams.set(\"profile\", nextProfile);\r\n      [\"route_rev\", \"profile_rev\", \"profile_nav_base\", \"next_profile\"].forEach(\r\n        function (key) {\r\n          url.searchParams.delete(key);\r\n        },\r\n      );\r\n      return url.pathname + url.search + url.hash;\r\n    } catch (_canonicalRouteError) {\r\n      return value;\r\n    }\r\n  }\r\n  function normalizeRouteStampDom() {\r\n    try {\r\n      (document.querySelectorAll(\"a[href]\").forEach(function (anchor) {\r\n        var href = anchor.getAttribute(\"href\") || \"\";\r\n        if (\r\n          /(?:[?&](?:route_rev|profile_rev|profile_nav_base|next_profile)=)/.test(\r\n            href,\r\n          )\r\n        ) {\r\n          href = canonicalRouteHref(href);\r\n          anchor.setAttribute(\"href\", href);\r\n        }\r\n        if (/^\\/pages\\/users(?:[?#]|$)/.test(href)) {\n          try {\n            var discoveryUrl = new URL(href, window.location.origin);\n            /^(?:users-ci012|map)$/.test(\n              discoveryUrl.searchParams.get(\"view\") || \"\",\n            ) && discoveryUrl.searchParams.delete(\"view\");\n            anchor.setAttribute(\n              \"href\",\n              discoveryUrl.pathname + discoveryUrl.search + discoveryUrl.hash,\n            );\r\n          } catch (_discoveryRouteError) {}\r\n        }\r\n      }),\r\n        [\r\n          \"data-dsd-cutover-cache-stamp\",\r\n          \"data-dsd-route-cache-revision\",\r\n          \"data-dsd-route-cache-stamp\",\r\n          \"data-dsd-version\",\r\n          \"data-dsd-section-cache-marker\",\r\n          \"data-dsd-template-cache-bust\",\r\n        ].forEach(function (attr) {\r\n          document.querySelectorAll(\"[\" + attr + \"]\").forEach(function (node) {\r\n            var value = node.getAttribute(attr);\r\n            hasStaleRouteStamp(value) &&\r\n              node.setAttribute(attr, replaceStaleRouteStamp(value));\r\n          });\r\n        }));\r\n      if (\r\n        /(?:[?&](?:route_rev|profile_rev|profile_nav_base|next_profile)=)/.test(\r\n          window.location.search,\r\n        )\r\n      ) {\r\n        var canonicalLocation = canonicalRouteHref(window.location.href);\r\n        window.history.replaceState(window.history.state, \"\", canonicalLocation);\r\n      }\r\n    } catch (e) {}\r\n  }\r\n  if ((normalizeRouteStampDom(), !window.__DSDRouteStampNormalizerP11DZ686)) {\r\n    window.__DSDRouteStampNormalizerP11DZ686 = !0;\r\n    var routeStampPasses = 0,\r\n      routeStampTimer = window.setInterval(function () {\r\n        (normalizeRouteStampDom(),\r\n          (routeStampPasses += 1),\r\n          routeStampPasses >= 8 && window.clearInterval(routeStampTimer));\r\n      }, 500);\r\n    document.readyState === \"loading\"\r\n      ? document.addEventListener(\"DOMContentLoaded\", normalizeRouteStampDom, {\r\n          once: !0,\r\n        })\r\n      : window.setTimeout(normalizeRouteStampDom, 0);\r\n  }\r\n  if (\r\n    window.DSDLaunchSocial &&\r\n    window.DSDLaunchSocial.version === VERSION &&\r\n    window.DSDLaunchSocial.build === BUILD\r\n  )\r\n    return;\r\n  var OWNER = \"LaunchSocialActivation\",\r\n    PUBLIC_PROFILE_SEEDS = [],\r\n    GHOST_PURGE_VERSION = \"p11dz679\",\r\n    DRAFT_QUEUE_KEY = \"dsd.launch.draftQueue.v2\",\r\n    DRAFT_QUEUE_PURGE_KEY =\r\n      \"dsd.launch.draftQueue.retiredSideEffectsPurge.p11dz686\",\r\n    DELETED_POSTS_KEY = \"dsd.launch.deletedPosts.v1\",\r\n    POST_STATE_OVERRIDES_KEY = \"dsd.launch.postStateOverrides.v1\",\r\n    COMMENT_STATE_OVERRIDES_KEY = \"dsd.launch.commentStateOverrides.v1\",\r\n    SAVED_STATE_OVERRIDES_KEY = \"dsd.launch.savedStateOverrides.v1\",\r\n    SUPABASE_PRIVATE_PROFILE_BASE_SELECT =\r\n      \"user_id,profile_key,handle,display_name,bio,external_url,conversation_starter_prompt,conversation_starter_answer,location,location_city,location_state,location_country,location_country_code,birthdate,age_verified,adult_content_enabled,verified,visibility,content_rating,access_gate,moderation_state,account_state,searchable,setup_complete,avatar_media_id,banner_media_id,banner_position,banner_focus_x,banner_focus_y,avatar_focus_x,avatar_focus_y,avatar_wasabi_object_key,banner_wasabi_object_key,use_approximate_location_for_nearby,appear_in_nearby,show_distance_to_users,show_current_city_on_profile,location_preferences_initialized,location_invisible_mode,nearby_location_accuracy_meters,nearby_location_captured_at,nearby_location_updated_at,metadata,updated_at\",\r\n    SUPABASE_PRIVATE_PROFILE_SELECT = SUPABASE_PRIVATE_PROFILE_BASE_SELECT,\r\n    SUPABASE_PUBLIC_PROFILE_BASE_SELECT =\r\n      \"profile_key,handle,display_name,bio,external_url,location,location_city,location_state,show_current_city_on_profile,avatar_media_id,banner_media_id,banner_position,banner_focus_x,banner_focus_y,avatar_focus_x,avatar_focus_y,verified,visibility,searchable,status,moderation_state,last_active_at,updated_at\",\r\n    SUPABASE_PUBLIC_PROFILE_SELECT =\n      \"profile_key,handle,display_name,bio,external_url,conversation_starter_prompt,conversation_starter_answer,location,location_city,location_state,location_country,location_country_code,avatar_media_id,banner_media_id,banner_position,banner_focus_x,banner_focus_y,avatar_focus_x,avatar_focus_y,verified,visibility,searchable,status,moderation_state,appear_in_nearby,show_distance_to_users,show_current_city_on_profile,last_active_at,updated_at\";\r\n  function supabasePublicProfileSelect(readOptions) {\r\n    return readOptions &&\r\n      readOptions.publicRead === !0 &&\r\n      readOptions.viewerAuthenticated !== !0\r\n      ? SUPABASE_PUBLIC_PROFILE_BASE_SELECT\r\n      : SUPABASE_PUBLIC_PROFILE_SELECT;\r\n  }\r\n  var LOGIN_RETURN_URL =\n      \"/customer_authentication/login?return_to=%2Fpages%2Fuser-profile\",\n    REGISTER_RETURN_URL =\n      \"/customer_authentication/login?return_to=%2Fpages%2Fuser-profile\",\n    DSD_PLUS_PURCHASE_URL = \"/products/dsd\",\r\n    LOCAL_POST_OVERRIDE_TTL_MS = 1800 * 1e3,\r\n    MAX = { body: 5e3, comment: 1200, message: 2e3, story: 900 },\r\n    NEARBY_DISCOVERY_PAGE_LIMIT = 24,\r\n    NEARBY_DISCOVERY_MAX_MILES = 50,\r\n    ACTIVE_LOCATION_FRESHNESS_MS = 30 * 60 * 1e3,\r\n    PROFILE_PRESENCE_ACTIVE_MS = 15 * 60 * 1e3,\r\n    PROFILE_PRESENCE_TOUCH_MS = 5 * 60 * 1e3,\r\n    ACTIVE_LOCATION_MAX_ACCURACY_METERS = 100,\r\n    ACTIVE_LOCATION_TARGET_ACCURACY_METERS = 50,\r\n    ACTIVE_LOCATION_SAMPLE_WINDOW_MS = 12 * 1e3,\r\n    ACTIVE_LOCATION_EXPLICIT_MAX_AGE_MS = 2 * 60 * 1e3,\r\n    LOCATION_SUGGESTIONS = [\r\n      { city: \"Detroit\", state: \"Michigan\" },\r\n      { city: \"Southfield\", state: \"Michigan\" },\r\n      { city: \"Ferndale\", state: \"Michigan\" },\r\n      { city: \"Royal Oak\", state: \"Michigan\" },\r\n      { city: \"Dearborn\", state: \"Michigan\" },\r\n      { city: \"Oak Park\", state: \"Michigan\" },\r\n      { city: \"Warren\", state: \"Michigan\" },\r\n      { city: \"Taylor\", state: \"Michigan\" },\r\n      { city: \"Inkster\", state: \"Michigan\" },\r\n      { city: \"Lansing\", state: \"Michigan\" },\r\n      { city: \"Ann Arbor\", state: \"Michigan\" },\r\n      { city: \"Grand Rapids\", state: \"Michigan\" },\r\n      { city: \"Chicago\", state: \"Illinois\" },\r\n      { city: \"Columbus\", state: \"Ohio\" },\r\n      { city: \"Cleveland\", state: \"Ohio\" },\r\n      { city: \"Atlanta\", state: \"Georgia\" },\r\n      { city: \"New York\", state: \"New York\" },\r\n      { city: \"Los Angeles\", state: \"California\" },\r\n      { city: \"Houston\", state: \"Texas\" },\r\n      { city: \"Miami\", state: \"Florida\" },\r\n      { city: \"Tolleson\", state: \"Arizona\" },\r\n      { city: \"Washington\", state: \"District of Columbia\" },\r\n      { city: \"Ocala\", state: \"Florida\" },\r\n      { city: \"Hammond\", state: \"Indiana\" },\r\n      { city: \"Indianapolis\", state: \"Indiana\" },\r\n      { city: \"Lafayette\", state: \"Louisiana\" },\r\n      { city: \"Canton\", state: \"Michigan\" },\r\n      { city: \"Midland\", state: \"Michigan\" },\r\n      { city: \"Port Huron\", state: \"Michigan\" },\r\n      { city: \"Portage\", state: \"Michigan\" },\r\n      { city: \"River Rouge\", state: \"Michigan\" },\r\n      { city: \"Ypsilanti\", state: \"Michigan\" },\r\n      { city: \"Saint Louis\", state: \"Missouri\" },\r\n      { city: \"St Louis\", state: \"Missouri\" },\r\n      { city: \"Las Vegas\", state: \"Nevada\" },\r\n      { city: \"NYC\", state: \"New York\" },\r\n      { city: \"Syracuse\", state: \"New York\" },\r\n      { city: \"Toledo\", state: \"Ohio\" },\r\n      { city: \"Richmond\", state: \"Virginia\" },\r\n      { city: \"Seattle\", state: \"Washington\" },\r\n    ],\r\n    READ_QUARANTINED_MEDIA_IDS = {\r\n      \"7c83d9ae-cac5-46ca-b545-4e5571c10f94\": \"non-ascii-wasabi-object-key\",\r\n      \"b69d3fa4-53a5-4416-a31b-414964e65d1c\":\r\n        \"wasabi-sign-read-500-public-profile\",\r\n      \"5640c624-1b92-4108-87b5-433fe74f3750\":\r\n        \"wasabi-read-503-public-video-quarantined\",\r\n      \"2dc431a3-e787-4efc-badd-3f5555c3b43e\":\r\n        \"wasabi-read-503-zero-byte-public-post-media\",\r\n      \"cd7f7b7e-0a35-42bd-a5a5-651ce1fbe608\":\r\n        \"wasabi-read-503-zero-byte-public-post-media\",\r\n    },\r\n    RETIRED_LAUNCH_TEST_CONTENT_IDS = {\r\n      \"post-1783691650833-agzw\": !0,\r\n      \"post-1783552172162-rooe\": !0,\r\n      \"post-1783406386083-55hi\": !0,\r\n      \"post-1783404694759-h9rx\": !0,\r\n      \"post-1782938473320-zc6o\": !0,\r\n      \"post-1784282987061-lx7i\": !0,\r\n    },\r\n    storyAdvanceTimer = null,\r\n    messageExpiryTimer = null,\r\n    renderPostsBusy = !1,\r\n    renderPostsQueued = !1,\r\n    renderPostsTimer = null,\r\n    PATHS = {\r\n      profile: \"profiles/{uid}\",\r\n      user: \"users/{uid}\",\r\n      gatedPostShell: \"gatedPostShells/{postId}\",\r\n      gatedStoryShell: \"gatedStoryShells/{storyId}\",\r\n      profilePublic: \"publicProfiles/{profileKey}\",\r\n      post: \"posts/{postId}\",\r\n      postComment: \"posts/{postId}/comments/{commentId}\",\r\n      reaction: \"posts/{postId}/reactions/{uid}\",\r\n      postShare: \"posts/{postId}/shares/{uid}\",\r\n      following: \"relationships/{uid}/following/{targetUid}\",\r\n      followers: \"relationships/{uid}/followers/{sourceUid}\",\r\n      saved: \"saves/{uid}/items/{targetId}\",\r\n      favorites: \"favorites/{uid}/items/{targetUid}\",\r\n      notification: \"notifications/{recipientUid}/items/{notificationId}\",\r\n      conversation: \"conversations/{conversationId}\",\r\n      message: \"conversations/{conversationId}/messages/{messageId}\",\r\n      story: \"stories/{storyId}\",\r\n      userStory: \"userStories/{uid}/items/{storyId}\",\r\n      moderationQueue: \"moderationQueue/{queueItemId}\",\r\n      safetyReport: \"safetyReports/{reportId}\",\r\n      founderAudit: \"founderAudit/{auditId}\",\r\n      mediaManifest: \"mediaManifests/{mediaId}\",\r\n    },\r\n    state = {\n      ready: !1,\n      runtimeLifecycle: {\n        status: \"idle\",\n        source: \"\",\n        errorCode: \"\",\n        retryCount: 0,\n        retryTimer: null,\n      },\n      bridgeReady: !1,\n      bridgeChecked: !1,\r\n      bridgeAttempting: !1,\n      profile: null,\n      ownerPrivateCapabilityKey: \"\",\n      ownerPrivateCapabilities: null,\n      ownerPrivateProfileReadKey: \"\",\r\n      ownerPrivateProfileReadPromise: null,\r\n      ownerPrivateProfileReadSettledAt: 0,\r\n      ownerPublicIdentityPreloadKey: \"\",\r\n      ownerPublicIdentityPreloadPromise: null,\r\n      viewProfile: null,\n      viewProfileResolvedKey: \"\",\r\n      viewProfilePendingKey: \"\",\r\n      viewProfilePendingPromise: null,\r\n      profileExists: !1,\r\n      publicProfiles: [],\n      publicProfilesLoaded: !1,\n      discoveryProfileRows: [],\n      discoveryProfileQuery: \"\",\n      discoveryProfileOffset: 0,\n      discoveryProfileHasMore: !1,\n      discoveryProfileLoading: !1,\n      discoveryProfileRequestGeneration: 0,\n      discoveryProfileRequest: null,\n      discoveryProfileOwnerActive: !1,\n      discoveryProfileError: \"\",\n      discoverySearchTimer: null,\n      discoveryScrollObserver: null,\n      discoveryScrollSentinel: null,\n      posts: [],\n      gatedPostShells: [],\r\n      gatedStoryShells: [],\r\n      notifications: [],\n      notificationProxyCanonical: !0,\n      notificationInboxReady: !1,\n      notificationInboxLoading: !1,\n      notificationInboxError: \"\",\n      conversations: [],\n      messageParticipantProfilesSignature: \"\",\r\n      messageParticipantProfilesLoadedSignature: \"\",\r\n      messageParticipantProfilesPromise: null,\r\n      messagesByConversation: {},\r\n      messageListeners: {},\r\n      messageAttachmentHydrationRequests: {},\r\n      premiumMessageWriteClaims: {},\r\n      messageViewOnceRevealUntil: {},\n      messageViewOncePreparedMedia: {},\n      messageViewOnceConsumptionPending: {},\n      mediaViewportObserver: null,\n      feedMediaViewportObserver: null,\n      feedMediaRetentionObserver: null,\r\n      mediaSourceRemovalObserver: null,\r\n      gifViewportObserver: null,\n      gifVisibilityBound: !1,\n      messageThreadSessions: {},\r\n      messageLifecycleProofLog: [],\r\n      activeConversationId: \"\",\n      pendingMessageDraft: null,\n      messageReplyDraft: null,\n      pendingMessageGroupRecipients: [],\n      messageGroupComposeActive: !1,\n      messageRecipientSearch: {\n        query: \"\",\n        results: [],\n        pending: !1,\n        generation: 0,\n        timer: null,\n        error: \"\",\n      },\n      messageConversationTools: {\n        conversationId: \"\",\n        mode: \"\",\n        query: \"\",\n        filter: \"all\",\n        matches: [],\n        index: -1,\n      },\n      stories: [],\r\n      activeStoryId: \"\",\r\n      activePostMediaId: \"\",\n      activePostMediaIndex: 0,\n      activePostMediaSurface: \"\",\n      activePostMediaRecord: null,\r\n      feedNextPageLoader: null,\n      feedHasMore: !1,\n      profileFeedPosts: [],\n      profileFeedFilter:\n        [\"photos\", \"videos\"].indexOf(\n          String(queryParam(\"media\") || \"\").toLowerCase(),\n        ) !== -1\n          ? String(queryParam(\"media\") || \"\").toLowerCase()\n          : \"all\",\n      profileFeedPinnedPostId: \"\",\n      profileFeedHasMore: !1,\n      profileFeedLoading: !1,\n      profileFeedError: \"\",\n      profileFeedReload: null,\n      postMediaPageAdvancePending: !1,\n      activeSharePostId: \"\",\n      shareComposerReturnFocus: null,\n      shareComposerReturnScroll: 0,\n      lastRequestedStoryId: \"\",\n      lastAutoOpenedStoryRoute: \"\",\n      storyRouteUnavailableId: \"\",\n      storyRouteResolutionTimer: null,\n      storyRouteResolutionTarget: \"\",\n      lastRequestedCommentId: \"\",\r\n      lastRequestedPostComposerRoute: \"\",\r\n      storyScope: \"discovery\",\r\n      storyScopeUserSelected: !1,\n      reactionsByPost: {},\n      postReactionSummariesByPost: {},\n      reactionHydrationByPost: {},\n      postReactionMutationRevision: {},\n      commentsByPost: {},\n      commentReactionProjection: {},\n      commentReactionHydrationByPost: {},\n      commentReactionMutations: {},\n      interactionMutations: {},\n      commentReplyParentByPost: {},\n      expandedCommentThreads: {},\n      draftTimersByKey: {},\n      commentListeners: {},\n      openCommentPostIds: {},\r\n      postDetailRealtimeOwner: null,\r\n      postDetailRealtimePostId: \"\",\r\n      postDrawer: { open: !1, mode: \"\", postId: \"\", returnFocus: null },\r\n      commentOneShotLoads: {},\r\n      localDeletedPostIds: {},\r\n      localPostStateOverrides: {},\r\n      localCommentStateOverrides: {},\r\n      localSavedStateOverrides: {},\r\n      followingByUid: {},\n      followRequestByUid: {},\n      followRequestRecords: [],\n      blockedByUid: {},\r\n      blockedMeByUid: {},\r\n      favoritesByUid: {},\r\n      followersRecords: [],\r\n      followingRecords: [],\r\n      blockedRecords: [],\r\n      incomingFollowRequests: [],\r\n      favoritesRecords: [],\r\n      favoritesRecordsLoaded: !1,\r\n      savedItems: [],\r\n      savedItemsLoaded: !1,\r\n      viewedRelationshipKey: \"\",\r\n      viewedRelationshipPromiseKey: \"\",\r\n      viewedRelationshipPromise: null,\r\n      viewedRelationshipListeners: [],\r\n      viewedFollowersRecords: [],\r\n      viewedFollowingRecords: [],\r\n      followersRecordsLoaded: !1,\r\n      followingRecordsLoaded: !1,\r\n      viewedFollowersRecordsLoaded: !1,\r\n      viewedFollowingRecordsLoaded: !1,\n      viewedFavoritesRecords: [],\n      viewedSavedItems: [],\n      viewedFavoritesRecordsLoaded: !1,\n      viewedSavedItemsLoaded: !1,\n      commentAuthorProfileHydration: {},\n      profileGlanceRecordClaims: {},\n      profileGlanceSummary: null,\n      profileGlanceRows: [],\n      profileGlancePending: !1,\n      profileGlanceFilter: \"all\",\n      profileGlanceOffset: 0,\n      publicProfileGlanceCounts: {},\n      publicProfileGlancePending: {},\n      profileAlbums: [],\n      profileAlbumCount: 0,\n      profileAlbumsLoadedKey: \"\",\n      profileAlbumsPending: !1,\n      profileAlbumsView: \"profile\",\n      profileAlbumSort: \"custom\",\n      profileMediaLibrary: [],\n      albumLibraryOpen: !1,\n      profileContentSearch: \"\",\n      activeAlbumId: \"\",\n      activeAlbumDetail: null,\n      albumMutationPending: !1,\n      discoveryStatsByKey: {},\n      discoveryStatsPendingByKey: {},\r\n      dsdPlusDiscoveryRows: [],\r\n      dsdPlusDiscoveryCacheAt: 0,\r\n      dsdPlusDiscoveryPending: !1,\r\n      discoveryLocation: {\r\n        status: \"idle\",\r\n        source: \"\",\r\n        permissionState: \"unknown\",\r\n        requestPending: !1,\r\n        lastRequestAt: 0,\r\n        latitude: null,\r\n        longitude: null,\r\n        accuracyMeters: null,\r\n        updatedAt: 0,\r\n        error: \"\",\r\n      },\r\n      nearbyDiscoveryRows: [],\r\n      nearbyDiscoveryCacheKey: \"\",\r\n      nearbyDiscoveryCacheAt: 0,\n      nearbyDiscoveryPendingKey: \"\",\n      targetDistanceRowsByKey: {},\n      targetDistanceCacheKey: \"\",\n      targetDistanceCacheAt: 0,\n      targetDistancePendingKey: \"\",\n      targetDistancePendingPromise: null,\n      connectionPreferences: null,\n      profilePolicyState: null,\n      profilePolicyRequest: null,\n      connectionRadarRows: [],\n      connectionShuffleRows: [],\n      connectionHubRows: [],\n      connectionDiscoveryMode: \"radar\",\n      discoveryCanonicalFilter:\n        [\"verified\", \"dsdplus\", \"nearby\"].indexOf(\n          String(queryParam(\"filter\") || \"\").toLowerCase(),\n        ) !== -1\n          ? String(queryParam(\"filter\") || \"\").toLowerCase()\n          : \"all\",\n      connectionDiscoveryDsdPlus: !1,\n      connectionShuffleIndex: 0,\n      connectionShuffleOpen: !1,\n      viewedConnectionSummary: null,\n      connectionPresenceStatus: \"idle\",\n      connectionPresenceError: \"\",\n      localPulse: null,\n      localPulseStatus: \"idle\",\n      localPulseError: \"\",\n      nearbyProfileDistancePendingByKey: {},\r\n      postViewClaims: {},\n      pollVotePendingByPost: {},\n      feedFilter:\n        queryParam(\"filter\") === \"following\"\n          ? \"following\"\n          : queryParam(\"filter\") === \"media\"\n            ? \"media\"\n            : \"all\",\n      feedRecommendationProfiles: [],\n      feedRecommendationProfilesLoaded: !1,\n      feedRecommendationProfilesPending: !1,\n      notificationCounts: { total: 0, unread: 0, founder: 0 },\r\n      inboxCounts: {\n        ready: !1,\r\n        notificationUnread: 0,\r\n        messageUnread: 0,\r\n        founderUnread: 0,\r\n        cursor: \"\",\n      },\n      inboxUnreadByConversation: {},\n      inboxRealtimeOwner: null,\r\n      inboxRealtimeUserId: \"\",\r\n      inboxListOwners: { conversations: null, notifications: null },\r\n      inboxPageState: {\n        conversations: { nextCursor: \"\", hasMore: !1 },\n        notifications: {\n          nextCursor: \"\",\n          hasMore: !1,\n          loading: !1,\n          error: \"\",\n        },\n      },\n      mediaReadCache: {},\r\n      mediaReadQueueAvailableAt: 0,\r\n      videoMutedPreference: (function () {\r\n        try {\r\n          var saved = localStorage.getItem(\"dsd.video.muted.v1\");\r\n          return saved ? saved !== \"false\" : !0;\r\n        } catch (e) {\r\n          return !0;\r\n        }\r\n      })(),\r\n      activePlayingVideos: 0,\r\n      draftQueueItems: [],\n      moderationQueueItems: [],\n      listeners: [],\r\n      storyListOwners: [],\r\n      storySignalOwner: null,\r\n      storySignalPending: !1,\r\n      storyWatchClaims: {},\n      storyAudienceById: {},\n      storyAudiencePendingById: {},\n      storyPauseTokens: {},\n      storyPausedVideoWasPlaying: !1,\n      launchAutoPublishClaims: {},\r\n      authorAvatarBackfills: {},\r\n      orphanMediaParentRepairRunning: !1,\r\n      orphanMediaParentRepairCompleteFor: \"\",\r\n      profileHydrationCompleteByKey: {},\r\n      feedDiagnostics: {\r\n        renders: 0,\r\n        scheduled: 0,\r\n        commentListeners: 0,\r\n        commentLoads: 0,\r\n        commentLoadResults: 0,\r\n        commentLoadErrors: 0,\r\n        lastCommentLoad: \"\",\r\n        mediaHydrationRequests: 0,\r\n      },\r\n      membership: { active: !1, tier: \"\", source: \"shopify-conjured\" },\r\n      supabaseEntitlement: null,\r\n      sessionActorId: \"\",\n      sessionClaims: {},\n      sessionProfileKey: \"\",\n      sessionSetupRequired: !1,\n      sessionProvisioningReady: !1,\n      profileSetupResolution: {\n        generation: 0,\n        actorKey: \"\",\n        status: \"UNKNOWN\",\n        source: \"initial\",\n      },\n      hydratedRuntimePromise: null,\n      listenerSignature: \"\",\r\n    };\r\n  function qs(sel, root) {\r\n    try {\r\n      return (root || document).querySelector(sel);\r\n    } catch (e) {\r\n      return null;\r\n    }\r\n  }\r\n  function qsa(sel, root) {\r\n    try {\r\n      return Array.prototype.slice.call(\r\n        (root || document).querySelectorAll(sel),\r\n      );\r\n    } catch (e) {\r\n      return [];\r\n    }\r\n  }\r\n  function dsdOverlayActiveCount() {\n    var count = 0,\r\n      html2 = document.documentElement;\r\n    return (\r\n      html2.classList.contains(\"dsd-immersive-overlay-open\") && (count += 1),\r\n      html2.classList.contains(\"dsd-post-drawer-open\") && (count += 1),\r\n      html2.classList.contains(\"dsd-message-drawer-open\") &&\r\n        window.matchMedia &&\r\n        window.matchMedia(\"(max-width: 760px)\").matches &&\r\n        (count += 1),\r\n      (document.body.classList.contains(\"dsd-overlay-open\") ||\r\n        html2.classList.contains(\"dsd-overlay-open\")) &&\r\n        (count += 1),\r\n      qs(\"[data-dsd-profile-modal-layer]:not([hidden])\") && (count += 1),\r\n      qs(\"[data-dsd-story-composer-layer]:not([hidden])\") && (count += 1),\n      qs(\"[data-dsd-global-post-composer-layer]:not([hidden])\") && (count += 1),\n      qs(\"[data-dsd-post-profile-push-onboarding]\") && (count += 1),\n      qs(\"[data-dsd-share-composer-layer]:not([hidden])\") && (count += 1),\n      qs(\"[data-dsd-post-audience-editor-layer]:not([hidden])\") && (count += 1),\n      qs(\"[data-dsd-post-audience-sheet]\") && (count += 1),\n      qs(\"[data-dsd-universal-search-layer]:not([hidden])\") && (count += 1),\r\n      qs(\"[data-dsd-report-modal-layer]:not([hidden])\") && (count += 1),\r\n      qs(\".dsd-overlay-root > [data-dsd-call-root]:not([hidden])\") &&\r\n        (count += 1),\r\n      qs(\".dsd-overlay-root > [data-dsd-connection-shuffle-layer]\") &&\n        (count += 1),\n      count\n    );\r\n  }\n  var globalOverlayMediaClaimed = !1,\n    globalOverlayStateInitialized = !1;\n  function syncGlobalOverlayState() {\n    try {\n      var count = dsdOverlayActiveCount(),\n        html2 = document.documentElement,\n        active = count > 0,\n        stateChanged = !globalOverlayStateInitialized || active !== globalOverlayMediaClaimed;\n      (html2.toggleAttribute(\"data-dsd-overlay-open\", active),\r\n        html2.classList.toggle(\"dsd-global-overlay-open\", active),\r\n        active\r\n          ? html2.style.setProperty(\"--dsd-active-overlay-count\", String(count))\r\n          : html2.style.removeProperty(\"--dsd-active-overlay-count\"),\r\n        document.body.classList.toggle(\"dsd-global-overlay-open\", active));\n      if (active !== globalOverlayMediaClaimed) {\n        globalOverlayMediaClaimed = active;\n        window.DSDGMOR &&\n          (active\n            ? window.DSDGMOR.claimModal(\"LaunchSocialOverlay\")\n            : window.DSDGMOR.releaseModal(\"LaunchSocialOverlay\"));\n      }\n      if (stateChanged) {\n        globalOverlayStateInitialized = !0;\n        window.dispatchEvent(\n          new CustomEvent(\"dsd:global-overlay-state\", {\n            detail: { active: active, count: count },\n          }),\n        );\n      }\n      syncGifViewportPlayback();\n    } catch (e) {}\n  }\n  function scheduleGlobalOverlayStateSync() {\r\n    (syncGlobalOverlayState(), window.setTimeout(syncGlobalOverlayState, 0));\r\n  }\r\n  function now() {\r\n    return new Date().toISOString();\r\n  }\r\n  function formatDateTime(value) {\r\n    if (!value) return \"\";\r\n    var date = null;\r\n    try {\r\n      if (value && typeof value.toDate == \"function\") date = value.toDate();\r\n      else if (value && typeof value.seconds == \"number\")\r\n        date = new Date(value.seconds * 1e3);\r\n      else {\r\n        var raw = String(value),\r\n          match = raw.match(/Timestamp\\(seconds=(\\d+)/i);\r\n        date = match ? new Date(Number(match[1]) * 1e3) : new Date(raw);\r\n      }\r\n      if (!date || !Number.isFinite(date.getTime())) return \"\";\r\n      var diff = Date.now() - date.getTime();\r\n      if (diff >= 0) {\r\n        var minutes = Math.floor(diff / 6e4);\r\n        if (minutes < 1) return \"Just now\";\r\n        if (minutes < 60) return minutes + \" min\";\r\n        var hours = Math.floor(minutes / 60);\r\n        if (hours < 24) return hours + \" hour\" + (hours === 1 ? \"\" : \"s\");\r\n        var days = Math.floor(hours / 24);\r\n        if (days < 7) return days + \" day\" + (days === 1 ? \"\" : \"s\");\r\n      }\r\n      var opts = { month: \"short\", day: \"numeric\" };\r\n      return (\r\n        date.getFullYear() !== new Date().getFullYear() &&\r\n          (opts.year = \"numeric\"),\r\n        date.toLocaleDateString(void 0, opts)\r\n      );\r\n    } catch (e) {\r\n      return \"\";\r\n    }\r\n  }\r\n  function valueMillis(value) {\r\n    if (!value) return 0;\r\n    try {\r\n      if (value && typeof value.toDate == \"function\")\r\n        return value.toDate().getTime() || 0;\r\n      if (value && typeof value.seconds == \"number\") return value.seconds * 1e3;\r\n      var raw = String(value),\r\n        match = raw.match(/Timestamp\\(seconds=(\\d+)/i);\r\n      if (match) return Number(match[1]) * 1e3;\r\n      var parsed = Date.parse(raw);\r\n      return Number.isFinite(parsed) ? parsed : 0;\r\n    } catch (e) {\r\n      return 0;\r\n    }\r\n  }\r\n  function identifierMillis(value) {\r\n    for (\r\n      var matches = String(value || \"\").match(/\\d{10,13}/g) || [],\r\n        i = matches.length - 1;\r\n      i >= 0;\r\n      i -= 1\r\n    ) {\r\n      var parsed = Number(matches[i]);\r\n      if (\r\n        Number.isFinite(parsed) &&\r\n        (matches[i].length === 10 && (parsed *= 1e3),\r\n        parsed >= 9466848e5 && parsed <= Date.now() + 864e5)\r\n      )\r\n        return parsed;\r\n    }\r\n    return 0;\r\n  }\r\n  function clean(value, fallback) {\r\n    var out = String(value || fallback || \"\")\r\n      .trim()\r\n      .replace(/^@+/, \"\")\r\n      .replace(/[^a-zA-Z0-9._-]+/g, \"-\")\r\n      .replace(/^-+|-+$/g, \"\")\r\n      .toLowerCase();\r\n    return out || String(fallback || \"user\").toLowerCase();\r\n  }\r\n  function cleanEmpty(value) {\r\n    return String(value || \"\")\r\n      .trim()\r\n      .replace(/^@+/, \"\")\r\n      .replace(/[^a-zA-Z0-9._-]+/g, \"-\")\r\n      .replace(/^-+|-+$/g, \"\")\r\n      .toLowerCase();\r\n  }\r\n  function html(value) {\r\n    return String(value == null ? \"\" : value).replace(\r\n      /[&<>\"']/g,\r\n      function (ch) {\r\n        return {\r\n          \"&\": \"&amp;\",\r\n          \"<\": \"&lt;\",\r\n          \">\": \"&gt;\",\r\n          '\"': \"&quot;\",\r\n          \"'\": \"&#39;\",\r\n        }[ch];\r\n      },\r\n    );\r\n  }\r\n  function consumerText(value) {\n    return String(value == null ? \"\" : value)\n      .replace(/\\s+/g, \" \")\n      .trim();\n  }\n  function internalCopyRisk() {\n    return !1;\n  }\r\n  function recordSourceRisk(record) {\r\n    if (!record) return !1;\r\n    if (\r\n      record.firebaseOnly === !0 ||\r\n      record.firestoreOnly === !0 ||\r\n      record.legacyFirebase === !0 ||\r\n      record.firebaseFallback === !0\r\n    )\r\n      return !0;\r\n    var canonicalSupabaseId = clean(\r\n        record.supabasePostId ||\r\n          record.supabaseStoryId ||\r\n          record.supabase_post_id ||\r\n          record.supabase_story_id ||\r\n          \"\",\r\n        \"\",\r\n      ),\r\n      canonicalId = clean(record.id || \"\", \"\"),\r\n      migratedOnly = [record.migratedFromPath, record.migrated_from_path]\r\n        .join(\" \")\r\n        .toLowerCase();\r\n    if (\r\n      (canonicalSupabaseId ||\r\n        /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(\r\n          canonicalId,\r\n        )) &&\r\n      /\\b(firestore|firebase)\\b/.test(migratedOnly)\r\n    )\r\n      return !1;\r\n    var source = [\r\n      record.firestorePath,\r\n      record.firebasePath,\r\n      record.legacyPath,\r\n      record.sourcePath,\r\n      record.sourceCollection,\r\n      record.sourceOwner,\r\n    ]\r\n      .join(\" \")\r\n      .toLowerCase();\r\n    return /\\b(firestore|firebase)\\b/.test(source);\r\n  }\r\n  function weakPublicCopyRisk(value) {\r\n    var text = String(value == null ? \"\" : value)\r\n      .trim()\r\n      .toLowerCase();\r\n    return (\r\n      !text ||\r\n      /^(sample|demo|placeholder|dummy|fake|n\\/a|na|none|null|todo|tbd|\\.{1,3}|-+)$/.test(\r\n        text,\r\n      )\r\n    );\r\n  }\r\n  function looksLikeRawEmail(value) {\r\n    return (\r\n      /^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/.test(String(value || \"\").trim()) ||\r\n      /^[a-z0-9._%+-]+-[a-z0-9._%+-]+\\.(com|net|org|co|io)$/i.test(\r\n        String(value || \"\").trim(),\r\n      ) ||\r\n      /^(gmail|yahoo|hotmail|outlook|icloud|aol|protonmail|proton)\\.(com|net|org|me|co\\.uk)$/i.test(\r\n        String(value || \"\").trim(),\r\n      )\r\n    );\r\n  }\r\n  function temporaryProofCopyRisk() {\n    return !1;\n  }\r\n  function publicDisplayText(value, fallback) {\r\n    var raw = String(value == null ? \"\" : value),\r\n      safeFallback = fallback == null ? \"\" : String(fallback);\r\n    if (\r\n      temporaryProofCopyRisk(raw) ||\r\n      (!canModerate() && weakPublicCopyRisk(raw))\r\n    )\r\n      return safeFallback;\r\n    var cleaned = consumerText(raw || fallback || \"\");\r\n    return !canModerate() && internalCopyRisk(raw) && cleaned\r\n      ? cleaned\r\n      : cleaned || safeFallback;\r\n  }\r\n  function publicDisplayName(value, fallback) {\n    var raw = String(value == null ? \"\" : value);\n    return /^\\d{10,18}$/.test(raw.trim()) ||\n      looksLikeRawEmail(raw) ||\n      weakPublicCopyRisk(raw) ||\n      internalCopyRisk(raw)\n      ? String(fallback || \"DSD member\")\n      : consumerText(raw || fallback || \"\");\n  }\r\n  function profileDisplayNameFallback(key) {\r\n    return (\r\n      (key = nonPlaceholderProfileKey(key || \"\")),\r\n      key\r\n        ? normalizedProfileKeyValue(key) === \"detroitskydaddy\"\r\n          ? \"Detroit Sky Daddy\"\r\n          : key\r\n        : \"DSD member\"\r\n    );\r\n  }\r\n  function publicHandleText(key, displayName2, fallback) {\r\n    var raw = String(key || \"\")\r\n      .replace(/^@+/, \"\")\r\n      .trim(),\r\n      matchedProfile = raw ? publicProfileByKey(raw) : null;\r\n    matchedProfile &&\r\n      matchedProfile.handle &&\r\n      (raw = String(matchedProfile.handle).replace(/^@+/, \"\").trim());\r\n    return !raw ||\n      /^\\d{10,18}$/.test(raw) ||\n      /^member-[a-f0-9]{6,}$/i.test(raw) ||\n      internalCopyRisk(raw) ||\n      weakPublicCopyRisk(raw) ||\n      looksLikeRawEmail(raw)\n      ? clean(\n          (looksLikeRawEmail(displayName2) ||\n          /^\\d{10,18}$/.test(String(displayName2 || \"\").trim())\n            ? \"\"\n            : displayName2) ||\n            fallback ||\n            \"profile\",\n          \"profile\",\n        )\n      : clean(raw, fallback || \"profile\");\n  }\n  function socialRecordAuthorIdentitySafe(record) {\n    record = record || {};\n    var key = String(\n        record.authorProfileKey ||\n          record.ownerProfileKey ||\n          record.profileKey ||\n          \"\",\n      )\n        .replace(/^@+/, \"\")\n        .trim(),\n      name = String(\n        record.authorDisplayName || record.ownerDisplayName || key || \"\",\n      ).trim();\n    return !!(\n      key &&\n      !placeholderProfileKey(key) &&\n      !/^member-[a-f0-9]{6,}$/i.test(key) &&\n      !/^\\d{10,18}$/.test(key) &&\n      !looksLikeRawEmail(key) &&\n      name &&\n      !/^\\d{10,18}$/.test(name) &&\n      !looksLikeRawEmail(name) &&\n      !internalCopyRisk(name)\n    );\n  }\n  function publicProfileLooksLaunchReady(profile) {\n    profile = profile || {};\n    var key = String(\n        profile.profileKey || profile.profile_key || profile.handle || \"\",\n      )\n        .replace(/^@+/, \"\")\n        .trim(),\n      handle = String(profile.handle || key).replace(/^@+/, \"\").trim(),\n      name = String(profile.displayName || profile.display_name || \"\").trim(),\n      status = String(profile.status || profile.accountState || profile.account_state || \"active\").toLowerCase(),\n      moderation = String(profile.moderationState || profile.moderation_state || \"approved\").toLowerCase();\n    return !!(\n      key &&\n      handle &&\n      name &&\n      !placeholderProfileKey(key) &&\n      !placeholderProfileKey(handle) &&\n      !/^member-[a-f0-9]{6,}$/i.test(key) &&\n      !/^member-[a-f0-9]{6,}$/i.test(handle) &&\n      !/^\\d{10,18}$/.test(name) &&\n      !looksLikeRawEmail(name) &&\n      profile.setupComplete !== !1 &&\n      profile.setup_complete !== !1 &&\n      profile.searchable !== !1 &&\n      status === \"active\" &&\n      moderation === \"approved\"\n    );\n  }\n  function staleLaunchTestContentRecord(record) {\n    if (!record) return !1;\n    var recordId = clean(\n      record.postId ||\r\n        record.legacyPostId ||\r\n        record.legacy_post_id ||\r\n        record.storyId ||\r\n        record.legacyStoryId ||\r\n        record.legacy_story_id ||\r\n        record.id ||\n        \"\",\n    );\n    return !!(recordId && RETIRED_LAUNCH_TEST_CONTENT_IDS[recordId]);\n  }\n  function publicRecordVisible(record) {\r\n    if (\r\n      !record ||\r\n      staleLaunchTestContentRecord(record) ||\r\n      !isNormalContentRecord(record) ||\r\n      recordSourceRisk(record)\r\n    )\r\n      return !1;\r\n    var stateValue = normalizedRecordState(record);\r\n    return [\r\n      \"deleted\",\r\n      \"archived\",\r\n      \"removed\",\r\n      \"hidden\",\r\n      \"rejected\",\r\n      \"blocked\",\r\n      \"disabled\",\r\n      \"expired\",\r\n    ].indexOf(stateValue) !== -1\r\n      ? !1\r\n      : canModerate()\r\n        ? !0\r\n        : !(\r\n            record.internalOnly === !0 ||\r\n            record.adminOnly === !0 ||\r\n            record.founderOnly === !0 ||\r\n            record.testOnly === !0 ||\r\n            (record.entity &&\r\n              (record.entity.internalOnly === !0 ||\r\n                record.entity.adminOnly === !0 ||\r\n                record.entity.founderOnly === !0 ||\r\n                record.entity.testOnly === !0))\r\n          );\r\n  }\r\n  function normalizePublicUrl(value) {\r\n    var raw = String(value || \"\")\r\n      .trim()\r\n      .replace(/[),.;:!?]+$/g, \"\");\r\n    return raw\r\n      ? /^https?:\\/\\//i.test(raw)\r\n        ? raw\r\n        : /^www\\./i.test(raw) ||\r\n            /^[a-z0-9][a-z0-9-]*(?:\\.[a-z0-9][a-z0-9-]*)*\\.([a-z][a-z0-9-]{1,23})\\b(?:\\/[^\\s<]*)?$/i.test(\r\n              raw,\r\n            )\r\n          ? \"https://\" + raw\r\n          : \"\"\r\n      : \"\";\r\n  }\r\n  var PUBLIC_URL_PATTERN =\r\n    /(?:https?:\\/\\/|www\\.)[^\\s<]+|\\b[a-z0-9][a-z0-9-]*(?:\\.[a-z0-9][a-z0-9-]*)*\\.([a-z][a-z0-9-]{1,23})\\b(?:\\/[^\\s<]*)?/gi;\r\n  function linkifyMentionText(value) {\n    var input = String(value || \"\"),\n      output = \"\",\n      lastIndex = 0,\n      hashtagKeys = Object.create(null),\n      hashtagCount = 0;\n    return (\n      input.replace(\n        /(^|[\\s(])([@#])([A-Za-z0-9_][A-Za-z0-9_]{0,127})(?![A-Za-z0-9_])/g,\n        function (match, prefix, marker, rawKey, offset) {\n          var hashtag = marker === \"#\",\n            key = hashtag\n              ? String(rawKey || \"\").toLowerCase()\n              : normalizedMentionProfileKey(rawKey),\n            profile = hashtag ? null : key ? publicProfileByKey(key) : null;\n          if (!((hashtag && /^[a-z0-9_]{1,48}$/.test(key)) || profile))\n            return match;\n          if (hashtag && !hashtagKeys[key]) {\n            if (hashtagCount >= 10) return match;\n            hashtagKeys[key] = !0;\n            hashtagCount += 1;\n          }\n          output += html(input.slice(lastIndex, offset)) + html(prefix);\n          output +=\n            '<a class=\"' +\n            (hashtag ? \"dsd-post-hashtag-link\" : \"dsd-profile-mention-link\") +\n            '\" href=\"' +\n            html(hashtag ? \"/pages/feed?hashtag=\" + encodeURIComponent(key) : profileRouteHref(key)) +\n            '\" ' +\n            (hashtag\n              ? 'data-dsd-hashtag=\"' + html(key) + '\" aria-label=\"View posts tagged ' + html(key) + '\"'\n              : 'data-dsd-mentioned-profile=\"' + html(key) + '\"') +\n            \">\" +\n            (hashtag ? \"#\" : \"@\") +\n            html(hashtag ? rawKey : key) +\n            \"</a>\";\n          lastIndex = offset + match.length;\n          return match;\n        },\n      ),\r\n      (output += html(input.slice(lastIndex))),\r\n      output\r\n    );\r\n  }\r\n  function linkify(value) {\r\n    var input = String(value || \"\"),\r\n      output = \"\",\r\n      lastIndex = 0;\r\n    return (\r\n      input.replace(PUBLIC_URL_PATTERN, function (url, tld, offset) {\r\n        if (\r\n          offset > 0 &&\r\n          /[@\\w.-]/.test(input.charAt(offset - 1)) &&\r\n          !/^https?:\\/\\//i.test(url)\r\n        )\r\n          return url;\r\n        var rawUrl = String(url || \"\").replace(/[),.;:!?]+$/g, \"\"),\r\n          href = normalizePublicUrl(rawUrl);\r\n        if (!href) return url;\r\n        output += linkifyMentionText(input.slice(lastIndex, offset));\r\n        var safeUrl = html(rawUrl),\r\n          safeHref = html(href),\r\n          trailing = url.slice(rawUrl.length);\r\n        return (\r\n          (output +=\r\n            '<a href=\"' +\r\n            safeHref +\r\n            '\" target=\"_blank\" rel=\"noopener noreferrer\">' +\r\n            safeUrl +\r\n            \"</a>\" +\r\n            html(trailing)),\r\n          (lastIndex = offset + url.length),\r\n          url\r\n        );\r\n      }),\r\n      (output += linkifyMentionText(input.slice(lastIndex))),\r\n      output\r\n    );\r\n  }\r\n  function firstUrl(value) {\r\n    var pattern = new RegExp(PUBLIC_URL_PATTERN.source, \"i\"),\r\n      match = String(value || \"\").match(pattern);\r\n    return match\r\n      ? normalizePublicUrl(String(match[0] || \"\").replace(/[),.;:!?]+$/g, \"\"))\r\n      : \"\";\r\n  }\r\n  function storyLinkPreviewHTML(value) {\r\n    var url = firstUrl(value);\r\n    if (!url) return \"\";\r\n    var label = url.replace(/^https?:\\/\\//i, \"\").replace(/\\/.*$/, \"\");\r\n    return (\r\n      '<a class=\"dsd-story385__link-preview\" href=\"' +\r\n      html(url) +\r\n      '\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>' +\r\n      html(label || \"Open link\") +\r\n      \"</strong><span>\" +\r\n      html(url) +\r\n      \"</span></a>\"\r\n    );\r\n  }\r\n  function postLinkPreviewHTML(value) {\r\n    var url = firstUrl(value);\r\n    if (!url) return \"\";\r\n    var label = url.replace(/^https?:\\/\\//i, \"\").replace(/\\/.*$/, \"\");\r\n    return (\r\n      '<a class=\"dsd-post-card__link-preview\" href=\"' +\r\n      html(url) +\r\n      '\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>' +\r\n      html(label || \"Open link\") +\r\n      \"</strong><span>\" +\r\n      html(url) +\r\n      \"</span></a>\"\r\n    );\r\n  }\r\n  function composerMediaIcon(kind) {\r\n    var paths = {\r\n      image:\r\n        \"M4 5h16v14H4V5Zm2 2v7.2l3.2-3.2 3.1 3.1 2.2-2.5L18 15.5V7H6Zm3 1.8a1.7 1.7 0 1 1 0 3.4 1.7 1.7 0 0 1 0-3.4Z\",\r\n      video:\r\n        \"M4 6h10a2 2 0 0 1 2 2v1.2l4-2.2v10l-4-2.2V16a2 2 0 0 1-2 2H4V6Zm3 3v6h6V9H7Z\",\r\n    };\r\n    return (\r\n      '<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"' +\r\n      (paths[kind] || paths.image) +\r\n      '\"></path></svg>'\r\n    );\r\n  }\r\n  function normalizedFocusValue(value, fallback) {\r\n    var n = Number(value);\r\n    return (\r\n      isFinite(n) || (n = Number(fallback)),\r\n      isFinite(n) || (n = 0.5),\r\n      Math.max(0, Math.min(1, n))\r\n    );\r\n  }\r\n  function focusPercent(value) {\r\n    return Math.round(normalizedFocusValue(value, 0.5) * 100);\r\n  }\r\n  function bannerPositionCoordinates(value) {\r\n    var raw = String(value || \"center\")\r\n        .trim()\r\n        .toLowerCase(),\r\n      custom = raw.match(/^x(\\d{1,3})-y(\\d{1,3})(?:-z(\\d{1,3}))?(?:-.+)?$/);\r\n    if (custom)\r\n      return {\r\n        x: Math.max(0, Math.min(100, Number(custom[1] || 50))),\r\n        y: Math.max(0, Math.min(100, Number(custom[2] || 50))),\r\n      };\r\n    var map = {\r\n        top: [50, 12],\r\n        \"upper-mid\": [50, 30],\r\n        center: [50, 50],\r\n        \"lower-mid\": [50, 70],\r\n        bottom: [50, 88],\r\n        left: [18, 50],\r\n        right: [82, 50],\r\n        \"top-left\": [18, 12],\r\n        \"top-right\": [82, 12],\r\n        \"bottom-left\": [18, 88],\r\n        \"bottom-right\": [82, 88],\r\n      },\r\n      pair = map[raw] || map.center;\r\n    return { x: pair[0], y: pair[1] };\r\n  }\r\n  function canonicalBannerPosition(profile, fallback) {\r\n    profile = profile || {};\r\n    var value =\r\n      profile.bannerPosition ||\r\n      profile.banner_position ||\r\n      profile.headerPosition ||\r\n      profile.header_position ||\r\n      profile.coverPosition ||\r\n      profile.cover_position ||\r\n      \"\";\r\n    return (\r\n      !value &&\r\n        fallback &&\r\n        typeof fallback == \"object\" &&\r\n        (value =\r\n          fallback.bannerPosition ||\r\n          fallback.banner_position ||\r\n          fallback.headerPosition ||\r\n          fallback.header_position ||\r\n          fallback.coverPosition ||\r\n          fallback.cover_position ||\r\n          \"\"),\r\n      String(value || \"center\")\r\n        .trim()\r\n        .slice(0, 40) || \"center\"\r\n    );\r\n  }\r\n  function profileMediaFocus(profile, slot, fallback) {\r\n    ((profile = profile || {}), (fallback = fallback || {}));\r\n    var prefix = slot === \"banner\" ? \"banner\" : \"avatar\",\r\n      xKeys = [prefix + \"FocusX\", prefix + \"_focus_x\"],\r\n      yKeys = [prefix + \"FocusY\", prefix + \"_focus_y\"];\r\n    function first(keys) {\r\n      for (var i = 0; i < keys.length; i += 1)\r\n        if (\r\n          profile[keys[i]] !== void 0 &&\r\n          profile[keys[i]] !== null &&\r\n          profile[keys[i]] !== \"\"\r\n        )\r\n          return profile[keys[i]];\r\n      for (var j = 0; j < keys.length; j += 1)\r\n        if (\r\n          fallback[keys[j]] !== void 0 &&\r\n          fallback[keys[j]] !== null &&\r\n          fallback[keys[j]] !== \"\"\r\n        )\r\n          return fallback[keys[j]];\r\n      return null;\r\n    }\r\n    var x = first(xKeys),\r\n      y = first(yKeys);\r\n    if ((x === null || y === null) && slot === \"banner\") {\r\n      var legacy = bannerPositionCoordinates(\r\n        canonicalBannerPosition(profile, fallback),\r\n      );\r\n      (x === null && (x = legacy.x / 100), y === null && (y = legacy.y / 100));\r\n    }\r\n    if ((x === null || y === null) && slot === \"avatar\") {\r\n      var compat = String(canonicalBannerPosition(profile, fallback) || \"\")\r\n        .toLowerCase()\r\n        .match(/(?:^|-)ax(\\d{1,3})-ay(\\d{1,3})(?:-|$)/);\r\n      compat &&\r\n        (x === null &&\r\n          (x = Math.max(0, Math.min(100, Number(compat[1] || 50))) / 100),\r\n        y === null &&\r\n          (y = Math.max(0, Math.min(100, Number(compat[2] || 50))) / 100));\r\n    }\r\n    return { x: normalizedFocusValue(x, 0.5), y: normalizedFocusValue(y, 0.5) };\r\n  }\r\n  function profileMediaFocusPosition(profile, slot, fallback) {\r\n    var focus = profileMediaFocus(profile, slot, fallback);\r\n    return focusPercent(focus.x) + \"% \" + focusPercent(focus.y) + \"%\";\r\n  }\r\n  function bannerPositionFromFocus(focus) {\r\n    return (\r\n      (focus = focus || { x: 0.5, y: 0.5 }),\r\n      \"x\" + focusPercent(focus.x) + \"-y\" + focusPercent(focus.y) + \"-z100\"\r\n    );\r\n  }\r\n  function profileFocalCompatibilityPosition(profile, fallback) {\r\n    var banner = profileMediaFocus(profile || {}, \"banner\", fallback || {}),\r\n      avatar = profileMediaFocus(profile || {}, \"avatar\", fallback || {});\r\n    return (\r\n      bannerPositionFromFocus(banner) +\r\n      \"-ax\" +\r\n      focusPercent(avatar.x) +\r\n      \"-ay\" +\r\n      focusPercent(avatar.y)\r\n    );\r\n  }\r\n  function profileMediaFocusAliases(patch) {\r\n    patch = Object.assign({}, patch || {});\r\n    var hasAnyFocus = !1;\r\n    return (\r\n      [\"banner\", \"avatar\"].forEach(function (slot) {\r\n        var camelX = slot + \"FocusX\",\r\n          camelY = slot + \"FocusY\",\r\n          snakeX = slot + \"_focus_x\",\r\n          snakeY = slot + \"_focus_y\",\r\n          hasX = patch[camelX] !== void 0 || patch[snakeX] !== void 0,\r\n          hasY = patch[camelY] !== void 0 || patch[snakeY] !== void 0;\r\n        if (!(!hasX && !hasY)) {\r\n          hasAnyFocus = !0;\r\n          var focus = {\r\n            x: normalizedFocusValue(\r\n              hasX\r\n                ? patch[camelX] !== void 0\r\n                  ? patch[camelX]\r\n                  : patch[snakeX]\r\n                : 0.5,\r\n              0.5,\r\n            ),\r\n            y: normalizedFocusValue(\r\n              hasY\r\n                ? patch[camelY] !== void 0\r\n                  ? patch[camelY]\r\n                  : patch[snakeY]\r\n                : 0.5,\r\n              0.5,\r\n            ),\r\n          };\r\n          ((patch[camelX] = focus.x),\r\n            (patch[camelY] = focus.y),\r\n            (patch[snakeX] = focus.x),\r\n            (patch[snakeY] = focus.y));\r\n        }\r\n      }),\r\n      hasAnyFocus &&\r\n        ((patch.bannerPosition = profileFocalCompatibilityPosition(patch)),\r\n        (patch.banner_position = patch.bannerPosition)),\r\n      patch\r\n    );\r\n  }\r\n  function readProfileFocalInputs(form, slot) {\r\n    var prefix = slot === \"banner\" ? \"banner\" : \"avatar\",\r\n      x = formControl(form, prefix + \"FocusX\"),\r\n      y = formControl(form, prefix + \"FocusY\");\r\n    return {\r\n      x: normalizedFocusValue(x && x.value, 0.5),\r\n      y: normalizedFocusValue(y && y.value, 0.5),\r\n    };\r\n  }\r\n  function profileFocalEditorHTML(slot) {\r\n    var label = slot === \"banner\" ? \"Banner focus\" : \"Photo focus\",\r\n      input =\r\n        slot === \"banner\"\r\n          ? '<input name=\"bannerPosition\" type=\"hidden\" value=\"x50-y50-z100\">'\r\n          : \"\";\r\n    return (\r\n      '<div class=\"dsd-profile-focal-editor\" data-dsd-profile-focal-editor=\"' +\r\n      html(slot) +\r\n      '\">' +\r\n      input +\r\n      '<input name=\"' +\r\n      html(slot) +\r\n      'FocusX\" type=\"hidden\" value=\"0.5\"><input name=\"' +\r\n      html(slot) +\r\n      'FocusY\" type=\"hidden\" value=\"0.5\"><div class=\"dsd-profile-focal-editor__viewport dsd-profile-focal-editor__viewport--' +\r\n      html(slot) +\r\n      '\" data-dsd-profile-focal-viewport=\"' +\r\n      html(slot) +\r\n      '\" tabindex=\"0\" role=\"slider\" aria-label=\"' +\r\n      html(label) +\r\n      '\" aria-valuemin=\"0\" aria-valuemax=\"100\" aria-valuenow=\"50\"><img alt=\"\" draggable=\"false\" data-dsd-profile-focal-image><span data-dsd-profile-focal-dot></span><em>' +\r\n      html(label) +\r\n      '</em></div><small class=\"dsd-profile-focal-editor__help\">Drag the image area to place the visible focus point.</small></div>'\r\n    );\r\n  }\r\n  function bannerPositionZoom(value) {\r\n    var raw = String(value || \"\")\r\n        .trim()\r\n        .toLowerCase(),\r\n      custom = raw.match(/(?:^|-)z(\\d{1,3})$/);\r\n    return custom\r\n      ? Math.max(100, Math.min(180, Number(custom[1] || 100)))\r\n      : 100;\r\n  }\r\n  function syncBannerFocusForm(form, value) {\r\n    if (form) {\r\n      var profile = state.profile || (viewedProfile && viewedProfile()) || {},\r\n        coords =\r\n          value && typeof value == \"object\"\r\n            ? {\r\n                x: normalizedFocusValue(value.x, 0.5) * 100,\r\n                y: normalizedFocusValue(value.y, 0.5) * 100,\r\n              }\r\n            : bannerPositionCoordinates(\r\n                value || canonicalBannerPosition(profile),\r\n              ),\r\n        field = formControl(form, \"bannerPosition\"),\r\n        x = formControl(form, \"bannerFocusX\"),\r\n        y = formControl(form, \"bannerFocusY\");\r\n      (field &&\r\n        (field.value =\r\n          \"x\" + Math.round(coords.x) + \"-y\" + Math.round(coords.y) + \"-z100\"),\r\n        x && (x.value = normalizedFocusValue(coords.x / 100, 0.5)),\r\n        y && (y.value = normalizedFocusValue(coords.y / 100, 0.5)),\r\n        syncProfileFocalEditorPreview(form, \"banner\"));\r\n    }\r\n  }\r\n  function bannerPreviewHTML() {\r\n    return profileFocalEditorHTML(\"banner\");\r\n  }\r\n  function syncBannerEditPreview(form) {\r\n    syncProfileFocalEditorPreview(form, \"banner\");\r\n  }\r\n  function currentProfilePreviewUrl(slot) {\r\n    var profile = (viewedProfile && viewedProfile()) || state.profile || {},\r\n      id =\r\n        slot === \"avatar\"\r\n          ? canonicalProfileAvatarMediaId(profile)\r\n          : canonicalProfileBannerMediaId(profile);\r\n    return id\r\n      ? (state.mediaReadCache[id] && state.mediaReadCache[id].objectUrl) ||\r\n          mediaReadProxyUrl(id)\r\n      : \"\";\r\n  }\r\n  function syncProfileFocalEditorPreview(form, slot) {\r\n    if (form) {\r\n      var preview = qs(\r\n        '[data-dsd-profile-focal-viewport=\"' + slot + '\"]',\r\n        form,\r\n      );\r\n      if (preview) {\r\n        var fileInput = formControl(form, slot),\r\n          file = fileInput && fileInput.files && fileInput.files[0];\r\n        if (\r\n          preview.dataset.dsdPreviewObjectUrl &&\r\n          (!file || preview.dataset.dsdPreviewFileName !== file.name)\r\n        ) {\r\n          try {\r\n            URL.revokeObjectURL(preview.dataset.dsdPreviewObjectUrl);\r\n          } catch (e) {}\r\n          (delete preview.dataset.dsdPreviewObjectUrl,\r\n            delete preview.dataset.dsdPreviewFileName);\r\n        }\r\n        var url =\r\n          preview.dataset.dsdPreviewObjectUrl || currentProfilePreviewUrl(slot);\r\n        if (\r\n          file &&\r\n          file.type &&\r\n          file.type.indexOf(\"image/\") === 0 &&\r\n          !preview.dataset.dsdPreviewObjectUrl\r\n        )\r\n          try {\r\n            ((url = URL.createObjectURL(file)),\r\n              (preview.dataset.dsdPreviewObjectUrl = url),\r\n              (preview.dataset.dsdPreviewFileName = file.name || \"\"));\r\n          } catch (e) {}\r\n        var focus = readProfileFocalInputs(form, slot),\r\n          position = focusPercent(focus.x) + \"% \" + focusPercent(focus.y) + \"%\",\r\n          img = qs(\"[data-dsd-profile-focal-image]\", preview),\r\n          dot = qs(\"[data-dsd-profile-focal-dot]\", preview);\r\n        if (\r\n          (url && img\r\n            ? ((img.src = url),\r\n              img.style.setProperty(\"object-position\", position, \"important\"),\r\n              (img.hidden = !1),\r\n              preview.setAttribute(\"data-dsd-focal-preview-has-media\", \"true\"))\r\n            : (img && (img.removeAttribute(\"src\"), (img.hidden = !0)),\r\n              preview.setAttribute(\r\n                \"data-dsd-focal-preview-has-media\",\r\n                \"false\",\r\n              )),\r\n          dot &&\r\n            ((dot.style.left = focusPercent(focus.x) + \"%\"),\r\n            (dot.style.top = focusPercent(focus.y) + \"%\")),\r\n          preview.setAttribute(\r\n            \"aria-valuenow\",\r\n            String(focusPercent(focus.x)) + \",\" + String(focusPercent(focus.y)),\r\n          ),\r\n          slot === \"banner\")\r\n        ) {\r\n          var field = formControl(form, \"bannerPosition\");\r\n          field && (field.value = bannerPositionFromFocus(focus));\r\n        }\r\n      }\r\n    }\r\n  }\r\n  function setProfileFocalFormValues(form, slot, focus, markEdited) {\r\n    if (form) {\r\n      var prefix = slot === \"banner\" ? \"banner\" : \"avatar\";\r\n      focus = focus || { x: 0.5, y: 0.5 };\r\n      var x = formControl(form, prefix + \"FocusX\"),\r\n        y = formControl(form, prefix + \"FocusY\");\r\n      if (\r\n        (x && (x.value = normalizedFocusValue(focus.x, 0.5)),\r\n        y && (y.value = normalizedFocusValue(focus.y, 0.5)),\r\n        slot === \"banner\")\r\n      ) {\r\n        var field = formControl(form, \"bannerPosition\");\r\n        (field &&\r\n          (field.value = bannerPositionFromFocus({\r\n            x: x && x.value,\r\n            y: y && y.value,\r\n          })),\r\n          markEdited && (form.dataset.dsdBannerFocusUserEdited = \"true\"));\r\n      }\r\n      (slot === \"avatar\" &&\r\n        markEdited &&\r\n        (form.dataset.dsdAvatarFocusUserEdited = \"true\"),\r\n        syncProfileFocalEditorPreview(form, slot));\r\n    }\r\n  }\r\n  function bindProfileFocalEditor(form, slot) {\r\n    if (\r\n      !form ||\r\n      form.dataset[\r\n        \"dsd\" + (slot === \"banner\" ? \"Banner\" : \"Avatar\") + \"FocalBound\"\r\n      ] === BUILD\r\n    )\r\n      return;\r\n    form.dataset[\r\n      \"dsd\" + (slot === \"banner\" ? \"Banner\" : \"Avatar\") + \"FocalBound\"\r\n    ] = BUILD;\r\n    var viewport = qs('[data-dsd-profile-focal-viewport=\"' + slot + '\"]', form);\r\n    if (!viewport) return;\r\n    function setFromEvent(event) {\r\n      var rect = viewport.getBoundingClientRect();\r\n      if (!(!rect || !rect.width || !rect.height)) {\r\n        var clientX = event.clientX,\r\n          clientY = event.clientY;\r\n        (event.touches &&\r\n          event.touches[0] &&\r\n          ((clientX = event.touches[0].clientX),\r\n          (clientY = event.touches[0].clientY)),\r\n          setProfileFocalFormValues(\r\n            form,\r\n            slot,\r\n            {\r\n              x: (Number(clientX) - rect.left) / rect.width,\r\n              y: (Number(clientY) - rect.top) / rect.height,\r\n            },\r\n            !0,\r\n          ));\r\n      }\r\n    }\r\n    (viewport.addEventListener(\"pointerdown\", function (event) {\r\n      event.preventDefault();\r\n      try {\r\n        viewport.setPointerCapture &&\r\n          viewport.setPointerCapture(event.pointerId);\r\n      } catch (e) {}\r\n      setFromEvent(event);\r\n      function move(moveEvent) {\r\n        setFromEvent(moveEvent);\r\n      }\r\n      function up(upEvent) {\r\n        try {\r\n          viewport.releasePointerCapture &&\r\n            viewport.releasePointerCapture(upEvent.pointerId);\r\n        } catch (e) {}\r\n        (viewport.removeEventListener(\"pointermove\", move),\r\n          viewport.removeEventListener(\"pointerup\", up),\r\n          viewport.removeEventListener(\"pointercancel\", up));\r\n      }\r\n      (viewport.addEventListener(\"pointermove\", move),\r\n        viewport.addEventListener(\"pointerup\", up),\r\n        viewport.addEventListener(\"pointercancel\", up));\r\n    }),\r\n      viewport.addEventListener(\"keydown\", function (event) {\r\n        var key = event.key;\r\n        if (\r\n          [\r\n            \"ArrowLeft\",\r\n            \"ArrowRight\",\r\n            \"ArrowUp\",\r\n            \"ArrowDown\",\r\n            \"Home\",\r\n            \"End\",\r\n          ].indexOf(key) !== -1\r\n        ) {\r\n          event.preventDefault();\r\n          var focus = readProfileFocalInputs(form, slot),\r\n            step = event.shiftKey ? 0.05 : 0.02;\r\n          (key === \"ArrowLeft\" && (focus.x -= step),\r\n            key === \"ArrowRight\" && (focus.x += step),\r\n            key === \"ArrowUp\" && (focus.y -= step),\r\n            key === \"ArrowDown\" && (focus.y += step),\r\n            key === \"Home\" && (focus = { x: 0.5, y: 0.5 }),\r\n            key === \"End\" && (focus = { x: 0.5, y: 1 }),\r\n            setProfileFocalFormValues(form, slot, focus, !0));\r\n        }\r\n      }));\r\n  }\r\n  function bannerBackgroundPosition(value) {\r\n    var raw = String(value || \"center\")\r\n        .trim()\r\n        .toLowerCase(),\r\n      custom = raw.match(/^x(\\d{1,3})-y(\\d{1,3})(?:-z(\\d{1,3}))?$/);\r\n    if (custom) {\r\n      var x = Math.max(0, Math.min(100, Number(custom[1] || 50))),\r\n        y = Math.max(0, Math.min(100, Number(custom[2] || 50)));\r\n      return x + \"% \" + y + \"%\";\r\n    }\r\n    var focusMap = {\r\n      top: \"center 12%\",\r\n      \"upper-mid\": \"center 30%\",\r\n      center: \"center 50%\",\r\n      \"lower-mid\": \"center 70%\",\r\n      bottom: \"center 88%\",\r\n      \"top-left\": \"18% 12%\",\r\n      \"top-right\": \"82% 12%\",\r\n      left: \"18% 50%\",\r\n      right: \"82% 50%\",\r\n      \"bottom-left\": \"18% 88%\",\r\n      \"bottom-right\": \"82% 88%\",\r\n    };\r\n    return focusMap[raw] || \"center 50%\";\r\n  }\r\n  function bannerBackgroundSize(value) {\r\n    var zoom = bannerPositionZoom(value);\r\n    return zoom > 100 ? Math.round(zoom) + \"%\" : \"cover\";\r\n  }\r\n  function visibilityHelpDetails(surface) {\n    return \"\";\n  }\n  function composerMixedMediaButton(multiple, label, max) {\n    var aria = label || \"Add media\";\n    return (\n      '<label class=\"dsd-composer-media-button dsd-composer-media-button--icon\" data-dsd-composer-media-button=\"media\" aria-label=\"' +\n      html(aria) +\n      '\" title=\"' +\n      html(aria) +\n      '\">' +\n      composerMediaIcon(\"image\") +\n      '<span class=\"visually-hidden\">' +\n      html(aria) +\n      '</span><input name=\"media\" data-dsd-media-input=\"media\" data-dsd-media-max=\"' +\n      html(max || (multiple ? 5 : 1)) +\n      '\" type=\"file\" accept=\"image/*,video/*\"' +\n      (multiple ? \" multiple\" : \"\") +\n      ' aria-label=\"' +\n      html(aria) +\n      '\"></label>'\n    );\n  }\n  function initials(name) {\r\n    return (\r\n      String(name || \"DS\")\r\n        .split(/\\s+/)\r\n        .map(function (x) {\r\n          return x.charAt(0);\r\n        })\r\n        .join(\"\")\r\n        .slice(0, 2)\r\n        .toUpperCase() || \"DS\"\r\n    );\r\n  }\r\n  function customer() {\r\n    return window.DSDShopifyCustomer || null;\r\n  }\r\n  function shopifyAuthenticated() {\r\n    var c = customer(),\r\n      htmlAuthenticated = !1;\r\n    try {\r\n      htmlAuthenticated =\r\n        document.documentElement &&\r\n        document.documentElement.classList.contains(\r\n          \"dsd-shopify-authenticated\",\r\n        );\r\n    } catch (e) {}\r\n    return !!(c && c.authenticated === !0 && htmlAuthenticated);\r\n  }\r\n  function loginReturnUrl() {\r\n    return LOGIN_RETURN_URL;\r\n  }\r\n  function registerReturnUrl() {\r\n    return REGISTER_RETURN_URL;\r\n  }\r\n  function ensureSupabaseConfig() {\r\n    if (\r\n      window.DSDSupabaseConfig &&\r\n      window.DSDSupabaseConfig.cutoverEnabled === !0\r\n    )\r\n      return window.DSDSupabaseConfig;\r\n    window.DSDSupabaseConfig = Object.assign(\r\n      {},\r\n      window.DSDSupabaseConfig || {},\r\n      {\r\n        version: \"goal2-g04-canonical-supabase-adapter\",\r\n        owner: \"DSDSupabaseSocialAdapter\",\r\n        mode: \"canonical-supabase-social-runtime\",\r\n        url: \"https://qcjdwbgtagtjkoqrpnvt.supabase.co\",\r\n        tokenEndpoint:\r\n          \"/apps/dsd-firebase-custom-token?bridgeRoute=%2Fdsd-supabase-custom-token\",\r\n        cutoverEnabled: !0,\r\n        mediaBackend: \"wasabi\",\r\n        supabaseStorageProductionAllowed: !1,\r\n        recoveredBy: BUILD,\r\n      },\r\n    );\r\n    try {\n      window.dispatchEvent(\n        new CustomEvent(\"dsd:supabase-config:ready\", {\r\n          detail: {\r\n            version: window.DSDSupabaseConfig.version,\r\n            owner: window.DSDSupabaseConfig.owner,\r\n            mode: window.DSDSupabaseConfig.mode,\r\n            tokenEndpoint: window.DSDSupabaseConfig.tokenEndpoint,\r\n            mediaBackend: window.DSDSupabaseConfig.mediaBackend,\r\n          },\r\n        }),\r\n      );\r\n    } catch (e) {}\r\n    return window.DSDSupabaseConfig;\r\n  }\r\n  function supabaseAdapter() {\r\n    return window.DSDSupabaseSocialAdapter && ensureSupabaseConfig()\r\n      ? window.DSDSupabaseSocialAdapter\r\n      : null;\r\n  }\r\n  function supabaseCutoverReady() {\r\n    return !!(\r\n      supabaseAdapter() && ensureSupabaseConfig().cutoverEnabled === !0\r\n    );\r\n  }\r\n  function supabaseCutoverConfigured() {\r\n    return !!(\r\n      ensureSupabaseConfig() && window.DSDSupabaseConfig.cutoverEnabled === !0\r\n    );\r\n  }\r\n  function primeSupabaseEntitlementSession() {\r\n    return hasCustomer()\r\n      ? (state.supabaseEntitlementPrimePromise ||\r\n          (state.supabaseEntitlementPrimePromise = waitForSupabaseAdapter(\r\n            \"authenticated-social-entitlement-prime\",\r\n            \"session\",\r\n          )\r\n            .then(function (adapter) {\r\n              return !adapter || typeof adapter.session != \"function\"\r\n                ? null\r\n                : adapter\r\n                    .session({\r\n                      maxAgeMs: 2700 * 1e3,\r\n                      body: {\r\n                        surface: \"authenticated-social-entitlement-prime\",\r\n                      },\r\n                    })\r\n                    .then(function (payload) {\r\n                      return (applySupabaseSessionIdentity(payload), payload);\r\n                    });\r\n            })\r\n            .catch(function (error) {\r\n              state.supabaseEntitlementPrimePromise = null;\r\n              try {\r\n                (document.documentElement.setAttribute(\r\n                  \"data-dsd-viewer-prime\",\r\n                  \"failed\",\r\n                ),\r\n                  document.documentElement.setAttribute(\r\n                    \"data-dsd-viewer-prime-error\",\r\n                    String(\r\n                      (error && error.message) || error || \"unknown\",\r\n                    ).slice(0, 80),\r\n                  ));\r\n              } catch (e) {}\r\n              return (\r\n                claim(\"supabase-entitlement-prime:degraded\", {\r\n                  error: (error && error.message) || String(error),\r\n                }),\r\n                null\r\n              );\r\n            })),\r\n        state.supabaseEntitlementPrimePromise)\r\n      : Promise.resolve(null);\r\n  }\r\n  function applySupabaseSessionIdentity(payload) {\n    payload = payload || {};\r\n    var claims = window.DSDSupabaseSessionClaims || payload.claims || {},\r\n      entitlement = payload.entitlement || null;\r\n    ((state.supabaseEntitlement = entitlement),\r\n      (state.sessionClaims = Object.assign({}, claims || {})),\r\n      (state.sessionActorId = clean(\n        payload.supabaseUserId || payload.supabaseSubject || claims.sub || \"\",\n        \"\",\n      )),\n      (state.sessionSetupRequired =\n        payload.setupRequired === !0 ||\n        (payload.provisioning &&\n          payload.provisioning.state === \"setup_required\")),\n      (state.sessionProvisioningReady = !!(\n        payload.provisioning && payload.provisioning.bindingReady === !0\n      )),\n      (state.bridgeChecked = !0));\n    var rawKey = clean(payload.profileKey || claims.profile_key || \"\", \"\"),\r\n      key = nonPlaceholderProfileKey(rawKey);\r\n    (looksLikeRawEmail(key) && (key = \"\"),\r\n      key && (state.sessionProfileKey = key));\r\n    var membershipActive =\r\n        (entitlement && entitlement.dsdPlus === !0) || claims.dsd_plus === !0,\r\n      role =\r\n        claims.role_founder === !0\r\n          ? \"founder\"\r\n          : claims.role_moderator === !0\r\n            ? \"moderator\"\r\n            : \"\",\r\n      current = customer() || {};\r\n    if (!key && !membershipActive && !role) return current;\r\n    var next = Object.assign({}, current, {\r\n      authenticated: current.authenticated === !0 || hasCustomer() || !0,\r\n      profileKey: key || current.profileKey || \"\",\r\n      handle: current.handle || key || \"\",\r\n      isFounder: current.isFounder === !0 || claims.role_founder === !0,\r\n      isModerator:\r\n        current.isModerator === !0 ||\r\n        claims.role_moderator === !0 ||\r\n        claims.role_founder === !0,\r\n      membership: Object.assign({}, current.membership || {}, {\r\n        active:\r\n          membershipActive ||\r\n          (current.membership && current.membership.active === !0),\r\n        dsdPlus:\r\n          membershipActive ||\r\n          (current.membership && current.membership.dsdPlus === !0),\r\n        tier: (current.membership && current.membership.tier) || \"\",\r\n        source:\r\n          (entitlement && entitlement.source) ||\r\n          claims.entitlement_source ||\r\n          (current.membership && current.membership.source) ||\r\n          \"shopify-app-proxy-verified\",\r\n      }),\r\n      entitlementSource:\r\n        (entitlement && entitlement.source) ||\r\n        current.entitlementSource ||\r\n        \"shopify-app-proxy-verified\",\r\n    });\r\n    ((next.platformRole = Object.assign({}, current.platformRole || {}, {\r\n      role: role || (current.platformRole && current.platformRole.role) || \"\",\r\n      source: role\r\n        ? \"supabase-bridge-claims\"\r\n        : (current.platformRole && current.platformRole.source) ||\r\n          \"shopify-server-derived\",\r\n    })),\r\n      (window.DSDShopifyCustomer = next));\r\n    try {\r\n      (document.documentElement.setAttribute(\"data-dsd-viewer-prime\", \"ok\"),\r\n        document.documentElement.removeAttribute(\"data-dsd-viewer-prime-error\"),\r\n        document.documentElement.setAttribute(\r\n          \"data-dsd-viewer-profile-key-present\",\r\n          rawKey ? \"true\" : \"false\",\r\n        ),\r\n        document.documentElement.setAttribute(\r\n          \"data-dsd-viewer-profile-key-safe\",\r\n          key ? \"true\" : \"false\",\r\n        ),\r\n        document.documentElement.setAttribute(\r\n          \"data-dsd-viewer-role\",\r\n          role || \"user\",\r\n        ),\r\n        document.documentElement.setAttribute(\r\n          \"data-dsd-viewer-dsd-plus\",\r\n          membershipActive ? \"true\" : \"false\",\r\n        ));\r\n    } catch (e) {}\r\n    return (\r\n      key &&\r\n        window.setTimeout(function () {\r\n          try {\r\n            renderRouteAccessGates();\r\n          } catch (e) {}\r\n          try {\r\n            renderModeration();\r\n          } catch (e) {}\r\n          try {\r\n            renderMessages();\r\n          } catch (e) {}\r\n          readSupabaseCanonicalProfileByKey(key)\r\n            .then(function (profile) {\r\n              profile && activateCustomerScopedProfile(profile);\r\n            })\r\n            .catch(function (error) {\r\n              claim(\"supabase-session-profile-activate:degraded\", {\r\n                error: (error && error.message) || String(error),\r\n              });\r\n            })\r\n            .then(function () {\r\n              try {\r\n                renderRouteAccessGates();\r\n              } catch (e) {}\r\n              try {\r\n                renderModeration();\r\n              } catch (e) {}\r\n              try {\r\n                renderProfileIdentity();\r\n              } catch (e) {}\r\n              try {\r\n                renderMessages();\r\n              } catch (e) {}\r\n              try {\r\n                syncComposerIdentityUI();\r\n              } catch (e) {}\r\n              try {\r\n                clearStaleConnectionStatus();\r\n              } catch (e) {}\r\n              try {\n                scheduleLateProfileHydrationReconcile();\n              } catch (e) {}\n              try {\n                startListeners();\n              } catch (e) {}\n            });\n        }, 0),\r\n      next\n    );\n  }\n  function activateProvisionedIncompleteProfile() {\n    var profile = canonicalProfilePayload(!1);\n    return (\n      (profile.uid = state.sessionActorId || \"\"),\n      (profile.userId = state.sessionActorId || \"\"),\n      (profile.profileKey = \"\"),\n      (profile.handle = \"\"),\n      (profile.displayName = \"\"),\n      (profile.visibility = \"private\"),\n      (profile.searchable = !1),\n      (profile.status = \"setup_required\"),\n      (profile.setupComplete = !1),\n      (profile.identityRebindingRequired = !1),\n      (profile.authBridge = \"supabase-canonical-provisioning\"),\n      (profile.provisionedPrivateProfile = !0),\n      (state.profileExists = !0),\n      (state.profile = profile),\n      profile\n    );\n  }\n  function supabasePathSupported(path) {\n    return /^(profiles|publicProfiles|posts|stories|gatedPostShells|gatedStoryShells|mediaManifests|moderationQueue|safetyReports|founderAudit|notifications|conversations|relationships|saves|favorites)(?:\\/|$)/.test(\r\n      String(path || \"\"),\r\n    );\r\n  }\r\n  function purgeRetiredPublicSocialCaches() {\r\n    var stampKey = \"dsd.launch.firebaseGhostPurge.version\";\r\n    try {\r\n      if (\r\n        !window.localStorage ||\r\n        window.localStorage.getItem(stampKey) === GHOST_PURGE_VERSION\r\n      )\r\n        return;\r\n    } catch (e) {\r\n      return;\r\n    }\r\n    var protectedKey =\r\n        /(shopify|cart|checkout|customer|conjured|auth|token|session|password|consent)/i,\r\n      retiredSocialKey =\r\n        /(dsd|detroit).*?(firebase|firestore|publicprofiles|public-profiles|profiles|profilecards|discovery|users311|posts|stories|comments|feed|social|gated)|(firebase|firestore).*?(publicprofiles|profiles|profilecards|discovery|posts|stories|comments|feed|social|gated)/i;\r\n    function cleanStore(store) {\r\n      if (store) {\r\n        var keys = [];\r\n        try {\r\n          for (var i = 0; i < store.length; i += 1) keys.push(store.key(i));\r\n          keys.forEach(function (key) {\r\n            !key ||\r\n              protectedKey.test(key) ||\r\n              (retiredSocialKey.test(key) && store.removeItem(key));\r\n          });\r\n        } catch (e) {}\r\n      }\r\n    }\r\n    (cleanStore(window.localStorage), cleanStore(window.sessionStorage));\r\n    try {\r\n      window.localStorage.setItem(stampKey, GHOST_PURGE_VERSION);\r\n    } catch (e) {}\r\n    try {\r\n      window.indexedDB &&\r\n        typeof window.indexedDB.databases == \"function\" &&\r\n        window.indexedDB\r\n          .databases()\r\n          .then(function (databases) {\r\n            (databases || []).forEach(function (db) {\r\n              var name = (db && db.name) || \"\";\r\n              if (\r\n                !(!name || protectedKey.test(name)) &&\r\n                /dsd.*?(firebase|firestore|publicprofiles|discovery|social|profilecards|posts|stories|gated)/i.test(\r\n                  name,\r\n                )\r\n              )\r\n                try {\r\n                  window.indexedDB.deleteDatabase(name);\r\n                } catch (e) {}\r\n            });\r\n          })\r\n          .catch(function () {});\r\n    } catch (e) {}\r\n  }\r\n  function hasCustomer() {\r\n    var c = customer();\r\n    return !!(\r\n      c &&\r\n      (c.authenticated === !0 || c.profileKey || c.handle || c.displayName)\r\n    );\r\n  }\r\n  function uid() {\r\n    var adapter = supabaseAdapter(),\r\n      canonicalId = clean(state.sessionActorId || \"\", \"\");\r\n    if (!canonicalId && adapter && typeof adapter.currentUserId == \"function\")\r\n      try {\r\n        canonicalId = clean(adapter.currentUserId() || \"\", \"\");\r\n      } catch (error) {\r\n        canonicalId = \"\";\r\n      }\r\n    if (canonicalId) return canonicalId;\r\n    var profile = state.profile || {};\r\n    return clean(\r\n      profile.supabaseUserId ||\r\n        profile.supabase_user_id ||\r\n        profile.appUserId ||\r\n        profile.app_user_id ||\r\n        profile.userId ||\r\n        profile.user_id ||\r\n        \"\",\r\n      \"\",\r\n    );\r\n  }\r\n  function actorUid() {\r\n    var adapter = supabaseAdapter(),\r\n      sessionActor = clean(state.sessionActorId || \"\", \"\");\r\n    if (!sessionActor && adapter && typeof adapter.currentUserId == \"function\")\r\n      try {\r\n        sessionActor = clean(adapter.currentUserId() || \"\", \"\");\r\n      } catch (error) {\r\n        sessionActor = \"\";\r\n      }\r\n    if (sessionActor) return sessionActor;\r\n    var scoped = customerScopedPublicProfile(),\r\n      scopedUid =\r\n        scoped &&\r\n        (scoped.uid ||\r\n          scoped.userId ||\r\n          scoped.user_id ||\r\n          scoped.firebaseUid ||\r\n          scoped.firebase_uid);\r\n    if (scopedUid) return clean(scopedUid, \"\");\r\n    var p = profileWithPublicMirror(state.profile || {}) || state.profile || {},\r\n      c = customer() || {},\r\n      hintedKey = nonPlaceholderProfileKey(\r\n        c.profileKey ||\r\n          c.handle ||\r\n          state.sessionProfileKey ||\r\n          p.profileKey ||\r\n          p.handle ||\r\n          \"\",\r\n      ),\r\n      publicIdentity = hintedKey ? publicProfileByKey(hintedKey) : null,\r\n      publicUid =\r\n        publicIdentity &&\r\n        (publicIdentity.uid ||\r\n          publicIdentity.userId ||\r\n          publicIdentity.user_id ||\r\n          publicIdentity.firebaseUid ||\r\n          publicIdentity.firebase_uid);\r\n    if (publicUid) return clean(publicUid, \"\");\r\n    var customerKey = normalizedProfileKeyValue(customerProfileKeyValue()),\r\n      profileKeyValue = normalizedProfileKeyValue(\r\n        p.profileKey || p.handle || \"\",\r\n      );\r\n    return (c.privateIdentityBridgeRequired === !0 ||\r\n      c.storeScopedIdentity === !0) &&\r\n      customerKey &&\r\n      profileKeyValue &&\r\n      profileKeyValue !== customerKey\r\n      ? \"\"\r\n      : clean(\r\n          p.uid ||\r\n            p.userId ||\r\n            p.user_id ||\r\n            p.supabaseUserId ||\r\n            p.supabase_user_id ||\r\n            p.appUserId ||\r\n            p.app_user_id ||\r\n            uid() ||\r\n            p.firebaseUid ||\r\n            p.firebase_uid ||\r\n            \"\",\r\n          \"\",\r\n        );\r\n  }\r\n  function actorRelationshipIdentity() {\r\n    return actorUid() || profileKey();\r\n  }\r\n  function relationshipListenerOwnerIdentity() {\n    var adapter = supabaseAdapter(),\n      canonicalUserId = clean(state.sessionActorId || \"\", \"\");\n    if (\n      !canonicalUserId &&\n      hasCustomer() &&\n      adapter &&\n      typeof adapter.currentUserId == \"function\"\n    )\n      try {\n        canonicalUserId = cleanEmpty(adapter.currentUserId());\n      } catch (e) {\r\n        canonicalUserId = \"\";\r\n      }\r\n    return canonicalUserId || actorRelationshipIdentity();\r\n  }\r\n  function canonicalProfileOwnerIdentity(action) {\r\n    var c = customer() || {},\r\n      bridgeKey =\r\n        ((c.privateIdentityBridgeRequired === !0 ||\r\n          c.storeScopedIdentity === !0) &&\r\n          (customerProfileKeyValue() || state.sessionProfileKey)) ||\r\n        \"\",\r\n      key = nonPlaceholderProfileKey(\r\n        bridgeKey ||\r\n          activeProfileKeyValue() ||\r\n          customerProfileKeyValue() ||\r\n          profileKey() ||\r\n          (state.profile &&\r\n            (state.profile.profileKey || state.profile.handle)) ||\r\n          \"\",\r\n      ),\r\n      normalizedKey = normalizedProfileKeyValue(key),\r\n      stateProfile = state.profile || {},\r\n      stateProfileKey = normalizedProfileKeyValue(\r\n        stateProfile.profileKey ||\r\n          stateProfile.handle ||\r\n          stateProfile.profile_key ||\r\n          \"\",\r\n      ),\r\n      composerProfile = currentComposerProfile\r\n        ? currentComposerProfile()\r\n        : stateProfile,\r\n      composerKey = normalizedProfileKeyValue(\r\n        composerProfile &&\r\n          (composerProfile.profileKey ||\r\n            composerProfile.handle ||\r\n            composerProfile.profile_key ||\r\n            \"\"),\r\n      ),\r\n      profile =\r\n        (key ? publicProfileByKey(key) : null) ||\r\n        (stateProfileKey && stateProfileKey === normalizedKey\r\n          ? stateProfile\r\n          : null) ||\r\n        (composerKey && composerKey === normalizedKey\r\n          ? composerProfile\r\n          : null) ||\r\n        {};\r\n    profile = profileWithPublicMirror(profile || {}) || profile || {};\r\n    var ownerUid = clean(\r\n      profile.uid ||\r\n        profile.userId ||\r\n        profile.user_id ||\r\n        profile.supabaseUserId ||\r\n        profile.supabase_user_id ||\r\n        profile.appUserId ||\r\n        profile.app_user_id ||\r\n        \"\",\r\n      \"\",\r\n    );\r\n    return (\r\n      !ownerUid &&\r\n        actorUid() &&\r\n        normalizedProfileKeyValue(\r\n          profile.profileKey || profile.handle || \"\",\r\n        ) === normalizedKey &&\r\n        (ownerUid = actorUid()),\r\n      (ownerUid = clean(ownerUid || \"\", \"\")),\r\n      !key || looksLikeRawEmail(key) || !ownerUid\r\n        ? (action &&\r\n            renderStatus(\r\n              \"Profile connection is refreshing. Try again in a moment.\",\r\n            ),\r\n          claim(\"canonical-profile-owner:blocked\", {\r\n            action: action || \"\",\r\n            profileKeyPresent: !!key,\r\n            ownerUidPresent: !!ownerUid,\r\n            storeScoped: storeScopedIdentityRequiresPrivateBridge(),\r\n          }),\r\n          null)\r\n        : {\r\n            uid: ownerUid,\r\n            profileKey: key,\r\n            displayName: activeDisplayNameValue() || profile.displayName || key,\r\n            avatarMediaId: canonicalProfileAvatarMediaId(\r\n              profile || state.profile || {},\r\n            ),\r\n          }\r\n    );\r\n  }\r\n  function normalizedUid(value) {\r\n    return String(value || \"\")\r\n      .trim()\r\n      .replace(/^shopify-/, \"\");\r\n  }\r\n  function isFounderGovernanceTarget(targetUid, key) {\r\n    return identityMatchesCurrent(targetUid, key);\r\n  }\r\n  function hasCanonicalPrivateSocialSession() {\r\n    return !!(\r\n      hasCustomer() &&\r\n      state.bridgeChecked &&\r\n      supabaseCutoverReady() &&\r\n      actorUid()\r\n    );\r\n  }\r\n  function currentProfilePath() {\r\n    return hasCustomer()\r\n      ? \"profiles/current\"\r\n      : uid()\r\n        ? \"profiles/\" + uid()\r\n        : \"profiles/current\";\r\n  }\r\n  function canonicalProfileWritePath(profileKeyValue) {\r\n    var key = nonPlaceholderProfileKey(\r\n      profileKeyValue ||\r\n        activeProfileKeyValue() ||\r\n        customerProfileKeyValue() ||\r\n        profileKey() ||\r\n        (state.profile && (state.profile.profileKey || state.profile.handle)) ||\r\n        \"\",\r\n    );\r\n    return key ? \"profiles/\" + key : currentProfilePath();\r\n  }\r\n  function waitForBridgeReady() {\r\n    state.bridgeChecked = !0;\r\n    return Promise.resolve(supabaseCutoverConfigured());\r\n  }\r\n  function profileKey() {\r\n    var c = customer(),\r\n      stateKey = nonPlaceholderProfileKey(\r\n        state.profile &&\r\n          (state.profile.profileKey ||\r\n            state.profile.handle ||\r\n            state.profile.profile_key),\r\n      ),\r\n      sessionKey = nonPlaceholderProfileKey(state.sessionProfileKey || \"\"),\r\n      fallback = nonPlaceholderProfileKey(shopifyDisplayProfileKey(c)),\r\n      storeScoped =\r\n        c &&\r\n        (c.privateIdentityBridgeRequired === !0 ||\r\n          c.storeScopedIdentity === !0),\r\n      customerKey = storeScoped\r\n        ? verifiedStoreScopedProfileKey()\r\n        : nonPlaceholderProfileKey(\r\n            (c && (c.profileKey || c.handle)) || sessionKey || fallback || \"\",\r\n          );\r\n    if (\r\n      c &&\r\n      (c.privateIdentityBridgeRequired === !0 ||\r\n        c.storeScopedIdentity === !0) &&\r\n      customerKey\r\n    ) {\r\n      var scoped = customerScopedPublicProfile();\r\n      if (\r\n        scoped ||\r\n        !stateKey ||\r\n        normalizedProfileKeyValue(stateKey) !==\r\n          normalizedProfileKeyValue(customerKey)\r\n      )\r\n        return customerKey;\r\n    }\r\n    return c &&\r\n      (c.privateIdentityBridgeRequired === !0 ||\r\n        c.storeScopedIdentity === !0) &&\r\n      !customerKey\r\n      ? privateBridgeCanonicalProfileResolved()\r\n        ? stateKey\r\n        : \"\"\r\n      : stateKey || sessionKey || fallback || \"\";\r\n  }\r\n  function placeholderProfileKey(value) {\n    return (\n      (value = clean(value || \"\", \"\").toLowerCase()),\n      !value ||\n        /^member-[a-f0-9]{6,}$/.test(value) ||\n        [\n          \"profile\",\n          \"user\",\n          \"member\",\r\n          \"guest\",\r\n          \"dsd-member\",\r\n          \"dsdmember\",\r\n          \"n-a\",\r\n          \"na\",\r\n          \"n/a\",\r\n          \"not-available\",\r\n          \"unknown\",\r\n        ].indexOf(value) !== -1 ||\r\n        looksLikeRawEmail(value)\r\n    );\r\n  }\r\n  function nonPlaceholderProfileKey(value) {\n    return (\r\n      (value = clean(value || \"\", \"\")),\r\n      placeholderProfileKey(value) ? \"\" : value\r\n    );\r\n  }\r\n  function profileRecordHasUsableKey(profile) {\r\n    return !!nonPlaceholderProfileKey(\r\n      profile &&\r\n        (profile.profileKey || profile.handle || profile.profile_key || \"\"),\r\n    );\r\n  }\r\n  function profileRecordHasSavedIdentity(profile) {\r\n    return profile\r\n      ? profileRecordHasUsableKey(profile) ||\r\n        String(\r\n          profile.status || profile.accountState || profile.account_state || \"\",\r\n        ).toLowerCase() === \"active\"\r\n        ? !0\r\n        : !!(\r\n            publicDisplayName(\r\n              profile.displayName || profile.display_name || \"\",\r\n              \"\",\r\n            ) ||\r\n            publicDisplayText(profile.bio || \"\", \"\") ||\r\n            canonicalProfileAvatarMediaId(profile) ||\r\n            canonicalProfileBannerMediaId(profile) ||\r\n            profileLocationText(profile)\r\n          )\r\n      : !1;\r\n  }\r\n  function storeScopedIdentityRequiresPrivateBridge() {\r\n    var c = customer() || {};\r\n    return !!(\r\n      hasCustomer() &&\r\n      (c.privateIdentityBridgeRequired === !0 || c.storeScopedIdentity === !0)\r\n    );\r\n  }\r\n  function verifiedStoreScopedProfileKey() {\r\n    var c = customer() || {};\r\n    if (!(\r\n      c.privateIdentityBridgeRequired === !0 || c.storeScopedIdentity === !0\r\n    ))\r\n      return \"\";\r\n    var key = nonPlaceholderProfileKey(\r\n      c.profileKey || c.handle || state.sessionProfileKey || \"\",\r\n    );\r\n    return (\r\n      key ||\r\n      (hasCustomer() &&\r\n      (c.isFounder === !0 ||\r\n        (c.platformRole && roleText(c.platformRole.role) === \"founder\") ||\r\n        isCanonicalFounder())\r\n        ? \"detroitskydaddy\"\r\n        : \"\")\r\n    );\r\n  }\r\n  function profileMatchesVerifiedStoreScopedSession(profile) {\r\n    if (!storeScopedIdentityRequiresPrivateBridge()) return !0;\r\n    var expected = normalizedProfileKeyValue(verifiedStoreScopedProfileKey());\r\n    if (!expected) return !1;\r\n    var actual = normalizedProfileKeyValue(\r\n      (profile &&\r\n        (profile.profileKey || profile.handle || profile.profile_key)) ||\r\n        \"\",\r\n    );\r\n    return !!(actual && actual === expected);\r\n  }\r\n  function ownIdentityRebindingRequired() {\n    var signedProvisionedSetup = !!(\n      state.bridgeChecked === !0 &&\n      state.sessionActorId &&\n      state.sessionSetupRequired === !0 &&\n      state.sessionProvisioningReady === !0\n    );\n    return (\n      storeScopedIdentityRequiresPrivateBridge() &&\n      !signedProvisionedSetup &&\n      !verifiedStoreScopedProfileKey() &&\n      !privateBridgeCanonicalProfileResolved()\n    );\n  }\r\n  function identityRebindingRequiredProfile() {\r\n    return {\r\n      uid: actorUid() || uid() || \"\",\r\n      displayName: \"\",\r\n      profileKey: \"\",\r\n      handle: \"\",\r\n      bio: \"\",\r\n      setupComplete: !1,\r\n      status: \"identity_rebinding_required\",\r\n      identityRebindingRequired: !0,\r\n      authBridge: \"private-identity-rebinding-required\",\r\n      searchable: !1,\r\n      entity: {\r\n        type: \"profile\",\r\n        visibility: \"private\",\r\n        moderationStatus: \"identity_rebinding_required\",\r\n      },\r\n    };\r\n  }\r\n  function activeProfileKeyValue() {\r\n    var p = state.profile || {},\r\n      c = customer() || {},\r\n      customerKey =\r\n        c.privateIdentityBridgeRequired === !0 || c.storeScopedIdentity === !0\r\n          ? verifiedStoreScopedProfileKey()\r\n          : nonPlaceholderProfileKey(\r\n              c.profileKey || c.handle || state.sessionProfileKey || \"\",\r\n            ),\r\n      profileKeyValue = nonPlaceholderProfileKey(\r\n        p.profileKey || p.handle || p.profile_key || \"\",\r\n      );\r\n    if (\r\n      (c.privateIdentityBridgeRequired === !0 ||\r\n        c.storeScopedIdentity === !0) &&\r\n      customerKey\r\n    ) {\r\n      var scoped = customerScopedPublicProfile();\r\n      if (\r\n        scoped ||\r\n        !profileKeyValue ||\r\n        normalizedProfileKeyValue(profileKeyValue) !==\r\n          normalizedProfileKeyValue(customerKey)\r\n      )\r\n        return customerKey;\r\n    }\r\n    return (c.privateIdentityBridgeRequired === !0 ||\r\n      c.storeScopedIdentity === !0) &&\r\n      !customerKey\r\n      ? privateBridgeCanonicalProfileResolved()\r\n        ? profileKeyValue\r\n        : \"\"\r\n      : profileKeyValue || profileKeyValue || customerKey;\r\n  }\r\n  function customerScopedPublicProfile() {\r\n    var c = customer() || {};\r\n    if (!(\r\n      c.privateIdentityBridgeRequired === !0 || c.storeScopedIdentity === !0\r\n    ))\r\n      return null;\r\n    var key = verifiedStoreScopedProfileKey();\r\n    return key ? publicProfileByKey(key) : null;\r\n  }\r\n  function normalizedProfileKeyValue(value) {\r\n    return clean(value || \"\", \"\")\r\n      .replace(/^@+/, \"\")\r\n      .toLowerCase();\r\n  }\r\n  function currentIdentityValues() {\r\n    var values = {};\r\n    function add(value) {\r\n      ((value = String(value || \"\").trim()), value && (values[value] = !0));\r\n    }\r\n    var p = state.profile || {};\r\n    return (\r\n      add(actorUid()),\r\n      add(uid()),\r\n      add(p.uid),\r\n      add(p.userId),\r\n      add(p.user_id),\r\n      add(p.supabaseUserId),\r\n      add(p.supabase_user_id),\r\n      add(p.appUserId),\r\n      add(p.app_user_id),\r\n      add(p.firebaseUid),\r\n      add(p.firebase_uid),\r\n      Object.keys(values)\r\n    );\r\n  }\r\n  function identityMatchesCurrent(targetUid, targetKey) {\r\n    var target = String(targetUid || \"\").trim(),\r\n      key = normalizedProfileKeyValue(targetKey || \"\"),\r\n      currentKey = normalizedProfileKeyValue(\r\n        activeProfileKeyValue() || profileKey() || \"\",\r\n      );\r\n    return key && currentKey && key === currentKey\r\n      ? !0\r\n      : target\r\n        ? currentIdentityValues().indexOf(target) !== -1\r\n        : !1;\r\n  }\r\n  function customerProfileKeyValue() {\r\n    var c = customer() || {};\r\n    return nonPlaceholderProfileKey(\r\n      c.profileKey || c.handle || state.sessionProfileKey || \"\",\r\n    );\r\n  }\r\n  function activeOwnerProfileKey() {\r\n    var c = customer() || {},\r\n      verifiedStoreScopedKey =\r\n        customerProfileKeyValue() || state.sessionProfileKey || \"\";\r\n    return (c.privateIdentityBridgeRequired === !0 ||\r\n      c.storeScopedIdentity === !0) &&\r\n      !verifiedStoreScopedKey &&\r\n      !privateBridgeCanonicalProfileResolved() &&\r\n      !profileRecordHasUsableKey(state.profile)\r\n      ? \"\"\r\n      : nonPlaceholderProfileKey(\r\n          customerProfileKeyValue() ||\r\n            state.sessionProfileKey ||\r\n            (state.profile &&\r\n              (state.profile.profileKey ||\r\n                state.profile.handle ||\r\n                state.profile.profile_key)) ||\r\n            profileKey() ||\r\n            \"\",\r\n        );\r\n  }\r\n  function viewedRouteProfileKey() {\r\n    var profile = viewedProfile() || {};\r\n    return nonPlaceholderProfileKey(\r\n      routeProfileKey() ||\r\n        profile.profileKey ||\r\n        profile.handle ||\r\n        profile.profile_key ||\r\n        \"\",\r\n    );\r\n  }\r\n  function profileContentTargetIdentity() {\r\n    var profile = viewedProfile() || {},\r\n      routeKey = nonPlaceholderProfileKey(routeProfileKey() || \"\"),\r\n      profileTargetKey = nonPlaceholderProfileKey(\r\n        profile.profileKey || profile.handle || profile.profile_key || \"\",\r\n      ),\r\n      ownerKey = isOwnProfileRoute() ? activeOwnerProfileKey() : \"\",\r\n      targetKey = nonPlaceholderProfileKey(\r\n        routeKey || profileTargetKey || ownerKey || \"\",\r\n      ),\r\n      profileUid = clean(\r\n        profile.uid ||\r\n          profile.userId ||\r\n          profile.user_id ||\r\n          profile.supabaseUserId ||\r\n          profile.supabase_user_id ||\r\n          profile.appUserId ||\r\n          profile.app_user_id ||\r\n          profile.firebaseUid ||\r\n          profile.firebase_uid ||\r\n          \"\",\r\n        \"\",\r\n      ),\r\n      targetUid = profileUid || (isOwnProfileRoute() ? actorUid() : \"\"),\r\n      expectedKey = nonPlaceholderProfileKey(\r\n        routeKey ||\r\n          ownerKey ||\r\n          customerProfileKeyValue() ||\r\n          state.sessionProfileKey ||\r\n          \"\",\r\n      ),\r\n      keyReady = !!targetKey,\r\n      uidReady = !!targetUid && !expectedKey;\r\n    return {\r\n      profile: profile,\r\n      targetKey: targetKey,\r\n      targetUid: targetUid,\r\n      ready: keyReady || uidReady,\r\n      routeKey: routeKey,\r\n      expectedKey: expectedKey,\r\n    };\r\n  }\r\n  function activeAuthorProfileMismatch() {\r\n    var profileKeyValue = normalizedProfileKeyValue(\r\n        state.profile && (state.profile.profileKey || state.profile.handle),\r\n      ),\r\n      customerKeyValue = normalizedProfileKeyValue(customerProfileKeyValue());\r\n    if (\r\n      !profileKeyValue ||\r\n      !customerKeyValue ||\r\n      [\"profile\", \"user\", \"member\", \"guest\", \"dsd-member\"].indexOf(\r\n        profileKeyValue,\r\n      ) !== -1 ||\r\n      [\"profile\", \"user\", \"member\", \"guest\", \"dsd-member\"].indexOf(\r\n        customerKeyValue,\r\n      ) !== -1\r\n    )\r\n      return !1;\r\n    var c = customer() || {};\r\n    return c.privateIdentityBridgeRequired === !0 ||\r\n      c.storeScopedIdentity === !0\r\n      ? !customerScopedPublicProfile() && profileKeyValue !== customerKeyValue\r\n      : profileKeyValue !== customerKeyValue;\r\n  }\r\n  function privateBridgeCanonicalProfileResolved() {\r\n    var c = customer() || {};\r\n    if (!(\r\n      c.privateIdentityBridgeRequired === !0 || c.storeScopedIdentity === !0\r\n    ))\r\n      return !1;\r\n    var stateKey = nonPlaceholderProfileKey(\r\n        (state.profile &&\r\n          (state.profile.profileKey ||\r\n            state.profile.handle ||\r\n            state.profile.profile_key)) ||\r\n          \"\",\r\n      ),\r\n      keyHint = verifiedStoreScopedProfileKey();\r\n    if (!keyHint) return !1;\r\n    var expectedKey = normalizedProfileKeyValue(keyHint),\r\n      candidates = [\r\n        keyHint ? publicProfileByKey(keyHint) : null,\r\n        state.profile || null,\r\n        uid() ? publicProfileByUid(uid()) : null,\r\n      ].filter(Boolean);\r\n    return candidates.some(function (p) {\r\n      var key = nonPlaceholderProfileKey(\r\n        p.profileKey || p.handle || p.profile_key || keyHint || \"\",\r\n      );\r\n      if (normalizedProfileKeyValue(key) !== expectedKey) return !1;\r\n      var resolvedUid =\r\n          p.uid ||\r\n          p.userId ||\r\n          p.user_id ||\r\n          p.supabaseUserId ||\r\n          p.supabase_user_id ||\r\n          p.appUserId ||\r\n          p.app_user_id ||\r\n          uid() ||\r\n          \"\",\r\n        active =\r\n          p.setupComplete === !0 ||\r\n          p.setup_complete === !0 ||\r\n          String(p.status || \"\").toLowerCase() === \"active\";\r\n      return !!(active && key && resolvedUid);\r\n    });\r\n  }\r\n  function activeDisplayNameValue() {\r\n    var p = state.profile || {},\r\n      c = customer() || {},\r\n      scoped = customerScopedPublicProfile();\r\n    if (scoped)\r\n      return String(\r\n        scoped.displayName ||\r\n          scoped.display_name ||\r\n          scoped.profileKey ||\r\n          scoped.handle ||\r\n          activeProfileKeyValue() ||\r\n          \"DSD member\",\r\n      ).trim();\r\n    var keyedProfile = publicProfileByKey(\r\n      customerProfileKeyValue() || activeProfileKeyValue() || \"\",\r\n    );\r\n    return keyedProfile\r\n      ? String(\r\n          keyedProfile.displayName ||\r\n            keyedProfile.display_name ||\r\n            keyedProfile.profileKey ||\r\n            keyedProfile.handle ||\r\n            \"DSD member\",\r\n        ).trim()\r\n      : String(\r\n          p.displayName ||\r\n            c.displayName ||\r\n            c.name ||\r\n            activeProfileKeyValue() ||\r\n            \"DSD member\",\r\n        ).trim();\r\n  }\r\n  function activeAuthorIdentity(action) {\r\n    var key = nonPlaceholderProfileKey(\r\n        customerProfileKeyValue() ||\r\n          activeProfileKeyValue() ||\r\n          profileKey() ||\r\n          \"\",\r\n      ),\r\n      normalizedKey = normalizedProfileKeyValue(key),\r\n      viewedKey = normalizedProfileKeyValue(routeProfileKey() || \"\"),\r\n      customerKey = normalizedProfileKeyValue(\r\n        customerProfileKeyValue() || verifiedStoreScopedProfileKey() || \"\",\r\n      );\r\n    if (\r\n      viewedKey &&\r\n      normalizedKey === viewedKey &&\r\n      customerKey !== viewedKey &&\r\n      !isOwnProfileRoute()\r\n    )\r\n      return (\r\n        action &&\r\n          renderStatus(\r\n            \"Your profile identity is still syncing. Refresh before you \" +\r\n              action +\r\n              \".\",\r\n          ),\r\n        claim(\"active-author-identity:viewed-profile-hijack-blocked\", {\r\n          action: action || \"\",\r\n          resolvedProfileKey: key,\r\n          viewedProfileKey: routeProfileKey(),\r\n          customerProfileKeyPresent: !!customerKey,\r\n        }),\r\n        null\r\n      );\r\n    var stateProfile = state.profile || {},\r\n      stateProfileKey = normalizedProfileKeyValue(\r\n        stateProfile.profileKey ||\r\n          stateProfile.handle ||\r\n          stateProfile.profile_key ||\r\n          \"\",\r\n      ),\r\n      composerProfile = currentComposerProfile(),\r\n      composerKey = normalizedProfileKeyValue(\r\n        composerProfile &&\r\n          (composerProfile.profileKey ||\r\n            composerProfile.handle ||\r\n            composerProfile.profile_key ||\r\n            \"\"),\r\n      ),\r\n      authorProfile =\r\n        (key ? publicProfileByKey(key) : null) ||\r\n        (stateProfileKey && stateProfileKey === normalizedKey\r\n          ? stateProfile\r\n          : null) ||\r\n        (composerKey && composerKey === normalizedKey\r\n          ? composerProfile\r\n          : null) ||\r\n        {};\r\n    authorProfile =\r\n      profileWithPublicMirror(authorProfile || {}) || authorProfile || {};\r\n    var actor = clean(\r\n        authorProfile.uid ||\r\n          authorProfile.userId ||\r\n          authorProfile.user_id ||\r\n          authorProfile.supabaseUserId ||\r\n          authorProfile.supabase_user_id ||\r\n          authorProfile.appUserId ||\r\n          authorProfile.app_user_id ||\r\n          \"\",\r\n        \"\",\r\n      ),\r\n      setup = !!(\r\n        authorProfile &&\r\n        (authorProfile.setupComplete === !0 ||\r\n          authorProfile.setup_complete === !0 ||\r\n          String(authorProfile.status || \"\").toLowerCase() === \"active\")\r\n      ),\r\n      c = customer() || {},\r\n      invalidKey =\r\n        !key ||\r\n        [\"profile\", \"user\", \"member\", \"guest\", \"dsd-member\"].indexOf(key) !==\r\n          -1 ||\r\n        looksLikeRawEmail(key);\r\n    return (\r\n      !setup && privateBridgeCanonicalProfileResolved() && (setup = !0),\r\n      !setup &&\r\n        (c.privateIdentityBridgeRequired === !0 ||\r\n          c.storeScopedIdentity === !0) &&\r\n        customerProfileKeyValue() &&\r\n        supabaseCutoverReady() &&\r\n        (setup = !0),\r\n      (c.privateIdentityBridgeRequired === !0 ||\r\n        c.storeScopedIdentity === !0) &&\r\n      !customerProfileKeyValue() &&\r\n      !privateBridgeCanonicalProfileResolved()\r\n        ? (action &&\r\n            renderStatus(\r\n              \"Your profile identity is still syncing. Refresh before you \" +\r\n                action +\r\n                \".\",\r\n            ),\r\n          claim(\"active-author-identity:store-scoped-profile-key-missing\", {\r\n            action: action || \"\",\r\n            hasCustomer: hasCustomer(),\r\n            setupComplete: setup,\r\n            actorUidPresent: !!actor,\r\n            profileKeyPresent: !!key,\r\n          }),\r\n          null)\r\n        : (!actor &&\r\n            actorUid() &&\r\n            normalizedProfileKeyValue(\r\n              authorProfile.profileKey ||\r\n                authorProfile.handle ||\r\n                authorProfile.profile_key ||\r\n                \"\",\r\n            ) === normalizedKey &&\r\n            (actor = actorUid()),\r\n          !actor &&\r\n            hasCustomer() &&\r\n            setup &&\r\n            key &&\r\n            normalizedKey &&\r\n            normalizedKey ===\r\n              normalizedProfileKeyValue(\r\n                customerProfileKeyValue() ||\r\n                  activeProfileKeyValue() ||\r\n                  profileKey() ||\r\n                  \"\",\r\n              ) &&\r\n            ((actor = key),\r\n            claim(\"active-author-identity:store-scoped-key-authorized\", {\r\n              action: action || \"\",\r\n              profileKey: key,\r\n              reason: \"signed-supabase-session-resolves-user-id\",\r\n            })),\r\n          activeAuthorProfileMismatch()\r\n            ? (action &&\r\n                renderStatus(\r\n                  \"Your profile identity is still syncing. Refresh before you \" +\r\n                    action +\r\n                    \".\",\r\n                ),\r\n              claim(\"active-author-identity:mismatch-blocked\", {\r\n                action: action || \"\",\r\n                profileKey:\r\n                  (state.profile &&\r\n                    (state.profile.profileKey || state.profile.handle)) ||\r\n                  \"\",\r\n                customerProfileKey: customerProfileKeyValue(),\r\n              }),\r\n              null)\r\n            : !hasCustomer() || !setup || !actor || invalidKey\r\n              ? (action &&\r\n                  renderStatus(\r\n                    \"Your profile identity is still syncing. Refresh or log in again before you \" +\r\n                      action +\r\n                      \".\",\r\n                  ),\r\n                claim(\"active-author-identity:blocked\", {\r\n                  action: action || \"\",\r\n                  hasCustomer: hasCustomer(),\r\n                  setupComplete: setup,\r\n                  actorUidPresent: !!actor,\r\n                  profileKeyPresent: !!key,\r\n                }),\r\n                null)\r\n              : {\r\n                  uid: actor,\r\n                  profileKey: key,\r\n                  displayName: activeDisplayNameValue() || key,\r\n                  avatarMediaId: canonicalProfileAvatarMediaId(\r\n                    authorProfile || state.profile || {},\r\n                  ),\r\n                })\r\n    );\r\n  }\r\n  function shopifyDisplayProfileKey(c) {\r\n    return (\r\n      (c = c || customer() || {}),\r\n      nonPlaceholderProfileKey(\r\n        c.profileKey || c.handle || c.displayName || c.name || \"\",\r\n      )\r\n    );\r\n  }\r\n  function displayName() {\r\n    var c = customer();\r\n    return (\r\n      (state.profile && state.profile.displayName) ||\r\n      (c && (c.name || c.displayName || \"DSD member\")) ||\r\n      \"DSD member\"\r\n    );\r\n  }\r\n  function isCanonicalFounder() {\r\n    return canonicalRoleActive(\"founder\");\r\n  }\r\n  function roleText(value) {\r\n    return String(value == null ? \"\" : value)\r\n      .trim()\r\n      .toLowerCase()\r\n      .replace(/[^a-z0-9_:-]+/g, \"_\");\r\n  }\r\n  function collectRoleSources() {\r\n    var p = state.profile || {},\r\n      c = customer() || {},\r\n      token = tokenClaims(),\r\n      entitlement = state.supabaseEntitlement || {};\r\n    return [\r\n      c,\r\n      c.platformRole,\r\n      c.roles,\r\n      c.permissions,\r\n      c.membership,\r\n      token,\r\n      token.roles,\r\n      token.permissions,\r\n      token.platformRoles,\r\n      p,\r\n      p.roles,\r\n      p.permissions,\r\n      p.platformRoles,\r\n      p.governanceClaims,\r\n      entitlement,\r\n      entitlement.roles,\r\n      entitlement.permissions,\r\n    ].filter(Boolean);\r\n  }\r\n  function objectHasRole(source, role) {\r\n    if (!source) return !1;\r\n    var wanted = roleText(role);\r\n    if (Array.isArray(source))\r\n      return (\r\n        source.map(roleText).indexOf(wanted) !== -1 ||\r\n        source.map(roleText).indexOf(\"role_\" + wanted) !== -1\r\n      );\r\n    if (typeof source != \"object\") return roleText(source) === wanted;\r\n    for (\r\n      var keys = [\r\n          wanted,\r\n          \"role_\" + wanted,\r\n          \"role\" + wanted.charAt(0).toUpperCase() + wanted.slice(1),\r\n          \"is_\" + wanted,\r\n          \"is\" + wanted.charAt(0).toUpperCase() + wanted.slice(1),\r\n          wanted + \"_access\",\r\n          wanted + \"Access\",\r\n        ],\r\n        i = 0;\r\n      i < keys.length;\r\n      i++\r\n    )\r\n      if (source[keys[i]] === !0 || source[keys[i]] === wanted) return !0;\r\n    return (\r\n      roleText(source.role) === wanted ||\r\n      roleText(source.accountRole) === wanted ||\r\n      roleText(source.platformRole) === wanted ||\r\n      roleText(source.governanceRole) === wanted\r\n    );\r\n  }\r\n  function canonicalRoleActive(role) {\r\n    return collectRoleSources().some(function (source) {\r\n      return objectHasRole(source, role);\r\n    });\r\n  }\r\n  function roles() {\r\n    var out = hasCustomer() ? [\"user\"] : [\"public\"];\r\n    return (\r\n      canonicalRoleActive(\"founder\") && out.push(\"founder\"),\r\n      canonicalRoleActive(\"moderator\") && out.push(\"moderator\"),\r\n      canonicalRoleActive(\"admin\") && out.push(\"admin\"),\r\n      canonicalRoleActive(\"tester\") && out.push(\"tester\"),\r\n      (canonicalRoleActive(\"dsd_plus\") || deriveMembership().active === !0) &&\r\n        out.push(\"dsd_plus\"),\r\n      out\r\n    );\r\n  }\r\n  function canModerate() {\r\n    var r = roles();\r\n    return (\r\n      r.indexOf(\"founder\") !== -1 ||\r\n      r.indexOf(\"moderator\") !== -1 ||\r\n      r.indexOf(\"admin\") !== -1\r\n    );\r\n  }\r\n  function isFounderRole() {\r\n    return roles().indexOf(\"founder\") !== -1;\r\n  }\r\n  function resolveViewerState(targetContext) {\r\n    var r = roles(),\r\n      membership = deriveMembership(),\r\n      restriction = accountRestrictionState(),\r\n      authenticated = hasCustomer(),\r\n      suspended =\r\n        restriction === \"suspended\" ||\r\n        restriction === \"disabled\" ||\r\n        restriction === \"deleted\";\r\n    return {\r\n      authenticated: authenticated,\r\n      viewerType: authenticated\r\n        ? membership.active\r\n          ? \"dsd_plus_member\"\r\n          : \"logged_in_user\"\r\n        : \"public_no_cookie\",\r\n      uid: actorUid(),\r\n      profileKey: profileKey(),\r\n      displayName: displayName(),\r\n      roles: r.slice(),\r\n      membership: membership,\r\n      targetContext: targetContext || null,\r\n      accountRestriction: restriction,\r\n      permissions: {\r\n        canModerate: canModerate(),\r\n        canAccessFounderOperations:\r\n          r.indexOf(\"founder\") !== -1 || r.indexOf(\"admin\") !== -1,\r\n        canAccessModeration: canModerate(),\r\n        canAccessSafetyCenter: authenticated && !suspended,\r\n        canAccessAIC: r.indexOf(\"founder\") !== -1 || r.indexOf(\"admin\") !== -1,\r\n        canCreatePost: canUseSocialActions(),\r\n        canCreateStory: canUseSocialActions(),\r\n        canSendMessage: canUseSocialActions(),\r\n        canViewDsdPlus: hasDsdPlus(),\r\n        canViewAdult: isAdultAllowed(),\r\n      },\r\n    };\r\n  }\r\n  function canAccessAIC() {\r\n    return resolveViewerState().permissions.canAccessAIC;\r\n  }\r\n  function canCreatePost() {\r\n    return resolveViewerState().permissions.canCreatePost;\r\n  }\r\n  function canCreateStory() {\r\n    return resolveViewerState().permissions.canCreateStory;\r\n  }\r\n  function canSendMessage() {\r\n    return resolveViewerState().permissions.canSendMessage;\r\n  }\r\n  function canViewContent(record) {\r\n    return (\r\n      publicRecordVisible(record) &&\r\n      canViewClassified(record) &&\r\n      canViewPrivateRecord(record)\r\n    );\r\n  }\r\n  function canViewMedia(record) {\r\n    return canViewContent(record || {});\r\n  }\r\n  function reviewStateForAuthor() {\r\n    return {\r\n      status: \"approved\",\r\n      moderation: {\r\n        state: \"approved\",\r\n        gate: isFounderRole() ? \"founder-auto-publish\" : \"launch-auto-publish\",\r\n        reportCount: 0,\r\n        reviewedBy: actorUid(),\r\n        selfReviewed: isFounderRole(),\r\n        lastActionAt: serverTimestamp(),\r\n      },\r\n    };\r\n  }\r\n  function autoPublishPayload() {\r\n    return {\r\n      status: \"approved\",\r\n      moderation: {\r\n        state: \"approved\",\r\n        gate: isFounderRole() ? \"founder-auto-publish\" : \"launch-auto-publish\",\r\n        reportCount: 0,\r\n        reviewedBy: actorUid(),\r\n        selfReviewed: !0,\r\n        lastActionAt: serverTimestamp(),\r\n      },\r\n      entity: { moderationStatus: \"approved\" },\r\n      launchAutoPublishedAt: serverTimestamp(),\r\n    };\r\n  }\r\n  function recordState(record) {\r\n    return String(\r\n      (record &&\r\n        (record.status ||\r\n          record.state ||\r\n          (record.moderation && record.moderation.state) ||\r\n          (record.entity && record.entity.moderationStatus))) ||\r\n        \"\",\r\n    ).toLowerCase();\r\n  }\r\n  function shouldAutoPublishLaunchRecord(record, ownerField) {\r\n    if (!record) return !1;\r\n    var recordProfileKey = clean(\r\n        record.authorProfileKey ||\r\n          record.ownerProfileKey ||\r\n          record.profileKey ||\r\n          \"\",\r\n        \"\",\r\n      ),\r\n      ownedByCurrentProfile =\r\n        identityMatchesCurrent(record[ownerField], recordProfileKey) ||\r\n        recordOwnedByCurrentProfile(record);\r\n    if (!ownedByCurrentProfile && !canModerate()) return !1;\r\n    var stateValue = recordState(record);\r\n    return (\r\n      [\r\n        \"approved\",\r\n        \"deleted\",\r\n        \"rejected\",\r\n        \"blocked\",\r\n        \"hidden\",\r\n        \"archived\",\r\n        \"removed\",\r\n        \"disabled\",\r\n        \"expired\",\r\n      ].indexOf(stateValue) === -1\r\n    );\r\n  }\r\n  function autoPublishLaunchRecords(surface, items) {\r\n    if (!(!items || !items.length)) {\r\n      var ownerField = surface === \"story\" ? \"ownerUid\" : \"authorUid\",\r\n        idField = surface === \"story\" ? \"storyId\" : \"postId\",\r\n        root = surface === \"story\" ? \"stories\" : \"posts\";\r\n      (items || []).forEach(function (record) {\r\n        if (shouldAutoPublishLaunchRecord(record, ownerField)) {\r\n          var id = record[idField] || record.id || \"\";\r\n          if (!(!id || state.launchAutoPublishClaims[root + \"/\" + id])) {\r\n            var payload = autoPublishPayload();\r\n            ((payload.visibility = normalizeVisibility(\r\n              record.visibility ||\r\n                (record.entity && record.entity.visibility) ||\r\n                \"public\",\r\n            )),\r\n              (payload.contentRating = normalizeContentRating(\r\n                record.contentRating ||\r\n                  (record.entity && record.entity.contentRating) ||\r\n                  \"standard\",\r\n              )),\r\n              (payload.accessGate = normalizeAccessGate(\r\n                record.accessGate ||\r\n                  (record.entity && record.entity.accessGate) ||\r\n                  \"\",\r\n              )),\r\n              (payload.entity = Object.assign({}, payload.entity || {}, {\r\n                visibility: payload.visibility,\r\n                contentRating: payload.contentRating,\r\n                accessGate: payload.accessGate,\r\n              })),\r\n              (state.launchAutoPublishClaims[root + \"/\" + id] = now()),\r\n              surface === \"post\" && saveLocalPostStateOverride(id, payload),\r\n              setDoc(root + \"/\" + id, payload, !0)\r\n                .then(function () {\r\n                  return surface === \"story\"\r\n                    ? skipLegacyUserStoryShadow(id)\r\n                    : null;\r\n                })\r\n                .then(function () {\r\n                  return setDoc(\r\n                    \"moderationQueue/\" + id,\r\n                    {\r\n                      state: \"approved\",\r\n                      reviewedBy: uid(),\r\n                      reviewedAt: serverTimestamp(),\r\n                      selfReviewed: !0,\r\n                    },\r\n                    !0,\r\n                  ).catch(function () {\r\n                    return null;\r\n                  });\r\n                })\r\n                .then(function () {\r\n                  return addDoc(\"founderAudit\", {\r\n                    action: surface + \".launchAutoPublished\",\r\n                    actorUid: uid(),\r\n                    sourcePath: root + \"/\" + id,\r\n                    firestorePath: PATHS.founderAudit,\r\n                    selfReviewed: !0,\r\n                  }).catch(function () {\r\n                    return null;\r\n                  });\r\n                })\r\n                .catch(function (error) {\r\n                  (queueDraft(\r\n                    surface + \"-launch-auto-publish\",\r\n                    { id: id, sourcePath: root + \"/\" + id },\r\n                    error,\r\n                  ),\r\n                    delete state.launchAutoPublishClaims[root + \"/\" + id]);\r\n                }));\r\n          }\r\n        }\r\n      });\r\n    }\r\n  }\r\n  function skipLegacyUserStoryShadow(storyId) {\r\n    return (\r\n      claim(\"legacy-user-story-shadow:deconstructed\", {\r\n        storyId: storyId || \"\",\r\n        canonical: \"stories\",\r\n        reason: \"canonical-supabase-story-row-is-owner\",\r\n      }),\r\n      Promise.resolve(null)\r\n    );\r\n  }\r\n  function submitModerationQueueViaProxy(payload) {\r\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/moderation-queue\", {\r\n      method: \"POST\",\r\n      credentials: \"include\",\r\n      headers: {\r\n        \"Content-Type\": \"application/json\",\r\n        Accept: \"application/json\",\r\n      },\r\n      body: JSON.stringify(payload || {}),\r\n    }).then(function (response) {\r\n      return response.text().then(function (text) {\r\n        var body = {};\r\n        try {\r\n          body = text ? JSON.parse(text) : {};\r\n        } catch (e) {\r\n          body = { raw: text };\r\n        }\r\n        if (!response.ok || body.ok === !1) {\r\n          var error = new Error(\r\n            (body && (body.message || body.error)) ||\r\n              \"moderation queue submit failed: \" + response.status,\r\n          );\r\n          throw ((error.status = response.status), (error.body = body), error);\r\n        }\r\n        return body;\r\n      });\r\n    });\r\n  }\r\n  function saveProfileViaProxy(payload) {\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/profile-save\", {\r\n      method: \"POST\",\r\n      credentials: \"include\",\r\n      headers: {\r\n        \"Content-Type\": \"application/json\",\r\n        Accept: \"application/json\",\r\n      },\r\n      body: JSON.stringify(payload || {}),\r\n    }).then(function (response) {\r\n      return response.text().then(function (text) {\r\n        var body = {};\r\n        try {\r\n          body = text ? JSON.parse(text) : {};\r\n        } catch (e) {\r\n          body = { raw: text };\r\n        }\r\n        if (!response.ok || body.ok === !1) {\r\n          var error = new Error(\r\n            (body && (body.message || body.error)) ||\r\n              \"profile save failed: \" + response.status,\r\n          );\r\n          throw ((error.status = response.status), (error.body = body), error);\r\n        }\r\n        invalidateOwnerPrivateProfileRead(\r\n          payload && (payload.profileKey || payload.profile_key || payload.handle),\r\n        );\r\n        invalidateProfileReadPromise(\r\n          payload && (payload.profileKey || payload.profile_key || payload.handle),\r\n        );\r\n        return body;\r\n      });\r\n    });\r\n  }\r\n  function saveMediaManifestViaProxy(manifest) {\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/media-manifest\", {\r\n      method: \"POST\",\r\n      credentials: \"include\",\r\n      headers: {\r\n        \"Content-Type\": \"application/json\",\r\n        Accept: \"application/json\",\r\n      },\r\n      body: JSON.stringify({ manifest: manifest || {} }),\r\n    }).then(function (response) {\r\n      return response.text().then(function (text) {\r\n        var body = {};\r\n        try {\r\n          body = text ? JSON.parse(text) : {};\r\n        } catch (e) {\r\n          body = { raw: text };\r\n        }\r\n        if (!response.ok || body.ok === !1) {\r\n          var error = new Error(\r\n            (body && (body.message || body.error)) ||\r\n              \"media manifest save failed: \" + response.status,\r\n          );\r\n          throw ((error.status = response.status), (error.body = body), error);\r\n        }\r\n        return body && (body.media || body);\n      });\n    });\n  }\n  function albumProxyRequest(method, payload, query) {\n    var params = [],\n      requestPayload = Object.assign({}, payload || {}),\r\n      controller = window.AbortController ? new AbortController() : null,\n      timeoutId = controller\n        ? window.setTimeout(function () {\n            controller.abort();\n          }, 15000)\n        : 0;\n    Object.keys(query || {}).forEach(function (key) {\n      if (query[key] != null && query[key] !== \"\")\n        params.push(encodeURIComponent(key) + \"=\" + encodeURIComponent(query[key]));\n    });\n    if (method === \"POST\" && !requestPayload.idempotencyKey)\r\n      requestPayload.idempotencyKey =\r\n        \"album:\" +\r\n        String(requestPayload.action || \"mutation\") +\r\n        \":\" +\r\n        Date.now() +\r\n        \":\" +\r\n        Math.random().toString(36).slice(2, 12);\r\n    return fetch(\n      \"/apps/dsd-firebase-custom-token/supabase/albums\" +\n        (params.length ? \"?\" + params.join(\"&\") : \"\"),\n      {\n        method: method || \"GET\",\n        credentials: \"include\",\n        headers: { \"Content-Type\": \"application/json\", Accept: \"application/json\" },\n        signal: controller ? controller.signal : void 0,\n        body: method === \"POST\" ? JSON.stringify(requestPayload) : void 0,\r\n      },\n    ).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try { body = text ? JSON.parse(text) : {}; } catch (e) { body = {}; }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error(\n            (body && (body.message || body.error)) ||\n              \"Album request failed: \" + response.status,\n          );\n          throw ((error.status = response.status), (error.body = body), error);\n        }\n        return body;\n      });\n    }).catch(function (error) {\n      if (error && error.name === \"AbortError\")\n        throw new Error(\"Album request timed out. Try again.\");\n      throw error;\n    }).finally(function () {\n      timeoutId && window.clearTimeout(timeoutId);\n    });\n  }\n  function readProfilePolicyViaProxy() {\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/profile-policy\", {\n      method: \"GET\",\n      credentials: \"include\",\n      headers: { Accept: \"application/json\" },\n    }).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try {\n          body = text ? JSON.parse(text) : {};\n        } catch (e) {\n          body = {};\n        }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error(\n            (body && (body.message || body.error)) ||\n              \"Profile policy settings are unavailable.\",\n          );\n          throw ((error.status = response.status), (error.body = body), error);\n        }\n        return body;\n      });\n    });\n  }\n  function loadProfilePolicyState(force) {\n    if (!hasCustomer()) return Promise.resolve(null);\n    if (!force && state.profilePolicyState) return Promise.resolve(state.profilePolicyState);\n    if (state.profilePolicyRequest) return state.profilePolicyRequest;\n    state.profilePolicyRequest = readProfilePolicyViaProxy()\n      .then(function (body) {\n        state.profilePolicyState = body || {};\n        if (body && body.profile) {\r\n          var ownerProfile = normalizeSupabaseProfileRecord(\r\n            body.profile,\r\n            activeOwnerProfileKey() || customerProfileKeyValue() || profileKey(),\r\n          );\r\n          if (ownerProfile) {\r\n            cacheOwnerPrivateProfileCapabilities(ownerProfile);\r\n            state.profile =\r\n              profileWithPublicMirror(\r\n                mergePrivateProfileCapabilities(state.profile || {}, ownerProfile),\r\n              ) || ownerProfile;\r\n            qs(\"[data-dsd-user-profile]\") && renderProfileIdentity();\r\n          }\r\n        }\r\n        return state.profilePolicyState;\n      })\n      .catch(function (error) {\n        claim(\"profile-policy:load-failed\", {\n          error: (error && error.message) || String(error),\n        });\n        return null;\n      })\n      .finally(function () {\n        state.profilePolicyRequest = null;\n      });\n    return state.profilePolicyRequest;\n  }\n  function transitionProfileVisibilityViaProxy(visibility) {\n    var key = activeOwnerProfileKey() || profileKey(),\n      handle =\n        (state.profile && (state.profile.handle || state.profile.profileKey)) ||\n        key;\n    return saveProfileViaProxy({\n      action: \"transition_visibility\",\n      profileKey: key,\n      handle: handle,\n      visibility: visibility,\n      idempotencyKey:\n        \"profile-visibility:\" + visibility + \":\" + Date.now().toString(36),\n    });\n  }\n  function readMediaProcessingStatusViaProxy(manifest) {\n    var mediaId =\n      manifest.supabaseMediaId ||\n      manifest.canonicalMediaId ||\n      manifest.mediaObjectId ||\n      manifest.mediaId ||\n      \"\";\n    if (!mediaId) return Promise.reject(new Error(\"Media processing ID is unavailable.\"));\n    return fetch(\n      \"/apps/dsd-firebase-custom-token/supabase/media-processing-status?mediaId=\" +\n        encodeURIComponent(mediaId),\n      { method: \"GET\", credentials: \"include\", headers: { Accept: \"application/json\" } },\n    ).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try {\n          body = text ? JSON.parse(text) : {};\n        } catch (e) {\n          body = { raw: text };\n        }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error(\n            (body && (body.message || body.error)) ||\n              \"Media processing status failed: \" + response.status,\n          );\n          throw ((error.status = response.status), (error.body = body), error);\n        }\n        return body && (body.media || body);\n      });\n    });\n  }\n  function waitForMediaProcessingReady(manifest) {\n    if (manifest.processingStatus === \"ready\") return Promise.resolve(manifest);\n    var startedAt = Date.now(),\n      // Cloud Tasks permits the canonical processor up to 30 minutes. The old\n      // 12-minute browser deadline abandoned valid large-video jobs mid-run.\n      deadline = startedAt + 32 * 60 * 1000,\n      attempt = 0;\n    manifest.processingRecoveryAttempted = !0;\n    renderStatus(\"Processing video. Large files can take up to 30 minutes; keep this page open.\");\n    function check() {\n      var delay =\n        attempt === 0\n          ? 5000\n          : attempt === 1\n            ? 10000\n            : attempt === 2\n              ? 15000\n              : attempt < 6\n                ? 20000\n                : 30000;\n      attempt += 1;\n      return new Promise(function (resolve) {\n        window.setTimeout(resolve, delay);\n      })\n        .then(function () {\n          return readMediaProcessingStatusViaProxy(manifest);\n        })\n        .then(function (status) {\n          applyCanonicalMediaId(manifest, status);\n          if (manifest.processingStatus === \"ready\") return manifest;\n          if (manifest.processingStatus === \"failed\") {\n            var failed = new Error(\n              (status && status.processingError) ||\n                \"Video processing failed. No content was published.\",\n            );\n            failed.dsdMediaProcessingFailed = !0;\n            throw failed;\n          }\n          if (Date.now() < deadline) {\n            renderStatus(\"Processing video. Large files can take up to 30 minutes; keep this page open.\");\n            return check();\n          }\n          var timeout = new Error(\n            \"Video processing did not finish within 32 minutes. No content was published; retry once before selecting the file again.\",\n          );\n          timeout.dsdMediaProcessingPending = !0;\n          throw timeout;\n        });\n    }\n    return check();\n  }\n  function publishCommentViaProxy(payload) {\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/comment-publish\", {\n      method: \"POST\",\n      credentials: \"include\",\n      headers: { \"Content-Type\": \"application/json\", Accept: \"application/json\" },\n      body: JSON.stringify(payload || {}),\n    }).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try {\n          body = text ? JSON.parse(text) : {};\n        } catch (e) {\n          body = {};\n        }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error((body && body.error) || \"comment publication failed: \" + response.status);\n          throw ((error.status = response.status), error);\n        }\n        return body.publication || body;\n      });\n    });\n  }\n  function commentInteractionViaProxy(payload) {\n    return fetch(\n      \"/apps/dsd-firebase-custom-token/supabase/comment-interactions\",\n      {\n        method: \"POST\",\n        credentials: \"include\",\n        headers: { \"Content-Type\": \"application/json\", Accept: \"application/json\" },\n        body: JSON.stringify(payload || {}),\n      },\n    ).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try {\n          body = text ? JSON.parse(text) : {};\n        } catch (e) {\n          body = {};\n        }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error(\n            (body && body.error) || \"comment interaction failed: \" + response.status,\n          );\n          throw ((error.status = response.status), error);\n        }\n        return body;\n      });\n    });\n  }\n  function unsafeProvisioningProfileIdentity(value) {\n    value = clean(value || \"\", \"\");\n    return !!(\n      !value ||\n      /^(?:member|shopify)[-_]/i.test(value) ||\n      /^(?:dsd\\s+)?(?:member|profile|user)$/i.test(value) ||\n      /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(\n        value,\n      ) ||\n      /^\\d{10,18}$/.test(value) ||\n      looksLikeRawEmail(value)\n    );\n  }\n  function connectionPresenceRequest(method, payload, options) {\n    options = options || {};\n    var targetKey = method === \"GET\" ? normalizedProfileKeyValue(options.targetProfileKey || queryParam(\"profile\") || \"\") : \"\",\n      query = [],\n      mode = [\"shuffle\", \"connections\", \"pulse\"].indexOf(options.mode) !== -1 ? options.mode : \"radar\";\n    targetKey && query.push(\"profile=\" + encodeURIComponent(targetKey));\n    if (method === \"GET\" && Array.isArray(options.targetKeys)) {\n      var targetKeys = options.targetKeys\n        .map(normalizedProfileKeyValue)\n        .filter(Boolean)\n        .filter(function (value, index, values) {\n          return values.indexOf(value) === index;\n        })\n        .slice(0, 24);\n      targetKeys.length &&\n        query.push(\"targets=\" + encodeURIComponent(targetKeys.join(\",\")));\n    }\n    method === \"GET\" &&\n      options.distanceOnly === !0 &&\n      query.push(\"distanceOnly=1\");\n    method === \"GET\" && query.push(\"surface=\" + (options.surface === \"profile\" ? \"profile\" : (qsa(\"[data-dsd-connection-radar]\").length ? \"discovery\" : \"profile\")));\n    method === \"GET\" && query.push(\"mode=\" + encodeURIComponent(mode));\n    method === \"GET\" && options.includePulse === !1 && query.push(\"includePulse=0\");\n    var url = \"/apps/dsd-firebase-custom-token/supabase/connection-presence\" +\n      (query.length ? \"?\" + query.join(\"&\") : \"\");\n    return fetch(url, {\n      method: method || \"GET\",\n      credentials: \"include\",\n      headers: { \"Content-Type\": \"application/json\", Accept: \"application/json\" },\n      body: method === \"POST\" ? JSON.stringify(payload || {}) : void 0,\n    }).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try { body = text ? JSON.parse(text) : {}; } catch (e) { body = { raw: text }; }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error((body && (body.message || body.error)) || \"connection preferences unavailable\");\n          throw ((error.status = response.status), (error.body = body), error);\n        }\n        return body;\n      });\n    });\n  }\n  function connectionSignalMutationRequest(payload) {\n    return new Promise(function (resolve, reject) {\n      var settled = false,\n        reconcileStarted = false,\n        reconciliationTimeout = null,\n        finish = function (callback, value) {\n          if (settled) return;\n          settled = true;\n          clearTimeout(reconciliationTimeout);\n          callback(value);\n        },\n        postRequest = connectionPresenceRequest(\"POST\", payload);\n      postRequest.then(function (body) {\n        finish(resolve, body);\n      }).catch(function (error) {\n        finish(reject, error);\n      });\n      reconciliationTimeout = setTimeout(function () {\n        if (settled || reconcileStarted) return;\n        reconcileStarted = true;\n        var readSettled = false,\n          readTimeout = setTimeout(function () {\n            if (readSettled || settled) return;\n            readSettled = true;\n            finish(reject, new Error(\"Connection signal confirmation timed out.\"));\n          }, 5000);\n        connectionPresenceRequest(\"GET\", null, {\n          targetProfileKey: payload.targetProfileKey,\n          surface: \"profile\",\n          mode: state.connectionDiscoveryMode,\n          includePulse: false\n        }).then(function (body) {\n          if (readSettled || settled) return;\n          readSettled = true;\n          clearTimeout(readTimeout);\n          var summary = body && body.viewedProfile,\n            field = payload.signalType === \"wave\" ? \"waveSent\" : \"interestedSent\";\n          if (summary && summary[field] === (payload.active === true)) {\n            finish(resolve, {\n              ok: true,\n              reconciled: true,\n              canonical: \"supabase-connection-signal-read-after-write\",\n              mutation: { mutualHeat: summary.mutualHeat === true }\n            });\n            return;\n          }\n          finish(reject, new Error(\"Connection signal was not confirmed by the canonical profile summary.\"));\n        }).catch(function (error) {\n          if (readSettled || settled) return;\n          readSettled = true;\n          clearTimeout(readTimeout);\n          finish(reject, error);\n        });\n      }, 6000);\n    });\n  }\n\n  function publishPostViaProxy(payload) {\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/post-publish\", {\n      method: \"POST\",\n      credentials: \"include\",\n      headers: { \"Content-Type\": \"application/json\", Accept: \"application/json\" },\n      body: JSON.stringify(payload || {}),\n    }).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try {\n          body = text ? JSON.parse(text) : {};\n        } catch (e) {\n          body = {};\n        }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error((body && body.error) || \"post publication failed: \" + response.status);\n          throw ((error.status = response.status), error);\n        }\n        return body.publication || body;\n      });\n    });\n  }\n\r\n  function verifyOriginalsReferenceCapability() {\r\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/post-publish?capability=originals-reference-v1\", {\r\n      method: \"GET\",\r\n      credentials: \"include\",\r\n      headers: { Accept: \"application/json\" },\r\n    }).then(function (response) {\r\n      if (!response.ok) throw new Error(\"Originals sharing is not available yet. No post was created.\");\r\n      return response.json();\r\n    }).then(function (body) {\r\n      if (!body || body.originalsReferenceVersion !== 1) throw new Error(\"Originals sharing is not available yet. No post was created.\");\r\n    });\r\n  }\r\n\n  function postOwnerMutationViaProxy(payload) {\n    return fetch(\n      \"/apps/dsd-firebase-custom-token/supabase/post-owner-mutation\",\n      {\n        method: \"POST\",\n        credentials: \"include\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n          Accept: \"application/json\",\n        },\n        body: JSON.stringify(payload || {}),\n      },\n    ).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try {\n          body = text ? JSON.parse(text) : {};\n        } catch (e) {\n          body = {};\n        }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error(\n            (body && body.error) ||\n              \"owner Post mutation failed: \" + response.status,\n          );\n          throw ((error.status = response.status), error);\n        }\n        return body;\n      });\n    });\n  }\n\n  function storyOwnerDeleteViaProxy(payload) {\n    return fetch(\n      \"/apps/dsd-firebase-custom-token/supabase/story-owner-delete\",\n      {\n        method: \"POST\",\n        credentials: \"include\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n          Accept: \"application/json\",\n        },\n        body: JSON.stringify(payload || {}),\n      },\n    ).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try {\n          body = text ? JSON.parse(text) : {};\n        } catch (e) {\n          body = {};\n        }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error(\n            (body && body.error) ||\n              \"owner Story delete failed: \" + response.status,\n          );\n          throw ((error.status = response.status), error);\n        }\n        return body;\n      });\n    });\n  }\n\nfunction publishStoryViaProxy(payload) {\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/story-publish\", {\n      method: \"POST\",\n      credentials: \"include\",\n      headers: { \"Content-Type\": \"application/json\", Accept: \"application/json\" },\n      body: JSON.stringify(payload || {}),\n    }).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try {\n          body = text ? JSON.parse(text) : {};\n        } catch (e) {\n          body = {};\n        }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error((body && body.error) || \"story publication failed: \" + response.status);\n          throw ((error.status = response.status), error);\n        }\n        return body.publication || body;\n      });\n    });\n  }\n\nfunction sendMessageViaProxy(payload) {\r\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/message-send\", {\r\n      method: \"POST\",\r\n      credentials: \"include\",\r\n      headers: {\r\n        \"Content-Type\": \"application/json\",\r\n        Accept: \"application/json\",\r\n      },\r\n      body: JSON.stringify(payload || {}),\r\n    }).then(function (response) {\r\n      return response.text().then(function (text) {\r\n        var body = {};\r\n        try {\r\n          body = text ? JSON.parse(text) : {};\r\n        } catch (e) {\r\n          body = { raw: text };\r\n        }\r\n        if (!response.ok || body.ok === !1) {\r\n          var error = new Error(\r\n            (body && (body.message || body.error)) ||\r\n              \"message send failed: \" + response.status,\r\n          );\r\n          throw ((error.status = response.status), (error.body = body), error);\r\n        }\r\n        return body;\r\n      });\r\n    });\r\n  }\r\n  function readMessageThreadViaProxy(payload) {\r\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/message-thread\", {\r\n      method: \"POST\",\r\n      credentials: \"include\",\r\n      headers: {\r\n        \"Content-Type\": \"application/json\",\r\n        Accept: \"application/json\",\r\n      },\r\n      body: JSON.stringify(payload || {}),\r\n    }).then(function (response) {\r\n      return response.text().then(function (text) {\r\n        var body = {};\r\n        try {\r\n          body = text ? JSON.parse(text) : {};\r\n        } catch (e) {\r\n          body = { raw: text };\r\n        }\r\n        if (!response.ok || body.ok === !1) {\r\n          var error = new Error(\r\n            (body && (body.message || body.error)) ||\r\n              \"message thread failed: \" + response.status,\r\n          );\r\n          throw ((error.status = response.status), (error.body = body), error);\r\n        }\r\n        return body;\r\n      });\r\n    });\r\n  }\r\n  function premiumMessageActionViaProxy(payload) {\r\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/message-premium\", {\r\n      method: \"POST\",\r\n      credentials: \"include\",\r\n      headers: {\r\n        \"Content-Type\": \"application/json\",\r\n        Accept: \"application/json\",\r\n      },\r\n      body: JSON.stringify(payload || {}),\r\n    }).then(function (response) {\r\n      return response.text().then(function (text) {\r\n        var body = {};\r\n        try {\r\n          body = text ? JSON.parse(text) : {};\r\n        } catch (e) {\r\n          body = { raw: text };\r\n        }\r\n        if (!response.ok || body.ok === !1) {\r\n          var error = new Error(\r\n            (body && (body.message || body.error)) ||\r\n              \"message premium action failed: \" + response.status,\r\n          );\r\n          throw ((error.status = response.status), (error.body = body), error);\r\n        }\r\n        return body;\r\n      });\r\n    });\r\n  }\r\n  function markMessageViewOnceOpenedViaProxy(payload) {\r\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/message-premium\", {\r\n      method: \"POST\",\r\n      credentials: \"include\",\r\n      headers: {\r\n        \"Content-Type\": \"application/json\",\r\n        Accept: \"application/json\",\r\n      },\r\n      body: JSON.stringify(\r\n        Object.assign({ action: \"open_view_once\" }, payload || {}),\r\n      ),\r\n    }).then(function (response) {\r\n      return response.text().then(function (text) {\r\n        var body = {};\r\n        try {\r\n          body = text ? JSON.parse(text) : {};\r\n        } catch (e) {\r\n          body = { raw: text };\r\n        }\r\n        if (!response.ok || body.ok === !1) {\r\n          var error = new Error(\r\n            (body && (body.message || body.error)) ||\r\n              \"message view-once open failed: \" + response.status,\r\n          );\r\n          throw ((error.status = response.status), (error.body = body), error);\r\n        }\r\n        return body;\r\n      });\r\n    });\r\n  }\r\n  function submitSafetyReportViaProxy(payload) {\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/safety-report\", {\r\n      method: \"POST\",\r\n      credentials: \"include\",\r\n      headers: {\r\n        \"Content-Type\": \"application/json\",\r\n        Accept: \"application/json\",\r\n      },\r\n      body: JSON.stringify(payload || {}),\r\n    }).then(function (response) {\r\n      return response.text().then(function (text) {\r\n        var body = {};\r\n        try {\r\n          body = text ? JSON.parse(text) : {};\r\n        } catch (e) {\r\n          body = { raw: text };\r\n        }\r\n        if (!response.ok || body.ok === !1) {\r\n          var error = new Error(\r\n            (body && (body.message || body.error)) ||\r\n              \"safety report submit failed: \" + response.status,\r\n          );\r\n          throw ((error.status = response.status), (error.body = body), error);\r\n        }\r\n        return body;\r\n      });\r\n    });\r\n  }\r\n  function readModerationAuditViaProxy() {\r\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/moderation-audit\", {\r\n      method: \"GET\",\r\n      credentials: \"include\",\r\n      headers: { Accept: \"application/json\" },\r\n    }).then(function (response) {\r\n      return response.text().then(function (text) {\r\n        var body = {};\r\n        try {\r\n          body = text ? JSON.parse(text) : {};\r\n        } catch (e) {\r\n          body = { raw: text };\r\n        }\r\n        if (!response.ok || body.ok === !1) {\r\n          var error = new Error(\r\n            (body && (body.message || body.error)) ||\r\n              \"moderation audit read failed: \" + response.status,\r\n          );\r\n          throw ((error.status = response.status), (error.body = body), error);\r\n        }\r\n        return Array.isArray(body.rows) ? body.rows : [];\r\n      });\r\n    });\r\n  }\r\n  function maybeQueueModeration(id, surface, sourcePath, preview) {\r\n    return Promise.resolve(null);\r\n  }\r\n  function submissionStatusLabel(noun) {\r\n    return noun + \" published.\";\r\n  }\r\n  function accountRestrictionState() {\r\n    for (\r\n      var p = state.profile || {},\r\n        candidates = [\r\n          p.accountState,\r\n          p.status,\r\n          p.moderation && p.moderation.state,\r\n          p.founderGovernance && p.founderGovernance.state,\r\n        ],\r\n        i = 0;\r\n      i < candidates.length;\r\n      i++\r\n    ) {\r\n      var value = String(candidates[i] || \"\").toLowerCase();\r\n      if (value === \"suspended\" || value === \"disabled\" || value === \"deleted\")\r\n        return value;\r\n    }\r\n    return \"\";\r\n  }\r\n  function hasAccountRestriction() {\r\n    return !!accountRestrictionState();\r\n  }\r\n  function hasActiveProfile() {\r\n    function mark(result, details2) {\r\n      try {\r\n        ((details2 = details2 || {}),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-active-profile-result\",\r\n            result ? \"true\" : \"false\",\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-active-profile-has-customer\",\r\n            details2.hasCustomer ? \"true\" : \"false\",\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-active-profile-key-present\",\r\n            details2.keyPresent ? \"true\" : \"false\",\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-active-profile-session-key-present\",\r\n            details2.sessionKeyPresent ? \"true\" : \"false\",\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-active-profile-store-scoped\",\r\n            details2.storeScoped ? \"true\" : \"false\",\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-active-profile-private-resolved\",\r\n            details2.privateResolved ? \"true\" : \"false\",\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-active-profile-bridge-checked\",\r\n            state.bridgeChecked ? \"true\" : \"false\",\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-active-profile-reason\",\r\n            details2.reason || \"\",\r\n          ));\r\n      } catch (e) {}\r\n      return result;\r\n    }\r\n    var has = hasCustomer(),\r\n      restricted = hasAccountRestriction();\r\n    if (!has || restricted)\r\n      return mark(!1, {\r\n        hasCustomer: has,\r\n        reason: restricted ? \"restricted\" : \"no-customer\",\r\n      });\r\n    var c = customer() || {},\r\n      key = nonPlaceholderProfileKey(\r\n        activeProfileKeyValue() || profileKey() || customerProfileKeyValue(),\r\n      ),\r\n      storeScoped =\r\n        c.privateIdentityBridgeRequired === !0 ||\r\n        c.storeScopedIdentity === !0 ||\r\n        !!state.sessionProfileKey,\r\n      details = {\r\n        hasCustomer: has,\r\n        keyPresent: !!key,\r\n        sessionKeyPresent: !!state.sessionProfileKey,\r\n        storeScoped: storeScoped,\r\n        privateResolved: privateBridgeCanonicalProfileResolved(),\r\n      };\r\n    if (!key || looksLikeRawEmail(key))\r\n      return mark(!1, Object.assign(details, { reason: \"missing-safe-key\" }));\r\n    if (c.privateIdentityBridgeRequired === !0 || c.storeScopedIdentity === !0)\r\n      return customerProfileKeyValue()\r\n        ? mark(!0, Object.assign(details, { reason: \"store-scoped-key\" }))\r\n        : mark(\r\n            privateBridgeCanonicalProfileResolved(),\r\n            Object.assign(details, { reason: \"private-bridge\" }),\r\n          );\r\n    var activeProfileRecord =\r\n        profileWithPublicMirror(\r\n          state.profile ||\r\n            publicProfileByUid(actorUid()) ||\r\n            publicProfileByKey(key) ||\r\n            {},\r\n        ) || {},\r\n      activeProfileComplete =\r\n        activeProfileRecord.setupComplete === !0 ||\r\n        activeProfileRecord.setup_complete === !0 ||\r\n        String(activeProfileRecord.status || \"\").toLowerCase() === \"active\";\r\n    return activeProfileComplete && actorRelationshipIdentity()\r\n      ? mark(\r\n          !0,\r\n          Object.assign(details, { reason: \"canonical-profile-resolved\" }),\r\n        )\r\n      : mark(\r\n          !state.bridgeChecked ||\r\n            !state.profile ||\r\n            state.profile.setupComplete !== !1,\r\n          Object.assign(details, { reason: \"default\" }),\r\n        );\r\n  }\r\n  function hasResolvedActionProfile() {\r\n    if (!hasCustomer() || hasAccountRestriction()) return !1;\r\n    var key = nonPlaceholderProfileKey(\r\n      activeProfileKeyValue() || profileKey() || customerProfileKeyValue(),\r\n    );\r\n    if (!key || looksLikeRawEmail(key)) return !1;\r\n    var c = customer() || {};\r\n    if (activeAuthorProfileMismatch()) return !1;\r\n    var profile = currentComposerProfile\r\n      ? currentComposerProfile()\r\n      : state.profile || {};\r\n    profile = profileWithPublicMirror(profile || {}) || profile || {};\r\n    var setup =\r\n      profile.setupComplete === !0 ||\r\n      profile.setup_complete === !0 ||\r\n      String(profile.status || \"\").toLowerCase() === \"active\";\r\n    if (\r\n      (!setup && privateBridgeCanonicalProfileResolved() && (setup = !0),\r\n      !setup &&\r\n        (c.privateIdentityBridgeRequired === !0 ||\r\n          c.storeScopedIdentity === !0) &&\r\n        customerProfileKeyValue() &&\r\n        supabaseCutoverReady() &&\r\n        (setup = !0),\r\n      (c.privateIdentityBridgeRequired === !0 ||\r\n        c.storeScopedIdentity === !0) &&\r\n        !customerProfileKeyValue() &&\r\n        !privateBridgeCanonicalProfileResolved())\r\n    )\r\n      return !1;\r\n    var actor = actorUid() || (supabaseCutoverReady() ? key : \"\");\r\n    return !!(setup && actor);\r\n  }\r\n  function canUseSocialActions() {\n    if (\n      state.sessionSetupRequired === !0 ||\n      profileSetupRequiredState(state.profile)\n    )\n      return !1;\n    return !!(hasActiveProfile() || hasResolvedActionProfile());\n  }\n  function submitSetupIssueViaProxy(payload) {\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/setup-support\", {\n      method: \"POST\",\n      credentials: \"include\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n        Accept: \"application/json\",\n      },\n      body: JSON.stringify(payload || {}),\n    }).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try {\n          body = text ? JSON.parse(text) : {};\n        } catch (e) {\n          body = {};\n        }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error(\n            (body && (body.message || body.error)) ||\n              \"setup support submit failed: \" + response.status,\n          );\n          throw ((error.status = response.status), (error.body = body), error);\n        }\n        return body;\n      });\n    });\n  }\n  function tokenClaims() {\r\n    return state.sessionClaims || window.DSDSupabaseSessionClaims || {};\r\n  }\r\n  function customerTags() {\r\n    return [];\r\n  }\r\n  function deriveMembership() {\r\n    var token = tokenClaims(),\r\n      supabaseClaims = window.DSDSupabaseSessionClaims || {},\r\n      serverEntitlement = state.supabaseEntitlement || {},\r\n      shopifyMembership = (customer() && customer().membership) || {},\r\n      tokenActive =\r\n        token.dsd_plus === !0 ||\r\n        token.dsdPlus === !0 ||\r\n        token.membership_active === !0 ||\r\n        token.membershipActive === !0 ||\r\n        token.membership === \"dsd_plus\" ||\r\n        supabaseClaims.dsd_plus === !0 ||\r\n        serverEntitlement.dsdPlus === !0 ||\r\n        shopifyMembership.active === !0 ||\r\n        shopifyMembership.dsdPlus === !0,\r\n      tier = String(\r\n        token.membership_tier ||\r\n          token.membershipTier ||\r\n          token.dsd_plus_tier ||\r\n          supabaseClaims.dsd_plus_tier ||\r\n          serverEntitlement.tier ||\r\n          shopifyMembership.tier ||\r\n          \"\",\r\n      ).trim(),\r\n      membership = {\r\n        active: !!tokenActive,\r\n        tier: tokenActive ? tier : \"\",\r\n        source: tokenActive\r\n          ? serverEntitlement.source ||\r\n            supabaseClaims.entitlement_source ||\r\n            shopifyMembership.source ||\r\n            \"shopify-app-proxy-verified\"\r\n          : \"none\",\r\n      };\r\n    return ((state.membership = membership), membership);\r\n  }\r\n  function saveMembershipCacheIfAvailable() {\r\n    claim(\"membership-cache:firebase-social-state-retired\", {\r\n      owner: \"LaunchSocialActivation.ProfileRenderer\",\r\n      canonical: \"supabase-entitlement-session\",\r\n      source: deriveMembership().source || \"shopify-app-proxy-verified\",\r\n    });\r\n    return Promise.resolve(null);\r\n  }\r\n  function isOver18() {\r\n    var token = tokenClaims(),\r\n      r = roles(),\r\n      profile =\r\n        profileWithPublicMirror(\r\n          state.profile ||\r\n            publicProfileByUid(actorUid()) ||\r\n            publicProfileByKey(activeProfileKeyValue() || profileKey() || \"\") ||\r\n            {},\r\n        ) || {},\r\n      profileAge = Number(profile.age || 0),\r\n      birthdate = profile.birthdate,\r\n      birthYear =\r\n        birthdate && /^\\d{4}-\\d{2}-\\d{2}$/.test(String(birthdate))\r\n          ? Number(String(birthdate).slice(0, 4))\r\n          : 0,\r\n      birthOk = birthYear\r\n        ? Date.now() - new Date(String(birthdate) + \"T00:00:00\").getTime() >=\r\n          567648e6\r\n        : !1,\r\n      profileAdult =\r\n        profile.ageVerified === !0 ||\r\n        profile.over18 === !0 ||\r\n        profileAge >= 18 ||\r\n        birthOk;\r\n    return !!(\r\n      hasCustomer() &&\r\n      (token.age_verified ||\r\n        token.adult_verified ||\r\n        token.over_18 ||\r\n        profileAdult ||\r\n        r.indexOf(\"founder\") !== -1 ||\r\n        r.indexOf(\"moderator\") !== -1)\r\n    );\r\n  }\r\n  function adultContentEnabled() {\r\n    var r = roles();\r\n    if (r.indexOf(\"founder\") !== -1 || r.indexOf(\"moderator\") !== -1) return !0;\r\n    var profile =\r\n      profileWithPublicMirror(\r\n        state.profile ||\r\n          publicProfileByUid(actorUid()) ||\r\n          publicProfileByKey(activeProfileKeyValue() || profileKey() || \"\") ||\r\n          {},\r\n      ) || {};\r\n    return !!(isOver18() && (!profile || profile.adultContentEnabled !== !1));\r\n  }\r\n  function hasDsdPlus() {\r\n    var token = tokenClaims(),\r\n      r = roles(),\r\n      cached = deriveMembership(),\r\n      serverEntitlement = state.supabaseEntitlement || {};\r\n    return !!(\r\n      hasCustomer() &&\r\n      (cached.active === !0 ||\r\n        token.dsd_plus ||\r\n        token.dsdPlus ||\r\n        token.membership === \"dsd_plus\" ||\r\n        token.membership_active === !0 ||\r\n        serverEntitlement.dsdPlus === !0 ||\r\n        r.indexOf(\"dsd_plus\") !== -1)\r\n    );\r\n  }\r\n  function canViewClassified(record) {\r\n    if (\r\n      ((record = record || {}),\r\n      recordOwnedByCurrentProfile(record) || canModerate())\r\n    )\r\n      return !0;\r\n    var rating = String(\r\n        record.contentRating ||\r\n          record.content_rating ||\r\n          (record.entity &&\r\n            (record.entity.contentRating || record.entity.content_rating)) ||\r\n          \"standard\",\r\n      ).toLowerCase(),\r\n      gate = String(\r\n        record.accessGate ||\r\n          record.access_gate ||\r\n          (record.entity &&\r\n            (record.entity.accessGate || record.entity.access_gate)) ||\r\n          \"\",\r\n      ).toLowerCase();\r\n    return gate === \"dsd_plus\" || gate === \"gated\" || rating === \"gated\"\r\n      ? hasDsdPlus()\r\n      : rating === \"explicit\" || rating === \"restricted\"\r\n        ? isOver18() && adultContentEnabled()\r\n        : rating === \"adult\" || rating === \"mature\" || rating === \"sensitive\"\r\n          ? isOver18()\r\n          : !0;\r\n  }\r\n  function currentViewerFollowsProfile(targetUid, targetProfileKey) {\n    return (\r\n      (targetUid = String(targetUid || \"\").trim()),\r\n      (targetProfileKey = clean(targetProfileKey || \"\", \"\").toLowerCase()),\r\n      targetUid && state.followingByUid && state.followingByUid[targetUid]\r\n        ? !0\r\n        : (state.followingRecords || []).some(function (item) {\r\n            if (!item || item.state !== \"active\") return !1;\r\n            var itemUid = String(\r\n              item.targetUid ||\r\n                item.target_user_id ||\r\n                item.ownerUid ||\r\n                item.uid ||\r\n                \"\",\r\n            ).trim();\r\n            if (targetUid && itemUid && itemUid === targetUid) return !0;\r\n            var itemKey = clean(\r\n              item.targetProfileKey ||\r\n                item.target_profile_key ||\r\n                item.ownerProfileKey ||\r\n                item.owner_profile_key ||\r\n                item.profileKey ||\r\n                item.profile_key ||\r\n                (item.entity &&\r\n                  (item.entity.targetProfileKey ||\r\n                    item.entity.target_profile_key)) ||\r\n                \"\",\r\n              \"\",\r\n            ).toLowerCase();\r\n            return !!(\r\n              targetProfileKey &&\r\n              itemKey &&\r\n              itemKey === targetProfileKey\r\n            );\r\n          })\r\n    );\r\n  }\r\n  function canViewPrivateRecord(record) {\r\n    if (!record) return !1;\r\n    if (recordOwnedByCurrentProfile(record) || canModerate()) return !0;\r\n    var visibility = normalizeVisibility(\r\n      record.visibility ||\r\n        (record.entity && record.entity.visibility) ||\r\n        \"public\",\r\n    );\r\n    if (visibility !== \"followers\" && visibility !== \"private\") return !0;\n    if (!hasCustomer()) return !1;\r\n    var viewerUid = String(\r\n        actorRelationshipIdentity() || actorUid() || uid() || \"\",\r\n      ).trim(),\r\n      viewerKey = clean(\r\n        activeProfileKeyValue() ||\r\n          profileKey() ||\r\n          customerProfileKeyValue() ||\r\n          \"\",\r\n        \"\",\r\n      ).toLowerCase(),\r\n      entity = record.entity || {},\r\n      ownerUid = String(\r\n        record.authorUid ||\r\n          record.ownerUid ||\r\n          record.uid ||\r\n          entity.authorUid ||\r\n          entity.ownerUid ||\r\n          \"\",\r\n      ).trim(),\r\n      ownerKey = clean(\r\n        record.authorProfileKey ||\r\n          record.ownerProfileKey ||\r\n          record.profileKey ||\r\n          entity.authorProfileKey ||\r\n          entity.ownerProfileKey ||\r\n          \"\",\r\n        \"\",\r\n      ).toLowerCase();\r\n    if (currentViewerFollowsProfile(ownerUid, ownerKey)) return !0;\r\n    var recipientUids = []\r\n        .concat(\r\n          record.authorizedUids ||\r\n            record.authorized_uids ||\r\n            record.allowedUids ||\r\n            record.allowed_uids ||\r\n            record.recipientUids ||\r\n            record.recipient_uids ||\r\n            [],\r\n        )\r\n        .concat(\r\n          entity.authorizedUids ||\r\n            entity.authorized_uids ||\r\n            entity.allowedUids ||\r\n            entity.allowed_uids ||\r\n            entity.recipientUids ||\r\n            entity.recipient_uids ||\r\n            [],\r\n        ),\r\n      recipientKeys = []\r\n        .concat(\r\n          record.authorizedProfileKeys ||\r\n            record.authorized_profile_keys ||\r\n            record.allowedProfileKeys ||\r\n            record.allowed_profile_keys ||\r\n            record.recipientProfileKeys ||\r\n            record.recipient_profile_keys ||\r\n            [],\r\n        )\r\n        .concat(\r\n          entity.authorizedProfileKeys ||\r\n            entity.authorized_profile_keys ||\r\n            entity.allowedProfileKeys ||\r\n            entity.allowed_profile_keys ||\r\n            entity.recipientProfileKeys ||\r\n            entity.recipient_profile_keys ||\r\n            [],\r\n        );\r\n    return !!(\r\n      (viewerUid &&\r\n        recipientUids\r\n          .map(function (item) {\r\n            return String(item || \"\").trim();\r\n          })\r\n          .indexOf(viewerUid) !== -1) ||\r\n      (viewerKey &&\r\n        recipientKeys\r\n          .map(function (item) {\r\n            return clean(item || \"\", \"\").toLowerCase();\r\n          })\r\n          .indexOf(viewerKey) !== -1)\r\n    );\r\n  }\r\n  function canRenderGatedShell() {\r\n    return !hasDsdPlus() && !canModerate();\r\n  }\r\n  function normalizeVisibility(value) {\r\n    return (\r\n      (value = String(value || \"public\").toLowerCase()),\r\n      value === \"followers\" || value === \"private\" ? value : \"public\"\n    );\r\n  }\r\n  function normalizeContentRating(value) {\r\n    return (\r\n      (value = String(value || \"standard\").toLowerCase()),\r\n      value === \"adult\"\r\n        ? \"mature\"\r\n        : value === \"mature\" || value === \"explicit\" || value === \"gated\"\r\n          ? value\r\n          : \"standard\"\r\n    );\r\n  }\r\n  function normalizeAccessGate(value) {\r\n    return (\r\n      (value = String(value || \"\").toLowerCase()),\r\n      value === \"dsd_plus\" || value === \"gated\" ? \"dsd_plus\" : \"\"\r\n    );\r\n  }\r\n  function visibilityPolicyFromInput(input) {\r\n    input = input || {};\r\n    var rawVisibility = String(input.visibility || \"public\").toLowerCase(),\r\n      explicitRating = String(\r\n        input.contentRating || input.content_rating || \"\",\r\n      ).toLowerCase(),\r\n      explicitGate = String(\r\n        input.accessGate || input.access_gate || \"\",\r\n      ).toLowerCase(),\r\n      selectedPolicy =\r\n        !explicitRating && !explicitGate\r\n          ? policyFromSelectValue(rawVisibility)\r\n          : null,\r\n      visibility = selectedPolicy\r\n        ? selectedPolicy.visibility\r\n        : normalizeVisibility(rawVisibility),\r\n      rating = selectedPolicy\r\n        ? selectedPolicy.contentRating\r\n        : normalizeContentRating(explicitRating),\r\n      accessGate = selectedPolicy\r\n        ? selectedPolicy.accessGate\r\n        : normalizeAccessGate(explicitGate);\r\n    return (\r\n      rating === \"gated\" ||\r\n      accessGate === \"dsd_plus\" ||\r\n      rawVisibility === \"gated\"\r\n        ? ((visibility = \"public\"),\r\n          (rating = \"gated\"),\r\n          (accessGate = \"dsd_plus\"))\r\n        : (rating === \"explicit\" ||\r\n            rating === \"mature\" ||\r\n            (rating = \"standard\"),\r\n          (accessGate = \"\")),\r\n      { visibility: visibility, contentRating: rating, accessGate: accessGate }\r\n    );\r\n  }\r\n  function policyFromSelectValue(value) {\r\n    return (\r\n      (value = String(value || \"public\").toLowerCase()),\r\n      value === \"private\"\n        ? { visibility: \"private\", contentRating: \"standard\", accessGate: \"\" }\n        : value === \"followers\"\n          ? { visibility: \"followers\", contentRating: \"standard\", accessGate: \"\" }\n          : value === \"mature\"\n          ? { visibility: \"public\", contentRating: \"mature\", accessGate: \"\" }\r\n          : value === \"explicit\"\r\n            ? {\r\n                visibility: \"public\",\r\n                contentRating: \"explicit\",\r\n                accessGate: \"\",\r\n              }\r\n            : value === \"gated\"\r\n              ? {\r\n                  visibility: \"public\",\r\n                  contentRating: \"gated\",\r\n                  accessGate: \"dsd_plus\",\r\n                }\r\n              : {\r\n                  visibility: \"public\",\r\n                  contentRating: \"standard\",\r\n                  accessGate: \"\",\r\n                }\r\n    );\r\n  }\r\n  function ageFromBirthdateValue(value) {\r\n    if (\r\n      ((value = String(value || \"\").trim()), !/^\\d{4}-\\d{2}-\\d{2}$/.test(value))\r\n    )\r\n      return 0;\r\n    var date = new Date(value + \"T00:00:00\");\r\n    if (!isFinite(date.getTime())) return 0;\r\n    var today = new Date(),\r\n      age = today.getFullYear() - date.getFullYear(),\r\n      hadBirthday =\r\n        today.getMonth() > date.getMonth() ||\r\n        (today.getMonth() === date.getMonth() &&\r\n          today.getDate() >= date.getDate());\r\n    return (hadBirthday || (age -= 1), Math.max(0, Math.min(120, age)));\r\n  }\r\n  function syncBirthdateAgeField(field) {\r\n    if (field) {\r\n      var form = field.closest && field.closest(\"form\"),\r\n        ageField = formControl(form, \"age\"),\r\n        age = ageFromBirthdateValue(field.value);\r\n      ageField &&\r\n        age &&\r\n        ((ageField.value = String(age)),\r\n        ageField.setAttribute(\"data-dsd-age-derived-from-birthdate\", \"true\"));\r\n    }\r\n  }\r\n  function profileAgePolicy(form) {\r\n    var birthdateField = formControl(form, \"birthdate\"),\r\n      ageField = formControl(form, \"age\"),\r\n      birthdate = birthdateField\r\n        ? String(birthdateField.value || \"\").trim()\r\n        : \"\",\r\n      persistedBirthdate = String(\r\n        (state.profile && state.profile.birthdate) || \"\",\r\n      ).trim(),\r\n      hasAgeCapabilityControls = !!(birthdateField || ageField),\r\n      existingAge = hasAgeCapabilityControls\r\n        ? 0\r\n        : Number((state.profile && state.profile.age) || 0),\r\n      age =\r\n        ageField && String(ageField.value || \"\").trim()\r\n          ? Number(ageField.value || 0)\r\n          : existingAge;\r\n    if (birthdate && /^\\d{4}-\\d{2}-\\d{2}$/.test(birthdate)) {\r\n      var derivedAge = ageFromBirthdateValue(birthdate),\r\n        adult = derivedAge >= 18;\r\n      return {\r\n        birthdate: birthdate,\r\n        age: derivedAge || age || 0,\r\n        over18: adult,\r\n      };\r\n    }\r\n    if (!birthdate && /^\\d{4}-\\d{2}-\\d{2}$/.test(persistedBirthdate)) {\r\n      var persistedAge = ageFromBirthdateValue(persistedBirthdate);\r\n      return {\r\n        birthdate: persistedBirthdate,\r\n        age: persistedAge || age || 0,\r\n        over18: persistedAge >= 18 || age >= 18,\r\n      };\r\n    }\r\n    if (hasAgeCapabilityControls)\r\n      return { birthdate: \"\", age: age || 0, over18: age >= 18 };\r\n    var preserveExistingBirthdate =\r\n      !birthdateField && state.profile && state.profile.birthdate;\r\n    return {\r\n      birthdate: preserveExistingBirthdate || \"\",\r\n      age: age || 0,\r\n      over18:\r\n        age >= 18 ||\r\n        (state.profile &&\r\n          (state.profile.ageVerified === !0 || state.profile.over18 === !0)),\r\n    };\r\n  }\r\n  function formControl(form, name) {\r\n    if (!form || !name) return null;\r\n    if (form.elements) {\r\n      if (form.elements[name]) return form.elements[name];\r\n      if (typeof form.elements.namedItem == \"function\") {\r\n        var named = form.elements.namedItem(name);\r\n        if (named) return named;\r\n      }\r\n    }\r\n    try {\r\n      return form.querySelector(\r\n        '[name=\"' + String(name).replace(/\"/g, '\\\\\"') + '\"]',\r\n      );\r\n    } catch (e) {\r\n      return null;\r\n    }\r\n  }\r\n  function isApprovedPublicRecord(record) {\r\n    if (!isNormalContentRecord(record)) return !1;\r\n    var statusFields = [\r\n        record && record.status,\r\n        record && record.state,\r\n        record && record.moderation_state,\r\n        record && record.moderationStatus,\r\n        record && record.moderation && record.moderation.state,\r\n        record &&\r\n          record.entity &&\r\n          (record.entity.moderationStatus || record.entity.moderation_status),\r\n      ].map(function (value) {\r\n        return String(value || \"\").toLowerCase();\r\n      }),\r\n      visibility = String(\r\n        (record &&\r\n          (record.visibility ||\r\n            (record.entity && record.entity.visibility) ||\r\n            \"public\")) ||\r\n          \"public\",\r\n      ).toLowerCase(),\r\n      gate = String(\r\n        (record &&\r\n          (record.accessGate ||\r\n            record.access_gate ||\r\n            (record.entity &&\r\n              (record.entity.accessGate || record.entity.access_gate)) ||\r\n            \"\")) ||\r\n          \"\",\r\n      ).toLowerCase(),\r\n      rating = String(\r\n        (record &&\r\n          (record.contentRating ||\r\n            record.content_rating ||\r\n            (record.entity &&\r\n              (record.entity.contentRating || record.entity.content_rating)) ||\r\n            \"standard\")) ||\r\n          \"standard\",\r\n      ).toLowerCase(),\r\n      terminal = statusFields.some(function (value) {\r\n        return (\r\n          [\r\n            \"deleted\",\r\n            \"archived\",\r\n            \"removed\",\r\n            \"hidden\",\r\n            \"rejected\",\r\n            \"blocked\",\r\n            \"disabled\",\r\n            \"expired\",\r\n          ].indexOf(value) !== -1\r\n        );\r\n      }),\r\n      launchApproved =\r\n        statusFields.indexOf(\"approved\") !== -1 ||\r\n        statusFields.indexOf(\"pending\") !== -1 ||\r\n        statusFields.indexOf(\"submitted\") !== -1 ||\r\n        statusFields.every(function (value) {\r\n          return !value;\r\n        });\r\n    return (\r\n      !terminal &&\r\n      launchApproved &&\r\n      (visibility === \"public\" ||\n        visibility === \"followers\" ||\n        visibility === \"private\" ||\n        visibility === \"gated\" ||\r\n        gate === \"dsd_plus\" ||\r\n        rating === \"gated\" ||\r\n        rating === \"mature\" ||\r\n        rating === \"explicit\" ||\r\n        rating === \"adult\" ||\r\n        rating === \"restricted\")\r\n    );\r\n  }\r\n  function isGatedContentRecord(record) {\r\n    var visibility = String(\r\n        (record &&\r\n          (record.visibility ||\r\n            (record.entity && record.entity.visibility) ||\r\n            \"\")) ||\r\n          \"\",\r\n      ).toLowerCase(),\r\n      gate = String(\r\n        (record &&\r\n          (record.accessGate ||\r\n            record.access_gate ||\r\n            (record.entity &&\r\n              (record.entity.accessGate || record.entity.access_gate)) ||\r\n            \"\")) ||\r\n          \"\",\r\n      ).toLowerCase(),\r\n      rating = String(\r\n        (record &&\r\n          (record.contentRating ||\r\n            record.content_rating ||\r\n            (record.entity &&\r\n              (record.entity.contentRating || record.entity.content_rating)) ||\r\n            \"\")) ||\r\n          \"\",\r\n      ).toLowerCase(),\r\n      shellPath = String(\r\n        (record && (record.migratedFromPath || record.sourcePath || \"\")) || \"\",\r\n      ).toLowerCase(),\r\n      shellId = String(\r\n        (record && (record.postId || record.storyId || record.id || \"\")) || \"\",\r\n      ).toLowerCase(),\r\n      shellTitle = String((record && (record.title || \"\")) || \"\").toLowerCase();\r\n    return (\r\n      visibility === \"gated\" ||\r\n      gate === \"dsd_plus\" ||\r\n      gate === \"gated\" ||\r\n      rating === \"gated\" ||\r\n      shellPath.indexOf(\"gatedpostshells/\") === 0 ||\r\n      shellId.indexOf(\"gated-shell-proof-shell\") !== -1 ||\r\n      shellTitle === \"dsd+ members only\"\r\n    );\r\n  }\r\n  function publicGatedShellRecord(record, kind) {\r\n    return (\r\n      (record = record || {}),\r\n      Object.assign({}, record, {\r\n        gatedShell: !0,\r\n        gatedStoryShell: kind === \"story\",\r\n        body: \"\",\r\n        title: \"\",\r\n        media: [],\r\n        contentRating: \"gated\",\r\n        accessGate: \"dsd_plus\",\r\n        visibility: \"public\",\r\n        entity: Object.assign({}, record.entity || {}, {\r\n          visibility: \"public\",\r\n          contentRating: \"gated\",\r\n          accessGate: \"dsd_plus\",\r\n          moderationStatus: \"approved\",\r\n        }),\r\n      })\r\n    );\r\n  }\r\n  function classifiedRestrictionType(record) {\r\n    var visibility = String(\r\n        (record &&\r\n          (record.visibility ||\r\n            (record.entity && record.entity.visibility) ||\r\n            \"\")) ||\r\n          \"\",\r\n      ).toLowerCase(),\r\n      gate = String(\r\n        (record &&\r\n          (record.accessGate ||\r\n            record.access_gate ||\r\n            (record.entity &&\r\n              (record.entity.accessGate || record.entity.access_gate)) ||\r\n            \"\")) ||\r\n          \"\",\r\n      ).toLowerCase(),\r\n      rating = String(\r\n        (record &&\r\n          (record.contentRating ||\r\n            record.content_rating ||\r\n            (record.entity &&\r\n              (record.entity.contentRating || record.entity.content_rating)) ||\r\n            \"\")) ||\r\n          \"\",\r\n      ).toLowerCase(),\r\n      shellPath = String(\r\n        (record && (record.migratedFromPath || record.sourcePath || \"\")) || \"\",\r\n      ).toLowerCase(),\r\n      shellId = String(\r\n        (record && (record.postId || record.storyId || record.id || \"\")) || \"\",\r\n      ).toLowerCase();\r\n    return visibility === \"gated\" ||\r\n      gate === \"dsd_plus\" ||\r\n      gate === \"gated\" ||\r\n      rating === \"gated\" ||\r\n      shellPath.indexOf(\"gatedpostshells/\") === 0 ||\r\n      shellId.indexOf(\"gated-shell-proof-shell\") !== -1\r\n      ? \"gated\"\r\n      : visibility === \"private\"\r\n        ? \"private\"\r\n        : rating === \"explicit\" || rating === \"restricted\"\r\n          ? \"explicit\"\r\n          : rating === \"adult\" || rating === \"mature\" || rating === \"sensitive\"\r\n            ? \"mature\"\r\n            : \"\";\r\n  }\r\n  function isRestrictedShellRecord(record) {\r\n    return isPersistedGatedShellRecord(record);\r\n  }\r\n  function isPersistedGatedShellRecord(record) {\r\n    if (!record) return !1;\r\n    var entity = record.entity || {},\r\n      type = String(record.type || entity.type || \"\").toLowerCase(),\r\n      sourcePath = String(\r\n        record.migratedFromPath || record.sourcePath || \"\",\r\n      ).toLowerCase(),\r\n      id = String(\r\n        record.postId || record.storyId || record.id || \"\",\r\n      ).toLowerCase(),\r\n      title = String(record.title || \"\").toLowerCase();\r\n    return (\r\n      record.restrictedShell === !0 ||\r\n      record.gatedShell === !0 ||\r\n      record.gatedStoryShell === !0 ||\r\n      type === \"gatedpostshell\" ||\r\n      type === \"gatedstoryshell\" ||\r\n      sourcePath.indexOf(\"gatedpostshells/\") === 0 ||\r\n      sourcePath.indexOf(\"gatedstoryshells/\") === 0 ||\r\n      id.indexOf(\"gated-shell-proof-shell\") !== -1 ||\r\n      title === \"dsd+ members only\"\r\n    );\r\n  }\r\n  function publicRestrictedShellRecord(record, kind, restriction) {\r\n    if (\r\n      ((record = record || {}),\r\n      (restriction = restriction || classifiedRestrictionType(record)),\r\n      !restriction)\r\n    )\r\n      return null;\r\n    var gated = restriction === \"gated\";\r\n    return Object.assign({}, record, {\r\n      restrictedShell: !0,\r\n      restrictedKind: restriction,\r\n      gatedShell: gated,\r\n      gatedStoryShell: gated && kind === \"story\",\r\n      body: \"\",\r\n      title: \"\",\r\n      caption: \"\",\r\n      media: [],\r\n      poll: null,\r\n      contentRating: gated ? \"gated\" : restriction,\r\n      accessGate: gated ? \"dsd_plus\" : \"\",\r\n      visibility: \"public\",\r\n      entity: Object.assign({}, record.entity || {}, {\r\n        visibility: \"public\",\r\n        contentRating: gated ? \"gated\" : restriction,\r\n        accessGate: gated ? \"dsd_plus\" : \"\",\r\n        moderationStatus: \"approved\",\r\n      }),\r\n    });\r\n  }\r\n  function genericPublicGatedShellRecord(kind) {\r\n    var id =\r\n      kind === \"story\"\r\n        ? \"dsd-plus-public-story-shell\"\r\n        : \"dsd-plus-public-post-shell\";\r\n    return publicRestrictedShellRecord(\r\n      {\r\n        postId: id,\r\n        storyId: kind === \"story\" ? id : \"\",\r\n        id: id,\r\n        status: \"approved\",\r\n        visibility: \"public\",\r\n        contentRating: \"gated\",\r\n        accessGate: \"dsd_plus\",\r\n        authorProfileKey: \"\",\r\n        authorDisplayName: \"DSD+ member\",\r\n        ownerProfileKey: \"\",\r\n        ownerDisplayName: \"DSD+ member\",\r\n        createdAt: \"2026-07-06T00:00:00.000Z\",\r\n        entity: {\r\n          type: kind === \"story\" ? \"gatedStoryShell\" : \"gatedPostShell\",\r\n          visibility: \"public\",\r\n          contentRating: \"gated\",\r\n          accessGate: \"dsd_plus\",\r\n          moderationStatus: \"approved\",\r\n        },\r\n      },\r\n      kind,\r\n      \"gated\",\r\n    );\r\n  }\r\n  function applyFounderModerationLock(record, payload) {\r\n    if (!record || canModerate()) return payload;\r\n    var restriction = classifiedRestrictionType(record);\r\n    if (!restriction) return payload;\r\n    var entity = record.entity || {},\r\n      visibility = record.visibility || entity.visibility || \"public\",\r\n      contentRating =\r\n        record.contentRating ||\r\n        record.content_rating ||\r\n        entity.contentRating ||\r\n        entity.content_rating ||\r\n        restriction,\r\n      accessGate =\r\n        record.accessGate ||\r\n        record.access_gate ||\r\n        entity.accessGate ||\r\n        entity.access_gate ||\r\n        (restriction === \"gated\" ? \"dsd_plus\" : \"\");\r\n    return Object.assign({}, payload || {}, {\r\n      visibility: visibility,\r\n      contentRating: contentRating,\r\n      accessGate: accessGate,\r\n      founderModerationLockPreserved: !0,\r\n      moderation: Object.assign({}, (payload && payload.moderation) || {}, {\r\n        founderModerationLockPreserved: !0,\r\n        lockedClassification: restriction,\r\n      }),\r\n      entity: Object.assign({}, (payload && payload.entity) || {}, {\r\n        visibility: visibility,\r\n        contentRating: contentRating,\r\n        accessGate: accessGate,\n        recipientProfileKeys: recipientProfileKeys,\n      }),\r\n    });\r\n  }\r\n  function readPersistedPrivateProfileForLock(profileKeyValue) {\r\n    var key = clean(profileKeyValue || profileKey() || \"\", \"\");\r\n    return !key\r\n      ? Promise.resolve(null)\r\n      : readSupabasePrivateProfileRowsByKey(key, {\r\n          surface: \"private-profile-lock-read\",\r\n        })\r\n          .then(function (rows) {\r\n            return (rows && rows[0]) || null;\r\n          })\r\n          .catch(function () {\r\n            return null;\r\n          });\r\n  }\r\n  function readSupabasePrivateProfileRowsByKey(profileKeyValue, options) {\n    var key = nonPlaceholderProfileKey(profileKeyValue || \"\"),\n      adapter = supabaseAdapter();\n    if (!hasCustomer()) {\n      claim(\"private-profile-read:public-blocked\", {\n        surface: (options && options.surface) || \"private-profile-read\",\n      });\n      return Promise.resolve([]);\n    }\n    if (!adapter || typeof adapter.read != \"function\" || !key)\n      return Promise.resolve([]);\n    var opts = Object.assign({ force: !0 }, options || {});\r\n    return adapter\r\n      .read(\r\n        \"profiles\",\r\n        {\r\n          select: SUPABASE_PRIVATE_PROFILE_BASE_SELECT,\r\n          profile_key: \"eq.\" + key,\r\n          limit: 1,\r\n        },\r\n        opts,\r\n      )\r\n      .then(function (rows) {\r\n        return rows || [];\r\n      });\r\n  }\r\n  function normalizeSupabaseProfileRecord(record, fallbackKey) {\r\n    if (!record) return null;\r\n    var key = nonPlaceholderProfileKey(\r\n      record.profileKey ||\r\n        record.profile_key ||\r\n        record.handle ||\r\n        fallbackKey ||\r\n        \"\",\r\n    );\r\n    if (!key) return null;\r\n    var profileUid = clean(\n        record.user_id ||\n          record.supabase_user_id ||\n          record.app_user_id ||\n          record.userId ||\n          record.supabaseUserId ||\n          record.appUserId ||\n          record.uid ||\n          record.id ||\n          \"\",\r\n        \"\",\r\n      ),\r\n      recordAge = Number(\r\n        record.age ||\r\n          record.profileAge ||\r\n          record.profile_age ||\r\n          record.age_years ||\r\n          0,\r\n      ),\r\n      birthdateAge =\r\n        record.birthdate && /^\\d{4}-\\d{2}-\\d{2}$/.test(String(record.birthdate))\r\n          ? Math.floor(\r\n              (Date.now() -\r\n                new Date(String(record.birthdate) + \"T00:00:00\").getTime()) /\r\n                315576e5,\r\n            )\r\n          : 0,\r\n      ageVerified =\r\n        record.ageVerified === !0 ||\r\n        record.age_verified === !0 ||\r\n        record.over18 === !0 ||\r\n        record.over_18 === !0 ||\r\n        recordAge >= 18 ||\r\n        birthdateAge >= 18,\r\n      avatarId =\r\n        record.avatarMediaId ||\r\n        record.avatar_media_id ||\r\n        record.profileImageMediaId ||\r\n        record.profile_image_media_id ||\r\n        record.photoMediaId ||\r\n        record.photo_media_id ||\r\n        record.imageMediaId ||\r\n        record.image_media_id ||\r\n        record.avatarImageId ||\r\n        record.avatar_image_id ||\r\n        record.avatarWasabiObjectKey ||\r\n        record.avatar_wasabi_object_key ||\r\n        record.photoWasabiObjectKey ||\r\n        record.photo_wasabi_object_key ||\r\n        record.avatarObjectKey ||\r\n        record.avatar_object_key ||\r\n        \"\",\r\n      bannerId =\r\n        record.bannerMediaId ||\r\n        record.banner_media_id ||\r\n        record.headerMediaId ||\r\n        record.header_media_id ||\r\n        record.coverMediaId ||\r\n        record.cover_media_id ||\r\n        record.backgroundMediaId ||\r\n        record.background_media_id ||\r\n        record.bannerImageId ||\r\n        record.banner_image_id ||\r\n        record.headerImageId ||\r\n        record.header_image_id ||\r\n        record.coverImageId ||\r\n        record.cover_image_id ||\r\n        record.bannerWasabiObjectKey ||\r\n        record.banner_wasabi_object_key ||\r\n        record.headerWasabiObjectKey ||\r\n        record.header_wasabi_object_key ||\r\n        record.coverWasabiObjectKey ||\r\n        record.cover_wasabi_object_key ||\r\n        record.bannerObjectKey ||\r\n        record.banner_object_key ||\r\n        record.headerObjectKey ||\r\n        record.header_object_key ||\r\n        record.coverObjectKey ||\r\n        record.cover_object_key ||\r\n        \"\",\r\n      hasDenormalizedStats = [\r\n        \"followerCount\",\r\n        \"followersCount\",\r\n        \"follower_count\",\r\n        \"followers_count\",\r\n        \"followingCount\",\r\n        \"followsCount\",\r\n        \"following_count\",\r\n        \"follows_count\",\r\n        \"postCount\",\r\n        \"postsCount\",\r\n        \"post_count\",\r\n        \"posts_count\",\r\n        \"mediaCount\",\r\n        \"media_count\",\r\n        \"storyCount\",\r\n        \"storiesCount\",\r\n        \"story_count\",\r\n        \"stories_count\",\r\n        \"favoriteCount\",\r\n        \"favoritesCount\",\r\n        \"favorite_count\",\r\n        \"favorites_count\",\r\n        \"savedCount\",\r\n        \"savesCount\",\r\n        \"saved_count\",\r\n        \"saves_count\",\r\n        \"viewCount\",\r\n        \"profileViewCount\",\r\n        \"view_count\",\r\n        \"profile_view_count\",\r\n      ].some(function (field) {\r\n        return Object.prototype.hasOwnProperty.call(record, field);\r\n      }),\r\n      followerCount =\r\n        Number(\r\n          record.followerCount != null\r\n            ? record.followerCount\r\n            : record.followersCount != null\r\n              ? record.followersCount\r\n              : record.follower_count != null\r\n                ? record.follower_count\r\n                : record.followers_count,\r\n        ) || 0,\r\n      followingCount =\r\n        Number(\r\n          record.followingCount != null\r\n            ? record.followingCount\r\n            : record.followsCount != null\r\n              ? record.followsCount\r\n              : record.following_count != null\r\n                ? record.following_count\r\n                : record.follows_count,\r\n        ) || 0,\r\n      postCount =\r\n        Number(\r\n          record.postCount != null\r\n            ? record.postCount\r\n            : record.postsCount != null\r\n              ? record.postsCount\r\n              : record.post_count != null\r\n                ? record.post_count\r\n                : record.posts_count,\r\n        ) || 0,\r\n      mediaCount =\r\n        Number(\r\n          record.mediaCount != null ? record.mediaCount : record.media_count,\r\n        ) || 0,\r\n      storyCount =\r\n        Number(\r\n          record.storyCount != null\r\n            ? record.storyCount\r\n            : record.storiesCount != null\r\n              ? record.storiesCount\r\n              : record.story_count != null\r\n                ? record.story_count\r\n                : record.stories_count,\r\n        ) || 0,\r\n      favoriteCount =\r\n        Number(\r\n          record.favoriteCount != null\r\n            ? record.favoriteCount\r\n            : record.favoritesCount != null\r\n              ? record.favoritesCount\r\n              : record.favorite_count != null\r\n                ? record.favorite_count\r\n                : record.favorites_count,\r\n        ) || 0,\r\n      savedCount =\r\n        Number(\r\n          record.savedCount != null\r\n            ? record.savedCount\r\n            : record.savesCount != null\r\n              ? record.savesCount\r\n              : record.saved_count != null\r\n                ? record.saved_count\r\n                : record.saves_count,\r\n        ) || 0,\r\n      viewCount =\n        Number(\r\n          record.viewCount != null\r\n            ? record.viewCount\r\n            : record.profileViewCount != null\r\n              ? record.profileViewCount\r\n              : record.view_count != null\r\n                ? record.view_count\r\n                : record.profile_view_count,\r\n        ) || 0,\n      bannerFocus = profileMediaFocus(record, \"banner\"),\n      avatarFocus = profileMediaFocus(record, \"avatar\"),\n      locationPrivacyHydrated =\n        record.locationPrivacyHydrated === !0 ||\n        [\n          \"use_approximate_location_for_nearby\",\n          \"appear_in_nearby\",\n          \"show_distance_to_users\",\n          \"show_current_city_on_profile\",\n          \"location_preferences_initialized\",\n          \"location_invisible_mode\",\n          \"nearby_location_accuracy_meters\",\n          \"nearby_location_captured_at\",\n          \"nearby_location_updated_at\",\n        ].some(function (field) {\n          return Object.prototype.hasOwnProperty.call(record, field);\n        });\n    return Object.assign({}, record, {\r\n      uid: profileUid,\r\n      userId: profileUid,\r\n      user_id: profileUid,\r\n      profileKey: key,\r\n      handle: nonPlaceholderProfileKey(record.handle || key) || key,\r\n      displayName: publicDisplayName(\r\n        record.displayName || record.display_name || record.name || \"\",\r\n        profileDisplayNameFallback(key),\r\n      ),\r\n      bio: record.bio || record.about || record.description || \"\",\n      externalUrl: record.externalUrl || record.external_url || \"\",\n      external_url: record.externalUrl || record.external_url || \"\",\n      conversationStarterPrompt:\n        record.conversationStarterPrompt || record.conversation_starter_prompt || \"\",\n      conversationStarterAnswer: String(\n        record.conversationStarterAnswer || record.conversation_starter_answer || \"\",\n      ).slice(0, 160),\n      mapStarSignature: [\n        \"none\",\n        \"comet\",\n        \"four_point\",\n        \"constellation\",\n        \"frame\",\n      ].includes(\n        String(record.mapStarSignature || record.map_star_signature || \"none\"),\n      )\n        ? String(record.mapStarSignature || record.map_star_signature || \"none\")\n        : \"none\",\n      locationCity:\r\n        record.locationCity || record.location_city || record.city || \"\",\r\n      locationState:\r\n        record.locationState || record.location_state || record.state || \"\",\r\n      locationCountry:\r\n        record.locationCountry || record.location_country || \"United States\",\r\n      locationCountryCode:\r\n        record.locationCountryCode || record.location_country_code || \"US\",\r\n      location:\r\n        record.location ||\r\n        [\r\n          record.locationCity || record.location_city || record.city,\r\n          record.locationState || record.location_state || record.state,\r\n        ]\r\n          .filter(Boolean)\r\n          .join(\", \"),\r\n      useApproximateLocationForNearby: profileBooleanFlag(\n        record,\n        [\"use_approximate_location_for_nearby\", \"useApproximateLocationForNearby\"],\n        !0,\n      ),\n      appearInNearby: profileBooleanFlag(\r\n        record,\r\n        [\"appear_in_nearby\", \"appearInNearby\"],\r\n        !1,\n      ),\r\n      showDistanceToUsers: profileBooleanFlag(\r\n        record,\r\n        [\"show_distance_to_users\", \"showDistanceToUsers\"],\r\n        !1,\n      ),\r\n      showCurrentCityOnProfile: profileBooleanFlag(\r\n        record,\r\n        [\"show_current_city_on_profile\", \"showCurrentCityOnProfile\"],\r\n        !0,\r\n      ),\r\n      locationPreferencesInitialized:\r\n        record.locationPreferencesInitialized === !0 ||\r\n        record.location_preferences_initialized === !0,\r\n      locationInvisibleMode:\n        record.locationInvisibleMode === !0 ||\n        record.location_invisible_mode === !0,\n      locationPrivacyHydrated: locationPrivacyHydrated,\n      nearbyLocationUpdatedAt:\r\n        record.nearbyLocationUpdatedAt ||\r\n        record.nearby_location_captured_at ||\r\n        record.nearby_location_updated_at ||\r\n        \"\",\r\n      nearbyLocationAccuracyMeters: Number(\r\n        record.nearbyLocationAccuracyMeters != null\r\n          ? record.nearbyLocationAccuracyMeters\r\n          : record.nearby_location_accuracy_meters,\r\n      ) || null,\r\n      nearby_location_accuracy_meters: Number(\r\n        record.nearbyLocationAccuracyMeters != null\r\n          ? record.nearbyLocationAccuracyMeters\r\n          : record.nearby_location_accuracy_meters,\r\n      ) || null,\r\n      birthdate: record.birthdate || \"\",\r\n      age: recordAge || birthdateAge || 0,\r\n      ageVerified: ageVerified,\r\n      adultContentEnabled: !!(\r\n        ageVerified &&\r\n        (record.adultContentEnabled === !0 ||\r\n          record.adult_content_enabled === !0)\r\n      ),\r\n      over18: ageVerified,\n      verified: record.verified === !0,\n      avatarMediaId: avatarId,\r\n      avatar_media_id: avatarId,\r\n      bannerMediaId: bannerId,\r\n      banner_media_id: bannerId,\r\n      headerMediaId: record.headerMediaId || record.header_media_id || bannerId,\r\n      coverMediaId: record.coverMediaId || record.cover_media_id || bannerId,\r\n      followerCount: followerCount,\r\n      followersCount: followerCount,\r\n      followers_count: followerCount,\r\n      followingCount: followingCount,\r\n      followsCount: followingCount,\r\n      following_count: followingCount,\r\n      postCount: postCount,\r\n      postsCount: postCount,\r\n      posts_count: postCount,\r\n      mediaCount: mediaCount,\r\n      media_count: mediaCount,\r\n      storyCount: storyCount,\r\n      storiesCount: storyCount,\r\n      stories_count: storyCount,\r\n      favoriteCount: favoriteCount,\r\n      favoritesCount: favoriteCount,\r\n      favorites_count: favoriteCount,\r\n      savedCount: savedCount,\r\n      savesCount: savedCount,\r\n      saves_count: savedCount,\r\n      viewCount: viewCount,\r\n      profileViewCount: viewCount,\r\n      profile_view_count: viewCount,\r\n      profileStatsHydrated:\r\n        record.profileStatsHydrated === !0 ||\r\n        record.profile_stats_hydrated === !0 ||\r\n        hasDenormalizedStats,\r\n      bannerPosition: canonicalBannerPosition(record),\r\n      banner_position: canonicalBannerPosition(record),\r\n      bannerFocusX: bannerFocus.x,\r\n      bannerFocusY: bannerFocus.y,\r\n      banner_focus_x: bannerFocus.x,\r\n      banner_focus_y: bannerFocus.y,\r\n      avatarFocusX: avatarFocus.x,\r\n      avatarFocusY: avatarFocus.y,\r\n      avatar_focus_x: avatarFocus.x,\r\n      avatar_focus_y: avatarFocus.y,\r\n      metadata:\r\n        record.metadata && typeof record.metadata === \"object\"\r\n          ? record.metadata\r\n          : {},\r\n      notificationPreferences: Object.assign(\r\n        {\r\n          relationships: !0,\r\n          content: !0,\r\n          messages: !0,\r\n          stories: !0,\r\n          moderation: !1,\r\n        },\r\n        record.notificationPreferences || {},\r\n        record.metadata &&\r\n          typeof record.metadata === \"object\" &&\r\n          record.metadata.notificationPreferences &&\r\n          typeof record.metadata.notificationPreferences === \"object\"\r\n          ? record.metadata.notificationPreferences\r\n          : {},\r\n      ),\r\n      setupComplete:\r\n        record.setupComplete === !0 ||\r\n        record.setup_complete === !0 ||\r\n        record.status === \"active\",\r\n      status: record.status || \"active\",\r\n      accountAuthority: \"shopify-session\",\r\n      authBridge: \"shopify-supabase-profile-key\",\r\n      entity: Object.assign(\r\n        {\r\n          type: \"profile\",\r\n          visibility: record.visibility || \"public\",\r\n          moderationStatus: \"approved\",\r\n        },\r\n        record.entity || {},\r\n      ),\r\n    });\r\n  }\r\n  function mergePrivateProfileCapabilities(baseProfile, privateProfile) {\n    var base = baseProfile ? Object.assign({}, baseProfile) : {},\n      privateRecord = normalizeSupabaseProfileRecord(\n        privateProfile,\n        base.profileKey || base.handle || \"\",\n      ),\n      privateLocationHydrated =\n        privateRecord && privateRecord.locationPrivacyHydrated === !0,\n      privateLocationFields = {\n        useApproximateLocationForNearby: !0,\n        use_approximate_location_for_nearby: !0,\n        appearInNearby: !0,\n        appear_in_nearby: !0,\n        showDistanceToUsers: !0,\n        show_distance_to_users: !0,\n        showCurrentCityOnProfile: !0,\n        show_current_city_on_profile: !0,\n        locationPreferencesInitialized: !0,\n        location_preferences_initialized: !0,\n        locationInvisibleMode: !0,\n        location_invisible_mode: !0,\n        nearbyLocationUpdatedAt: !0,\n        nearby_location_captured_at: !0,\n        nearby_location_updated_at: !0,\n        nearbyLocationAccuracyMeters: !0,\n        nearby_location_accuracy_meters: !0,\n      };\n    if (!privateRecord) return base;\r\n    var baseKey = normalizedProfileKeyValue(\r\n        base.profileKey || base.handle || \"\",\r\n      ),\r\n      privateKey = normalizedProfileKeyValue(\r\n        privateRecord.profileKey || privateRecord.handle || \"\",\r\n      );\r\n    return (\r\n      (baseKey && privateKey && baseKey !== privateKey) ||\r\n        ([\r\n          \"birthdate\",\r\n          \"age\",\r\n          \"ageVerified\",\r\n          \"adultContentEnabled\",\r\n          \"over18\",\r\n          \"externalUrl\",\r\n          \"external_url\",\r\n          \"conversationStarterPrompt\",\r\n          \"conversation_starter_prompt\",\r\n          \"conversationStarterAnswer\",\r\n          \"conversation_starter_answer\",\r\n          \"mapStarSignature\",\r\n          \"map_star_signature\",\r\n          \"location\",\r\n          \"locationCity\",\r\n          \"locationState\",\r\n          \"location_city\",\r\n          \"location_state\",\r\n          \"metadata\",\r\n          \"notificationPreferences\",\r\n          \"useApproximateLocationForNearby\",\r\n          \"use_approximate_location_for_nearby\",\r\n          \"appearInNearby\",\r\n          \"appear_in_nearby\",\r\n          \"showDistanceToUsers\",\r\n          \"show_distance_to_users\",\r\n          \"showCurrentCityOnProfile\",\r\n          \"show_current_city_on_profile\",\r\n          \"locationPreferencesInitialized\",\r\n          \"location_preferences_initialized\",\r\n          \"locationInvisibleMode\",\r\n          \"location_invisible_mode\",\r\n          \"nearbyLocationUpdatedAt\",\r\n          \"nearby_location_captured_at\",\r\n          \"nearby_location_updated_at\",\r\n          \"nearbyLocationAccuracyMeters\",\r\n          \"nearby_location_accuracy_meters\",\r\n          \"roles\",\r\n          \"platformRoles\",\r\n          \"permissions\",\r\n          \"governanceClaims\",\r\n          \"isFounder\",\r\n          \"isAdmin\",\r\n          \"isModerator\",\r\n          \"avatarMediaId\",\r\n          \"avatar_media_id\",\r\n          \"profileImageMediaId\",\r\n          \"profile_image_media_id\",\r\n          \"photoMediaId\",\r\n          \"photo_media_id\",\r\n          \"thumbnailMediaId\",\r\n          \"bannerMediaId\",\r\n          \"banner_media_id\",\r\n          \"headerMediaId\",\r\n          \"header_media_id\",\r\n          \"coverMediaId\",\r\n          \"cover_media_id\",\r\n          \"backgroundMediaId\",\r\n          \"background_media_id\",\r\n          \"avatarWasabiObjectKey\",\r\n          \"avatar_wasabi_object_key\",\r\n          \"photoWasabiObjectKey\",\r\n          \"photo_wasabi_object_key\",\r\n          \"bannerWasabiObjectKey\",\r\n          \"banner_wasabi_object_key\",\r\n          \"headerWasabiObjectKey\",\r\n          \"header_wasabi_object_key\",\r\n          \"coverWasabiObjectKey\",\r\n          \"cover_wasabi_object_key\",\r\n          \"bannerPosition\",\r\n          \"banner_position\",\r\n          \"headerPosition\",\r\n          \"header_position\",\r\n          \"coverPosition\",\r\n          \"cover_position\",\r\n          \"bannerFocusX\",\r\n          \"bannerFocusY\",\r\n          \"banner_focus_x\",\r\n          \"banner_focus_y\",\r\n          \"avatarFocusX\",\r\n          \"avatarFocusY\",\r\n          \"avatar_focus_x\",\r\n          \"avatar_focus_y\",\r\n          \"metadata\",\r\n          \"messageConversationNicknames\",\r\n          \"message_conversation_nicknames\",\r\n          \"directConversationNicknames\",\r\n          \"direct_conversation_nicknames\",\r\n          \"privateMessageSettingsUpdatedAt\",\r\n          \"private_message_settings_updated_at\",\r\n        ].forEach(function (key) {\n          privateRecord[key] !== void 0 &&\n            privateRecord[key] !== null &&\n            privateRecord[key] !== \"\" &&\n            (!privateLocationFields[key] || privateLocationHydrated) &&\n            (base[key] = privateRecord[key]);\n        }),\n        (base = profileMediaPatchAliases(base)),\r\n        privateRecord.uid &&\n          ((base.uid = privateRecord.uid),\n          (base.userId = privateRecord.uid),\n          (base.user_id = privateRecord.uid),\n          (base.supabaseUserId = privateRecord.uid),\n          (base.supabase_user_id = privateRecord.uid)),\n        !base.userId &&\r\n          privateRecord.userId &&\r\n          (base.userId = privateRecord.userId),\r\n        !base.user_id &&\r\n          privateRecord.user_id &&\r\n          (base.user_id = privateRecord.user_id),\r\n        !base.status &&\r\n          privateRecord.status &&\r\n          (base.status = privateRecord.status),\r\n        privateRecord.setupComplete === !0 && (base.setupComplete = !0),\n        privateLocationHydrated && (base.locationPrivacyHydrated = !0),\n        privateRecord.accountAuthority &&\n          (base.accountAuthority = privateRecord.accountAuthority),\r\n        (base.authBridge =\r\n          privateRecord.authBridge ||\r\n          base.authBridge ||\r\n          \"shopify-supabase-profile-key\")),\r\n      base\n    );\n  }\n  function cacheOwnerPrivateProfileCapabilities(profile) {\n    if (!profile || !hasCustomer()) return profile;\n    var profileKeyValue = normalizedProfileKeyValue(\n        profile.profileKey || profile.profile_key || profile.handle || \"\",\n      ),\n      ownerKey = normalizedProfileKeyValue(\n        state.sessionProfileKey ||\n          customerProfileKeyValue() ||\n          activeProfileKeyValue() ||\n          profileKey() ||\n          \"\",\n      );\n    if (!profileKeyValue || !ownerKey || profileKeyValue !== ownerKey)\n      return profile;\n    state.ownerPrivateCapabilityKey = ownerKey;\n    state.ownerPrivateCapabilities = {\n      profileKey: profileKeyValue,\n      birthdate: profile.birthdate || \"\",\n      age:\n        profile.age || ageFromBirthdateValue(profile.birthdate || \"\") || \"\",\n      ageVerified: profile.ageVerified === !0 || profile.age_verified === !0,\n      adultContentEnabled:\n        profile.adultContentEnabled === !0 ||\n        profile.adult_content_enabled === !0,\n      over18:\n        profile.over18 === !0 ||\n        profile.ageVerified === !0 ||\n        profile.age_verified === !0,\n      externalUrl: profile.externalUrl || profile.external_url || \"\",\r\n      external_url: profile.externalUrl || profile.external_url || \"\",\r\n      conversationStarterPrompt:\r\n        profile.conversationStarterPrompt ||\r\n        profile.conversation_starter_prompt ||\r\n        \"\",\r\n      conversation_starter_prompt:\r\n        profile.conversationStarterPrompt ||\r\n        profile.conversation_starter_prompt ||\r\n        \"\",\r\n      conversationStarterAnswer:\r\n        profile.conversationStarterAnswer ||\r\n        profile.conversation_starter_answer ||\r\n        \"\",\r\n      conversation_starter_answer:\r\n        profile.conversationStarterAnswer ||\r\n        profile.conversation_starter_answer ||\r\n        \"\",\r\n      mapStarSignature:\r\n        profile.mapStarSignature || profile.map_star_signature || \"none\",\r\n      map_star_signature:\r\n        profile.mapStarSignature || profile.map_star_signature || \"none\",\r\n    };\n    return profile;\n  }\n  function mergeOwnerPrivateCapabilitySnapshot(profile) {\n    var base = profile ? Object.assign({}, profile) : {},\n      ownerKey = normalizedProfileKeyValue(\n        state.sessionProfileKey ||\n          customerProfileKeyValue() ||\n          activeProfileKeyValue() ||\n          profileKey() ||\n          \"\",\n      ),\n      baseKey = normalizedProfileKeyValue(\n        base.profileKey || base.profile_key || base.handle || ownerKey,\n      ),\n      cached = state.ownerPrivateCapabilities;\n    if (\n      !cached ||\n      !ownerKey ||\n      !baseKey ||\n      state.ownerPrivateCapabilityKey !== ownerKey ||\n      baseKey !== ownerKey\n    )\n      return base;\n    return mergePrivateProfileCapabilities(base, cached);\n  }\n  function invalidateOwnerPrivateProfileRead(profileKeyValue) {\r\n    var key = normalizedProfileKeyValue(profileKeyValue || \"\");\r\n    if (\r\n      key &&\r\n      state.ownerPrivateProfileReadKey &&\r\n      key !== state.ownerPrivateProfileReadKey\r\n    )\r\n      return;\r\n    state.ownerPrivateProfileReadKey = \"\";\r\n    state.ownerPrivateProfileReadPromise = null;\r\n    state.ownerPrivateProfileReadSettledAt = 0;\r\n  }\r\n  function readSupabasePrivateProfileByKey(profileKeyValue) {\n    var key = nonPlaceholderProfileKey(profileKeyValue || \"\"),\n      adapter = supabaseAdapter(),\n      currentKey = normalizedProfileKeyValue(\n        state.sessionProfileKey ||\n          customerProfileKeyValue() ||\n          activeProfileKeyValue() ||\n          profileKey() ||\n          \"\",\n      ),\n      isCurrentOwner =\n        hasCustomer() &&\n        currentKey &&\n        currentKey === normalizedProfileKeyValue(key),\r\n      readKey = normalizedProfileKeyValue(key),\r\n      cacheAge = Date.now() - Number(state.ownerPrivateProfileReadSettledAt || 0);\r\n    if (!adapter || typeof adapter.read != \"function\" || !key || !isCurrentOwner)\r\n      return Promise.resolve(null);\r\n    if (\r\n      state.ownerPrivateProfileReadKey === readKey &&\r\n      state.ownerPrivateProfileReadPromise &&\r\n      (!state.ownerPrivateProfileReadSettledAt || cacheAge < 15000)\r\n    )\r\n      return state.ownerPrivateProfileReadPromise;\r\n    invalidateOwnerPrivateProfileRead();\r\n    var readPromise = loadProfilePolicyState(!1)\r\n      .then(function (policy) {\r\n        return policy && policy.profile ? policy.profile : null;\r\n      })\r\n      .then(function (rows) {\r\n        var normalized = normalizeSupabaseProfileRecord(rows || null, key);\r\n        return cacheOwnerPrivateProfileCapabilities(normalized);\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          claim(\"private-profile-capability-hydration:blocked\", {\r\n            profileKey: key,\r\n            error: (error && error.message) || String(error),\r\n          }),\r\n          null\r\n        );\r\n      });\r\n    state.ownerPrivateProfileReadKey = readKey;\r\n    state.ownerPrivateProfileReadPromise = readPromise;\r\n    state.ownerPrivateProfileReadSettledAt = 0;\r\n    readPromise.then(function () {\r\n      state.ownerPrivateProfileReadPromise === readPromise &&\r\n        (state.ownerPrivateProfileReadSettledAt = Date.now());\r\n    });\r\n    return readPromise;\r\n  }\r\n  function mergePublicProfileMediaFromCanonicalProfile(\r\n    publicProfile,\r\n    profileKeyValue,\r\n    options,\r\n  ) {\r\n    var key = nonPlaceholderProfileKey(\r\n        profileKeyValue ||\r\n          (publicProfile &&\r\n            (publicProfile.profileKey || publicProfile.handle)) ||\r\n          \"\",\r\n      ),\n      adapter = supabaseAdapter(),\n      ownerKey = nonPlaceholderProfileKey(\n        state.sessionProfileKey ||\n          customerProfileKeyValue() ||\n          activeProfileKeyValue() ||\n          profileKey() ||\n          \"\",\n      ),\n      isCurrentOwner = !!(hasCustomer() && ownerKey && ownerKey === key),\n      readOptions = Object.assign(\n        {\r\n          force: !0,\r\n          publicRead: !hasCustomer(),\r\n          surface: \"public-profile-media-recovery\",\r\n        },\r\n        options || {},\r\n      );\r\n    if (!publicProfile || !adapter || typeof adapter.read != \"function\" || !key)\r\n      return Promise.resolve(publicProfile);\r\n    function renderableProfileSlot(profile, slot) {\r\n      var id =\r\n        slot === \"avatar\"\r\n          ? canonicalProfileAvatarMediaId(profile)\r\n          : canonicalProfileBannerMediaId(profile);\r\n      return !!(\r\n        readableProfileSlotMediaId(profile, slot) ||\r\n        mediaIdLooksLikeUuid(id) ||\r\n        profileAuthorMediaFallback(profile, slot)\r\n      );\r\n    }\r\n    if (\r\n      renderableProfileSlot(publicProfile, \"avatar\") &&\r\n      renderableProfileSlot(publicProfile, \"banner\")\r\n    )\r\n      return Promise.resolve(publicProfile);\r\n    var canonicalMerge =\n      !isCurrentOwner || readOptions.publicRead === !0\n        ? Promise.resolve(publicProfile)\n        : readSupabasePrivateProfileByKey(key)\n            .then(function (privateProfile) {\n              var canonical = normalizeSupabaseProfileRecord(\n                privateProfile || null,\n                key,\n              );\n              if (!canonical) return publicProfile;\r\n              var publicAvatar = canonicalProfileAvatarMediaId(publicProfile),\r\n                canonicalAvatar = canonicalProfileAvatarMediaId(canonical),\r\n                publicBanner = canonicalProfileBannerMediaId(publicProfile),\r\n                canonicalBanner = canonicalProfileBannerMediaId(canonical),\r\n                resolvedAvatar =\r\n                  (mediaIdLooksLikeUuid(publicAvatar) && publicAvatar) ||\r\n                  (mediaIdLooksLikeUuid(canonicalAvatar) && canonicalAvatar) ||\r\n                  readableProfileSlotMediaId(publicProfile, \"avatar\") ||\r\n                  readableProfileSlotMediaId(canonical, \"avatar\") ||\r\n                  canonicalAvatar ||\r\n                  publicAvatar ||\r\n                  \"\",\r\n                resolvedBanner =\r\n                  (mediaIdLooksLikeUuid(publicBanner) && publicBanner) ||\r\n                  (mediaIdLooksLikeUuid(canonicalBanner) && canonicalBanner) ||\r\n                  readableProfileSlotMediaId(publicProfile, \"banner\") ||\r\n                  readableProfileSlotMediaId(canonical, \"banner\") ||\r\n                  canonicalBanner ||\r\n                  publicBanner ||\r\n                  \"\",\r\n                resolvedBannerPosition = canonicalBannerPosition(\r\n                  publicProfile,\r\n                  canonical,\r\n                ),\r\n                resolvedBannerFocus = profileMediaFocus(\r\n                  publicProfile,\r\n                  \"banner\",\r\n                  canonical,\r\n                ),\r\n                resolvedAvatarFocus = profileMediaFocus(\r\n                  publicProfile,\r\n                  \"avatar\",\r\n                  canonical,\r\n                );\r\n              return Object.assign({}, publicProfile, {\r\n                avatarMediaId: resolvedAvatar,\r\n                avatar_media_id: resolvedAvatar,\r\n                profileImageMediaId: resolvedAvatar,\r\n                profile_image_media_id: resolvedAvatar,\r\n                photoMediaId: resolvedAvatar,\r\n                photo_media_id: resolvedAvatar,\r\n                bannerMediaId: resolvedBanner,\r\n                banner_media_id: resolvedBanner,\r\n                headerMediaId: resolvedBanner,\r\n                header_media_id: resolvedBanner,\r\n                bannerPosition: resolvedBannerPosition,\r\n                banner_position: resolvedBannerPosition,\r\n                headerPosition: resolvedBannerPosition,\r\n                header_position: resolvedBannerPosition,\r\n                coverPosition: resolvedBannerPosition,\r\n                cover_position: resolvedBannerPosition,\r\n                bannerFocusX: resolvedBannerFocus.x,\r\n                bannerFocusY: resolvedBannerFocus.y,\r\n                banner_focus_x: resolvedBannerFocus.x,\r\n                banner_focus_y: resolvedBannerFocus.y,\r\n                avatarFocusX: resolvedAvatarFocus.x,\r\n                avatarFocusY: resolvedAvatarFocus.y,\r\n                avatar_focus_x: resolvedAvatarFocus.x,\r\n                avatar_focus_y: resolvedAvatarFocus.y,\r\n                bannerWasabiObjectKey:\r\n                  publicProfile.bannerWasabiObjectKey ||\r\n                  canonical.bannerWasabiObjectKey ||\r\n                  canonical.banner_wasabi_object_key ||\r\n                  \"\",\r\n                banner_wasabi_object_key:\r\n                  publicProfile.banner_wasabi_object_key ||\r\n                  canonical.banner_wasabi_object_key ||\r\n                  canonical.bannerWasabiObjectKey ||\r\n                  \"\",\r\n                avatarWasabiObjectKey:\r\n                  publicProfile.avatarWasabiObjectKey ||\r\n                  canonical.avatarWasabiObjectKey ||\r\n                  canonical.avatar_wasabi_object_key ||\r\n                  \"\",\r\n                avatar_wasabi_object_key:\r\n                  publicProfile.avatar_wasabi_object_key ||\r\n                  canonical.avatar_wasabi_object_key ||\r\n                  canonical.avatarWasabiObjectKey ||\r\n                  \"\",\r\n              });\r\n            })\r\n            .catch(function (error) {\r\n              return (\r\n                claim(\"public-profile-media-recovery:blocked\", {\r\n                  profileKey: key,\r\n                  error: (error && error.message) || String(error),\r\n                }),\r\n                publicProfile\r\n              );\r\n            });\r\n    return canonicalMerge;\n  }\r\n  function readSupabaseProfileByKey(profileKeyValue, options) {\n    var key = nonPlaceholderProfileKey(profileKeyValue || \"\"),\n      adapter = supabaseAdapter(),\n      readOptions = Object.assign(\n        {\n          force: hasCustomer(),\n          publicRead: !hasCustomer(),\n          surface: \"profile-key-read\",\n        },\n        options || {},\r\n      ),\n      publicProfileSelect = supabasePublicProfileSelect(readOptions),\r\n      profileReadCacheKey =\r\n        (readOptions.publicRead === !0 ? \"public:\" : \"signed:\") + key;\r\n    if (!adapter || typeof adapter.read != \"function\" || !key)\n      return Promise.resolve(null);\n    state.publicProfileReadPromises = state.publicProfileReadPromises || {};\n    state.profileReadPromiseSettledAt = state.profileReadPromiseSettledAt || {};\r\n    var cachedProfileRead = state.publicProfileReadPromises[profileReadCacheKey],\r\n      cachedProfileReadAge =\r\n        Date.now() -\r\n        Number(state.profileReadPromiseSettledAt[profileReadCacheKey] || 0);\r\n    if (\n      cachedProfileRead &&\r\n      (readOptions.publicRead === !0 ||\r\n        !state.profileReadPromiseSettledAt[profileReadCacheKey] ||\r\n        cachedProfileReadAge < 15000)\r\n    )\n      return cachedProfileRead;\r\n    delete state.publicProfileReadPromises[profileReadCacheKey];\r\n    delete state.profileReadPromiseSettledAt[profileReadCacheKey];\r\n    function readPublicProfileBy(field) {\r\n      var query = { select: publicProfileSelect, limit: 1 };\r\n      return (\r\n        (query[field] = \"eq.\" + key),\r\n        adapter\r\n          .read(\"public_profiles\", query, readOptions)\r\n          .catch(function (error) {\r\n            var fallbackQuery = {\r\n              select: SUPABASE_PUBLIC_PROFILE_BASE_SELECT,\r\n              limit: 1,\r\n            };\r\n            return (\r\n              (fallbackQuery[field] = \"eq.\" + key),\r\n              claim(\"public-profile-key-read:focal-compat-fallback\", {\r\n                field: field,\r\n                key: key,\r\n                error: (error && error.message) || String(error),\r\n              }),\r\n              adapter.read(\"public_profiles\", fallbackQuery, readOptions)\r\n            );\r\n          })\r\n      );\r\n    }\r\n    var canonicalPublicProfileRead = adapter.rpc(\r\n        \"dsd_public_profile_by_key\",\r\n        { requested_profile_key: key },\r\n        Object.assign({}, readOptions, {\r\n          surface: \"public-profile-route-projection\",\r\n          maxAgeMs: 60000,\r\n        }),\r\n      ),\r\n      profileReadPromise = canonicalPublicProfileRead\n      .then(function (rows) {\n        return (rows && rows[0]) || null;\n      })\n      .then(function (publicRow) {\n        return (\r\n          publicRow ||\n          (readOptions.publicRead === !0\n            ? null\n            : readSupabasePrivateProfileByKey(key))\n        );\n      })\r\n      .then(function (row) {\r\n        return normalizeSupabaseProfileRecord(row, key);\r\n      })\r\n      .then(function (profile) {\r\n        return mergePublicProfileMediaFromCanonicalProfile(\r\n          profile,\r\n          key,\r\n          readOptions,\r\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          claim(\"shopify-supabase-profile-key:read-failed\", {\r\n            key: key,\r\n            error: (error && error.message) || String(error),\r\n          }),\r\n          null\r\n        );\r\n      });\n    state.publicProfileReadPromises[profileReadCacheKey] = profileReadPromise;\r\n    state.profileReadPromiseSettledAt[profileReadCacheKey] = 0;\r\n    profileReadPromise.then(function () {\r\n      state.publicProfileReadPromises[profileReadCacheKey] ===\r\n        profileReadPromise &&\r\n        (state.profileReadPromiseSettledAt[profileReadCacheKey] = Date.now());\r\n    });\r\n    return profileReadPromise;\n  }\n  function invalidateProfileReadPromise(profileKeyValue) {\r\n    var key = nonPlaceholderProfileKey(profileKeyValue || \"\"),\r\n      cacheKeys = key ? [\"public:\" + key, \"signed:\" + key] : [];\r\n    state.publicProfileReadPromises = state.publicProfileReadPromises || {};\r\n    state.profileReadPromiseSettledAt = state.profileReadPromiseSettledAt || {};\r\n    if (!cacheKeys.length) {\r\n      state.publicProfileReadPromises = {};\r\n      state.profileReadPromiseSettledAt = {};\r\n      return;\r\n    }\r\n    cacheKeys.forEach(function (cacheKey) {\r\n      delete state.publicProfileReadPromises[cacheKey];\r\n      delete state.profileReadPromiseSettledAt[cacheKey];\r\n    });\r\n  }\r\n  function profileActionIdentity(targetUid, targetProfileKey) {\n    targetUid = String(targetUid || \"\").trim();\n    targetProfileKey = normalizedProfileKeyValue(targetProfileKey || \"\");\n    return targetUid || (targetProfileKey ? \"profile-key:\" + targetProfileKey : \"\");\n  }\n  function relationshipRecordTargetsProfile(record, targetUid, targetProfileKey) {\n    if (!record) return !1;\n    targetUid = String(targetUid || \"\").trim();\n    targetProfileKey = normalizedProfileKeyValue(targetProfileKey || \"\");\n    var endpoint = relationshipEndpoint(record, \"target\"),\n      endpointUid = String((endpoint && endpoint.uid) || \"\").trim(),\n      endpointKey = normalizedProfileKeyValue((endpoint && endpoint.key) || \"\");\n    return !!(\n      (targetUid && endpointUid && targetUid === endpointUid) ||\n      (targetProfileKey && endpointKey && targetProfileKey === endpointKey)\n    );\n  }\n  function currentViewerRequestedProfile(targetUid, targetProfileKey) {\n    var stateKey = profileActionIdentity(targetUid, targetProfileKey);\n    return !!(\n      (stateKey && state.followRequestByUid[stateKey]) ||\n      (state.followRequestRecords || []).some(function (record) {\n        return (\n          record &&\n          String(record.state || \"\").toLowerCase() === \"requested\" &&\n          relationshipRecordTargetsProfile(record, targetUid, targetProfileKey)\n        );\n      })\n    );\n  }\n  function currentViewerFavoritedProfile(targetUid, targetProfileKey) {\n    var stateKey = profileActionIdentity(targetUid, targetProfileKey);\n    return !!(\n      (stateKey && state.favoritesByUid[stateKey]) ||\n      (state.favoritesRecords || []).some(function (record) {\n        return relationshipRecordTargetsProfile(\n          record,\n          targetUid,\n          targetProfileKey,\n        );\n      })\n    );\n  }\n  function relationshipBlockedProfile(targetUid, targetProfileKey) {\n    return (\n      relationshipBlocked(targetUid) ||\n      (state.blockedRecords || []).some(function (record) {\n        return relationshipRecordTargetsProfile(\n          record,\n          targetUid,\n          targetProfileKey,\n        );\n      })\n    );\n  }\n  function readSupabaseCanonicalProfileByKey(profileKeyValue) {\r\n    var key = nonPlaceholderProfileKey(profileKeyValue || \"\");\r\n    return key\r\n      ? Promise.all([\r\n          readSupabasePrivateProfileByKey(key),\r\n          readSupabaseProfileByKey(key),\r\n        ])\r\n          .then(function (results) {\r\n            var privateProfile = results[0] || null,\r\n              publicProfile = results[1] || null,\r\n              profile =\r\n                publicProfile && privateProfile\r\n                  ? mergePrivateProfileCapabilities(\r\n                      publicProfile,\r\n                      privateProfile,\r\n                    )\r\n                  : privateProfile || publicProfile;\r\n            return profile\r\n              ? (publicProfile &&\r\n                  ((state.publicProfiles = dedupePublicProfiles(\r\n                    (state.publicProfiles || []).concat([\r\n                      publicProfilePayload(publicProfile),\r\n                    ]),\r\n                  )),\r\n                  publishPublicProfiles(state.publicProfiles)),\r\n                mergePublicProfileMediaFromCanonicalProfile(profile, key))\r\n              : null;\r\n          })\r\n          .then(function (profile) {\r\n            if (!profile) return null;\r\n            var mirrorReady = profileWithPublicMirror(profile) || profile,\r\n              resolvedKey = nonPlaceholderProfileKey(\r\n                mirrorReady.profileKey || mirrorReady.handle || key,\r\n              );\r\n            return (\r\n              resolvedKey &&\r\n                ((state.publicProfiles = dedupePublicProfiles(\r\n                  (state.publicProfiles || []).concat([\r\n                    publicProfilePayload(mirrorReady),\r\n                  ]),\r\n                )),\r\n                publishPublicProfiles(state.publicProfiles)),\r\n              mirrorReady\r\n            );\r\n          })\r\n          .catch(function (error) {\r\n            return (\r\n              claim(\"canonical-profile-read:blocked\", {\r\n                profileKey: key,\r\n                error: (error && error.message) || String(error),\r\n              }),\r\n              null\r\n            );\r\n          })\r\n      : Promise.resolve(null);\r\n  }\r\n  function activateCustomerScopedProfile(profile) {\r\n    return profile\r\n      ? ((profile = profileWithPublicMirror(profile)),\r\n        (profile.setupComplete = profile.setupComplete !== !1),\r\n        (profile.status = profile.status || \"active\"),\r\n        (profile.authBridge =\r\n          profile.authBridge || \"shopify-supabase-profile-key\"),\r\n        (state.profileExists = !0),\r\n        (state.profile = profile),\r\n        (state.publicProfiles = dedupePublicProfiles(\r\n          (state.publicProfiles || []).concat([publicProfilePayload(profile)]),\r\n        )),\r\n        publishPublicProfiles(state.publicProfiles),\r\n        clearStaleConnectionStatus(),\r\n        state.profile)\r\n      : null;\r\n  }\r\n  function restrictedShellText(record, kind) {\r\n    var restriction =\r\n        (record && record.restrictedKind) ||\r\n        classifiedRestrictionType(record) ||\r\n        \"gated\",\r\n      noun =\r\n        kind === \"story\" ? \"story\" : kind === \"profile\" ? \"profile\" : \"post\";\r\n    return restriction === \"explicit\"\r\n      ? hasCustomer()\r\n        ? {\r\n            title: \"Explicit content \" + noun,\r\n            body:\r\n              (isOver18()\r\n                ? \"Enable adult and explicit content to view this \"\r\n                : \"DSD will confirm your saved 18+ eligibility, then enable adult and explicit content to view this \") +\r\n              noun +\r\n              \".\",\r\n            cta: isOver18()\r\n              ? \"Enable adult content\"\r\n              : \"Confirm 18+ and enable\",\r\n            href: \"#enable-adult-content\",\r\n            action: \"enable-adult-content\",\r\n            short: \"Explicit content disabled\",\r\n          }\r\n        : {\r\n              title: \"Adult content \" + noun,\r\n              body:\r\n                \"Log in, verify 18+, and enable adult content to view this \" +\r\n                noun +\r\n                \".\",\r\n              cta: \"Log in\",\r\n              href: loginReturnUrl(),\r\n              short: \"18+\",\r\n            }\r\n      : restriction === \"mature\"\r\n        ? {\r\n            title: \"Age-restricted \" + noun,\r\n            body: \"Log in with age verification to view this \" + noun + \".\",\r\n            cta: \"Log in\",\r\n            href: loginReturnUrl(),\r\n            short: \"Age restricted\",\r\n          }\r\n        : restriction === \"private\"\r\n          ? {\r\n              title: \"Private profile\",\r\n              body: \"Follow this profile to see approved profile posts.\",\r\n              cta: \"Back to discovery\",\r\n              href: \"/pages/users\",\n              short: \"Private\",\r\n            }\r\n          : {\r\n              title: \"DSD+ members only\",\r\n              body: \"This \" + noun + \" is available to active DSD+ members.\",\r\n              cta: \"Get DSD+\",\r\n              href: DSD_PLUS_PURCHASE_URL,\r\n              short: \"DSD+\",\r\n            };\r\n  }\r\n  function restrictedShellActionHTML(copy) {\r\n    copy = copy || {};\r\n    return copy.action === \"enable-adult-content\"\r\n      ? '<button type=\"button\" class=\"dsd-launch-action\" data-dsd-enable-adult-content=\"true\">' +\r\n          html(copy.cta || \"Enable adult content\") +\r\n          \"</button>\"\r\n      : '<a class=\"dsd-launch-action\" href=\"' +\r\n          html(copy.href || \"#\") +\r\n          '\">' +\r\n          html(copy.cta || \"Continue\") +\r\n          \"</a>\";\r\n  }\r\n  function enableAdultContentFromShell(button) {\r\n    if (!hasCustomer()) return Promise.resolve(null);\r\n    var postRoot = button && button.closest(\"[data-post-id]\"),\r\n      targetPostId =\r\n        (postRoot && postRoot.getAttribute(\"data-post-id\")) || \"\";\r\n    if (button) {\r\n      button.disabled = !0;\r\n      button.setAttribute(\"aria-busy\", \"true\");\r\n      button.textContent = \"Enabling...\";\r\n    }\r\n    return readPersistedPrivateProfileForLock(\r\n      activeProfileKeyValue() || profileKey(),\r\n    )\r\n      .then(function (privateProfile) {\r\n        privateProfile &&\r\n          (state.profile = mergePrivateProfileCapabilities(\r\n            state.profile || {},\r\n            privateProfile,\r\n          ));\r\n        if (!isOver18()) {\r\n          var eligibilityError = new Error(\"adult_age_verification_required\");\r\n          eligibilityError.dsdAdultAgeRequired = !0;\r\n          throw eligibilityError;\r\n        }\r\n        return createOrUpdateProfile({ adultContentEnabled: !0 });\r\n      })\r\n      .then(function (saved) {\r\n        if (!saved) throw new Error(\"adult_content_preference_not_saved\");\r\n        qsa('[name=\"adultContentEnabled\"]').forEach(function (field) {\r\n          field.checked = !0;\r\n          delete field.dataset.dsdUserEdited;\r\n        });\r\n        renderStatus(\"Adult and explicit content is enabled.\");\r\n        return rehydrateAuthorizedPost(targetPostId).then(function () {\r\n          return saved;\r\n        });\r\n      })\r\n      .catch(function (error) {\r\n        if (button) {\r\n          button.disabled = !1;\r\n          button.removeAttribute(\"aria-busy\");\r\n          button.textContent = \"Enable adult content\";\r\n        }\r\n        renderStatus(\r\n          error && error.dsdAdultAgeRequired\r\n            ? \"Save an age or birthdate confirming you are 18 or older before enabling explicit content.\"\r\n            : \"Adult content could not be enabled. Try again.\",\r\n        );\r\n        return null;\r\n      });\r\n  }\r\n  function rehydrateAuthorizedPost(postId) {\r\n    postId = String(postId || \"\").trim();\r\n    if (!postId) return (renderAll(), Promise.resolve(null));\r\n    return getDoc(\"posts/\" + postId, {\r\n      force: !0,\r\n      maxAgeMs: 0,\r\n      publicRead: !1,\r\n      viewerAuthenticated: !0,\r\n    })\r\n      .then(function (snap) {\r\n        var record =\r\n          snap && snap.exists && snap.exists() ? snap.data() || {} : null;\r\n        if (!record || !canViewClassified(record))\r\n          throw new Error(\"authorized_post_not_returned\");\r\n        var replacementKeys = counterIdentityKeys(record);\r\n        replacementKeys.push(postId);\r\n        state.posts = mergeRecords(\r\n          (state.posts || []).filter(function (item) {\r\n            return !counterIdentityKeys(item).some(function (key) {\r\n              return replacementKeys.indexOf(key) !== -1;\r\n            });\r\n          }),\r\n          [record],\r\n        );\r\n        renderPosts(\"adult-content-authorized-rehydration\");\r\n        hydrateMediaReads(document);\r\n        return record;\r\n      })\r\n      .catch(function (error) {\r\n        claim(\"adult-content-post:rehydration-failed\", {\r\n          postId: postId,\r\n          error: (error && error.message) || String(error),\r\n          canonical: \"supabase-authenticated-post-read\",\r\n        });\r\n        throw error;\r\n      });\r\n  }\r\n  function publicRenderablePost(record) {\n    if (\n      !isNormalContentRecord(record) ||\n      !publicRecordVisible(record) ||\n      !isApprovedPublicRecord(record) ||\n      !socialRecordAuthorIdentitySafe(record) ||\n      duplicateProfileArtifactKey(\r\n        record.authorProfileKey ||\r\n          record.ownerProfileKey ||\r\n          record.profileKey ||\r\n          \"\",\r\n      ) ||\r\n      (isPersistedGatedShellRecord(record) && !canRenderGatedShell())\r\n    )\r\n      return null;\r\n    var visibility =\r\n        record.visibility ||\r\n        (record.entity && record.entity.visibility) ||\r\n        \"public\",\r\n      restriction = classifiedRestrictionType(record);\r\n    return restriction === \"private\" && !canViewPrivateRecord(record)\r\n      ? null\r\n      : restriction &&\r\n          (!canViewClassified(record) || !canViewPrivateRecord(record))\r\n        ? publicRestrictedShellRecord(record, \"post\", restriction)\r\n        : canViewClassified(record) &&\r\n            canViewPrivateRecord(record) &&\r\n            (visibility === \"public\" ||\n              visibility === \"followers\" ||\n              visibility === \"private\" ||\n              visibility === \"gated\" ||\r\n              restriction === \"gated\" ||\r\n              restriction === \"private\")\r\n          ? record\r\n          : null;\r\n  }\r\n  function publicRenderableStory(record) {\n    if (\n      !isNormalContentRecord(record) ||\n      !publicRecordVisible(record) ||\n      !isApprovedPublicRecord(record) ||\n      !socialRecordAuthorIdentitySafe(record) ||\n      storyExpired(record) ||\r\n      (isPersistedGatedShellRecord(record) && !canRenderGatedShell())\r\n    )\r\n      return null;\r\n    var restriction = classifiedRestrictionType(record);\r\n    return restriction === \"private\" && !canViewPrivateRecord(record)\r\n      ? null\r\n      : restriction &&\r\n          (!canViewClassified(record) || !canViewPrivateRecord(record))\r\n        ? publicRestrictedShellRecord(record, \"story\", restriction)\r\n        : canViewClassified(record) && canViewPrivateRecord(record)\r\n          ? record\r\n          : null;\r\n  }\r\n  function classifiedVisible(record) {\r\n    return !!(\r\n      record &&\r\n      canViewClassified(record) &&\r\n      canViewPrivateRecord(record)\r\n    );\r\n  }\r\n  function storyExpired(record) {\r\n    var explicitExpiry =\r\n        record &&\r\n        (record.expiresAt ||\r\n          record.expires_at ||\r\n          record.expireAt ||\r\n          record.ttl ||\r\n          record.expires),\r\n      expiresAt = valueMillis(explicitExpiry);\r\n    if (!expiresAt && record) {\r\n      var createdAt = valueMillis(\r\n        record.createdAt ||\r\n          record.created_at ||\r\n          record.publishedAt ||\r\n          record.published_at ||\r\n          record.submittedAt ||\r\n          record.submitted_at,\r\n      );\r\n      createdAt && (expiresAt = createdAt + 864e5);\r\n    }\r\n    return !!(expiresAt && expiresAt <= Date.now());\r\n  }\r\n  function activeStoryRecords(items) {\r\n    return (items || []).filter(function (story) {\r\n      return isNormalContentRecord(story) && !storyExpired(story);\r\n    });\r\n  }\r\n  function normalizedRecordState(record) {\r\n    return String(\r\n      (record &&\r\n        (record.status ||\r\n          record.state ||\r\n          record.moderation_state ||\r\n          record.moderationStatus ||\r\n          record.account_state ||\r\n          (record.moderation && record.moderation.state) ||\r\n          (record.entity && record.entity.moderationStatus) ||\r\n          (record.entity && record.entity.moderation_status) ||\r\n          \"\")) ||\r\n        \"\",\r\n    ).toLowerCase();\r\n  }\r\n  function hasTerminalContentFlag(record) {\r\n    return record\r\n      ? record.deleted === !0 ||\r\n          record.isDeleted === !0 ||\r\n          record.archived === !0 ||\r\n          record.isArchived === !0 ||\r\n          record.removed === !0 ||\r\n          record.isRemoved === !0 ||\r\n          record.hidden === !0 ||\r\n          record.isHidden === !0 ||\r\n          !!record.deletedAt ||\r\n          !!record.deleted_at ||\r\n          !!record.archivedAt ||\r\n          !!record.archived_at ||\r\n          !!record.removedAt ||\r\n          !!record.removed_at ||\r\n          !!record.hiddenAt ||\r\n          !!record.hidden_at\r\n      : !1;\r\n  }\r\n  function isNormalContentRecord(record) {\r\n    var stateValue = normalizedRecordState(record),\r\n      postId = clean(\r\n        record && (record.postId || record.legacy_post_id || record.id || \"\"),\r\n        \"\",\r\n      ).toLowerCase();\r\n    return postId.indexOf(\"story-\") === 0 &&\r\n      !record.storyId &&\r\n      !(\r\n        record.entity &&\r\n        String(record.entity.type || \"\")\r\n          .toLowerCase()\r\n          .indexOf(\"story\") !== -1\r\n      )\r\n      ? !1\r\n      : !staleLaunchTestContentRecord(record) &&\r\n          !hasTerminalContentFlag(record) &&\r\n          [\r\n            \"deleted\",\r\n            \"archived\",\r\n            \"removed\",\r\n            \"hidden\",\r\n            \"rejected\",\r\n            \"blocked\",\r\n            \"disabled\",\r\n          ].indexOf(stateValue) === -1;\r\n  }\r\n  function canonicalFounderProfileRecord(record) {\r\n    return !!(\r\n      record &&\r\n      (record.publicDistribution === !0 ||\r\n        (record.entity && record.entity.publicDistribution === !0))\r\n    );\r\n  }\r\n  function recordOwnedByCurrentProfile(record) {\r\n    if (!record || !hasCustomer()) return !1;\r\n    var currentKey = activeProfileKeyValue() || cleanEmpty(profileKey() || \"\"),\r\n      recordKey = cleanEmpty(\r\n        record.authorProfileKey ||\r\n          record.ownerProfileKey ||\r\n          record.profileKey ||\r\n          \"\",\r\n      );\r\n    return identityMatchesCurrent(\r\n      record.ownerUid || record.authorUid || record.uid || record.userId || \"\",\r\n      recordKey,\r\n    )\r\n      ? !0\r\n      : !!(currentKey && recordKey && currentKey === recordKey);\r\n  }\r\n  function normalizePublicDistributionRecord(record) {\r\n    if (!record) return record;\r\n    var status = String(\r\n        record.status ||\r\n          (record.moderation && record.moderation.state) ||\r\n          (record.entity && record.entity.moderationStatus) ||\r\n          \"\",\r\n      ).toLowerCase(),\r\n      visibility = String(\r\n        record.visibility ||\r\n          (record.entity && record.entity.visibility) ||\r\n          \"public\",\r\n      ).toLowerCase();\r\n    return status === \"approved\" &&\n      visibility === \"public\" &&\n      canonicalFounderProfileRecord(record)\r\n      ? Object.assign({}, record, {\r\n          visibility: \"public\",\r\n          entity: Object.assign({}, record.entity || {}, {\r\n            visibility: \"public\",\r\n            moderationStatus: \"approved\",\r\n          }),\r\n        })\r\n      : record;\r\n  }\r\n  function approvedPublicRecords(items) {\r\n    return (items || [])\r\n      .map(normalizePublicDistributionRecord)\r\n      .filter(isApprovedPublicRecord);\r\n  }\r\n  function isAdultAllowed() {\r\n    return isOver18();\r\n  }\r\n  function entityMeta(type, visibility, rating, extra) {\r\n    return Object.assign(\r\n      {\r\n        type: type,\r\n        ownerUid: actorUid(),\r\n        ownerProfileKey: activeProfileKeyValue() || profileKey(),\r\n        visibility: visibility || \"public\",\r\n        contentRating: rating || \"standard\",\r\n        moderationStatus: \"approved\",\r\n        universeId: \"\",\r\n        galaxyId: \"\",\r\n        createdBy: OWNER,\r\n      },\r\n      extra || {},\r\n    );\r\n  }\r\n  function authoredEntityMeta(type, visibility, rating, author, extra) {\r\n    return (\r\n      (author = author || {}),\r\n      Object.assign(entityMeta(type, visibility, rating, extra), {\r\n        ownerUid: author.uid || \"\",\r\n        ownerProfileKey: author.profileKey || \"\",\r\n      })\r\n    );\r\n  }\r\n  function ratingHelp() {\r\n    return \"\";\r\n  }\r\n  function publicationHelpButton(label) {\n    var options = [\n      [\"public\", \"Public: anyone eligible can view\"],\n      [\"followers\", \"Followers: approved followers only\"],\n      [\"private\", \"Private: you and selected access only\"],\n      [\"mature\", \"Mature: verified adults only\"],\n      [\"explicit\", \"Explicit: adults with explicit content enabled\"],\n      [\"gated\", \"Gated: active DSD+ members only\"],\n    ].filter(function (item) {\n      return publicationOptionAllowed(item[0]);\n    });\n    var title = options.map(function (item) { return \"- \" + item[1]; }).join(\"\\n\");\n    return (\r\n      '<span class=\"dsd-publication-help\" role=\"note\"><button type=\"button\" aria-label=\"' +\r\n      html((label || \"Content\") + \" audience help\") +\r\n      '\" title=\"' +\r\n      html(title) +\r\n      '\">?</button><span role=\"tooltip\">' +\r\n      html(title) +\r\n      \"</span></span>\"\r\n    );\r\n  }\r\n  function publicationOptionAllowed(value) {\n    value = String(value || \"public\").toLowerCase();\n    return value === \"public\" || value === \"followers\" || value === \"private\"\n      ? !0\n      : canModerate() && [\"mature\", \"explicit\", \"gated\"].indexOf(value) !== -1;\n  }\r\n  function publicationOptionAllowedForForm(value, form) {\r\n    if (\r\n      ((value = String(value || \"public\").toLowerCase()),\r\n      !form || !form.matches || !form.matches(\"[data-dsd-profile-setup-form]\"))\r\n    )\r\n      return publicationOptionAllowed(value);\r\n    return publicationOptionAllowed(value);\n  }\r\n  function publicationOptionHTML(value, label) {\n    var allowed = publicationOptionAllowed(value);\n    if (!allowed) return \"\";\n    return (\n      '<option value=\"' +\r\n      html(value) +\n      '\"' +\n      ' data-dsd-publication-option=\"' +\r\n      html(value) +\r\n      '\">' +\r\n      html(label || value) +\r\n      \"</option>\"\r\n    );\r\n  }\r\n  function publicationOptions(label) {\n    var profilePrivacy = String(label || \"\").toLowerCase() === \"profile\";\n    var select =\n      '<select name=\"visibility\" aria-label=\"' +\r\n      html(label || \"Content\") +\r\n      ' visibility\" data-dsd-publication-policy=\"viewer-capability\">' +\r\n      publicationOptionHTML(\"public\", \"Public\") +\n      (profilePrivacy\n        ? publicationOptionHTML(\"private\", \"Private\")\n        : publicationOptionHTML(\"followers\", \"Followers\") +\n          publicationOptionHTML(\"private\", \"Private\") +\n          publicationOptionHTML(\"mature\", \"Mature\") +\n          publicationOptionHTML(\"explicit\", \"Explicit\") +\n          publicationOptionHTML(\"gated\", \"Gated\")) +\n      \"</select>\";\r\n    return (\r\n      '<span class=\"dsd-publication-control\">' +\r\n      select +\r\n      publicationHelpButton(label || \"Content\") +\r\n      \"</span>\"\r\n    );\r\n  }\r\n  function composerPolicyTools(label) {\n    return (\n      '<span class=\"dsd-composer-policy-tools\" data-dsd-composer-policy-tools>' +\n      publicationOptions(label || \"Post\") +\n      privatePostAudienceHTML(label || \"Post\") +\n      \"</span>\"\n    );\n  }\n  function privatePostAudienceHTML(label) {\n    if (String(label || \"\").toLowerCase() !== \"post\") return \"\";\n    return (\n      '<section class=\"dsd-private-post-audience\" data-dsd-private-post-audience hidden>' +\n      '<label><span>Choose people</span><input type=\"search\" name=\"privateRecipientSearch\" autocomplete=\"off\" placeholder=\"Search profiles\" aria-label=\"Search people who can see this private post\"></label>' +\n      '<div class=\"dsd-private-post-audience__selected\" data-dsd-private-post-audience-selected aria-live=\"polite\"></div>' +\n      '<div class=\"dsd-private-post-audience__results\" data-dsd-private-post-audience-results role=\"listbox\" hidden></div>' +\n      '<small>Only selected people can view this private post. Recipient identities stay private.</small>' +\n      \"</section>\"\n    );\n  }\n  function privatePostRecipientKeys(form, required) {\n    var audience = form && qs(\"[data-dsd-private-post-audience]\", form),\n      keys = audience\n        ? String(audience.getAttribute(\"data-dsd-recipient-profile-keys\") || \"\")\n            .split(\",\")\n            .map(normalizedProfileKeyValue)\n            .filter(Boolean)\n            .filter(function (value, index, values) {\n              return values.indexOf(value) === index;\n            })\n            .slice(0, 50)\n        : [];\n    if (required && !keys.length) {\n      renderStatus(\"Choose at least one person for this private post.\");\n      return null;\n    }\n    return keys;\n  }\n  function bindPrivatePostAudience(root) {\n    qsa(\n      \"[data-dsd-canonical-composer], [data-dsd-global-post-composer], [data-dsd-post-audience-editor-form]\",\n      root || document,\n    ).forEach(function (form) {\n      var audience = qs(\"[data-dsd-private-post-audience]\", form),\n        visibility = qs('select[name=\"visibility\"]', form);\n      if (!audience || !visibility) return;\n      function selectedKeys() {\n        return privatePostRecipientKeys(form, !1) || [];\n      }\n      function selectedProfile(key) {\n        return publicProfileByKey(key) || { profileKey: key, handle: key, displayName: key };\n      }\n      function renderSelected() {\n        var selected = qs(\"[data-dsd-private-post-audience-selected]\", audience),\n          keys = selectedKeys();\n        if (!selected) return;\n        selected.innerHTML = keys.length\n          ? keys\n              .map(function (key) {\n                var profile = selectedProfile(key);\n                return (\n                  '<button type=\"button\" data-dsd-private-recipient-remove=\"' +\n                  html(key) +\n                  '\" aria-label=\"Remove ' +\n                  html(profile.displayName || key) +\n                  '\"><span>' +\n                  html(profile.displayName || key) +\n                  '</span><small>@' +\n                  html(key) +\n                  \"</small><b aria-hidden=\\\"true\\\">&times;</b></button>\"\n                );\n              })\n              .join(\"\")\n          : '<span class=\"dsd-private-post-audience__empty\">No one selected yet.</span>';\n      }\n      function setKeys(keys) {\n        audience.setAttribute(\n          \"data-dsd-recipient-profile-keys\",\n          keys\n            .map(normalizedProfileKeyValue)\n            .filter(Boolean)\n            .filter(function (value, index, values) {\n              return values.indexOf(value) === index;\n            })\n            .slice(0, 50)\n            .join(\",\"),\n        );\n        renderSelected();\n      }\n      function renderResults(items) {\n        var results = qs(\"[data-dsd-private-post-audience-results]\", audience),\n          ownKey = normalizedProfileKeyValue(activeProfileKeyValue() || profileKey()),\n          selected = selectedKeys();\n        if (!results) return;\n        items = (items || []).filter(function (profile) {\n          var key = normalizedProfileKeyValue(profile && (profile.profileKey || profile.handle));\n          return key && key !== ownKey && selected.indexOf(key) === -1;\n        });\n        results.innerHTML = items.length\n          ? items\n              .slice(0, 8)\n              .map(function (profile) {\n                var key = normalizedProfileKeyValue(profile.profileKey || profile.handle),\n                  avatarMedia = canonicalProfileAvatarMediaId(profile),\n                  avatar = avatarMedia\n                    ? '<span data-dsd-avatar-media-id=\"' + html(avatarMedia) + '\"><img src=\"' + html(mediaReadProxyUrl(avatarMedia)) + '\" alt=\"\" loading=\"lazy\"></span>'\n                    : '<span>' + html(initials(profile.displayName || key)) + \"</span>\";\n                return '<button type=\"button\" role=\"option\" data-dsd-private-recipient-add=\"' + html(key) + '\">' + avatar + '<strong>' + html(profile.displayName || key) + '</strong><small>@' + html(key) + \"</small></button>\";\n              })\n              .join(\"\")\n          : \"\";\n        results.hidden = !items.length;\n        hydrateAvatarMedia(results);\n      }\n      function syncVisibility() {\n        var privateMode = String(visibility.value || \"\") === \"private\";\n        audience.hidden = !privateMode;\n        audience.setAttribute(\"aria-hidden\", String(!privateMode));\n        if (privateMode) renderSelected();\n      }\n      if (form.dataset.dsdPrivateAudienceBound !== BUILD) {\n        form.dataset.dsdPrivateAudienceBound = BUILD;\n        var search = qs('input[name=\"privateRecipientSearch\"]', audience),\n          sequence = 0;\n        visibility.addEventListener(\"change\", syncVisibility);\n        search && search.addEventListener(\"input\", function () {\n          var token = normalizedMentionProfileKey(search.value),\n            requestSequence = ++sequence,\n            local = mentionSuggestionProfiles(token);\n          if (!token) return renderResults([]);\n          if (local.length) renderResults(local);\n          requestMentionSuggestionProfiles(token).then(function (remote) {\n            if (requestSequence === sequence && normalizedMentionProfileKey(search.value) === token)\n              renderResults(remote);\n          });\n        });\n        audience.addEventListener(\"click\", function (event) {\n          var add = event.target.closest && event.target.closest(\"[data-dsd-private-recipient-add]\"),\n            remove = event.target.closest && event.target.closest(\"[data-dsd-private-recipient-remove]\"),\n            keys = selectedKeys();\n          if (add) {\n            event.preventDefault();\n            var addKey = normalizedProfileKeyValue(add.getAttribute(\"data-dsd-private-recipient-add\"));\n            addKey && keys.indexOf(addKey) === -1 && keys.push(addKey);\n            setKeys(keys);\n            if (search) ((search.value = \"\"), search.focus());\n            renderResults([]);\n          } else if (remove) {\n            event.preventDefault();\n            var removeKey = normalizedProfileKeyValue(remove.getAttribute(\"data-dsd-private-recipient-remove\"));\n            setKeys(keys.filter(function (key) { return key !== removeKey; }));\n          }\n        });\n        form.addEventListener(\"reset\", function () {\n          window.setTimeout(function () {\n            setKeys([]);\n            renderResults([]);\n            syncVisibility();\n          }, 0);\n        });\n      }\n      syncVisibility();\n    });\n  }\n  function postPollComposerHTML() {\n    var premiumDurations = hasDsdPlus()\n      ? '<option value=\"21600\">15 days</option><option value=\"43200\">30 days</option><option value=\"custom\">Custom end date</option>'\n      : \"\",\n      currentProfile = state.profile || {},\n      currentCity = currentProfile.locationCity || currentProfile.location_city || \"\",\n      currentState = currentProfile.locationState || currentProfile.location_state || \"\";\n    return (\n      '<div class=\"dsd-poll-composer\" data-dsd-poll-composer>' +\n      '<button type=\"button\" class=\"dsd-poll-composer__toggle\" data-dsd-poll-toggle aria-expanded=\"false\">Add poll</button>' +\n      '<fieldset data-dsd-poll-fields hidden><legend>Poll choices</legend>' +\n      '<div data-dsd-poll-options>' +\n      '<label><span>Choice 1</span><input name=\"pollOption\" maxlength=\"120\" autocomplete=\"off\"></label>' +\n      '<label><span>Choice 2</span><input name=\"pollOption\" maxlength=\"120\" autocomplete=\"off\"></label>' +\n      '</div><div class=\"dsd-poll-composer__controls\">' +\n      '<button type=\"button\" data-dsd-poll-add-option>Add choice</button>' +\n      '<label><span>Duration</span><select name=\"pollDuration\" aria-label=\"Poll duration\">' +\n      '<option value=\"60\">1 hour</option><option value=\"360\">6 hours</option>' +\n      '<option value=\"1440\" selected>24 hours</option><option value=\"4320\">3 days</option>' +\n      '<option value=\"10080\">7 days</option>' + premiumDurations + '</select></label>' +\n      (hasDsdPlus()\n        ? '<label data-dsd-poll-custom-end hidden><span>Custom end</span><input type=\"datetime-local\" name=\"pollEndsAt\" aria-label=\"Custom Poll end date and time\"></label>'\n        : \"\") +\n      '</div>' +\n      '<div class=\"dsd-poll-composer__map-area\"><strong>Map area <small>optional</small></strong>' +\n      '<label><span>City</span><input name=\"mapAreaCity\" maxlength=\"80\" autocomplete=\"address-level2\" value=\"' + html(currentCity) + '\"></label>' +\n      '<label><span>State</span><input name=\"mapAreaState\" maxlength=\"40\" autocomplete=\"address-level1\" value=\"' + html(currentState) + '\"></label>' +\n      '<small>Associates this Poll with a broad area. It does not change your location.</small></div>' +\n      '<p class=\"dsd-poll-composer__help\">Use the post text as the question. Add 2 to 4 unique choices.</p>' +\n      '</fieldset></div>'\n    );\n  }\n  function resetPostPollComposer(form) {\n    var fields = form && qs(\"[data-dsd-poll-fields]\", form),\n      toggle = form && qs(\"[data-dsd-poll-toggle]\", form),\n      options = form && qs(\"[data-dsd-poll-options]\", form);\n    if (fields) fields.hidden = !0;\n    if (toggle) {\n      toggle.setAttribute(\"aria-expanded\", \"false\");\n      toggle.textContent = \"Add poll\";\n    }\n    if (options)\n      options.innerHTML =\n        '<label><span>Choice 1</span><input name=\"pollOption\" maxlength=\"120\" autocomplete=\"off\"></label>' +\n        '<label><span>Choice 2</span><input name=\"pollOption\" maxlength=\"120\" autocomplete=\"off\"></label>';\n    var customEnd = form && qs(\"[data-dsd-poll-custom-end]\", form);\n    if (customEnd) customEnd.hidden = !0;\n  }\n  function postPollInput(form) {\n    var fields = form && qs(\"[data-dsd-poll-fields]\", form);\n    if (!fields || fields.hidden) return null;\n    var options = qsa('input[name=\"pollOption\"]', fields).map(function (input) {\n        return String(input.value || \"\").trim().slice(0, 120);\n      }),\n      normalized = options.map(function (option) {\n        return option.toLowerCase();\n      }),\n      durationValue = String((qs('[name=\"pollDuration\"]', fields) || {}).value || \"1440\"),\n      duration = Number(durationValue),\n      customEndsAtInput = qs('[name=\"pollEndsAt\"]', fields),\n      customEndsAt = customEndsAtInput && customEndsAtInput.value\n        ? new Date(customEndsAtInput.value).toISOString()\n        : \"\",\n      body = String((qs('[name=\"body\"]', form) || {}).value || \"\").trim();\n    if (!body) {\n      renderStatus(\"Add a Poll question in the post text.\");\n      return !1;\n    }\n    if (options.length < 2 || options.length > 4 || options.some(function (option) { return !option; })) {\n      renderStatus(\"Polls require 2 to 4 completed choices.\");\n      return !1;\n    }\n    if (new Set(normalized).size !== normalized.length) {\n      renderStatus(\"Poll choices must be unique.\");\n      return !1;\n    }\n    if (durationValue === \"custom\") {\n      if (!hasDsdPlus() || !customEndsAt || Date.parse(customEndsAt) <= Date.now()) {\n        renderStatus(\"Choose a future Poll end date.\");\n        return !1;\n      }\n      duration = Math.ceil((Date.parse(customEndsAt) - Date.now()) / 60000);\n    }\n    if (\n      [60, 360, 1440, 4320, 10080].indexOf(duration) === -1 &&\n      (!hasDsdPlus() || duration < 15 || duration > 525600)\n    ) {\n      renderStatus(\"Choose a valid Poll duration.\");\n      return !1;\n    }\n    var mapAreaCity = String((qs('[name=\"mapAreaCity\"]', fields) || {}).value || \"\").trim().slice(0, 80),\n      mapAreaState = String((qs('[name=\"mapAreaState\"]', fields) || {}).value || \"\").trim().slice(0, 40);\n    if ((mapAreaCity && !mapAreaState) || (!mapAreaCity && mapAreaState)) {\n      renderStatus(\"Add both city and state for a Map area, or leave both blank.\");\n      return !1;\n    }\n    return { options: options, durationMinutes: duration, endsAt: customEndsAt, mapAreaCity: mapAreaCity, mapAreaState: mapAreaState };\n  }\n  function composerCountHTML(limit) {\n    var max = Number(limit || MAX.body || 5e3);\r\n    return (\r\n      (!Number.isFinite(max) || max < 1) && (max = 5e3),\r\n      '<span data-dsd-composer-count data-dsd-composer-limit=\"' +\r\n        html(max) +\r\n        '\">0 / ' +\r\n        html(max) +\r\n        \"</span>\"\r\n    );\r\n  }\r\n  function deconstructDuplicateComposerHelp(root) {\r\n    qsa(\r\n      \"[data-dsd-canonical-composer], [data-dsd-global-post-composer], [data-dsd-story-form], [data-dsd-comment-form], [data-dsd-message-form], .dsd-post-composer\",\r\n      root || document,\r\n    ).forEach(function (form) {\r\n      var controls = qsa(\".dsd-publication-control\", form);\r\n      controls.forEach(function (control, index) {\r\n        index > 0 && control.remove();\r\n      });\r\n      var activeControl = qs(\".dsd-publication-control\", form);\r\n      qsa(\".dsd-publication-help\", form).forEach(function (item) {\r\n        activeControl && !activeControl.contains(item) && item.remove();\r\n      });\r\n      var helpItems = activeControl\r\n        ? qsa(\".dsd-publication-help\", activeControl)\r\n        : qsa(\".dsd-publication-help\", form);\r\n      (helpItems.forEach(function (item, index) {\r\n        index > 0\r\n          ? item.remove()\r\n          : item.setAttribute(\"data-dsd-publication-help-canonical\", \"true\");\r\n      }),\r\n        qsa(\"[data-dsd-activation-status]\", form).forEach(function (item) {\r\n          String(item.textContent || \"\").trim() || item.remove();\r\n        }),\r\n        qsa('textarea[name=\"body\"]', form).forEach(function (textarea) {\r\n          form.matches(\"[data-dsd-story-form]\")\r\n            ? textarea.setAttribute(\"rows\", \"2\")\r\n            : textarea.setAttribute(\"rows\", \"1\");\r\n        }),\r\n        qsa(\".dsd-content-rating-help\", form).forEach(function (item) {\r\n          item.remove();\r\n        }),\r\n        qsa(\".dsd-publication-control\", form).forEach(function (control) {\r\n          var select = qs('select[name=\"visibility\"]', control);\r\n          select &&\r\n            control.setAttribute(\"data-dsd-composer-policy-inline\", \"true\");\r\n        }));\r\n    });\r\n  }\r\n  function updateComposerCounters(root) {\r\n    var forms = [];\r\n    (root && root.matches && root.matches(\"form\")\r\n      ? (forms = [root])\r\n      : (forms = qsa(\"form\", root || document)),\r\n      forms.forEach(function (form) {\r\n        var textarea = qs('textarea[name=\"body\"]', form),\r\n          counter = qs(\"[data-dsd-composer-count]\", form);\r\n        if (!(!textarea || !counter)) {\r\n          var limit = Number(\r\n            counter.getAttribute(\"data-dsd-composer-limit\") ||\r\n              textarea.getAttribute(\"maxlength\") ||\r\n              MAX.body ||\r\n              5e3,\r\n          );\r\n          ((!Number.isFinite(limit) || limit < 1) && (limit = 5e3),\r\n            (counter.textContent =\r\n              String(String(textarea.value || \"\").length) +\r\n              \" / \" +\r\n              String(limit)));\r\n        }\r\n      }));\r\n  }\r\n  function refreshPublicationControls(root) {\n    (qsa('select[name=\"visibility\"]', root || document).forEach(\r\n      function (select) {\r\n        var form = select.closest && select.closest(\"form\");\r\n        (select.setAttribute(\r\n          \"data-dsd-publication-policy\",\r\n          \"viewer-capability\",\r\n        ),\r\n          qsa(\"option\", select).forEach(function (option) {\r\n            ((option.disabled = !publicationOptionAllowedForForm(\r\n              option.value,\r\n              form,\r\n            )),\r\n              (option.hidden = !1));\r\n          }),\r\n          publicationOptionAllowedForForm(select.value, form) ||\r\n            (select.value = \"public\"));\r\n      },\r\n    ),\r\n      deconstructDuplicateComposerHelp(root || document),\n      bindPrivatePostAudience(root || document));\n  }\r\n  function claim(surface, meta) {\r\n    try {\r\n      var r = window.DSDRegistry || window.DSDRuntimeRegistry;\r\n      r &&\r\n        typeof r.claim == \"function\" &&\r\n        r.claim(\r\n          surface,\r\n          OWNER,\r\n          Object.assign({ version: VERSION }, meta || {}),\r\n        );\r\n    } catch (e) {}\r\n  }\r\n  function emit(name, detail) {\r\n    try {\r\n      window.dispatchEvent(\r\n        new CustomEvent(\"dsd:launch-social:\" + name, { detail: detail || {} }),\r\n      );\r\n    } catch (e) {}\r\n  }\r\n  function draftQueue() {\n    try {\n      localStorage.removeItem(DRAFT_QUEUE_KEY);\n    } catch (e) {\n    }\n    return (state.draftQueueItems || []).slice();\n  }\n  function saveDraftQueue(items) {\n    state.draftQueueItems = (items || []).slice(-100);\n    try { localStorage.removeItem(DRAFT_QUEUE_KEY); } catch (e) {}\n  }\r\n  function redactDraftText(value) {\r\n    return String(value || \"\")\r\n      .replace(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}/gi, \"[redacted-email]\")\r\n      .replace(\r\n        /\\b(customer|shopifyCustomerId|customerId|uid|userId|user_id|ownerUid|authorUid|sourceUid|targetUid)\\b[\"']?\\s*:\\s*[\"']?[^\"',}\\s]+/gi,\r\n        \"$1:[redacted-id]\",\r\n      )\r\n      .slice(0, 240);\r\n  }\r\n  function publicDraftQueueSummary(items) {\n    return (items || []).map(function (item) {\n      return {\n        id: String((item && item.id) || \"\").slice(0, 96),\n        type: String((item && item.type) || \"\").slice(0, 80),\n        queuedAt: (item && item.queuedAt) || \"\",\n        canonical: (item && item.canonical) || \"\",\n        error: redactDraftText((item && item.error) || \"\"),\n        payloadKeys: Array.isArray(item && item.payloadKeys)\n          ? item.payloadKeys.slice(0, 20)\n          : [],\n      };\n    });\n  }\n  function purgeRetiredSideEffectDraftQueue() {\r\n    try {\r\n      if (\r\n        !window.localStorage ||\r\n        localStorage.getItem(DRAFT_QUEUE_PURGE_KEY) === BUILD\r\n      )\r\n        return;\r\n      var removed = 0,\r\n        keep = draftQueue().filter(function (item) {\r\n          var type = String((item && item.type) || \"\"),\r\n            error = String((item && item.error) || \"\"),\r\n            derivedSideEffect =\r\n              /^(story-watch|story-watch-counter|message-read|notification-mark-read|notification-mark-all-read|public-follower-count|moderation-queue-|source-record-state|legacy-user-story-shadow|post-view-counter|founder-audit|profile-governance)/i.test(\r\n                type,\r\n              ),\r\n            retiredFailure =\r\n              /missing or insufficient permissions|row-level security|42501|firebase-required|rollback/i.test(\r\n                error + \" \" + String((item && item.canonical) || \"\"),\r\n              );\r\n          return derivedSideEffect && retiredFailure\r\n            ? ((removed += 1), !1)\r\n            : !0;\r\n        });\r\n      (removed &&\r\n        (saveDraftQueue(keep),\r\n        (state.draftQueueItems = keep),\n        claim(\"draft-queue:retired-side-effects-purged\", {\r\n          removed: removed,\r\n          kept: keep.length,\r\n          policy: \"preserve-user-authored-drafts\",\r\n        })),\r\n        localStorage.setItem(DRAFT_QUEUE_PURGE_KEY, BUILD));\r\n    } catch (e) {}\r\n  }\r\n  function clearRecoveredUploadDraftStatus() {\r\n    var staleUploadStatus = /draft saved locally\\. upload is still finishing/i,\r\n      changed = !1,\r\n      remaining = draftQueue().filter(function (item) {\r\n        var type = String((item && item.type) || \"\"),\r\n          error = String((item && item.error) || \"\"),\r\n          recovered =\r\n            /media|upload|wasabi|composer-timeout|orphan-media-parent-repair/i.test(\r\n              type + \" \" + error,\r\n            );\r\n        return (recovered && (changed = !0), !recovered);\r\n      });\r\n    (changed && (saveDraftQueue(remaining), (state.draftQueueItems = remaining)),\n      qsa(\"[data-dsd-activation-status], [data-dsd-upload-status]\").forEach(\r\n        function (node) {\r\n          staleUploadStatus.test(String(node.textContent || \"\")) &&\r\n            (node.textContent = \"\");\r\n        },\r\n      ));\r\n    try {\r\n      staleUploadStatus.test(\r\n        document.documentElement.getAttribute(\"data-dsd-last-draft-error\") ||\r\n          \"\",\r\n      ) &&\r\n        (document.documentElement.removeAttribute(\"data-dsd-last-draft-type\"),\r\n        document.documentElement.removeAttribute(\"data-dsd-last-draft-error\"),\r\n        document.documentElement.removeAttribute(\"data-dsd-last-draft-at\"));\r\n    } catch (e) {}\r\n  }\r\n  function deletedPostTombstones() {\r\n    try {\r\n      return JSON.parse(localStorage.getItem(DELETED_POSTS_KEY) || \"{}\") || {};\r\n    } catch (e) {\r\n      return {};\r\n    }\r\n  }\r\n  function saveDeletedPostTombstones(items) {\r\n    try {\r\n      localStorage.setItem(DELETED_POSTS_KEY, JSON.stringify(items || {}));\r\n    } catch (e) {}\r\n  }\r\n  function postStateOverrides() {\r\n    try {\r\n      return (\r\n        JSON.parse(localStorage.getItem(POST_STATE_OVERRIDES_KEY) || \"{}\") || {}\r\n      );\r\n    } catch (e) {\r\n      return {};\r\n    }\r\n  }\r\n  function savePostStateOverrides(items) {\r\n    try {\r\n      localStorage.setItem(\r\n        POST_STATE_OVERRIDES_KEY,\r\n        JSON.stringify(items || {}),\r\n      );\r\n    } catch (e) {}\r\n  }\r\n  function localOverrideMillis(value) {\r\n    try {\r\n      if (!value) return 0;\r\n      if (typeof value == \"string\") return Date.parse(value) || 0;\r\n      if (value.localOverrideAt) return Date.parse(value.localOverrideAt) || 0;\r\n      if (value.deletedAt) return Date.parse(value.deletedAt) || 0;\r\n      if (value.updatedAt) return valueMillis(value.updatedAt);\r\n    } catch (e) {}\r\n    return 0;\r\n  }\r\n  function localOverrideFresh(value) {\r\n    var stamp = localOverrideMillis(value);\r\n    return !!(stamp && Date.now() - stamp <= LOCAL_POST_OVERRIDE_TTL_MS);\r\n  }\r\n  function serverDeletedState(record) {\r\n    var stateValue = normalizedRecordState(record);\r\n    return (\r\n      [\r\n        \"deleted\",\r\n        \"archived\",\r\n        \"removed\",\r\n        \"hidden\",\r\n        \"rejected\",\r\n        \"blocked\",\r\n        \"disabled\",\r\n        \"expired\",\r\n      ].indexOf(stateValue) !== -1\r\n    );\r\n  }\r\n  function shouldApplyLocalPostTombstone(key, record) {\r\n    return !key || !state.localDeletedPostIds[key]\r\n      ? !1\r\n      : serverDeletedState(record)\r\n        ? !0\r\n        : localOverrideFresh(state.localDeletedPostIds[key]);\r\n  }\r\n  function shouldApplyLocalPostOverride(key, record) {\r\n    var override = key && state.localPostStateOverrides[key];\r\n    return override\r\n      ? serverDeletedState(record)\r\n        ? !0\r\n        : localOverrideFresh(override)\r\n      : !1;\r\n  }\r\n  function pruneExpiredLocalPostOverrides() {\r\n    var deletedChanged = !1;\r\n    (Object.keys(state.localDeletedPostIds || {}).forEach(function (key) {\r\n      localOverrideFresh(state.localDeletedPostIds[key]) ||\r\n        (delete state.localDeletedPostIds[key], (deletedChanged = !0));\r\n    }),\r\n      deletedChanged && saveDeletedPostTombstones(state.localDeletedPostIds));\r\n    var stateChanged = !1;\r\n    (Object.keys(state.localPostStateOverrides || {}).forEach(function (key) {\r\n      localOverrideFresh(state.localPostStateOverrides[key]) ||\r\n        (delete state.localPostStateOverrides[key], (stateChanged = !0));\r\n    }),\r\n      stateChanged && savePostStateOverrides(state.localPostStateOverrides));\r\n  }\r\n  function commentStateOverrides() {\r\n    try {\r\n      return (\r\n        JSON.parse(localStorage.getItem(COMMENT_STATE_OVERRIDES_KEY) || \"{}\") ||\r\n        {}\r\n      );\r\n    } catch (e) {\r\n      return {};\r\n    }\r\n  }\r\n  function saveCommentStateOverrides(items) {\r\n    try {\r\n      localStorage.setItem(\r\n        COMMENT_STATE_OVERRIDES_KEY,\r\n        JSON.stringify(items || {}),\r\n      );\r\n    } catch (e) {}\r\n  }\r\n  function savedStateOverrides() {\r\n    try {\r\n      localStorage.removeItem(SAVED_STATE_OVERRIDES_KEY);\r\n    } catch (e) {}\r\n    return {};\r\n  }\r\n  function saveSavedStateOverrides() {\r\n    try {\r\n      localStorage.removeItem(SAVED_STATE_OVERRIDES_KEY);\r\n    } catch (e) {}\r\n  }\r\n  function setLocalSavedState(targetId, stateValue) {\r\n    targetId &&\r\n      ((state.localSavedStateOverrides[targetId] = stateValue),\r\n      saveSavedStateOverrides(state.localSavedStateOverrides));\r\n  }\r\n  function clearLocalSavedState(targetId) {\r\n    if (!targetId) return;\r\n    delete state.localSavedStateOverrides[targetId];\r\n    saveSavedStateOverrides(state.localSavedStateOverrides);\r\n  }\r\n  function syncSaveButtons(targetId, saved) {\r\n    qsa(\"[data-dsd-save-post]\").forEach(function (button) {\r\n      if (button.getAttribute(\"data-dsd-save-post\") === targetId) {\r\n        (button.setAttribute(\"aria-pressed\", saved ? \"true\" : \"false\"),\r\n          button.setAttribute(\r\n            \"aria-label\",\r\n            saved ? \"Unsave post\" : \"Save post\",\r\n          ),\r\n          button.setAttribute(\"title\", saved ? \"Saved\" : \"Save\"));\r\n        var label = qs(\".dsd-launch-action-text\", button);\r\n        label\r\n          ? (label.textContent = saved ? \"Saved\" : \"Save\")\r\n          : (button.textContent = saved ? \"Saved\" : \"Save\");\r\n      }\r\n    });\r\n  }\r\n  function reactionIconHTML(type) {\n    type = String(type || \"like\").toLowerCase();\n    var paths = {\n      like: '<path d=\"M7 10v10H4V10h3Zm3 10V9l4-6 1 1v5h4.2a1.8 1.8 0 0 1 1.76 2.2l-1.5 7A2.3 2.3 0 0 1 17.2 20H10Z\"/>',\n      love: '<path d=\"M12 20.3 4.7 13A4.8 4.8 0 0 1 11.5 6.2l.5.5.5-.5A4.8 4.8 0 0 1 19.3 13L12 20.3Z\"/>',\n      laugh: '<circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M8.5 9h.01M15.5 9h.01M7.8 13.2c1.2 4.1 7.2 4.1 8.4 0H7.8Z\"/>',\n      wow: '<circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M8.5 9h.01M15.5 9h.01\"/><circle cx=\"12\" cy=\"15\" r=\"2\"/>',\n      sad: '<circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M8.5 9h.01M15.5 9h.01M8.5 16c1.8-2.3 5.2-2.3 7 0\"/>',\n      angry: '<circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"m7.8 8.5 2.4 1M16.2 8.5l-2.4 1M8.5 16c1.8-2.3 5.2-2.3 7 0\"/>',\n    };\n    return (\n      '<svg class=\"dsd-reaction-icon dsd-reaction-icon--' +\n      html(type) +\n      '\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">' +\n      (paths[type] || paths.like) +\n      \"</svg>\"\n    );\n  }\n  function reactionLabel(type) {\n    type = String(type || \"like\").toLowerCase();\n    return type.charAt(0).toUpperCase() + type.slice(1);\n  }\n  function reactionChoices() {\n    return [\"like\", \"love\", \"laugh\", \"wow\", \"sad\", \"angry\"];\n  }\n  function postReactionChoiceCountHTML(postId, reactionType) {\n    var summary = state.postReactionSummariesByPost[postId] || {},\n      counts = summary.counts || {},\n      count = Math.max(0, Number(counts[reactionType] || 0));\n    return (\n      '<span class=\"dsd-post-reaction__choice-count\" data-dsd-post-reaction-count=\"' +\n      html(reactionType) +\n      '\">' +\n      html(count) +\n      \"</span>\"\n    );\n  }\n  function postReactionSummaryHTML(postId, fallbackTotal) {\n    var summary = state.postReactionSummariesByPost[postId] || {},\n      total = Math.max(Number(summary.total || 0), Number(fallbackTotal || 0));\n    return (\n      '<span class=\"dsd-post-reaction__summary\" aria-label=\"' +\n      html(total + \" reactions\") +\n      '\"><strong>' +\n      html(total) +\n      \"</strong></span>\"\n    );\n  }\n  function syncReactionButtons(postId, active, data) {\n    var reactionType = active\n        ? String(\n            (data && (data.reactionType || data.reaction_type)) ||\n              state.reactionsByPost[postId] ||\n              \"like\",\n          )\n        : \"\",\n      reactionLabel = reactionType\n        ? reactionType.charAt(0).toUpperCase() + reactionType.slice(1)\n        : \"React\";\n    reactionIdentityKeys(postId, data).forEach(function (key) {\n      qsa(\n        '[data-dsd-toggle-post-reactions][data-post-id=\"' +\n          cssAttrValue(key) +\n          '\"]',\n      ).forEach(function (button) {\n        (button.setAttribute(\"aria-pressed\", active ? \"true\" : \"false\"),\n          button.setAttribute(\n            \"aria-label\",\n            active ? reactionLabel + \" reaction selected\" : \"Choose a reaction\",\n          ),\n          button.setAttribute(\"title\", active ? reactionLabel : \"React\"));\n        var label = qs(\".dsd-launch-action-text\", button);\n        label && (label.textContent = reactionLabel);\n        var icon = qs(\".dsd-post-reaction__selected-emoji\", button);\n        icon && (icon.innerHTML = reactionIconHTML(reactionType || \"like\"));\n        var count = qs(\".dsd-post-reaction__summary strong\", button),\n          summary = state.postReactionSummariesByPost[key];\n        count && summary && (count.textContent = String(summary.total || 0));\n      });\n      qsa(\n        '[data-dsd-post-reaction][data-post-id=\"' +\n          cssAttrValue(key) +\n          '\"]',\n      ).forEach(function (choice) {\n        var choiceType = String(\n          choice.getAttribute(\"data-dsd-post-reaction\") || \"\",\n        ).toLowerCase();\n        choice.setAttribute(\n          \"aria-pressed\",\n          active && choiceType === reactionType ? \"true\" : \"false\",\n        );\n        var choiceCount = qs(\"[data-dsd-post-reaction-count]\", choice),\n          choiceSummary = state.postReactionSummariesByPost[key] || {},\n          choiceCounts = choiceSummary.counts || {};\n        choiceCount &&\n          (choiceCount.textContent = String(\n            Math.max(0, Number(choiceCounts[choiceType] || 0)),\n          ));\n      });\n    });\n  }\n  function closePostReactionTrays(focusRoot) {\n    qsa(\".dsd-post-reaction__tray\", document).forEach(function (tray) {\n      tray.hidden = !0;\n      tray.removeAttribute(\"style\");\n    });\n    qsa(\"[data-dsd-toggle-post-reactions]\", document).forEach(\n      function (button) {\n        button.setAttribute(\"aria-expanded\", \"false\");\n      },\n    );\n    var toggle = focusRoot && qs(\"[data-dsd-toggle-post-reactions]\", focusRoot);\n    if (toggle && typeof toggle.focus == \"function\") {\n      try {\n        toggle.focus({ preventScroll: !0 });\n      } catch (error) {\n        toggle.focus();\n      }\n    }\n  }\n  function positionReactionTray(trigger, tray) {\n    if (!trigger || !tray || tray.hidden) return;\n    var viewportWidth = Math.max(240, window.visualViewport ? window.visualViewport.width : window.innerWidth),\n      viewportHeight = Math.max(320, window.visualViewport ? window.visualViewport.height : window.innerHeight),\n      inset = 12,\n      triggerRect = trigger.getBoundingClientRect();\n    tray.style.position = \"fixed\";\n    tray.style.left = inset + \"px\";\n    tray.style.right = \"auto\";\n    tray.style.top = inset + \"px\";\n    tray.style.bottom = \"auto\";\n    tray.style.maxWidth = Math.max(216, viewportWidth - inset * 2) + \"px\";\n    var trayRect = tray.getBoundingClientRect(),\n      left = Math.max(inset, Math.min(triggerRect.left, viewportWidth - trayRect.width - inset)),\n      above = triggerRect.top - trayRect.height - 8,\n      below = triggerRect.bottom + 8,\n      top = above >= inset ? above : Math.min(below, viewportHeight - trayRect.height - inset);\n    tray.style.left = Math.round(left) + \"px\";\n    tray.style.top = Math.round(Math.max(inset, top)) + \"px\";\n  }\n  function queueDraft(type, payload, error) {\n    var safePayloadKeys = Object.keys(\n        payload && typeof payload == \"object\" ? payload : {},\n      )\n        .filter(function (key) {\n          return !/(^|_)(uid|id)$|userId|user_id|ownerUid|authorUid|sourceUid|targetUid|email|customer|token|secret|key|password|body|text|message|report|path|birthdate/i.test(\n            key,\n          );\n        })\n        .slice(0, 20),\n      item = {\n        id: type + \"-\" + Date.now(),\n        type: type,\n        payloadKeys: safePayloadKeys,\n        error: error ? \"canonical_write_failed\" : \"canonical_write_unavailable\",\n        queuedAt: now(),\n        canonical: supabaseCutoverReady()\n          ? \"supabase-required\"\n          : \"firebase-required\",\r\n      },\r\n      q = draftQueue();\r\n    (q.push(item), saveDraftQueue(q));\n    var isUpload = /media|upload|wasabi/i.test(String(type || \"\")),\r\n      backgroundRepair = /orphan-media-parent-repair/i.test(String(type || \"\"));\r\n    try {\r\n      (document.documentElement.setAttribute(\r\n        \"data-dsd-last-draft-type\",\r\n        String(type || \"\").slice(0, 80),\r\n      ),\r\n        document.documentElement.setAttribute(\n          \"data-dsd-last-draft-error\",\n          String(item.error || \"\").slice(0, 80),\n        ),\n        document.documentElement.setAttribute(\r\n          \"data-dsd-last-draft-at\",\r\n          item.queuedAt,\r\n        ));\r\n    } catch (e) {}\r\n    return backgroundRepair\r\n      ? (claim(\"draft-queue:background-repair-suppressed\", {\r\n          type: type,\r\n          reason: \"orphan repair is not an active composer upload\",\r\n        }),\r\n        item)\r\n      : (renderStatus(\n          isUpload\n            ? \"Upload did not finish. Retry when the connection is available.\"\n            : \"The update did not finish. Retry when the connection is available.\",\n        ),\n        item);\n  }\r\n  function recordFounderAudit(payload, context) {\r\n    return (\r\n      (payload = Object.assign(\r\n        { firestorePath: PATHS.founderAudit },\r\n        payload || {},\r\n      )),\r\n      addDoc(\"founderAudit\", payload).catch(function (error) {\r\n        return (\r\n          claim(\"founder-audit:fail-soft\", {\r\n            action: payload.action || \"\",\r\n            sourcePath: payload.sourcePath || \"\",\r\n            context: context || \"\",\r\n            error: (error && error.message) || String(error),\r\n          }),\r\n          null\r\n        );\r\n      })\r\n    );\r\n  }\r\n  function serverTimestamp() {\r\n    return now();\r\n  }\r\n  function futureTimestamp(milliseconds) {\r\n    return new Date(Date.now() + milliseconds).toISOString();\r\n  }\r\n  function requestSupabaseAdapterScript(path, method) {\r\n    var existing = supabaseAdapter();\r\n    if (!(existing && (!method || typeof existing[method] == \"function\")))\r\n      try {\r\n        ensureSupabaseConfig();\r\n        var scripts = Array.prototype.slice.call(document.scripts || []),\r\n          found = scripts\r\n            .map(function (script) {\r\n              return (script && script.src) || \"\";\r\n            })\r\n            .filter(function (src) {\r\n              return /dsd-supabase-social-adapter-[^/?#]+\\.js/i.test(src);\r\n            })[0];\r\n        found ||\r\n          (found =\r\n            \"/cdn/shop/t/21/assets/dsd-supabase-social-adapter-p11dz686-g04.js?dsd_cutover=\" +\r\n            encodeURIComponent(BUILD));\r\n        var attempts = Number(window.__DSDSupabaseAdapterForcedRetryCount || 0);\r\n        if (attempts >= 4) {\r\n          claim(\"supabase-adapter:retry-limited\", {\r\n            path: path,\r\n            method: method || \"\",\r\n            attempts: attempts,\r\n          });\r\n          return;\r\n        }\r\n        window.__DSDSupabaseAdapterForcedRetryCount = attempts + 1;\r\n        var retry = document.createElement(\"script\");\r\n        ((retry.src =\r\n          found +\r\n          (found.indexOf(\"?\") === -1 ? \"?\" : \"&\") +\r\n          \"dsd_activation_retry=\" +\r\n          Date.now()),\r\n          (retry.async = !1),\r\n          retry.setAttribute(\r\n            \"data-dsd-activation-adapter-retry\",\r\n            method || \"adapter\",\r\n          ),\r\n          retry.setAttribute(\"data-dsd-activation-adapter-owner\", BUILD),\r\n          document.head.appendChild(retry),\r\n          claim(\"supabase-adapter:retry-requested\", {\r\n            path: path,\r\n            method: method || \"\",\r\n            src: found.split(\"?\")[0],\r\n          }));\r\n      } catch (error) {\r\n        claim(\"supabase-adapter:retry-blocked\", {\r\n          path: path,\r\n          method: method || \"\",\r\n          error: (error && error.message) || String(error),\r\n        });\r\n      }\r\n  }\r\n  function waitForSupabaseAdapter(path, method) {\r\n    var adapter = supabaseAdapter();\r\n    return adapter && typeof adapter[method] == \"function\"\r\n      ? Promise.resolve(adapter)\r\n      : supabaseCutoverConfigured()\r\n        ? (requestSupabaseAdapterScript(path, method),\r\n          new Promise(function (resolve, reject) {\r\n            var settled = !1,\r\n              timeout = window.setTimeout(function () {\r\n                finish(\r\n                  null,\r\n                  new Error(\r\n                    \"Supabase adapter unavailable for canonical \" +\r\n                      method +\r\n                      \": \" +\r\n                      path,\r\n                  ),\r\n                );\r\n              }, 6500);\r\n            function finish(next, error) {\r\n              settled ||\r\n                ((settled = !0),\r\n                window.clearTimeout(timeout),\r\n                window.removeEventListener(\r\n                  \"dsd:supabase-social-adapter:ready\",\r\n                  onReady,\r\n                ),\r\n                next && typeof next[method] == \"function\"\r\n                  ? resolve(next)\r\n                  : reject(\r\n                      error ||\r\n                        new Error(\r\n                          \"Supabase adapter missing canonical method \" +\r\n                            method +\r\n                            \": \" +\r\n                            path,\r\n                        ),\r\n                    ));\r\n            }\r\n            function onReady() {\r\n              finish(supabaseAdapter());\r\n            }\r\n            (window.addEventListener(\r\n              \"dsd:supabase-social-adapter:ready\",\r\n              onReady,\r\n              { once: !0 },\r\n            ),\r\n              window.setTimeout(function () {\r\n                settled || finish(supabaseAdapter());\r\n              }, 0));\r\n          }))\r\n        : Promise.resolve(null);\r\n  }\r\n  function setDoc(path, data, merge) {\r\n    return supabaseCutoverConfigured() && supabasePathSupported(path)\r\n      ? waitForSupabaseAdapter(path, \"writePath\").then(function (s) {\r\n          return s\r\n            .writePath(path, Object.assign({}, data, { updatedAt: now() }), {\r\n              merge: merge !== !1,\r\n            })\r\n            .catch(function (error) {\r\n              return (\r\n                claim(\"supabase-write:retry-forced-session\", {\r\n                  path: path,\r\n                  error: (error && error.message) || String(error),\r\n                }),\r\n                waitForSupabaseAdapter(path, \"writePath\")\r\n                  .then(function (retryAdapter) {\r\n                    return retryAdapter.writePath(\r\n                      path,\r\n                      Object.assign({}, data, { updatedAt: now() }),\r\n                      { merge: merge !== !1, force: !0 },\r\n                    );\r\n                  })\r\n                  .catch(function (retryError) {\r\n                    throw (\r\n                      claim(\"supabase-write:blocked\", {\r\n                        path: path,\r\n                        fallback: \"disabled-for-canonical-cutover\",\r\n                        error:\r\n                          (retryError && retryError.message) ||\r\n                          String(retryError),\r\n                      }),\r\n                      retryError\r\n                    );\r\n                  })\r\n              );\r\n            });\r\n        })\r\n      : Promise.reject(\r\n          new Error(\"Noncanonical social write blocked: \" + path),\r\n        );\r\n  }\r\n  function addDoc(path, data) {\r\n    return supabaseCutoverConfigured() && supabasePathSupported(path)\r\n      ? waitForSupabaseAdapter(path, \"addPath\").then(function (s) {\r\n          return s\r\n            .addPath(\r\n              path,\r\n              Object.assign({}, data, { createdAt: now(), updatedAt: now() }),\r\n            )\r\n            .catch(function (error) {\r\n              throw (\r\n                claim(\"supabase-add:blocked\", {\r\n                  path: path,\r\n                  fallback: \"disabled-for-canonical-cutover\",\r\n                  error: (error && error.message) || String(error),\r\n                }),\r\n                error\r\n              );\r\n            });\r\n        })\r\n      : Promise.reject(\r\n          new Error(\"Noncanonical social add blocked: \" + path),\r\n        );\r\n  }\r\n  function writeMediaSignerShadow(mediaId, manifest) {\r\n    mediaId &&\r\n      manifest &&\r\n      claim(\"wasabi-signer-shadow:retired\", {\r\n        mediaId: mediaId,\r\n        canonical: \"supabase-media-objects\",\r\n      });\r\n    return Promise.resolve(null);\r\n  }\r\n  function writePostMediaShadow(postId, post) {\r\n    return !postId || !post || !(post.media && post.media.length)\r\n      ? Promise.resolve(null)\r\n      : (claim(\"post-media-shadow:retired\", {\r\n          postId: postId,\r\n          canonical: \"supabase-media-objects\",\r\n          firebasePublicContentHydration: !1,\r\n        }),\r\n        Promise.resolve(null));\r\n  }\r\n  function legacyMessageId(message, savedMessage) {\r\n    for (\r\n      var values = [\r\n          message && message.messageId,\r\n          message && message.legacyMessageId,\r\n          message && message.legacy_message_id,\r\n          savedMessage && savedMessage.messageId,\r\n          savedMessage && savedMessage.legacyMessageId,\r\n          savedMessage && savedMessage.legacy_message_id,\r\n          message && message.id,\r\n          savedMessage && savedMessage.id,\r\n        ],\r\n        i = 0;\r\n      i < values.length;\r\n      i += 1\r\n    ) {\r\n      var value = String(values[i] || \"\").trim();\r\n      if (value && !uuidLike(value)) return value;\r\n    }\r\n    return \"\";\r\n  }\r\n  function legacyConversationId(message, savedMessage) {\r\n    for (\r\n      var values = [\r\n          message && message.conversationId,\r\n          savedMessage && savedMessage.conversationId,\r\n          message && message.legacyConversationId,\r\n          savedMessage && savedMessage.legacyConversationId,\r\n        ],\r\n        i = 0;\r\n      i < values.length;\r\n      i += 1\r\n    ) {\r\n      var value = String(values[i] || \"\").trim();\r\n      if (value && !uuidLike(value)) return value;\r\n    }\r\n    return \"\";\r\n  }\r\n  function retireGatedPostShell(postId) {\r\n    if (!postId) return Promise.resolve(null);\r\n    return setDoc(\r\n      \"gatedPostShells/\" + postId,\r\n      {\r\n        postId: postId,\r\n        status: \"deleted\",\r\n        deletedAt: now(),\r\n        hiddenAt: now(),\r\n        moderation: { state: \"deleted\", gate: \"canonical-shell-retirement\" },\r\n      },\r\n      !0,\r\n    );\r\n  }\r\n  function getDoc(path, options) {\r\n    var s = supabaseAdapter();\r\n    if (supabaseCutoverConfigured() && supabasePathSupported(path))\r\n      return waitForSupabaseAdapter(path, \"getPath\").then(function (adapter) {\r\n        return adapter.getPath(path, options || {}).catch(function (error) {\r\n          throw (\r\n            claim(\"supabase-get:blocked\", {\r\n              path: path,\r\n              fallback: \"disabled-for-canonical-cutover\",\r\n              error: (error && error.message) || String(error),\r\n            }),\r\n            error\r\n          );\r\n        });\r\n      });\r\n    claim(\"firebase-social-read:retired\", { path: path || \"\" });\r\n    return Promise.reject(\r\n      new Error(\"Noncanonical social read blocked: \" + path),\r\n    );\r\n  }\r\n  function listen(path, cb, queryBuilder, meta) {\r\n    var s = supabaseAdapter();\r\n    if (supabaseCutoverConfigured() && supabasePathSupported(path)) {\r\n      var attachSupabaseListener = function (adapter, label) {\r\n          var offSupabase = adapter.listenPath(path, cb, adapterOptions);\r\n          return (\r\n            claim(label || \"supabase-listener:active\", {\r\n              path: path,\r\n              mode: \"metadata-cutover\",\r\n            }),\r\n            offSupabase\r\n          );\r\n        },\r\n        onAdapterReady = function () {\r\n          if (!(detached || delayedOff)) {\r\n            var next = supabaseAdapter();\r\n            !next ||\r\n              typeof next.listenPath != \"function\" ||\r\n              (window.clearTimeout(fallbackTimer),\r\n              (delayedOff = attachSupabaseListener(\r\n                next,\r\n                \"supabase-listener:delayed-active\",\r\n              )));\r\n          }\r\n        },\r\n        adapterOptions = Object.assign(\r\n          { queryBuilderHint: !!queryBuilder, publicRead: !hasCustomer() },\r\n          meta || {},\r\n        );\r\n      if (s && typeof s.listenPath == \"function\") {\r\n        var activeOff = attachSupabaseListener(s);\r\n        return (state.listeners.push(activeOff), activeOff);\r\n      }\r\n      requestSupabaseAdapterScript(path, \"listenPath\");\r\n      var detached = !1,\r\n        delayedOff = null,\r\n        fallbackTimer = window.setTimeout(function () {\r\n          if (!(detached || delayedOff)) {\r\n            claim(\"supabase-listener:waiting\", {\r\n              path: path,\r\n              fallback: \"empty-state-until-adapter-ready\",\r\n            });\r\n            try {\r\n              cb([]);\r\n            } catch (e) {}\r\n          }\r\n        }, 1200);\r\n      (window.addEventListener(\r\n        \"dsd:supabase-social-adapter:ready\",\r\n        onAdapterReady,\r\n      ),\r\n        window.setTimeout(onAdapterReady, 0));\r\n      var offDelayed = function () {\r\n        ((detached = !0),\r\n          window.clearTimeout(fallbackTimer),\r\n          window.removeEventListener(\r\n            \"dsd:supabase-social-adapter:ready\",\r\n            onAdapterReady,\r\n          ),\r\n          typeof delayedOff == \"function\" && delayedOff());\r\n      };\r\n      return (state.listeners.push(offDelayed), offDelayed);\r\n    }\r\n    claim(\"firebase-social-listener:retired\", {\r\n      path: path,\r\n      canonical: \"supabase\",\r\n      fallback: \"empty-state\",\r\n    });\r\n    try {\r\n      cb([]);\r\n    } catch (e) {}\r\n    return function () {};\r\n  }\r\n  function preferCanonicalContentRecord(existing, incoming) {\r\n    if (!existing) return incoming;\r\n    if (!incoming) return existing;\r\n    var existingShell =\r\n        isPersistedGatedShellRecord(existing) ||\r\n        existing.restrictedShell === !0,\r\n      incomingShell =\r\n        isPersistedGatedShellRecord(incoming) ||\r\n        incoming.restrictedShell === !0,\r\n      existingHasContent = !!(\r\n        String(\r\n          existing.body || existing.caption || existing.title || \"\",\r\n        ).trim() || (existing.media || []).length\r\n      ),\r\n      incomingHasContent = !!(\r\n        String(\r\n          incoming.body || incoming.caption || incoming.title || \"\",\r\n        ).trim() || (incoming.media || []).length\r\n      );\r\n    return existingHasContent && incomingShell && !incomingHasContent\r\n      ? existing\r\n      : incoming;\r\n  }\r\n  function mergeRecords(existing, incoming) {\r\n    var byId = {};\r\n    return (\r\n      (existing || []).concat(incoming || []).forEach(function (item) {\r\n        var key = item && (item.postId || item.storyId || item.id);\r\n        if (\r\n          key &&\r\n          shouldApplyLocalPostTombstone(key, item) &&\r\n          item.status !== \"deleted\"\r\n        ) {\r\n          byId[key] = Object.assign({}, item, {\r\n            status: \"deleted\",\r\n            moderation: Object.assign({}, item.moderation || {}, {\r\n              state: \"deleted\",\r\n              gate: \"local-owner-action\",\r\n            }),\r\n          });\r\n          return;\r\n        }\r\n        (key &&\r\n          shouldApplyLocalPostOverride(key, item) &&\r\n          (item = Object.assign({}, item, state.localPostStateOverrides[key], {\r\n            moderation: Object.assign(\r\n              {},\r\n              item.moderation || {},\r\n              state.localPostStateOverrides[key].moderation || {},\r\n            ),\r\n          })),\r\n          key && (byId[key] = preferCanonicalContentRecord(byId[key], item)));\r\n      }),\r\n      Object.keys(byId)\r\n        .map(function (key) {\r\n          return byId[key];\r\n        })\r\n        .sort(function (a, b) {\r\n          return String(b.createdAt || b.updatedAt || \"\").localeCompare(\r\n            String(a.createdAt || a.updatedAt || \"\"),\r\n          );\r\n        })\r\n    );\r\n  }\r\n  function savedItemMatchesPost(item, postOrId) {\r\n    if (!item || !postOrId) return !1;\r\n    var targetId = String(item.targetId || item.postId || item.id || \"\"),\r\n      post =\r\n        typeof postOrId == \"object\"\r\n          ? postOrId\r\n          : localPostById(String(postOrId || \"\")),\r\n      postId =\r\n        typeof postOrId == \"object\"\r\n          ? String(postKey(postOrId) || \"\")\r\n          : String(postOrId || \"\"),\r\n      supabaseId = String(\r\n        (post &&\r\n          (post.supabasePostId || post.supabase_post_id || post.uuid)) ||\r\n          \"\",\r\n      );\r\n    return !!(\r\n      targetId &&\r\n      (targetId === postId || (supabaseId && targetId === supabaseId))\r\n    );\r\n  }\r\n  function canonicalSavedPostId(item) {\r\n    var raw = String(\r\n        (item && (item.targetId || item.postId || item.id)) || \"\",\r\n      ),\r\n      post = (state.posts || []).filter(function (candidate) {\r\n        return savedItemMatchesPost(item, candidate);\r\n      })[0];\r\n    return post ? postKey(post) : raw;\r\n  }\r\n  function activeSavedItems(items) {\r\n    return (items || []).filter(function (item) {\r\n      if (!item || item.state !== \"saved\") return !1;\r\n      var targetId = canonicalSavedPostId(item);\r\n      if (!targetId) return !1;\r\n      var post = localPostById(targetId);\r\n      return post && !isNormalContentRecord(post)\r\n        ? !1\r\n        : !shouldApplyLocalPostTombstone(targetId, post);\r\n    });\r\n  }\r\n  function mergeByKey(existing, incoming, keys) {\r\n    var byId = {};\r\n    return (\r\n      (existing || []).concat(incoming || []).forEach(function (item) {\r\n        if (item) {\r\n          var key = \"\";\r\n          ((keys || [\"id\"]).some(function (k) {\r\n            return ((key = item[k] || \"\"), !!key);\r\n          }),\r\n            key && (byId[key] = item));\r\n        }\r\n      }),\r\n      Object.keys(byId)\r\n        .map(function (key) {\r\n          return byId[key];\r\n        })\r\n        .sort(function (a, b) {\r\n          return String(b.updatedAt || b.createdAt || \"\").localeCompare(\r\n            String(a.updatedAt || a.createdAt || \"\"),\r\n          );\r\n        })\r\n    );\r\n  }\r\n  function publicProfileDedupeScore(profile) {\n    if (!profile) return 0;\r\n    var key = clean(\r\n        profile.profileKey || profile.handle || \"\",\r\n        \"\",\r\n      ).toLowerCase(),\r\n      handle = clean(profile.handle || \"\", \"\").toLowerCase(),\r\n      displayNameValue = clean(\r\n        profile.displayName || profile.display_name || \"\",\r\n        \"\",\r\n      ).toLowerCase(),\r\n      score = 0;\r\n    return (\r\n      handle && (score += 2),\r\n      key && handle && key !== handle\r\n        ? (score += 8)\r\n        : key && handle && (score += 1),\r\n      displayNameValue && displayNameValue !== key && (score += 3),\r\n      profile.avatarMediaId && (score += 4),\r\n      (profile.bannerMediaId || profile.headerMediaId) && (score += 4),\r\n      (profile.setupComplete === !0 || profile.status === \"active\") &&\r\n        (score += 3),\r\n      /\\d+$/.test(key) || (score += 2),\r\n      profile.updatedAt &&\r\n        (score += Math.min(2, Date.parse(profile.updatedAt) / 1e13 || 0)),\r\n      score\r\n    );\r\n  }\n  function mergePublicProfileProjection(current, incoming) {\n    current = current || {};\n    incoming = incoming || {};\n    var merged = Object.assign({}, current, incoming),\n      preserve = function (hydratedFlag, fields) {\n        if (incoming[hydratedFlag] === !0) return;\n        var currentIsCanonical = current[hydratedFlag] === !0;\r\n        fields.forEach(function (field) {\n          if (\n            (currentIsCanonical ||\r\n              incoming[field] == null ||\r\n              incoming[field] === \"\") &&\r\n            current[field] != null &&\n            current[field] !== \"\"\n          )\n            merged[field] = current[field];\n        });\n        currentIsCanonical && (merged[hydratedFlag] = !0);\r\n      };\n    (preserve(\"identityHydrated\", [\"profileKey\", \"handle\", \"displayName\"]),\n      preserve(\"bioHydrated\", [\"bio\"]),\n      preserve(\"locationHydrated\", [\n        \"location\",\n        \"locationCity\",\n        \"locationState\",\n      ]),\n      preserve(\"distanceHydrated\", [\n        \"viewerDistanceLabel\",\n        \"viewerDistanceMiles\",\n        \"viewer_distance_label\",\n        \"viewer_distance_miles\",\n      ]),\n      preserve(\"avatarMediaHydrated\", [\"avatarMediaId\", \"thumbnailMediaId\"]),\n      preserve(\"bannerMediaHydrated\", [\"bannerMediaId\", \"headerMediaId\"]),\n      preserve(\"activityHydrated\", [\"lastActiveAt\", \"last_active_at\"]),\n      preserve(\"projectionUpdatedAtHydrated\", [\"updatedAt\"]));\n    function clearCanonicalEmptyMedia(slot, hydratedFlag) {\r\n      if (incoming[hydratedFlag] !== !0) return;\r\n      var fields =\r\n          slot === \"banner\"\r\n            ? [\r\n                \"bannerMediaId\", \"headerMediaId\", \"coverMediaId\",\r\n                \"backgroundMediaId\", \"bannerImageId\", \"headerImageId\",\r\n                \"coverImageId\", \"banner_media_id\", \"header_media_id\",\r\n                \"cover_media_id\", \"background_media_id\", \"banner_image_id\",\r\n                \"header_image_id\", \"cover_image_id\", \"bannerWasabiObjectKey\",\r\n                \"banner_wasabi_object_key\", \"headerWasabiObjectKey\",\r\n                \"header_wasabi_object_key\", \"coverWasabiObjectKey\",\r\n                \"cover_wasabi_object_key\", \"bannerObjectKey\",\r\n                \"banner_object_key\", \"headerObjectKey\", \"header_object_key\",\r\n                \"coverObjectKey\", \"cover_object_key\",\r\n              ]\r\n            : [\r\n                \"avatarMediaId\", \"thumbnailMediaId\", \"profileImageMediaId\",\r\n                \"photoMediaId\", \"imageMediaId\", \"avatarImageId\",\r\n                \"avatar_media_id\", \"thumbnail_media_id\",\r\n                \"profile_image_media_id\", \"photo_media_id\", \"image_media_id\",\r\n                \"avatar_image_id\", \"avatarWasabiObjectKey\",\r\n                \"avatar_wasabi_object_key\", \"photoWasabiObjectKey\",\r\n                \"photo_wasabi_object_key\", \"avatarObjectKey\",\r\n                \"avatar_object_key\",\r\n              ],\r\n        incomingHasMedia = fields.some(function (field) {\r\n          return String(incoming[field] || \"\").trim();\r\n        });\r\n      incomingHasMedia ||\r\n        fields.forEach(function (field) {\r\n          delete merged[field];\r\n        });\r\n      merged[hydratedFlag] = !0;\r\n    }\r\n    (clearCanonicalEmptyMedia(\"avatar\", \"avatarMediaHydrated\"),\r\n      clearCanonicalEmptyMedia(\"banner\", \"bannerMediaHydrated\"));\r\n    if (incoming.locationPrivacyHydrated !== !0) {\n      [\"appearInNearby\", \"showDistanceToUsers\", \"showCurrentCityOnProfile\"].forEach(\n        function (field) {\n          current[field] != null && (merged[field] = current[field]);\n        },\n      );\n      current.locationPrivacyHydrated === !0 &&\n        (merged.locationPrivacyHydrated = !0);\n    }\n    if (incoming.profileStatsHydrated !== !0) {\n      [\n        \"followerCount\",\n        \"followingCount\",\n        \"postCount\",\n        \"mediaCount\",\n        \"storyCount\",\n        \"favoriteCount\",\n        \"savedCount\",\n        \"viewCount\",\n      ].forEach(function (field) {\n        current[field] != null && (merged[field] = current[field]);\n      });\n      current.profileStatsHydrated === !0 && (merged.profileStatsHydrated = !0);\n    }\n    current.distanceHydrated === !0 && (merged.distanceHydrated = !0);\n    return merged;\n  }\n  function canonicalPublicProfileProjection(profile) {\r\n    return profile\r\n      ? Object.assign({}, profile, {\r\n          identityHydrated: !0,\r\n          bioHydrated: !0,\r\n          locationHydrated: !0,\r\n          avatarMediaHydrated: !0,\r\n          bannerMediaHydrated: !0,\r\n          profileStatsHydrated: !0,\r\n          projectionUpdatedAtHydrated: !0,\r\n        })\r\n      : null;\r\n  }\r\n  function dedupePublicProfiles(profiles) {\n    var canonical = [],\n      byUid = {},\n      byKey = {};\n    return (\n      (profiles || []).forEach(function (profile) {\n        if (profile) {\n          var keyIdentity = clean(\n              profile.profileKey || profile.handle || \"\",\n              \"\",\n            ).toLowerCase(),\n            uidIdentity = String(\n              profile.uid || profile.userId || profile.user_id || \"\",\n            ).trim(),\n            index = uidIdentity && byUid[uidIdentity] != null\n              ? byUid[uidIdentity]\n              : keyIdentity && byKey[keyIdentity] != null\n                ? byKey[keyIdentity]\n                : -1;\n          if (uidIdentity || keyIdentity) {\n            var current = index >= 0 ? canonical[index] : null;\n            if (current) {\n              var incomingPreferred =\n                publicProfileDedupeScore(profile) >=\n                publicProfileDedupeScore(current);\n              canonical[index] = incomingPreferred\n                ? mergePublicProfileProjection(current, profile)\n                : mergePublicProfileProjection(profile, current);\n            } else {\n              index = canonical.length;\n              canonical.push(profile);\n            }\n            uidIdentity && (byUid[uidIdentity] = index);\n            keyIdentity && (byKey[keyIdentity] = index);\n            var mergedProfile = canonical[index] || {},\n              mergedUid = String(\n                mergedProfile.uid || mergedProfile.userId || mergedProfile.user_id || \"\",\n              ).trim(),\n              mergedKey = clean(\n                mergedProfile.profileKey || mergedProfile.handle || \"\",\n                \"\",\n              ).toLowerCase();\n            mergedUid && (byUid[mergedUid] = index);\n            mergedKey && (byKey[mergedKey] = index);\n          }\n        }\n      }),\n      canonical\n        .sort(function (a, b) {\n          return String(b.updatedAt || b.createdAt || \"\").localeCompare(\r\n            String(a.updatedAt || a.createdAt || \"\"),\r\n          );\r\n        })\r\n    );\r\n  }\r\n  function routeTo(path) {\r\n    try {\r\n      window.location.pathname + window.location.search !== path &&\r\n        (window.location.href = path);\r\n    } catch (e) {}\r\n  }\r\n  function rememberLastVisitedPage() {\r\n    try {\r\n      var current = window.location.pathname + window.location.search;\r\n      !/^\\/account(?:$|[/?#])/.test(current) &&\r\n        current !== \"/challenge\" &&\r\n        window.localStorage &&\r\n        window.localStorage.setItem(\"DSD_LAST_VISITED_PAGE\", current);\r\n    } catch (e) {}\r\n  }\r\n  function lastVisitedPage() {\r\n    try {\r\n      var saved =\r\n        (window.localStorage &&\r\n          window.localStorage.getItem(\"DSD_LAST_VISITED_PAGE\")) ||\r\n        \"\";\r\n      if (\r\n        saved &&\r\n        !/^\\/account(?:$|[/?#])/.test(saved) &&\r\n        saved.charAt(0) === \"/\"\r\n      )\r\n        return saved;\r\n    } catch (e) {}\r\n    return \"\";\r\n  }\r\n  function queryParam(name) {\n    try {\r\n      return new URLSearchParams(window.location.search || \"\").get(name) || \"\";\r\n    } catch (e) {\r\n      return \"\";\r\n    }\r\n  }\r\n  function routeAnchorId(prefix, value) {\r\n    return (\r\n      String(prefix || \"dsd-target\") +\r\n      \"-\" +\r\n      encodeURIComponent(String(value || \"\").trim()).replace(/%/g, \"-\")\r\n    );\r\n  }\r\n  function routeProfileKey() {\r\n    var raw = String(queryParam(\"profile\") || \"\")\r\n      .trim()\r\n      .replace(/^@+/, \"\");\r\n    return raw ? nonPlaceholderProfileKey(raw) : \"\";\r\n  }\r\n  function activeRouteSurface() {\r\n    var path = \"\";\r\n    try {\r\n      path = window.location.pathname || \"\";\r\n    } catch (e) {\r\n      path = \"\";\r\n    }\r\n    return path === \"/pages/feed\"\r\n      ? \"feed\"\r\n      : path === \"/pages/users\"\r\n        ? \"users\"\r\n        : path === \"/pages/user-profile\"\r\n          ? \"profile\"\r\n          : path === \"/pages/stories\"\r\n            ? \"stories\"\r\n            : path === \"/pages/messages\"\r\n              ? \"messages\"\r\n              : path === \"/pages/notifications\"\r\n                ? \"notifications\"\r\n                : path === \"/pages/saved\"\r\n                  ? \"saved\"\r\n                  : path === \"/pages/favorites\"\r\n                    ? \"favorites\"\r\n                    : /^\\/pages\\/(?:moderation-center|safety-center|founder-operations|aic)(?:$|[/?#])/.test(\r\n                          path,\r\n                        )\r\n                      ? \"governance\"\r\n                      : /^\\/pages\\/(?:universes|galaxies|multiverse)(?:$|[/?#])/.test(\r\n                            path,\r\n                          )\r\n                        ? \"launch-held-space\"\r\n                        : \"other\";\r\n  }\r\n  function routeNeedsPublicProfiles(surface) {\r\n    return (\r\n      /^(feed|users|profile|stories)$/.test(surface) ||\r\n      (hasCustomer() &&\r\n        /^(notifications|saved|favorites)$/.test(surface)) ||\r\n      (canModerate() && surface === \"governance\")\r\n    );\r\n  }\r\n  function routeNeedsPublicFeed(surface) {\r\n    return surface === \"feed\";\r\n  }\r\n  function routeNeedsStories(surface) {\r\n    return /^(feed|profile|stories)$/.test(surface);\r\n  }\r\n  function routeNeedsOwnerSocial(surface) {\r\n    return (\r\n      hasCustomer() && /^(feed|profile|stories|saved|favorites)$/.test(surface)\r\n    );\r\n  }\r\n  function routeNeedsRelationshipState(surface) {\r\n    return (\r\n      hasCustomer() &&\r\n      /^(feed|users|profile|messages|saved|favorites)$/.test(surface)\r\n    );\r\n  }\r\n  function startPublicProfilePreloadForRoute() {\r\n    var surface = activeRouteSurface();\r\n    if (\r\n      !routeNeedsPublicProfiles(surface) &&\r\n      !routeNeedsPublicFeed(surface) &&\r\n      !routeNeedsStories(surface)\r\n    )\r\n      return;\r\n    (claim(\"route-social-preload:started\", {\r\n      surface: surface,\r\n      authenticated: hasCustomer(),\r\n      owner: \"startListeners\",\r\n      reason:\r\n        \"route public profiles/feed/stories can hydrate before owner profile bridge resolves\",\r\n    }),\r\n      startListeners());\r\n    surface === \"profile\" &&\r\n      nonPlaceholderProfileKey(queryParam(\"profile\") || \"\") &&\r\n      loadViewedPublicProfile();\r\n    surface === \"profile\" &&\r\n      !nonPlaceholderProfileKey(queryParam(\"profile\") || \"\") &&\r\n      loadOwnerPublicIdentityPreload();\r\n  }\r\n  function loadOwnerPublicIdentityPreload() {\r\n    var key = nonPlaceholderProfileKey(\r\n      customerProfileKeyValue() || activeProfileKeyValue() || profileKey() || \"\",\r\n    );\r\n    if (!hasCustomer() || routeProfileKey() || !key) return Promise.resolve(null);\r\n    if (\r\n      state.ownerPublicIdentityPreloadKey === key &&\r\n      state.ownerPublicIdentityPreloadPromise\r\n    )\r\n      return state.ownerPublicIdentityPreloadPromise;\r\n    var existing = publicProfileByKey(key);\r\n    if (existing && viewedProfileVisible(existing)) {\r\n      renderProfileIdentity();\r\n      return Promise.resolve(existing);\r\n    }\r\n    state.ownerPublicIdentityPreloadKey = key;\r\n    state.ownerPublicIdentityPreloadPromise = getDoc(\"publicProfiles/\" + key, {\r\n      publicRead: !0,\r\n      surface: \"owner-profile-route-first-paint\",\r\n    })\r\n      .then(function (snap) {\r\n        var profile =\r\n          snap && snap.exists && snap.exists()\r\n            ? canonicalPublicProfileProjection(\r\n                Object.assign({ profileKey: key }, snap.data() || {}),\r\n              )\r\n            : null;\r\n        if (\r\n          profile &&\r\n          viewedProfileVisible(profile) &&\r\n          isOwnProfileRoute() &&\r\n          !routeProfileKey()\r\n        ) {\r\n          state.publicProfiles = dedupePublicProfiles(\r\n            (state.publicProfiles || []).concat([profile]),\r\n          );\r\n          publishPublicProfiles(state.publicProfiles);\r\n          renderProfileIdentity();\r\n        }\r\n        return profile;\r\n      })\r\n      .catch(function (error) {\r\n        claim(\"owner-public-identity-preload:blocked\", {\r\n          profileKey: key,\r\n          error: (error && error.message) || String(error),\r\n        });\r\n        return null;\r\n      })\r\n      .then(function (profile) {\r\n        state.ownerPublicIdentityPreloadPromise = null;\r\n        return profile;\r\n      });\r\n    return state.ownerPublicIdentityPreloadPromise;\r\n  }\r\n  function startCanonicalSocialListenersEarly() {\r\n    if (!supabaseCutoverConfigured()) return null;\r\n    try {\r\n      (startListeners(),\r\n        renderAll(),\r\n        claim(\"startup-social-listeners:early-canonical\", {\r\n          surface: activeRouteSurface(),\r\n          authenticated: hasCustomer(),\r\n          profileKey: profileKey() || \"\",\r\n          reason:\r\n            \"deconstructed serial profile-read dependency before public social hydration\",\r\n        }));\r\n    } catch (error) {\r\n      claim(\"startup-social-listeners:early-blocked\", {\r\n        error: (error && error.message) || String(error),\r\n      });\r\n    }\r\n    return null;\r\n  }\r\n  function postPermalink(postId) {\r\n    var id = String(postId || \"\").trim(),\r\n      url = \"/pages/feed\";\r\n    id &&\r\n      (url +=\r\n        \"?post=\" +\r\n        encodeURIComponent(id) +\r\n        \"#\" +\r\n        routeAnchorId(\"dsd-post\", id));\r\n    try {\r\n      return new URL(url, window.location.origin).toString();\r\n    } catch (e) {\r\n      return url;\r\n    }\r\n  }\r\n  function canonicalPostTargetHref(postId, fallbackProfileKey) {\r\n    var id = String(postId || \"\").trim();\r\n    return id\r\n      ? postPermalink(id)\r\n      : fallbackProfileKey\r\n        ? profileRouteHref(fallbackProfileKey)\r\n        : \"/pages/feed\";\r\n  }\r\n  function profileRouteHref(key) {\r\n    var rawKey = String(key || \"\").replace(/^@+/, \"\"),\r\n      matchedProfile =\r\n        publicProfileByKey(rawKey) || publicProfileByIdentity(rawKey) || null,\r\n      safeKey = nonPlaceholderProfileKey(\r\n        (matchedProfile &&\r\n          (matchedProfile.profileKey || matchedProfile.handle)) ||\r\n          rawKey,\r\n      );\r\n    return safeKey\r\n      ? \"/pages/user-profile?profile=\" +\r\n          encodeURIComponent(safeKey)\r\n      : \"/pages/users\";\r\n  }\r\n  function profileNavigationBridgeHref(href) {\r\n    try {\r\n      var url = new URL(href, window.location.origin);\r\n      if (\r\n        url.origin !== window.location.origin ||\r\n        url.pathname !== \"/pages/user-profile\"\r\n      )\r\n        return \"\";\r\n      var key = nonPlaceholderProfileKey(url.searchParams.get(\"profile\") || \"\");\r\n      if (!key) return \"\";\r\n      return \"/pages/user-profile?profile=\" + encodeURIComponent(key);\r\n    } catch (e) {\r\n      return \"\";\r\n    }\r\n  }\r\n  function navigateProfileHref(href) {\n    var bridge2 = profileNavigationBridgeHref(href);\n    window.location.assign(bridge2 || href);\n  }\n  function profileWithPublicMirror(profile) {\r\n    if (!profile) return profile;\r\n    var key = nonPlaceholderProfileKey(\r\n        profile.profileKey || profile.handle || profileKey() || \"\",\r\n      ),\r\n      profileUidValue = String(\r\n        profile.uid ||\r\n          profile.userId ||\r\n          profile.user_id ||\r\n          profile.firebaseUid ||\r\n          profile.firebase_uid ||\r\n          \"\",\r\n      ).trim();\r\n    if (!key && !profileUidValue) return profile;\r\n    var mirror =\r\n      (key ? publicProfileByKey(key) : null) ||\r\n      (profileUidValue ? publicProfileByUid(profileUidValue) : null);\r\n    if (!mirror) return profile;\r\n    var merged = Object.assign({}, mirror, profile),\r\n      mirrorKey = nonPlaceholderProfileKey(\r\n        mirror.profileKey || mirror.profile_key || mirror.handle || \"\",\r\n      ),\r\n      mirrorHandle = nonPlaceholderProfileKey(mirror.handle || \"\");\r\n    mirrorKey &&\r\n      (!key || key !== mirrorKey) &&\r\n      profileUidValue &&\r\n      ((merged.profileKey = mirrorKey),\r\n      (merged.profile_key = mirrorKey),\r\n      (merged.handle = mirror.handle || mirrorKey));\r\n    mirrorHandle &&\r\n      !looksLikeRawEmail(mirrorHandle) &&\r\n      (merged.handle = mirrorHandle);\r\n    var profileBioText = String(\r\n        profile.bio ||\r\n          profile.profileBio ||\r\n          profile.about ||\r\n          profile.description ||\r\n          \"\",\r\n      ).trim(),\r\n      mirrorBioText = String(\r\n        mirror.bio ||\r\n          mirror.profileBio ||\r\n          mirror.about ||\r\n          mirror.description ||\r\n          \"\",\r\n      ).trim(),\r\n      mirrorDisplayText = String(\r\n        mirror.displayName || mirror.display_name || \"\",\r\n      ).trim();\r\n    (mirrorDisplayText && !temporaryProofCopyRisk(mirrorDisplayText)\r\n      ? ((merged.displayName = mirrorDisplayText),\r\n        (merged.display_name = mirrorDisplayText))\r\n      : !String(profile.displayName || profile.display_name || \"\").trim() &&\r\n        mirrorDisplayText &&\r\n        ((merged.displayName = mirror.displayName || mirror.display_name),\r\n        (merged.display_name = mirror.displayName || mirror.display_name)),\r\n      profile.bioHydrated !== !0 &&\n        !profileBioText &&\n        mirrorBioText &&\n        (merged.bio =\n          mirror.bio ||\r\n          mirror.profileBio ||\r\n          mirror.about ||\r\n          mirror.description ||\r\n          \"\"),\r\n      temporaryProofCopyRisk(\r\n        merged.bio ||\r\n          merged.about ||\r\n          merged.description ||\r\n          merged.profileBio ||\r\n          \"\",\r\n      ) &&\r\n        ((merged.bio = \"\"),\r\n        (merged.about = \"\"),\r\n        (merged.description = \"\"),\r\n        (merged.profileBio = \"\")),\r\n      profile.locationHydrated !== !0 &&\n        !String(profile.location || \"\").trim() &&\n        String(mirror.location || \"\").trim() &&\n        (merged.location = mirror.location),\n      profile.locationHydrated !== !0 &&\n        !String(profile.locationCity || profile.location_city || \"\").trim() &&\n        String(mirror.locationCity || mirror.location_city || \"\").trim() &&\n        (merged.locationCity = mirror.locationCity || mirror.location_city),\n      profile.locationHydrated !== !0 &&\n        !String(profile.locationState || profile.location_state || \"\").trim() &&\n        String(mirror.locationState || mirror.location_state || \"\").trim() &&\n        (merged.locationState = mirror.locationState || mirror.location_state),\n      profile.locationPrivacyHydrated !== !0 &&\n        mirror.locationPrivacyHydrated === !0 &&\n        ((merged.showCurrentCityOnProfile =\n          mirror.showCurrentCityOnProfile === !0 ||\r\n          mirror.show_current_city_on_profile === !0),\r\n        (merged.show_current_city_on_profile = merged.showCurrentCityOnProfile),\r\n        (merged.showDistanceToUsers =\r\n          mirror.showDistanceToUsers === !0 ||\r\n          mirror.show_distance_to_users === !0),\r\n        (merged.show_distance_to_users = merged.showDistanceToUsers),\r\n        (merged.appearInNearby =\n          mirror.appearInNearby === !0 || mirror.appear_in_nearby === !0),\n        (merged.appear_in_nearby = merged.appearInNearby)),\n      merged.locationPrivacyHydrated === !0 &&\n        ((merged.useApproximateLocationForNearby = profileBooleanFlag(\n          merged,\n          [\n            \"useApproximateLocationForNearby\",\n            \"use_approximate_location_for_nearby\",\n          ],\n          !1,\n        )),\n        (merged.use_approximate_location_for_nearby =\n          merged.useApproximateLocationForNearby),\n        (merged.appearInNearby = profileBooleanFlag(\n          merged,\n          [\"appearInNearby\", \"appear_in_nearby\"],\n          !1,\n        )),\n        (merged.appear_in_nearby = merged.appearInNearby),\n        (merged.showDistanceToUsers = profileBooleanFlag(\n          merged,\n          [\"showDistanceToUsers\", \"show_distance_to_users\"],\n          !1,\n        )),\n        (merged.show_distance_to_users = merged.showDistanceToUsers),\n        (merged.showCurrentCityOnProfile = profileBooleanFlag(\n          merged,\n          [\"showCurrentCityOnProfile\", \"show_current_city_on_profile\"],\n          !0,\n        )),\n        (merged.show_current_city_on_profile =\n          merged.showCurrentCityOnProfile)));\n    function clearMergedMediaAliases(slot) {\r\n      var fields =\r\n        slot === \"banner\"\r\n          ? [\r\n              \"bannerMediaId\", \"headerMediaId\", \"coverMediaId\",\r\n              \"backgroundMediaId\", \"bannerImageId\", \"headerImageId\",\r\n              \"coverImageId\", \"banner_media_id\", \"header_media_id\",\r\n              \"cover_media_id\", \"background_media_id\", \"banner_image_id\",\r\n              \"header_image_id\", \"cover_image_id\", \"bannerWasabiObjectKey\",\r\n              \"banner_wasabi_object_key\", \"headerWasabiObjectKey\",\r\n              \"header_wasabi_object_key\", \"coverWasabiObjectKey\",\r\n              \"cover_wasabi_object_key\", \"bannerObjectKey\",\r\n              \"banner_object_key\", \"headerObjectKey\", \"header_object_key\",\r\n              \"coverObjectKey\", \"cover_object_key\",\r\n            ]\r\n          : [\r\n              \"avatarMediaId\", \"thumbnailMediaId\", \"profileImageMediaId\",\r\n              \"photoMediaId\", \"imageMediaId\", \"avatarImageId\",\r\n              \"avatar_media_id\", \"thumbnail_media_id\",\r\n              \"profile_image_media_id\", \"photo_media_id\", \"image_media_id\",\r\n              \"avatar_image_id\", \"avatarWasabiObjectKey\",\r\n              \"avatar_wasabi_object_key\", \"photoWasabiObjectKey\",\r\n              \"photo_wasabi_object_key\", \"avatarObjectKey\",\r\n              \"avatar_object_key\",\r\n            ];\r\n      fields.forEach(function (field) {\r\n        delete merged[field];\r\n      });\r\n    }\r\n    var profileAvatar = canonicalProfileAvatarMediaId(profile),\r\n      mirrorAvatar = canonicalProfileAvatarMediaId(mirror),\r\n      profileBanner = canonicalProfileBannerMediaId(profile),\r\n      mirrorBanner = canonicalProfileBannerMediaId(mirror),\r\n      profileAvatarReadable = readableProfileSlotMediaId(profile, \"avatar\"),\r\n      mirrorAvatarReadable = readableProfileSlotMediaId(mirror, \"avatar\"),\r\n      profileBannerReadable = readableProfileSlotMediaId(profile, \"banner\"),\r\n      mirrorBannerReadable = readableProfileSlotMediaId(mirror, \"banner\"),\r\n      avatarCanonicalEmpty =\r\n        profile.avatarMediaHydrated === !0\r\n          ? !profileAvatar\r\n          : mirror.avatarMediaHydrated === !0\r\n            ? !mirrorAvatar\r\n            : !1,\r\n      bannerCanonicalEmpty =\r\n        profile.bannerMediaHydrated === !0\r\n          ? !profileBanner\r\n          : mirror.bannerMediaHydrated === !0\r\n            ? !mirrorBanner\r\n            : !1,\r\n      avatar =\r\n        avatarCanonicalEmpty\r\n          ? \"\"\r\n          : (mediaIdLooksLikeUuid(mirrorAvatar) && mirrorAvatar) ||\r\n            (mediaIdLooksLikeUuid(profileAvatar) && profileAvatar) ||\r\n            mirrorAvatarReadable ||\r\n            profileAvatarReadable ||\r\n            mirrorAvatar ||\r\n            profileAvatar ||\r\n            \"\",\r\n      banner =\r\n        bannerCanonicalEmpty\r\n          ? \"\"\r\n          : (mediaIdLooksLikeUuid(mirrorBanner) && mirrorBanner) ||\r\n            (mediaIdLooksLikeUuid(profileBanner) && profileBanner) ||\r\n            mirrorBannerReadable ||\r\n            profileBannerReadable ||\r\n            mirrorBanner ||\r\n            profileBanner ||\r\n            \"\";\r\n    (avatarCanonicalEmpty &&\r\n      (clearMergedMediaAliases(\"avatar\"),\r\n      (merged.avatarMediaHydrated = !0)),\r\n      bannerCanonicalEmpty &&\r\n        (clearMergedMediaAliases(\"banner\"),\r\n        (merged.bannerMediaHydrated = !0)),\r\n      avatar &&\r\n      ((merged.avatarMediaId = avatar),\r\n      (merged.avatar_media_id = avatar),\r\n      (merged.profileImageMediaId = avatar),\r\n      (merged.profile_image_media_id = avatar),\r\n      (merged.photoMediaId = avatar),\r\n      (merged.photo_media_id = avatar)),\r\n      banner &&\r\n        ((merged.bannerMediaId = banner),\r\n        (merged.banner_media_id = banner),\r\n        (merged.headerMediaId = banner),\r\n        (merged.header_media_id = banner),\r\n        (merged.coverMediaId = banner),\r\n        (merged.cover_media_id = banner),\r\n        (merged.backgroundMediaId = banner),\r\n        (merged.background_media_id = banner)));\r\n    function profileHasFocalValue(source, slot) {\r\n      source = source || {};\r\n      var prefix = slot === \"banner\" ? \"banner\" : \"avatar\";\r\n      return (\r\n        source[prefix + \"FocusX\"] !== void 0 ||\r\n        source[prefix + \"_focus_x\"] !== void 0 ||\r\n        source[prefix + \"FocusY\"] !== void 0 ||\r\n        source[prefix + \"_focus_y\"] !== void 0\r\n      );\r\n    }\r\n    function preferCanonicalFocal(slot) {\n      var selectedMedia = slot === \"banner\" ? banner : avatar,\n        profileMedia =\n          slot === \"banner\" ? profileBanner : profileAvatar,\n        mirrorMedia = slot === \"banner\" ? mirrorBanner : mirrorAvatar,\n        mirrorOwnsSelectedMedia =\n          !!selectedMedia &&\n          !!mirrorMedia &&\n          String(selectedMedia) === String(mirrorMedia),\n        profileOwnsSelectedMedia =\n          !!selectedMedia &&\n          !!profileMedia &&\n          String(selectedMedia) === String(profileMedia),\n        source =\n          mirrorOwnsSelectedMedia && profileHasFocalValue(mirror, slot)\n            ? mirror\n            : profileOwnsSelectedMedia && profileHasFocalValue(profile, slot)\n              ? profile\n              : profileHasFocalValue(mirror, slot)\n                ? mirror\n                : profileHasFocalValue(profile, slot)\n                  ? profile\n                  : null;\n      if (source) {\r\n        var focus = profileMediaFocus(source, slot),\r\n          prefix = slot === \"banner\" ? \"banner\" : \"avatar\";\r\n        ((merged[prefix + \"FocusX\"] = focus.x),\r\n          (merged[prefix + \"FocusY\"] = focus.y),\r\n          (merged[prefix + \"_focus_x\"] = focus.x),\r\n          (merged[prefix + \"_focus_y\"] = focus.y));\r\n      }\r\n    }\r\n    return (\r\n      preferCanonicalFocal(\"banner\"),\r\n      preferCanonicalFocal(\"avatar\"),\r\n      (merged.bannerPosition = canonicalBannerPosition(profile, mirror)),\r\n      (merged.banner_position = merged.bannerPosition),\r\n      (merged = profileMediaFocusAliases(merged)),\r\n      (merged.setupComplete =\r\n        profile.setupComplete === !0 || mirror.setupComplete === !0),\r\n      (merged.status =\r\n        profile.status ||\r\n        mirror.status ||\r\n        (merged.setupComplete ? \"active\" : \"setup_required\")),\r\n      merged\r\n    );\r\n  }\r\n  function reconcileCurrentPublicProfileMirror(surface, options) {\r\n    if (\r\n      ((options = options || {}),\r\n      !hasCustomer() || !supabaseCutoverConfigured())\r\n    )\r\n      return Promise.resolve(null);\r\n    var key = nonPlaceholderProfileKey(\r\n      activeOwnerProfileKey() ||\r\n        activeProfileKeyValue() ||\r\n        customerProfileKeyValue() ||\r\n        profileKey() ||\r\n        (state.profile && (state.profile.profileKey || state.profile.handle)) ||\r\n        \"\",\r\n    );\r\n    if (!key) return Promise.resolve(null);\r\n    var token = key + \"|\" + (surface || \"profile-public-mirror\"),\r\n      now2 = Date.now(),\r\n      preloadPromise =\r\n        !options.force &&\r\n        state.ownerPublicIdentityPreloadKey === key &&\r\n        state.ownerPublicIdentityPreloadPromise;\r\n    if (preloadPromise) {\r\n      state.currentPublicProfileMirrorReconcilePending = token;\r\n      return Promise.resolve(preloadPromise).then(function (mirror) {\r\n        state.currentPublicProfileMirrorReconcilePending = \"\";\r\n        state.currentPublicProfileMirrorReconcileToken = token;\r\n        state.currentPublicProfileMirrorReconcileLastAt = Date.now();\r\n        if (!mirror) return null;\r\n        state.profile =\r\n          profileWithPublicMirror(\r\n            Object.assign({}, state.profile || {}, {\r\n              profileKey: key,\r\n              handle:\r\n                mirror.handle ||\r\n                (state.profile && state.profile.handle) ||\r\n                key,\r\n            }),\r\n          ) || state.profile;\r\n        options.noRender || renderProfileIdentity();\r\n        return mirror;\r\n      });\r\n    }\r\n    return (!options.force &&\r\n      state.currentPublicProfileMirrorReconcileToken === token &&\r\n      now2 - Number(state.currentPublicProfileMirrorReconcileLastAt || 0) <\r\n        6e4) ||\r\n      state.currentPublicProfileMirrorReconcilePending === token\r\n      ? Promise.resolve(publicProfileByKey(key))\r\n      : ((state.currentPublicProfileMirrorReconcilePending = token),\r\n        getDoc(\"publicProfiles/\" + key, {\r\n          publicRead: !0,\r\n          surface: surface || \"owner-profile-public-mirror\",\r\n        })\r\n          .then(function (snap) {\r\n            if (\r\n              ((state.currentPublicProfileMirrorReconcilePending = \"\"),\r\n              (state.currentPublicProfileMirrorReconcileToken = token),\r\n              (state.currentPublicProfileMirrorReconcileLastAt = Date.now()),\r\n              !snap || !snap.exists || !snap.exists())\r\n            )\r\n              return null;\r\n            var mirror = Object.assign(\r\n              { profileKey: key, handle: key },\r\n              snap.data() || {},\r\n            );\r\n            return !viewedProfileVisible(mirror) &&\r\n              !publicProfileVisible(mirror)\r\n              ? null\r\n              : (updateLocalPublicProfileMirror(key, mirror),\r\n                (state.profile =\r\n                  profileWithPublicMirror(\r\n                    Object.assign({}, state.profile || {}, {\r\n                      profileKey: key,\r\n                      handle:\r\n                        mirror.handle ||\r\n                        (state.profile && state.profile.handle) ||\r\n                        key,\r\n                    }),\r\n                  ) || state.profile),\r\n                options.noRender || renderProfileIdentity(),\r\n                mirror);\r\n          })\r\n          .catch(function (error) {\r\n            return (\r\n              (state.currentPublicProfileMirrorReconcilePending = \"\"),\r\n              claim(\"profile-public-mirror-reconcile:blocked\", {\r\n                profileKey: key,\r\n                surface: surface || \"\",\r\n                error: (error && error.message) || String(error),\r\n              }),\r\n              null\r\n            );\r\n          }));\r\n  }\r\n  function postCommentPermalink(postId, commentId) {\r\n    var id = String(postId || \"\").trim(),\r\n      cid = String(commentId || \"\").trim(),\r\n      url = \"/pages/feed\";\r\n    id &&\r\n      ((url += \"?post=\" + encodeURIComponent(id)),\r\n      cid && (url += \"&comment=\" + encodeURIComponent(cid)),\r\n      (url += \"#\" + routeAnchorId(\"dsd-comment\", cid || id)));\r\n    try {\r\n      return new URL(url, window.location.origin).toString();\r\n    } catch (e) {\r\n      return url;\r\n    }\r\n  }\r\n  function focusRequestedPost() {\n    var id = String(queryParam(\"post\") || \"\").trim();\n    if (!id) return;\n    var attempts = 0;\n    function tryFocus() {\n      attempts += 1;\n      var requestedPost = localPostById(id),\n        renderedId = String((requestedPost && postKey(requestedPost)) || id),\n        selector =\n          '.dsd-post-card[data-post-id=\"' + renderedId.replace(/\"/g, '\\\\\"') + '\"]',\n        card = qs(selector);\n      if (!card) {\r\n        attempts < 16 && window.setTimeout(tryFocus, 180);\r\n        return;\r\n      }\r\n      (card.setAttribute(\"data-dsd-requested-post\", \"true\"),\r\n        (card.id = card.id || routeAnchorId(\"dsd-post\", id)),\r\n        card.setAttribute(\"tabindex\", card.getAttribute(\"tabindex\") || \"-1\"));\r\n      try {\r\n        card.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\r\n      } catch (e) {\r\n        try {\r\n          card.scrollIntoView();\r\n        } catch (ignore) {}\r\n      }\r\n      try {\r\n        card.focus({ preventScroll: !0 });\r\n      } catch (ignoreFocus) {}\r\n    }\r\n    window.setTimeout(tryFocus, 80);\r\n  }\r\n  function focusRequestedComment() {\n    var postId = String(queryParam(\"post\") || \"\").trim(),\n      commentId = String(queryParam(\"comment\") || \"\").trim();\n    if (\n      !postId ||\n      !commentId ||\n      state.lastRequestedCommentId === postId + \":\" + commentId\n    )\n      return;\n    state.lastRequestedCommentId = postId + \":\" + commentId;\n    var postAttempts = 0;\n    function openWhenPostReady() {\n      var post = localPostById(postId);\n      postAttempts += 1;\n      if (!post) {\n        if (postAttempts < 24) window.setTimeout(openWhenPostReady, 180);\n        else {\n          document.documentElement.setAttribute(\n            \"data-dsd-deep-link-unavailable\",\n            \"post\",\n          );\n          renderStatus(\"The linked post is unavailable or no longer visible to you.\");\n        }\n        return;\n      }\n      state.openCommentPostIds[postId] = !0;\n      delete state.commentOneShotLoads[postId];\n      hydratePostComments([post]);\n      openPostDrawer(\"comments\", postId, null);\n      var commentAttempts = 0;\n      function focusCommentWhenReady() {\n        commentAttempts += 1;\n        var targetRecord = visibleCommentsForPost(post).filter(function (item) {\n            return (\n              String(canonicalCommentId(item) || commentKey(item) || \"\") ===\n              commentId\n            );\n          })[0],\n          targetParent = targetRecord && parentCommentId(targetRecord);\n        if (targetParent && !state.expandedCommentThreads[targetParent]) {\n          state.expandedCommentThreads[targetParent] = !0;\n          renderPostDrawer();\n        }\n        var selector =\n            '[data-dsd-comment-id=\"' +\n            commentId.replace(/\"/g, '\\\\\"') +\n            '\"]',\n          comment = qs(selector);\n        if (!comment) {\n          if (commentAttempts < 24)\n            window.setTimeout(focusCommentWhenReady, 180);\n          else {\n            document.documentElement.setAttribute(\n              \"data-dsd-deep-link-unavailable\",\n              \"comment\",\n            );\n            renderStatus(\n              \"The linked comment is unavailable or no longer visible to you.\",\n            );\n          }\n          return;\n        }\n        (comment.setAttribute(\"data-dsd-requested-comment\", \"true\"),\n          (comment.id = comment.id || routeAnchorId(\"dsd-comment\", commentId)));\n        try {\n          comment.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n        } catch (e) {\n          try {\n            comment.scrollIntoView();\n          } catch (ignore) {}\n        }\n      }\n      window.setTimeout(focusCommentWhenReady, 80);\n    }\n    window.setTimeout(openWhenPostReady, 80);\n  }\n  function focusComposerFromRoute() {\r\n    if (queryParam(\"compose\") === \"post\" && canUseSocialActions()) {\r\n      var routeKey =\r\n        String(window.location.pathname || \"\") +\r\n        String(window.location.search || \"\");\r\n      state.lastRequestedPostComposerRoute !== routeKey &&\r\n        ((state.lastRequestedPostComposerRoute = routeKey),\r\n        window.setTimeout(function () {\r\n          (openGlobalPostComposer(),\r\n            document.documentElement.setAttribute(\r\n              \"data-dsd-compose-route-focused\",\r\n              \"global-post-composer\",\r\n            ));\r\n        }, 80));\r\n    }\r\n  }\r\n  function viewedProfile() {\n    var target = routeProfileKey();\n    if (target) {\r\n      var targetKey = normalizedProfileKeyValue(target),\r\n        viewedKey = normalizedProfileKeyValue(\r\n          state.viewProfile &&\r\n            (state.viewProfile.profileKey ||\r\n              state.viewProfile.handle ||\r\n              state.viewProfile.id),\r\n        );\r\n      return viewedKey && viewedKey === targetKey\r\n        ? state.viewProfile\r\n        : targetKey && targetKey === normalizedProfileKeyValue(profileKey())\r\n          ? profileRecordHasUsableKey(state.profile) &&\r\n            normalizedProfileKeyValue(\r\n              state.profile.profileKey ||\r\n                state.profile.handle ||\r\n                state.profile.profile_key ||\r\n                \"\",\r\n            ) === targetKey &&\r\n            profileMatchesVerifiedStoreScopedSession(state.profile)\r\n            ? profileWithPublicMirror(state.profile)\r\n            : publicProfileByKey(targetKey)\r\n          : publicProfileByKey(targetKey) || null;\n    }\n    if (\n      profileSetupSignedIncompleteSession() &&\n      profileSetupRequiredState(state.profile)\n    )\n      return state.profile;\n    if (ownIdentityRebindingRequired())\n      return identityRebindingRequiredProfile();\n    var publicSelf =\r\n      customerScopedPublicProfile() ||\r\n      publicProfileByKey(\r\n        customerProfileKeyValue() ||\r\n          activeProfileKeyValue() ||\r\n          profileKey() ||\r\n          \"\",\r\n      );\r\n    return storeScopedIdentityRequiresPrivateBridge()\r\n      ? profileRecordHasUsableKey(state.profile) &&\r\n        profileMatchesVerifiedStoreScopedSession(state.profile)\r\n        ? profileWithPublicMirror(state.profile)\r\n        : publicSelf || identityRebindingRequiredProfile()\r\n      : profileRecordHasUsableKey(state.profile)\r\n        ? profileWithPublicMirror(state.profile)\r\n        : publicSelf || null;\r\n  }\r\n  function viewedProfileUid() {\r\n    var p = viewedProfile();\r\n    return p && p.uid ? p.uid : routeProfileKey() ? \"\" : actorUid();\r\n  }\r\n  function isOwnProfileRoute() {\n    var target = routeProfileKey();\n    if (!hasCustomer()) return !1;\n    if (!target) return !0;\n    if (\n      storeScopedIdentityRequiresPrivateBridge() &&\n      !customerProfileKeyValue() &&\n      !privateBridgeCanonicalProfileResolved()\n    )\n      return !1;\n    return (\n      normalizedProfileKeyValue(target) ===\n      normalizedProfileKeyValue(profileKey())\n    );\n  }\r\n  function captureClaims(user) {\r\n    return Promise.resolve(user || null);\r\n  }  function canonicalProfilePayload(setupComplete) {\r\n    var c = customer(),\r\n      key = profileKey(),\r\n      membership = deriveMembership();\r\n    return {\r\n      uid: actorUid() || uid() || nonPlaceholderProfileKey(profileKey() || \"\"),\r\n      displayName: displayName(),\r\n      firstName: \"\",\r\n      lastName: \"\",\r\n      profileKey: key,\r\n      handle:\r\n        (state.profile && state.profile.handle) || c.handle || key,\r\n      bio: (state.profile && state.profile.bio) || \"\",\n      externalUrl:\n        (state.profile && (state.profile.externalUrl || state.profile.external_url)) || \"\",\n      locationCity:\r\n        (state.profile && (state.profile.locationCity || state.profile.city)) ||\r\n        \"\",\r\n      locationState:\r\n        (state.profile &&\r\n          (state.profile.locationState || state.profile.state)) ||\r\n        \"\",\r\n      location: (state.profile && state.profile.location) || \"\",\r\n      useApproximateLocationForNearby: profileBooleanFlag(\n        state.profile || {},\n        [\"useApproximateLocationForNearby\", \"use_approximate_location_for_nearby\"],\n        !0,\n      ),\n      appearInNearby: profileBooleanFlag(\r\n        state.profile || {},\r\n        [\r\n          \"appearInNearby\",\r\n          \"appear_in_nearby\",\r\n          \"nearbyVisible\",\r\n          \"nearby_visible\",\r\n          \"discoveryNearbyEnabled\",\r\n          \"discovery_nearby_enabled\",\r\n          \"nearbyOptIn\",\r\n          \"nearby_opt_in\",\r\n        ],\r\n        !1,\n      ),\r\n      showDistanceToUsers: profileBooleanFlag(\r\n        state.profile || {},\r\n        [\r\n          \"showDistanceToUsers\",\r\n          \"show_distance_to_users\",\r\n          \"distanceVisibleToUsers\",\r\n          \"distance_visible_to_users\",\r\n          \"nearbyDistanceVisible\",\r\n          \"nearby_distance_visible\",\r\n        ],\r\n        !1,\n      ),\r\n      showCurrentCityOnProfile: profileBooleanFlag(\r\n        state.profile || {},\r\n        [\r\n          \"showCurrentCityOnProfile\",\r\n          \"show_current_city_on_profile\",\r\n          \"showCurrentCity\",\r\n          \"show_current_city\",\r\n        ],\r\n        !0,\r\n      ),\r\n      locationInvisibleMode:\r\n        hasDsdPlus() &&\r\n        profileBooleanFlag(\r\n          state.profile || {},\r\n          [\"locationInvisibleMode\", \"location_invisible_mode\"],\r\n          !1,\r\n        ),\r\n      allowReadReceipts: profileBooleanFlag(\r\n        state.profile || {},\r\n        [\r\n          \"allowReadReceipts\",\r\n          \"allow_read_receipts\",\r\n          \"showReadReceipts\",\r\n          \"show_read_receipts\",\r\n          \"messageReadReceiptsEnabled\",\r\n          \"message_read_receipts_enabled\",\r\n          \"readReceiptsEnabled\",\r\n          \"read_receipts_enabled\",\r\n        ],\r\n        !0,\r\n      ),\r\n      avatarMediaId: (state.profile && state.profile.avatarMediaId) || \"\",\r\n      bannerMediaId: (state.profile && state.profile.bannerMediaId) || \"\",\r\n      bannerPosition: canonicalBannerPosition(state.profile || {}),\r\n      bannerFocusX: profileMediaFocus(state.profile || {}, \"banner\").x,\r\n      bannerFocusY: profileMediaFocus(state.profile || {}, \"banner\").y,\r\n      avatarFocusX: profileMediaFocus(state.profile || {}, \"avatar\").x,\r\n      avatarFocusY: profileMediaFocus(state.profile || {}, \"avatar\").y,\r\n      birthdate: (state.profile && state.profile.birthdate) || \"\",\r\n      age: Number((state.profile && state.profile.age) || 0),\r\n      ageVerified: state.profile && state.profile.ageVerified === !0,\r\n      adultContentEnabled:\r\n        state.profile && state.profile.adultContentEnabled === !0,\r\n      visibility: (state.profile && state.profile.visibility) || \"public\",\r\n      adultVisibility:\r\n        (state.profile && state.profile.adultVisibility) ||\r\n        \"hidden_until_verified\",\r\n      notificationPreferences: Object.assign(\r\n        {\r\n          relationships: !0,\r\n          content: !0,\r\n          messages: !0,\r\n          stories: !0,\r\n          moderation: !1,\r\n        },\r\n        (state.profile && state.profile.notificationPreferences) || {},\r\n      ),\r\n      setupComplete: !!setupComplete,\r\n      accountAuthority: \"shopify-session\",\r\n      authBridge: \"firebase-custom-token\",\r\n      membership: membership,\r\n      dsdPlus: membership.active === !0,\r\n      status: setupComplete ? \"active\" : \"setup_required\",\r\n      entity: entityMeta(\r\n        \"profile\",\r\n        (state.profile && state.profile.visibility) || \"public\",\r\n        \"standard\",\r\n        { moderationStatus: setupComplete ? \"approved\" : \"pending\" },\r\n      ),\r\n    };\r\n  }\r\n  function sameProfileOwner(existing, proposedKey) {\r\n    existing = existing && typeof existing == \"object\" ? existing : {};\r\n    var c = customer() || {},\r\n      existingUid = String(\r\n        existing.uid ||\r\n          existing.userId ||\r\n          existing.ownerUid ||\r\n          existing.id ||\r\n          \"\",\r\n      ),\r\n      existingKey = clean(existing.profileKey || existing.handle || \"\", \"\"),\r\n      proposed = clean(proposedKey || profileKey(), \"\");\r\n    if (identityMatchesCurrent(existingUid, existingKey)) return !0;\r\n    if (\r\n      storeScopedIdentityRequiresPrivateBridge() &&\r\n      proposed &&\r\n      existingKey &&\r\n      normalizedProfileKeyValue(existingKey) ===\r\n        normalizedProfileKeyValue(proposed)\r\n    ) {\r\n      var verifiedKey = normalizedProfileKeyValue(\r\n          verifiedStoreScopedProfileKey() ||\r\n            state.sessionProfileKey ||\r\n            activeProfileKeyValue() ||\r\n            \"\",\r\n        ),\r\n        stateKey = normalizedProfileKeyValue(\r\n          (state.profile &&\r\n            (state.profile.profileKey ||\r\n              state.profile.handle ||\r\n              state.profile.profile_key)) ||\r\n            \"\",\r\n        );\r\n      if (\r\n        (verifiedKey && verifiedKey === normalizedProfileKeyValue(proposed)) ||\r\n        (stateKey && stateKey === normalizedProfileKeyValue(proposed))\r\n      )\r\n        return !0;\r\n    }\r\n    return !!(\r\n      (proposed &&\r\n        existingKey &&\r\n        existingKey === proposed &&\r\n        proposed === clean(profileKey(), \"\")) ||\r\n      (!existingUid &&\r\n        proposed &&\r\n        existingKey &&\r\n        existingKey === proposed &&\r\n        state.profile &&\r\n        clean(state.profile.profileKey || state.profile.handle || \"\", \"\") ===\r\n          proposed)\r\n    );\r\n  }\r\n  function publicProfilePayload(privateProfile) {\r\n    var p = privateProfile || canonicalProfilePayload(!1),\r\n      profileUid = p.uid || p.userId || p.user_id || \"\",\r\n      profileKeyValue = p.profileKey || p.profile_key || p.handle || \"\",\r\n      existingPublic =\r\n        profileByUid(profileUid || \"\", profileKeyValue || \"\") || {},\r\n      avatarMediaId =\r\n        p.avatarMediaId ||\r\n        p.avatar_media_id ||\r\n        p.avatarWasabiObjectKey ||\r\n        p.avatar_wasabi_object_key ||\r\n        existingPublic.avatarMediaId ||\r\n        existingPublic.avatar_media_id ||\r\n        existingPublic.avatarWasabiObjectKey ||\r\n        existingPublic.avatar_wasabi_object_key ||\r\n        \"\",\r\n      bannerMediaId =\r\n        p.bannerMediaId ||\r\n        p.headerMediaId ||\r\n        p.banner_media_id ||\r\n        p.header_media_id ||\r\n        p.bannerWasabiObjectKey ||\r\n        p.banner_wasabi_object_key ||\r\n        existingPublic.bannerMediaId ||\r\n        existingPublic.headerMediaId ||\r\n        existingPublic.banner_media_id ||\r\n        existingPublic.header_media_id ||\r\n        existingPublic.bannerWasabiObjectKey ||\r\n        existingPublic.banner_wasabi_object_key ||\r\n        \"\",\r\n      explicitLocation =\r\n        Object.prototype.hasOwnProperty.call(p, \"location\") ||\r\n        Object.prototype.hasOwnProperty.call(p, \"locationCity\") ||\r\n        Object.prototype.hasOwnProperty.call(p, \"locationState\"),\r\n      publicLocationCity = explicitLocation\r\n        ? p.locationCity || p.city || \"\"\r\n        : p.locationCity ||\r\n          p.city ||\r\n          existingPublic.locationCity ||\r\n          existingPublic.city ||\r\n          \"\",\r\n      publicLocationState = explicitLocation\r\n        ? p.locationState || p.state || \"\"\r\n        : p.locationState ||\r\n          p.state ||\r\n          existingPublic.locationState ||\r\n          existingPublic.state ||\r\n          \"\",\r\n      publicLocationText = explicitLocation\r\n        ? p.location ||\r\n          [publicLocationCity, publicLocationState].filter(Boolean).join(\", \")\r\n        : p.location ||\r\n          [publicLocationCity, publicLocationState]\r\n            .filter(Boolean)\r\n            .join(\", \") ||\r\n          existingPublic.location ||\r\n          \"\",\r\n      explicitBio =\r\n        Object.prototype.hasOwnProperty.call(p, \"bio\") ||\r\n        Object.prototype.hasOwnProperty.call(p, \"profileBio\") ||\r\n        Object.prototype.hasOwnProperty.call(p, \"about\") ||\r\n        Object.prototype.hasOwnProperty.call(p, \"description\"),\r\n      publicBio = explicitBio\r\n        ? String(p.bio || p.about || p.description || p.profileBio || \"\")\r\n        : p.bio ||\r\n          p.about ||\r\n          p.description ||\r\n          p.profileBio ||\r\n          existingPublic.bio ||\r\n          existingPublic.about ||\r\n          existingPublic.description ||\r\n          \"\";\r\n    temporaryProofCopyRisk(publicBio) && (publicBio = \"\");\r\n    var publicBannerPosition = profileFocalCompatibilityPosition(\r\n      p,\r\n      existingPublic,\r\n    );\r\n    return {\r\n      uid: profileUid,\r\n      userId: profileUid,\r\n      user_id: profileUid,\r\n      profileKey: profileKeyValue,\n      handle: p.handle || profileKeyValue,\n      displayName: p.displayName,\n      visibility: profileVisibility(p),\n      bio: publicBio,\n      externalUrl:\n        p.externalUrl || p.external_url || existingPublic.externalUrl || existingPublic.external_url || \"\",\n      external_url:\n        p.externalUrl || p.external_url || existingPublic.externalUrl || existingPublic.external_url || \"\",\n      locationCity: publicLocationCity,\r\n      locationState: publicLocationState,\r\n      location: publicLocationText,\r\n      appearInNearby: profileBooleanFlag(\r\n        p,\r\n        [\r\n          \"appearInNearby\",\r\n          \"appear_in_nearby\",\r\n          \"nearbyVisible\",\r\n          \"nearby_visible\",\r\n          \"discoveryNearbyEnabled\",\r\n          \"discovery_nearby_enabled\",\r\n          \"nearbyOptIn\",\r\n          \"nearby_opt_in\",\r\n        ],\r\n        profileBooleanFlag(\r\n          existingPublic,\r\n          [\n            \"appearInNearby\",\n            \"appear_in_nearby\",\n            \"nearbyVisible\",\r\n            \"nearby_visible\",\r\n            \"discoveryNearbyEnabled\",\r\n            \"discovery_nearby_enabled\",\r\n            \"nearbyOptIn\",\n            \"nearby_opt_in\",\n          ],\n          !1,\n        ),\r\n      ),\r\n      showDistanceToUsers: profileBooleanFlag(\r\n        p,\r\n        [\r\n          \"showDistanceToUsers\",\r\n          \"show_distance_to_users\",\r\n          \"distanceVisibleToUsers\",\r\n          \"distance_visible_to_users\",\r\n          \"nearbyDistanceVisible\",\r\n          \"nearby_distance_visible\",\r\n        ],\r\n        profileBooleanFlag(\r\n          existingPublic,\r\n          [\n            \"showDistanceToUsers\",\n            \"show_distance_to_users\",\n            \"distanceVisibleToUsers\",\r\n            \"distance_visible_to_users\",\r\n            \"nearbyDistanceVisible\",\n            \"nearby_distance_visible\",\n          ],\n          !1,\n        ),\r\n      ),\r\n      showCurrentCityOnProfile: profileBooleanFlag(\r\n        p,\r\n        [\r\n          \"showCurrentCityOnProfile\",\r\n          \"show_current_city_on_profile\",\r\n          \"showCurrentCity\",\r\n          \"show_current_city\",\r\n        ],\r\n        profileBooleanFlag(\r\n          existingPublic,\r\n          [\r\n            \"showCurrentCityOnProfile\",\r\n            \"show_current_city_on_profile\",\r\n            \"showCurrentCity\",\r\n            \"show_current_city\",\r\n          ],\r\n          !0,\r\n        ),\r\n      ),\r\n      allowReadReceipts: profileBooleanFlag(\r\n        p,\r\n        [\r\n          \"allowReadReceipts\",\r\n          \"allow_read_receipts\",\r\n          \"showReadReceipts\",\r\n          \"show_read_receipts\",\r\n          \"messageReadReceiptsEnabled\",\r\n          \"message_read_receipts_enabled\",\r\n          \"readReceiptsEnabled\",\r\n          \"read_receipts_enabled\",\r\n        ],\r\n        profileBooleanFlag(\r\n          existingPublic,\r\n          [\r\n            \"allowReadReceipts\",\r\n            \"allow_read_receipts\",\r\n            \"showReadReceipts\",\r\n            \"show_read_receipts\",\r\n            \"messageReadReceiptsEnabled\",\r\n            \"message_read_receipts_enabled\",\r\n            \"readReceiptsEnabled\",\r\n            \"read_receipts_enabled\",\r\n          ],\r\n          !0,\r\n        ),\r\n      ),\r\n      avatarMediaId: avatarMediaId,\r\n      bannerMediaId: bannerMediaId,\r\n      clearAvatarMediaId: p.clearAvatarMediaId === !0,\r\n      clearBannerMediaId: p.clearBannerMediaId === !0,\r\n      bannerPosition: publicBannerPosition,\r\n      banner_position: publicBannerPosition,\r\n      bannerFocusX: profileMediaFocus(p, \"banner\", existingPublic).x,\r\n      bannerFocusY: profileMediaFocus(p, \"banner\", existingPublic).y,\r\n      banner_focus_x: profileMediaFocus(p, \"banner\", existingPublic).x,\r\n      banner_focus_y: profileMediaFocus(p, \"banner\", existingPublic).y,\r\n      avatarFocusX: profileMediaFocus(p, \"avatar\", existingPublic).x,\r\n      avatarFocusY: profileMediaFocus(p, \"avatar\", existingPublic).y,\r\n      avatar_focus_x: profileMediaFocus(p, \"avatar\", existingPublic).x,\r\n      avatar_focus_y: profileMediaFocus(p, \"avatar\", existingPublic).y,\r\n      postCount: Math.max(\r\n        Number(p.postCount || 0),\r\n        Number(existingPublic.postCount || 0),\r\n      ),\r\n      storyCount: Math.max(\r\n        Number(p.storyCount || 0),\r\n        Number(existingPublic.storyCount || 0),\r\n      ),\r\n      mediaCount: Math.max(\r\n        Number(p.mediaCount || 0),\r\n        Number(existingPublic.mediaCount || 0),\r\n      ),\r\n      favoriteCount: Math.max(\r\n        Number(p.favoriteCount || p.favoritesCount || 0),\r\n        Number(\r\n          existingPublic.favoriteCount || existingPublic.favoritesCount || 0,\r\n        ),\r\n      ),\r\n      savedCount: Math.max(\r\n        Number(p.savedCount || p.savesCount || 0),\r\n        Number(existingPublic.savedCount || existingPublic.savesCount || 0),\r\n      ),\r\n      viewCount: Math.max(\r\n        Number(p.viewCount || p.profileViewCount || 0),\r\n        Number(\r\n          existingPublic.viewCount || existingPublic.profileViewCount || 0,\r\n        ),\r\n      ),\r\n      dsdPlus:\r\n        p.dsdPlus === !0 ||\r\n        (p.membership && p.membership.active === !0) ||\r\n        existingPublic.dsdPlus === !0,\r\n      membershipTier:\r\n        p.membership && p.membership.active === !0 ? p.membership.tier : \"\",\r\n      age: Number(p.age || existingPublic.age || 0),\r\n      ageVerified: p.ageVerified === !0 || existingPublic.ageVerified === !0,\r\n      adultContentEnabled:\r\n        p.adultContentEnabled === !0 ||\r\n        existingPublic.adultContentEnabled === !0,\r\n      birthdateProvided: !!p.birthdate,\r\n      over18:\r\n        p.ageVerified === !0 ||\r\n        Number(p.age || 0) >= 18 ||\r\n        existingPublic.over18 === !0,\r\n      searchable: !!p.setupComplete && p.searchable !== !1,\n      adultVisibility: p.adultVisibility || \"hidden_until_verified\",\r\n      setupComplete: !!p.setupComplete,\r\n      status: p.setupComplete ? \"active\" : \"setup_required\",\r\n      entity: Object.assign({}, p.entity || {}, {\r\n        type: \"profile\",\r\n        visibility: p.visibility || \"public\",\r\n        moderationStatus: p.setupComplete ? \"approved\" : \"pending\",\r\n      }),\r\n      updatedAt: serverTimestamp(),\r\n    };\r\n  }\r\n  function applyProfileIdentityCascade(profile) {\r\n    if (!profile) return null;\r\n    var publicPayload = publicProfilePayload(profile),\r\n      targetUid = String(\r\n        publicPayload.uid ||\r\n          publicPayload.userId ||\r\n          publicPayload.user_id ||\r\n          profile.uid ||\r\n          \"\",\r\n      ).trim(),\r\n      targetKey = clean(\r\n        publicPayload.profileKey ||\r\n          publicPayload.handle ||\r\n          profile.profileKey ||\r\n          profile.handle ||\r\n          \"\",\r\n        \"\",\r\n      ).toLowerCase(),\r\n      display =\r\n        publicPayload.displayName ||\r\n        profile.displayName ||\r\n        targetKey ||\r\n        \"DSD member\",\r\n      avatar =\r\n        publicPayload.avatarMediaId ||\r\n        profile.avatarMediaId ||\r\n        profile.thumbnailMediaId ||\r\n        \"\",\r\n      existing = !1;\r\n    ((state.publicProfiles = (state.publicProfiles || []).map(function (item) {\r\n      var itemUid = String(\r\n          item.uid || item.userId || item.user_id || \"\",\r\n        ).trim(),\r\n        itemKey = clean(item.profileKey || item.handle || \"\", \"\").toLowerCase();\r\n      return (targetUid && itemUid === targetUid) ||\r\n        (targetKey && itemKey === targetKey)\r\n        ? ((existing = !0), Object.assign({}, item, publicPayload))\r\n        : item;\r\n    })),\r\n      existing || state.publicProfiles.push(publicPayload));\r\n    function cascadeRecord(record) {\r\n      if (!record) return record;\r\n      var authorUid = String(\r\n          record.authorUid || record.ownerUid || record.userId || \"\",\r\n        ).trim(),\r\n        authorKey = clean(\r\n          record.authorProfileKey ||\r\n            record.ownerProfileKey ||\r\n            record.profileKey ||\r\n            \"\",\r\n          \"\",\r\n        ).toLowerCase();\r\n      return (targetUid && authorUid === targetUid) ||\r\n        (targetKey && authorKey === targetKey)\r\n        ? Object.assign({}, record, {\r\n            authorProfileKey:\r\n              targetKey ||\r\n              record.authorProfileKey ||\r\n              record.ownerProfileKey ||\r\n              \"\",\r\n            ownerProfileKey:\r\n              targetKey ||\r\n              record.ownerProfileKey ||\r\n              record.authorProfileKey ||\r\n              \"\",\r\n            authorDisplayName: display,\r\n            ownerDisplayName: display,\r\n            authorAvatarMediaId: avatar || record.authorAvatarMediaId || \"\",\r\n            ownerAvatarMediaId: avatar || record.ownerAvatarMediaId || \"\",\r\n          })\r\n        : record;\r\n    }\r\n    return (\r\n      (state.posts = (state.posts || []).map(cascadeRecord)),\r\n      (state.stories = (state.stories || []).map(cascadeRecord)),\r\n      Object.keys(state.commentsByPost || {}).forEach(function (postId) {\r\n        state.commentsByPost[postId] = (state.commentsByPost[postId] || []).map(\r\n          cascadeRecord,\r\n        );\r\n      }),\r\n      (state.notifications = (state.notifications || []).map(function (item) {\r\n        if (!item) return item;\r\n        var actorKey = clean(\r\n            item.actorProfileKey || item.profileKey || \"\",\r\n            \"\",\r\n          ).toLowerCase(),\r\n          actorUid2 = String(item.actorUid || item.authorUid || \"\").trim();\r\n        return (targetUid && actorUid2 === targetUid) ||\r\n          (targetKey && actorKey === targetKey)\r\n          ? Object.assign({}, item, {\r\n              actorDisplayName: display,\r\n              actorAvatarMediaId: avatar || item.actorAvatarMediaId || \"\",\r\n            })\r\n          : item;\r\n      })),\r\n      publicPayload\r\n    );\r\n  }\r\n  function refreshPublicRelationshipCounts(targetUid, targetProfileKey, delta) {\r\n    var sourceKey = profileKey(),\r\n      key =\r\n        targetProfileKey ||\r\n        (profileByUid(targetUid, \"\") || {}).profileKey ||\r\n        \"\",\r\n      followingCount = state.followingRecords.filter(function (item) {\r\n        return item && item.state !== \"unfollowed\";\r\n      }).length;\r\n    return (\r\n      (state.publicProfiles = (state.publicProfiles || []).map(\r\n        function (profile) {\r\n          var itemKey = clean(\r\n              profile && (profile.profileKey || profile.handle || \"\"),\r\n              \"\",\r\n            ).toLowerCase(),\r\n            itemUid = String(\r\n              (profile &&\r\n                (profile.uid || profile.userId || profile.user_id || \"\")) ||\r\n                \"\",\r\n            ).trim(),\r\n            next = profile;\r\n          return (\r\n            sourceKey &&\r\n              itemKey === clean(sourceKey, \"\").toLowerCase() &&\r\n              (next = Object.assign({}, next, {\r\n                followingCount: followingCount,\r\n              })),\r\n            ((key && itemKey === clean(key, \"\").toLowerCase()) ||\r\n              (targetUid && itemUid === String(targetUid || \"\").trim())) &&\r\n              (next = Object.assign({}, next, {\r\n                followerCount: Math.max(\r\n                  0,\r\n                  Number(\r\n                    next.followerCount ||\r\n                      next.followersCount ||\r\n                      next.followers ||\r\n                      0,\r\n                  ) + Number(delta || 0),\r\n                ),\r\n              })),\r\n            next\r\n          );\r\n        },\r\n      )),\r\n      claim(\"public-profile-counts:client-write-deconstructed\", {\r\n        sourceKey: sourceKey,\r\n        targetProfileKey: key,\r\n        targetUid: targetUid,\r\n        delta: Number(delta || 0),\r\n        reason:\r\n          \"follows table is canonical; browser public_profiles count writes are not canonical after new-store identity rebinding\",\r\n      }),\r\n      Promise.resolve([])\r\n    );\r\n  }\r\n  function publicProfileVisible(profile) {\r\n    if (\r\n      !profile ||\r\n      profile.searchable === !1 ||\r\n      profile.removeFromDiscovery === !0 ||\r\n      profile.profileHidden === !0 ||\r\n      publicProfileDuplicateArtifact(profile) ||\r\n      canonicalLaunchProfileOwnerMismatch(profile) ||\r\n      !publicProfileLooksLaunchReady(profile) ||\r\n      profile.status === \"hidden\" ||\r\n      profile.status === \"rejected\" ||\r\n      profile.status === \"removed\" ||\r\n      profile.status === \"disabled\" ||\r\n      profile.status === \"deleted\" ||\r\n      profile.accountState === \"hidden\" ||\r\n      profile.accountState === \"removed\" ||\r\n      profile.accountState === \"disabled\" ||\r\n      profile.accountState === \"deleted\" ||\r\n      profile.accountState === \"suspended\" ||\r\n      profile.isTestAccount === !0 ||\r\n      profile.testAccount === !0 ||\r\n      !clean(profile.profileKey || profile.handle || \"\", \"\") ||\r\n      recordSourceRisk(profile) ||\r\n      looksLikeRawEmail(profile.displayName) ||\r\n      looksLikeRawEmail(profile.profileKey) ||\r\n      looksLikeRawEmail(profile.handle) ||\r\n      !publicRecordVisible(profile)\r\n    )\r\n      return !1;\r\n    var entity = profile.entity || {},\r\n      visibility = profile.visibility || entity.visibility || \"public\";\r\n    return (\r\n      (visibility === \"public\" || visibility === \"private\") &&\n      canViewClassified(profile) &&\r\n      (profile.status === \"active\" ||\r\n        profile.setupComplete === !0 ||\r\n        entity.moderationStatus === \"approved\")\r\n    );\r\n  }\r\n  function profileVisibility(profile) {\n    var entity = (profile && profile.entity) || {};\n    return normalizeVisibility(\n      profile && (profile.visibility || entity.visibility || \"public\"),\n    );\n  }\n  function profilePrivacyControlHTML(profile) {\n    var isPrivate = profileVisibility(profile) === \"private\",\n      nextVisibility = isPrivate ? \"public\" : \"private\";\n    return (\n      '<button type=\"button\" class=\"dsd-up315__action dsd-profile-privacy-toggle\" data-dsd-profile-privacy-toggle=\"' +\n      nextVisibility +\n      '\" aria-pressed=\"' +\n      isPrivate +\n      '\" aria-label=\"' +\n      (isPrivate ? \"Private profile. Make profile public\" : \"Public profile. Make profile private\") +\n      '\" title=\"' +\n      (isPrivate\n        ? \"Private: only approved followers can view your profile content. Activate to make it public.\"\n        : \"Public: eligible users can view your profile content. Activate to require follow approval.\") +\n      '\"><span aria-hidden=\"true\">' +\n      (isPrivate ? \"&#128274;\" : \"&#128275;\") +\n      '</span><span class=\"dsd-profile-privacy-toggle__label\">' +\n      (isPrivate ? \"Private Profile\" : \"Public Profile\") +\n      \"</span></button>\"\n    );\n  }\n  function profilePrivacyStatusHTML(profile) {\n    var isPrivate = profileVisibility(profile) === \"private\";\n    return '<span class=\"dsd-profile-privacy-status\" data-dsd-profile-privacy-status><span aria-hidden=\"true\">' +\n      (isPrivate ? \"&#128274;\" : \"&#128275;\") +\n      '</span> ' + (isPrivate ? \"Private Profile\" : \"Public Profile\") + \"</span>\";\n  }\n  function profileRestrictedAccessShellHTML(profile, surface) {\n    profile = profile || {};\n    var restriction = profileRestrictionType(profile),\n      copy = restrictedShellText({ restrictedKind: restriction }, \"profile\"),\n      key = normalizedProfileKeyValue(\n        profile.profileKey || profile.profile_key || profile.handle || \"\",\n      ),\n      targetUid = String(profile.uid || profile.userId || profile.user_id || \"\"),\n      actionUid = profileActionIdentity(targetUid, key),\n      requested = currentViewerRequestedProfile(targetUid, key),\n      canRequest =\n        restriction === \"private\" &&\n        canUseSocialActions() &&\n        !relationshipBlockedProfile(targetUid, key) &&\n        !!key,\n      className =\n        surface === \"story\"\n          ? \"dsd-story385__empty dsd-profile-access-shell\"\n          : \"dsd-up315__post dsd-up315__post--restricted dsd-profile-access-shell\";\n    return (\n      '<article class=\"' +\n      className +\n      '\" data-dsd-profile-access-shell=\"true\" data-dsd-restricted-kind=\"' +\n      html(restriction || \"restricted\") +\n      '\"><strong>' +\n      html(copy.title) +\n      \"</strong><p>\" +\n      html(copy.body) +\n      \"</p>\" +\n      (canRequest\n        ? '<button type=\"button\" class=\"dsd-up315__action dsd-up315__action--gold\" data-dsd-toggle-follow-profile=\"' +\n          html(actionUid) +\n          '\" data-profile-key=\"' +\n          html(key) +\n          '\" aria-pressed=\"' +\n          requested +\n          '\">' +\n          (requested ? \"Requested\" : \"Request follow\") +\n          \"</button>\"\n        : \"\") +\n      \"</article>\"\n    );\n  }\n  function relationshipStateForUid(targetUid) {\r\n    return (\r\n      (targetUid = String(targetUid || \"\").trim()),\r\n      targetUid\r\n        ? state.followingByUid[targetUid]\r\n          ? \"active\"\r\n          : state.followRequestByUid[targetUid]\r\n            ? \"requested\"\r\n            : \"\"\r\n        : \"\"\r\n    );\r\n  }\r\n  function canViewProfileContent(profile) {\n    if (!profile) return !1;\n    var profileContentUid = String(\n        profile.uid || profile.userId || profile.user_id || \"\",\n      ).trim(),\n      profileContentKey = normalizedProfileKeyValue(\n        profile.profileKey || profile.profile_key || profile.handle || \"\",\n      );\n    if (\n      !isOwnProfileRoute() &&\n      relationshipBlockedProfile(profileContentUid, profileContentKey)\n    )\n      return !1;\n    return profile\n      ? isOwnProfileRoute() || canModerate()\n        ? !0\n        : profileVisibility(profile) !== \"private\"\n          ? publicProfileVisible(profile)\n          : currentViewerFollowsProfile(profileContentUid, profileContentKey)\n      : !1;\n  }\r\n  function profileRestrictionType(profile) {\n    var blockedUid = String(\n        (profile && (profile.uid || profile.userId || profile.user_id)) || \"\",\n      ).trim(),\n      blockedKey = normalizedProfileKeyValue(\n        (profile &&\n          (profile.profileKey || profile.profile_key || profile.handle)) ||\n          \"\",\n      );\n    if (\n      profile &&\n      !isOwnProfileRoute() &&\n      relationshipBlockedProfile(blockedUid, blockedKey)\n    )\n      return \"blocked\";\n    return profile\n      ? profileVisibility(profile) === \"private\"\n        ? \"private\"\n        : classifiedRestrictionType(profile)\r\n      : \"\";\r\n  }\r\n  function viewedProfileVisible(profile) {\r\n    if (publicProfileVisible(profile)) return !0;\r\n    if (\r\n      !profile ||\r\n      publicProfileDuplicateArtifact(profile) ||\r\n      recordSourceRisk(profile) ||\r\n      looksLikeRawEmail(profile.displayName) ||\r\n      looksLikeRawEmail(profile.profileKey) ||\r\n      looksLikeRawEmail(profile.handle)\r\n    )\r\n      return !1;\r\n    var visibility = profileVisibility(profile),\r\n      entity = profile.entity || {},\r\n      active =\r\n        profile.status === \"active\" ||\r\n        profile.setupComplete === !0 ||\r\n        entity.moderationStatus === \"approved\";\r\n    return (\r\n      active &&\r\n      (visibility === \"private\" ||\r\n        visibility === \"public\" ||\r\n        visibility === \"gated\")\r\n    );\r\n  }\r\n  function mediaIdLooksLikeUuid(value) {\r\n    return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(\r\n      String(value || \"\").trim(),\r\n    );\r\n  }\r\n  function readableProfileMediaId(record) {\r\n    record = record || {};\r\n    for (\r\n      var candidates = [\r\n          record.displayMediaId,\r\n          record.display_media_id,\r\n          record.legacyMediaId,\r\n          record.legacy_media_id,\r\n          record.mediaId,\r\n          record.media_id,\r\n          record.wasabiObjectKey,\r\n          record.wasabi_object_key,\r\n          record.objectKey,\r\n          record.object_key,\r\n          record.path,\r\n          record.avatarWasabiObjectKey,\r\n          record.avatar_wasabi_object_key,\r\n          record.bannerWasabiObjectKey,\r\n          record.banner_wasabi_object_key,\r\n          record.headerWasabiObjectKey,\r\n          record.header_wasabi_object_key,\r\n        ],\r\n        i = 0;\r\n      i < candidates.length;\r\n      i += 1\r\n    ) {\r\n      var value = String(candidates[i] || \"\").trim();\r\n      if (value && !mediaIdLooksLikeUuid(value)) return value;\r\n    }\r\n    return \"\";\r\n  }\r\n  function readableProfileSlotMediaId(record, slot) {\r\n    record = record || {};\r\n    for (\r\n      var candidates =\r\n          slot === \"banner\"\r\n            ? [\r\n                record.bannerWasabiObjectKey,\r\n                record.banner_wasabi_object_key,\r\n                record.headerWasabiObjectKey,\r\n                record.header_wasabi_object_key,\r\n                record.coverWasabiObjectKey,\r\n                record.cover_wasabi_object_key,\r\n                record.bannerObjectKey,\r\n                record.banner_object_key,\r\n                record.headerObjectKey,\r\n                record.header_object_key,\r\n                record.coverObjectKey,\r\n                record.cover_object_key,\r\n              ]\r\n            : [\r\n                record.avatarWasabiObjectKey,\r\n                record.avatar_wasabi_object_key,\r\n                record.photoWasabiObjectKey,\r\n                record.photo_wasabi_object_key,\r\n                record.avatarObjectKey,\r\n                record.avatar_object_key,\r\n                record.displayMediaId,\r\n                record.display_media_id,\r\n              ],\r\n        i = 0;\r\n      i < candidates.length;\r\n      i += 1\r\n    ) {\r\n      var value = String(candidates[i] || \"\").trim();\r\n      if (value && !mediaIdLooksLikeUuid(value)) return value;\r\n    }\r\n    return \"\";\r\n  }\r\n  function profileAuthorMediaFallback(profile, slot) {\r\n    profile = profile || {};\r\n    for (\r\n      var targetUid = String(\r\n          profile.uid || profile.userId || profile.user_id || \"\",\r\n        ).trim(),\r\n        targetKey = clean(\r\n          profile.profileKey || profile.handle || \"\",\r\n          \"\",\r\n        ).toLowerCase(),\r\n        rows = (state.posts || [])\r\n          .concat(state.stories || [])\r\n          .slice()\r\n          .sort(function (a, b) {\r\n            return recordMillis(b) - recordMillis(a);\r\n          }),\r\n        i = 0;\r\n      i < rows.length;\r\n      i += 1\r\n    ) {\r\n      var row = rows[i] || {},\r\n        rowUid = String(\r\n          row.authorUid || row.ownerUid || row.userId || \"\",\r\n        ).trim(),\r\n        rowKey = clean(\r\n          row.authorProfileKey || row.ownerProfileKey || row.profileKey || \"\",\r\n          \"\",\r\n        ).toLowerCase();\r\n      if (\r\n        (targetUid && rowUid === targetUid) ||\r\n        (targetKey && rowKey === targetKey)\r\n      ) {\r\n        var mediaId =\n          slot === \"banner\"\n            ? row.authorBannerMediaId ||\n              row.ownerBannerMediaId ||\n              \"\"\n            : row.authorAvatarMediaId ||\n              row.ownerAvatarMediaId ||\n              \"\";\n        if (mediaId) return mediaId;\r\n      }\r\n    }\r\n    if (targetKey && typeof document != \"undefined\" && slot === \"avatar\")\r\n      for (\r\n        var authorLinks = qsa(\r\n            '.dsd-post-card__avatar[data-dsd-avatar-media-id], .dsd-post-card [href*=\"/pages/user-profile?profile=\"], .dsd-users311__card[data-profile-key]',\r\n          ),\r\n          j = 0;\r\n        j < authorLinks.length;\r\n        j += 1\r\n      ) {\r\n        var link = authorLinks[j],\r\n          card =\r\n            link.closest &&\r\n            link.closest(\r\n              \".dsd-post-card, [data-dsd-post-card], .dsd-users311__card\",\r\n            ),\r\n          href = String((link.getAttribute && link.getAttribute(\"href\")) || \"\"),\r\n          cardKey = clean(\r\n            (card &&\r\n              card.getAttribute &&\r\n              card.getAttribute(\"data-profile-key\")) ||\r\n              \"\",\r\n            \"\",\r\n          ).toLowerCase(),\r\n          text = String((card && card.textContent) || \"\").toLowerCase(),\r\n          linkKey = \"\";\r\n        try {\r\n          href &&\r\n            (linkKey = clean(\r\n              new URL(href, location.origin).searchParams.get(\"profile\") || \"\",\r\n              \"\",\r\n            ).toLowerCase());\r\n        } catch (e) {}\r\n        if (\r\n          (cardKey && cardKey === targetKey) ||\r\n          (linkKey && linkKey === targetKey) ||\r\n          text.indexOf(\"@\" + targetKey) !== -1\r\n        ) {\r\n          var domAvatar =\r\n              card &&\r\n              qs(\r\n                \".dsd-post-card__avatar[data-dsd-avatar-media-id], .dsd-users311__avatar[data-dsd-avatar-media-id]\",\r\n                card,\r\n              ),\r\n            domMediaId =\r\n              link.getAttribute(\"data-dsd-avatar-media-id\") ||\r\n              (domAvatar &&\r\n                domAvatar.getAttribute(\"data-dsd-avatar-media-id\")) ||\r\n              \"\";\r\n          if (domMediaId) return domMediaId;\r\n        }\r\n      }\r\n    if (targetKey && typeof document != \"undefined\" && slot === \"banner\")\r\n      for (\r\n        var cards = qsa(\r\n            \".dsd-users311__card[data-profile-key]\",\r\n          ),\r\n          k = 0;\r\n        k < cards.length;\r\n        k += 1\r\n      ) {\r\n        var node = cards[k],\r\n          nodeKey = clean(\r\n            (node.getAttribute && node.getAttribute(\"data-profile-key\")) || \"\",\r\n            \"\",\r\n          ).toLowerCase();\r\n        if (nodeKey === targetKey) {\r\n          var cover = qs(\r\n              \"[data-dsd-profile-cover-media-id], [data-dsd-cover-media-id], [data-dsd-header-media-id]\",\r\n              node,\r\n            ),\r\n            coverId =\r\n              (cover &&\r\n                (cover.getAttribute(\"data-dsd-profile-cover-media-id\") ||\r\n                  cover.getAttribute(\"data-dsd-cover-media-id\") ||\r\n                  cover.getAttribute(\"data-dsd-header-media-id\"))) ||\r\n              \"\";\r\n          if (coverId) return coverId;\r\n        }\r\n      }\r\n    return \"\";\r\n  }\r\n  function canonicalProfileAvatarMediaId(profile) {\r\n    profile = profile || {};\r\n    for (\r\n      var avatarCandidates = [\r\n          profile.avatarMediaId,\r\n          profile.thumbnailMediaId,\r\n          profile.profileImageMediaId,\r\n          profile.photoMediaId,\r\n          profile.imageMediaId,\r\n          profile.avatarImageId,\r\n          profile.avatar_media_id,\r\n          profile.thumbnail_media_id,\r\n          profile.profile_image_media_id,\r\n          profile.photo_media_id,\r\n          profile.image_media_id,\r\n          profile.avatar_image_id,\r\n          profile.avatarWasabiObjectKey,\r\n          profile.avatar_wasabi_object_key,\r\n          profile.photoWasabiObjectKey,\r\n          profile.photo_wasabi_object_key,\r\n          profile.avatarObjectKey,\r\n          profile.avatar_object_key,\r\n        ],\r\n        primary = \"\",\r\n        i = 0;\r\n      i < avatarCandidates.length &&\r\n      ((primary = String(avatarCandidates[i] || \"\").trim()), !primary);\r\n      i += 1\r\n    );\r\n    if (primary) return primary;\r\n    if (profile.avatarMediaHydrated === !0) return \"\";\r\n    var fallback =\r\n      readableProfileSlotMediaId(profile, \"avatar\") ||\r\n      profileAuthorMediaFallback(profile, \"avatar\");\r\n    return fallback || \"\";\r\n  }\r\n  function canonicalProfileBannerMediaId(profile) {\r\n    profile = profile || {};\r\n    for (\r\n      var bannerCandidates = [\r\n          profile.bannerMediaId,\r\n          profile.headerMediaId,\r\n          profile.coverMediaId,\r\n          profile.backgroundMediaId,\r\n          profile.bannerImageId,\r\n          profile.headerImageId,\r\n          profile.coverImageId,\r\n          profile.banner_media_id,\r\n          profile.header_media_id,\r\n          profile.cover_media_id,\r\n          profile.background_media_id,\r\n          profile.banner_image_id,\r\n          profile.header_image_id,\r\n          profile.cover_image_id,\r\n          profile.bannerWasabiObjectKey,\r\n          profile.banner_wasabi_object_key,\r\n          profile.headerWasabiObjectKey,\r\n          profile.header_wasabi_object_key,\r\n          profile.coverWasabiObjectKey,\r\n          profile.cover_wasabi_object_key,\r\n          profile.bannerObjectKey,\r\n          profile.banner_object_key,\r\n          profile.headerObjectKey,\r\n          profile.header_object_key,\r\n          profile.coverObjectKey,\r\n          profile.cover_object_key,\r\n        ],\r\n        primary = \"\",\r\n        i = 0;\r\n      i < bannerCandidates.length &&\r\n      ((primary = String(bannerCandidates[i] || \"\").trim()), !primary);\r\n      i += 1\r\n    );\r\n    if (primary) return primary;\r\n    if (profile.bannerMediaHydrated === !0) return \"\";\r\n    var fallback =\r\n      readableProfileSlotMediaId(profile, \"banner\") ||\r\n      profileAuthorMediaFallback(profile, \"banner\");\r\n    return fallback || \"\";\r\n  }\r\n  function publicProfileDuplicateArtifact(profile) {\r\n    if (!profile) return !1;\r\n    var stateValue = String(\r\n        profile.status ||\r\n          profile.state ||\r\n          (profile.entity && profile.entity.status) ||\r\n          \"\",\r\n      ).toLowerCase(),\r\n      profileType = String(\r\n        profile.profileType ||\r\n          profile.profile_type ||\r\n          profile.recordType ||\r\n          profile.record_type ||\r\n          \"\",\r\n      ).toLowerCase();\r\n    return !!(\r\n      profile.duplicateOf ||\r\n      profile.duplicate_of ||\r\n      profile.aliasOf ||\r\n      profile.alias_of ||\r\n      profile.isDuplicate === !0 ||\r\n      profile.duplicate === !0 ||\r\n      stateValue === \"duplicate\" ||\r\n      profileType === \"duplicate\"\r\n    );\r\n  }\r\n  function canonicalLaunchProfileOwner(profile) {\r\n    return null;\r\n  }\r\n  function canonicalLaunchProfileOwnerMismatch(profile) {\r\n    var expected = canonicalLaunchProfileOwner(profile);\r\n    if (!expected) return !1;\r\n    var ownerUid = clean(\r\n      profile.uid ||\r\n        profile.userId ||\r\n        profile.user_id ||\r\n        profile.firebaseUid ||\r\n        profile.firebase_uid ||\r\n        \"\",\r\n      \"\",\r\n    );\r\n    return !!(ownerUid && ownerUid !== expected.uid);\r\n  }\r\n  function legacyFounderDuplicateProfileArtifact(profile) {\r\n    return publicProfileDuplicateArtifact(profile);\r\n  }\r\n  function duplicateProfileArtifactKey(key) {\r\n    return (\r\n      (key = clean(key || \"\", \"\")\r\n        .replace(/^@+/, \"\")\r\n        .toLowerCase()),\r\n      key\r\n        ? !!(\r\n            key === \"dsdsecondary2\" ||\r\n            key === \"profile\" ||\r\n            key === \"member\" ||\r\n            key === \"user\" ||\r\n            /@/.test(key)\r\n          )\r\n        : !1\r\n    );\r\n  }\r\n  function conversationParticipantMatch(conversation) {\r\n    if (!conversation || !hasCustomer()) return !1;\r\n    var selfKey = clean(profileKey() || \"\", \"\").toLowerCase(),\r\n      ids = (\r\n        conversation.participantIds ||\r\n        conversation.participant_ids ||\r\n        []\r\n      ).map(function (item) {\r\n        return String(item || \"\").trim();\r\n      }),\r\n      keys = (\r\n        conversation.participantKeys ||\r\n        conversation.participant_profile_keys ||\r\n        []\r\n      ).map(function (item) {\r\n        return clean(item || \"\", \"\").toLowerCase();\r\n      });\r\n    return !!(\r\n      ids.some(function (id) {\r\n        return identityMatchesCurrent(id, \"\");\r\n      }) ||\r\n      (selfKey && keys.indexOf(selfKey) !== -1) ||\r\n      identityMatchesCurrent(\r\n        conversation.senderUid,\r\n        conversation.senderProfileKey,\r\n      ) ||\r\n      identityMatchesCurrent(\r\n        conversation.recipientUid,\r\n        conversation.recipientProfileKey,\r\n      )\r\n    );\r\n  }\r\n  function activeConversationRecords(items) {\r\n    return (items || []).filter(function (conversation) {\r\n      var stateValue = normalizedRecordState(conversation);\r\n      return [\r\n        \"deleted\",\r\n        \"archived\",\r\n        \"removed\",\r\n        \"hidden\",\r\n        \"rejected\",\r\n        \"blocked\",\r\n        \"disabled\",\r\n      ].indexOf(stateValue) !== -1 ||\r\n        conversation.archivedAt ||\r\n        conversation.archived_at ||\r\n        conversation.deletedAt ||\r\n        conversation.deleted_at\r\n        ? !1\r\n        : conversationParticipantMatch(conversation);\r\n    });\r\n  }\r\n  function conversationRemovedForCurrent(conversation) {\r\n    conversation = conversation || {};\r\n    var selfUid = actorRelationshipIdentity(),\r\n      selfKey = clean(profileKey() || \"\", \"\").toLowerCase(),\r\n      removedIds = []\r\n        .concat(\r\n          conversation.removedParticipantIds ||\r\n            conversation.removed_participant_ids ||\r\n            [],\r\n        )\r\n        .concat(\r\n          conversation.leftParticipantIds ||\r\n            conversation.left_participant_ids ||\r\n            [],\r\n        ),\r\n      removedKeys = []\r\n        .concat(\r\n          conversation.removedParticipantKeys ||\r\n            conversation.removed_participant_keys ||\r\n            [],\r\n        )\r\n        .concat(\r\n          conversation.leftParticipantKeys ||\r\n            conversation.left_participant_keys ||\r\n            [],\r\n        )\r\n        .map(function (key) {\r\n          return clean(key || \"\", \"\").toLowerCase();\r\n        });\r\n    return !!(\r\n      (selfUid && removedIds.indexOf(selfUid) !== -1) ||\r\n      (selfKey && removedKeys.indexOf(selfKey) !== -1)\r\n    );\r\n  }\r\n  function canRenameGroupConversation(conversation) {\r\n    conversation = conversation || {};\r\n    var type = conversationType(conversation);\r\n    if (type !== \"groups\") return !1;\r\n    var stateValue = normalizedRecordState(conversation);\r\n    if (\r\n      [\r\n        \"deleted\",\r\n        \"archived\",\r\n        \"removed\",\r\n        \"hidden\",\r\n        \"rejected\",\r\n        \"blocked\",\r\n        \"disabled\",\r\n      ].indexOf(stateValue) !== -1 ||\r\n      conversation.archivedAt ||\r\n      conversation.archived_at ||\r\n      conversation.deletedAt ||\r\n      conversation.deleted_at ||\r\n      conversationRemovedForCurrent(conversation) ||\r\n      conversationBlocked(conversation)\r\n    )\r\n      return !1;\r\n    var participant = conversationParticipantMatch(conversation);\r\n    if (!participant && !canModerate()) return !1;\r\n    var premiumState = premiumStateObject(\r\n        conversation.premiumState || conversation.premium_state,\r\n      ),\r\n      renameLock = String(\r\n        conversation.groupRenamePolicy ||\r\n          conversation.group_rename_policy ||\r\n          premiumState.groupRenamePolicy ||\r\n          premiumState.group_rename_policy ||\r\n          \"\",\r\n      ).toLowerCase(),\r\n      creatorOnly =\r\n        renameLock === \"creator\" ||\r\n        renameLock === \"owner\" ||\r\n        conversation.renameCreatorOnly === !0 ||\r\n        conversation.rename_creator_only === !0 ||\r\n        premiumState.renameCreatorOnly === !0;\r\n    if (!creatorOnly) return participant || canModerate();\r\n    var creatorUid = String(\r\n        conversation.createdByUserId ||\r\n          conversation.created_by_user_id ||\r\n          conversation.creatorUid ||\r\n          conversation.creator_uid ||\r\n          premiumState.createdByUserId ||\r\n          premiumState.created_by_user_id ||\r\n          \"\",\r\n      ).trim(),\r\n      creatorKey = clean(\r\n        conversation.createdByProfileKey ||\r\n          conversation.created_by_profile_key ||\r\n          conversation.creatorProfileKey ||\r\n          conversation.creator_profile_key ||\r\n          premiumState.createdByProfileKey ||\r\n          premiumState.created_by_profile_key ||\r\n          \"\",\r\n        \"\",\r\n      ).toLowerCase();\r\n    return identityMatchesCurrent(creatorUid, creatorKey) || canModerate();\r\n  }\r\n  function recordBelongsToProfile(record, targetUid, targetKey, uidField) {\r\n    var key = clean(\r\n        record &&\r\n          (record.authorProfileKey ||\r\n            record.ownerProfileKey ||\r\n            record.profileKey ||\r\n            \"\"),\r\n        \"\",\r\n      ).toLowerCase(),\r\n      target = clean(targetKey || \"\", \"\").toLowerCase(),\r\n      recordUid = String(\r\n        (record &&\r\n          (record[uidField || \"authorUid\"] ||\r\n            record.ownerUid ||\r\n            record.uid ||\r\n            record.userId ||\r\n            \"\")) ||\r\n          \"\",\r\n      ).trim();\r\n    if (duplicateProfileArtifactKey(key)) return !1;\r\n    if (target && key) return key === target;\r\n    if (target && recordUid) {\r\n      var keyUid = profileUidForKey(target);\r\n      if (keyUid) return recordUid === keyUid;\r\n    }\r\n    return targetUid && recordUid\r\n      ? recordUid === String(targetUid || \"\").trim()\r\n      : target\r\n        ? !!(key && key === target)\r\n        : !!(\r\n            targetUid &&\r\n            recordUid &&\r\n            recordUid === String(targetUid || \"\").trim()\r\n          );\r\n  }\r\n  function publicSpaceVisible(space) {\r\n    if (\r\n      !space ||\r\n      space.status === \"deleted\" ||\r\n      space.status === \"hidden\" ||\r\n      space.status === \"rejected\" ||\r\n      !publicRecordVisible(space)\r\n    )\r\n      return !1;\r\n    var publicApproved =\r\n      (space.status === \"approved\" ||\r\n        (space.moderation && space.moderation.state === \"approved\")) &&\r\n      (space.visibility === \"public\" ||\r\n        (space.entity && space.entity.visibility === \"public\"));\r\n    return (\r\n      canViewClassified(space) &&\r\n      (publicApproved ||\r\n        identityMatchesCurrent(space.ownerUid, space.ownerProfileKey) ||\r\n        canModerate())\r\n    );\r\n  }\r\n  function publishPublicProfiles(items) {\r\n    var source = Array.isArray(items) ? items : state.publicProfiles;\r\n    state.publicProfiles = dedupePublicProfiles(\r\n      (source || []).filter(publicProfileVisible),\r\n    );\r\n    try {\r\n      window.dispatchEvent(\r\n        new CustomEvent(\"dsd:public-profiles:updated\", {\r\n          detail: {\r\n            profiles: state.publicProfiles.slice(0, 100),\r\n            version: VERSION,\r\n          },\r\n        }),\r\n      );\r\n    } catch (e) {}\r\n  }\r\n  function ensureProfile() {\n    var setupGeneration = beginProfileSetupResolution(\"ensure-profile\");\n    return (hasCustomer()\n      ? !1\r\n        ? getDoc(currentProfilePath())\r\n            .then(function (snap) {\r\n              return (\r\n                (state.profileExists = !!(\r\n                  snap &&\r\n                  snap.exists &&\r\n                  snap.exists()\r\n                )),\r\n                (state.profile = state.profileExists\r\n                  ? Object.assign({ uid: uid() }, snap.data() || {})\r\n                  : canonicalProfilePayload(!0)),\r\n                (state.profile =\r\n                  profileWithPublicMirror(state.profile) || state.profile),\r\n                readSupabasePrivateProfileByKey(\r\n                  (state.profile &&\r\n                    (state.profile.profileKey || state.profile.handle)) ||\r\n                    profileKey(),\r\n                )\r\n                  .then(function (privateProfile) {\r\n                    return (\r\n                      privateProfile &&\r\n                        (state.profile =\r\n                          profileWithPublicMirror(\r\n                            mergePrivateProfileCapabilities(\r\n                              state.profile,\r\n                              privateProfile,\r\n                            ),\r\n                          ) || state.profile),\r\n                      state.profile\r\n                    );\r\n                  })\r\n                  .catch(function (error) {\r\n                    return (\r\n                      claim(\r\n                        \"private-profile-capability-prewrite-hydration:blocked\",\r\n                        {\r\n                          profileKey:\r\n                            (state.profile &&\r\n                              (state.profile.profileKey ||\r\n                                state.profile.handle)) ||\r\n                            profileKey(),\r\n                          error: (error && error.message) || String(error),\r\n                        },\r\n                      ),\r\n                      state.profile\r\n                    );\r\n                  })\r\n              );\r\n            })\r\n            .then(function () {\r\n              var shouldActivate = !!(\r\n                state.profile && state.profile.setupComplete\r\n              );\r\n              hasCustomer() &&\r\n                displayName() &&\r\n                profileKey() &&\r\n                (!state.profileExists ||\r\n                  state.profile.status === \"setup_required\") &&\r\n                (shouldActivate = !0);\r\n              var payload =\r\n                profileWithPublicMirror(\r\n                  Object.assign(\r\n                    {},\r\n                    canonicalProfilePayload(shouldActivate),\r\n                    state.profile || {},\r\n                  ),\r\n                ) || canonicalProfilePayload(shouldActivate);\r\n              return (\r\n                (payload.setupComplete = shouldActivate),\r\n                (payload.status = shouldActivate ? \"active\" : \"setup_required\"),\r\n                (payload.entity = entityMeta(\r\n                  \"profile\",\r\n                  payload.visibility || \"public\",\r\n                  \"standard\",\r\n                  { moderationStatus: shouldActivate ? \"approved\" : \"pending\" },\r\n                )),\r\n                setDoc(currentProfilePath(), payload, !0)\r\n                  .then(saveMembershipCacheIfAvailable)\r\n                  .then(function () {\r\n                    return setDoc(\r\n                      \"publicProfiles/\" + payload.profileKey,\r\n                      publicProfilePayload(payload),\r\n                      !0,\r\n                    );\r\n                  })\r\n                  .then(function () {\r\n                    return payload;\r\n                  })\r\n              );\r\n            })\r\n            .then(function (profile) {\r\n              return (\r\n                profile && (state.profile = profile),\r\n                publishPublicProfiles(),\r\n                maybeRouteProfile(),\r\n                renderAll(),\r\n                ensureActiveLocationFresh(\"session-start\", !1),\r\n                clearStaleConnectionStatus(),\r\n                profile\r\n              );\r\n            })\r\n            .catch(function (error) {\r\n              return canUseSocialActions()\r\n                ? (publishPublicProfiles(),\r\n                  maybeRouteProfile(),\r\n                  renderAll(),\r\n                  clearStaleConnectionStatus(),\r\n                  state.profile)\r\n                : (renderStatus(\r\n                    \"Profile connection is refreshing. Try again in a moment.\",\r\n                  ),\r\n                  null);\r\n            })\r\n        : primeSupabaseEntitlementSession()\n            .then(function () {\n              if (\n                state.sessionSetupRequired === !0 &&\n                state.sessionProvisioningReady === !0\n              ) {\n                return (\n                  activateProvisionedIncompleteProfile(),\n                  maybeRouteProfile(),\n                  renderAll(),\n                  clearStaleConnectionStatus(),\n                  state.profile\n                );\n              }\n              var scopedKey = customerProfileKeyValue();\n              return scopedKey\r\n                ? readSupabaseCanonicalProfileByKey(scopedKey).then(\r\n                    function (scopedProfile) {\r\n                      return scopedProfile\r\n                        ? mergePublicProfileMediaFromCanonicalProfile(\r\n                            scopedProfile,\r\n                            scopedKey,\r\n                          ).then(function (mediaReadyProfile) {\r\n                            return (\r\n                              activateCustomerScopedProfile(\r\n                                mediaReadyProfile || scopedProfile,\r\n                              ),\r\n                              maybeRouteProfile(),\r\n                              renderAll(),\r\n                              clearStaleConnectionStatus(),\r\n                              state.profile\r\n                            );\r\n                          })\r\n                        : null;\r\n                    },\r\n                  )\r\n                : (claim(\"supabase-current-profile-key:missing\", {\r\n                    canonical: \"shopify-customer-id-is-store-scoped\",\r\n                    action:\r\n                      \"no-firebase-current-profile-fallback-deconstructed\",\r\n                  }),\r\n                  (state.profileExists = !1),\r\n                  (state.profile = storeScopedIdentityRequiresPrivateBridge()\r\n                    ? identityRebindingRequiredProfile()\r\n                    : canonicalProfilePayload(!1)),\r\n                  (state.profile.status =\r\n                    storeScopedIdentityRequiresPrivateBridge()\r\n                      ? \"identity_rebinding_required\"\r\n                      : \"setup_required\"),\r\n                  (state.profile.authBridge = \"supabase-profile-key-required\"),\r\n                  publishPublicProfiles(),\r\n                  renderAll(),\r\n                  clearStaleConnectionStatus(),\r\n                  state.profile);\r\n            })\r\n            .then(function (scopedProfile) {\r\n              return (\r\n                scopedProfile ||\r\n                (publishPublicProfiles(),\r\n                maybeRouteProfile(),\r\n                renderAll(),\r\n                clearStaleConnectionStatus(),\r\n                state.profile)\r\n              );\r\n            })\r\n            .catch(function (error) {\r\n              if (\r\n                ((state.profileExists = !1),\r\n                (state.profile =\r\n                  storeScopedIdentityRequiresPrivateBridge() &&\r\n                  !customerProfileKeyValue()\r\n                    ? identityRebindingRequiredProfile()\r\n                    : canonicalProfilePayload(!1)),\r\n                !state.profile.identityRebindingRequired)\r\n              ) {\r\n                var customerSession = customer() || {},\r\n                  fallbackKey = nonPlaceholderProfileKey(\r\n                    customerSession.profileKey ||\r\n                      customerSession.handle ||\r\n                      state.sessionProfileKey ||\r\n                      \"\",\r\n                  );\r\n                ((state.profile.uid = state.profile.uid || \"\"),\r\n                  (state.profile.profileKey = fallbackKey),\r\n                  (state.profile.handle = state.profile.profileKey),\r\n                  (state.profile.displayName = isCanonicalFounder()\r\n                    ? \"Detroit Sky Daddy\"\r\n                    : displayName()),\r\n                  (state.profile.status = fallbackKey\r\n                    ? \"setup_required\"\r\n                    : \"identity_rebinding_required\"),\r\n                  (state.profile.setupComplete = !1),\r\n                  (state.profile.authBridge = fallbackKey\r\n                    ? \"supabase-profile-key-setup-required\"\r\n                    : \"supabase-profile-key-required\"));\r\n              }\r\n              return (\r\n                claim(\"supabase-current-profile:blocked\", {\r\n                  error: (error && error.message) || String(error),\r\n                }),\r\n                publishPublicProfiles(),\r\n                renderAll(),\r\n                clearStaleConnectionStatus(),\r\n                state.profile\r\n              );\r\n            })\r\n      : Promise.resolve(null)).then(function (resolvedProfile) {\n        commitProfileSetupResolution(\n          setupGeneration,\n          resolvedProfile || state.profile,\n          \"ensure-profile:settled\",\n        );\n        return resolvedProfile;\n      });\n  }\n  function indexRelationshipProfileState(target, record) {\n    var endpoint = relationshipEndpoint(record, \"target\"),\n      uidKey = String((endpoint && endpoint.uid) || \"\").trim(),\n      profileKeyValue = normalizedProfileKeyValue(\n        (endpoint && endpoint.key) || \"\",\n      );\n    uidKey && (target[uidKey] = !0);\n    profileKeyValue && (target[\"profile-key:\" + profileKeyValue] = !0);\n  }\n  function loadOwnProfileRelationshipsViaProxy() {\n    var targetKey = nonPlaceholderProfileKey(profileKey() || \"\");\n    if (!hasCustomer() || !targetKey) return Promise.resolve([]);\n    if (state.ownRelationshipSnapshotPromise)\n      return state.ownRelationshipSnapshotPromise;\n    state.ownRelationshipSnapshotPromise = fetch(\n      \"/apps/dsd-firebase-custom-token/supabase/profile-relationships\",\n      {\n        method: \"POST\",\n        credentials: \"include\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n          Accept: \"application/json\",\n        },\n        body: JSON.stringify({ targetProfileKey: targetKey }),\n      },\n    )\n      .then(function (response) {\n        return response.text().then(function (text) {\n          var body = {};\n          try {\n            body = text ? JSON.parse(text) : {};\n          } catch (_parseOwnRelationshipSnapshotError) {\n            body = {};\n          }\n          if (\n            !response.ok ||\n            body.ok === !1 ||\n            normalizedProfileKeyValue(body.profileKey || \"\") !==\n              normalizedProfileKeyValue(targetKey) ||\n            body.privateFieldsExposed !== !1\n          )\n            throw new Error(\n              body.error ||\n                body.message ||\n                \"Own profile relationships unavailable: \" + response.status,\n            );\n          return body;\n        });\n      })\n      .then(function (body) {\n        var following = body.following || [],\n          followers = body.followers || [];\n        ((state.followingByUid = {}),\n          (state.followRequestByUid = {}),\n          (state.blockedByUid = {}),\n          (state.blockedMeByUid = {}),\n          (state.blockedRecords = (following || []).filter(function (item) {\n            return item && String(item.state || \"\").toLowerCase() === \"blocked\";\n          })),\n          (state.followingRecords = canonicalRelationshipRecords(\n            following,\n            \"following\",\n          )),\n          (state.followRequestRecords = following.filter(function (item) {\n            return item && item.state === \"requested\";\n          })),\n          (state.followersRecords = canonicalRelationshipRecords(\n            followers,\n            \"followers\",\n          )),\n          (state.incomingFollowRequests = followers.filter(function (item) {\n            return item && item.state === \"requested\";\n          })),\n          state.blockedRecords.forEach(function (item) {\n            indexRelationshipProfileState(state.blockedByUid, item);\n          }),\n          (followers || [])\n            .filter(function (item) {\n              return item && String(item.state || \"\").toLowerCase() === \"blocked\";\n            })\n            .forEach(function (item) {\n              var endpoint = relationshipEndpoint(item, \"source\"),\n                sourceUid = String((endpoint && endpoint.uid) || \"\").trim(),\n                sourceKey = normalizedProfileKeyValue(\n                  (endpoint && endpoint.key) || \"\",\n                );\n              sourceUid && (state.blockedMeByUid[sourceUid] = !0);\n              sourceKey && (state.blockedMeByUid[\"profile-key:\" + sourceKey] = !0);\n            }),\n          state.followingRecords.forEach(function (item) {\n            indexRelationshipProfileState(state.followingByUid, item);\n          }),\n          state.followRequestRecords.forEach(function (item) {\n            indexRelationshipProfileState(state.followRequestByUid, item);\n          }),\n          (state.followingRecordsLoaded = !0),\n          (state.followersRecordsLoaded = !0),\n          (state.ownRelationshipSnapshotLoaded = !0),\n          renderProfileIdentity(),\n          renderDiscovery(),\n          renderRelationships(),\n          renderPosts(),\n          renderMessages(),\n          claim(\"own-profile-relationships:proxy-loaded\", {\n            profileKey: targetKey,\n            following: state.followingRecords.length,\n            followRequests: state.followRequestRecords.length,\n            followers: state.followersRecords.length,\n            incomingRequests: state.incomingFollowRequests.length,\n            canonical: \"signed-safe-owner-relationship-snapshot\",\n          }));\n        return following;\n      })\n      .catch(function (error) {\n        return (\n          claim(\"own-profile-relationships:proxy-blocked\", {\n            profileKey: targetKey,\n            error: (error && error.message) || String(error),\n          }),\n          []\n        );\n      })\n      .then(function (result) {\n        return ((state.ownRelationshipSnapshotPromise = null), result);\n      });\n    return state.ownRelationshipSnapshotPromise;\n  }\n  function clearViewedRelationshipListeners() {\r\n    ((state.viewedRelationshipListeners || []).forEach(function (off) {\r\n      try {\r\n        off();\r\n      } catch (e) {}\r\n    }),\r\n      (state.viewedRelationshipListeners = []),\r\n      (state.viewedRelationshipKey = \"\"),\r\n      (state.viewedRelationshipPromiseKey = \"\"),\r\n      (state.viewedRelationshipPromise = null),\r\n      (state.viewedFollowersRecords = []),\r\n      (state.viewedFollowingRecords = []),\r\n      (state.viewedFollowersRecordsLoaded = !1),\r\n      (state.viewedFollowingRecordsLoaded = !1),\n      (state.viewedFavoritesRecords = []),\n      (state.viewedSavedItems = []),\n      (state.viewedFavoritesRecordsLoaded = !1),\n      (state.viewedSavedItemsLoaded = !1),\n      (state.profileAlbums = []),\n      (state.profileAlbumsLoadedKey = \"\"),\n      (state.activeAlbumId = \"\"),\r\n      (state.activeAlbumDetail = null));\r\n  }\r\n  function loadViewedPublicRelationships(profile) {\r\n    var targetUid =\r\n        (profile &&\r\n          (profile.uid || profile.userId || profile.user_id || profile.id)) ||\r\n        \"\",\r\n      targetKey = clean(\r\n        profile && (profile.profileKey || profile.handle || \"\"),\r\n        \"\",\r\n      ),\r\n      listenerKey = normalizedProfileKeyValue(targetKey) || targetUid;\r\n    if (!profile || isOwnProfileRoute() || !listenerKey)\r\n      return (\r\n        clearViewedRelationshipListeners(),\r\n        renderRelationships(),\r\n        Promise.resolve([])\r\n      );\r\n    if (\r\n      state.viewedRelationshipPromiseKey === listenerKey &&\r\n      state.viewedRelationshipPromise\r\n    )\r\n      return (\r\n        (state.viewedRelationshipKey = listenerKey),\r\n        state.viewedRelationshipPromise\r\n      );\r\n    if (\r\n      state.viewedRelationshipKey === listenerKey &&\r\n      state.viewedFollowersRecordsLoaded &&\r\n      state.viewedFollowingRecordsLoaded &&\r\n      state.viewedFavoritesRecordsLoaded &&\r\n      state.viewedSavedItemsLoaded\r\n    )\r\n      return Promise.resolve(state.viewedFollowersRecords);\r\n    (clearViewedRelationshipListeners(),\r\n      (state.viewedRelationshipKey = listenerKey));\r\n    renderRelationships();\r\n    state.viewedRelationshipPromiseKey = listenerKey;\r\n    state.viewedRelationshipPromise = fetch(\r\n      \"/apps/dsd-firebase-custom-token/supabase/profile-relationships\",\r\n      {\r\n        method: \"POST\",\r\n        credentials: \"include\",\r\n        headers: {\r\n          \"Content-Type\": \"application/json\",\r\n          Accept: \"application/json\",\r\n        },\r\n        body: JSON.stringify({\n          targetProfileKey: targetKey,\n        }),\n      },\r\n    )\r\n      .then(function (response) {\r\n        return response.text().then(function (text) {\r\n          var body = {};\r\n          try {\r\n            body = text ? JSON.parse(text) : {};\r\n          } catch (_parseRelationshipResponseError) {\r\n            body = {};\r\n          }\r\n          if (!response.ok || body.ok === !1)\r\n            throw new Error(\r\n              body.error ||\r\n                body.message ||\r\n                \"Profile relationships unavailable: \" + response.status,\r\n            );\r\n          return body;\r\n        });\r\n      })\r\n      .then(function (body) {\r\n        if (state.viewedRelationshipKey !== listenerKey) return [];\r\n        ((state.viewedFollowersRecords = canonicalRelationshipRecords(\r\n          body.followers || [],\r\n          \"followers\",\r\n        )),\r\n          (state.viewedFollowingRecords = canonicalRelationshipRecords(\n            body.following || [],\n            \"following\",\n          )),\n          (state.viewedFavoritesRecords = canonicalRelationshipRecords(\n            body.favorites || [],\n            \"favorites\",\n          )),\n          (state.viewedSavedItems = activeSavedItems(body.saved || [])),\n          (state.publicProfiles = dedupePublicProfiles(\n            (state.publicProfiles || []).concat(body.favoriteProfiles || []),\n          )),\n          (state.viewedFollowersRecordsLoaded = !0),\n          (state.viewedFollowingRecordsLoaded = !0),\n          (state.viewedFavoritesRecordsLoaded = !0),\n          (state.viewedSavedItemsLoaded = !0),\n          renderRelationships(),\n          claim(\"viewed-profile-relationships:proxy-loaded\", {\r\n            profileKey: targetKey,\r\n            followers: state.viewedFollowersRecords.length,\n            following: state.viewedFollowingRecords.length,\n            favorites: state.viewedFavoritesRecords.length,\n            saved: state.viewedSavedItems.length,\n            canonical: \"signed-safe-profile-relationship-and-public-collection-list\",\n          }));\n        return body.followers || [];\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          state.viewedRelationshipKey === listenerKey &&\r\n            ((state.viewedFollowersRecordsLoaded = !0),\n            (state.viewedFollowingRecordsLoaded = !0),\n            renderRelationships()),\n          claim(\"viewed-profile-relationships:proxy-blocked\", {\r\n            profileKey: targetKey,\r\n            error: (error && error.message) || String(error),\r\n          }),\r\n          []\r\n        );\r\n      })\r\n      .then(function (result) {\r\n        if (state.viewedRelationshipPromiseKey === listenerKey) {\r\n          state.viewedRelationshipPromiseKey = \"\";\r\n          state.viewedRelationshipPromise = null;\r\n        }\r\n        return result;\r\n      });\r\n    return state.viewedRelationshipPromise;\r\n  }\r\n  function loadViewedPublicProfile() {\n    var key = routeProfileKey(),\n      nearbyProjectionPending =\n        key && hasCustomer()\n          ? fetchNearbyDiscoveryRows(!1)\n          : Promise.resolve([]);\n    if (!key) {\r\n      ((state.viewProfile = null),\r\n        (state.viewProfileResolvedKey = \"\"),\r\n        (state.viewProfilePendingKey = \"\"),\r\n        (state.viewProfilePendingPromise = null),\r\n        clearViewedRelationshipListeners());\r\n      return Promise.resolve(null);\r\n    }\r\n    if (\r\n      state.viewProfilePendingKey === key &&\r\n      state.viewProfilePendingPromise\r\n    )\r\n      return state.viewProfilePendingPromise;\r\n    if (\r\n      state.viewProfileResolvedKey === key &&\r\n      state.viewProfile &&\r\n      normalizedProfileKeyValue(\r\n        state.viewProfile.profileKey || state.viewProfile.handle || \"\",\r\n      ) === normalizedProfileKeyValue(key)\r\n    )\r\n      return loadViewedPublicRelationships(state.viewProfile).then(function () {\r\n        return state.viewProfile;\r\n      });\r\n    state.viewProfileResolvedKey = \"\";\r\n    state.viewProfilePendingKey = key;\r\n    state.viewProfilePendingPromise = readSupabaseProfileByKey(key, {\r\n          force: !0,\r\n          publicRead: !hasCustomer(),\r\n          surface: \"public-profile-route\",\r\n        })\r\n          .then(function (profileRow) {\r\n            var fetchedProfile = profileRow\r\n              ? canonicalPublicProfileProjection(\r\n                  Object.assign({ profileKey: key }, profileRow),\r\n                )\r\n              : null;\r\n            if (fetchedProfile && viewedProfileVisible(fetchedProfile)) {\r\n              ((state.viewProfile = fetchedProfile),\r\n                (state.viewProfileResolvedKey = key),\r\n                (state.publicProfiles = dedupePublicProfiles(\r\n                  (state.publicProfiles || []).concat([\r\n                    fetchedProfile,\r\n                  ]),\r\n                )),\r\n                publishPublicProfiles(),\r\n                renderProfileIdentity());\r\n            }\r\n            return fetchedProfile;\r\n          })\r\n          .then(function (mediaReadyProfile) {\r\n            return (\r\n              (state.viewProfile =\r\n                mediaReadyProfile && viewedProfileVisible(mediaReadyProfile)\r\n                  ? mediaReadyProfile\r\n                  : null),\r\n              (state.viewProfileMissingKey = state.viewProfile ? \"\" : key),\r\n              (state.viewProfileResolvedKey = key),\r\n              state.viewProfile &&\r\n                (state.publicProfiles = dedupePublicProfiles(\r\n                  (state.publicProfiles || []).concat([\r\n                    canonicalPublicProfileProjection(state.viewProfile),\r\n                  ]),\r\n                )),\r\n              publishPublicProfiles(),\r\n              renderAll(),\r\n              state.viewProfile\r\n                ? nearbyProjectionPending\r\n                .then(function () {\n                  return mergeNearbyDistanceForProfile(\n                    state.viewProfile,\n                    \"direct-profile-route\",\n                  );\n                })\n                .then(function () {\r\n                  return loadViewedPublicRelationships(state.viewProfile);\r\n                })\r\n                .then(function () {\r\n                  return state.viewProfile;\r\n                })\r\n                : null\r\n            );\r\n          })\r\n          .catch(function (error) {\r\n            return (\r\n              (state.viewProfileResolvedKey = key),\r\n              (state.viewProfileMissingKey = key),\r\n              clearViewedRelationshipListeners(),\r\n              renderProfileIdentity(),\r\n              claim(\"public-profile:read-blocked\", {\r\n                profileKey: key,\r\n                error: error.message,\r\n                path: \"publicProfiles/\" + key,\r\n              }),\r\n              null\r\n            );\r\n          })\r\n          .then(function (profile) {\r\n            if (state.viewProfilePendingKey === key) {\r\n              state.viewProfilePendingKey = \"\";\r\n              state.viewProfilePendingPromise = null;\r\n            }\r\n            return profile;\r\n          });\r\n    return state.viewProfilePendingPromise;\r\n  }\r\n  function maybeRouteProfile() {\n    if (hasCustomer()) {\n      var path = window.location.pathname,\n        accountRoute =\n          path === \"/account\" ||\n          path === \"/account/login\" ||\n          path === \"/account/register\",\n        socialRoute =\n          /^(feed|users|profile|stories|messages|notifications|saved|favorites|governance)$/.test(\n            activeRouteSurface(),\n          ),\n        setupRequired =\n          state.sessionSetupRequired === !0 ||\n          (state.profile &&\n            (state.profile.setupComplete === !1 ||\n              state.profile.setup_complete === !1 ||\n              state.profile.status === \"setup_required\" ||\n              state.profile.accountState === \"setup_required\" ||\n              state.profile.account_state === \"setup_required\"));\n      if (\n        setupRequired &&\n        (accountRoute || socialRoute) &&\n        !(path === \"/pages/user-profile\" && queryParam(\"setup\") === \"1\")\n      ) {\n        routeTo(\"/pages/user-profile?setup=1\");\n        return;\n      }\n      accountRoute &&\n        !setupRequired &&\n        routeTo(profileRouteHref(profileKey()));\n    }\n  }\n  function requireAuth(action) {\r\n    return hasCustomer() &&\r\n      (actorRelationshipIdentity() || supabaseCutoverReady())\r\n      ? !0\r\n      : (hasCustomer()\r\n          ? action &&\r\n            renderStatus(\r\n              \"Your account connection is still loading before you \" +\r\n                action +\r\n                \".\",\r\n            )\r\n          : (renderPublicGuard(),\r\n            action &&\r\n              renderStatus(\r\n                \"Log in with your Shopify account to \" + action + \".\",\r\n              )),\r\n        !1);\r\n  }\r\n  function requireActiveProfile(action) {\r\n    return requireAuth(action)\r\n      ? canUseSocialActions()\r\n        ? !0\r\n        : state.profile &&\r\n            state.profile.setupComplete === !0 &&\r\n            hasAccountRestriction()\r\n          ? (renderStatus(\r\n              \"This account is \" +\r\n                accountRestrictionState() +\r\n                \". Founder review is required before you can \" +\r\n                (action || \"continue\") +\r\n                \".\",\r\n            ),\r\n            !1)\r\n          : (renderStatus(\r\n              \"Complete profile setup before you \" +\r\n                (action || \"continue\") +\r\n                \".\",\r\n            ),\r\n            window.location.pathname !== \"/pages/user-profile\" &&\r\n              routeTo(\"/pages/user-profile?setup=1\"),\r\n            !1)\r\n      : !1;\r\n  }\r\n  function syncRestrictedActionControls(root) {\r\n    var disabled = !canUseSocialActions();\r\n    qsa(\r\n      \"[data-dsd-canonical-composer], [data-dsd-comment-form], [data-dsd-message-form], [data-dsd-story-form]\",\r\n      root || document,\r\n    ).forEach(function (form) {\r\n      (qsa(\"input, textarea, select, button\", form).forEach(function (el) {\r\n        el.disabled = disabled;\r\n      }),\r\n        form.id &&\r\n          qsa('[form=\"' + form.id + '\"]', root || document).forEach(\r\n            function (el) {\r\n              el.disabled = disabled;\r\n            },\r\n          ),\r\n        form.setAttribute(\"aria-disabled\", disabled ? \"true\" : \"false\"));\r\n    });\r\n  }\r\n  var composerFileSelections =\n      typeof WeakMap == \"function\" ? new WeakMap() : null,\n    composerFormFileSelections =\r\n      typeof WeakMap == \"function\" ? new WeakMap() : null,\r\n    composerPreviewObjectUrls =\n      typeof WeakMap == \"function\" ? new WeakMap() : null,\r\n    activeComposerMediaPickerSession = null,\r\n    canonicalComposerMediaPickerInput = null,\r\n    canonicalComposerMediaPickerNeedsReset = !1;\r\n  function revokeComposerPreviewObjectUrls(form) {\n    if (!form || !composerPreviewObjectUrls) return;\n    (composerPreviewObjectUrls.get(form) || []).forEach(function (url) {\n      try {\n        URL.revokeObjectURL(url);\n      } catch (error) {}\n    });\n    composerPreviewObjectUrls.delete(form);\n  }\n  function selectedInputFiles(input) {\n    var form = input && input.closest ? input.closest(\"form\") : null,\r\n      stored =\r\n        input &&\n        input.dataset.dsdManagedMediaSelection === \"true\" &&\n        composerFileSelections\n          ? composerFileSelections.get(input)\n          : null,\n      formStored =\r\n        form && composerFormFileSelections\r\n          ? composerFormFileSelections.get(form)\r\n          : null,\r\n      selected = stored\n        ? stored.slice()\n        : formStored\r\n          ? formStored.slice()\r\n        : Array.prototype.slice.call((input && input.files) || []);\n    if (selected.length) {\r\n      composerFileSelections && composerFileSelections.set(input, selected);\r\n      form &&\r\n        composerFormFileSelections &&\r\n        composerFormFileSelections.set(form, selected.slice());\r\n    }\r\n    return selected.length || !input || !input.value || !composerFileSelections\r\n      ? selected\n      : (composerFileSelections.get(input) || []).slice();\n  }\n  function setSelectedInputFiles(input, files) {\n    if (!input) return;\n    files = (files || []).filter(Boolean);\n    composerFileSelections && composerFileSelections.set(input, files.slice());\n    var form = input.closest ? input.closest(\"form\") : null;\r\n    form &&\r\n      composerFormFileSelections &&\r\n      composerFormFileSelections.set(form, files.slice());\r\n    input.dataset.dsdManagedMediaSelection = \"true\";\n    if (typeof DataTransfer == \"function\")\n      try {\n        var transfer = new DataTransfer();\n        files.forEach(function (file) {\n          transfer.items.add(file);\n        });\n        input.files = transfer.files;\n      } catch (error) {}\n    if (!files.length)\n      try {\n        input.value = \"\";\n      } catch (error) {}\n  }\n  function collectFormFiles(form) {\r\n    var formFiles =\r\n        form && composerFormFileSelections\r\n          ? composerFormFileSelections.get(form)\r\n          : null,\r\n      files = [];\r\n    if (formFiles && formFiles.length) return formFiles.slice();\r\n    return (\r\n      qsa('input[type=\"file\"]', form || document).forEach(function (input) {\r\n        selectedInputFiles(input).forEach(function (file) {\r\n          files.push(file);\r\n        });\r\n      }),\r\n      files\r\n    );\r\n  }\r\n  function mediaFileKind(file) {\r\n    var type = String((file && file.type) || \"\").toLowerCase(),\r\n      name = String((file && file.name) || \"\").toLowerCase();\r\n    return type.indexOf(\"video/\") === 0 || /\\.(mp4|m4v|mov|webm)$/.test(name)\r\n      ? \"video\"\r\n      : \"image\";\r\n  }\r\n  function canonicalMediaContentType(file) {\r\n    var type = String((file && file.type) || \"\").toLowerCase(),\r\n      name = String((file && file.name) || \"\").toLowerCase();\r\n    if (type && type !== \"application/octet-stream\") return type;\r\n    if (/\\.mp4$/.test(name)) return \"video/mp4\";\r\n    if (/\\.m4v$/.test(name)) return \"video/x-m4v\";\r\n    if (/\\.(mov|qt)$/.test(name)) return \"video/quicktime\";\r\n    if (/\\.webm$/.test(name)) return \"video/webm\";\r\n    if (/\\.heic$/.test(name)) return \"image/heic\";\r\n    if (/\\.heif$/.test(name)) return \"image/heif\";\r\n    if (/\\.jpe?g$/.test(name)) return \"image/jpeg\";\r\n    if (/\\.png$/.test(name)) return \"image/png\";\r\n    if (/\\.webp$/.test(name)) return \"image/webp\";\r\n    if (/\\.gif$/.test(name)) return \"image/gif\";\r\n    return type || \"application/octet-stream\";\r\n  }\r\n  function clearMediaInput(input) {\n    var form = input && input.closest ? input.closest(\"form\") : null;\r\n    composerFileSelections && composerFileSelections.delete(input);\n    form &&\r\n      composerFormFileSelections &&\r\n      composerFormFileSelections.delete(form);\r\n    input && delete input.dataset.dsdManagedMediaSelection;\n    try {\r\n      input.value = \"\";\r\n    } catch (e) {}\r\n  }\r\n  function composerMediaFormDescriptor(form) {\r\n    if (!form || !form.matches) return null;\r\n    var selector = form.matches(\"[data-dsd-story-form]\")\r\n        ? \"[data-dsd-story-form]\"\r\n        : form.matches(\"[data-dsd-global-post-composer]\")\r\n          ? \"[data-dsd-global-post-composer]\"\r\n          : form.matches(\"[data-dsd-profile-inline-post-composer]\")\r\n            ? \"[data-dsd-profile-inline-post-composer]\"\r\n            : form.matches(\"[data-dsd-feed-inline-post-composer]\")\r\n              ? \"[data-dsd-feed-inline-post-composer]\"\r\n              : form.matches(\"[data-dsd-message-form]\")\r\n                ? \"[data-dsd-message-form]\"\r\n                : form.matches(\"[data-dsd-comment-form]\")\r\n                  ? \"[data-dsd-comment-form]\"\r\n                  : form.matches(\"[data-dsd-share-composer]\")\r\n                    ? \"[data-dsd-share-composer]\"\r\n                    : \"\",\r\n      contextControl =\r\n        qs('[name=\"conversationId\"]', form) ||\r\n        qs('[name=\"postId\"]', form) ||\r\n        qs('[name=\"commentId\"]', form),\r\n      context = String(\r\n        (contextControl && contextControl.value) ||\r\n          form.getAttribute(\"data-conversation-id\") ||\r\n          form.getAttribute(\"data-post-id\") ||\r\n          form.getAttribute(\"data-comment-id\") ||\r\n          \"\",\r\n      );\r\n    return selector ? { selector: selector, context: context } : null;\r\n  }\r\n  function replacementComposerMediaForm(session) {\r\n    if (!session || !session.descriptor) return null;\r\n    var descriptor = session.descriptor,\r\n      candidates = qsa(descriptor.selector, document).filter(function (candidate) {\r\n        return candidate && candidate.isConnected;\r\n      });\r\n    if (descriptor.context)\r\n      candidates = candidates.filter(function (candidate) {\r\n        var candidateDescriptor = composerMediaFormDescriptor(candidate);\r\n        return (\r\n          candidateDescriptor && candidateDescriptor.context === descriptor.context\r\n        );\r\n      });\r\n    return (\r\n      candidates.filter(function (candidate) {\r\n        return !candidate.closest(\"[hidden]\");\r\n      })[0] ||\r\n      candidates[0] ||\r\n      null\r\n    );\r\n  }\r\n  function processComposerMediaSelection(fileInput, pickerSession) {\r\n    if (!fileInput) return;\r\n    var sourceForm = fileInput.closest(\"form\"),\r\n      nativeFiles = Array.prototype.slice.call(fileInput.files || []),\r\n      session = pickerSession || activeComposerMediaPickerSession,\r\n      liveForm =\r\n        sourceForm && sourceForm.isConnected\r\n          ? sourceForm\r\n          : replacementComposerMediaForm(session),\r\n      liveInput = fileInput;\r\n    if (session) {\r\n      session.fileEventReceived = !0;\r\n      window.clearTimeout(session.returnTimer);\r\n      session.returnTimer = null;\r\n    }\r\n    sourceForm && delete sourceForm.dataset.dsdMediaSelectionPending;\r\n    liveForm && delete liveForm.dataset.dsdMediaSelectionPending;\r\n    nativeFiles.length && (canonicalComposerMediaPickerNeedsReset = !1);\r\n    if (liveForm && (!sourceForm || !sourceForm.isConnected)) {\r\n      liveInput = qs('input[type=\"file\"]', liveForm) || fileInput;\r\n      if (nativeFiles.length) {\r\n        setSelectedInputFiles(liveInput, nativeFiles);\r\n        composerFormFileSelections &&\r\n          composerFormFileSelections.set(liveForm, nativeFiles.slice());\r\n      }\r\n    } else if (nativeFiles.length && composerFileSelections) {\r\n      composerFileSelections.set(fileInput, nativeFiles);\r\n      fileInput.dataset.dsdManagedMediaSelection = \"true\";\r\n    }\r\n    sourceForm && sourceForm.removeAttribute(\"data-dsd-media-picker-active\");\r\n    liveForm && liveForm.removeAttribute(\"data-dsd-media-picker-active\");\r\n    if (activeComposerMediaPickerSession === session)\r\n      activeComposerMediaPickerSession = null;\r\n    if (!nativeFiles.length) {\r\n      canonicalComposerMediaPickerNeedsReset = !0;\r\n      liveForm &&\r\n        setComposerValidationMessage(\r\n          liveForm,\r\n          \"This photo or video has not reached the browser yet. Photos may still be preparing it; keep this page open and it will attach automatically if it arrives. Nothing has uploaded yet. To move on now, try again, choose a smaller compatible copy, or save the video to Files and select it from there.\",\r\n        );\r\n      claim(\"composer-media-picker:no-file-delivered\", {\r\n        surface:\r\n          (session &&\r\n            session.descriptor &&\r\n            session.descriptor.selector) ||\r\n          \"unknown\",\r\n        elapsedMs: session ? Date.now() - session.openedAt : 0,\r\n        source: \"change-without-file\",\r\n      });\r\n      liveForm && updateComposerMediaControls(liveForm);\r\n      return;\r\n    }\r\n    selectedInputFiles(liveInput);\r\n    liveForm && clearUploadStatus(liveForm);\r\n    if (liveForm && !validateComposerMediaSelection(liveForm)) {\r\n      updateComposerMediaControls(liveForm);\r\n      return;\r\n    }\r\n    if (liveForm) {\r\n      renderFilePreviews(liveForm);\r\n      selectedInputFiles(liveInput).some(function (file) {\r\n        return mediaFileKind(file) === \"video\";\r\n      }) && validateSelectedVideoMetadata(liveInput, liveForm);\r\n    }\r\n  }\r\n  function activeComposerPickerForm(session) {\r\n    return !session\r\n      ? null\r\n      : session.form && session.form.isConnected\r\n        ? session.form\r\n        : replacementComposerMediaForm(session);\r\n  }\r\n  function scheduleComposerPickerReturnCheck(source) {\r\n    var session = activeComposerMediaPickerSession;\r\n    if (\r\n      !session ||\r\n      session.fileEventReceived ||\r\n      session.noFileWarningShown ||\r\n      Date.now() - session.openedAt < 500\r\n    )\r\n      return;\r\n    window.clearTimeout(session.returnTimer);\r\n    session.returnTimer = window.setTimeout(function () {\r\n      if (\r\n        activeComposerMediaPickerSession !== session ||\r\n        session.fileEventReceived ||\r\n        session.noFileWarningShown ||\r\n        (canonicalComposerMediaPickerInput &&\r\n          canonicalComposerMediaPickerInput.files &&\r\n          canonicalComposerMediaPickerInput.files.length)\r\n      )\r\n        return;\r\n      session.noFileWarningShown = !0;\r\n      var form = activeComposerPickerForm(session);\r\n      form && form.setAttribute(\"data-dsd-media-picker-active\", \"waiting\");\r\n      form &&\r\n        setComposerValidationMessage(\r\n          form,\r\n          \"Waiting for this photo or video to reach the browser. Keep this page open. It will attach automatically when the device finishes preparing it; publishing is paused until then.\",\r\n        );\r\n      claim(\"composer-media-picker:return-without-file\", {\r\n        surface:\r\n          (session.descriptor && session.descriptor.selector) || \"unknown\",\r\n        elapsedMs: Date.now() - session.openedAt,\r\n        source: source || \"picker-return\",\r\n      });\r\n    }, 1800);\r\n  }\r\n  function bindCanonicalComposerPickerReturnSignals() {\r\n    if (document.documentElement.dataset.dsdComposerPickerReturnBound === BUILD)\r\n      return;\r\n    document.documentElement.dataset.dsdComposerPickerReturnBound = BUILD;\r\n    window.addEventListener(\"focus\", function () {\r\n      scheduleComposerPickerReturnCheck(\"window-focus\");\r\n    });\r\n    window.addEventListener(\"pageshow\", function () {\r\n      scheduleComposerPickerReturnCheck(\"page-show\");\r\n    });\r\n    document.addEventListener(\"visibilitychange\", function () {\r\n      if (document.visibilityState === \"visible\")\r\n        scheduleComposerPickerReturnCheck(\"visibility-visible\");\r\n    });\r\n  }\r\n  function ensureCanonicalComposerMediaPickerInput() {\r\n    if (\r\n      canonicalComposerMediaPickerNeedsReset &&\r\n      canonicalComposerMediaPickerInput\r\n    ) {\r\n      activeComposerMediaPickerSession &&\r\n        window.clearTimeout(activeComposerMediaPickerSession.returnTimer);\r\n      activeComposerMediaPickerSession = null;\r\n      canonicalComposerMediaPickerInput.__dsdPickerSession = null;\r\n      canonicalComposerMediaPickerInput.remove();\r\n      canonicalComposerMediaPickerInput = null;\r\n      canonicalComposerMediaPickerNeedsReset = !1;\r\n      claim(\"composer-media-picker:input-reset-after-empty-return\", {\r\n        source: \"next-user-selection\",\r\n      });\r\n    }\r\n    if (\r\n      canonicalComposerMediaPickerInput &&\r\n      canonicalComposerMediaPickerInput.isConnected\r\n    )\r\n      return canonicalComposerMediaPickerInput;\r\n    var input = document.createElement(\"input\");\r\n    input.type = \"file\";\r\n    input.tabIndex = -1;\r\n    input.style.cssText =\r\n      \"position:fixed;inline-size:1px;block-size:1px;inset:auto 0 0 auto;opacity:0;pointer-events:none;overflow:hidden;\";\r\n    input.setAttribute(\"aria-hidden\", \"true\");\r\n    input.setAttribute(\"data-dsd-canonical-media-picker\", \"true\");\r\n    input.addEventListener(\"change\", function (event) {\r\n      var session = input.__dsdPickerSession;\r\n      event.stopPropagation();\r\n      if (!session || activeComposerMediaPickerSession !== session) {\r\n        claim(\"composer-media-picker:stale-file-event-ignored\", {\r\n          source: \"retired-picker-input\",\r\n        });\r\n        return;\r\n      }\r\n      processComposerMediaSelection(input, session);\r\n      input.__dsdPickerSession = null;\r\n    });\r\n    document.body.appendChild(input);\r\n    canonicalComposerMediaPickerInput = input;\r\n    bindCanonicalComposerPickerReturnSignals();\r\n    return input;\r\n  }\r\n  function composerMediaPolicy(form) {\n    return form && form.matches && form.matches(\"[data-dsd-story-form]\")\r\n      ? {\r\n          surface: \"Story\",\r\n          maxImages: 1,\r\n          maxVideos: 1,\r\n          maxTotal: 1,\r\n          maxImagesWithVideo: 0,\r\n        }\r\n      : form && form.matches && form.matches(\"[data-dsd-message-form]\")\n        ? {\n            surface: \"Message\",\n            maxImages: 4,\r\n            maxVideos: 4,\r\n            maxTotal: 4,\r\n            maxImagesWithVideo: 4,\r\n          }\n        : form && form.matches && form.matches(\"[data-dsd-comment-form]\")\n          ? {\n              surface: \"Comment\",\n              maxImages: 3,\n              maxVideos: 1,\n              maxTotal: 4,\n              maxImagesWithVideo: 1,\n            }\n        : {\n            surface: \"Post\",\n            maxImages: 4,\r\n            maxVideos: 4,\r\n            maxTotal: 4,\r\n            maxImagesWithVideo: 4,\r\n          };\n  }\r\n  function composerMediaCounts(form) {\r\n    var counts = { image: 0, video: 0, total: 0 };\r\n    return (\r\n      collectFormFiles(form).forEach(function (file) {\r\n        var kind = mediaFileKind(file);\r\n        ((counts[kind] += 1), (counts.total += 1));\r\n      }),\r\n      counts\r\n    );\r\n  }\r\n  function composerMediaRemaining(policy, counts, kind) {\n    return policy.maxTotal === 1\r\n      ? counts.total\r\n        ? 0\r\n        : 1\r\n      : kind === \"media\"\n        ? Math.max(0, policy.maxTotal - counts.total)\n      : kind === \"video\"\n        ? counts.video >= policy.maxVideos ||\r\n          counts.image > policy.maxImagesWithVideo\r\n          ? 0\r\n          : policy.maxVideos - counts.video\r\n        : kind === \"image\"\r\n          ? counts.image >= policy.maxImages\r\n            ? 0\r\n            : counts.video\r\n              ? Math.max(0, policy.maxImagesWithVideo - counts.image)\r\n              : Math.max(0, policy.maxImages - counts.image)\r\n          : 0;\r\n  }\r\n  function socialAttachmentLimits() {\n    return hasDsdPlus()\n      ? {\n          imageBytes: 225 * 1000 * 1000,\r\n          videoBytes: 2250 * 1000 * 1000,\r\n          totalBytes: 4 * 2250 * 1000 * 1000,\r\n          tier: \"dsd_plus\",\r\n          tierLabel: \"DSD+\",\r\n        }\r\n      : {\r\n          imageBytes: 25 * 1000 * 1000,\n          videoBytes: 250 * 1000 * 1000,\n          totalBytes: 4 * 250 * 1000 * 1000,\r\n          tier: \"general\",\r\n          tierLabel: \"General profile\",\r\n        };\r\n  }\r\n  function postAttachmentLimits() {\n    return hasDsdPlus()\r\n      ? {\r\n          imageBytes: 60 * 1024 * 1024,\r\n          videoBytes: 5 * 1024 * 1024 * 1024,\r\n          totalBytes: 4 * 5 * 1024 * 1024 * 1024,\r\n          tier: \"dsd_plus\",\r\n          tierLabel: \"DSD+\",\r\n        }\r\n      : {\r\n          imageBytes: 10 * 1024 * 1024,\r\n          videoBytes: 600 * 1024 * 1024,\r\n          totalBytes: 4 * 600 * 1024 * 1024,\r\n          tier: \"general\",\r\n          tierLabel: \"Free profile\",\r\n        };\r\n  }\r\n  function storyAttachmentLimits() {\r\n    return hasDsdPlus()\r\n      ? {\r\n          imageBytes: 75 * 1024 * 1024,\r\n          videoBytes: 750 * 1024 * 1024,\r\n          totalBytes: 750 * 1024 * 1024,\r\n          tier: \"dsd_plus\",\r\n          tierLabel: \"DSD+\",\r\n        }\r\n      : {\r\n          imageBytes: 20 * 1024 * 1024,\r\n          videoBytes: 100 * 1024 * 1024,\r\n          totalBytes: 100 * 1024 * 1024,\r\n          tier: \"general\",\r\n          tierLabel: \"General profile\",\r\n        };\r\n  }\r\n  function attachmentLimitsForForm(form) {\r\n    return form && form.matches && form.matches(\"[data-dsd-story-form]\")\r\n      ? storyAttachmentLimits()\r\n      : form &&\r\n      form.matches &&\r\n      form.matches(\r\n        \"[data-dsd-canonical-composer], [data-dsd-global-post-composer]\",\r\n      )\r\n      ? postAttachmentLimits()\r\n      : socialAttachmentLimits();\r\n  }\r\n  function attachmentSizeLabel(bytes) {\n    return (\n      (bytes = Number(bytes || 0) || 0),\n      bytes >= 1000 * 1000 && bytes < 1000 * 1000 * 1000 && bytes % (1000 * 1000) === 0\n        ? Math.round(bytes / 1000 / 1000) + \" MB\"\n      : bytes >= 1024 * 1024 * 1024\n        ? (bytes / 1024 / 1024 / 1024).toFixed(\r\n            bytes % (1024 * 1024 * 1024) ? 1 : 0,\r\n          ) + \" GB\"\r\n        : bytes >= 1024 * 1024\r\n        ? Math.round(bytes / 1024 / 1024) + \" MB\"\r\n        : bytes >= 1024\r\n          ? Math.round(bytes / 1024) + \" KB\"\r\n          : bytes + \" bytes\"\r\n    );\r\n  }\r\n  function composerMediaPolicyText(policy, counts, limits) {\n    limits = limits || socialAttachmentLimits();\r\n    var selectionText = policy.maxTotal === 1\r\n      ? counts.total\r\n        ? \"1 story media selected\"\r\n        : \"Add 1 photo or video\"\r\n      : counts.total\n        ? counts.total + \" media selected \u00B7 \" + Math.max(0, policy.maxTotal - counts.total) + \" left\"\n        : \"Add up to \" + policy.maxTotal + \" photos or videos\";\n    if (policy.surface === \"Post\")\n      return selectionText + \" \u00B7 Photos \" + attachmentSizeLabel(limits.imageBytes) + \" each \u00B7 Videos \" + attachmentSizeLabel(limits.videoBytes) + \" each\";\n    if (policy.surface === \"Story\")\r\n      return (\r\n        selectionText +\r\n        \" \\xB7 Your \" +\r\n        limits.tierLabel +\r\n        \" limit: photos \" +\r\n        attachmentSizeLabel(limits.imageBytes) +\r\n        \", video \" +\r\n        attachmentSizeLabel(limits.videoBytes) +\r\n        \" \\xB7 General: 20 MB photos, 100 MB video \\xB7 DSD+: 75 MB photos, 750 MB video\"\r\n      );\r\n    return (\r\n      selectionText +\r\n      \" \\xB7 \" +\r\n      \"Your \" +\r\n      limits.tierLabel +\r\n      \" limit: photos \" +\r\n      attachmentSizeLabel(limits.imageBytes) +\r\n      \", video \" +\r\n      attachmentSizeLabel(limits.videoBytes) +\r\n      \" \u00B7 General: 25 MB photos, 250 MB video \u00B7 DSD+: 225 MB photos, 2.25 GB video\"\r\n    );\n  }\n  function postMediaLimitTooltipText(limits) {\r\n    limits = limits || postAttachmentLimits();\r\n    return (\r\n      limits.tierLabel +\r\n      \": Photos: up to \" +\r\n      attachmentSizeLabel(limits.imageBytes) +\r\n      \" each. Videos: up to \" +\r\n      attachmentSizeLabel(limits.videoBytes) +\r\n      \". You can add up to 4 photos or videos in any combination.\"\r\n    );\r\n  }\r\n  function ensurePostMediaLimitTooltip(form, policy, limits) {\n    if (!form || !policy || (policy.surface !== \"Post\" && policy.surface !== \"Story\")) return;\n    qsa(\"[data-dsd-media-limits-help], [data-dsd-media-limits-tooltip]\", form).forEach(function (node) {\n      node.remove();\n    });\n  }\n  function ensureCanonicalComposerMediaPicker(form, policy) {\n    if (!form || !policy) return;\n    var actions = qs(\".dsd-composer-media-actions\", form);\n    if (!actions) return;\n    var controls = qsa(\"[data-dsd-composer-media-button]\", actions),\n      mixed = qs('[data-dsd-composer-media-button=\"media\"]', actions),\n      max = policy.maxTotal,\n      multiple = max > 1;\n    if (!mixed || controls.length !== 1) {\n      controls.forEach(function (control) { control.remove(); });\n      var holder = document.createElement(\"div\");\n      holder.innerHTML = composerMixedMediaButton(multiple, \"Add media\", max);\n      mixed = holder.firstElementChild;\n      mixed && actions.insertBefore(mixed, actions.firstChild);\n    }\n    var input = mixed && qs('input[type=\"file\"]', mixed);\n    if (input) {\n      input.setAttribute(\"data-dsd-media-max\", String(max));\n      multiple ? input.setAttribute(\"multiple\", \"\") : input.removeAttribute(\"multiple\");\n    }\n  }\n  function updateComposerMediaControls(form) {\n    if (!(!form || !form.querySelectorAll)) {\n      var policy = composerMediaPolicy(form);\n      ensureCanonicalComposerMediaPicker(form, policy);\n      var counts = composerMediaCounts(form),\n        limits = attachmentLimitsForForm(form);\n      ensurePostMediaLimitTooltip(form, policy, limits);\r\n      qsa(\"[data-dsd-composer-media-button]\", form).forEach(function (control) {\r\n        var input = qs('input[type=\"file\"]', control),\r\n          kind = String(\r\n            control.getAttribute(\"data-dsd-composer-media-button\") ||\r\n              (input &&\r\n                (input.getAttribute(\"data-dsd-media-input\") || input.name)) ||\r\n              \"\",\r\n          ).toLowerCase(),\r\n          remaining = composerMediaRemaining(policy, counts, kind),\r\n          selected = 0;\r\n        input &&\r\n          selectedInputFiles(input).forEach(function (file) {\r\n            (kind === \"media\" || mediaFileKind(file) === kind) && (selected += 1);\n          });\n        // A selected file input must remain enabled or some mobile/browser\r\n        // paths discard its File before submit. Selecting again replaces it.\r\n        var disabled = remaining <= 0 && selected === 0;\r\n        (control.classList.toggle(\"is-disabled\", disabled),\r\n          control.setAttribute(\"aria-disabled\", disabled ? \"true\" : \"false\"),\r\n          control.setAttribute(\r\n            \"data-dsd-media-remaining\",\r\n            String(Math.max(0, remaining)),\r\n          ),\r\n          control.setAttribute(\"data-dsd-media-selected\", String(selected)),\r\n          control.setAttribute(\r\n            \"title\",\r\n            disabled\r\n              ? \"Media limit reached\"\n              : \"Add media\",\n          ),\r\n          input && (input.disabled = disabled));\r\n      });\r\n      var actions = qs(\".dsd-composer-media-actions\", form),\r\n        status = qs(\"[data-dsd-media-policy-status]\", form);\r\n      actions &&\r\n        !status &&\r\n        ((status = document.createElement(\"small\")),\r\n        (status.className = \"dsd-composer-media-policy-status\"),\r\n        status.setAttribute(\"data-dsd-media-policy-status\", \"\"),\r\n        status.setAttribute(\"data-dsd-media-policy-compact\", \"sr-only\"),\n        status.setAttribute(\"aria-live\", \"polite\"),\r\n        actions.parentNode.insertBefore(status, actions.nextSibling));\r\n      var policyText = composerMediaPolicyText(policy, counts, limits);\r\n      (actions &&\r\n        (actions.setAttribute(\"title\", policyText),\r\n        actions.setAttribute(\"aria-label\", policyText)),\r\n        status &&\r\n          (status.setAttribute(\"data-dsd-media-policy-compact\", \"sr-only\"),\n          (status.textContent = policyText)));\r\n    }\r\n  }\r\n  function updateAllComposerMediaControls(root) {\r\n    qsa(\r\n      \"[data-dsd-canonical-composer], [data-dsd-global-post-composer], [data-dsd-story-form], [data-dsd-message-form]\",\r\n      root || document,\r\n    ).forEach(updateComposerMediaControls);\r\n  }\r\n  function setComposerValidationMessage(form, message) {\r\n    if (message) {\r\n      var status = qs(\"[data-dsd-upload-status]\", form);\r\n      form &&\r\n        !status &&\r\n        ((status = document.createElement(\"div\")),\r\n        (status.className = \"dsd-upload-status\"),\r\n        status.setAttribute(\"data-dsd-upload-status\", \"\"),\r\n        status.setAttribute(\"role\", \"alert\"),\r\n        status.setAttribute(\"aria-live\", \"assertive\"),\r\n        form.appendChild(status));\r\n      (status && (status.textContent = message), renderStatus(message));\r\n    }\r\n  }\r\n  function validateComposerMediaInputTypes(form) {\r\n    if (!form) return !0;\r\n    var invalid = \"\";\r\n    return (\r\n      qsa('input[type=\"file\"]', form).some(function (input) {\r\n        var expected = String(\r\n          input.getAttribute(\"data-dsd-media-input\") || input.name || \"\",\r\n        ).toLowerCase();\r\n        return expected !== \"image\" && expected !== \"video\"\n          ? !1\r\n          : Array.prototype.some.call(input.files || [], function (file) {\r\n              var actual = mediaFileKind(file);\r\n              return actual === expected\r\n                ? !1\r\n                : ((invalid =\r\n                    expected === \"image\"\r\n                      ? \"Use the photo picker for photos and the video picker for videos.\"\r\n                      : \"Use the video picker for videos and the photo picker for photos.\"),\r\n                  !0);\r\n            });\r\n      }),\r\n      invalid\r\n        ? (qsa('input[type=\"file\"]', form).forEach(clearMediaInput),\r\n          removeFilePreviews(form),\r\n          setComposerValidationMessage(form, invalid),\r\n          !1)\r\n        : !0\r\n    );\r\n  }\r\n  function validatePostMediaFiles(files, form) {\n    if (form && !validateComposerMediaInputTypes(form)) return !1;\r\n    files = (files || []).filter(Boolean);\r\n    var images = files.filter(function (file) {\r\n        return mediaFileKind(file) === \"image\";\r\n      }).length,\r\n      videos = files.filter(function (file) {\n        return mediaFileKind(file) === \"video\";\n      }).length,\n      maxTotal = 4,\r\n      valid = files.length <= maxTotal;\n    return valid\r\n      ? validateSocialMediaRequirements(\r\n          files,\r\n          form,\r\n          \"Post\",\r\n          postAttachmentLimits(),\r\n        )\r\n      : (form &&\r\n          (qsa('input[type=\"file\"]', form).forEach(clearMediaInput),\r\n          removeFilePreviews(form)),\r\n        setComposerValidationMessage(\r\n          form,\r\n          \"Your \" + (hasDsdPlus() ? \"DSD+\" : \"General\") + \" profile supports up to \" + maxTotal + \" photos or videos per post.\",\n        ),\r\n        !1);\r\n  }\r\n  function validateStoryMediaFiles(files, form) {\r\n    return form && !validateComposerMediaInputTypes(form)\r\n      ? !1\r\n      : ((files = (files || []).filter(Boolean)),\r\n        files.length <= 1\r\n          ? validateSocialMediaRequirements(\r\n              files,\r\n              form,\r\n              \"Story\",\r\n              storyAttachmentLimits(),\r\n            )\r\n          : (form &&\r\n              (qsa('input[type=\"file\"]', form).forEach(function (input) {\r\n                try {\r\n                  input.value = \"\";\r\n                } catch (e) {}\r\n              }),\r\n              removeFilePreviews(form)),\r\n            renderStatus(\r\n              \"Stories support one photo or one video only. Select a single media file.\",\r\n            ),\r\n            !1));\r\n  }\r\n  function validateSocialMediaRequirements(files, form, surface, limits) {\n    files = (files || []).filter(Boolean);\r\n    if (!files.length) return !0;\r\n    limits = limits || socialAttachmentLimits();\r\n    var invalidTrim = files.filter(function (file) {\n        if (mediaFileKind(file) !== \"video\") return !1;\n        var start = Number(file.dsdTrimStartSeconds || 0),\n          end = Number(file.dsdTrimEndSeconds || 0),\n          duration = Number(file.dsdVideoDurationSeconds || 0);\n        return (start || end) && (!(start >= 0) || !(end > start) || !(duration > 0) || end > duration + 0.05);\n      })[0],\n      oversized = files.filter(function (file) {\n        var kind = mediaFileKind(file),\r\n          maxBytes = kind === \"video\" ? limits.videoBytes : limits.imageBytes;\r\n        return (Number((file && file.size) || 0) || 0) > maxBytes;\r\n      })[0],\r\n      totalBytes = files.reduce(function (total, file) {\r\n        return total + (Number((file && file.size) || 0) || 0);\r\n      }, 0),\r\n      message = invalidTrim\n        ? \"Choose a valid video trim: start must be before end and both must be within the video duration.\"\n        : oversized\n          ? limits.tierLabel +\r\n            \" \" +\r\n            (mediaFileKind(oversized) === \"video\" ? \"video\" : \"photo\") +\r\n            \" limit is \" +\r\n            attachmentSizeLabel(\r\n              mediaFileKind(oversized) === \"video\"\r\n                ? limits.videoBytes\r\n                : limits.imageBytes,\r\n            ) +\r\n            \".\"\r\n          : totalBytes > limits.totalBytes\r\n            ? limits.tierLabel +\r\n              \" total attachment limit is \" +\r\n              attachmentSizeLabel(limits.totalBytes) +\r\n              \".\"\r\n            : \"\";\r\n    if (!message) return !0;\r\n    form &&\r\n      (qsa('input[type=\"file\"]', form).forEach(clearMediaInput),\r\n      removeFilePreviews(form),\r\n      updateComposerMediaControls(form));\r\n    return (setComposerValidationMessage(form, message), !1);\r\n  }\r\n  function premiumMessageAttachmentLimits() {\r\n    return socialAttachmentLimits();\r\n  }\r\n  function messageAttachmentSizeLabel(bytes) {\r\n    return attachmentSizeLabel(bytes);\r\n  }\r\n  function validateMessageMediaFiles(files, form) {\n    if (form && !validateComposerMediaInputTypes(form)) return !1;\r\n    files = (files || []).filter(Boolean);\r\n    var images = files.filter(function (file) {\r\n        return mediaFileKind(file) === \"image\";\r\n      }).length,\r\n      videos = files.filter(function (file) {\r\n        return mediaFileKind(file) === \"video\";\r\n      }).length,\r\n      maxTotal = 4,\r\n      valid = files.length <= maxTotal,\n      limits = premiumMessageAttachmentLimits(),\r\n      totalBytes = files.reduce(function (total, file) {\r\n        return total + (Number((file && file.size) || 0) || 0);\r\n      }, 0),\r\n      oversized = files.filter(function (file) {\r\n        var kind = mediaFileKind(file),\r\n          maxBytes = kind === \"video\" ? limits.videoBytes : limits.imageBytes;\r\n        return (Number((file && file.size) || 0) || 0) > maxBytes;\r\n      });\r\n    if (valid && !oversized.length && totalBytes <= limits.totalBytes)\r\n      return !0;\r\n    form &&\r\n      (qsa('input[type=\"file\"]', form).forEach(clearMediaInput),\r\n      removeFilePreviews(form));\r\n    var sizeMessage = oversized.length\r\n      ? \"Message media exceeds the \" +\r\n        (mediaFileKind(oversized[0]) === \"video\"\r\n          ? messageAttachmentSizeLabel(limits.videoBytes) + \" video\"\r\n          : messageAttachmentSizeLabel(limits.imageBytes) + \" photo\") +\r\n        \" limit.\"\r\n      : totalBytes > limits.totalBytes\r\n        ? \"Message attachments exceed the \" +\r\n          messageAttachmentSizeLabel(limits.totalBytes) +\r\n          \" total limit.\"\r\n        : \"\";\r\n    return (\r\n      setComposerValidationMessage(\r\n        form,\r\n        sizeMessage ||\r\n          \"Your \" + (hasDsdPlus() ? \"DSD+\" : \"General\") + \" profile supports up to \" + maxTotal + \" photos or videos per message.\",\n      ),\r\n      !1\r\n    );\r\n  }\r\n  function validateComposerMediaSelection(form) {\r\n    if (!form) return !0;\r\n    var files = collectFormFiles(form);\r\n    return form.matches(\"[data-dsd-story-form]\")\r\n      ? validateStoryMediaFiles(files, form)\r\n      : form.matches(\"[data-dsd-message-form]\")\r\n        ? validateMessageMediaFiles(files, form)\r\n        : form.matches(\r\n              \"[data-dsd-canonical-composer], [data-dsd-global-post-composer]\",\r\n            )\r\n          ? validatePostMediaFiles(files, form)\r\n          : !0;\r\n  }\r\n  function validatePublicationMediaSelectionIntegrity(form, files, surface) {\r\n    if (\r\n      form &&\r\n      form.dataset.dsdMediaSelectionPending === \"true\" &&\r\n      !(files && files.length)\r\n    )\r\n      return (\r\n        setComposerValidationMessage(\r\n          form,\r\n          \"Media is still being prepared by this device. Wait for the attachment preview or cancel the pending selection before publishing.\",\r\n        ),\r\n        !1\r\n      );\r\n    if (\r\n      !form ||\r\n      form.dataset.dsdMediaSelectionExpected !== \"true\" ||\r\n      (files && files.length)\r\n    )\r\n      return !0;\r\n    return (\r\n      setComposerValidationMessage(\r\n        form,\r\n        \"The selected media is no longer available from this device. Select it again. No \" +\r\n          String(surface || \"publication\").toLowerCase() +\r\n          \" was created.\",\r\n      ),\r\n      !1\r\n    );\r\n  }\r\n  function createOrUpdateProfile(form) {\r\n    if (!requireAuth(\"save profile\")) return Promise.resolve(null);\r\n    if (\r\n      state.profile &&\r\n      state.profile.setupComplete === !0 &&\r\n      hasAccountRestriction() &&\r\n      !isFounderRole()\r\n    )\r\n      return (\r\n        renderStatus(\r\n          \"This account is \" +\r\n            accountRestrictionState() +\r\n            \". Profile changes are locked until DSD support restores the account.\",\r\n        ),\r\n        Promise.resolve(null)\r\n      );\r\n    var explicitLocationPatch = !!(\r\n        form &&\r\n        (Object.prototype.hasOwnProperty.call(form, \"location\") ||\r\n          Object.prototype.hasOwnProperty.call(form, \"locationCity\") ||\r\n          Object.prototype.hasOwnProperty.call(form, \"locationState\"))\r\n      ),\r\n      explicitCityPatch = !!(\r\n        form && Object.prototype.hasOwnProperty.call(form, \"locationCity\")\r\n      ),\r\n      explicitStatePatch = !!(\r\n        form && Object.prototype.hasOwnProperty.call(form, \"locationState\")\r\n      ),\r\n      explicitAgeCapabilityPatch = !!(\r\n        form &&\r\n        (Object.prototype.hasOwnProperty.call(form, \"birthdate\") ||\r\n          Object.prototype.hasOwnProperty.call(form, \"age\") ||\r\n          Object.prototype.hasOwnProperty.call(form, \"ageVerified\") ||\r\n          Object.prototype.hasOwnProperty.call(form, \"over18\") ||\r\n          Object.prototype.hasOwnProperty.call(form, \"adultContentEnabled\"))\r\n      ),\r\n      previousKey = profileKey(),\r\n      baseProfile =\r\n        profileWithPublicMirror(canonicalProfilePayload(!0)) ||\r\n        canonicalProfilePayload(!0),\r\n      data = Object.assign({}, baseProfile, form || {}),\r\n      requestedHandle = nonPlaceholderProfileKey(\r\n        (form && (form.handle || form.profileKey)) ||\r\n          data.handle ||\r\n          data.profileKey ||\r\n          data.displayName,\r\n      ),\r\n      cityText = String(\r\n        explicitCityPatch\r\n          ? data.locationCity\r\n          : data.locationCity || data.city || \"\",\r\n      )\r\n        .trim()\r\n        .slice(0, 80),\r\n      stateText = String(\r\n        explicitStatePatch\r\n          ? data.locationState\r\n          : data.locationState || data.state || \"\",\r\n      )\r\n        .trim()\r\n        .slice(0, 40);\r\n    ((data.locationCity = cityText),\r\n      (data.locationState = stateText),\r\n      (data.city = cityText),\r\n      (data.state = stateText),\r\n      (data.location = String(\r\n        explicitLocationPatch\r\n          ? [cityText, stateText].filter(Boolean).join(\", \")\r\n          : data.location || [cityText, stateText].filter(Boolean).join(\", \"),\r\n      )\r\n        .trim()\r\n        .slice(0, 140)),\r\n      (data.useApproximateLocationForNearby = profileBooleanFlag(\n        data,\n        [\"useApproximateLocationForNearby\", \"use_approximate_location_for_nearby\"],\n        !0,\n      )),\n      (data.appearInNearby = profileBooleanFlag(\r\n        data,\r\n        [\"appearInNearby\", \"appear_in_nearby\"],\r\n        !1,\n      )),\r\n      (data.showDistanceToUsers = profileBooleanFlag(\r\n        data,\r\n        [\"showDistanceToUsers\", \"show_distance_to_users\"],\r\n        !1,\n      )),\r\n      (data.showCurrentCityOnProfile = profileBooleanFlag(\r\n        data,\r\n        [\"showCurrentCityOnProfile\", \"show_current_city_on_profile\"],\r\n        !0,\r\n      )),\r\n      (data.locationPreferencesInitialized = !0),\r\n      (data.locationInvisibleMode =\r\n        hasDsdPlus() &&\r\n        profileBooleanFlag(\r\n          data,\r\n          [\"locationInvisibleMode\", \"location_invisible_mode\"],\r\n          !1,\r\n        )),\r\n      (data.use_approximate_location_for_nearby =\r\n        data.useApproximateLocationForNearby),\r\n      (data.appear_in_nearby = data.appearInNearby),\r\n      (data.show_distance_to_users = data.showDistanceToUsers),\r\n      (data.show_current_city_on_profile = data.showCurrentCityOnProfile),\r\n      (data.location_preferences_initialized = !0),\r\n      (data.location_invisible_mode = data.locationInvisibleMode),\r\n      (data.allowReadReceipts =\r\n        data.allowReadReceipts !== !1 &&\r\n        data.allow_read_receipts !== !1 &&\r\n        data.showReadReceipts !== !1 &&\r\n        data.show_read_receipts !== !1 &&\r\n        data.messageReadReceiptsEnabled !== !1 &&\r\n        data.message_read_receipts_enabled !== !1 &&\r\n        data.readReceiptsEnabled !== !1 &&\r\n        data.read_receipts_enabled !== !1));\r\n    var age = Number(data.age || 0),\r\n      birthdateAge =\r\n        data.birthdate && /^\\d{4}-\\d{2}-\\d{2}$/.test(String(data.birthdate))\r\n          ? Math.floor(\r\n              (Date.now() -\r\n                new Date(String(data.birthdate) + \"T00:00:00\").getTime()) /\r\n                315576e5,\r\n            )\r\n          : 0,\r\n      submittedOver18 = explicitAgeCapabilityPatch\r\n        ? !!(form && form.over18 === !0)\r\n        : data.over18 === !0,\r\n      preservedAdultCapability = explicitAgeCapabilityPatch ? !1 : isOver18(),\r\n      over18Candidate =\r\n        age >= 18 ||\r\n        birthdateAge >= 18 ||\r\n        data.ageVerified === !0 ||\r\n        submittedOver18 ||\r\n        preservedAdultCapability;\r\n    if (data.adultContentEnabled === !0 && !over18Candidate)\r\n      return (\r\n        renderStatus(\"Adult Content Enabled is only available to users 18+.\"),\r\n        (data.adultContentEnabled = !1),\r\n        Promise.resolve(null)\r\n      );\r\n    if (\r\n      ((data.profileKey = nonPlaceholderProfileKey(\r\n        baseProfile.profileKey ||\r\n          baseProfile.profile_key ||\r\n          profileKey() ||\r\n          data.profileKey ||\r\n          requestedHandle ||\r\n          data.displayName,\r\n      )),\r\n      !data.profileKey)\r\n    )\r\n      return (\r\n        renderStatus(\"Enter a profile handle before saving profile settings.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    ((data.handle = requestedHandle || data.handle || data.profileKey),\r\n      (data.setupComplete = !0),\r\n      (data.status = \"active\"));\r\n    var profileOwner = canonicalProfileOwnerIdentity(\"\") || {};\r\n    data.uid = profileOwner.uid || actorUid() || data.uid || uid() || \"\";\r\n    if (hasCustomer() && data.profileKey)\r\n      return supabaseCutoverReady()\r\n        ? resolveCanonicalProfileOwnerIdentity(\r\n            \"save profile\",\r\n            data.profileKey,\r\n          ).then(function (owner) {\r\n            return (\r\n              (owner = owner || {}),\r\n              owner.uid && (data.uid = owner.uid),\r\n              owner.profileKey && (data.profileKey = owner.profileKey),\r\n              continueProfileSave()\r\n            );\r\n          })\r\n        : continueProfileSave();\r\n    if (!data.uid)\r\n      return (\r\n        renderStatus(\r\n          \"Profile connection is refreshing. Try again in a moment.\",\r\n        ),\r\n        claim(\"profile-save:blocked-empty-owner-uid\", {\r\n          profileKey: data.profileKey,\r\n          canonical: \"supabase-profile-owner-uid-required\",\r\n        }),\r\n        Promise.resolve(null)\r\n      );\r\n    return continueProfileSave();\r\n    function continueProfileSave() {\n      ((data.userId = data.uid), (data.user_id = data.uid));\n      Object.prototype.hasOwnProperty.call(form || {}, \"bio\") &&\n        (data.bioHydrated = !0);\n      explicitLocationPatch && (data.locationHydrated = !0);\n      var profileAvatarId =\n        data.avatarMediaId ||\r\n        data.profileImageMediaId ||\r\n        data.photoMediaId ||\r\n        data.avatar_media_id ||\r\n        data.profile_image_media_id ||\r\n        data.photo_media_id ||\r\n        \"\";\r\n      profileAvatarId &&\r\n        ((data.avatarMediaId = profileAvatarId),\r\n        (data.avatar_media_id = profileAvatarId),\r\n        (data.profileImageMediaId = profileAvatarId),\r\n        (data.profile_image_media_id = profileAvatarId),\r\n        (data.photoMediaId = profileAvatarId),\r\n        (data.photo_media_id = profileAvatarId),\r\n        (data.thumbnailMediaId = profileAvatarId));\r\n      var profileBannerId =\r\n        data.bannerMediaId ||\r\n        data.headerMediaId ||\r\n        data.coverMediaId ||\r\n        data.backgroundMediaId ||\r\n        data.banner_media_id ||\r\n        data.header_media_id ||\r\n        data.cover_media_id ||\r\n        data.background_media_id ||\r\n        \"\";\r\n      (profileBannerId &&\r\n        ((data.bannerMediaId = profileBannerId),\r\n        (data.banner_media_id = profileBannerId),\r\n        (data.headerMediaId = profileBannerId),\r\n        (data.header_media_id = profileBannerId),\r\n        (data.coverMediaId = profileBannerId),\r\n        (data.cover_media_id = profileBannerId),\r\n        (data.backgroundMediaId = profileBannerId),\r\n        (data.background_media_id = profileBannerId)),\r\n        (data.age = Number(\r\n          explicitAgeCapabilityPatch\r\n            ? data.age || birthdateAge || 0\r\n            : data.age ||\r\n                birthdateAge ||\r\n                (state.profile && state.profile.age) ||\r\n                0,\r\n        )),\r\n        (data.ageVerified =\r\n          data.ageVerified === !0 ||\r\n          submittedOver18 ||\r\n          data.age >= 18 ||\r\n          birthdateAge >= 18 ||\r\n          preservedAdultCapability),\r\n        (data.over18 = data.ageVerified === !0),\r\n        (data.adultContentEnabled =\r\n          data.ageVerified === !0 && data.adultContentEnabled === !0));\r\n      var privateProfileSaveBlocked = !1;\r\n      return hasCustomer()\r\n        ? ((state.profile = data),\r\n          saveProfileViaProxy(data)\r\n            .then(function (result) {\r\n              var savedProfile =\r\n                profileWithPublicMirror(\r\n                  Object.assign({}, data, (result && result.profile) || {}),\r\n                ) || Object.assign({}, data, (result && result.profile) || {});\r\n              return (\r\n                (savedProfile.setupComplete = !0),\r\n                (savedProfile.status = savedProfile.status || \"active\"),\r\n                applyProfileIdentityCascade(savedProfile),\r\n                (state.profile = savedProfile),\r\n                updateLocalPublicProfileMirror(\r\n                  savedProfile.profileKey || data.profileKey,\r\n                  publicProfilePayload(savedProfile),\r\n                ),\r\n                clearStaleConnectionStatus(),\r\n                previousKey &&\r\n                  previousKey !== data.profileKey &&\r\n                  setDoc(\r\n                    \"publicProfiles/\" + previousKey,\r\n                    {\r\n                      searchable: !1,\r\n                      status: \"replaced\",\r\n                      profileHidden: !0,\r\n                      removeFromDiscovery: !0,\r\n                      discoveryEligible: !1,\r\n                      replacedBy: data.profileKey,\r\n                      replacedAt: serverTimestamp(),\r\n                    },\r\n                    !0,\r\n                  ).catch(function () {\r\n                    return null;\r\n                  }),\r\n                notify(\r\n                  uid(),\r\n                  \"profile\",\r\n                  \"Profile saved\",\r\n                  \"Your profile is active.\",\r\n                  profileRouteHref(data.profileKey),\r\n                ),\r\n                refreshProfileCapabilitySurfaces(),\r\n                renderAll(),\r\n                claim(\"profile-save:proxy-complete\", {\r\n                  profileKey: data.profileKey,\r\n                  canonical:\r\n                    (result && result.canonical) ||\r\n                    \"supabase-service-role-profile-save\",\r\n                }),\r\n                savedProfile\r\n              );\r\n            })\r\n            .catch(function (error) {\r\n              if (\n                error &&\n                (error.status === 409 ||\n                  (error.body &&\n                    error.body.error === \"profile_handle_taken\"))\n              )\r\n                return (\r\n                  renderStatus(\r\n                    \"That username is already taken. Choose another handle.\",\r\n                  ),\r\n                  null\n                );\n              var validationCode = String(\n                  (error && error.body && error.body.error) || \"\",\n                ),\n                validationMessage = {\n                  profile_handle_required:\n                    \"Choose a valid public handle using letters, numbers, periods, underscores, or hyphens.\",\n                  profile_display_name_required:\n                    \"Enter the public display name you want to use on DSD.\",\n                  profile_hometown_required:\n                    \"Enter both your current city and state to finish your profile.\",\n                  profile_hometown_invalid:\r\n                    \"Choose a supported country, state, and city from the hometown lists.\",\r\n                  profile_age_required:\n                    \"Enter a valid birthdate or age of at least 13 to finish your profile.\",\n                  onboarding_policy_acknowledgment_required:\n                    \"Acknowledge the store policies and location disclosure to finish your profile.\",\n                }[validationCode];\n              if (validationMessage)\n                return (\n                  claim(\"profile-save:validation-blocked\", {\n                    code: validationCode,\n                    canonical: \"supabase-service-role-profile-save\",\n                  }),\n                  renderStatus(validationMessage),\n                  null\n                );\n              return (\n                claim(\"profile-save:proxy-blocked\", {\r\n                  profileKey: data.profileKey,\r\n                  error: (error && error.message) || String(error),\r\n                  canonical: \"supabase-service-role-profile-save\",\r\n                }),\r\n                queueDraft(\"profile-update\", data, error),\r\n                renderStatus(\r\n                  \"Profile save could not complete. Refresh the account connection and try again.\",\r\n                ),\r\n                null\r\n              );\r\n            }))\r\n        : readPersistedPrivateProfileForLock(data.profileKey)\r\n            .then(function (persistedPrivate) {\r\n              return (\r\n                (data = applyFounderModerationLock(\r\n                  persistedPrivate || state.profile,\r\n                  data,\r\n                )),\r\n                getDoc(\"publicProfiles/\" + data.profileKey, {\r\n                  publicRead: !0,\r\n                  surface: \"profile-username-check\",\r\n                }).catch(function () {\r\n                  return null;\r\n                })\r\n              );\r\n            })\r\n            .then(function (existing) {\r\n              var existingProfile =\r\n                  existing &&\r\n                  existing.exists &&\r\n                  existing.exists() &&\r\n                  existing.data\r\n                    ? existing.data() || {}\r\n                    : null,\r\n                taken = !!(\r\n                  existingProfile &&\r\n                  !sameProfileOwner(existingProfile, data.profileKey)\r\n                );\r\n              if (taken)\r\n                return (\r\n                  renderStatus(\r\n                    \"That username is already taken. Choose another handle.\",\r\n                  ),\r\n                  null\r\n                );\r\n              state.profile = data;\r\n              var publicData = applyProfileIdentityCascade(data),\r\n                privateProfilePath = canonicalProfileWritePath(data.profileKey);\r\n              return setDoc(privateProfilePath, data, !0)\r\n                .catch(function (error) {\r\n                  return (\r\n                    (privateProfileSaveBlocked = !0),\r\n                    claim(\"private-profile-capability-save:blocked\", {\r\n                      profileKey: data.profileKey,\r\n                      ageVerified: data.ageVerified === !0,\r\n                      adultContentEnabled: data.adultContentEnabled === !0,\r\n                      error: (error && error.message) || String(error),\r\n                    }),\r\n                    renderStatus(\r\n                      \"Profile public identity saved, but private capability fields may need another save after the account bridge refreshes.\",\r\n                    ),\r\n                    null\r\n                  );\r\n                })\r\n                .then(function () {\r\n                  return setDoc(\r\n                    \"publicProfiles/\" + data.profileKey,\r\n                    publicData || publicProfilePayload(data),\r\n                    !0,\r\n                  );\r\n                })\r\n                .then(saveMembershipCacheIfAvailable)\r\n                .then(function () {\r\n                  return previousKey && previousKey !== data.profileKey\r\n                    ? setDoc(\r\n                        \"publicProfiles/\" + previousKey,\r\n                        {\r\n                          searchable: !1,\r\n                          status: \"replaced\",\r\n                          profileHidden: !0,\r\n                          removeFromDiscovery: !0,\r\n                          discoveryEligible: !1,\r\n                          replacedBy: data.profileKey,\r\n                          replacedAt: serverTimestamp(),\r\n                        },\r\n                        !0,\r\n                      ).catch(function () {\r\n                        return null;\r\n                      })\r\n                    : null;\r\n                })\r\n                .then(function () {\r\n                  return rehydrateProfileAfterWrite(data.profileKey, data, {\r\n                    surface: \"profile-save-rehydrate\",\r\n                  }).then(function (freshProfile) {\r\n                    var savedProfile =\r\n                      freshProfile || profileWithPublicMirror(data) || data;\r\n                    return (\r\n                      applyProfileIdentityCascade(savedProfile),\r\n                      (state.profile = savedProfile),\r\n                      clearStaleConnectionStatus(),\r\n                      privateProfileSaveBlocked\r\n                        ? renderStatus(\r\n                            \"Profile public identity saved. Reopen Edit Profile after the account bridge refreshes to confirm age/adult capability fields.\",\r\n                          )\r\n                        : notify(\r\n                            uid(),\r\n                            \"profile\",\r\n                            \"Profile saved\",\r\n                            \"Your profile is active.\",\r\n                            profileRouteHref(data.profileKey),\r\n                          ),\r\n                      refreshProfileCapabilitySurfaces(),\r\n                      renderAll(),\r\n                      savedProfile\r\n                    );\r\n                  });\r\n                })\r\n                .catch(function (error) {\r\n                  return (\r\n                    claim(\"profile-save:failed\", {\r\n                      profileKey: data.profileKey,\r\n                      error: (error && error.message) || String(error),\r\n                    }),\r\n                    renderStatus(\r\n                      \"Profile save could not complete. Refresh the account connection and try again.\",\r\n                    ),\r\n                    queueDraft(\"profile-update\", data, error),\r\n                    null\r\n                  );\r\n                });\r\n            });\r\n    }\r\n  }\r\n  function profileMediaPatchAliases(patch) {\r\n    ((patch = Object.assign({}, patch || {})),\r\n      (patch = profileMediaFocusAliases(patch)));\r\n    var avatarId =\r\n        patch.avatarMediaId ||\r\n        patch.avatar_media_id ||\r\n        patch.profileImageMediaId ||\r\n        patch.profile_image_media_id ||\r\n        patch.photoMediaId ||\r\n        patch.photo_media_id ||\r\n        \"\",\r\n      bannerId =\r\n        patch.bannerMediaId ||\r\n        patch.banner_media_id ||\r\n        patch.headerMediaId ||\r\n        patch.header_media_id ||\r\n        patch.coverMediaId ||\r\n        patch.cover_media_id ||\r\n        patch.backgroundMediaId ||\r\n        patch.background_media_id ||\r\n        \"\",\r\n      hasBannerPosition =\r\n        patch.bannerPosition !== void 0 ||\r\n        patch.banner_position !== void 0 ||\r\n        patch.headerPosition !== void 0 ||\r\n        patch.header_position !== void 0 ||\r\n        patch.coverPosition !== void 0 ||\r\n        patch.cover_position !== void 0,\r\n      bannerPosition = hasBannerPosition\r\n        ? patch.bannerPosition ||\r\n          patch.banner_position ||\r\n          patch.headerPosition ||\r\n          patch.header_position ||\r\n          patch.coverPosition ||\r\n          patch.cover_position ||\r\n          \"center\"\r\n        : \"\";\r\n    return (\r\n      avatarId &&\r\n        ((patch.avatarMediaId = avatarId),\r\n        (patch.avatar_media_id = avatarId),\r\n        (patch.profileImageMediaId = avatarId),\r\n        (patch.profile_image_media_id = avatarId),\r\n        (patch.photoMediaId = avatarId),\r\n        (patch.photo_media_id = avatarId),\r\n        (patch.thumbnailMediaId = avatarId)),\r\n      bannerId &&\r\n        ((patch.bannerMediaId = bannerId),\r\n        (patch.banner_media_id = bannerId),\r\n        (patch.headerMediaId = bannerId),\r\n        (patch.header_media_id = bannerId),\r\n        (patch.coverMediaId = bannerId),\r\n        (patch.cover_media_id = bannerId),\r\n        (patch.backgroundMediaId = bannerId),\r\n        (patch.background_media_id = bannerId)),\r\n      hasBannerPosition &&\r\n        ((patch.bannerPosition = bannerPosition),\r\n        (patch.banner_position = bannerPosition),\r\n        (patch.headerPosition = bannerPosition),\r\n        (patch.header_position = bannerPosition),\r\n        (patch.coverPosition = bannerPosition),\r\n        (patch.cover_position = bannerPosition)),\r\n      patch\r\n    );\r\n  }\r\n  function updateLocalPublicProfileMirror(profileKeyValue, patch) {\r\n    var key = nonPlaceholderProfileKey(profileKeyValue || profileKey() || \"\");\r\n    if (!(!key || !patch)) {\r\n      var normalizedKey = normalizedProfileKeyValue(key),\r\n        list = Array.isArray(state.publicProfiles) ? state.publicProfiles : [],\r\n        index = -1;\r\n      list.some(function (profile, i) {\r\n        return normalizedProfileKeyValue(\r\n          profile &&\r\n            (profile.profileKey || profile.handle || profile.profile_key || \"\"),\r\n        ) === normalizedKey\r\n          ? ((index = i), !0)\r\n          : !1;\r\n      });\r\n      var current = index >= 0 ? list[index] : { profileKey: key, handle: key },\r\n        next = profileMediaPatchAliases(\r\n          Object.assign({}, current, patch, {\r\n            profileKey: key,\r\n            handle: patch.handle || current.handle || key,\r\n          }),\r\n        );\r\n      (index >= 0 ? (list[index] = next) : list.push(next),\r\n        (state.publicProfiles = list));\r\n    }\r\n  }\r\n  function rehydrateProfileAfterWrite(\r\n    profileKeyValue,\r\n    fallbackProfile,\r\n    options,\r\n  ) {\r\n    var key = nonPlaceholderProfileKey(\r\n      profileKeyValue ||\r\n        (fallbackProfile &&\r\n          (fallbackProfile.profileKey || fallbackProfile.handle)) ||\r\n        profileKey() ||\r\n        \"\",\r\n    );\r\n    return !key || !supabaseCutoverConfigured()\r\n      ? Promise.resolve(\r\n          profileWithPublicMirror(fallbackProfile || state.profile || null),\r\n        )\r\n      : ((options = options || {}),\r\n        Promise.all([\r\n          readSupabasePrivateProfileRowsByKey(key, {\r\n            force: !0,\r\n            surface: options.surface || \"profile-write-rehydrate-private\",\r\n          }).catch(function (error) {\r\n            return (\r\n              claim(\"profile-write-rehydrate-private:blocked\", {\r\n                profileKey: key,\r\n                surface: options.surface || \"\",\r\n                error: (error && error.message) || String(error),\r\n              }),\r\n              []\r\n            );\r\n          }),\r\n          getDoc(\"publicProfiles/\" + key, {\r\n            publicRead: !0,\r\n            force: !0,\r\n            surface: options.surface || \"profile-write-rehydrate-public\",\r\n          }).catch(function (error) {\r\n            return (\r\n              claim(\"profile-write-rehydrate-public:blocked\", {\r\n                profileKey: key,\r\n                surface: options.surface || \"\",\r\n                error: (error && error.message) || String(error),\r\n              }),\r\n              null\r\n            );\r\n          }),\r\n        ]).then(function (results) {\r\n          var privateRow =\r\n              results[0] && results[0][0]\r\n                ? normalizeSupabaseProfileRecord(results[0][0], key)\r\n                : null,\r\n            publicSnap = results[1],\r\n            publicRow =\r\n              publicSnap &&\r\n              publicSnap.exists &&\r\n              publicSnap.exists() &&\r\n              publicSnap.data\r\n                ? normalizeSupabaseProfileRecord(publicSnap.data() || {}, key)\r\n                : null;\r\n          publicRow && updateLocalPublicProfileMirror(key, publicRow);\r\n          var merged = profileWithPublicMirror(\r\n            Object.assign(\r\n              {},\r\n              fallbackProfile || state.profile || {},\r\n              privateRow || {},\r\n              { profileKey: key },\r\n            ),\r\n          );\r\n          return (\r\n            merged &&\r\n              ((state.profile = merged), applyProfileIdentityCascade(merged)),\r\n            (state.currentPublicProfileMirrorReconcileToken = \"\"),\r\n            (state.currentPublicProfileMirrorReconcileLastAt = 0),\r\n            merged || fallbackProfile || state.profile || null\r\n          );\r\n        }));\r\n  }\r\n  function profileOwnerFromRecord(profile, fallbackKey, action) {\r\n    profile = profileWithPublicMirror(profile || {}) || profile || {};\r\n    var key = nonPlaceholderProfileKey(\r\n        profile.profileKey ||\r\n          profile.handle ||\r\n          profile.profile_key ||\r\n          fallbackKey ||\r\n          \"\",\r\n      ),\r\n      ownerUid = clean(\r\n        profile.uid ||\r\n          profile.userId ||\r\n          profile.user_id ||\r\n          profile.supabaseUserId ||\r\n          profile.supabase_user_id ||\r\n          profile.appUserId ||\r\n          profile.app_user_id ||\r\n          profile.firebaseUid ||\r\n          profile.firebase_uid ||\r\n          \"\",\r\n        \"\",\r\n      );\r\n    return !key || !ownerUid\r\n      ? null\r\n      : {\r\n          uid: ownerUid,\r\n          profileKey: key,\r\n          displayName: publicDisplayName(\r\n            profile.displayName ||\r\n              profile.display_name ||\r\n              activeDisplayNameValue() ||\r\n              key,\r\n            \"DSD member\",\r\n          ),\r\n          avatarMediaId: canonicalProfileAvatarMediaId(\r\n            profile || state.profile || {},\r\n          ),\r\n        };\r\n  }\r\n  function resolveCanonicalProfileOwnerIdentity(action, preferredKey) {\r\n    var owner = canonicalProfileOwnerIdentity(\"\");\r\n    if (owner) return Promise.resolve(owner);\r\n    var candidates = [\r\n        preferredKey,\r\n        state.profile && (state.profile.profileKey || state.profile.handle),\r\n        activeOwnerProfileKey(),\r\n        activeProfileKeyValue(),\r\n        profileKey(),\r\n        customerProfileKeyValue(),\r\n      ]\r\n        .map(function (item) {\r\n          return nonPlaceholderProfileKey(item || \"\");\r\n        })\r\n        .filter(Boolean),\r\n      seen = {};\r\n    candidates = candidates.filter(function (item) {\r\n      var normalized = normalizedProfileKeyValue(item);\r\n      return !normalized || seen[normalized]\r\n        ? !1\r\n        : ((seen[normalized] = !0), !0);\r\n    });\r\n    var key = candidates[0] || \"\";\r\n    if (!key || !supabaseCutoverReady())\r\n      return Promise.resolve(canonicalProfileOwnerIdentity(action));\r\n    function tryCandidate(index) {\r\n      var candidate = candidates[index] || \"\";\r\n      return candidate\r\n        ? readSupabaseCanonicalProfileByKey(candidate)\r\n            .then(function (profile) {\r\n              var recovered = profileOwnerFromRecord(\r\n                profile,\r\n                candidate,\r\n                action,\r\n              );\r\n              return recovered\r\n                ? (activateCustomerScopedProfile(profile),\r\n                  claim(\r\n                    \"canonical-profile-owner:recovered-from-supabase-profile\",\r\n                    {\r\n                      action: action || \"\",\r\n                      profileKey: recovered.profileKey,\r\n                      ownerUidPresent: !0,\r\n                      canonical: \"supabase-profile-key-owner\",\r\n                    },\r\n                  ),\r\n                  recovered)\r\n                : tryCandidate(index + 1);\r\n            })\r\n            .catch(function (error) {\r\n              return (\r\n                claim(\"canonical-profile-owner:recovery-blocked\", {\r\n                  action: action || \"\",\r\n                  profileKey: candidate,\r\n                  error: (error && error.message) || String(error),\r\n                }),\r\n                tryCandidate(index + 1)\r\n              );\r\n            })\r\n        : Promise.resolve(canonicalProfileOwnerIdentity(action));\r\n    }\r\n    return tryCandidate(0);\r\n  }\r\n  function saveProfileMediaPatch(patch) {\r\n    if (!requireAuth(\"save profile media\")) return Promise.resolve(null);\r\n    patch = patch || {};\r\n    var activeProfile = currentComposerProfile() || {},\r\n      preferredKey = nonPlaceholderProfileKey(\r\n        patch.profileKey ||\r\n          patch.handle ||\r\n          activeOwnerProfileKey() ||\r\n          activeProfile.profileKey ||\r\n          activeProfile.handle ||\r\n          activeProfile.profile_key ||\r\n          activeProfile.publicProfileKey ||\r\n          activeProfile.public_profile_key ||\r\n          activeProfileKeyValue() ||\r\n          customerProfileKeyValue() ||\r\n          profileKey() ||\r\n          (state.profile &&\r\n            (state.profile.profileKey || state.profile.handle)) ||\r\n          \"\",\r\n      );\r\n    return resolveCanonicalProfileOwnerIdentity(\r\n      \"save profile media\",\r\n      preferredKey,\r\n    ).then(function (owner) {\r\n      owner = owner || {};\r\n      var key = nonPlaceholderProfileKey(\r\n        owner.profileKey ||\r\n          preferredKey ||\r\n          activeOwnerProfileKey() ||\r\n          activeProfile.profileKey ||\r\n          activeProfile.handle ||\r\n          activeProfile.profile_key ||\r\n          activeProfile.publicProfileKey ||\r\n          activeProfile.public_profile_key ||\r\n          activeProfileKeyValue() ||\r\n          customerProfileKeyValue() ||\r\n          profileKey() ||\r\n          (state.profile &&\r\n            (state.profile.profileKey || state.profile.handle)) ||\r\n          \"\",\r\n      );\r\n      if (!key)\r\n        return (\r\n          renderStatus(\r\n            \"Profile connection is refreshing. Try again in a moment.\",\r\n          ),\r\n          Promise.resolve(null)\r\n        );\r\n      var canonicalHandle = nonPlaceholderProfileKey(\r\n        patch.handle ||\r\n          activeProfile.handle ||\r\n          (state.profile && state.profile.handle) ||\r\n          ((publicProfileByKey(key) || {}).handle || \"\") ||\r\n          key,\r\n      ) || key;\r\n      ((patch = profileMediaPatchAliases(Object.assign({}, patch || {}))),\r\n        (patch.profileKey = key),\r\n        (patch.handle = canonicalHandle),\r\n        (patch.uid = owner.uid || actorUid() || uid() || \"\"),\r\n        (patch.userId = patch.uid),\r\n        (patch.user_id = patch.uid));\r\n      var hasAvatarFocalMutation =\r\n          patch.avatarFocusX !== void 0 ||\r\n          patch.avatar_focus_x !== void 0 ||\r\n          patch.avatarFocusY !== void 0 ||\r\n          patch.avatar_focus_y !== void 0,\r\n        hasMediaChange = !!(\r\n          patch.avatarMediaId ||\r\n          patch.bannerMediaId ||\r\n          patch.clearAvatarMediaId === !0 ||\r\n          patch.clearBannerMediaId === !0\r\n        ),\r\n        privateOk = !1,\r\n        publicOk = !1;\r\n      if (!patch.uid && supabaseCutoverReady())\r\n        return readSupabaseCanonicalProfileByKey(key)\r\n          .then(function (profile) {\r\n            var recovered = profileOwnerFromRecord(\r\n              profile,\r\n              key,\r\n              \"save profile media final\",\r\n            );\r\n            return recovered && recovered.uid\r\n              ? ((owner = recovered),\r\n                activateCustomerScopedProfile(profile),\r\n                (patch.uid = recovered.uid),\r\n                (patch.userId = patch.uid),\r\n                (patch.user_id = patch.uid),\r\n                continueProfileMediaSave())\r\n              : (renderStatus(\r\n                  \"Profile connection is refreshing. Try again in a moment.\",\r\n                ),\r\n                claim(\"profile-media-save:blocked-empty-owner-uid\", {\r\n                  profileKey: key,\r\n                  canonical: \"supabase-profile-owner-uid-required\",\r\n                }),\r\n                null);\r\n          })\r\n          .catch(function (error) {\r\n            return (\r\n              claim(\"profile-media-save:owner-recovery-blocked\", {\r\n                profileKey: key,\r\n                error: (error && error.message) || String(error),\r\n                canonical: \"supabase-profile-key-owner\",\r\n              }),\r\n              renderStatus(\r\n                \"Profile connection is refreshing. Try again in a moment.\",\r\n              ),\r\n              null\r\n            );\r\n          });\r\n      if (!patch.uid)\r\n        return (\r\n          renderStatus(\r\n            \"Profile connection is refreshing. Try again in a moment.\",\r\n          ),\r\n          claim(\"profile-media-save:blocked-empty-owner-uid\", {\r\n            profileKey: key,\r\n            canonical: \"supabase-profile-owner-uid-required\",\r\n          }),\r\n          Promise.resolve(null)\r\n        );\r\n      return continueProfileMediaSave();\r\n      function continueProfileMediaSave() {\r\n        if (supabaseCutoverReady()) {\r\n          var proxyProfilePatch = profileMediaPatchAliases(\r\n            patch.activeLocationOnly === !0\n              ? Object.assign({}, patch, {\r\n                  profileKey: key,\r\n                  handle: canonicalHandle,\r\n                  uid: patch.uid,\r\n                  userId: patch.uid,\r\n                  user_id: patch.uid,\r\n                  activeLocationOnly: !0,\n                })\r\n              : Object.assign(\r\n                  {},\r\n                  state.profile || canonicalProfilePayload(!0),\r\n                  patch,\r\n                  {\r\n                    profileKey: key,\r\n                    handle: canonicalHandle,\r\n                    uid: patch.uid,\r\n                    userId: patch.uid,\r\n                    user_id: patch.uid,\r\n                    setupComplete: !0,\r\n                    status: \"active\",\r\n                  },\r\n                ),\r\n          );\r\n          return (\r\n            hasAvatarFocalMutation &&\r\n              (traceAvatarFocalMutation(\"payload-built\", {\r\n                profileKey: key,\r\n                avatarFocusX: proxyProfilePatch.avatarFocusX,\r\n                avatarFocusY: proxyProfilePatch.avatarFocusY,\r\n                avatar_focus_x: proxyProfilePatch.avatar_focus_x,\r\n                avatar_focus_y: proxyProfilePatch.avatar_focus_y,\r\n                objectPosition: profileMediaFocusPosition(\r\n                  proxyProfilePatch,\r\n                  \"avatar\",\r\n                ),\r\n              }),\r\n              (state.profile =\r\n                propagateAvatarFocalMutation(\r\n                  key,\r\n                  proxyProfilePatch,\r\n                  \"optimistic-before-save\",\r\n                ) || state.profile)),\r\n            saveProfileViaProxy(proxyProfilePatch)\r\n              .then(function (result) {\r\n                if (hasAvatarFocalMutation) {\r\n                  var responseProfile = profileMediaFocusAliases(\r\n                    Object.assign(\r\n                      {},\r\n                      proxyProfilePatch,\r\n                      (result && result.profile) || {},\r\n                    ),\r\n                  );\r\n                  traceAvatarFocalMutation(\"backend-response\", {\r\n                    profileKey: key,\r\n                    avatarFocusX: responseProfile.avatarFocusX,\r\n                    avatarFocusY: responseProfile.avatarFocusY,\r\n                    avatar_focus_x: responseProfile.avatar_focus_x,\r\n                    avatar_focus_y: responseProfile.avatar_focus_y,\r\n                    objectPosition: profileMediaFocusPosition(\r\n                      responseProfile,\r\n                      \"avatar\",\r\n                    ),\r\n                    canonical:\r\n                      (result && result.canonical) ||\r\n                      \"supabase-service-role-profile-save\",\r\n                  });\r\n                }\r\n                var savedProfile =\r\n                  profileWithPublicMirror(\r\n                    Object.assign(\r\n                      {},\r\n                      proxyProfilePatch,\r\n                      (result && result.profile) || {},\r\n                    ),\r\n                  ) ||\r\n                  Object.assign(\r\n                    {},\r\n                    proxyProfilePatch,\r\n                    (result && result.profile) || {},\r\n                  );\r\n                return (\r\n                  hasAvatarFocalMutation &&\r\n                    traceAvatarFocalMutation(\"stored-canonical-profile-save\", {\r\n                      profileKey: key,\r\n                      avatarFocusX: savedProfile.avatarFocusX,\r\n                      avatarFocusY: savedProfile.avatarFocusY,\r\n                      avatar_focus_x: savedProfile.avatar_focus_x,\r\n                      avatar_focus_y: savedProfile.avatar_focus_y,\r\n                      objectPosition: profileMediaFocusPosition(\r\n                        savedProfile,\r\n                        \"avatar\",\r\n                      ),\r\n                    }),\r\n                  (patch.bannerPosition || patch.banner_position) &&\r\n                    ((savedProfile.bannerPosition =\r\n                      patch.bannerPosition || patch.banner_position),\r\n                    (savedProfile.banner_position =\r\n                      savedProfile.bannerPosition)),\r\n                  (savedProfile = profileMediaFocusAliases(savedProfile)),\r\n                  (state.profile = profileMediaPatchAliases(savedProfile)),\r\n                  updateLocalPublicProfileMirror(\r\n                    key,\r\n                    publicProfilePayload(state.profile),\r\n                  ),\r\n                  (state.currentPublicProfileMirrorReconcileToken = \"\"),\r\n                  (state.currentPublicProfileMirrorReconcileLastAt = 0),\r\n                  clearStaleConnectionStatus(),\r\n                  renderProfileIdentity(),\r\n                  (patch.bannerPosition || patch.banner_position) &&\r\n                    qsa(\r\n                      \".dsd-up315__cover, .dsd-up353__cover\",\r\n                      document,\r\n                    ).forEach(function (cover) {\r\n                      (cover.style.setProperty(\r\n                        \"--dsd-up315-cover-position\",\r\n                        profileMediaFocusPosition(savedProfile, \"banner\"),\r\n                        \"important\",\r\n                      ),\r\n                        cover.style.setProperty(\r\n                          \"--dsd-up315-cover-size\",\r\n                          bannerBackgroundSize(savedProfile.bannerPosition),\r\n                          \"important\",\r\n                        ),\r\n                        cover.style.setProperty(\r\n                          \"background-position\",\r\n                          profileMediaFocusPosition(savedProfile, \"banner\"),\r\n                          \"important\",\r\n                        ),\r\n                        cover.style.setProperty(\r\n                          \"background-size\",\r\n                          bannerBackgroundSize(savedProfile.bannerPosition),\r\n                          \"important\",\r\n                        ));\r\n                    }),\r\n                  applyCurrentProfileMediaFocus(document),\r\n                  hydrateProfileCardMedia(document),\r\n                  hydrateMediaReads(document),\r\n                  renderDiscovery(),\r\n                  renderPosts(),\r\n                  renderStories(),\r\n                  typeof renderNotifications == \"function\" &&\r\n                    renderNotifications(),\r\n                  hasAvatarFocalMutation &&\r\n                    propagateAvatarFocalMutation(\r\n                      key,\r\n                      state.profile,\r\n                      \"after-render-response\",\r\n                    ),\r\n                  claim(\"profile-media-save:proxy-complete\", {\r\n                    profileKey: key,\r\n                    hasMediaChange: hasMediaChange,\r\n                    canonical:\r\n                      (result && result.canonical) ||\r\n                      \"supabase-service-role-profile-save\",\r\n                  }),\r\n                  state.profile\r\n                );\r\n              })\r\n              .catch(function (error) {\r\n                return (\r\n                  queueDraft(\"profile-media-update\", patch, error),\r\n                  claim(\"profile-media-save:proxy-blocked\", {\r\n                    profileKey: key,\r\n                    error: (error && error.message) || String(error),\r\n                    canonical: \"supabase-service-role-profile-save\",\r\n                  }),\r\n                  renderStatus(\r\n                    \"Profile media save could not complete. Try again.\",\r\n                  ),\r\n                  null\r\n                );\r\n              })\r\n          );\r\n        }\r\n        return Promise.all([\r\n          setDoc(canonicalProfileWritePath(key), patch, !0)\r\n            .then(function () {\r\n              return ((privateOk = !0), !0);\r\n            })\r\n            .catch(function (error) {\r\n              return (\r\n                claim(\"profile-media-private-patch:blocked\", {\r\n                  profileKey: key,\r\n                  error: (error && error.message) || String(error),\r\n                }),\r\n                !1\r\n              );\r\n            }),\r\n          setDoc(\"publicProfiles/\" + key, patch, !0)\r\n            .then(function () {\r\n              return ((publicOk = !0), !0);\r\n            })\r\n            .catch(function (error) {\r\n              return (\r\n                claim(\"profile-media-public-patch:blocked\", {\r\n                  profileKey: key,\r\n                  error: (error && error.message) || String(error),\r\n                }),\r\n                !1\r\n              );\r\n            }),\r\n        ])\r\n          .then(function () {\r\n            if (!privateOk && !publicOk)\r\n              throw new Error(\r\n                \"Profile media save failed on private and public profile mirrors.\",\r\n              );\r\n            if (hasMediaChange && !publicOk)\r\n              throw new Error(\r\n                \"Profile media uploaded but public profile mirror did not update.\",\r\n              );\r\n            var base = Object.assign(\r\n              {},\r\n              state.profile || canonicalProfilePayload(!0),\r\n              {\r\n                profileKey: key,\r\n                handle: canonicalHandle,\r\n                setupComplete: !0,\r\n                status: \"active\",\r\n              },\r\n            );\r\n            return (\r\n              (state.profile = profileWithPublicMirror(\r\n                profileMediaPatchAliases(Object.assign(base, patch)),\r\n              )),\r\n              updateLocalPublicProfileMirror(key, patch),\r\n              hasAvatarFocalMutation &&\r\n                propagateAvatarFocalMutation(\r\n                  key,\r\n                  state.profile,\r\n                  \"fallback-after-write\",\r\n                ),\r\n              (state.currentPublicProfileMirrorReconcileToken = \"\"),\r\n              (state.currentPublicProfileMirrorReconcileLastAt = 0),\r\n              clearStaleConnectionStatus(),\r\n              rehydrateProfileAfterWrite(key, state.profile, {\r\n                surface: \"profile-media-save-rehydrate\",\r\n              }).then(function (freshProfile) {\r\n                return (\r\n                  freshProfile && (state.profile = freshProfile),\r\n                  renderProfileIdentity(),\r\n                  hydrateProfileCardMedia(document),\r\n                  hydrateMediaReads(document),\r\n                  renderDiscovery(),\r\n                  renderPosts(),\r\n                  renderStories(),\r\n                  typeof renderNotifications == \"function\" &&\r\n                    renderNotifications(),\r\n                  hasAvatarFocalMutation &&\r\n                    propagateAvatarFocalMutation(\r\n                      key,\r\n                      state.profile,\r\n                      \"fallback-after-render\",\r\n                    ),\r\n                  state.profile\r\n                );\r\n              })\r\n            );\r\n          })\r\n          .catch(function (error) {\r\n            return (\r\n              queueDraft(\"profile-media-update\", patch, error),\r\n              renderStatus(\"Profile media save could not complete. Try again.\"),\r\n              null\r\n            );\r\n          });\r\n      }\r\n    });\r\n  }\r\n  function refreshProfileCapabilitySurfaces() {\r\n    (refreshPublicationControls(document),\r\n      (state.viewedAuthorListenerKey = \"\"),\r\n      startListeners(),\r\n      renderAll(),\r\n      renderPosts(),\r\n      renderStories(),\r\n      renderDiscovery(),\r\n      renderSearchIndex());\r\n  }\r\n  function scheduleLateProfileHydrationReconcile() {\r\n    function profileMediaSlotHydrationSettled(profile, slot) {\r\n      profile = profile || {};\r\n      var isBanner = slot === \"banner\",\r\n        hydratedFlag = isBanner\r\n          ? \"bannerMediaHydrated\"\r\n          : \"avatarMediaHydrated\",\r\n        fields = isBanner\r\n          ? [\r\n              \"bannerMediaId\",\r\n              \"banner_media_id\",\r\n              \"headerMediaId\",\r\n              \"header_media_id\",\r\n              \"coverMediaId\",\r\n              \"cover_media_id\",\r\n            ]\r\n          : [\r\n              \"avatarMediaId\",\r\n              \"avatar_media_id\",\r\n              \"thumbnailMediaId\",\r\n              \"thumbnail_media_id\",\r\n              \"profileImageMediaId\",\r\n              \"profile_image_media_id\",\r\n            ];\r\n      return (\r\n        profile[hydratedFlag] === !0 ||\r\n        fields.some(function (field) {\r\n          return Object.prototype.hasOwnProperty.call(profile, field);\r\n        })\r\n      );\r\n    }\r\n    var initialTargetKey = isOwnProfileRoute()\r\n        ? activeOwnerProfileKey()\r\n        : viewedRouteProfileKey(),\r\n      initialNormalizedKey = normalizedProfileKeyValue(initialTargetKey || \"\"),\r\n      reconcileToken =\r\n        BUILD + \":\" + (initialNormalizedKey || \"pending-profile-key\");\r\n    if (state.profileHydrationReconcileScheduled !== reconcileToken) {\r\n      state.profileHydrationReconcileScheduled = reconcileToken;\r\n      var attempts = [180, 700, 1600, 3200, 5200];\r\n      attempts.forEach(function (delay, index) {\r\n        window.setTimeout(function () {\r\n          var root = qs(\"[data-dsd-user-profile]\");\r\n          if (root) {\r\n            var targetKey = isOwnProfileRoute()\r\n              ? activeOwnerProfileKey()\r\n              : viewedRouteProfileKey();\r\n            if (targetKey) {\r\n              var normalizedTargetKey = normalizedProfileKeyValue(targetKey);\r\n              if (!(\r\n                normalizedTargetKey &&\r\n                state.profileHydrationCompleteByKey[normalizedTargetKey] ===\r\n                  BUILD\r\n              )) {\r\n                var shellText = String(root.textContent || \"\"),\r\n                  profile = viewedProfile() || state.profile || {},\r\n                  profileHasIdentity =\r\n                    profileRecordHasUsableKey(profile) &&\r\n                    !!publicDisplayName(\r\n                      (profile && profile.displayName) || \"\",\r\n                      \"\",\r\n                    ),\r\n                  visibleFallbackIdentity =\r\n                    /loading profile|profile identity syncing|profile unavailable|public profile is not active|cannot be displayed|complete profile setup|profile ready for discovery|choose a handle|set-handle|dsd member/i.test(\r\n                      shellText,\r\n                    ),\r\n                  blankShell =\r\n                    !root.dataset.dsdProfileHydrated ||\r\n                    visibleFallbackIdentity ||\r\n                    !profileHasIdentity,\r\n                  missingMediaHydration =\r\n                    !profileMediaSlotHydrationSettled(profile, \"avatar\") ||\r\n                    !profileMediaSlotHydrationSettled(profile, \"banner\");\r\n                if (!(\r\n                  !blankShell &&\r\n                  !missingMediaHydration &&\r\n                  (normalizedTargetKey &&\r\n                    (state.profileHydrationCompleteByKey[normalizedTargetKey] =\r\n                      BUILD),\r\n                  index > 0)\r\n                )) {\r\n                  var profileRead = isOwnProfileRoute()\r\n                    ? readSupabaseCanonicalProfileByKey(targetKey)\r\n                    : readSupabaseProfileByKey(targetKey);\r\n                  profileRead\r\n                    .then(function (profile2) {\r\n                      if (!profile2) return null;\r\n                      (isOwnProfileRoute() ||\r\n                      identityMatchesCurrent(\r\n                        profile2.uid || profile2.userId || \"\",\r\n                        profile2.profileKey || profile2.handle || \"\",\r\n                      )\r\n                        ? activateCustomerScopedProfile(profile2)\r\n                        : ((state.viewProfile = mergePublicProfileProjection(\n                            state.viewProfile || {},\n                            profile2,\n                          )),\n                          (state.viewProfileMissingKey = \"\"),\r\n                          (state.viewProfileResolvedKey = targetKey),\r\n                          (state.viewProfileLookupKey = targetKey),\r\n                          (state.publicProfiles = dedupePublicProfiles(\r\n                            (state.publicProfiles || []).concat([\r\n                              publicProfilePayload(profile2),\r\n                            ]),\r\n                          )),\r\n                          publishPublicProfiles(state.publicProfiles)),\r\n                        renderAll(),\r\n                        hydrateProfileCardMedia(root),\r\n                        hydrateAvatarMedia(root));\r\n                      var hydratedProfile =\r\n                          viewedProfile() || state.profile || profile2 || {},\r\n                        hydratedKey = normalizedProfileKeyValue(\r\n                          hydratedProfile.profileKey ||\r\n                            hydratedProfile.handle ||\r\n                            targetKey,\r\n                        );\r\n                      return (\r\n                        hydratedKey &&\r\n                          profileMediaSlotHydrationSettled(\r\n                            hydratedProfile,\r\n                            \"avatar\",\r\n                          ) &&\r\n                          profileMediaSlotHydrationSettled(\r\n                            hydratedProfile,\r\n                            \"banner\",\r\n                          ) &&\r\n                          (state.profileHydrationCompleteByKey[hydratedKey] =\r\n                            BUILD),\r\n                        claim(\"profile-late-hydration-reconcile:applied\", {\r\n                          profileKey:\r\n                            profile2.profileKey || profile2.handle || targetKey,\r\n                          attempt: index + 1,\r\n                        }),\r\n                        profile2\r\n                      );\r\n                    })\r\n                    .catch(function (error) {\r\n                      return (\r\n                        claim(\"profile-late-hydration-reconcile:blocked\", {\r\n                          profileKey: targetKey,\r\n                          attempt: index + 1,\r\n                          error: (error && error.message) || String(error),\r\n                        }),\r\n                        null\r\n                      );\r\n                    });\r\n                }\r\n              }\r\n            }\r\n          }\r\n        }, delay);\r\n      });\r\n    }\r\n  }\r\n  function ensureLocalMediaFileReady(file) {\n    if (!file || mediaFileKind(file) !== \"video\") return Promise.resolve(file);\n    var appleTouch =\n      /iPad|iPhone|iPod/i.test(String(navigator.userAgent || \"\")) ||\n      (navigator.platform === \"MacIntel\" && Number(navigator.maxTouchPoints || 0) > 1);\n    if (!appleTouch) return Promise.resolve(file);\n    if (!(Number(file.size || 0) > 0))\n      return Promise.reject(\n        new Error(\"Download this video from iCloud in Photos, then select it again.\"),\n      );\n    // Safari owns iCloud materialization. Reading the entire file here duplicated\n    // that transfer before XHR and made large selections appear stuck in Photos.\n    renderStatus(\"Video selected. Upload progress will begin when you publish.\");\n    return Promise.resolve(file);\n  }\n  var mediaManifestSequence = 0;\r\n  function uniqueMediaManifestId(surface, file, surfaceId, slot) {\r\n    if (surfaceId && surface !== \"profile\")\r\n      return clean(\r\n        [\r\n          surface || \"media\",\r\n          surfaceId,\r\n          slot || \"attachment\",\r\n          Number((file && file.size) || 0),\r\n          Number((file && file.lastModified) || 0),\r\n          (file && file.name) || \"media\",\r\n        ].join(\"-\"),\r\n        \"media\",\r\n      );\r\n    mediaManifestSequence += 1;\r\n    var entropy = \"\";\r\n    try {\r\n      entropy =\r\n        window.crypto && typeof window.crypto.randomUUID === \"function\"\r\n          ? window.crypto.randomUUID()\r\n          : \"\";\r\n    } catch (e) {}\r\n    if (!entropy) {\r\n      try {\r\n        if (window.crypto && typeof window.crypto.getRandomValues === \"function\") {\r\n          var randomValues = new Uint32Array(2);\r\n          window.crypto.getRandomValues(randomValues);\r\n          entropy =\r\n            randomValues[0].toString(36) + \"-\" + randomValues[1].toString(36);\r\n        }\r\n      } catch (e) {}\r\n    }\r\n    if (!entropy)\r\n      entropy =\r\n        Math.random().toString(36).slice(2) + \"-\" + mediaManifestSequence;\r\n    return clean(\r\n      String(surface || \"media\") +\r\n        \"-\" +\r\n        Date.now() +\r\n        \"-\" +\r\n        mediaManifestSequence +\r\n        \"-\" +\r\n        entropy +\r\n        \"-\" +\r\n        ((file && file.name) || \"media\"),\r\n      \"media\",\r\n    );\r\n  }\r\n  function createMediaManifest(\r\n    file,\r\n    surface,\r\n    surfaceId,\r\n    slot,\r\n    visibility,\r\n    contentRating,\r\n    signerContext,\r\n  ) {\r\n    if (!file) return Promise.resolve(null);\r\n    var mediaOwnerPromise =\r\n      surface === \"profile\"\r\n        ? resolveCanonicalProfileOwnerIdentity(\r\n            \"upload profile media\",\r\n            activeOwnerProfileKey() ||\r\n              activeProfileKeyValue() ||\r\n              customerProfileKeyValue() ||\r\n              profileKey(),\r\n          )\r\n        : Promise.resolve(activeAuthorIdentity(\"upload media\"));\r\n    renderStatus(\r\n      \"Preparing \" +\r\n        (file.type && file.type.indexOf(\"video/\") === 0 ? \"video\" : \"media\") +\r\n        \" upload...\",\r\n    );\r\n    var preparedFilePromise = ensureLocalMediaFileReady(file).then(function (\r\n      preparedFile,\r\n    ) {\r\n      return prepareComposerMediaFile(preparedFile, surface);\r\n    });\r\n    return mediaOwnerPromise.then(function (mediaOwner) {\r\n      return mediaOwner\r\n        ? preparedFilePromise.then(function (preparedFile) {\r\n            ((file = preparedFile || file),\r\n              file.dsdCompressedFrom\r\n                ? renderStatus(\r\n                    \"Compressed image from \" +\r\n                      Math.round(file.dsdCompressedFrom / 1024) +\r\n                      \" KB to \" +\r\n                      Math.round(file.size / 1024) +\r\n                      \" KB.\",\r\n                  )\r\n                : mediaFileKind(file) === \"video\" &&\r\n                  renderStatus(\r\n                    \"Video selected. Upload progress will be shown during transfer.\",\r\n                  ));\r\n            var manifestSlot =\r\n                slot ||\r\n                (file.__dsdUploadBatch\r\n                  ? \"attachment-\" + Number(file.__dsdUploadBatch.index || 0)\r\n                  : \"\"),\r\n              id = uniqueMediaManifestId(\r\n                surface,\r\n                file,\r\n                surfaceId,\r\n                manifestSlot,\r\n              ),\r\n              kind = mediaFileKind(file),\r\n              rating = contentRating || \"standard\",\r\n              root = surface === \"story\" ? \"stories\" : surface + \"s\",\r\n              path =\r\n                surface === \"profile\"\r\n                  ? \"profiles/\" +\r\n                    mediaOwner.profileKey +\r\n                    \"/\" +\r\n                    (slot || \"media\") +\r\n                    \"/\" +\r\n                    file.name\r\n                  : root +\r\n                    \"/\" +\r\n                    (surfaceId || mediaOwner.uid) +\r\n                    \"/\" +\r\n                    id +\r\n                    \"/\" +\r\n                    file.name,\r\n              manifestVisibility =\r\n                visibility ||\r\n                (surface === \"profile\" ? \"public\" : \"owner_scoped\"),\r\n              manifest = {\r\n                mediaId: id,\r\n                ownerUid: mediaOwner.uid,\r\n                ownerProfileKey: mediaOwner.profileKey,\r\n                surface: surface,\r\n                surfaceId:\r\n                  surface === \"profile\"\r\n                    ? mediaOwner.profileKey\r\n                    : surfaceId || mediaOwner.uid,\r\n                slot: manifestSlot,\r\n                kind: kind,\r\n                fileName: file.name,\r\n                contentType: canonicalMediaContentType(file),\r\n                bytes: file.size,\r\n                compressedFromBytes: file.dsdCompressedFrom || 0,\r\n                videoDurationSeconds: file.dsdVideoDurationSeconds || 0,\n                videoWidth: file.dsdVideoWidth || 0,\n                videoHeight: file.dsdVideoHeight || 0,\n                trimStartSeconds: kind === \"video\" ? Number(file.dsdTrimStartSeconds || 0) : 0,\n                trimEndSeconds: kind === \"video\" ? Number(file.dsdTrimEndSeconds || 0) : 0,\n                path: path,\r\n                objectKey: path,\r\n                wasabiObjectKey: path,\r\n                visibility: manifestVisibility,\r\n                contentRating: rating,\r\n                status: \"pending_upload\",\r\n                signedUrlRequired: !0,\r\n                readSignedUrlRequired: !0,\r\n                entity: authoredEntityMeta(\r\n                  \"media\",\r\n                  manifestVisibility,\r\n                  rating,\r\n                  mediaOwner,\r\n                  {\r\n                    surface: surface,\r\n                    surfaceId:\r\n                      surface === \"profile\"\r\n                        ? mediaOwner.profileKey\r\n                        : surfaceId || mediaOwner.uid,\r\n                    mediaKind: kind,\r\n                  },\r\n                ),\r\n                firestorePath: PATHS.mediaManifest,\r\n              };\r\n            if (file.__dsdUploadBatch)\r\n              try {\r\n                Object.defineProperty(manifest, \"__dsdUploadBatch\", {\r\n                  value: file.__dsdUploadBatch,\r\n                  enumerable: !1,\r\n                  configurable: !0,\r\n                });\r\n              } catch (error) {\r\n                manifest.__dsdUploadBatch = file.__dsdUploadBatch;\r\n              }\r\n            signerContext &&\r\n              typeof signerContext == \"object\" &&\r\n              ((manifest.signerSurface = signerContext.surface || \"\"),\r\n              (manifest.signerSurfaceId = signerContext.surfaceId || \"\"),\r\n              (manifest.signerSlot = signerContext.slot || \"\"),\r\n              (manifest.signerObjectKey =\r\n                signerContext.objectKey || signerContext.path || \"\"),\r\n              (manifest.signerPath =\r\n                signerContext.path || signerContext.objectKey || \"\"),\r\n              (manifest.signerPath || manifest.signerObjectKey) &&\r\n                ((manifest.path =\r\n                  manifest.signerPath || manifest.signerObjectKey),\r\n                (manifest.objectKey =\r\n                  manifest.signerObjectKey || manifest.signerPath),\r\n                (manifest.wasabiObjectKey = manifest.objectKey)));\r\n            var metadataManifest = Object.assign({}, manifest, {\r\n              status: \"pending_upload\",\r\n              preUploadMetadata: !0,\r\n              preUploadMetadataAt: now(),\r\n            });\r\n            return (\r\n              supabaseCutoverReady()\r\n                ? saveMediaManifestViaProxy(metadataManifest)\r\n                : setDoc(\"mediaManifests/\" + id, metadataManifest, !0)\r\n            )\r\n              .then(function (saved) {\r\n                return (applyCanonicalMediaId(manifest, saved), manifest);\r\n              })\r\n              .then(function () {\r\n                return refreshCanonicalMediaId(manifest);\r\n              })\r\n              .then(function () {\r\n                return writeMediaSignerShadow(id, manifest);\r\n              })\r\n              .then(function () {\r\n                return uploadWasabiMedia(manifest, file);\r\n              })\r\n              .then(function (uploadedManifest) {\r\n                if (\r\n                  (surface === \"profile\" ||\n                    surface === \"post\" ||\n                    surface === \"story\" ||\n                    surface === \"album\") &&\n                  (!uploadedManifest || uploadedManifest.status !== \"uploaded\")\r\n                ) {\r\n                  var uploadError = new Error(\r\n                    (uploadedManifest && uploadedManifest.uploadError) ||\r\n                      \"Media upload did not complete.\",\r\n                  );\r\n                  uploadError.dsdMediaUploadError = !0;\r\n                  throw uploadError;\r\n                }\r\n                return uploadedManifest;\r\n              })\r\n              .catch(function (error) {\n                if (error && surface === \"profile\") {\n                  error.dsdNoDraftQueue = !0;\n                  if (\n                    /trusted_image_validation_failed|corrupt header|unsupported image/i.test(\n                      String(error.message || \"\"),\n                    )\n                  )\n                    error.message =\n                      (slot === \"banner\" ? \"Banner image\" : \"Profile photo\") +\n                      \" could not be processed. Choose a valid JPEG, PNG, WebP, or GIF and try again.\";\n                }\n                if (\n                  error &&\n                  (error.dsdVideoPolicyError ||\r\n                    error.dsdMediaUploadError ||\r\n                    surface === \"profile\" ||\n                    surface === \"post\" ||\n                    surface === \"story\" ||\n                    surface === \"album\")\n                ) {\r\n                  error.dsdMediaManifest = manifest;\r\n                  renderStatus(\r\n                    error.message || \"Media upload did not complete.\",\r\n                  );\r\n                  throw error;\r\n                }\r\n                return (\r\n                  queueDraft(\"media-manifest\", manifest, error),\r\n                  manifest\r\n                );\r\n              });\r\n          })\r\n        : Promise.resolve(null);\r\n    });\r\n  }\r\n  function canonicalMediaIdFromRecord(record) {\r\n    var uuidPattern =\r\n        /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,\r\n      id =\r\n        (record &&\r\n          (record.id ||\r\n            record.mediaObjectId ||\r\n            record.media_object_id ||\r\n            record.supabaseMediaId ||\r\n            record.supabase_media_id)) ||\r\n        \"\";\r\n    return uuidPattern.test(String(id || \"\")) ? String(id) : \"\";\r\n  }\r\n  function applyCanonicalMediaId(manifest, saved) {\n    var canonicalId = canonicalMediaIdFromRecord(saved);\n    var canonicalObjectKey =\n      saved &&\n      (saved.wasabiObjectKey ||\n        saved.wasabi_object_key ||\n        saved.objectKey ||\n        saved.object_key ||\n        saved.path);\n    return (\n      canonicalId &&\n        ((manifest.supabaseMediaId = canonicalId),\n        (manifest.canonicalMediaId = canonicalId)),\n      canonicalObjectKey &&\n        ((manifest.path = canonicalObjectKey),\n        (manifest.objectKey = canonicalObjectKey),\n        (manifest.wasabiObjectKey = canonicalObjectKey)),\n      saved &&\n        ((manifest.processingStatus =\n          saved.processingStatus || saved.processing_status || manifest.processingStatus || \"\"),\n        (manifest.processingDecision =\n          saved.processingDecision || saved.processing_decision || \"\"),\n        (manifest.posterReady = saved.posterReady === !0 || saved.poster_ready === !0),\n        (manifest.playbackDerivativeReady =\n          saved.playbackDerivativeReady === !0 || saved.playback_derivative_ready === !0)),\n      manifest\n    );\n  }\n  function socialDraftDescriptor(form) {\n    if (!form || !form.matches) return null;\n    var kind = \"\",\n      target = \"new\";\n    if (form.matches(\"[data-dsd-story-form]\")) kind = \"story\";\n    else if (form.matches(\"[data-dsd-comment-form]\")) {\n      kind = form.getAttribute(\"data-parent-comment-id\") ? \"reply\" : \"comment\";\n      target =\n        String(form.getAttribute(\"data-post-id\") || \"\").trim() +\n        (kind === \"reply\"\n          ? \":\" + String(form.getAttribute(\"data-parent-comment-id\") || \"\").trim()\n          : \"\");\n    } else if (form.matches(\"[data-dsd-share-composer]\")) {\n      kind = \"share\";\n      target = String(form.getAttribute(\"data-original-post-id\") || \"\").trim();\n    } else if (form.matches(\"[data-dsd-message-drawer-form]\")) {\n      kind = \"message\";\n      target = String(\n        ((qs('[name=\"conversationId\"]', form) || {}).value ||\n          (qs('[name=\"recipientProfileKey\"]', form) || {}).value ||\n          (qs('[name=\"recipientUid\"]', form) || {}).value ||\n          \"new\"),\n      ).trim();\n    } else if (\n      form.matches(\"[data-dsd-canonical-composer], [data-dsd-global-post-composer]\")\n    )\n      kind = \"post\";\n    if (!kind) return null;\n    var actor = String(activeOwnerProfileKey() || profileKey() || \"\").trim();\n    if (!actor) return null;\n    return {\n      actor: actor,\n      kind: kind,\n      target: target || \"new\",\n      key:\n        \"dsd:social-draft:v1:\" +\n        encodeURIComponent(actor) +\n        \":\" +\n        kind +\n        \":\" +\n        encodeURIComponent(target || \"new\"),\n    };\n  }\n  function readSocialDraft(form) {\n    var descriptor = socialDraftDescriptor(form);\n    if (!descriptor) return null;\n    try {\n      var draft = JSON.parse(window.localStorage.getItem(descriptor.key) || \"null\");\n      return draft && draft.actor === descriptor.actor ? draft : null;\n    } catch (error) {\n      return null;\n    }\n  }\n  function clearSocialDraft(form) {\n    var descriptor = socialDraftDescriptor(form);\n    if (!descriptor) return;\n    try {\n      window.localStorage.removeItem(descriptor.key);\n    } catch (error) {}\n    var notice = qs(\"[data-dsd-draft-recovery]\", form);\n    notice && notice.remove();\n  }\n  function clearSocialDraftsForActor(actorKey) {\n    var actor = String(actorKey || \"\").trim(),\n      prefix = actor\n        ? \"dsd:social-draft:v1:\" + encodeURIComponent(actor) + \":\"\n        : \"\",\n      removed = 0,\n      index,\n      key;\n    if (!prefix || !window.localStorage) return 0;\n    try {\n      for (index = window.localStorage.length - 1; index >= 0; index -= 1) {\n        key = String(window.localStorage.key(index) || \"\");\n        if (key.indexOf(prefix) !== 0) continue;\n        window.localStorage.removeItem(key);\n        removed += 1;\n      }\n    } catch (error) {}\n    return removed;\n  }\n  function persistSocialDraft(form) {\n    var descriptor = socialDraftDescriptor(form),\n      bodyField = form && qs('[name=\"body\"]', form),\n      body = String((bodyField && bodyField.value) || \"\");\n    if (!descriptor) return;\n    if (!body.trim()) {\n      clearSocialDraft(form);\n      return;\n    }\n    var visibilityField = qs('[name=\"visibility\"]', form);\n    try {\n      window.localStorage.setItem(\n        descriptor.key,\n        JSON.stringify({\n          actor: descriptor.actor,\n          kind: descriptor.kind,\n          target: descriptor.target,\n          body: body,\n          visibility: String((visibilityField && visibilityField.value) || \"\"),\n          savedAt: Date.now(),\n        }),\n      );\n    } catch (error) {}\n  }\n  function offerSocialDraftRecovery(form) {\n    if (!form) return;\n    var existing = qs(\"[data-dsd-draft-recovery]\", form),\n      draft = readSocialDraft(form),\n      bodyField = qs('[name=\"body\"]', form);\n    if (existing) {\n      if (!draft) existing.remove();\n      else return;\n    }\n    if (!draft || !String(draft.body || \"\").trim() || (bodyField && bodyField.value))\n      return;\n    var notice = document.createElement(\"div\");\n    notice.className = \"dsd-draft-recovery\";\n    notice.setAttribute(\"data-dsd-draft-recovery\", \"true\");\n    notice.setAttribute(\"role\", \"status\");\n    notice.innerHTML =\n      '<span>Unsent ' +\n      html(draft.kind) +\n      ' draft available.</span><span class=\"dsd-draft-recovery__actions\"><button type=\"button\" data-dsd-restore-draft>Restore draft</button><button type=\"button\" data-dsd-discard-draft>Discard</button></span>';\n    form.insertBefore(notice, form.firstChild);\n  }\n  function bindSocialDraftRecovery(form) {\n    if (!form || form.dataset.dsdDraftRecoveryBound === \"true\") {\n      form && offerSocialDraftRecovery(form);\n      return;\n    }\n    form.dataset.dsdDraftRecoveryBound = \"true\";\n    form.addEventListener(\"input\", function () {\n      var descriptor = socialDraftDescriptor(form);\n      if (!descriptor) return;\n      state.draftTimersByKey[descriptor.key] &&\n        window.clearTimeout(state.draftTimersByKey[descriptor.key]);\n      state.draftTimersByKey[descriptor.key] = window.setTimeout(function () {\n        delete state.draftTimersByKey[descriptor.key];\n        persistSocialDraft(form);\n      }, 250);\n    });\n    form.addEventListener(\"change\", function () {\n      persistSocialDraft(form);\n    });\n    offerSocialDraftRecovery(form);\n  }\n  function refreshCanonicalMediaId(manifest) {\r\n    return !manifest || manifest.canonicalMediaId\r\n      ? Promise.resolve(manifest)\r\n      : getDoc(\"mediaManifests/\" + manifest.mediaId)\r\n          .then(function (snap) {\r\n            var data =\r\n              snap && snap.exists && snap.exists() ? snap.data() : null;\r\n            return (applyCanonicalMediaId(manifest, data), manifest);\r\n          })\r\n          .catch(function (error) {\r\n            return (\r\n              claim(\"media-manifest:uuid-readback-blocked\", {\r\n                mediaId: manifest && manifest.mediaId,\r\n                error: (error && error.message) || String(error),\r\n              }),\r\n              manifest\r\n            );\r\n          });\r\n  }\r\n  function repairOwnedOrphanMediaParents() {\r\n    var key = activeProfileKeyValue();\r\n    return (\r\n      key &&\r\n        state.orphanMediaParentRepairCompleteFor !== key &&\r\n        ((state.orphanMediaParentRepairCompleteFor = key),\r\n        claim(\"orphan-media-parent-repair:runtime-deconstructed\", {\r\n          ownerProfileKey: key,\r\n          canonical: \"admin-migration-only\",\r\n          reason:\r\n            \"route hydration must not mutate post/story parent rows or queue RLS repair drafts\",\r\n          build: BUILD,\r\n        })),\r\n      Promise.resolve([])\r\n    );\r\n  }\r\n  function profileManifestMediaId(manifest) {\r\n    manifest = manifest || {};\r\n    for (\r\n      var canonicalCandidates = [\r\n          manifest.canonicalMediaId,\r\n          manifest.supabaseMediaId,\r\n          manifest.supabase_media_id,\r\n          manifest.mediaObjectId,\r\n          manifest.media_object_id,\r\n          manifest.id,\r\n        ],\r\n        i = 0;\r\n      i < canonicalCandidates.length;\r\n      i += 1\r\n    )\r\n      if (mediaIdLooksLikeUuid(canonicalCandidates[i]))\r\n        return String(canonicalCandidates[i]).trim();\r\n    return (\r\n      readableProfileMediaId(manifest) ||\r\n      manifest.mediaId ||\r\n      manifest.legacyMediaId ||\r\n      manifest.legacy_media_id ||\r\n      manifest.objectKey ||\r\n      manifest.wasabiObjectKey ||\r\n      manifest.path ||\r\n      \"\"\r\n    );\r\n  }\r\n  function resolveProfileMediaManifestUuid(manifest, attempt) {\r\n    if (((attempt = attempt || 0), !manifest)) return Promise.resolve(\"\");\r\n    var existing = profileManifestMediaId(manifest);\r\n    return mediaIdLooksLikeUuid(existing)\r\n      ? Promise.resolve(existing)\r\n      : resolveSupabaseMediaUuid(manifest)\r\n          .then(function (uuid) {\r\n            return mediaIdLooksLikeUuid(uuid)\r\n              ? uuid\r\n              : attempt >= 4\r\n                ? \"\"\r\n                : (claim(\"profile-media:uuid-readback-retry\", {\r\n                    mediaId:\r\n                      manifest.mediaId ||\r\n                      manifest.legacyMediaId ||\r\n                      manifest.path ||\r\n                      \"\",\r\n                    attempt: attempt + 1,\r\n                    canonical: \"media_objects.id\",\r\n                  }),\r\n                  wait([250, 700, 1400, 2400][attempt] || 2400).then(\r\n                    function () {\r\n                      return resolveProfileMediaManifestUuid(\r\n                        manifest,\r\n                        attempt + 1,\r\n                      );\r\n                    },\r\n                  ));\r\n          })\r\n          .catch(function (error) {\r\n            return (\r\n              claim(\"profile-media:uuid-readback-blocked\", {\r\n                mediaId:\r\n                  manifest.mediaId ||\r\n                  manifest.legacyMediaId ||\r\n                  manifest.path ||\r\n                  \"\",\r\n                error: (error && error.message) || String(error),\r\n              }),\r\n              \"\"\r\n            );\r\n          });\r\n  }\r\n  function durableMediaId(media) {\r\n    return (\r\n      (media = media || {}),\r\n      media.canonicalMediaId ||\r\n        media.supabaseMediaId ||\r\n        media.supabase_media_id ||\r\n        media.mediaObjectId ||\r\n        media.media_object_id ||\r\n        media.id ||\r\n        media.mediaId ||\r\n        media.legacyMediaId ||\r\n        media.legacy_media_id ||\r\n        \"\"\r\n    );\r\n  }\r\n  function uuidLike(value) {\r\n    return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(\r\n      String(value || \"\").trim(),\r\n    );\r\n  }\r\n  function wait(ms) {\r\n    return new Promise(function (resolve) {\r\n      window.setTimeout(resolve, ms || 0);\r\n    });\r\n  }\r\n  function assignCanonicalMediaUuid(media, uuid) {\r\n    return (\r\n      !media ||\r\n        !uuidLike(uuid) ||\r\n        ((media.supabaseMediaId = uuid),\r\n        (media.supabase_media_id = uuid),\r\n        (media.canonicalMediaId = uuid),\r\n        (media.mediaObjectId = uuid),\r\n        (media.media_object_id = uuid)),\r\n      media\r\n    );\r\n  }\r\n  function legacyMediaId(media) {\r\n    media = media || {};\r\n    for (\r\n      var values = [\r\n          media.legacyMediaId,\r\n          media.legacy_media_id,\r\n          media.mediaId,\r\n          media.media_id,\r\n          media.id,\r\n        ],\r\n        i = 0;\r\n      i < values.length;\r\n      i += 1\r\n    ) {\r\n      var value = String(values[i] || \"\").trim();\r\n      if (value && !uuidLike(value)) return value;\r\n    }\r\n    return \"\";\r\n  }\r\n  function mediaObjectKey(media) {\r\n    media = media || {};\r\n    var value = String(\r\n      media.wasabiObjectKey ||\r\n        media.wasabi_object_key ||\r\n        media.objectKey ||\r\n        media.object_key ||\r\n        media.path ||\r\n        \"\",\r\n    ).trim();\r\n    return value && !uuidLike(value) ? value : \"\";\r\n  }\r\n  function resolveSupabaseMediaUuid(media) {\r\n    var existing = durableMediaId(media);\r\n    if (uuidLike(existing))\r\n      return (\r\n        assignCanonicalMediaUuid(media, existing),\r\n        Promise.resolve(existing)\r\n      );\r\n    var adapter = supabaseAdapter();\r\n    if (!adapter || typeof adapter.read != \"function\")\r\n      return Promise.resolve(\"\");\r\n    var legacy = legacyMediaId(media);\n    function readBy(field, value) {\r\n      if (!value) return Promise.resolve(\"\");\r\n      var query = { select: \"id,legacy_media_id\", limit: 1 };\n      return (\r\n        (query[field] = \"eq.\" + value),\r\n        adapter\r\n          .read(\"media_objects\", query, { force: !0 })\r\n          .then(function (rows) {\r\n            return (rows && rows[0] && rows[0].id) || \"\";\r\n          })\r\n      );\r\n    }\r\n    return readBy(\"legacy_media_id\", legacy)\n      .then(function (uuid) {\n        return (\r\n          uuidLike(uuid) && assignCanonicalMediaUuid(media, uuid),\r\n          uuidLike(uuid) ? uuid : \"\"\r\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          claim(\"media-relationship-sync:media-readback-blocked\", {\n            mediaId: legacy,\n            error: (error && error.message) || String(error),\r\n          }),\r\n          \"\"\r\n        );\r\n      });\r\n  }\r\n  function resolveSupabaseMessageMediaUuid(media, message, savedMessage) {\r\n    return resolveSupabaseMediaUuid(media)\r\n      .then(function (uuid) {\r\n        if (uuidLike(uuid)) return uuid;\r\n        var adapter = supabaseAdapter(),\r\n          legacyMessage = legacyMessageId(message, savedMessage);\r\n        if (!adapter || typeof adapter.read != \"function\" || !legacyMessage)\r\n          return \"\";\r\n        var query = {\r\n            select:\n              \"id,legacy_media_id,file_name,content_type,created_at\",\n            surface: \"eq.message\",\r\n            surface_id: \"eq.\" + legacyMessage,\r\n            status: \"in.(uploaded,approved)\",\r\n            order: \"created_at.desc\",\r\n            limit: 10,\r\n          },\r\n          wantedLegacy = legacyMediaId(media),\n          wantedName = String(\r\n            (media && (media.fileName || media.file_name || media.name)) || \"\",\r\n          ).trim();\r\n        return adapter\r\n          .read(\"media_objects\", query, { force: !0 })\r\n          .then(function (rows) {\r\n            rows = rows || [];\r\n            var match =\r\n                rows.filter(function (row) {\r\n                  return row\r\n                    ? (wantedLegacy && row.legacy_media_id === wantedLegacy) ||\n                      (wantedName && row.file_name === wantedName)\n                      ? !0\n                      : !wantedLegacy && !wantedName\n                    : !1;\r\n                })[0] ||\r\n                rows[0] ||\r\n                null,\r\n              resolved = (match && match.id) || \"\";\r\n            return (\r\n              uuidLike(resolved) && assignCanonicalMediaUuid(media, resolved),\r\n              uuidLike(resolved) ? resolved : \"\"\r\n            );\r\n          });\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          claim(\"message-media-relationship-sync:surface-readback-blocked\", {\r\n            messageId: legacyMessageId(message, savedMessage),\r\n            error: (error && error.message) || String(error),\r\n          }),\r\n          \"\"\r\n        );\r\n      });\r\n  }\r\n  function readableMediaId(media) {\r\n    media = media || {};\r\n    var durable = durableMediaId(media);\r\n    if (durable) return durable;\r\n    var legacy = media.legacyMediaId || media.legacy_media_id || \"\";\r\n    if (legacy) return legacy;\r\n    var display =\r\n      media.displayMediaId ||\r\n      media.display_media_id ||\r\n      media.wasabiObjectKey ||\r\n      media.wasabi_object_key ||\r\n      media.objectKey ||\r\n      media.object_key ||\r\n      media.path ||\r\n      \"\";\r\n    if (display && !uuidLike(display)) return display;\r\n    var mediaId = media.mediaId || \"\";\r\n    if (mediaId && !uuidLike(mediaId)) return mediaId;\r\n    var id = media.id || \"\";\r\n    return id && !uuidLike(id) ? id : \"\";\r\n  }\r\n  function alternateMediaId(media, primary) {\r\n    ((media = media || {}), (primary = String(primary || \"\").trim()));\r\n    var fallbacks = mediaFallbackIds(media, primary);\r\n    return fallbacks[0] || \"\";\r\n  }\r\n  function mediaFallbackIds(media, primary) {\r\n    ((media = media || {}), (primary = String(primary || \"\").trim()));\r\n    for (\r\n      var candidates = [\r\n          media.legacyMediaId,\r\n          media.legacy_media_id,\r\n          media.mediaId,\r\n          media.media_id,\r\n          media.id,\r\n          media.canonicalMediaId,\r\n          media.supabaseMediaId,\r\n          media.supabase_media_id,\r\n          media.mediaObjectId,\r\n          media.media_object_id,\r\n        ],\r\n        out = [],\r\n        i = 0;\r\n      i < candidates.length;\r\n      i += 1\r\n    ) {\r\n      var value = String(candidates[i] || \"\").trim();\r\n      (primary && !uuidLike(primary) && uuidLike(value)) ||\r\n        (value &&\r\n          value !== primary &&\r\n          out.indexOf(value) === -1 &&\r\n          out.push(value));\r\n    }\r\n    return out;\r\n  }\r\n  function mediaReadAttrs(media) {\n    var primary = readableMediaId(media);\n    if (!primary) return \"\";\n    var fallbacks = mediaFallbackIds(media, primary).slice(0, 4),\n      contentType = String(\n        media.contentType || media.content_type || media.mimeType || media.mime_type || \"\",\n      ).toLowerCase(),\n      fileName = String(\n        media.fileName || media.file_name || media.objectKey || media.object_key || media.path || \"\",\n      ).toLowerCase(),\n      animatedGif = contentType === \"image/gif\" || /\\.gif(?:$|[?#])/i.test(fileName),\n      attrs =\n        ' data-dsd-media-id=\"' +\n        html(primary) +\n        '\" data-dsd-public-media-fallback-deconstructed=\"' +\n        html(BUILD) +\n        '\"';\n    return (\n      contentType &&\n        (attrs += ' data-dsd-media-content-type=\"' + html(contentType) + '\"'),\n      media.posterReady === !0 &&\n        (attrs += ' data-dsd-media-poster-ready=\"true\"'),\n      media.playbackDerivativeReady === !0 &&\n        (attrs += ' data-dsd-media-playback-ready=\"true\"'),\n      animatedGif &&\n        (attrs += ' data-dsd-media-animation=\"gif\"'),\n      fallbacks.length &&\n        (attrs +=\r\n          ' data-dsd-media-alt-id=\"' +\r\n          html(fallbacks[0]) +\r\n          '\" data-dsd-media-fallback-ids=\"' +\r\n          html(fallbacks.join(\"|\")) +\r\n          '\"'),\r\n      attrs\r\n    );\r\n  }\r\n  function mediaSignatureId(media) {\r\n    return (\r\n      (media = media || {}),\r\n      durableMediaId(media) || media.mediaId || media.id || \"\"\r\n    );\r\n  }\r\n  function mediaUploadSignerPayload(manifest, extra) {\r\n    var signerPath =\r\n        manifest.signerPath || manifest.signerObjectKey || manifest.path,\r\n      signerObjectKey =\r\n        manifest.signerObjectKey ||\r\n        manifest.signerPath ||\r\n        manifest.objectKey ||\r\n        manifest.path;\r\n    return Object.assign(\r\n      {\r\n        mediaId: manifest.mediaId,\r\n        legacyMediaId: manifest.mediaId,\r\n        canonicalMediaId:\r\n          manifest.canonicalMediaId || manifest.supabaseMediaId || \"\",\r\n        supabaseMediaId:\r\n          manifest.supabaseMediaId || manifest.canonicalMediaId || \"\",\r\n        path: signerPath,\r\n        objectKey: signerObjectKey,\r\n        wasabiObjectKey: signerObjectKey,\r\n        fileName: manifest.fileName,\r\n        contentType: manifest.contentType,\r\n        mimeType: manifest.contentType,\r\n        bytes: manifest.bytes,\r\n        size: manifest.bytes,\r\n        ownerUid: manifest.ownerUid,\r\n        ownerProfileKey: manifest.ownerProfileKey,\r\n        surface: manifest.signerSurface || manifest.surface,\r\n        surfaceId: manifest.signerSurfaceId || manifest.surfaceId,\r\n        slot: manifest.signerSlot || manifest.slot,\r\n        kind: manifest.kind,\r\n        visibility: manifest.visibility,\r\n        contentRating: manifest.contentRating,\r\n      },\r\n      extra || {},\r\n    );\r\n  }\r\n  function requestMediaUploadTicket(manifest, extra) {\r\n    return fetch(\"/apps/dsd-firebase-custom-token/wasabi/sign-upload\", {\r\n      method: \"POST\",\r\n      credentials: \"include\",\r\n      headers: { \"Content-Type\": \"application/json\" },\r\n      body: JSON.stringify(mediaUploadSignerPayload(manifest, extra)),\r\n    }).then(function (res) {\r\n      return res.ok\r\n        ? res.json()\r\n        : res.text().then(function (text) {\r\n            var detail = \"\";\r\n            try {\r\n              var parsed = text ? JSON.parse(text) : null;\r\n              detail =\r\n                parsed && (parsed.error || parsed.message || parsed.code)\r\n                  ? \": \" + (parsed.error || parsed.message || parsed.code)\r\n                  : \"\";\r\n            } catch (e) {\r\n              detail = text ? \": \" + String(text).slice(0, 120) : \"\";\r\n            }\r\n            throw new Error(\"Upload could not start: \" + res.status + detail);\r\n          });\r\n    });\r\n  }\r\n  function multipartCheckpointKey(manifest) {\r\n    return \"dsd:media-upload:v2:\" + encodeURIComponent(String(manifest.mediaId || \"\"));\r\n  }\r\n  function readMultipartCheckpoint(manifest) {\r\n    try {\r\n      var value = JSON.parse(\r\n        window.localStorage.getItem(multipartCheckpointKey(manifest)) || \"null\",\r\n      );\r\n      return value &&\r\n        value.uploadId &&\r\n        value.objectKey === String(manifest.objectKey || manifest.path || \"\") &&\r\n        Number(value.bytes || 0) === Number(manifest.bytes || 0)\r\n        ? value\r\n        : null;\r\n    } catch (error) {\r\n      return null;\r\n    }\r\n  }\r\n  function writeMultipartCheckpoint(manifest, checkpoint) {\r\n    try {\r\n      checkpoint\r\n        ? window.localStorage.setItem(\r\n            multipartCheckpointKey(manifest),\r\n            JSON.stringify(checkpoint),\r\n          )\r\n        : window.localStorage.removeItem(multipartCheckpointKey(manifest));\r\n    } catch (error) {}\r\n  }\r\n  function waitForUploadRetry(delay) {\r\n    return new Promise(function (resolve) {\r\n      window.setTimeout(resolve, delay);\r\n    });\r\n  }\r\n  function uploadMultipartMedia(ticket, file, manifest) {\r\n    var partSize = Math.max(8 * 1024 * 1024, Number(ticket.partSize || 0) || 16 * 1024 * 1024),\r\n      checkpoint = readMultipartCheckpoint(manifest) || {\r\n        uploadId: ticket.uploadId,\r\n        objectKey: String(manifest.objectKey || manifest.path || \"\"),\r\n        bytes: Number(file.size || 0),\r\n        partSize: partSize,\r\n        parts: [],\r\n        updatedAt: Date.now(),\r\n      },\r\n      uploadId = checkpoint.uploadId || ticket.uploadId,\r\n      completedByPart = {};\r\n    (checkpoint.parts || []).forEach(function (part) {\r\n      part && part.partNumber && part.etag && (completedByPart[part.partNumber] = part);\r\n    });\r\n    if (!uploadId) return Promise.reject(new Error(\"Multipart upload could not start.\"));\r\n    checkpoint.uploadId = uploadId;\r\n    checkpoint.partSize = partSize;\r\n    writeMultipartCheckpoint(manifest, checkpoint);\r\n    var totalParts = Math.ceil(file.size / partSize),\r\n      sequence = Promise.resolve();\r\n    Array.from({ length: totalParts }).forEach(function (_, index) {\r\n      var partNumber = index + 1;\r\n      sequence = sequence.then(function () {\r\n        if (completedByPart[partNumber]) {\r\n          setUploadProgress(\r\n            manifest,\r\n            Math.round((partNumber / totalParts) * 100),\r\n            \"Resuming media upload...\",\r\n          );\r\n          return null;\r\n        }\r\n        var start = index * partSize,\r\n          end = Math.min(file.size, start + partSize),\r\n          blob = file.slice(start, end),\r\n          attempt = 0;\r\n        function uploadPart() {\r\n          attempt += 1;\r\n          return requestMediaUploadTicket(manifest, {\r\n            action: \"multipart-part\",\r\n            uploadId: uploadId,\r\n            partNumber: partNumber,\r\n          })\r\n            .then(function (partTicket) {\r\n              return uploadWithProgress(\r\n                partTicket.uploadUrl,\r\n                partTicket.method || \"PUT\",\r\n                partTicket.headers || {},\r\n                blob,\r\n                manifest,\r\n                { baseBytes: start, totalBytes: file.size },\r\n              );\r\n            })\r\n            .then(function (result) {\r\n              if (!result.ok) throw new Error(\"Upload part failed: \" + result.status);\r\n              if (!result.etag)\r\n                throw new Error(\r\n                  \"Upload part receipt was unavailable. Wasabi CORS must expose ETag.\",\r\n                );\r\n              var completed = { partNumber: partNumber, etag: result.etag };\r\n              completedByPart[partNumber] = completed;\r\n              checkpoint.parts = Object.keys(completedByPart)\r\n                .map(function (key) { return completedByPart[key]; })\r\n                .sort(function (left, right) { return left.partNumber - right.partNumber; });\r\n              checkpoint.updatedAt = Date.now();\r\n              writeMultipartCheckpoint(manifest, checkpoint);\r\n              return completed;\r\n            })\r\n            .catch(function (error) {\r\n              if (attempt >= 3) throw error;\r\n              renderStatus(\"Upload interrupted. Retrying part \" + partNumber + \"...\");\r\n              return waitForUploadRetry(attempt * 1200).then(uploadPart);\r\n            });\r\n        }\r\n        return uploadPart();\r\n      });\r\n    });\r\n    return sequence\r\n      .then(function () {\r\n        return requestMediaUploadTicket(manifest, {\r\n          action: \"multipart-complete\",\r\n          uploadId: uploadId,\r\n          parts: Object.keys(completedByPart)\r\n            .map(function (key) { return completedByPart[key]; })\r\n            .sort(function (left, right) { return left.partNumber - right.partNumber; }),\r\n        });\r\n      })\r\n      .then(function (result) {\r\n        writeMultipartCheckpoint(manifest, null);\r\n        return { ok: result && result.ok === !0, status: result && result.ok ? 200 : 502 };\r\n      });\r\n  }\r\n  function uploadWasabiMedia(manifest, file) {\n    if (!manifest || !file) return Promise.resolve(manifest);\r\n    var appleTouch =\r\n        /iPhone|iPad|iPod/i.test(String(navigator.userAgent || \"\")) ||\r\n        (String(navigator.platform || \"\") === \"MacIntel\" &&\r\n          Number(navigator.maxTouchPoints || 0) > 1),\r\n      checkpoint = readMultipartCheckpoint(manifest);\r\n    return (\r\n      renderStatus(\"Signing secure media upload...\"),\r\n      (checkpoint\r\n        ? Promise.resolve({\r\n            uploadMode: \"multipart\",\r\n            uploadId: checkpoint.uploadId,\r\n            partSize: checkpoint.partSize,\r\n          })\r\n        : requestMediaUploadTicket(manifest, {\r\n            preferredUploadMode:\r\n              appleTouch || Number(file.size || 0) >= 96 * 1024 * 1024\r\n                ? \"multipart\"\r\n                : \"single-put\",\r\n          }))\r\n        .then(function (ticket) {\r\n          if (\r\n            !ticket ||\r\n            (ticket.uploadMode === \"multipart\"\r\n              ? !ticket.uploadId\r\n              : !ticket.uploadUrl)\r\n          )\r\n            throw new Error(\"Upload could not start.\");\r\n          var headers = Object.assign(\r\n            { \"Content-Type\": manifest.contentType },\r\n            ticket.headers || {},\r\n          );\r\n          return (\r\n            renderStatus(\r\n              \"Uploading \" +\r\n                (manifest.kind === \"video\" ? \"video\" : \"media\") +\r\n                \"...\",\r\n            ),\r\n            (ticket.uploadMode === \"multipart\"\r\n              ? uploadMultipartMedia(ticket, file, manifest)\r\n              : uploadWithProgress(\r\n                  ticket.uploadUrl,\r\n                  ticket.method || \"PUT\",\r\n                  headers,\r\n                  file,\r\n                  manifest,\r\n                )).then(function (uploadRes) {\r\n              if (!uploadRes.ok)\r\n                throw new Error(\"Upload failed: \" + uploadRes.status);\r\n              return (\r\n                (manifest.status = \"uploaded\"),\r\n                (manifest.uploadedAt = now()),\r\n                (manifest.signedUploadExpiresAt = ticket.expiresAt || \"\"),\r\n                (manifest.path =\r\n                  ticket.path ||\r\n                  ticket.objectKey ||\r\n                  ticket.wasabiObjectKey ||\r\n                  manifest.path),\r\n                (manifest.objectKey =\r\n                  ticket.objectKey || ticket.wasabiObjectKey || manifest.path),\r\n                (manifest.wasabiObjectKey = manifest.objectKey),\r\n                (manifest.updatedAt = now()),\r\n                manifest.kind === \"video\" && renderStatus(\"Processing video...\"),\n                manifest.kind !== \"video\" && renderStatus(\"Validating media...\"),\n                (supabaseCutoverReady()\n                  ? saveMediaManifestViaProxy(Object.assign({}, manifest))\r\n                  : setDoc(\r\n                      \"mediaManifests/\" + manifest.mediaId,\r\n                      Object.assign({}, manifest),\r\n                      !0,\r\n                    )\r\n                )\r\n                  .then(function (saved) {\n                    applyCanonicalMediaId(manifest, saved);\n                    if (\n                      manifest.processingStatus !== \"ready\" &&\n                      manifest.kind !== \"video\"\n                    )\n                      throw new Error(\n                        \"Media validation did not complete. No content was published.\",\n                      );\n                    if (\n                      manifest.kind === \"video\" &&\n                      manifest.processingStatus !== \"ready\"\n                    ) {\n                      // The Cloud Tasks processor owns transcoding after the verified\n                      // Wasabi receipt. Parent publication must not depend on a tab\n                      // remaining active for the full processing window.\n                      manifest.processingRecoveryAttempted = !0;\n                      manifest.processingPending = !0;\n                      renderStatus(\n                        \"Video uploaded. Processing continues after publishing.\",\n                      );\n                    }\n                    return manifest;\n                  })\n                  .then(function () {\n                    return writeMediaSignerShadow(manifest.mediaId, manifest);\n                  })\n                  .then(function () {\r\n                    return refreshCanonicalMediaId(manifest).then(function () {\r\n                      return (renderStatus(\"Media saved.\"), manifest);\r\n                    });\r\n                  })\r\n              );\r\n            })\r\n          );\r\n        })\n        .catch(function (error) {\n          var binaryUploaded = manifest.status === \"uploaded\";\n          ((manifest.uploadError = (error && error.message) || String(error)),\n            (manifest.uploadBlockedAt = now()),\n            (manifest.updatedAt = now()));\n          if (binaryUploaded) {\n            if (\n              manifest.kind === \"video\" &&\n              !manifest.processingRecoveryAttempted\n            ) {\n              return waitForMediaProcessingReady(manifest)\n                .then(function () {\n                  return writeMediaSignerShadow(manifest.mediaId, manifest);\n                })\n                .then(function () {\n                  return refreshCanonicalMediaId(manifest);\n                })\n                .then(function () {\n                  renderStatus(\"Media saved.\");\n                  return manifest;\n                });\n            }\n            renderStatus(\n              manifest.uploadError ||\n                (manifest.kind === \"video\"\n                  ? \"Video processing is still finishing. No Story was published; retry after processing completes.\"\n                  : \"Media validation did not complete.\"),\n            );\n            throw error;\n          }\n          manifest.status = \"upload_cancelled\";\n          var signerManifestMissing = /media_manifest_missing/i.test(\n            manifest.uploadError || \"\",\n          );\n          return (\r\n            (supabaseCutoverReady()\r\n              ? saveMediaManifestViaProxy(Object.assign({}, manifest))\r\n              : setDoc(\r\n                  \"mediaManifests/\" + manifest.mediaId,\r\n                  Object.assign({}, manifest),\r\n                  !0,\r\n                )\r\n            ).catch(function () {}),\r\n            renderStatus(\n              signerManifestMissing\n                ? \"Media upload is blocked because the Wasabi signer cannot read the media manifest. Existing media was kept.\"\n                : \"Media upload stopped. Retry from the composer.\",\n            ),\n            manifest\r\n          );\r\n        })\r\n    );\r\n  }\r\n  var activeCanonicalMediaUploadCount = 0,\r\n    activeComposerMutationForm = null,\r\n    activeComposerMutationId = \"\",\r\n    composerMutationSequence = 0;\r\n  function composerPublicationStorageKey(form, prefix) {\r\n    var descriptor = composerMediaFormDescriptor(form) || {},\r\n      actor = normalizedProfileKeyValue(\r\n        activeOwnerProfileKey() || activeProfileKeyValue() || profileKey(),\r\n      );\r\n    return (\r\n      \"dsd:pending-publication:v1:\" +\r\n      encodeURIComponent(\r\n        [actor || \"anonymous\", prefix || \"publication\", descriptor.selector || \"form\", descriptor.context || \"root\"].join(\":\"),\r\n      )\r\n    );\r\n  }\r\n  function canonicalComposerPublicationId(form, prefix) {\r\n    if (!form) return \"\";\r\n    var existing = String(form.dataset.dsdPendingPublicationId || \"\").trim(),\r\n      storageKey = composerPublicationStorageKey(form, prefix);\r\n    if (!existing)\r\n      try {\r\n        existing = String(window.sessionStorage.getItem(storageKey) || \"\").trim();\r\n      } catch (error) {}\r\n    if (!existing)\r\n      existing = clean(\r\n        String(prefix || \"publication\") +\r\n          \"-\" +\r\n          Date.now() +\r\n          \"-\" +\r\n          Math.random().toString(36).slice(2, 8),\r\n        String(prefix || \"publication\"),\r\n      );\r\n    form.dataset.dsdPendingPublicationId = existing;\r\n    try {\r\n      window.sessionStorage.setItem(storageKey, existing);\r\n    } catch (error) {}\r\n    return existing;\r\n  }\r\n  function clearCanonicalComposerPublicationId(form, prefix) {\r\n    if (!form) return;\r\n    var storageKey = composerPublicationStorageKey(form, prefix);\r\n    delete form.dataset.dsdPendingPublicationId;\r\n    try {\r\n      window.sessionStorage.removeItem(storageKey);\r\n    } catch (error) {}\r\n  }\r\n  function setUploadProgress(manifest, percent, message) {\r\n    var value = Math.max(0, Math.min(100, Number(percent || 0))),\r\n      text = message || \"Uploading media...\",\r\n      scopedComposer =\r\n        activeComposerMutationForm &&\r\n        document.documentElement.contains(activeComposerMutationForm)\r\n          ? activeComposerMutationForm\r\n          : null,\r\n      statusScope = scopedComposer || document;\r\n    if (manifest && manifest.__dsdUploadBatch) {\r\n      var batch = manifest.__dsdUploadBatch,\r\n        itemIndex = Math.max(0, Number(batch.index || 0)),\r\n        itemTotal = Math.max(1, Number(batch.total || 1));\r\n      value = Math.max(\r\n        0,\r\n        Math.min(100, Math.round(((itemIndex + value / 100) / itemTotal) * 100)),\r\n      );\r\n      text =\r\n        \"Uploading media \" +\r\n        (itemIndex + 1) +\r\n        \" of \" +\r\n        itemTotal +\r\n        \"...\";\r\n    }\r\n    (qsa(\r\n      scopedComposer\r\n        ? \"[data-dsd-upload-status]\"\r\n        : \"[data-dsd-activation-status]\",\r\n      statusScope,\r\n    ).forEach(\r\n      function (status) {\r\n        status.closest(\"form\") &&\r\n          (status.innerHTML =\r\n            \"<span>\" +\r\n            html(text) +\r\n            '</span><progress class=\"dsd-upload-progress\" max=\"100\" value=\"' +\r\n            value +\r\n            '\">' +\r\n            value +\r\n            \"%</progress>\");\r\n      },\r\n    ),\r\n      document.documentElement.setAttribute(\r\n        \"data-dsd-upload-progress\",\r\n        String(Math.round(value)),\r\n      ),\r\n      manifest &&\r\n        manifest.mediaId &&\r\n        document.documentElement.setAttribute(\r\n          \"data-dsd-upload-media-id\",\r\n          manifest.mediaId,\r\n        ));\r\n  }\r\n  function uploadWithProgress(url, method, headers, file, manifest, progressWindow) {\r\n    return new Promise(function (resolve, reject) {\r\n      var xhr = new XMLHttpRequest(),\r\n        settled = !1,\r\n        uploadTimeoutMs =\r\n          manifest &&\r\n          manifest.kind === \"video\" &&\r\n          Number(manifest.bytes || 0) > 600 * 1024 * 1024\r\n            ? 4 * 60 * 60 * 1000\r\n            : manifest && manifest.kind === \"video\"\r\n              ? 60 * 60 * 1000\r\n              : 5 * 60 * 1000;\r\n      function finish(callback, value) {\r\n        if (settled) return;\r\n        settled = !0;\r\n        activeCanonicalMediaUploadCount = Math.max(\r\n          0,\r\n          activeCanonicalMediaUploadCount - 1,\r\n        );\r\n        document.documentElement.setAttribute(\r\n          \"data-dsd-active-media-uploads\",\r\n          String(activeCanonicalMediaUploadCount),\r\n        );\r\n        callback(value);\r\n      }\r\n      (xhr.open(method || \"PUT\", url, !0),\r\n        (xhr.timeout = uploadTimeoutMs),\r\n        Object.keys(headers || {}).forEach(function (key) {\r\n          try {\r\n            xhr.setRequestHeader(key, headers[key]);\r\n          } catch (e) {}\r\n        }),\r\n        (xhr.upload.onprogress = function (event) {\r\n          var baseBytes = Number(progressWindow && progressWindow.baseBytes || 0),\r\n            totalBytes = Number(progressWindow && progressWindow.totalBytes || 0);\r\n          if (!event.lengthComputable) {\r\n            setUploadProgress(manifest, 35, \"Uploading media...\");\r\n            return;\r\n          }\r\n          setUploadProgress(\r\n            manifest,\r\n            Math.round(\r\n              totalBytes > 0\r\n                ? ((baseBytes + event.loaded) / totalBytes) * 100\r\n                : (event.loaded / Math.max(1, event.total)) * 100,\r\n            ),\r\n            \"Uploading media...\",\r\n          );\r\n        }),\r\n        (xhr.onload = function () {\r\n          finish(resolve, {\r\n            ok: xhr.status >= 200 && xhr.status < 300,\r\n            status: xhr.status,\r\n            etag: String(xhr.getResponseHeader(\"ETag\") || \"\").trim(),\r\n          });\r\n        }),\r\n        (xhr.onerror = function () {\r\n          finish(reject, new Error(\"Upload failed: network\"));\r\n        }),\r\n        (xhr.onabort = function () {\r\n          finish(reject, new Error(\"Upload aborted\"));\r\n        }),\r\n        (xhr.ontimeout = function () {\r\n          finish(\r\n            reject,\r\n            new Error(\r\n              manifest && manifest.kind === \"video\"\n                ? Number(manifest.bytes || 0) > 600 * 1024 * 1024\n                  ? \"Video upload timed out after 4 hours.\"\n                  : \"Video upload timed out after 1 hour.\"\n                : \"Media upload timed out after 5 minutes.\",\n            ),\r\n          );\r\n        }),\r\n        (activeCanonicalMediaUploadCount += 1),\r\n        document.documentElement.setAttribute(\r\n          \"data-dsd-active-media-uploads\",\r\n          String(activeCanonicalMediaUploadCount),\r\n        ),\r\n        setUploadProgress(manifest, 5, \"Starting media upload...\"),\r\n        xhr.send(file));\r\n    });\n  }\n  function prepareComposerMediaFile(file, surface) {\n    var navigatorRef = window.navigator || {},\n      userAgent = String(navigatorRef.userAgent || \"\"),\n      platform = String(navigatorRef.platform || \"\"),\n      deferLocalPreviewDecode =\n        /iPhone|iPad|iPod/i.test(userAgent) ||\n        (platform === \"MacIntel\" && Number(navigatorRef.maxTouchPoints || 0) > 1);\n    if (file && /^video\\//.test(file.type || \"\"))\n      return Promise.resolve(file);\n    return !file ||\r\n      !/^image\\//.test(file.type || \"\") ||\r\n      file.size < 18e5 ||\r\n      deferLocalPreviewDecode ||\n      !window.createImageBitmap\r\n      ? Promise.resolve(file)\r\n      : createImageBitmap(file)\r\n          .then(function (bitmap) {\r\n            var maxSide = 1920,\r\n              scale = Math.min(\r\n                1,\r\n                maxSide / Math.max(bitmap.width || 1, bitmap.height || 1),\r\n              );\r\n            if (scale >= 1 && file.size < 26e5) return file;\r\n            var canvas = document.createElement(\"canvas\");\r\n            ((canvas.width = Math.max(\r\n              1,\r\n              Math.round((bitmap.width || 1) * scale),\r\n            )),\r\n              (canvas.height = Math.max(\r\n                1,\r\n                Math.round((bitmap.height || 1) * scale),\r\n              )));\r\n            var ctx = canvas.getContext(\"2d\");\r\n            return ctx\r\n              ? (ctx.drawImage(bitmap, 0, 0, canvas.width, canvas.height),\r\n                new Promise(function (resolve) {\r\n                  canvas.toBlob(\r\n                    function (blob) {\r\n                      if (!blob || blob.size >= file.size) {\r\n                        resolve(file);\r\n                        return;\r\n                      }\r\n                      var name =\r\n                          String(file.name || \"image\").replace(/\\.[^.]+$/, \"\") +\r\n                          \".jpg\",\r\n                        compressed = new File([blob], name, {\r\n                          type: \"image/jpeg\",\r\n                          lastModified: Date.now(),\r\n                        });\r\n                      ((compressed.dsdCompressedFrom = file.size),\r\n                        resolve(compressed));\r\n                    },\r\n                    \"image/jpeg\",\r\n                    0.82,\r\n                  );\r\n                }))\r\n              : file;\r\n          })\r\n          .catch(function () {\r\n            return file;\r\n          });\r\n  }\r\n  function validateSelectedVideoMetadata(input, form) {\n    var file = selectedInputFiles(input).filter(function (item) {\n      return mediaFileKind(item) === \"video\";\n    })[0];\n    if (!file) return Promise.resolve(!0);\n    setComposerValidationMessage(\r\n      form,\r\n      \"Video ready (\" +\r\n        attachmentSizeLabel(file.size) +\r\n        \"). Upload acceptance is based on your account's byte-size limit.\",\r\n    );\r\n    return Promise.resolve(!0);\r\n  }\r\n  function directMediaCanaryEnabled() {\n    try {\n      return (\n        new URLSearchParams(window.location.search).get(\"media_delivery\") ===\n        \"direct-canary\"\n      );\n    } catch (e) {\n      return !1;\n    }\n  }\n  function signReadMedia(mediaId, variant) {\n    if (((mediaId = String(mediaId || \"\").trim()), !mediaId))\n      return Promise.resolve(null);\n    if (mediaReadQuarantineReason(mediaId))\r\n      return (\r\n        claim(\"wasabi-read:quarantined\", {\r\n          mediaId: mediaId,\r\n          reason: mediaReadQuarantineReason(mediaId),\r\n        }),\r\n        Promise.resolve(null)\r\n      );\r\n    var directCanary = directMediaCanaryEnabled(),\n      proxyMediaId =\n        variant === \"card\"\n          ? \"card--\" + mediaId\n          : variant === \"poster\"\n            ? \"poster--\" + mediaId\n            : variant === \"playback\"\n              ? \"playback--\" + mediaId\n              : mediaId,\n      cacheKey =\n        mediaId + \"::\" + (variant || \"original\") + (directCanary ? \"::direct-canary\" : \"\"),\n      cached = state.mediaReadCache[cacheKey],\n      ttl = directCanary ? 240 * 1e3 : 540 * 1e3;\n    if (cached && cached.url && Date.now() - cached.at < ttl)\r\n      return Promise.resolve(cached.url);\r\n    if (cached && cached.promise) return cached.promise;\r\n    var promise = fetch(\r\n      \"/apps/dsd-firebase-custom-token/wasabi/sign-read?mediaId=\" +\n        encodeURIComponent(proxyMediaId) +\n        (directCanary ? \"&delivery=direct-canary\" : \"\"),\n      {\r\n        method: \"GET\",\r\n        credentials: \"include\",\r\n        headers: { Accept: \"application/json\" },\r\n      },\r\n    )\r\n      .then(function (res) {\r\n        if (!res.ok) throw new Error(\"Media could not load: \" + res.status);\r\n        return res.json();\r\n      })\r\n      .then(function (ticket) {\r\n        var url =\r\n          ticket && (ticket.readUrl || ticket.url)\r\n            ? ticket.readUrl || ticket.url\r\n            : null;\r\n        return (\r\n          url\r\n            ? (state.mediaReadCache[cacheKey] = { url: url, at: Date.now() })\n            : delete state.mediaReadCache[cacheKey],\n          url\r\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          delete state.mediaReadCache[cacheKey],\n          claim(\"wasabi-read:blocked\", {\r\n            mediaId: mediaId,\r\n            error: error.message,\r\n          }),\r\n          null\r\n        );\r\n      });\r\n    return (\r\n      (state.mediaReadCache[cacheKey] = { promise: promise, at: Date.now() }),\n      promise\n    );\n  }\r\n  function mediaReadProxyUrl(mediaId, viewOnceGrant, variant) {\n    if (((mediaId = String(mediaId || \"\").trim()), !mediaId)) return \"\";\n    var proxyMediaId =\n      variant === \"card\"\n        ? \"card--\" + mediaId\n        : variant === \"poster\"\n          ? \"poster--\" + mediaId\n          : variant === \"playback\"\n            ? \"playback--\" + mediaId\n            : mediaId;\n    var url =\n      \"/apps/dsd-firebase-custom-token/wasabi/read?mediaId=\" +\n      encodeURIComponent(proxyMediaId);\n    return (\n      viewOnceGrant &&\n        (url += \"&viewOnceGrant=\" + encodeURIComponent(String(viewOnceGrant))),\n      url\n    );\n  }\n  function mediaUrlEquivalent(current, next) {\r\n    if (\r\n      ((current = String(current || \"\").trim()),\r\n      (next = String(next || \"\").trim()),\r\n      !current || !next)\r\n    )\r\n      return !1;\r\n    if (current === next) return !0;\r\n    try {\r\n      return (\r\n        new URL(current, window.location.href).href ===\r\n        new URL(next, window.location.href).href\r\n      );\r\n    } catch (e) {\r\n      return !1;\r\n    }\r\n  }\r\n  function setMediaImageSrc(img, url) {\r\n    if (!(!img || !url)) {\r\n      var current = img.getAttribute(\"src\") || img.currentSrc || \"\";\r\n      mediaUrlEquivalent(current, url) || img.setAttribute(\"src\", url);\r\n    }\r\n  }\r\n  function setMediaBackgroundUrl(el, url) {\r\n    if (\r\n      !(!el || !url) &&\r\n      !mediaUrlEquivalent(el.dataset.dsdMediaBackgroundUrl || \"\", url)\r\n    ) {\r\n      el.dataset.dsdMediaBackgroundUrl = url;\r\n      var escaped = String(url).replace(/\"/g, \"%22\");\r\n      (el.style.setProperty(\"--dsd-up315-cover\", 'url(\"' + escaped + '\")'),\r\n        el.style.setProperty(\r\n          \"background-image\",\r\n          'url(\"' + escaped + '\")',\r\n          \"important\",\r\n        ));\r\n    }\r\n  }\r\n  function mediaReadQuarantineReason(mediaId) {\r\n    return (\r\n      READ_QUARANTINED_MEDIA_IDS[\r\n        String(mediaId || \"\")\r\n          .trim()\r\n          .toLowerCase()\r\n      ] || \"\"\r\n    );\r\n  }\r\n  function resolveMediaDisplayUrl(mediaId, variant) {\n    if (((mediaId = String(mediaId || \"\").trim()), !mediaId))\r\n      return Promise.resolve(null);\r\n    if (mediaReadQuarantineReason(mediaId))\r\n      return (\r\n        claim(\"wasabi-read:blob-quarantined\", {\r\n          mediaId: mediaId,\r\n          reason: mediaReadQuarantineReason(mediaId),\r\n        }),\r\n        Promise.resolve(null)\r\n      );\r\n    var cacheKey = mediaId + (variant === \"card\" ? \"::card\" : \"::original\"),\n      cached = state.mediaReadCache[cacheKey],\n      ttl = 480 * 1e3;\n    if (cached && cached.objectUrl && Date.now() - cached.objectAt < ttl)\r\n      return Promise.resolve(cached.objectUrl);\r\n    if (cached && cached.objectPromise) return cached.objectPromise;\r\n    var proxyUrl = mediaReadProxyUrl(mediaId, \"\", variant),\n      promise = Promise.resolve().then(function () {\n        return (\n          (state.mediaReadCache[cacheKey] = Object.assign(\n            {},\n            state.mediaReadCache[cacheKey] || {},\n            {\r\n              objectUrl: proxyUrl,\r\n              objectAt: Date.now(),\r\n              objectSource: \"app-proxy-read-url-immediate-no-blob-swap\",\r\n            },\r\n          )),\r\n          delete state.mediaReadCache[cacheKey].objectPromise,\n          proxyUrl\r\n        );\r\n      });\r\n    return (\r\n      (state.mediaReadCache[cacheKey] = Object.assign({}, cached || {}, {\n        objectPromise: promise,\r\n        objectAt: Date.now(),\r\n      })),\r\n      promise\n    );\n  }\n  function cardMediaVariant(el) {\n    return el &&\n      el.closest &&\n      el.closest(\".dsd-users311__card, [data-dsd-discovery-card]\")\n      ? \"card\"\n      : \"\";\n  }\n  function deferDiscoveryMediaUntilVisible(el, hydrate) {\n    if (\n      !el ||\n      el.dataset.dsdViewportMediaReady === \"true\" ||\n      !cardMediaVariant(el) ||\n      !(\"IntersectionObserver\" in window)\n    )\n      return !1;\n    if (!state.mediaViewportObserver) {\n      state.mediaViewportObserver = new IntersectionObserver(\n        function (entries) {\n          entries.forEach(function (entry) {\n            if (!entry.isIntersecting) return;\n            var node = entry.target;\n            (state.mediaViewportObserver.unobserve(node),\n              (node.dataset.dsdViewportMediaReady = \"true\"));\n            var owner = node.dataset.dsdViewportMediaOwner;\n            owner === \"cover\"\n              ? hydrateProfileCardMedia(node)\n              : hydrateAvatarMedia(node);\n          });\n        },\n        { rootMargin: \"160px 0px\", threshold: 0.01 },\n      );\n    }\n    return (\n      (el.dataset.dsdViewportMediaOwner = hydrate),\n      state.mediaViewportObserver.observe(el),\n      !0\n    );\n  }\n  function profileForMediaFocus(mediaId, slot) {\r\n    if (((mediaId = String(mediaId || \"\").trim()), !mediaId)) return null;\r\n    for (\r\n      var candidates = []\r\n          .concat(state.profile ? [state.profile] : [])\r\n          .concat(state.viewProfile ? [state.viewProfile] : [])\r\n          .concat(\r\n            Array.isArray(state.publicProfiles) ? state.publicProfiles : [],\r\n          )\r\n          .concat(\r\n            Array.isArray(state.authorProfiles) ? state.authorProfiles : [],\r\n          ),\r\n        i = 0;\r\n      i < candidates.length;\r\n      i += 1\r\n    ) {\r\n      var profile = candidates[i] || {},\r\n        id =\r\n          slot === \"avatar\"\r\n            ? canonicalProfileAvatarMediaId(profile)\r\n            : canonicalProfileBannerMediaId(profile),\r\n        readableId = readableProfileSlotMediaId(profile, slot),\r\n        fallbackId = profileAuthorMediaFallback(profile, slot);\r\n      if (\r\n        String(id || \"\").trim() === mediaId ||\r\n        String(readableId || \"\").trim() === mediaId ||\r\n        String(fallbackId || \"\").trim() === mediaId\r\n      )\r\n        return profile;\r\n    }\r\n    return null;\r\n  }\r\n  function profileForMediaFocusElement(el, slot, mediaId) {\r\n    if (!el || !el.getAttribute) return null;\r\n    var identityOwner = el.closest\r\n        ? el.closest(\r\n            \"[data-dsd-profile-key], [data-dsd-author-profile-key], [data-profile-key], [data-dsd-profile-uid], [data-dsd-author-uid]\",\r\n          )\r\n        : null,\r\n      key = nonPlaceholderProfileKey(\r\n        el.getAttribute(\"data-dsd-profile-key\") ||\r\n          el.getAttribute(\"data-dsd-author-profile-key\") ||\r\n          el.getAttribute(\"data-profile-key\") ||\r\n          (identityOwner &&\r\n            (identityOwner.getAttribute(\"data-dsd-profile-key\") ||\r\n              identityOwner.getAttribute(\"data-dsd-author-profile-key\") ||\r\n              identityOwner.getAttribute(\"data-profile-key\"))) ||\r\n          \"\",\r\n      ),\r\n      uidValue = String(\r\n        el.getAttribute(\"data-dsd-profile-uid\") ||\r\n          el.getAttribute(\"data-dsd-author-uid\") ||\r\n          (identityOwner &&\r\n            (identityOwner.getAttribute(\"data-dsd-profile-uid\") ||\r\n              identityOwner.getAttribute(\"data-dsd-author-uid\"))) ||\r\n          \"\",\r\n      ).trim();\r\n    if (!key) {\r\n      var href = el.getAttribute(\"href\") || \"\";\r\n      try {\r\n        var url = href ? new URL(href, window.location.origin) : null;\r\n        url &&\r\n          url.pathname === \"/pages/user-profile\" &&\r\n          (key = nonPlaceholderProfileKey(\r\n            url.searchParams.get(\"profile\") || \"\",\r\n          ));\r\n      } catch (e) {}\r\n    }\r\n    var current = state.profile || {},\r\n      currentKey = nonPlaceholderProfileKey(\r\n        current.profileKey || current.profile_key || current.handle || \"\",\r\n      ),\r\n      currentUid = String(\r\n        current.uid || current.userId || current.user_id || \"\",\r\n      ).trim();\r\n    if (\r\n      slot === \"avatar\" &&\r\n      ((key &&\r\n        currentKey &&\r\n        normalizedProfileKeyValue(key) ===\r\n          normalizedProfileKeyValue(currentKey)) ||\r\n        (uidValue && currentUid && uidValue === currentUid))\r\n    )\r\n      return profileWithPublicMirror(current) || current;\r\n    var byIdentity =\r\n      (key ? publicProfileByKey(key) : null) ||\r\n      (uidValue ? publicProfileByUid(uidValue) : null);\r\n    return byIdentity\r\n      ? profileWithPublicMirror(byIdentity) || byIdentity\r\n      : profileForMediaFocus(mediaId || \"\", slot);\r\n  }\r\n  function applyProfileMediaFocusToElement(el, slot, profile) {\n    if (el) {\n      var mediaId =\n        el.getAttribute(\r\n          slot === \"avatar\"\r\n            ? \"data-dsd-avatar-media-id\"\r\n            : \"data-dsd-profile-cover-media-id\",\r\n        ) ||\r\n        el.getAttribute(\"data-dsd-cover-media-id\") ||\r\n        el.getAttribute(\"data-dsd-media-id\") ||\n        \"\",\n        renderedPosition =\n          !profile && slot === \"avatar\"\n            ? el.getAttribute(\"data-dsd-avatar-focus-position\") || \"\"\n            : \"\";\n      var resolvedProfile =\n          profile || profileForMediaFocusElement(el, slot, mediaId),\n        position = resolvedProfile\n          ? profileMediaFocusPosition(resolvedProfile, slot)\n          : renderedPosition || profileMediaFocusPosition({}, slot);\n      (el.setAttribute(\"data-dsd-profile-focus-owner\", BUILD),\n        el.setAttribute(\"data-dsd-profile-focus-slot\", slot),\n        slot === \"avatar\" &&\n          el.setAttribute(\"data-dsd-avatar-focus-position\", position),\n        el.style.setProperty(\r\n          slot === \"avatar\"\r\n            ? \"--dsd-avatar-focus-position\"\r\n            : \"--dsd-up315-cover-position\",\r\n          position,\r\n          \"important\",\r\n        ),\r\n        slot === \"avatar\"\r\n          ? (el.style.setProperty(\"background-position\", position, \"important\"),\r\n            qsa(\"img\", el).forEach(function (img) {\r\n              (img.style.setProperty(\"object-position\", position, \"important\"),\r\n                img.setAttribute(\"data-dsd-avatar-focus-position\", position),\r\n                img.setAttribute(\"data-dsd-profile-focus-owner\", BUILD));\r\n            }))\r\n          : el.style.setProperty(\"background-position\", position, \"important\"));\r\n    }\r\n  }\r\n  function applyCurrentProfileMediaFocus(root) {\r\n    ((root = root || document),\r\n      qsa(\"[data-dsd-avatar-media-id]\", root).forEach(function (el) {\r\n        applyProfileMediaFocusToElement(el, \"avatar\");\r\n      }),\r\n      qsa(\r\n        \"[data-dsd-profile-cover-media-id], [data-dsd-cover-media-id]\",\r\n        root,\r\n      ).forEach(function (el) {\r\n        applyProfileMediaFocusToElement(el, \"banner\");\r\n      }));\r\n  }\r\n  function traceAvatarFocalMutation(stage, detail) {\r\n    try {\r\n      var node = document.documentElement,\r\n        list = [];\r\n      try {\r\n        list =\r\n          JSON.parse(\r\n            node.getAttribute(\"data-dsd-avatar-focal-mutation-trace\") || \"[]\",\r\n          ) || [];\r\n      } catch (parseError) {\r\n        list = [];\r\n      }\r\n      (list.push(\r\n        Object.assign({ stage: stage, at: now(), build: BUILD }, detail || {}),\r\n      ),\r\n        list.length > 20 && (list = list.slice(-20)),\r\n        node.setAttribute(\r\n          \"data-dsd-avatar-focal-mutation-trace\",\r\n          JSON.stringify(list),\r\n        ));\r\n    } catch (e) {}\r\n  }\r\n  function propagateAvatarFocalMutation(key, profile, source) {\r\n    if (\r\n      ((key = nonPlaceholderProfileKey(\r\n        key || (profile && (profile.profileKey || profile.handle)) || \"\",\r\n      )),\r\n      !key && !profile)\r\n    )\r\n      return null;\r\n    var sourceProfile = profileMediaFocusAliases(\r\n        Object.assign({}, profile || {}, {\r\n          profileKey:\r\n            key ||\r\n            (profile &&\r\n              (profile.profileKey || profile.profile_key || profile.handle)) ||\r\n            \"\",\r\n        }),\r\n      ),\r\n      merged = profileMediaFocusAliases(\r\n        Object.assign(\r\n          {},\r\n          profileWithPublicMirror(sourceProfile) || {},\r\n          sourceProfile,\r\n        ),\r\n      ),\r\n      focus = profileMediaFocus(merged, \"avatar\"),\r\n      mediaId = canonicalProfileAvatarMediaId(merged);\r\n    return (\r\n      traceAvatarFocalMutation(source || \"avatar-focal-propagate\", {\r\n        profileKey: key,\r\n        avatarMediaId: mediaId,\r\n        avatarFocusX: focus.x,\r\n        avatarFocusY: focus.y,\r\n        objectPosition: profileMediaFocusPosition(merged, \"avatar\"),\r\n      }),\r\n      key &&\r\n        (updateLocalPublicProfileMirror(key, publicProfilePayload(merged)),\r\n        (state.currentPublicProfileMirrorReconcileToken = \"\"),\r\n        (state.currentPublicProfileMirrorReconcileLastAt = 0)),\r\n      qsa(\"[data-dsd-avatar-media-id]\", document).forEach(function (el) {\r\n        var elKey = nonPlaceholderProfileKey(\r\n            el.getAttribute(\"data-dsd-profile-key\") ||\r\n              el.getAttribute(\"data-dsd-author-profile-key\") ||\r\n              el.getAttribute(\"data-profile-key\") ||\r\n              \"\",\r\n          ),\r\n          elMediaId = String(\r\n            el.getAttribute(\"data-dsd-avatar-media-id\") ||\r\n              el.getAttribute(\"data-dsd-media-id\") ||\r\n              \"\",\r\n          ).trim();\r\n        ((key && elKey && elKey === key) ||\r\n          (mediaId && elMediaId && elMediaId === mediaId)) &&\r\n          applyProfileMediaFocusToElement(el, \"avatar\", merged);\r\n      }),\r\n      merged\r\n    );\r\n  }\r\n  function registerMediaOwner(media, host, meta) {\n    !media ||\r\n      media.tagName !== \"VIDEO\" ||\r\n      ((meta = meta || {}),\r\n      media.setAttribute(\r\n        \"data-dsd-media-owner\",\r\n        meta.owner || \"LaunchSocialActivation\",\r\n      ),\r\n      media.setAttribute(\r\n        \"data-dsd-media-surface\",\r\n        meta.surface ||\r\n          (host && host.closest(\"[data-dsd-view-story], .dsd-story385__canvas\")\r\n            ? \"story\"\r\n            : \"feed\"),\r\n      ),\r\n      meta.mediaId && media.setAttribute(\"data-dsd-media-id\", meta.mediaId),\r\n      window.DSDGMOR && typeof window.DSDGMOR.register == \"function\"\r\n        ? window.DSDGMOR.register(media, meta)\r\n        : window.DSDMedia &&\r\n          typeof window.DSDMedia.register == \"function\" &&\r\n          window.DSDMedia.register(media, meta));\n  }\n  function isViewportGifHost(host) {\n    return !!(\n      host &&\n      host.getAttribute &&\n      host.getAttribute(\"data-dsd-media-animation\") === \"gif\" &&\n      !host.closest(\"[data-dsd-story-fullscreen-canvas], [data-dsd-post-media-fullscreen-canvas]\")\n    );\n  }\n  function setViewportGifPlaying(host, shouldPlay) {\n    if (!isViewportGifHost(host)) return;\n    var image = qs(\"img.dsd-media-element\", host);\n    if (!image) return;\n    qsa(\"canvas.dsd-gif-freeze-frame\", host).forEach(function (frame) {\n      frame.remove();\n    });\n    image.hidden = !1;\n    image.removeAttribute(\"aria-hidden\");\n    host.dataset.dsdGifPlayback = shouldPlay && !document.hidden && dsdOverlayActiveCount() === 0\n      ? \"playing\"\n      : \"native-idle\";\n  }\n  function ensureGifViewportObserver() {\n    if (!state.gifViewportObserver && \"IntersectionObserver\" in window)\n      state.gifViewportObserver = new IntersectionObserver(\n        function (entries) {\n          entries.forEach(function (entry) {\n            var visible = entry.isIntersecting && entry.intersectionRatio >= 0.35;\n            entry.target.dataset.dsdGifViewportVisible = visible ? \"true\" : \"false\";\n            setViewportGifPlaying(entry.target, visible);\n          });\n        },\n        { threshold: [0, 0.35, 0.7] },\n      );\n    if (!state.gifVisibilityBound) {\n      state.gifVisibilityBound = !0;\n      document.addEventListener(\"visibilitychange\", syncGifViewportPlayback);\n    }\n    return state.gifViewportObserver;\n  }\n  function registerGifViewportLifecycle(host) {\n    if (!isViewportGifHost(host) || host.dataset.dsdGifViewportBound === BUILD) return;\n    host.dataset.dsdGifViewportBound = BUILD;\n    var observer = ensureGifViewportObserver();\n    observer && observer.observe(host);\n  }\n  function syncGifViewportPlayback() {\n    qsa('[data-dsd-media-animation=\"gif\"][data-dsd-gif-viewport-bound]').forEach(\n      function (host) {\n        setViewportGifPlaying(\n          host,\n          host.dataset.dsdGifViewportVisible === \"true\" &&\n            !document.hidden &&\n            dsdOverlayActiveCount() === 0,\n        );\n      },\n    );\n  }\n  function bindProfileMediaLoadingState(host, image) {\n    if (!host || !image) return;\n    host.classList.add(\"dsd-profile-media-visual\");\n    host.classList.remove(\"is-ready\", \"is-unavailable\");\n    var loadingTimer = window.setTimeout(function () {\n      !image.complete && host.classList.add(\"is-loading\");\n    }, 180);\n    function ready() {\n      window.clearTimeout(loadingTimer);\n      host.classList.remove(\"is-loading\", \"is-unavailable\");\n      host.classList.add(\"is-ready\");\n    }\n    function failed() {\n      window.clearTimeout(loadingTimer);\n      host.classList.remove(\"is-loading\", \"is-ready\");\n      host.classList.add(\"is-unavailable\");\n    }\n    if (image.dataset.dsdProfileMediaStateBound !== BUILD) {\n      image.dataset.dsdProfileMediaStateBound = BUILD;\n      image.addEventListener(\"load\", ready);\n      image.addEventListener(\"error\", failed);\n    }\n    image.complete && image.naturalWidth > 0 && ready();\n  }\n  function hydrateAvatarMedia(root) {\n    var nodes = qsa(\"[data-dsd-avatar-media-id]\", root || document);\r\n    root &&\r\n      root.matches &&\r\n      root.matches(\"[data-dsd-avatar-media-id]\") &&\r\n      nodes.unshift(root);\r\n    var seenAvatarNodes = [];\r\n    nodes.forEach(function (el) {\n      if (!(!el || seenAvatarNodes.indexOf(el) !== -1)) {\n        seenAvatarNodes.push(el);\n        if (deferDiscoveryMediaUntilVisible(el, \"avatar\")) return;\n        var mediaId =\n          el.getAttribute(\"data-dsd-avatar-media-id\") ||\r\n          el.getAttribute(\"data-dsd-media-id\") ||\r\n          \"\";\r\n        mediaId &&\r\n          (applyProfileMediaFocusToElement(el, \"avatar\"),\r\n          !(\r\n            el.dataset.dsdAvatarHydrated === \"true\" &&\r\n            el.dataset.dsdAvatarHydratedMediaId === mediaId\r\n          ) &&\r\n            ((el.dataset.dsdAvatarHydrated = \"true\"),\r\n            (el.dataset.dsdAvatarHydratedMediaId = mediaId),\r\n            resolveReadableMediaId(mediaId).then(function (displayId) {\r\n              ((displayId = displayId || mediaId),\r\n                displayId !== mediaId &&\r\n                  (el.setAttribute(\"data-dsd-avatar-media-id\", displayId),\r\n                  (el.dataset.dsdAvatarHydratedMediaId = displayId)));\r\n              var variant = cardMediaVariant(el),\n                cacheKey =\n                  displayId + (variant === \"card\" ? \"::card\" : \"::original\"),\n                cached =\n                (state.mediaReadCache[cacheKey] &&\n                  state.mediaReadCache[cacheKey].objectUrl) ||\n                \"\";\n              if (cached) {\r\n                var cachedImg = qs(\"img\", el);\r\n                (cachedImg\r\n                  ? (setMediaImageSrc(cachedImg, cached),\r\n                    cachedImg.setAttribute(\r\n                      \"data-dsd-media-proxy-placeholder\",\r\n                      \"false\",\r\n                    ))\r\n                  : (el.innerHTML =\r\n                      '<img src=\"' +\r\n                      html(cached) +\r\n                      '\" alt=\"\" loading=\"eager\" decoding=\"async\" data-dsd-media-proxy-placeholder=\"false\">'),\r\n                  applyProfileMediaFocusToElement(\r\n                    el,\r\n                    \"avatar\",\r\n                    profileForMediaFocusElement(el, \"avatar\", displayId),\r\n                  ));\r\n              } else {\r\n                var immediateAvatar = mediaReadProxyUrl(\n                    displayId,\n                    \"\",\n                    variant,\n                  ),\n                  immediateImg = qs(\"img\", el);\r\n                immediateAvatar &&\r\n                  (immediateImg\r\n                    ? (setMediaImageSrc(immediateImg, immediateAvatar),\r\n                      immediateImg.setAttribute(\r\n                        \"data-dsd-media-proxy-placeholder\",\r\n                        \"false\",\r\n                      ))\r\n                    : (el.innerHTML =\r\n                        '<img src=\"' +\r\n                        html(immediateAvatar) +\r\n                        '\" alt=\"\" loading=\"eager\" decoding=\"async\" data-dsd-media-proxy-placeholder=\"false\">'),\r\n                  applyProfileMediaFocusToElement(\n                    el,\n                    \"avatar\",\n                    profileForMediaFocusElement(el, \"avatar\", displayId),\n                  ));\n              }\n              bindProfileMediaLoadingState(el, qs(\"img\", el));\n              resolveMediaDisplayUrl(displayId, variant).then(function (url) {\n                if (url) {\r\n                  var existing = qs(\"img\", el);\r\n                  if (\r\n                    (existing &&\r\n                      existing.setAttribute(\r\n                        \"data-dsd-media-proxy-placeholder\",\r\n                        \"false\",\r\n                      ),\r\n                    existing && existing.getAttribute(\"src\") === url)\r\n                  ) {\r\n                    applyProfileMediaFocusToElement(\n                      el,\n                      \"avatar\",\n                      profileForMediaFocusElement(el, \"avatar\", displayId) ||\n                        profileForMediaFocusElement(el, \"avatar\", mediaId),\n                    );\n                    bindProfileMediaLoadingState(el, existing);\n                    return;\n                  }\r\n                  if (existing) {\r\n                    (setMediaImageSrc(existing, url),\r\n                      applyProfileMediaFocusToElement(\n                        el,\n                        \"avatar\",\n                        profileForMediaFocusElement(el, \"avatar\", displayId) ||\n                          profileForMediaFocusElement(el, \"avatar\", mediaId),\n                      ),\n                      bindProfileMediaLoadingState(el, existing));\n                    return;\r\n                  }\r\n                  el.innerHTML =\n                    '<img src=\"' +\n                    html(url) +\n                    '\" alt=\"\" loading=\"eager\" decoding=\"async\" data-dsd-media-proxy-placeholder=\"false\">';\n                  applyProfileMediaFocusToElement(\n                    el,\n                    \"avatar\",\n                    profileForMediaFocusElement(el, \"avatar\", displayId),\n                  );\n                  bindProfileMediaLoadingState(el, qs(\"img\", el));\n                }\r\n              });\r\n            })));\r\n      }\r\n    });\r\n  }\r\n  function hydrateProfileCardMedia(root) {\n    var selector =\n        \"[data-dsd-profile-cover-media-id], [data-dsd-cover-media-id]\",\n      coverNodes = qsa(selector, root || document);\n    root && root.matches && root.matches(selector) && coverNodes.unshift(root);\n    var seenCoverNodes = [];\n    (hydrateAvatarMedia(root),\n      coverNodes.forEach(function (el) {\n        if (!el || seenCoverNodes.indexOf(el) !== -1) return;\n        seenCoverNodes.push(el);\n        if (deferDiscoveryMediaUntilVisible(el, \"cover\")) return;\n        var mediaId =\n          el.getAttribute(\"data-dsd-profile-cover-media-id\") ||\r\n          el.getAttribute(\"data-dsd-cover-media-id\") ||\r\n          el.getAttribute(\"data-dsd-header-media-id\") ||\r\n          \"\";\r\n        mediaId &&\r\n          (applyProfileMediaFocusToElement(el, \"banner\"),\r\n          !(\r\n            el.dataset.dsdProfileCoverHydrated === \"true\" &&\r\n            el.dataset.dsdProfileCoverHydratedMediaId === mediaId\r\n          ) &&\r\n            ((el.dataset.dsdProfileCoverHydrated = \"true\"),\r\n            (el.dataset.dsdProfileCoverHydratedMediaId = mediaId),\r\n            resolveReadableMediaId(mediaId).then(function (displayId) {\r\n              ((displayId = displayId || mediaId),\r\n                displayId !== mediaId &&\r\n                  (el.setAttribute(\r\n                    \"data-dsd-profile-cover-media-id\",\r\n                    displayId,\r\n                  ),\r\n                  el.setAttribute(\"data-dsd-cover-media-id\", displayId),\r\n                  (el.dataset.dsdProfileCoverHydratedMediaId = displayId)));\r\n              var variant = cardMediaVariant(el),\n                cacheKey =\n                  displayId + (variant === \"card\" ? \"::card\" : \"::original\"),\n                cached =\n                (state.mediaReadCache[cacheKey] &&\n                  state.mediaReadCache[cacheKey].objectUrl) ||\n                \"\";\n              if (cached)\r\n                (setMediaBackgroundUrl(el, cached),\r\n                  el.setAttribute(\"data-dsd-media-proxy-placeholder\", \"false\"),\r\n                  el.classList.add(\"is-hydrated\"),\r\n                  el.classList.remove(\"is-hydrating\"));\r\n              else {\r\n                var immediateCoverUrl = mediaReadProxyUrl(\n                  displayId,\n                  \"\",\n                  variant,\n                );\n                immediateCoverUrl\r\n                  ? (setMediaBackgroundUrl(el, immediateCoverUrl),\r\n                    el.setAttribute(\r\n                      \"data-dsd-media-proxy-placeholder\",\r\n                      \"false\",\r\n                    ),\r\n                    el.classList.add(\"is-hydrated\"),\r\n                    el.classList.remove(\"is-hydrating\"))\r\n                  : el.classList.add(\"is-hydrating\");\r\n              }\r\n              resolveMediaDisplayUrl(displayId, variant).then(function (url) {\n                url &&\r\n                  (setMediaBackgroundUrl(el, url),\r\n                  el.setAttribute(\"data-dsd-media-proxy-placeholder\", \"false\"),\r\n                  el.classList.add(\"is-hydrated\"),\r\n                  el.classList.remove(\"is-hydrating\"));\r\n              });\r\n            })));\r\n      }));\r\n  }\r\n  function resolveReadableMediaId(mediaId) {\r\n    return (\r\n      (mediaId = String(mediaId || \"\").trim()),\r\n      !mediaId ||\r\n        !mediaIdLooksLikeUuid(mediaId) ||\r\n        ((state.profileMediaDisplayIdCache =\r\n          state.profileMediaDisplayIdCache || {}),\r\n        (state.profileMediaDisplayIdCache[mediaId] = mediaId)),\r\n      Promise.resolve(mediaId)\r\n    );\r\n  }\r\n  function activeBoundVideoCount() {\r\n    return qsa(\"video.dsd-media-element--video\", document).filter(\r\n      function (video) {\r\n        return video && !video.paused && !video.ended;\r\n      },\r\n    ).length;\r\n  }\r\n  function setStarfieldVideoPaused(paused) {\r\n    var shouldPause = !!paused || activeBoundVideoCount() > 0;\r\n    (document.documentElement.classList.toggle(\r\n      \"dsd-video-playing\",\r\n      shouldPause,\r\n    ),\r\n      qsa(\r\n        \"#dsd-starfield-root-p11dz90, #star-background, [data-dsd-starfield]\",\r\n      ).forEach(function (node) {\r\n        node.setAttribute(\r\n          \"data-dsd-video-playing\",\r\n          shouldPause ? \"true\" : \"false\",\r\n        );\r\n      }));\r\n  }\r\n  function currentVideoMutedPreference() {\r\n    if (window.DSDGMOR && typeof window.DSDGMOR.mutedPreference == \"function\")\r\n      return window.DSDGMOR.mutedPreference();\r\n    try {\r\n      var saved = localStorage.getItem(\"dsd.video.muted.v1\");\r\n      return saved == null ? !0 : saved !== \"false\";\r\n    } catch (e) {\r\n      return !0;\r\n    }\r\n  }\r\n  function pauseVideoProgrammatically(video, reason) {\r\n    video &&\r\n      (window.DSDGMOR && typeof window.DSDGMOR.pauseVideo == \"function\"\r\n        ? window.DSDGMOR.pauseVideo(video, reason || \"launch-social-pause\")\r\n        : video.pause());\r\n  }\r\n  function multiVideoSequenceGroup(video) {\r\n    var group =\r\n      video &&\r\n      video.closest &&\r\n      video.closest(\r\n        '.dsd-launch-media-grid[data-dsd-media-count], .dsd-launch-comment-media-grid[data-dsd-media-count], .dsd-shared-post__media-grid[data-dsd-media-count], .dsd-msg384__message-media[data-dsd-media-count]',\r\n      );\r\n    return group && Number(group.getAttribute(\"data-dsd-media-count\") || 0) > 1\r\n      ? group\r\n      : null;\r\n  }\r\n  function sequenceFrameIsFocused(frame) {\r\n    if (!frame || !frame.isConnected || !frame.getBoundingClientRect) return !1;\r\n    var rect = frame.getBoundingClientRect(),\r\n      vw = window.innerWidth || document.documentElement.clientWidth || 1,\r\n      vh = window.innerHeight || document.documentElement.clientHeight || 1,\r\n      visibleWidth = Math.max(0, Math.min(rect.right, vw) - Math.max(rect.left, 0)),\r\n      visibleHeight = Math.max(0, Math.min(rect.bottom, vh) - Math.max(rect.top, 0)),\r\n      ratio = (visibleWidth * visibleHeight) / Math.max(1, rect.width * rect.height),\r\n      centerX = rect.left + rect.width / 2;\r\n    return ratio >= 0.35 && Math.abs(centerX - vw / 2) <= Math.max(vw * 0.38, rect.width * 0.5);\r\n  }\r\n  function playNextVideoInMediaGroup(video) {\r\n    var group = multiVideoSequenceGroup(video);\r\n    if (!group || group.closest(\"[data-dsd-immersive-overlay]\")) return;\r\n    var currentFrame = video.closest(\"[data-dsd-media-id]\"),\r\n      frames = qsa(\"[data-dsd-media-id]\", group).filter(function (frame) {\r\n        return frame.closest(\"[data-dsd-media-count]\") === group;\r\n      }),\r\n      currentIndex = frames.indexOf(currentFrame),\r\n      nextFrame = null;\r\n    if (currentIndex < 0) return;\r\n    for (var i = currentIndex + 1; i < frames.length; i += 1) {\r\n      if (\r\n        String(frames[i].getAttribute(\"data-dsd-media-kind\") || \"\").toLowerCase() ===\r\n        \"video\"\r\n      ) {\r\n        nextFrame = frames[i];\r\n        break;\r\n      }\r\n    }\r\n    if (!nextFrame) return;\r\n    group.dataset.dsdActiveMediaSequenceIndex = String(frames.indexOf(nextFrame));\r\n    if (typeof group.scrollTo === \"function\")\r\n      group.scrollTo({\r\n        left: Math.max(0, nextFrame.offsetLeft - group.offsetLeft),\r\n        behavior: \"smooth\",\r\n      });\r\n    hydrateMediaReads(nextFrame);\r\n    var attempts = 0;\r\n    function startNext() {\r\n      if (!group.isConnected || !nextFrame.isConnected) return;\r\n      var nextVideo = qs(\"video.dsd-media-element--video\", nextFrame);\r\n      if (!nextVideo) {\r\n        attempts += 1;\r\n        if (attempts < 30) window.setTimeout(startNext, 100);\r\n        return;\r\n      }\r\n      if (!sequenceFrameIsFocused(nextFrame)) {\r\n        attempts += 1;\r\n        if (attempts < 30) window.setTimeout(startNext, 100);\r\n        return;\r\n      }\r\n      nextVideo.muted = currentVideoMutedPreference();\r\n      nextVideo.defaultMuted = currentVideoMutedPreference();\r\n      nextVideo.muted\r\n        ? nextVideo.setAttribute(\"muted\", \"\")\r\n        : nextVideo.removeAttribute(\"muted\");\r\n      registerMediaOwner(nextVideo, nextFrame, {\r\n        owner: \"LaunchSocialActivation.MultiMediaSequence\",\r\n        surface: \"multi-media-sequence\",\r\n        mediaId:\r\n          nextFrame.getAttribute(\"data-dsd-media-resolved-id\") ||\r\n          nextFrame.getAttribute(\"data-dsd-media-id\") ||\r\n          \"\",\r\n      });\r\n      var activationMeta = {\r\n        owner: \"LaunchSocialActivation.MultiMediaSequence\",\r\n        surface: \"multi-media-sequence\",\r\n      };\r\n      if (window.DSDGMOR && typeof window.DSDGMOR.playWhenReady === \"function\") {\r\n        window.DSDGMOR.playWhenReady(nextVideo, activationMeta);\r\n      } else {\r\n        var activate =\r\n          window.DSDGMOR && typeof window.DSDGMOR.setActive === \"function\"\r\n            ? window.DSDGMOR.setActive(nextVideo, activationMeta)\r\n            : Promise.resolve(!0);\r\n        Promise.resolve(activate)\r\n          .catch(function () { return !1; })\r\n          .then(function (activated) {\r\n            if (!activated || !nextVideo.isConnected || !nextVideo.paused) return;\r\n            var playAttempt = nextVideo.play();\r\n            playAttempt && typeof playAttempt.catch === \"function\" && playAttempt.catch(function () {});\r\n          });\r\n      }\r\n    }\r\n    startNext();\r\n  }\r\n  function playNextStoryTrayVideo(video) {\r\n    var currentCard =\r\n        video &&\r\n        video.closest &&\r\n        video.closest(\".dsd-story385__tray-card[data-dsd-view-story]\"),\r\n      tray = currentCard && currentCard.closest(\".dsd-story385__tray\");\r\n    if (!currentCard || !tray || tray.closest(\"[data-dsd-immersive-overlay]\"))\r\n      return;\r\n    var cards = qsa(\r\n        \".dsd-story385__tray-card[data-dsd-view-story]\",\r\n        tray,\r\n      ).filter(function (card) {\r\n        return card.closest(\".dsd-story385__tray\") === tray;\r\n      }),\r\n      currentIndex = cards.indexOf(currentCard),\r\n      nextCard = null,\r\n      nextFrame = null;\r\n    if (currentIndex < 0) return;\r\n    for (var i = currentIndex + 1; i < cards.length; i += 1) {\r\n      var candidate = qs(\r\n        '[data-dsd-media-id][data-dsd-media-kind=\"video\"]',\r\n        cards[i],\r\n      );\r\n      if (candidate) {\r\n        ((nextCard = cards[i]), (nextFrame = candidate));\r\n        break;\r\n      }\r\n    }\r\n    if (!nextCard || !nextFrame) return;\r\n    tray.dataset.dsdActiveStoryTraySequenceIndex = String(cards.indexOf(nextCard));\r\n    if (typeof tray.scrollTo === \"function\")\r\n      tray.scrollTo({\r\n        left: Math.max(0, nextCard.offsetLeft - tray.offsetLeft),\r\n        behavior: \"smooth\",\r\n      });\r\n    hydrateMediaReads(nextFrame);\r\n    var attempts = 0;\r\n    function startNextTrayVideo() {\r\n      if (!tray.isConnected || !nextCard.isConnected) return;\r\n      var nextVideo = qs(\"video.dsd-media-element--video\", nextFrame);\r\n      if (!nextVideo) {\r\n        attempts += 1;\r\n        if (attempts < 30) window.setTimeout(startNextTrayVideo, 100);\r\n        return;\r\n      }\r\n      if (!sequenceFrameIsFocused(nextFrame)) {\r\n        attempts += 1;\r\n        if (attempts < 30) window.setTimeout(startNextTrayVideo, 100);\r\n        return;\r\n      }\r\n      nextVideo.muted = currentVideoMutedPreference();\r\n      nextVideo.defaultMuted = currentVideoMutedPreference();\r\n      nextVideo.muted\r\n        ? nextVideo.setAttribute(\"muted\", \"\")\r\n        : nextVideo.removeAttribute(\"muted\");\r\n      registerMediaOwner(nextVideo, nextFrame, {\r\n        owner: \"LaunchSocialActivation.StoryTraySequence\",\r\n        surface: \"story-tray\",\r\n        mediaId:\r\n          nextFrame.getAttribute(\"data-dsd-media-resolved-id\") ||\r\n          nextFrame.getAttribute(\"data-dsd-media-id\") ||\r\n          \"\",\r\n      });\r\n      var activationMeta = {\r\n        owner: \"LaunchSocialActivation.StoryTraySequence\",\r\n        surface: \"story-tray\",\r\n      };\r\n      if (window.DSDGMOR && typeof window.DSDGMOR.playWhenReady === \"function\") {\r\n        window.DSDGMOR.playWhenReady(nextVideo, activationMeta);\r\n      } else {\r\n        var activate =\r\n          window.DSDGMOR && typeof window.DSDGMOR.setActive === \"function\"\r\n            ? window.DSDGMOR.setActive(nextVideo, activationMeta)\r\n            : Promise.resolve(!0);\r\n        Promise.resolve(activate)\r\n          .catch(function () { return !1; })\r\n          .then(function (activated) {\r\n            if (!activated || !nextVideo.isConnected || !nextVideo.paused) return;\r\n            var playAttempt = nextVideo.play();\r\n            playAttempt && typeof playAttempt.catch === \"function\" && playAttempt.catch(function () {});\r\n          });\r\n      }\r\n    }\r\n    startNextTrayVideo();\r\n  }\r\n  function bindVideoPlaybackPolicy(media, mediaId, storyFullscreen) {\r\n    if (!media || media.dataset.dsdVideoPlaybackPolicyBound === BUILD) return;\r\n    ((media.dataset.dsdVideoPlaybackPolicyBound = BUILD),\r\n      (media.dataset.dsdVideoControls = \"hidden-until-user-click\"),\r\n      (media.controls = !1),\r\n      media.removeAttribute(\"controls\"),\r\n      media.setAttribute(\"controlslist\", \"nodownload noplaybackrate\"),\r\n      (media.muted = currentVideoMutedPreference()),\r\n      (media.defaultMuted = currentVideoMutedPreference()),\r\n      media.muted\r\n        ? media.setAttribute(\"muted\", \"\")\r\n        : media.removeAttribute(\"muted\"));\r\n    function revealVideoControls() {\r\n      var firstReveal = media.dataset.dsdVideoControls !== \"visible-after-user-click\",\r\n        storyTrayHost = media.closest(\r\n          \".dsd-story385__tray-card[data-dsd-view-story]\",\r\n        ),\r\n        inlinePostHost = media.closest(\".dsd-post-card\"),\r\n        blockedGestureSurface = media.closest(\r\n          '[data-dsd-immersive-overlay], [data-dsd-post-drawer], [data-dsd-message-drawer], [data-dsd-modal], [role=\"dialog\"]',\r\n        ),\r\n        gestureSurface = storyTrayHost\r\n          ? \"story-tray\"\r\n          : inlinePostHost\r\n            ? \"feed\"\r\n            : \"\";\r\n      ((media.controls = !0),\r\n        media.setAttribute(\"controls\", \"\"),\r\n        (media.dataset.dsdVideoControls = \"visible-after-user-click\"));\r\n      if (\r\n        firstReveal &&\r\n        media.paused &&\r\n        gestureSurface &&\r\n        !blockedGestureSurface\r\n      ) {\r\n        var gestureMeta = {\r\n          owner: \"LaunchSocialActivation.InlineMediaGesture\",\r\n          surface: gestureSurface,\r\n          userGesture: !0,\r\n        };\r\n        if (window.DSDGMOR && typeof window.DSDGMOR.playWhenReady === \"function\")\r\n          window.DSDGMOR.playWhenReady(media, gestureMeta);\r\n        else {\r\n          var gesturePlay;\r\n          try {\r\n            gesturePlay = media.play();\r\n          } catch (error) {}\r\n          gesturePlay &&\r\n            typeof gesturePlay.catch === \"function\" &&\r\n            gesturePlay.catch(function () {});\r\n        }\r\n      }\r\n    }\r\n    (media.addEventListener(\"click\", revealVideoControls, { passive: !0 }),\r\n      media.addEventListener(\"keydown\", function (event) {\r\n        (event.key === \"Enter\" || event.key === \" \") && revealVideoControls();\r\n      }),\r\n      media.addEventListener(\"play\", function () {\r\n        (media.dataset.dsdVideoPlaying !== \"true\" &&\r\n          ((media.dataset.dsdVideoPlaying = \"true\"),\r\n          (state.activePlayingVideos += 1)),\r\n          setStarfieldVideoPaused(!0));\r\n      }),\r\n      media.addEventListener(\"pause\", function () {\r\n        (media.dataset.dsdVideoPlaying === \"true\" &&\r\n          ((media.dataset.dsdVideoPlaying = \"false\"),\r\n          (state.activePlayingVideos = Math.max(\r\n            0,\r\n            state.activePlayingVideos - 1,\r\n          ))),\r\n          state.activePlayingVideos === 0 && setStarfieldVideoPaused(!1));\r\n      }),\r\n      media.addEventListener(\"ended\", function () {\r\n        (media.dataset.dsdVideoPlaying === \"true\" &&\r\n          ((media.dataset.dsdVideoPlaying = \"false\"),\r\n          (state.activePlayingVideos = Math.max(\r\n            0,\r\n            state.activePlayingVideos - 1,\r\n          ))),\r\n          state.activePlayingVideos === 0 && setStarfieldVideoPaused(!1),\r\n          playNextVideoInMediaGroup(media),\r\n          playNextStoryTrayVideo(media));\r\n      }));\r\n  }\n  function feedMediaIsActuallyRendered(el) {\r\n    if (!el || !el.isConnected || !el.getBoundingClientRect) return !1;\r\n    if (el.closest('[hidden], [aria-hidden=\"true\"]')) return !1;\r\n    var rect = el.getBoundingClientRect(),\r\n      style = window.getComputedStyle ? window.getComputedStyle(el) : null;\r\n    return !!(\r\n      rect.width > 0 &&\r\n      rect.height > 0 &&\r\n      (!style ||\r\n        (style.display !== \"none\" && style.visibility !== \"hidden\"))\r\n    );\r\n  }\r\n  function stopVideoNetworkSource(video, reason) {\r\n    if (!video || video.tagName !== \"VIDEO\") return;\r\n    pauseVideoProgrammatically(video, reason || \"media-source-release\");\r\n    try {\r\n      video.removeAttribute(\"src\");\r\n      qsa(\"source\", video).forEach(function (source) {\r\n        source.removeAttribute(\"src\");\r\n      });\r\n      video.load();\r\n    } catch (error) {}\r\n  }\r\n  function bindRemovedMediaSourceCleanup() {\r\n    if (\r\n      state.mediaSourceRemovalObserver ||\r\n      !(\"MutationObserver\" in window) ||\r\n      !document.documentElement\r\n    )\r\n      return;\r\n    state.mediaSourceRemovalObserver = new MutationObserver(function (records) {\r\n      records.forEach(function (record) {\r\n        Array.prototype.forEach.call(record.removedNodes || [], function (node) {\r\n          if (!node || node.nodeType !== 1 || node.isConnected) return;\r\n          var videos = node.matches && node.matches(\"video\") ? [node] : [];\r\n          node.querySelectorAll &&\r\n            (videos = videos.concat(qsa(\"video\", node)));\r\n          videos.forEach(function (video) {\r\n            !video.isConnected &&\r\n              stopVideoNetworkSource(video, \"removed-media-subtree\");\r\n          });\r\n        });\r\n      });\r\n    });\r\n    state.mediaSourceRemovalObserver.observe(document.documentElement, {\r\n      childList: !0,\r\n      subtree: !0,\r\n    });\r\n  }\r\n  function releaseOffscreenFeedVideo(el) {\r\n    if (!el || !el.isConnected) return;\r\n    var video = qs(\"video.dsd-media-element--video\", el);\r\n    if (!video || video.closest(\"[data-dsd-story-fullscreen-canvas], [data-dsd-post-media-fullscreen-canvas]\"))\r\n      return;\r\n    stopVideoNetworkSource(video, \"feed-source-release\");\r\n    el.replaceChildren();\r\n    el.classList.remove(\"is-ready\", \"is-loading\", \"is-unavailable\");\r\n    delete el.dataset.dsdReadHydrated;\r\n    delete el.dataset.dsdFeedMediaVisible;\r\n    delete el.dataset.dsdFeedMediaObserved;\r\n    delete el.dataset.dsdFeedMediaRetentionBound;\r\n    el.dataset.dsdFeedMediaReleased = \"true\";\r\n    hydrateMediaReads(el);\r\n  }\r\n  function observeFeedVideoRetention(el) {\r\n    if (!el || !(\"IntersectionObserver\" in window)) return;\r\n    if (!state.feedMediaRetentionObserver)\r\n      state.feedMediaRetentionObserver = new IntersectionObserver(\r\n        function (entries) {\r\n          entries.forEach(function (entry) {\r\n            var node = entry.target;\r\n            window.clearTimeout(node._dsdFeedMediaReleaseTimer);\r\n            node._dsdFeedMediaReleaseTimer = null;\r\n            if (entry.isIntersecting) return;\r\n            node._dsdFeedMediaReleaseTimer = window.setTimeout(function () {\r\n              node._dsdFeedMediaReleaseTimer = null;\r\n              releaseOffscreenFeedVideo(node);\r\n            }, 12000);\r\n          });\r\n        },\r\n        { rootMargin: \"900px 0px\", threshold: 0 },\r\n      );\r\n    if (el.dataset.dsdFeedMediaRetentionBound !== BUILD) {\r\n      el.dataset.dsdFeedMediaRetentionBound = BUILD;\r\n      state.feedMediaRetentionObserver.observe(el);\r\n    }\r\n  }\r\n  function hydrateMediaReads(root) {\n    var mediaNodes = qsa(\"[data-dsd-media-id]\", root || document).filter(\n      function (node) {\n        return !node.matches(\"img, video, audio, source, .dsd-media-element\");\n      },\n    );\n    root &&\n      root.matches &&\n      root.matches(\"[data-dsd-media-id]\") &&\n      !root.matches(\"img, video, audio, source, .dsd-media-element\") &&\n      mediaNodes.indexOf(root) === -1 &&\n      mediaNodes.unshift(root);\n    mediaNodes.forEach(\n      function (el, mediaIndex) {\r\n        if (\r\n          el.dataset.dsdReadHydrated === \"true\" ||\r\n          el.matches(\r\n            \".dsd-post-card__avatar, .dsd-story385__poster, .dsd-users311__avatar, .dsd-users311__cover, .dsd-up315__avatar, .dsd-up315__cover\",\r\n          )\r\n        )\r\n          return;\r\n        state.feedDiagnostics.mediaHydrationRequests += 1;\r\n        var mediaId = el.getAttribute(\"data-dsd-media-id\"),\n          kind =\n            el.getAttribute(\"data-dsd-media-kind\") ||\n            (/\\.(mp4|m4v|mov|webm)(?:$|[?#])/i.test(mediaId || \"\")\n              ? \"video\"\n              : \"image\"),\n          storyFullscreen = !!el.closest(\"[data-dsd-story-fullscreen-canvas]\"),\r\n          postFullscreen = !!el.closest(\n            \"[data-dsd-post-media-fullscreen-canvas]\",\n          ),\n          fullscreenMedia = storyFullscreen || postFullscreen,\n          feedCardMedia =\n            !!el.closest(\n              \".dsd-post-card, .dsd-feed-recommendation--stories, .dsd-story385__tray-card\",\r\n            ) && !fullscreenMedia;\n        if (\n          feedCardMedia &&\n          el.dataset.dsdFeedMediaVisible !== \"true\" &&\n          \"IntersectionObserver\" in window\n        ) {\n          if (!state.feedMediaViewportObserver)\n            state.feedMediaViewportObserver = new IntersectionObserver(\n              function (entries) {\n                entries.forEach(function (entry) {\n                  if (\r\n                    !entry.isIntersecting ||\r\n                    !feedMediaIsActuallyRendered(entry.target)\r\n                  )\r\n                    return;\r\n                  var node = entry.target;\n                  (state.feedMediaViewportObserver.unobserve(node),\n                    (node.dataset.dsdFeedMediaVisible = \"true\"),\n                    hydrateMediaReads(node));\n                });\n              },\n              { rootMargin: \"240px 96px\", threshold: 0.01 },\r\n            );\n          if (el.dataset.dsdFeedMediaObserved !== \"true\") {\n            el.dataset.dsdFeedMediaObserved = \"true\";\n            state.feedMediaViewportObserver.observe(el);\n          }\n          return;\n        }\n        el.dataset.dsdReadHydrated = \"true\";\n        function startHydration(resolvedMediaId) {\n          if (\r\n            ((resolvedMediaId = String(resolvedMediaId || \"\").trim()),\r\n            !resolvedMediaId)\r\n          )\r\n            return;\r\n          resolvedMediaId !== mediaId &&\r\n            (el.removeAttribute(\"data-dsd-media-alt-id\"),\r\n            el.removeAttribute(\"data-dsd-media-fallback-ids\"),\r\n            el.setAttribute(\"data-dsd-media-id\", resolvedMediaId),\r\n            el.setAttribute(\"data-dsd-media-resolved-id\", resolvedMediaId),\r\n            (mediaId = resolvedMediaId));\r\n          var animatedGif =\n              el.getAttribute(\"data-dsd-media-animation\") === \"gif\",\n            readVariant =\n              kind === \"video\" && el.getAttribute(\"data-dsd-media-playback-ready\") === \"true\"\n                ? \"playback\"\n                : feedCardMedia && kind !== \"video\" && !animatedGif\n                  ? \"card\"\n                  : \"\",\n            readCacheKey =\n              mediaId + (readVariant ? \"::\" + readVariant : \"::original\"),\n            quarantineReason = mediaReadQuarantineReason(mediaId),\n            manualVideoSurface =\n              kind === \"video\" &&\n              !!el.closest(\n                \".dsd-launch-comment-media, .dsd-msg384__media-chip\",\n              ),\n            storyTrayVideoSurface =\n              kind === \"video\" && !!el.closest(\".dsd-story385__tray-card\");\n          if (quarantineReason) {\n            ((el.dataset.dsdMediaQuarantined = \"true\"),\r\n              (el.dataset.dsdMediaQuarantineReason = quarantineReason),\r\n              el.classList.add(\r\n                \"dsd-media-frame\",\r\n                \"dsd-media-frame--\" + kind,\r\n                \"is-quarantined\",\r\n              ),\r\n              el.classList.remove(\"is-loading\", \"is-unavailable\"),\r\n              (el.innerHTML =\n                '<span class=\"dsd-media-failure\" role=\"status\">Media unavailable</span>'));\n            return;\n          }\r\n          (el.classList.add(\n            \"dsd-media-frame\",\n            \"dsd-media-frame--\" + kind,\n            \"is-loading\",\n          ),\n            fullscreenMedia\r\n              ? (el.classList.add(\"dsd-media-frame--story-fullscreen\"),\n                (el.style.aspectRatio = \"auto\"))\n              : (el.style.aspectRatio = kind === \"video\" ? \"16 / 9\" : \"4 / 3\"));\n          qs(\".dsd-media-loading-state\", el) ||\n            el.insertAdjacentHTML(\n              \"beforeend\",\n              '<span class=\"dsd-media-loading-state\" data-dsd-loader-owner=\"LaunchSocialActivation.InlineMediaLifecycle\" role=\"status\" aria-label=\"Loading media\"><span aria-hidden=\"true\"></span></span>',\n            );\n          var cachedUrl =\n            (state.mediaReadCache[readCacheKey] &&\n              state.mediaReadCache[readCacheKey].objectUrl) ||\n            \"\";\n          function mount(url, retried, mountedMediaId) {\r\n            if (((mountedMediaId = mountedMediaId || mediaId), !url)) {\n              var uploadError = el.getAttribute(\"data-dsd-upload-error\") || \"\";\n              (el.classList.remove(\"is-loading\"),\n                el.classList.add(\"is-unavailable\"),\n                (el.innerHTML =\n                  '<span class=\"dsd-media-failure\" role=\"status\">' +\n                  html(uploadError ? \"Media upload blocked: \" + uploadError : \"Media unavailable\") +\n                  '</span><button type=\"button\" class=\"dsd-media-retry\" data-dsd-media-retry aria-label=\"Retry loading media\">Retry</button>'));\n              return;\n            }\r\n            el.classList.remove(\"is-unavailable\");\n            var existingSameMedia = qs(kind === \"video\" ? \"video\" : \"img\", el);\n            function removeLoadingIndicator() {\n              qsa(\".dsd-media-loading-state\", el).forEach(function (node) {\n                node.remove();\n              });\n            }\n            function setBufferingState(mediaNode, buffering) {\n              if (!mediaNode || kind !== \"video\") return;\n              var enteringBuffer =\n                buffering &&\n                mediaNode.dataset.dsdBufferingActive !== \"true\";\n              mediaNode.dataset.dsdBufferingActive = buffering ? \"true\" : \"false\";\n              if (buffering) {\n                if (enteringBuffer) {\n                  mediaNode.dataset.dsdFrameRecoveryCount = \"0\";\n                  delete mediaNode.dataset.dsdFrameRecoveryStartedAt;\n                  delete mediaNode.dataset.dsdFallbackPlaybackTime;\n                }\n                el.dataset.dsdBufferingActive = \"true\";\n                showLoadingIndicator(mediaNode, !0);\n                return;\n              }\n              delete mediaNode.dataset.dsdFrameRecoveryCount;\n              delete mediaNode.dataset.dsdFrameRecoveryStartedAt;\n              delete mediaNode.dataset.dsdFallbackPlaybackTime;\n              delete el.dataset.dsdBufferingActive;\n              window.clearTimeout(el._dsdMediaLoadingTimer);\n              el.classList.remove(\"is-loading\");\n              removeLoadingIndicator();\n            }\n            function showLoadingIndicator(mediaNode, force) {\n              window.clearTimeout(el._dsdMediaLoadingTimer);\n              function show() {\n                if (!mediaNode || !mediaNode.isConnected) return;\n                var ready = kind === \"video\"\n                  ? mediaNode.readyState >= 3 && !mediaNode.seeking\n                  : mediaNode.complete && mediaNode.naturalWidth > 0;\n                var existingLoader = qs(\".dsd-media-loading-state\", el);\n                if (existingLoader) {\n                  if (force) {\n                    el.classList.add(\"is-loading\");\n                    existingLoader.removeAttribute(\"hidden\");\n                    existingLoader.setAttribute(\"aria-hidden\", \"false\");\n                  }\n                  return;\n                }\n                if (!force && ready) return;\n                el.classList.add(\"is-loading\");\n                el.insertAdjacentHTML(\n                  \"beforeend\",\n                  '<span class=\"dsd-media-loading-state\" data-dsd-loader-owner=\"LaunchSocialActivation.InlineMediaLifecycle\" role=\"status\" aria-label=\"Loading media\"><span aria-hidden=\"true\"></span></span>',\n                );\n              }\n              if (force) show();\n              else el._dsdMediaLoadingTimer = window.setTimeout(show, 180);\n            }\n            function clearPresentedFrameWatch(mediaNode) {\n              window.clearTimeout(mediaNode._dsdPresentedFrameWatchdog);\n              mediaNode._dsdPresentedFrameWatchdog = null;\n              if (\n                mediaNode._dsdPresentedFrameCallback != null &&\n                typeof mediaNode.cancelVideoFrameCallback === \"function\"\n              )\n                mediaNode.cancelVideoFrameCallback(\n                  mediaNode._dsdPresentedFrameCallback,\n                );\n              mediaNode._dsdPresentedFrameCallback = null;\n            }\n            function armPresentedFrameWatchdog(mediaNode) {\n              window.clearTimeout(mediaNode._dsdPresentedFrameWatchdog);\n              mediaNode._dsdPresentedFrameWatchdog = null;\n              if (\n                !mediaNode.isConnected ||\n                mediaNode.paused ||\n                mediaNode.ended ||\n                document.hidden\n              )\n                return;\n              mediaNode._dsdPresentedFrameWatchdog = window.setTimeout(\n                function () {\n                  mediaNode._dsdPresentedFrameWatchdog = null;\n                  if (\n                    mediaNode.isConnected &&\n                    !mediaNode.paused &&\n                    !mediaNode.ended &&\n                    !document.hidden\n                  )\n                    setBufferingState(mediaNode, !0);\n                },\n                700,\n              );\n            }\n            function watchNextPresentedFrame(mediaNode) {\n              if (\n                !mediaNode.isConnected ||\n                mediaNode.paused ||\n                mediaNode.ended ||\n                document.hidden ||\n                typeof mediaNode.requestVideoFrameCallback !== \"function\" ||\n                mediaNode._dsdPresentedFrameCallback != null\n              )\n                return;\n              mediaNode._dsdPresentedFrameCallback =\n                mediaNode.requestVideoFrameCallback(function (now) {\n                  mediaNode._dsdPresentedFrameCallback = null;\n                  if (!mediaNode.isConnected) return;\n                  mediaNode.dataset.dsdPresentedFrame = \"true\";\n                  recordPlaybackRecovery(mediaNode, now);\n                  armPresentedFrameWatchdog(mediaNode);\n                  watchNextPresentedFrame(mediaNode);\n                });\n            }\n            function recordPlaybackRecovery(mediaNode, now) {\n              if (mediaNode.dataset.dsdBufferingActive !== \"true\") return;\n              var recoveryCount =\n                  Number(mediaNode.dataset.dsdFrameRecoveryCount || 0) + 1,\n                recoveryStartedAt = Number(\n                  mediaNode.dataset.dsdFrameRecoveryStartedAt || 0,\n                ),\n                observedAt = Number(now || performance.now());\n              if (!recoveryStartedAt) {\n                recoveryStartedAt = observedAt;\n                mediaNode.dataset.dsdFrameRecoveryStartedAt = String(\n                  recoveryStartedAt,\n                );\n              }\n              mediaNode.dataset.dsdFrameRecoveryCount = String(recoveryCount);\n              recoveryCount >= 3 &&\n                observedAt - recoveryStartedAt >= 80 &&\n                setBufferingState(mediaNode, !1);\n            }\n            function recordFallbackPlaybackProgress(mediaNode) {\n              if (\n                typeof mediaNode.requestVideoFrameCallback === \"function\" ||\n                mediaNode.dataset.dsdBufferingActive !== \"true\" ||\n                mediaNode.paused ||\n                mediaNode.ended ||\n                document.hidden\n              )\n                return;\n              var currentTime = Number(mediaNode.currentTime || 0),\n                lastTime = Number(\n                  mediaNode.dataset.dsdFallbackPlaybackTime || -1,\n                );\n              if (!isFinite(currentTime) || currentTime <= lastTime) return;\n              mediaNode.dataset.dsdFallbackPlaybackTime = String(currentTime);\n              recordPlaybackRecovery(mediaNode, performance.now());\n            }\n            function bindBufferingLifecycle(mediaNode) {\n              if (!mediaNode || kind !== \"video\" || mediaNode.dataset.dsdBufferingLifecycle === BUILD) return;\n              mediaNode.dataset.dsdBufferingLifecycle = BUILD;\n              [\"loadstart\", \"seeking\"].forEach(function (eventName) {\n                mediaNode.addEventListener(eventName, function () {\n                  if (eventName === \"seeking\") setBufferingState(mediaNode, !0);\n                  else showLoadingIndicator(mediaNode, !1);\n                });\n              });\n              [\"waiting\", \"stalled\"].forEach(function (eventName) {\n                mediaNode.addEventListener(eventName, function () {\n                  setBufferingState(mediaNode, !0);\n                  watchNextPresentedFrame(mediaNode);\n                });\n              });\n              mediaNode.addEventListener(\"play\", function () {\n                armPresentedFrameWatchdog(mediaNode);\n                watchNextPresentedFrame(mediaNode);\n              });\n              mediaNode.addEventListener(\"playing\", function () {\n                armPresentedFrameWatchdog(mediaNode);\n                watchNextPresentedFrame(mediaNode);\n                recordFallbackPlaybackProgress(mediaNode);\n              });\n              mediaNode.addEventListener(\"timeupdate\", function () {\n                armPresentedFrameWatchdog(mediaNode);\n                recordFallbackPlaybackProgress(mediaNode);\n              });\n              mediaNode.addEventListener(\"pause\", function () {\n                clearPresentedFrameWatch(mediaNode);\n                setBufferingState(mediaNode, !1);\n              });\n              mediaNode.addEventListener(\"ended\", function () {\n                clearPresentedFrameWatch(mediaNode);\n                setBufferingState(mediaNode, !1);\n              });\n              [\"loadeddata\", \"canplay\", \"seeked\"].forEach(function (eventName) {\n                mediaNode.addEventListener(eventName, function () {\n                  if (\n                    mediaNode.dataset.dsdBufferingActive !== \"true\" &&\n                    (mediaNode.paused || mediaNode.ended)\n                  )\n                    setBufferingState(mediaNode, !1);\n                });\n              });\n            }\n            if (\n              existingSameMedia &&\n              existingSameMedia.getAttribute(\"src\") === url\n            ) {\n              bindBufferingLifecycle(existingSameMedia);\n              var existingReady =\n                kind === \"video\"\n                  ? existingSameMedia.readyState >= 2\n                  : existingSameMedia.complete &&\n                    existingSameMedia.naturalWidth > 0;\n              if (\n                existingReady &&\n                existingSameMedia.dataset.dsdBufferingActive !== \"true\"\n              ) {\n                (el.classList.remove(\"is-loading\", \"is-unavailable\"),\n                  el.classList.add(\"is-ready\"),\n                  existingSameMedia.classList.remove(\n                    \"is-loading\",\n                    \"is-unavailable\",\n                  ),\n                  existingSameMedia.classList.add(\"is-ready\"),\n                  qsa(\".dsd-media-loading-state\", el).forEach(function (node) {\n                    node.remove();\n                  }));\n              } else {\n                (el.classList.remove(\"is-ready\", \"is-unavailable\"),\n                  el.classList.add(\"is-loading\"),\n                  existingSameMedia.classList.remove(\n                    \"is-ready\",\n                    \"is-unavailable\",\n                  ),\n                  existingSameMedia.classList.add(\"is-loading\"));\n                if (existingSameMedia.dataset.dsdReadinessBound !== \"true\") {\n                  existingSameMedia.dataset.dsdReadinessBound = \"true\";\n                  existingSameMedia.addEventListener(\n                    kind === \"video\" ? \"canplay\" : \"load\",\n                    function () {\n                      var activeBuffer =\n                        kind === \"video\" &&\n                        existingSameMedia.dataset.dsdBufferingActive === \"true\";\n                      (el.classList.remove(\"is-loading\", \"is-unavailable\"),\n                        el.classList.add(\"is-ready\"),\n                        existingSameMedia.classList.remove(\n                          \"is-loading\",\n                          \"is-unavailable\",\n                        ),\n                        existingSameMedia.classList.add(\"is-ready\"),\n                        activeBuffer ||\n                          qsa(\".dsd-media-loading-state\", el).forEach(\n                            function (node) {\n                              node.remove();\n                            },\n                          ),\n                        activeBuffer && el.classList.add(\"is-loading\"));\n                    },\n                    { once: !0 },\n                  );\n                }\n              }\n              (registerMediaOwner(existingSameMedia, el, {\n                  owner: \"LaunchSocialActivation\",\n                  surface: storyFullscreen\n                    ? \"story-viewer\"\n                    : postFullscreen\n                      ? \"post-media-viewer\"\n                      : el.closest(\".dsd-msg384__media-chip\")\n                        ? \"message\"\n                      : el.closest(\n                            \"[data-dsd-view-story], .dsd-story385__canvas\",\n                          )\n                        ? \"story\"\r\n                        : \"feed\",\r\n                  mediaId: mountedMediaId,\n                  kind: kind,\n                }),\r\n                feedCardMedia &&\r\n                  kind === \"video\" &&\r\n                  observeFeedVideoRetention(el));\r\n              return;\r\n            }\r\n            var media = document.createElement(\n              kind === \"video\" ? \"video\" : \"img\",\r\n            );\r\n            media.className = \"dsd-media-element dsd-media-element--\" + kind;\r\n            var readyTimer = null;\r\n            function markMediaReady() {\n              var activeBuffer =\n                kind === \"video\" &&\n                media.dataset.dsdBufferingActive === \"true\";\n              (readyTimer &&\n                (window.clearTimeout(readyTimer), (readyTimer = null)),\n                window.clearTimeout(el._dsdMediaLoadingTimer),\n                el.classList.remove(\"is-unavailable\"),\n                activeBuffer || el.classList.remove(\"is-loading\"),\n                el.classList.add(\"is-ready\"),\n                media.classList.remove(\"is-loading\", \"is-unavailable\"),\n                media.classList.add(\"is-ready\"),\n                qsa(\".dsd-launch-muted\", el).forEach(function (node) {\n                  node.remove();\n                }),\n                activeBuffer || removeLoadingIndicator(),\n                registerGifViewportLifecycle(el));\n            }\n            function syncAspect(readyVisual) {\n              var width =\r\n                  kind === \"video\" ? media.videoWidth : media.naturalWidth,\r\n                height =\r\n                  kind === \"video\" ? media.videoHeight : media.naturalHeight;\r\n              if (width > 0 && height > 0) {\r\n                var ratio = width / height,\r\n                  messageHistoryMedia = !!el.closest(\r\n                    \"[data-dsd-msg384-message-history]\",\r\n                  );\r\n                (el.setAttribute(\r\n                  \"data-dsd-natural-aspect\",\r\n                  width + \":\" + height,\r\n                ),\r\n                  el.style.setProperty(\"--dsd-media-ratio\", String(ratio)),\r\n                  el.style.setProperty(\r\n                    \"--dsd-media-aspect\",\r\n                    width + \" / \" + height,\r\n                  ),\r\n                  messageHistoryMedia ||\r\n                    (el.style.aspectRatio = fullscreenMedia\r\n                      ? \"auto\"\r\n                      : width + \" / \" + height),\r\n                  el.classList.toggle(\r\n                    \"dsd-media-frame--portrait\",\r\n                    ratio < 0.88,\r\n                  ),\r\n                  el.classList.toggle(\r\n                    \"dsd-media-frame--landscape\",\r\n                    ratio > 1.12,\r\n                  ),\r\n                  el.classList.toggle(\r\n                    \"dsd-media-frame--square\",\r\n                    ratio >= 0.88 && ratio <= 1.12,\r\n                  ));\r\n              }\r\n              readyVisual !== !1 && (markMediaReady(), el.classList.add(\"is-ready\"));\n            }\n            (kind === \"video\"\n              ? ((media.controls = !1),\n                (media.playsInline = !0),\r\n                (media.autoplay = fullscreenMedia),\r\n                (media.muted = currentVideoMutedPreference()),\r\n                (media.defaultMuted = currentVideoMutedPreference()),\r\n                (media.preload = fullscreenMedia\r\n                  ? \"auto\"\r\n                  : feedCardMedia\r\n                    ? \"none\"\r\n                    : \"metadata\"),\r\n                media.muted\r\n                  ? media.setAttribute(\"muted\", \"\")\r\n                  : media.removeAttribute(\"muted\"),\r\n                fullscreenMedia\r\n                  ? media.setAttribute(\"autoplay\", \"\")\r\n                  : media.removeAttribute(\"autoplay\"),\r\n                el.getAttribute(\"data-dsd-media-poster-ready\") === \"true\" &&\n                  media.setAttribute(\"poster\", mediaReadProxyUrl(mediaId, \"\", \"poster\")),\n                bindVideoPlaybackPolicy(media, mediaId, fullscreenMedia),\n                bindBufferingLifecycle(media),\n                media.addEventListener(\"loadedmetadata\", function () {\n                  el.setAttribute(\n                    \"data-dsd-media-ready-event\",\n                    \"loadedmetadata\",\n                  );\n                  syncAspect(manualVideoSurface || storyTrayVideoSurface);\n                }, {\n                  once: !0,\n                }),\n                media.addEventListener(\"canplay\", function () {\n                  el.setAttribute(\"data-dsd-media-ready-event\", \"canplay\");\n                  syncAspect(!0);\n                }, { once: !0 }))\n              : ((media.alt = \"\"),\r\n                (media.loading =\r\n                  fullscreenMedia ||\r\n                  (mediaIndex < 2 && el.closest(\".dsd-post-card\"))\r\n                    ? \"eager\"\r\n                    : \"lazy\"),\r\n                media.loading === \"eager\" &&\r\n                  media.setAttribute(\r\n                    \"fetchpriority\",\r\n                    mediaIndex === 0 ? \"high\" : \"auto\",\r\n                  ),\r\n                (media.decoding = \"async\"),\r\n                media.addEventListener(\"load\", function () {\n                  syncAspect(!0);\n                }, { once: !0 })),\n              media.addEventListener(\r\n                \"error\",\r\n                function () {\r\n                  if (retried) {\r\n                    var retryUploadError =\r\n                      el.getAttribute(\"data-dsd-upload-error\") || \"\";\r\n                    (el.classList.remove(\"is-loading\"),\n                      el.classList.add(\"is-unavailable\"),\n                      (el.innerHTML =\n                        '<span class=\"dsd-media-failure\" role=\"status\">' +\n                        html(retryUploadError ? \"Media upload blocked: \" + retryUploadError : \"Media unavailable\") +\n                        '</span><button type=\"button\" class=\"dsd-media-retry\" data-dsd-media-retry aria-label=\"Retry loading media\">Retry</button>'));\n                    return;\r\n                  }\r\n                  var fallbackAttr =\r\n                      el.getAttribute(\"data-dsd-media-fallback-ids\") || \"\",\r\n                    fallbackIds = fallbackAttr\r\n                      ? fallbackAttr\r\n                          .split(\"|\")\r\n                          .map(function (value) {\r\n                            return String(value || \"\").trim();\r\n                          })\r\n                          .filter(Boolean)\r\n                      : [],\r\n                    errorAlt = el.getAttribute(\"data-dsd-media-alt-id\") || \"\";\r\n                  errorAlt && fallbackIds.unshift(errorAlt);\r\n                  var seenFallback = {},\r\n                    nextFallback = \"\";\r\n                  if (\r\n                    (fallbackIds.some(function (value) {\r\n                      return !value ||\r\n                        value === mountedMediaId ||\r\n                        seenFallback[value]\r\n                        ? !1\r\n                        : ((seenFallback[value] = !0),\r\n                          (nextFallback = value),\r\n                          !0);\r\n                    }),\r\n                    nextFallback)\r\n                  ) {\r\n                    (el.setAttribute(\r\n                      \"data-dsd-media-resolved-id\",\r\n                      nextFallback,\r\n                    ),\r\n                      mount(\n                        mediaReadProxyUrl(nextFallback, \"\", readVariant),\n                        !0,\n                        nextFallback,\n                      ));\n                    return;\r\n                  }\r\n                  resolveMediaDisplayUrl(mountedMediaId).then(\r\n                    function (nextUrl) {\r\n                      mount(nextUrl, !0, mountedMediaId);\r\n                    },\r\n                  );\r\n                },\r\n                { once: !0 },\r\n              ),\n              (media.src = url),\n              el.replaceChildren(media),\n              qsa(\".dsd-media-loading-state, .dsd-launch-muted\", el).forEach(function (node) {\n                node.remove();\n              }),\n              showLoadingIndicator(media, !1),\n              registerMediaOwner(media, el, {\r\n                owner: \"LaunchSocialActivation\",\r\n                surface: storyFullscreen\n                  ? \"story-viewer\"\n                  : postFullscreen\n                    ? \"post-media-viewer\"\n                    : el.closest(\".dsd-msg384__media-chip\")\n                      ? \"message\"\n                    : el.closest(\"[data-dsd-view-story], .dsd-story385__canvas\")\n                      ? \"story\"\n                      : \"feed\",\r\n                mediaId: mountedMediaId,\r\n                kind: kind,\r\n              }),\r\n              feedCardMedia &&\r\n                kind === \"video\" &&\r\n                observeFeedVideoRetention(el),\r\n              window.setTimeout(\n                function () {\r\n                  !media.isConnected ||\r\n                    el.classList.contains(\"is-unavailable\") ||\r\n                    el.classList.contains(\"is-quarantined\") ||\r\n                    (((kind === \"image\" && media.complete) ||\r\n                      (kind === \"video\" && media.readyState >= 2)) &&\n                      syncAspect(!0));\n                },\r\n                cachedUrl ? 90 : 520,\r\n              ),\r\n              kind === \"image\" && media.complete && syncAspect(!0));\n          }\r\n          if (cachedUrl) {\n            mount(cachedUrl, !1, mediaId);\n            return;\n          }\n          if (directMediaCanaryEnabled()) {\n            signReadMedia(mediaId, readVariant).then(function (canaryUrl) {\n              mount(\n                canaryUrl || mediaReadProxyUrl(mediaId, \"\", readVariant),\n                !1,\n                mediaId,\n              );\n            });\n            return;\n          }\n          mount(mediaReadProxyUrl(mediaId, \"\", readVariant), !1, mediaId);\n        }\r\n        resolveReadableMediaId(mediaId).then(function (displayId) {\r\n          startHydration(displayId || mediaId);\r\n        });\r\n      },\r\n    );\r\n  }\r\n  function normalizedMentionProfileKey(value) {\n    return clean(String(value || \"\").replace(/^@+/, \"\"), \"\").toLowerCase();\n  }\n  function profilePickerEligible(profile, options) {\n    profile = profile || {};\n    options = options || {};\n    var key = normalizedProfileKeyValue(\n        profile.profileKey || profile.profile_key || profile.handle || \"\",\n      ),\n      uid = profile.uid || profile.userId || profile.user_id || \"\";\n    if (\n      !key ||\n      profile.searchable === !1 ||\n      String(profile.status || \"active\") !== \"active\" ||\n      !publicProfileVisible(profile)\n    )\n      return !1;\n    if (options.excludeSelf && identityMatchesCurrent(uid, key)) return !1;\n    if (options.excludeBlocked && relationshipBlockedProfile(uid, key)) return !1;\n    return !(options.excludeKeys || []).some(function (excluded) {\n      return normalizedProfileKeyValue(excluded) === key;\n    });\n  }\n  function profilePickerProfiles(query, options) {\n    options = options || {};\n    var token = normalizedMentionProfileKey(query),\n      limit = Math.max(1, Math.min(Number(options.limit || 6), 12));\n    return token\n      ? (state.publicProfiles || [])\n          .filter(function (profile) {\n            if (!profilePickerEligible(profile, options)) return !1;\n            var key = normalizedMentionProfileKey(\n                profile.profileKey || profile.profile_key || profile.handle,\n              ),\n              handle = normalizedMentionProfileKey(\n                profile.handle || profile.profileKey || profile.profile_key,\n              ),\n              name = String(profile.displayName || \"\").toLowerCase();\n            return (\n              key.indexOf(token) === 0 ||\n              handle.indexOf(token) === 0 ||\n              name.indexOf(token) !== -1\n            );\n          })\n          .slice(0, limit)\n      : [];\n  }\n  function requestProfilePickerProfiles(query, options) {\n    options = options || {};\n    var token = normalizedMentionProfileKey(query),\n      limit = Math.max(1, Math.min(Number(options.limit || 6), 12)),\n      surface = clean(options.surface || \"profile-picker\", \"profile-picker\"),\n      requestKey = [surface, token, limit, options.publicRead ? \"public\" : \"signed\"].join(\":\");\n    if (!token) return Promise.resolve([]);\n    state.profilePickerRequests = state.profilePickerRequests || {};\n    if (state.profilePickerRequests[requestKey])\n      return state.profilePickerRequests[requestKey];\n    state.profilePickerRequests[requestKey] = waitForSupabaseAdapter(\n      \"publicProfiles\",\n      \"discoveryProfileCards\",\n    )\n      .then(function (adapter) {\n        return adapter.discoveryProfileCards(\n          { limit: limit, offset: 0, search: token },\n          {\n            publicRead: options.publicRead === !0,\n            viewerAuthenticated: options.publicRead !== !0,\n            surface: surface,\n          },\n        );\n      })\n      .then(function (items) {\n        state.publicProfiles = dedupePublicProfiles(\n          (state.publicProfiles || []).concat(\n            (items || []).filter(publicProfileVisible),\n          ),\n        );\n        publishPublicProfiles(state.publicProfiles);\n        return profilePickerProfiles(token, options);\n      })\n      .catch(function (error) {\n        claim(\"profile-picker:blocked\", {\n          surface: surface,\n          tokenLength: token.length,\n          error: (error && error.message) || String(error),\n          failClosed: !0,\n        });\n        return [];\n      })\n      .then(function (matches) {\n        delete state.profilePickerRequests[requestKey];\n        return matches;\n      });\n    return state.profilePickerRequests[requestKey];\n  }\n  function profilePickerOptionHTML(profile, attribute, value) {\n    var key = normalizedProfileKeyValue(\n        profile &&\n          (profile.profileKey || profile.profile_key || profile.handle),\n      ),\n      avatarMedia = canonicalProfileAvatarMediaId(profile),\n      avatar = avatarMedia\n        ? '<span class=\"dsd-post-mention-suggestions__avatar\" data-dsd-avatar-media-id=\"' +\n          html(avatarMedia) +\n          '\"><img src=\"' +\n          html(mediaReadProxyUrl(avatarMedia)) +\n          '\" alt=\"\" loading=\"lazy\" decoding=\"async\"></span>'\n        : '<span class=\"dsd-post-mention-suggestions__avatar\">' +\n          html(initials((profile && profile.displayName) || key)) +\n          \"</span>\";\n    return (\n      '<button type=\"button\" role=\"option\" ' +\n      attribute +\n      '=\"' +\n      html(value || key) +\n      '\">' +\n      avatar +\n      '<span class=\"dsd-post-mention-suggestions__identity\"><strong>' +\n      html((profile && profile.displayName) || key) +\n      \"</strong><small>@\" +\n      html(key) +\n      \"</small></span></button>\"\n    );\n  }\n  function postMentionProfileKeys(body) {\r\n    var keys = [];\r\n    return (\r\n      String(body || \"\").replace(\r\n        /(^|[^A-Za-z0-9_])@([A-Za-z0-9_][A-Za-z0-9_-]{1,63})/g,\r\n        function (_, prefix, token) {\r\n          var key = normalizedMentionProfileKey(token),\r\n            profile = publicProfileByKey(key),\r\n            canonicalKey = normalizedMentionProfileKey(\r\n              profile && (profile.profileKey || profile.handle),\r\n            );\r\n          return (\r\n            canonicalKey &&\r\n              keys.indexOf(canonicalKey) === -1 &&\r\n              keys.push(canonicalKey),\r\n            _\r\n          );\r\n        },\r\n      ),\r\n      keys\r\n    );\r\n  }\r\n  function mentionSuggestionProfiles(query) {\n    return profilePickerProfiles(query, { limit: 6 });\n  }\n  function requestMentionSuggestionProfiles(query) {\n    return requestProfilePickerProfiles(query, {\n      limit: 6,\n      publicRead: !hasCustomer(),\n      surface: \"mention-suggestions\",\n    });\n  }\n  function closePostMentionSuggestions(form) {\r\n    var list = form && qs(\"[data-dsd-post-mention-suggestions]\", form);\r\n    list && ((list.hidden = !0), (list.innerHTML = \"\"));\r\n  }\r\n  function bindPostMentionAutocomplete(root) {\r\n    qsa(\r\n      \"[data-dsd-canonical-composer], [data-dsd-global-post-composer], [data-dsd-comment-form]\",\r\n      root || document,\r\n    ).forEach(function (form) {\r\n      if (!form || form.dataset.dsdMentionAutocompleteBound === BUILD) return;\r\n      var field = qs('textarea[name=\"body\"]', form);\r\n      if (!field) return;\r\n      form.dataset.dsdMentionAutocompleteBound = BUILD;\r\n      var list = document.createElement(\"div\");\r\n      ((list.className = \"dsd-post-mention-suggestions\"),\r\n        list.setAttribute(\"data-dsd-post-mention-suggestions\", \"\"),\r\n        list.setAttribute(\"role\", \"listbox\"),\r\n        (list.hidden = !0),\r\n        field.insertAdjacentElement(\"afterend\", list),\r\n        form.matches(\"[data-dsd-comment-form]\") &&\r\n          list.setAttribute(\"data-dsd-comment-mention-suggestions\", \"true\"));\r\n      function activeToken() {\n        var before = String(field.value || \"\").slice(\r\n            0,\r\n            field.selectionStart == null\r\n              ? field.value.length\r\n              : field.selectionStart,\r\n          ),\r\n          match = before.match(/(^|\\s)@([A-Za-z0-9._-]{1,64})$/);\r\n        return match ? match[2] : \"\";\n      }\n      var mentionRequestSequence = 0;\n      function renderMentionSuggestions(matches) {\n        if (!matches.length) {\n          closePostMentionSuggestions(form);\n          return;\n        }\n        ((list.innerHTML = matches\n          .map(function (profile) {\n            var key = normalizedMentionProfileKey(\n              profile.handle || profile.profileKey,\n            );\n            return profilePickerOptionHTML(\n              profile,\n              \"data-dsd-post-mention-key\",\n              key,\n            );\n          })\n          .join(\"\")),\n          hydrateAvatarMedia(list),\n          (list.hidden = !1));\n      }\n      (field.addEventListener(\"input\", function () {\n        var token = activeToken(),\n          matches = mentionSuggestionProfiles(token),\n          requestSequence = ++mentionRequestSequence;\n        if (!token) {\n          closePostMentionSuggestions(form);\n          return;\n        }\n        if (matches.length) {\n          renderMentionSuggestions(matches);\n          return;\n        }\n        closePostMentionSuggestions(form);\n        requestMentionSuggestionProfiles(token).then(function (remoteMatches) {\n          if (\n            requestSequence !== mentionRequestSequence ||\n            activeToken() !== token\n          )\n            return;\n          renderMentionSuggestions(remoteMatches);\n        });\n      }),\n        list.addEventListener(\"click\", function (event) {\r\n          var option =\r\n            event.target &&\r\n            event.target.closest &&\r\n            event.target.closest(\"[data-dsd-post-mention-key]\");\r\n          if (option) {\r\n            event.preventDefault();\r\n            var key = option.getAttribute(\"data-dsd-post-mention-key\") || \"\",\r\n              start =\r\n                field.selectionStart == null\r\n                  ? field.value.length\r\n                  : field.selectionStart,\r\n              before = String(field.value || \"\")\r\n                .slice(0, start)\r\n                .replace(/(^|\\s)@[A-Za-z0-9._-]{1,64}$/, function (_, prefix) {\r\n                  return prefix + \"@\" + key + \" \";\r\n                });\r\n            ((field.value = before + String(field.value || \"\").slice(start)),\r\n              field.setSelectionRange(before.length, before.length),\r\n              field.dispatchEvent(new Event(\"input\", { bubbles: !0 })),\r\n              closePostMentionSuggestions(form),\r\n              field.focus());\r\n          }\r\n        }),\r\n        field.addEventListener(\"blur\", function () {\r\n          window.setTimeout(function () {\r\n            closePostMentionSuggestions(form);\r\n          }, 120);\r\n        }));\r\n    });\r\n  }\r\n  var publicationUploadManifestByFile =\r\n    typeof WeakMap === \"function\" ? new WeakMap() : null;\r\n  function publicationUploadManifestMatches(\r\n    manifest,\r\n    surface,\r\n    surfaceId,\r\n    visibility,\r\n    contentRating,\r\n  ) {\r\n    if (!manifest) return !1;\r\n    if (\r\n      /manifest_request_mismatch|media_manifest_identity_conflict/i.test(\r\n        String(manifest.uploadError || \"\"),\r\n      )\r\n    )\r\n      return !1;\r\n    var activeKey = normalizedProfileKeyValue(\r\n      activeOwnerProfileKey() ||\r\n        activeProfileKeyValue() ||\r\n        customerProfileKeyValue() ||\r\n        profileKey(),\r\n    );\r\n    return (\r\n      String(manifest.surface || \"\") === String(surface || \"\") &&\r\n      String(manifest.surfaceId || \"\") === String(surfaceId || \"\") &&\r\n      String(manifest.visibility || \"\") === String(visibility || \"\") &&\r\n      String(manifest.contentRating || \"standard\") ===\r\n        String(contentRating || \"standard\") &&\r\n      (!activeKey ||\r\n        normalizedProfileKeyValue(manifest.ownerProfileKey || \"\") === activeKey)\r\n    );\r\n  }\r\n  function uploadPublicationFile(\r\n    file,\r\n    surface,\r\n    surfaceId,\r\n    visibility,\r\n    contentRating,\r\n  ) {\r\n    var cached =\r\n      publicationUploadManifestByFile &&\r\n      publicationUploadManifestByFile.get(file);\r\n    if (\r\n      publicationUploadManifestMatches(\r\n        cached,\r\n        surface,\r\n        surfaceId,\r\n        visibility,\r\n        contentRating,\r\n      )\r\n    ) {\r\n      if (cached.status === \"uploaded\") return Promise.resolve(cached);\r\n      ((cached.status = \"pending_upload\"),\r\n        delete cached.uploadError,\r\n        delete cached.uploadBlockedAt);\r\n      return uploadWasabiMedia(cached, file).then(function (manifest) {\r\n        if (!manifest || manifest.status !== \"uploaded\") {\r\n          var retryError = new Error(\r\n            (manifest && manifest.uploadError) ||\r\n              \"Media upload did not complete.\",\r\n          );\r\n          retryError.dsdMediaUploadError = !0;\r\n          retryError.dsdMediaManifest = manifest || cached;\r\n          throw retryError;\r\n        }\r\n        publicationUploadManifestByFile.set(file, manifest);\r\n        return manifest;\r\n      });\r\n    }\r\n    return createMediaManifest(\r\n      file,\r\n      surface,\r\n      surfaceId,\r\n      \"\",\r\n      visibility,\r\n      contentRating,\r\n    ).then(\r\n      function (manifest) {\r\n        manifest &&\r\n          publicationUploadManifestByFile &&\r\n          publicationUploadManifestByFile.set(file, manifest);\r\n        return manifest;\r\n      },\r\n      function (error) {\r\n        error &&\r\n          error.dsdMediaManifest &&\r\n          publicationUploadManifestByFile &&\r\n          publicationUploadManifestByFile.set(\r\n            file,\r\n            error.dsdMediaManifest,\r\n          );\r\n        throw error;\r\n      },\r\n    );\r\n  }\r\n  function uploadMediaFilesSequentially(files, worker) {\r\n    files = (files || []).filter(Boolean);\r\n    var results = new Array(files.length),\r\n      sequence = Promise.resolve();\r\n    files.forEach(function (file, index) {\r\n      sequence = sequence.then(function () {\r\n        try {\r\n          Object.defineProperty(file, \"__dsdUploadBatch\", {\r\n            value: { index: index, total: files.length },\r\n            enumerable: !1,\r\n            configurable: !0,\r\n          });\r\n        } catch (error) {\r\n          file.__dsdUploadBatch = { index: index, total: files.length };\r\n        }\r\n        return Promise.resolve(worker(file, index)).then(function (result) {\r\n          results[index] = result;\r\n          return result;\r\n        });\r\n      });\r\n    });\r\n    return sequence.then(function () {\r\n      return results;\r\n    });\r\n  }\r\n  function uploadPublicationMedia(\r\n    files,\r\n    surface,\r\n    surfaceId,\r\n    visibility,\r\n    contentRating,\r\n  ) {\r\n    files = (files || []).filter(Boolean);\r\n    if (!files.length) return Promise.resolve([]);\r\n    return uploadMediaFilesSequentially(files, function (file) {\r\n      return uploadPublicationFile(\r\n          file,\r\n          surface,\r\n          surfaceId,\r\n          visibility,\r\n          contentRating,\r\n        );\r\n    })\r\n      .then(function (manifests) {\r\n        if (!supabaseCutoverReady()) return manifests;\r\n        return Promise.all(\r\n          manifests.map(function (manifest) {\r\n            if (!manifest || manifest.status !== \"uploaded\") return manifest;\r\n            return resolveProfileMediaManifestUuid(manifest).then(\r\n              function (canonicalId) {\r\n                return assignCanonicalMediaUuid(manifest, canonicalId);\r\n              },\r\n            );\r\n          }),\r\n        );\r\n      })\r\n      .then(function (manifests) {\r\n      var uploaded = manifests.filter(function (manifest) {\r\n        return (\r\n          manifest &&\r\n          manifest.status === \"uploaded\" &&\r\n          (!supabaseCutoverReady() ||\r\n            uuidLike(manifest.canonicalMediaId || manifest.supabaseMediaId)) &&\r\n          String(manifest.wasabiObjectKey || manifest.objectKey || \"\").trim()\r\n        );\r\n      });\r\n      if (uploaded.length !== files.length) {\r\n        var error = new Error(\r\n          \"Media upload did not complete or could not be attached. No \" +\r\n            surface +\r\n            \" was created.\",\r\n        );\r\n        error.dsdMediaUploadError = !0;\r\n        throw error;\r\n      }\r\n      return uploaded;\r\n      });\r\n  }\r\n  function createPost(input) {\r\n    if (!requireActiveProfile(\"create posts\")) return Promise.resolve(null);\r\n    var author = activeAuthorIdentity(\"create posts\");\r\n    if (!author) return Promise.resolve(null);\r\n    input = input || {};\r\n    var body = String(input.body || \"\")\n      .trim()\n      .slice(0, MAX.body);\n    var originalPostId = String(input.originalPostId || \"\").trim();\n    if (!body && !(input.media && input.media.length) && !originalPostId && !input.originalsReference)\r\n      return (\r\n        renderStatus(\"Post requires text, an Originals reference, image, video, or mixed media.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var postId = clean(\r\n        input.publicationId ||\r\n          \"post-\" + Date.now() + \"-\" + Math.random().toString(36).slice(2, 6),\r\n        \"post\",\r\n      ),\r\n      mediaFiles = input.media || [];\r\n    if (!validatePostMediaFiles(mediaFiles, null)) return Promise.resolve(null);\r\n    var policy = visibilityPolicyFromInput(input),\n      visibility = policy.visibility,\n      contentRating = policy.contentRating,\n      accessGate = policy.accessGate,\n      recipientProfileKeys = (Array.isArray(input.recipientProfileKeys)\n        ? input.recipientProfileKeys\n        : [])\n        .map(normalizedProfileKeyValue)\n        .filter(Boolean)\n        .filter(function (value, index, values) {\n          return values.indexOf(value) === index;\n        })\n        .slice(0, 50),\n      review = reviewStateForAuthor(),\n      post = {\r\n        postId: postId,\r\n        authorUid: author.uid,\r\n        authorProfileKey: author.profileKey,\r\n        authorDisplayName: author.displayName,\r\n        body: body,\r\n        caption: \"\",\r\n        media: [],\r\n        mediaMode: \"text\",\r\n        visibility: visibility,\r\n        contentRating: contentRating,\r\n        accessGate: accessGate,\r\n        status: review.status,\r\n        moderation: review.moderation,\r\n        counts: {\r\n          likes: 0,\r\n          comments: 0,\r\n          shares: 0,\r\n          reports: 0,\r\n          views: 0,\r\n          uniqueViews: 0,\r\n        },\r\n        postType: input.postType || \"post\",\n        originalPostId: originalPostId,\n        originalPost: input.originalPost || null,\n        originals_reference: input.originalsReference || null,\r\n        pinned: input.pinned === !0,\r\n        announcement:\r\n          input.announcement === !0 || input.postType === \"announcement\",\r\n        poll:\n          input.poll && Array.isArray(input.poll.options)\n            ? {\n                question: String(input.poll.question || body).slice(\n                  0,\n                  MAX.body,\n                ),\n                options: input.poll.options\n                  .slice(0, 4)\n                  .map(function (option) {\n                    return String(option || \"\")\n                      .trim()\n                      .slice(0, 120);\n                  })\n                  .filter(Boolean),\n                status: \"open\",\n                durationMinutes: Number(input.poll.durationMinutes || 1440),\n                mapAreaCity: String(input.poll.mapAreaCity || \"\").trim().slice(0, 80),\n                mapAreaState: String(input.poll.mapAreaState || \"\").trim().slice(0, 40),\n              }\n            : null,\r\n        scopeType: input.scopeType || \"\",\r\n        universeId: input.universeId || \"\",\r\n        galaxyId: input.galaxyId || \"\",\r\n        entity: authoredEntityMeta(\"post\", visibility, contentRating, author, {\r\n          moderationStatus: review.status,\r\n          accessGate: accessGate,\r\n          universeId: input.universeId || \"\",\r\n          galaxyId: input.galaxyId || \"\",\r\n        }),\r\n        firestorePath: PATHS.post,\r\n        createdAt: serverTimestamp(),\n      };\n    if (visibility === \"private\" && !originalPostId && !recipientProfileKeys.length) {\n      renderStatus(\"Choose at least one person for this private post.\");\n      return Promise.resolve(null);\n    }\n    if (input.originalsReference && (mediaFiles.length || originalPostId || input.poll)) {\r\n      renderStatus(\"Share the Originals reference without another post or media attachment.\");\r\n      return Promise.resolve(null);\r\n    }\r\n    var originalsPageScope = null;\r\n    if (input.originalsReference) {\r\n      var originalsBinding = window.DSDOriginalsSocialCardLIBP01 && window.DSDOriginalsSocialCardLIBP01.pageBinding();\r\n      if (!originalsBinding || !originalsBinding.signedIn) {\r\n        renderStatus(\"Reload and sign in before sharing this Original. No post was created.\");\r\n        return Promise.resolve(null);\r\n      }\r\n      originalsPageScope = originalsBinding.readerScope;\r\n    }\r\n    return (input.originalsReference ? verifyOriginalsReferenceCapability() : Promise.resolve()).then(function () { return uploadPublicationMedia(\r\n      mediaFiles,\r\n      \"post\",\r\n      postId,\r\n      visibility,\r\n      contentRating,\r\n    ); })\r\n      .then(function (uploadedManifests) {\r\n        ((post.media = uploadedManifests),\r\n          (post.mediaCount = uploadedManifests.length),\r\n          (post.mediaMode =\r\n            uploadedManifests.length > 1\r\n              ? \"mixed\"\r\n              : (uploadedManifests[0] && uploadedManifests[0].kind) || \"text\"),\r\n          claim(\"post-media:media-first-owner\", {\r\n            postId: postId,\r\n            mediaCount: uploadedManifests.length,\r\n            requestedMediaCount: mediaFiles.length,\r\n            canonical: \"media_objects->posts->post_media\",\r\n            parentCreatedAfterUpload: !0,\r\n          }));\r\n        return publishPostViaProxy({\n          postId: postId,\n          body: body,\n          title: input.title || \"\",\n          visibility: visibility,\n          contentRating: contentRating,\n          accessGate: accessGate,\n          mediaIds: uploadedManifests.map(function (manifest) {\n            return manifest.canonicalMediaId || manifest.supabaseMediaId || manifest.id;\n          }),\n          mentionProfileKeys: postMentionProfileKeys(body),\n          recipientProfileKeys: recipientProfileKeys,\n          originalPostId: originalPostId,\n          ...(input.originalsReference ? { originalsReference: input.originalsReference, originalsPageScope: originalsPageScope } : {}),\r\n          poll: post.poll\n            ? {\n                options: post.poll.options,\n                durationMinutes: post.poll.durationMinutes,\n              }\n            : null,\n          mapAreaCity: post.poll ? post.poll.mapAreaCity : \"\",\n          mapAreaState: post.poll ? post.poll.mapAreaState : \"\",\n        });\n      })\n      .then(function (publication) {\n        var row = (publication && publication.post) || {};\n        post.supabasePostId = row.id || post.supabasePostId || \"\";\n        post.createdAt = row.created_at || post.createdAt;\n        post.status = row.status || \"approved\";\n        post.originalPostId = row.original_post_id || originalPostId;\n        if (input.originalsReference) {\r\n          var persistedReference = row.originals_reference;\r\n          if (!persistedReference || persistedReference.version !== 1 || persistedReference.type !== input.originalsReference.type || persistedReference.seriesId !== input.originalsReference.seriesId || (persistedReference.chapterId || \"\") !== (input.originalsReference.chapterId || \"\")) throw new Error(\"originals_reference_not_persisted\");\r\n          post.originals_reference = row.originals_reference;\r\n        }\r\n        post.poll = (publication && publication.poll) || post.poll;\n        post.postType = post.poll ? \"poll\" : post.postType;\n        post.moderation = { state: row.moderation_state || \"approved\" };\n        claim(\"post-publication:atomic-owner\", {\n          postId: postId,\n          mediaCount: post.media.length,\n          gatedShellDerived: accessGate === \"dsd_plus\" || contentRating === \"gated\",\n        });\n        return publication;\n      })\n      .then(function () {\r\n        return !post || post.status === \"hidden\"\r\n          ? null\r\n          : (claim(\"post-publish:self-notification-skipped\", {\r\n              postId: postId,\r\n              reason: \"author-success-status-is-local\",\r\n            }),\r\n            clearRecoveredUploadDraftStatus(),\n            renderStatus(submissionStatusLabel(\"Post\")),\n            (state.posts = mergeRecords([post], state.posts)),\n            recordOwnedByCurrentProfile(post) &&\n              (state.profileFeedPosts = mergeRecords(\n                [post],\n                state.profileFeedPosts,\n              )),\n            renderAll(),\n            post);\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          claim(\"post-create:transaction-aborted\", {\r\n            reason: (error && error.message) || String(error),\r\n            mediaCount: mediaFiles.length,\r\n            parentCreated: !1,\n          }),\r\n          renderStatus(\r\n            (error && error.message) || \"Post could not be published.\",\r\n          ),\r\n          Promise.reject(error)\r\n        );\r\n      });\r\n  }\r\n  function addComment(postId, input) {\n    if (!requireActiveProfile(\"comment\")) return Promise.resolve(null);\n    var author = activeAuthorIdentity(\"comment\");\n    if (!author) return Promise.resolve(null);\n    var payloadInput =\r\n        typeof input == \"object\" && input ? input : { body: input },\r\n      text = String(payloadInput.body || \"\")\n        .trim()\n        .slice(0, MAX.comment),\n      files = Array.prototype.slice.call(payloadInput.media || []),\n      requestedParentCommentId = String(\n        payloadInput.parentCommentId || payloadInput.parent_comment_id || \"\",\n      ).trim(),\n      parentComment = requestedParentCommentId\n        ? commentsForPostAliases(postId).filter(function (item) {\n            return (\n              canonicalCommentId(item) === requestedParentCommentId ||\n              commentKey(item) === requestedParentCommentId\n            );\n          })[0] || null\n        : null,\n      canonicalParentCommentId = parentComment\n        ? parentComment.supabaseCommentId ||\n          parentComment.supabase_comment_id ||\n          parentComment.id ||\n          \"\"\n        : \"\";\n    if (!text && !files.length) return Promise.resolve(null);\n    if (requestedParentCommentId && !canonicalParentCommentId) {\n      renderStatus(\"The comment you are replying to is no longer available.\");\n      return Promise.resolve(null);\n    }\n    var parentPostForMedia = localPostById(postId) || {},\r\n      parentOwnerUid =\r\n        parentPostForMedia.authorUid ||\r\n        parentPostForMedia.ownerUid ||\r\n        parentPostForMedia.uid ||\r\n        \"\";\r\n    if (\r\n      parentOwnerUid &&\r\n      parentOwnerUid !== author.uid &&\r\n      relationshipBlocked(parentOwnerUid)\r\n    )\r\n      return (\r\n        renderStatus(\"Blocked profiles cannot be commented on.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var commentId = clean(\r\n        payloadInput.commentId ||\r\n          \"comment-\" + Date.now() + \"-\" + Math.random().toString(36).slice(2, 6),\r\n        \"comment\",\r\n      ),\r\n      commentMediaVisibility = recordAllowsPublicMedia(parentPostForMedia)\n        ? \"public\"\n        : \"post_scoped\";\n    function createCommentMedia(file) {\n      return createMediaManifest(\n        file,\n        \"comment\",\n        commentId,\n        \"\",\n        commentMediaVisibility,\n        payloadInput.contentRating || \"standard\",\n      ).then(function (manifest) {\n        return manifest\r\n          ? ((manifest.entity = entityMeta(\r\n              \"media\",\r\n              commentMediaVisibility,\r\n              payloadInput.contentRating || \"standard\",\r\n              {\r\n                sourcePostId: postId,\r\n                sourceCommentId: commentId,\r\n                mediaKind: manifest.kind || \"image\",\r\n              },\r\n            )),\r\n            manifest)\r\n          : null;\r\n      });\r\n    }\r\n    var comment = {\n        commentId: commentId,\n        postId: postId,\n        parentCommentId: canonicalParentCommentId,\n        parent_comment_id: canonicalParentCommentId,\n        authorUid: author.uid,\n        authorProfileKey: author.profileKey,\r\n        authorDisplayName: author.displayName,\r\n        body: text,\r\n        media: [],\r\n        status: \"approved\",\n        moderation: { state: \"approved\" },\n        entity: authoredEntityMeta(\r\n          \"comment\",\r\n          \"post_scoped\",\r\n          payloadInput.contentRating || \"standard\",\r\n          author,\r\n          { sourcePostId: postId, moderationStatus: \"approved\" },\n        ),\n        firestorePath: PATHS.postComment,\n        createdAt: now(),\n      };\n    return uploadMediaFilesSequentially(files, createCommentMedia)\r\n      .then(function (manifests) {\n        var uploadedCommentMedia = manifests.filter(function (manifest) {\n          return manifest && manifest.status === \"uploaded\" &&\n            uuidLike(manifest.canonicalMediaId || manifest.supabaseMediaId || manifest.id);\n        });\n        if (uploadedCommentMedia.length !== files.length) {\n          throw new Error(\"Media upload did not complete. Comment was not published.\");\n        }\n        comment.media = uploadedCommentMedia;\n        claim(\"comment-media:media-first-owner\", {\n          postId: postId,\n          commentId: commentId,\n          mediaCount: uploadedCommentMedia.length,\n          canonical: \"media_objects->atomic-comment-publication\",\n          rowFirst: !1,\n        });\n        return publishCommentViaProxy({\n          postId: postId,\n          commentId: commentId,\n          body: text,\n          mediaIds: uploadedCommentMedia.map(function (manifest) {\n            return manifest.canonicalMediaId || manifest.supabaseMediaId || manifest.id;\n          }),\n          mentionProfileKeys: postMentionProfileKeys(text),\n          parentCommentId: canonicalParentCommentId,\n        }).then(function (publication) {\n          var row = publication && publication.comment || {};\n          comment.supabaseCommentId = row.id || \"\";\n          comment.createdAt = row.created_at || comment.createdAt;\n          comment.status = row.status || \"approved\";\n          comment.parentCommentId =\n            row.parent_comment_id || row.parentCommentId || canonicalParentCommentId;\n          comment.parent_comment_id = comment.parentCommentId;\n          comment.commentCount = Number(publication && publication.commentCount);\n          return comment;\n        });\n      })\n      .then(function (publishedComment) {\n        if (!publishedComment) return null;\n        ((state.openCommentPostIds[postId] = !0),\n          setCommentsForPostAliases(postId, [publishedComment]),\n          (state.posts = state.posts.map(function (item) {\n            if (\r\n              counterIdentityKeys(item).indexOf(postId) === -1 &&\r\n              postKey(item) !== postId\r\n            )\r\n              return item;\r\n            var counts = Object.assign({}, item.counts || {});\n            counts.comments = isFinite(publishedComment.commentCount)\n              ? publishedComment.commentCount\n              : Number(counts.comments || 0) + 1;\n            return Object.assign({}, item, { counts: counts, commentCount: counts.comments });\n          })));\n        renderStatus(\"Comment published.\");\n        renderPosts();\n        return publishedComment;\n      })\n      .catch(function (error) {\n        return (\r\n          queueDraft(\r\n            \"comment-create\",\r\n            { postId: postId, body: text, mediaCount: files.length },\r\n            error,\r\n          ),\r\n          null\r\n        );\r\n      });\r\n  }\r\n  function commentKey(comment) {\r\n    return (comment && (comment.commentId || comment.id)) || \"\";\r\n  }\r\n  function uniqueComments(items) {\r\n    var byId = {};\r\n    return (\r\n      (items || []).forEach(function (item) {\r\n        var key = commentKey(item);\r\n        key && (byId[key] = Object.assign({}, byId[key] || {}, item || {}));\r\n      }),\r\n      Object.keys(byId)\r\n        .map(function (key) {\r\n          return byId[key];\r\n        })\r\n        .sort(function (a, b) {\r\n          var delta = recordMillis(a) - recordMillis(b);\r\n          return (\r\n            delta || String(commentKey(a)).localeCompare(String(commentKey(b)))\r\n          );\r\n        })\r\n    );\r\n  }\r\n  function commentOverrideKey(postId, commentId) {\r\n    return String(postId || \"\") + \"/\" + String(commentId || \"\");\r\n  }\r\n  function rememberCommentOverride(postId, commentId, payload) {\r\n    var key = commentOverrideKey(postId, commentId);\r\n    !postId ||\r\n      !commentId ||\r\n      ((state.localCommentStateOverrides[key] = Object.assign(\r\n        {},\r\n        state.localCommentStateOverrides[key] || {},\r\n        payload || {},\r\n        { localOverrideAt: now() },\r\n      )),\r\n      saveCommentStateOverrides(state.localCommentStateOverrides));\r\n  }\r\n  function applyCommentOverrides(postId, items) {\r\n    return (items || [])\r\n      .map(function (item) {\r\n        var commentId = commentKey(item),\r\n          override =\r\n            state.localCommentStateOverrides[\r\n              commentOverrideKey(postId, commentId)\r\n            ];\r\n        return override\r\n          ? Object.assign({}, item, override, {\r\n              postId: postId,\r\n              commentId: commentId,\r\n              moderation: Object.assign(\r\n                {},\r\n                item.moderation || {},\r\n                override.moderation || {},\r\n              ),\r\n            })\r\n          : item;\r\n      })\r\n      .filter(function (item) {\r\n        return (\r\n          item.status !== \"deleted\" &&\r\n          (!item.moderation || item.moderation.state !== \"deleted\")\r\n        );\r\n      });\r\n  }\r\n  function commentPostAliasKeys(postOrId, comments) {\r\n    var keys = [];\r\n    function add(value) {\r\n      ((value = String(value || \"\").trim()),\r\n        value && keys.indexOf(value) === -1 && keys.push(value));\r\n    }\r\n    postOrId && typeof postOrId == \"object\"\r\n      ? (counterIdentityKeys(postOrId).forEach(add), add(postKey(postOrId)))\r\n      : add(postOrId);\r\n    var local = localPostById(keys[0] || \"\");\r\n    return (\r\n      local && counterIdentityKeys(local).forEach(add),\r\n      (comments || []).forEach(function (comment) {\r\n        add(comment && comment.postId);\r\n      }),\r\n      keys\r\n    );\r\n  }\r\n  function commentsForPostAliases(postOrId) {\r\n    var seen = {},\r\n      merged = [];\r\n    return (\r\n      commentPostAliasKeys(postOrId).forEach(function (key) {\r\n        (state.commentsByPost[key] || []).forEach(function (comment) {\r\n          var id = commentKey(comment);\r\n          !id || seen[id] || ((seen[id] = !0), merged.push(comment));\r\n        });\r\n      }),\r\n      uniqueComments(merged)\r\n    );\r\n  }\r\n  function setCommentsForPostAliases(postOrId, comments) {\r\n    var keys = commentPostAliasKeys(postOrId, comments);\r\n    if (!keys.length) return [];\r\n    var merged = uniqueComments(\r\n      commentsForPostAliases(postOrId).concat(comments || []),\r\n    );\r\n    return (\r\n      keys.forEach(function (key) {\r\n        state.commentsByPost[key] = applyCommentOverrides(\r\n          key,\r\n          merged.map(function (comment) {\r\n            return Object.assign({}, comment, {\r\n              postId: key,\r\n              commentId: commentKey(comment),\r\n            });\r\n          }),\r\n        );\r\n      }),\r\n      merged\r\n    );\r\n  }\r\n  function patchCommentForPostAliases(postId, commentId, payload) {\r\n    var comments = commentsForPostAliases(postId).map(function (item) {\r\n      return commentKey(item) === commentId\r\n        ? Object.assign({}, item, payload, { commentId: commentId })\r\n        : item;\r\n    });\r\n    return setCommentsForPostAliases(postId, comments);\r\n  }\r\n  function removeCommentForPostAliases(postId, commentId) {\r\n    var comments = commentsForPostAliases(postId).filter(function (item) {\r\n      return commentKey(item) !== commentId;\r\n    });\r\n    return (\r\n      commentPostAliasKeys(postId).forEach(function (key) {\r\n        state.commentsByPost[key] = applyCommentOverrides(\r\n          key,\r\n          comments.map(function (comment) {\r\n            return Object.assign({}, comment, {\r\n              postId: key,\r\n              commentId: commentKey(comment),\r\n            });\r\n          }),\r\n        );\r\n      }),\r\n      comments\r\n    );\r\n  }\r\n  function canEditComment(comment) {\r\n    if (!comment || !canUseSocialActions()) return !1;\r\n    if (canModerate()) return !0;\r\n    var currentKey = clean(profileKey() || \"\", \"\").toLowerCase(),\r\n      authorKey = clean(\r\n        comment.authorProfileKey ||\r\n          comment.ownerProfileKey ||\r\n          comment.profileKey ||\r\n          \"\",\r\n        \"\",\r\n      ).toLowerCase();\r\n    return identityMatchesCurrent(\r\n      comment.authorUid || comment.ownerUid || comment.uid || \"\",\r\n      authorKey,\r\n    )\r\n      ? !0\r\n      : !!(currentKey && authorKey && currentKey === authorKey);\r\n  }\r\n  function editComment(postId, commentId, updates) {\r\n    if (!requireActiveProfile(\"edit comments\") || !postId || !commentId)\r\n      return Promise.resolve(null);\r\n    updates = updates || {};\r\n    var localComment =\r\n        commentsForPostAliases(postId).filter(function (item) {\r\n          return commentKey(item) === commentId;\r\n        })[0] || null,\r\n      loadComment = localComment\r\n        ? Promise.resolve(localComment)\r\n        : getDoc(\"posts/\" + postId + \"/comments/\" + commentId).then(\r\n            function (snap) {\r\n              return snap && snap.exists && snap.exists()\r\n                ? Object.assign(\r\n                    { commentId: commentId, postId: postId },\r\n                    snap.data() || {},\r\n                  )\r\n                : null;\r\n            },\r\n          );\r\n    return loadComment\r\n      .then(function (comment) {\r\n        if (!canEditComment(comment))\r\n          return (\r\n            renderStatus(\r\n              \"Only the comment owner or a moderator can edit this comment.\",\r\n            ),\r\n            null\r\n          );\r\n        var body = String(\r\n          updates.body == null ? comment.body || \"\" : updates.body,\r\n        )\r\n          .trim()\r\n          .slice(0, MAX.comment);\r\n        if (!body) return (renderStatus(\"Comment edit requires text.\"), null);\r\n        var review = reviewStateForAuthor(),\r\n          payload = {\r\n            body: body,\r\n            status: review.status,\r\n            moderation: Object.assign({}, review.moderation, {\r\n              editRequiresReview: !isFounderRole(),\r\n              lastActionAt: serverTimestamp(),\r\n            }),\r\n            editedAt: serverTimestamp(),\r\n            editedBy: uid(),\r\n          };\r\n        return (\r\n          rememberCommentOverride(postId, commentId, payload),\r\n          patchCommentForPostAliases(postId, commentId, payload),\r\n          renderStatus(\r\n            isFounderRole()\r\n              ? \"Comment edit published.\"\r\n              : \"Comment edit submitted.\",\r\n          ),\r\n          renderPosts(),\r\n          setDoc(\"posts/\" + postId + \"/comments/\" + commentId, payload, !0)\r\n            .then(function () {\r\n              return (\r\n                notify(\r\n                  uid(),\r\n                  \"content\",\r\n                  isFounderRole()\r\n                    ? \"Comment edit published\"\r\n                    : \"Comment updated\",\r\n                  isFounderRole()\r\n                    ? \"Your comment edit is live.\"\r\n                    : \"Your comment was updated.\",\r\n                  \"/pages/notifications\",\r\n                ),\r\n                payload\r\n              );\r\n            })\r\n            .catch(function (error) {\r\n              return (\r\n                queueDraft(\r\n                  \"comment-edit\",\r\n                  { postId: postId, commentId: commentId, updates: updates },\r\n                  error,\r\n                ),\r\n                payload\r\n              );\r\n            })\r\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          queueDraft(\r\n            \"comment-edit-read\",\r\n            { postId: postId, commentId: commentId, updates: updates },\r\n            error,\r\n          ),\r\n          null\r\n        );\r\n      });\r\n  }\r\n  function deleteComment(postId, commentId) {\r\n    if (!requireActiveProfile(\"delete comments\") || !postId || !commentId)\r\n      return Promise.resolve(null);\r\n    var localComment =\r\n        commentsForPostAliases(postId).filter(function (item) {\r\n          return commentKey(item) === commentId;\r\n        })[0] || null,\r\n      loadComment = localComment\r\n        ? Promise.resolve(localComment)\r\n        : getDoc(\"posts/\" + postId + \"/comments/\" + commentId).then(\r\n            function (snap) {\r\n              return snap && snap.exists && snap.exists()\r\n                ? Object.assign(\r\n                    { commentId: commentId, postId: postId },\r\n                    snap.data() || {},\r\n                  )\r\n                : null;\r\n            },\r\n          );\r\n    return loadComment\r\n      .then(function (comment) {\r\n        if (!canEditComment(comment))\r\n          return (\r\n            renderStatus(\r\n              \"Only the comment owner or a moderator can delete this comment.\",\r\n            ),\r\n            null\r\n          );\r\n        var payload = {\r\n          status: \"deleted\",\r\n          moderation: {\r\n            state: \"deleted\",\r\n            gate: \"owner-action\",\r\n            deletedBy: uid(),\r\n            lastActionAt: serverTimestamp(),\r\n          },\r\n          deletedAt: serverTimestamp(),\r\n          deletedBy: uid(),\r\n        };\r\n        return (\r\n          rememberCommentOverride(postId, commentId, payload),\r\n          removeCommentForPostAliases(postId, commentId),\r\n          (state.posts = state.posts.map(function (item) {\r\n            if (\r\n              counterIdentityKeys(item).indexOf(postId) === -1 &&\r\n              postKey(item) !== postId\r\n            )\r\n              return item;\r\n            var counts = Object.assign({}, item.counts || {});\r\n            return (\r\n              (counts.comments = Math.max(0, Number(counts.comments || 0) - 1)),\r\n              Object.assign({}, item, { counts: counts })\r\n            );\r\n          })),\r\n          renderStatus(\"Comment deleted.\"),\r\n          renderPosts(),\r\n          setDoc(\"posts/\" + postId + \"/comments/\" + commentId, payload, !0)\r\n            .then(function () {\r\n              return canModerate()\r\n                ? setDoc(\r\n                    \"moderationQueue/\" + postId + \"-comment-\" + commentId,\r\n                    {\r\n                      state: \"deleted\",\r\n                      deletedBy: uid(),\r\n                      deletedAt: serverTimestamp(),\r\n                    },\r\n                    !0,\r\n                  ).catch(function (error) {\r\n                    return (\r\n                      queueDraft(\r\n                        \"moderation-queue-comment-delete\",\r\n                        { postId: postId, commentId: commentId },\r\n                        error,\r\n                      ),\r\n                      null\r\n                    );\r\n                  })\r\n                : null;\r\n            })\r\n            .then(function () {\r\n              return canModerate()\r\n                ? recordFounderAudit(\r\n                    {\r\n                      action: \"comment.deleted\",\r\n                      actorUid: uid(),\r\n                      sourcePath: \"posts/\" + postId + \"/comments/\" + commentId,\r\n                    },\r\n                    \"comment-delete\",\r\n                  )\r\n                : null;\r\n            })\r\n            .then(function () {\r\n              var deletedPost = localPostById(postId) || {},\r\n                deletedCounts = deletedPost.counts || {},\r\n                deletedCurrent = Number(\r\n                  deletedCounts.comments !== void 0\r\n                    ? deletedCounts.comments\r\n                    : deletedPost.commentCount || 0,\r\n                );\r\n              isFinite(deletedCurrent) || (deletedCurrent = 0);\r\n              var deletedNext = Math.max(0, deletedCurrent - 1);\r\n              return setDoc(\r\n                \"posts/\" + postId,\r\n                {\r\n                  counts: { comments: deletedNext },\r\n                  commentCount: deletedNext,\r\n                },\r\n                !0,\r\n              ).catch(function (error) {\r\n                return (\r\n                  queueDraft(\r\n                    \"post-comment-count-delete\",\r\n                    { postId: postId, commentId: commentId, next: deletedNext },\r\n                    error,\r\n                  ),\r\n                  null\r\n                );\r\n              });\r\n            })\r\n            .then(function () {\r\n              return payload;\r\n            })\r\n            .catch(function (error) {\r\n              return (\r\n                queueDraft(\r\n                  \"comment-delete\",\r\n                  { postId: postId, commentId: commentId },\r\n                  error,\r\n                ),\r\n                payload\r\n              );\r\n            })\r\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          queueDraft(\r\n            \"comment-delete-read\",\r\n            { postId: postId, commentId: commentId },\r\n            error,\r\n          ),\r\n          null\r\n        );\r\n      });\r\n  }\r\n  function updateCommentState(postId, commentId, stateValue) {\r\n    if (!canModerate() || !postId || !commentId) return Promise.resolve(null);\r\n    var payload = {\r\n      status: stateValue,\r\n      moderation: {\r\n        state: stateValue,\r\n        gate: \"founder-review\",\r\n        lastActionAt: serverTimestamp(),\r\n        reviewedBy: uid(),\r\n      },\r\n    };\r\n    return (\r\n      rememberCommentOverride(postId, commentId, payload),\r\n      patchCommentForPostAliases(postId, commentId, payload),\r\n      renderPosts(),\r\n      setDoc(\"posts/\" + postId + \"/comments/\" + commentId, payload, !0)\r\n        .then(function () {\r\n          return setDoc(\r\n            \"moderationQueue/\" + postId + \"-comment-\" + commentId,\r\n            {\r\n              state: stateValue,\r\n              reviewedBy: uid(),\r\n              reviewedAt: serverTimestamp(),\r\n            },\r\n            !0,\r\n          ).catch(function (error) {\r\n            return (\r\n              queueDraft(\r\n                \"moderation-queue-comment-state\",\r\n                { postId: postId, commentId: commentId, state: stateValue },\r\n                error,\r\n              ),\r\n              null\r\n            );\r\n          });\r\n        })\r\n        .then(function () {\r\n          return recordFounderAudit(\r\n            {\r\n              action: \"comment.\" + stateValue,\r\n              actorUid: uid(),\r\n              sourcePath: \"posts/\" + postId + \"/comments/\" + commentId,\r\n            },\r\n            \"comment-state\",\r\n          );\r\n        })\r\n        .then(function () {\r\n          return payload;\r\n        })\r\n        .catch(function (error) {\r\n          return (\r\n            queueDraft(\r\n              \"comment-state\",\r\n              { postId: postId, commentId: commentId, state: stateValue },\r\n              error,\r\n            ),\r\n            payload\r\n          );\r\n        })\r\n    );\r\n  }\r\n  function archiveSafetyReport(queueItemId) {\r\n    if (!canModerate() || !queueItemId) return Promise.resolve(null);\r\n    var payload = {\r\n      state: \"archived\",\r\n      status: \"archived\",\r\n      resolvedBy: uid(),\r\n      resolvedAt: serverTimestamp(),\r\n      reviewedBy: uid(),\r\n      reviewedAt: serverTimestamp(),\r\n    };\r\n    return setDoc(\"moderationQueue/\" + queueItemId, payload, !0)\r\n      .then(function () {\r\n        return setDoc(\"safetyReports/\" + queueItemId, payload, !0).catch(\r\n          function (error) {\r\n            return (\r\n              queueDraft(\r\n                \"safety-report-archive\",\r\n                { queueItemId: queueItemId },\r\n                error,\r\n              ),\r\n              null\r\n            );\r\n          },\r\n        );\r\n      })\r\n      .then(function () {\r\n        return recordFounderAudit(\r\n          {\r\n            action: \"safetyReport.archived\",\r\n            actorUid: uid(),\r\n            sourcePath: \"safetyReports/\" + queueItemId,\r\n            queueItemId: queueItemId,\r\n          },\r\n          \"safety-report-archive\",\r\n        );\r\n      })\r\n      .then(function () {\r\n        return (\r\n          (state.moderationQueueItems = state.moderationQueueItems.map(function (item) {\n            return (item.queueItemId || item.id) === queueItemId\r\n              ? Object.assign({}, item, payload)\r\n              : item;\r\n          })),\r\n          renderStatus(\"Safety report archived.\"),\r\n          renderModeration(),\r\n          payload\r\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          queueDraft(\r\n            \"safety-report-archive\",\r\n            { queueItemId: queueItemId },\r\n            error,\r\n          ),\r\n          payload\r\n        );\r\n      });\r\n  }\r\n  function toggleReaction(postId, type, selectionWasActive) {\n    if (\r\n      !requireActiveProfile(\"react\") ||\r\n      postOwnerBlocked(postId, \"reacted to\")\r\n    )\n      return Promise.resolve(null);\n    var mutationKey = \"post-reaction:\" + String(postId || \"\");\n    if (state.interactionMutations[mutationKey]) return Promise.resolve(null);\n    state.interactionMutations[mutationKey] = !0;\n    state.postReactionMutationRevision[postId] =\n      Number(state.postReactionMutationRevision[postId] || 0) + 1;\n    type = String(type || \"like\").toLowerCase();\n    var currentType = String(state.reactionsByPost[postId] || \"\"),\n      active =\n        typeof selectionWasActive == \"boolean\"\n          ? !selectionWasActive\n          : currentType !== type,\n      actor = actorUid() || uid(),\n      priorSummary = state.postReactionSummariesByPost[postId] || {},\n      priorSummarySnapshot = {\n        total: Math.max(0, Number(priorSummary.total || 0)),\n        counts: Object.assign({}, priorSummary.counts || {}),\n      };\n    if (!actor) {\n      delete state.interactionMutations[mutationKey];\n      return Promise.resolve(null);\n    }\n    var optimisticCounts = Object.assign({}, priorSummarySnapshot.counts),\n      optimisticTotal = priorSummarySnapshot.total;\n    if (active) {\n      if (currentType && currentType !== type)\n        optimisticCounts[currentType] = Math.max(\n          0,\n          Number(optimisticCounts[currentType] || 0) - 1,\n        );\n      currentType || (optimisticTotal += 1);\n      optimisticCounts[type] = Math.max(\n        1,\n        Number(optimisticCounts[type] || 0) +\n          (currentType === type ? 0 : 1),\n      );\n    } else {\n      optimisticTotal = Math.max(0, optimisticTotal - 1);\n      optimisticCounts[type] = Math.max(\n        0,\n        Number(optimisticCounts[type] || 0) - 1,\n      );\n    }\n    state.postReactionSummariesByPost[postId] = {\n      total: optimisticTotal,\n      counts: optimisticCounts,\n    };\n    (markReactionStateForPost(postId, active, { reactionType: type }),\n      syncReactionButtons(postId, active, { reactionType: type }));\n    var payload = {\n        postId: postId,\n        action: active ? \"react_post\" : \"unreact_post\",\n        reactionType: type || \"like\",\n        idempotencyKey:\n          \"reaction:\" +\n          actor +\n          \":\" +\n          postId +\n          \":\" +\n          (active ? \"on\" : \"off\") +\n          \":\" +\n          Date.now(),\n      };\n    return interactionMutationViaProxy(payload)\n      .then(function (result) {\n        var canonicalActive = result.active === !0,\n          canonicalCount = Number(result.reactionCount || 0),\n          summaryCounts = Object.assign({}, priorSummarySnapshot.counts),\n          canonicalType = String(result.reactionType || type || \"like\");\n        isFinite(canonicalCount) || (canonicalCount = 0);\n        currentType &&\n          currentType !== canonicalType &&\n          (summaryCounts[currentType] = Math.max(\n            0,\n            Number(summaryCounts[currentType] || 0) - 1,\n          ));\n        canonicalActive\n          ? (summaryCounts[canonicalType] = Math.max(\n              1,\n              Number(summaryCounts[canonicalType] || 0) +\n                (currentType === canonicalType ? 0 : 1),\n            ))\n          : (summaryCounts[canonicalType] = Math.max(\n              0,\n              Number(summaryCounts[canonicalType] || 0) - 1,\n            ));\n        state.postReactionSummariesByPost[postId] = {\n          total: canonicalCount,\n          counts: summaryCounts,\n        };\n        return (\n          markReactionStateForPost(postId, canonicalActive, result),\n          (state.posts = state.posts.map(function (item) {\n            if (\n              counterIdentityKeys(item).indexOf(postId) === -1 &&\n              counterIdentityKeys(item).indexOf(result.targetId || \"\") === -1 &&\n              (item.postId || item.id) !== postId\n            )\n              return item;\n            var counts = Object.assign({}, item.counts || {});\n            return (\n              (counts.likes = canonicalCount),\n              Object.assign({}, item, {\n                counts: counts,\n                reactionCount: canonicalCount,\n              })\n            );\n          })),\n          syncReactionButtons(postId, canonicalActive, result),\n          result\n        );\n      })\n      .catch(function (error) {\n        return (\n          (state.postReactionSummariesByPost[postId] = priorSummarySnapshot),\n          markReactionStateForPost(postId, !!currentType, {\n            reactionType: currentType || \"like\",\n          }),\n          syncReactionButtons(postId, !!currentType, {\n            reactionType: currentType || \"like\",\n          }),\n          queueDraft(\"reaction\", payload, error),\n          null\n        );\n      })\n      .then(function (result) {\n        delete state.interactionMutations[mutationKey];\n        return result;\n      });\n  }\r\n  function reactionIdentityKeys(postId, data) {\r\n    var keys = {};\r\n    function add(value) {\r\n      ((value = String(value || \"\").trim()), value && (keys[value] = !0));\r\n    }\r\n    add(postId);\r\n    var local = localPostById(postId) || {};\r\n    return (\r\n      counterIdentityKeys(local).forEach(add),\r\n      (data = data || {}),\r\n      add(data.postId),\r\n      add(data.post_id),\r\n      add(data.legacyPostId),\r\n      add(data.legacy_post_id),\r\n      add(data.supabasePostId),\r\n      add(data.supabase_post_id),\r\n      add(data.id),\r\n      Object.keys(keys)\r\n    );\r\n  }\r\n  function markReactionStateForPost(postId, active, data) {\n    var reactionType = String(\n      (data && (data.reactionType || data.reaction_type)) || \"like\",\n    ).toLowerCase();\n    reactionIdentityKeys(postId, data).forEach(function (key) {\n      active\n        ? (state.reactionsByPost[key] = reactionType)\n        : delete state.reactionsByPost[key];\n    });\n  }\n  function hydrateViewerReactionForPost(postId, options) {\n    postId = String(postId || \"\").trim();\n    var force = options && options.force === !0,\n      actor = actorUid() || uid(),\n      hydrationMutationRevision = Number(\n        state.postReactionMutationRevision[postId] || 0,\n      );\n    if (\r\n      !postId ||\r\n      !hasCustomer() ||\r\n      !actor ||\r\n      !supabaseCutoverConfigured() ||\r\n      (state.reactionHydrationByPost[postId] && !force)\r\n    )\r\n      return Promise.resolve(null);\n    state.reactionHydrationByPost[postId] = \"pending\";\n    return interactionMutationViaProxy({\n      action: \"viewer_post_reactions\",\n      postIds: [postId],\n      idempotencyKey: \"viewer-reaction-detail:\" + clean(postId, \"post\"),\n    })\n      .then(function (result) {\n        if (\n          Number(state.postReactionMutationRevision[postId] || 0) !==\n          hydrationMutationRevision\n        ) {\n          state.reactionHydrationByPost[postId] = \"done\";\n          claim(\"viewer-reaction-detail-hydration:stale-mutation-response-ignored\", {\n            postId: postId,\n          });\n          return null;\n        }\n        var activePostIds = (result && result.activePostIds) || [],\n          viewerReactions = (result && result.viewerReactions) || [],\n          summaries = (result && result.reactionSummaries) || {},\n          viewerReaction = viewerReactions.filter(function (row) {\n            return row && String(row.postId || \"\") === postId;\n          })[0],\n          data = {\n            reactionType: String(\n              (viewerReaction && viewerReaction.reactionType) || \"like\",\n            ).toLowerCase(),\n          },\n          active = activePostIds.indexOf(postId) !== -1,\n          previousType = String(state.reactionsByPost[postId] || \"\"),\n          hadActive = reactionIdentityKeys(postId, data).some(function (key) {\n            return !!state.reactionsByPost[key];\n          });\n        state.postReactionSummariesByPost[postId] = summaries[postId] || {\n          total: 0,\n          counts: {},\n        };\n        (markReactionStateForPost(postId, active, data),\n          syncReactionButtons(postId, active, data),\n          (state.reactionHydrationByPost[postId] = \"done\"),\n          (active !== hadActive ||\n            (active && previousType !== data.reactionType)) &&\n            renderPostDrawer());\n        return active;\n      })\n      .catch(function (error) {\r\n        (delete state.reactionHydrationByPost[postId],\r\n          claim(\"viewer-reaction-detail-hydration:blocked\", {\r\n            postId: postId,\r\n            error: (error && error.message) || String(error),\r\n          }));\r\n        return null;\r\n      });\r\n  }\r\n  function hydrateViewerReactionsForPosts(posts) {\n    var postIds = Array.prototype.slice.call(posts || [])\n        .map(function (post) {\n          return postKey(post);\n        })\n        .filter(Boolean)\n        .slice(0, 80),\n      signature = postIds.join(\"|\"),\n      hydrationMutationRevisions = {};\n    if (\n      !postIds.length ||\n      !hasCustomer() ||\n      !supabaseCutoverConfigured() ||\n      state.reactionFeedHydrationSignature === signature\n    )\n      return Promise.resolve(null);\n    state.reactionFeedHydrationSignature = signature;\n    postIds.forEach(function (postId) {\n      hydrationMutationRevisions[postId] = Number(\n        state.postReactionMutationRevision[postId] || 0,\n      );\n    });\n    return interactionMutationViaProxy({\n      action: \"viewer_post_reactions\",\n      postIds: postIds,\n      idempotencyKey: \"viewer-reactions:\" + clean(signature, \"page\"),\n    })\n      .then(function (result) {\n        var active = (result && result.activePostIds) || [],\n          viewerReactions = (result && result.viewerReactions) || [],\n          viewerByPost = {},\n          summaries = (result && result.reactionSummaries) || {};\n        viewerReactions.forEach(function (row) {\n          row && row.postId &&\n            (viewerByPost[row.postId] = String(row.reactionType || \"like\"));\n        });\n        if (state.reactionFeedHydrationSignature !== signature) {\n          claim(\"viewer-reaction-feed-hydration:stale-response-ignored\", {\n            requestedCount: postIds.length,\n          });\n          return active;\n        }\n        postIds.forEach(function (postId) {\n          if (\n            Number(state.postReactionMutationRevision[postId] || 0) !==\n            hydrationMutationRevisions[postId]\n          )\n            return;\n          var reactionType = viewerByPost[postId] || \"like\",\n            isActive = active.indexOf(postId) !== -1;\n          state.postReactionSummariesByPost[postId] = summaries[postId] || {\n            total: 0,\n            counts: {},\n          };\n          markReactionStateForPost(postId, isActive, {\n            reactionType: reactionType,\n          });\n          syncReactionButtons(postId, isActive, {\n            reactionType: reactionType,\n          });\n        });\n        claim(\"viewer-reaction-feed-hydration:bounded\", {\n          requestedCount: postIds.length,\n          activeCount: active.length,\n          requests: 1,\n        });\n        return active;\n      })\n      .catch(function (error) {\n        state.reactionFeedHydrationSignature = \"\";\n        claim(\"viewer-reaction-feed-hydration:blocked\", {\n          error: (error && error.message) || String(error),\n        });\n        return null;\n      });\n  }\n  function cssAttrValue(value) {\r\n    value = String(value || \"\");\r\n    try {\r\n      if (window.CSS && typeof window.CSS.escape == \"function\")\r\n        return window.CSS.escape(value);\r\n    } catch (e) {}\r\n    return value.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, '\\\\\"');\r\n  }\r\n  function updatePostViewCounterDom(postRecord, views) {\r\n    var keys = counterIdentityKeys(postRecord);\r\n    keys.length || (keys = [String(postRecord || \"\").trim()].filter(Boolean));\r\n    var counters = [];\r\n    (keys.forEach(function (key) {\r\n      qsa(\r\n        '.dsd-post-card[data-post-id=\"' +\r\n          cssAttrValue(key) +\r\n          '\"] .dsd-post-view-counter',\r\n      ).forEach(function (counter) {\r\n        counters.indexOf(counter) === -1 && counters.push(counter);\r\n      });\r\n    }),\r\n      counters.forEach(function (counter) {\r\n        var next = Math.max(0, Number(views || 0));\r\n        ((counter.textContent = next + \" views\"),\r\n          counter.setAttribute(\"aria-label\", next + \" post views\"),\r\n          counter.setAttribute(\"data-dsd-counter-value\", String(next)),\r\n          counter.setAttribute(\r\n            \"data-dsd-counter-source\",\r\n            supabaseCutoverConfigured()\r\n              ? \"supabase-view-counter\"\r\n              : \"owner-fallback\",\r\n          ),\r\n          counter.setAttribute(\r\n            \"data-dsd-counter-dedupe\",\r\n            supabaseCutoverConfigured()\r\n              ? \"viewer-key-server-dedupe\"\r\n              : \"owner-session-fallback\",\r\n          ));\r\n      }));\r\n  }\r\n  function anonymousCounterViewerKey() {\r\n    var key = \"\";\r\n    try {\r\n      ((key = localStorage.getItem(\"dsd.publicCounter.viewerKey\") || \"\"),\r\n        key ||\r\n          ((key =\r\n            \"v-\" +\r\n            Date.now().toString(36) +\r\n            \"-\" +\r\n            Math.random().toString(36).slice(2, 12)),\r\n          localStorage.setItem(\"dsd.publicCounter.viewerKey\", key)));\r\n    } catch (e) {\r\n      key =\r\n        \"volatile-\" +\r\n        Date.now().toString(36) +\r\n        \"-\" +\r\n        Math.random().toString(36).slice(2, 8);\r\n    }\r\n    return key;\r\n  }\r\n  function counterIdentityKeys(record) {\r\n    if (typeof record == \"string\" || typeof record == \"number\")\r\n      return [String(record || \"\").trim()].filter(Boolean);\r\n    record = record || {};\r\n    var keys = [\r\n      record.postId,\r\n      record.legacyPostId,\r\n      record.legacy_post_id,\r\n      record.id,\r\n      record.supabasePostId,\r\n      record.supabase_post_id,\r\n      record.targetId,\r\n      record.legacyId,\r\n    ]\r\n      .map(function (value) {\r\n        return String(value || \"\").trim();\r\n      })\r\n      .filter(Boolean);\r\n    return keys.filter(function (value, index) {\r\n      return keys.indexOf(value) === index;\r\n    });\r\n  }\r\n  function recordSupabaseViewCounter(surface, payload) {\r\n    return supabaseCutoverConfigured()\r\n      ? ((payload = Object.assign(\r\n          {\r\n            surface: surface,\r\n            viewerKey: anonymousCounterViewerKey(),\r\n            viewerAuthenticated: shopifyAuthenticated(),\r\n          },\r\n          payload || {},\r\n        )),\r\n        fetch(\"/apps/dsd-firebase-custom-token/supabase/view-counter\", {\r\n          method: \"POST\",\r\n          credentials: \"include\",\r\n          headers: {\r\n            Accept: \"application/json\",\r\n            \"Content-Type\": \"application/json\",\r\n          },\r\n          body: JSON.stringify(payload),\r\n        })\r\n          .then(function (res) {\r\n            if (!res.ok) throw new Error(\"View counter failed: \" + res.status);\r\n            return res.json();\r\n          })\r\n          .catch(function (error) {\r\n            return (\r\n              claim(\"supabase-view-counter:blocked\", {\r\n                surface: surface,\r\n                targetId:\r\n                  payload.targetId || payload.id || payload.profileKey || \"\",\r\n                error: (error && error.message) || String(error),\r\n              }),\r\n              null\r\n            );\r\n          }))\r\n      : Promise.resolve(null);\r\n  }\r\n  function counterValue(result, keys, fallback) {\r\n    result = result || {};\r\n    var sources = [result];\r\n    (result.post && sources.push(result.post),\r\n      result.story && sources.push(result.story),\r\n      result.counts && sources.push(result.counts));\r\n    for (var s = 0; s < sources.length; s++)\r\n      for (var i = 0; i < keys.length; i++) {\r\n        var value = sources[s] && sources[s][keys[i]];\r\n        if (value != null && value !== \"\") return Number(value || 0);\r\n      }\r\n    return Number(fallback || 0);\r\n  }\r\n  function stableViewCounter(record, counts) {\r\n    ((record = record || {}), (counts = counts || record.counts || {}));\r\n    var canonicalValues = [\r\n      counts.views,\r\n      counts.view_count,\r\n      counts.viewCount,\r\n      counts.count,\r\n      record.viewCount,\r\n      record.view_count,\r\n      record.views,\r\n      record.count,\r\n    ]\r\n      .filter(function (value) {\r\n        return value != null && value !== \"\";\r\n      })\r\n      .map(function (value) {\r\n        return Number(value);\r\n      })\r\n      .filter(function (value) {\r\n        return isFinite(value) && value >= 0;\r\n      });\r\n    return canonicalValues.length ? canonicalValues[0] : 0;\r\n  }\r\n  function recordPostViews(posts) {\r\n    (posts || []).slice(0, 20).forEach(function (post) {\r\n      var id = post && (post.postId || post.id);\r\n      if (\r\n        !(!id || state.postViewClaims[id] || !canRecordPostView(post)) &&\r\n        shopifyAuthenticated()\r\n      ) {\r\n        state.postViewClaims[id] = now();\r\n        var counts = Object.assign({}, post.counts || {}),\r\n          currentViews = stableViewCounter(post, counts);\r\n        if (supabaseCutoverConfigured()) {\r\n          recordSupabaseViewCounter(\"post\", {\r\n            targetId: post.supabasePostId || id,\r\n            legacyId: post.postId || post.legacyPostId || id,\r\n          }).then(function (result) {\r\n            if (!result)\r\n              return (\r\n                patchLocalPost(id, {\r\n                  counts: Object.assign({}, counts, {\r\n                    views: currentViews,\r\n                    viewCount: currentViews,\r\n                  }),\r\n                  views: currentViews,\r\n                  viewCount: currentViews,\r\n                }),\r\n                updatePostViewCounterDom(post, currentViews),\r\n                null\r\n              );\r\n            var resultViews = counterValue(\r\n                result,\r\n                [\"viewCount\", \"view_count\", \"views\", \"count\"],\r\n                currentViews,\r\n              ),\r\n              confirmedViews = Math.max(0, Number(resultViews || 0)),\r\n              confirmedCounts = Object.assign({}, counts, {\r\n                views: confirmedViews,\r\n                viewCount: confirmedViews,\r\n              });\r\n            return (\r\n              patchLocalPost(id, {\r\n                counts: confirmedCounts,\r\n                views: confirmedCounts.views,\r\n                viewCount: confirmedCounts.views,\r\n              }),\r\n              updatePostViewCounterDom(post, confirmedCounts.views),\r\n              result\r\n            );\r\n          });\r\n          return;\r\n        }\r\n        updatePostViewCounterDom(post, currentViews);\r\n      }\r\n    });\r\n  }\r\n  function canRecordPostView(post) {\r\n    if (\r\n      !post ||\r\n      !publicRecordVisible(post) ||\r\n      !isApprovedPublicRecord(post) ||\r\n      isRestrictedShellRecord(post)\r\n    )\r\n      return !1;\r\n    var visibility = String(\r\n      post.visibility || (post.entity && post.entity.visibility) || \"public\",\r\n    ).toLowerCase();\r\n    if (visibility === \"hidden\" || !canViewPrivateRecord(post)) return !1;\r\n    var restriction = classifiedRestrictionType(post);\r\n    return restriction && !canViewClassified(post)\r\n      ? !1\r\n      : visibility === \"public\" || visibility === \"gated\";\r\n  }\r\n  function canEditPost(post) {\r\n    return !!(\r\n      post &&\r\n      canUseSocialActions() &&\r\n      recordOwnedByCurrentProfile(post)\r\n    );\r\n  }\r\n  function postKey(post) {\r\n    return (post && (post.postId || post.id)) || \"\";\r\n  }\r\n  function localPostById(postId) {\r\n    var target = String(postId || \"\").trim();\r\n    return (\r\n      (target &&\r\n        state.posts.filter(function (item) {\r\n          return (\r\n            postKey(item) === target ||\r\n            counterIdentityKeys(item).indexOf(target) !== -1\r\n          );\r\n        })[0]) ||\r\n      null\r\n    );\r\n  }\r\n  function patchLocalPost(postId, payload) {\r\n    var changed = !1;\r\n    return (\r\n      (state.posts = state.posts.map(function (item) {\r\n        return postKey(item) !== postId\r\n          ? item\r\n          : ((changed = !0), Object.assign({}, item, payload));\r\n      })),\r\n      changed\r\n    );\r\n  }\r\n  function hideLocalPost(postId, payload) {\r\n    if (!postId) return !1;\r\n    ((state.localDeletedPostIds[postId] = now()),\r\n      saveDeletedPostTombstones(state.localDeletedPostIds));\r\n    var changed = patchLocalPost(\r\n      postId,\r\n      Object.assign({ status: \"deleted\" }, payload || {}),\r\n    );\r\n    return (\r\n      changed ||\r\n        (state.posts = state.posts.filter(function (item) {\r\n          return postKey(item) !== postId;\r\n        })),\r\n      renderAll(),\r\n      !0\r\n    );\r\n  }\r\n  function saveLocalPostStateOverride(postId, payload) {\r\n    !postId ||\r\n      !payload ||\r\n      ((state.localPostStateOverrides[postId] = Object.assign(\r\n        {},\r\n        state.localPostStateOverrides[postId] || {},\r\n        payload,\r\n        { localOverrideAt: now() },\r\n      )),\r\n      savePostStateOverrides(state.localPostStateOverrides));\r\n  }\r\n  function editPost(postId, updates) {\n    if (!requireActiveProfile(\"edit posts\")) return Promise.resolve(null);\n    updates = updates || {};\n    var post = localPostById(postId);\n    if (!canEditPost(post))\n      return (\n        renderStatus(\"Only the post owner can edit this post.\"),\n        Promise.resolve(null)\n      );\n    var body = String(updates.body == null ? post.body || \"\" : updates.body)\n      .trim()\n      .slice(0, MAX.body);\n    if (!body && !(post.media && post.media.length))\n      return (\n        renderStatus(\"Post edit requires text, image, video, or mixed media.\"),\n        Promise.resolve(null)\n      );\n    renderStatus(\"Saving post edit...\");\n    return postOwnerMutationViaProxy({\n      action: \"edit\",\n      postId: postId,\n      body: body,\n      mentionProfileKeys: postMentionProfileKeys(body),\n      idempotencyKey:\n        \"owner-post-edit:\" + postId + \":\" + Date.now().toString(36),\n    })\n      .then(function (result) {\n        var mutation = (result && result.mutation) || {},\n          row = mutation.post || {};\n        patchLocalPost(postId, {\n          body: row.body == null ? body : row.body,\n          updatedAt: row.updated_at || new Date().toISOString(),\n          editedAt: row.updated_at || new Date().toISOString(),\n        });\n        (claim(\"post-edit:atomic-owner\", {\n          postId: postId,\n          mediaRelationshipsPreserved: (mutation.mediaIds || []).length,\n          mentionCount: Number(mutation.mentionCount || 0),\n        }),\n          renderStatus(\"Post updated.\"),\n          renderAll());\n        return mutation;\n      })\n      .catch(function (error) {\n        return (\n          renderStatus(\n            error && error.status === 403\n              ? \"Only the post owner can edit this post.\"\n              : \"Post edit could not be saved.\",\n          ),\n          claim(\"post-edit:atomic-owner-blocked\", {\n            postId: postId,\n            status: (error && error.status) || 0,\n            error: (error && error.message) || String(error),\n          }),\n          null\n        );\n      });\n  }\n  function closePostAudienceEditor() {\n    var layer = qs(\"[data-dsd-post-audience-editor-layer]\");\n    layer && layer.remove();\n    scheduleGlobalOverlayStateSync();\n  }\n  function postAudienceSelectValue(post) {\n    var policy = visibilityPolicyFromInput(Object.assign({}, (post && post.entity) || {}, post || {}));\n    return policy.accessGate === \"dsd_plus\" || policy.contentRating === \"gated\"\n      ? \"gated\"\n      : policy.contentRating === \"explicit\"\n        ? \"explicit\"\n        : policy.contentRating === \"mature\"\n          ? \"mature\"\n          : policy.visibility;\n  }\n  function openPostAudienceEditor(postId) {\n    var post = localPostById(postId);\n    if (!canEditPost(post)) return !1;\n    closePostAudienceEditor();\n    var layer = document.createElement(\"div\"),\n      root = canonicalOverlayRoot();\n    layer.className = \"dsd-up315__modal-layer dsd-composer-modal-layer dsd-post-audience-editor-layer\";\n    layer.setAttribute(\"data-dsd-post-audience-editor-layer\", BUILD);\n    layer.innerHTML = '<div class=\"dsd-up315__modal-backdrop\" data-dsd-post-audience-editor-close></div><div class=\"dsd-up315__modal dsd-composer-modal-shell\" role=\"dialog\" aria-modal=\"true\" aria-label=\"Change post audience\" tabindex=\"-1\"><header><strong>Change audience</strong><button type=\"button\" data-dsd-post-audience-editor-close aria-label=\"Close audience editor\">&times;</button></header><section class=\"dsd-up315__modal-panel is-active\"><div class=\"dsd-up315__modal-card\"><form data-dsd-post-audience-editor-form data-post-id=\"' + html(postId) + '\"><label>Who can see this post' + publicationOptions(\"Post\") + '</label>' + privatePostAudienceHTML(\"Post\") + '<button type=\"submit\">Save audience</button><output aria-live=\"polite\"></output></form></div></section></div>';\n    root.appendChild(layer);\n    var select = qs('select[name=\"visibility\"]', layer);\n    select && (select.value = postAudienceSelectValue(post));\n    var privateAudience = qs(\"[data-dsd-private-post-audience]\", layer);\n    privateAudience &&\n      privateAudience.setAttribute(\n        \"data-dsd-recipient-profile-keys\",\n        (post.recipientProfileKeys || []).join(\",\"),\n      );\n    refreshPublicationControls(layer);\n    scheduleGlobalOverlayStateSync();\n    var dialog = qs('[role=\"dialog\"]', layer);\n    dialog && dialog.focus();\n    return !0;\n  }\n  function changePostAudience(postId, selectedValue, form, recipientProfileKeys) {\n    var policy = visibilityPolicyFromInput({ visibility: selectedValue }),\n      submit = form && qs('button[type=\"submit\"]', form),\n      output = form && qs(\"output\", form);\n    submit && (submit.disabled = !0);\n    output && (output.textContent = \"Saving audience...\");\n    return postOwnerMutationViaProxy({\n      action: \"audience\",\n      postId: postId,\n      visibility: policy.visibility,\n      contentRating: policy.contentRating,\n      accessGate: policy.accessGate || \"none\",\n      recipientProfileKeys: recipientProfileKeys || [],\n      idempotencyKey: \"owner-post-audience:\" + postId + \":\" + Date.now().toString(36),\n    }).then(function (result) {\n      var mutation = result && result.mutation || {}, row = mutation.post || mutation;\n      patchLocalPost(postId, {\n        visibility: row.visibility || policy.visibility,\n        contentRating: row.content_rating || policy.contentRating,\n        accessGate: row.access_gate || policy.accessGate,\n        recipientProfileKeys:\n          policy.visibility === \"private\" ? recipientProfileKeys || [] : [],\n        publicSafe: row.public_safe === !0,\n        updatedAt: row.updated_at || new Date().toISOString(),\n      });\n      renderAll();\n      closePostAudienceEditor();\n      renderStatus(\"Post audience updated.\");\n      return mutation;\n    }).catch(function (error) {\n      output && (output.textContent = error && error.status === 403 ? \"This audience is not available for your account.\" : \"Audience could not be updated.\");\n      return null;\n    }).finally(function () { submit && (submit.disabled = !1); });\n  }\n  function deletePost(postId) {\n    if (!requireActiveProfile(\"delete posts\")) return Promise.resolve(null);\n    var post = localPostById(postId);\n    if (!canEditPost(post))\n      return (\n        renderStatus(\"Only the post owner can delete this post.\"),\n        Promise.resolve(null)\n      );\n    renderStatus(\"Deleting post...\");\n    return postOwnerMutationViaProxy({\n      action: \"delete\",\n      postId: postId,\n      idempotencyKey:\n        \"owner-post-delete:\" + postId + \":\" + Date.now().toString(36),\n    })\n      .then(function (result) {\n        var mutation = (result && result.mutation) || {};\n        (hideLocalPost(postId, {\n          status: \"deleted\",\n          deletedAt: mutation.deletedAt || new Date().toISOString(),\n        }),\n          (state.savedItems = activeSavedItems(state.savedItems).filter(\n            function (item) {\n              return (item.targetId || item.postId || item.id) !== postId;\n            },\n          )),\n          (state.viewedSavedItems = activeSavedItems(\n            state.viewedSavedItems,\n          ).filter(function (item) {\n            return (item.targetId || item.postId || item.id) !== postId;\n          })),\n          (state.localSavedStateOverrides[postId] = \"removed\"),\n          saveSavedStateOverrides(state.localSavedStateOverrides),\n          claim(\"post-delete:atomic-owner\", {\n            postId: postId,\n            commentsArchived: Number(mutation.commentsArchived || 0),\n            reactionsDeleted: Number(mutation.reactionsDeleted || 0),\n            savesDeleted: Number(mutation.savesDeleted || 0),\n            mediaRelationshipsRetained: Number(\n              mutation.mediaRelationshipsRetained || 0,\n            ),\n          }),\n          renderStatus(\"Post deleted.\"),\n          renderAll());\n        return mutation;\n      })\n      .catch(function (error) {\n        return (\n          renderStatus(\n            error && error.status === 403\n              ? \"Only the post owner can delete this post.\"\n              : \"Post could not be deleted.\",\n          ),\n          claim(\"post-delete:atomic-owner-blocked\", {\n            postId: postId,\n            status: (error && error.status) || 0,\n            error: (error && error.message) || String(error),\n          }),\n          null\n        );\n      });\n  }\n  function relationshipMutationViaProxy(action, targetUid, targetProfileKey) {\n    var idempotencyKey =\n      \"relationship:\" + Date.now() + \":\" + Math.random().toString(36).slice(2, 12);\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/relationship-decision\", {\n      method: \"POST\",\n      credentials: \"include\",\n      headers: { \"Content-Type\": \"application/json\", Accept: \"application/json\" },\n      body: JSON.stringify({\n        action: action,\n        targetUid: targetUid || \"\",\n        targetProfileKey: targetProfileKey || \"\",\n        idempotencyKey: idempotencyKey,\n      }),\n    }).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try { body = text ? JSON.parse(text) : {}; } catch (e) { body = {}; }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error((body && body.error) || \"relationship_mutation_failed\");\n          throw ((error.status = response.status), (error.body = body), error);\n        }\n        return body;\n      });\n    });\n  }\n  function interactionMutationViaProxy(payload) {\n    payload = Object.assign({}, payload || {});\n    if (!payload.idempotencyKey)\n      payload.idempotencyKey =\n        \"interaction:\" + Date.now() + \":\" + Math.random().toString(36).slice(2, 12);\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/interaction-mutation\", {\n      method: \"POST\",\n      credentials: \"include\",\n      headers: { \"Content-Type\": \"application/json\", Accept: \"application/json\" },\n      body: JSON.stringify(payload),\n    }).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try { body = text ? JSON.parse(text) : {}; } catch (e) { body = {}; }\n        if (!response.ok || body.ok === !1) {\n          var error = new Error((body && body.error) || \"interaction_mutation_failed\");\n          throw ((error.status = response.status), (error.body = body), error);\n        }\n        return body;\n      });\n    });\n  }\n  function followProfile(targetUid, targetProfileKey) {\n    ((targetProfileKey = clean(targetProfileKey || \"\", \"\")),\n      !targetUid &&\n        targetProfileKey &&\n        (targetUid = profileActionIdentity(\n          profileUidForKey(targetProfileKey),\n          targetProfileKey,\n        )));\n    var sourceUid = actorRelationshipIdentity();\r\n    if (\r\n      !requireActiveProfile(\"follow profiles\") ||\r\n      !targetUid ||\r\n      targetUid === sourceUid\r\n    )\n      return Promise.resolve(null);\n    return relationshipMutationViaProxy(\"follow\", targetUid, targetProfileKey)\n        .then(function (result) {\n          var requested = result && result.state === \"requested\";\n          state.followRequestByUid[targetUid] = requested;\n          state.followingByUid[targetUid] = !requested;\n          renderProfileIdentity(); renderDiscovery(); renderRelationships(); renderPosts(\"follow-profile\");\n          renderStatus(requested ? \"Follow request sent.\" : \"Profile followed.\");\n          return loadOwnProfileRelationshipsViaProxy().then(function () {\n            return result;\n          });\n        })\n        .catch(function (error) {\n          renderStatus(error && error.message === \"relationship_blocked\" ? \"Blocked profiles cannot be followed.\" : \"Profile could not be followed.\");\n          return null;\n        });\n  }\n  function unfollowProfile(targetUid, targetProfileKey) {\n    var sourceUid = actorRelationshipIdentity();\r\n    if (\r\n      !requireActiveProfile(\"unfollow profiles\") ||\r\n      !targetUid ||\r\n      targetUid === sourceUid\r\n    )\n      return Promise.resolve(null);\n    return relationshipMutationViaProxy(\n      \"unfollow\",\n      targetUid,\n      targetProfileKey || \"\",\n    )\n        .then(function (result) {\n          var targetKey = normalizedProfileKeyValue(targetProfileKey || \"\"),\n            profileStateKey = targetKey ? \"profile-key:\" + targetKey : \"\",\n            canonicalTargetUid = targetKey\n              ? String(profileUidForKey(targetKey) || \"\").trim()\n              : \"\";\n          state.followingByUid[targetUid] = !1;\n          state.followRequestByUid[targetUid] = !1;\n          profileStateKey && (state.followingByUid[profileStateKey] = !1);\n          profileStateKey && (state.followRequestByUid[profileStateKey] = !1);\n          canonicalTargetUid && (state.followingByUid[canonicalTargetUid] = !1);\n          canonicalTargetUid && (state.followRequestByUid[canonicalTargetUid] = !1);\n          state.followingRecords = state.followingRecords.filter(function (item) {\n            return !relationshipRecordTargetsProfile(\n              item,\n              canonicalTargetUid || targetUid,\n              targetKey,\n            );\n          });\n          state.followRequestRecords = state.followRequestRecords.filter(\n            function (item) {\n              return !relationshipRecordTargetsProfile(\n                item,\n                canonicalTargetUid || targetUid,\n                targetKey,\n              );\n            },\n          );\n          renderProfileIdentity(); renderDiscovery(); renderRelationships(); renderPosts(\"unfollow-profile\");\n          renderStatus(\"Profile unfollowed.\");\n          return loadOwnProfileRelationshipsViaProxy().then(function () {\n            return result;\n          });\n        })\n        .catch(function () { renderStatus(\"Profile could not be unfollowed.\"); return null; });\n  }\n  function toggleFollowProfile(targetUid, targetProfileKey) {\n    return (\n      (targetProfileKey = clean(targetProfileKey || \"\", \"\")),\n      !targetUid &&\n        targetProfileKey &&\n        (targetUid = profileActionIdentity(\n          profileUidForKey(targetProfileKey),\n          targetProfileKey,\n        )),\n      relationshipBlockedProfile(targetUid, targetProfileKey)\n        ? (renderStatus(\"Blocked profiles cannot be followed.\"),\n          Promise.resolve(null))\n        : currentViewerFollowsProfile(targetUid, targetProfileKey) ||\n            currentViewerRequestedProfile(targetUid, targetProfileKey)\n          ? unfollowProfile(targetUid, targetProfileKey)\n          : followProfile(targetUid, targetProfileKey)\n    );\n  }\n  function relationshipBlocked(targetUid) {\r\n    return (\r\n      (targetUid = String(targetUid || \"\").trim()),\r\n      !!(\r\n        targetUid &&\r\n        (state.blockedByUid[targetUid] || state.blockedMeByUid[targetUid])\r\n      )\r\n    );\r\n  }\r\n  function conversationBlocked(conversation) {\n    var peer = conversationPeer(conversation || {});\n    if (peer && relationshipBlockedProfile(peer.uid, peer.key || \"\")) return !0;\n    var ids = (\r\n        (conversation &&\r\n          (conversation.participantIds ||\r\n            conversation.participants ||\r\n            conversation.participant_ids)) ||\r\n        []\r\n      ).filter(Boolean),\r\n      sourceUid = actorRelationshipIdentity();\r\n    return ids.some(function (item) {\r\n      return String(item || \"\") !== sourceUid && relationshipBlocked(item);\r\n    });\r\n  }\r\n  function recordOwnerUid(record) {\r\n    return (\r\n      (record && (record.authorUid || record.ownerUid || record.uid || \"\")) ||\r\n      \"\"\r\n    );\r\n  }\r\n  function postOwnerBlocked(postId, action) {\r\n    var post = localPostById(postId) || {},\r\n      ownerUid = recordOwnerUid(post);\r\n    return ownerUid &&\r\n      ownerUid !== actorRelationshipIdentity() &&\r\n      relationshipBlocked(ownerUid)\r\n      ? (renderStatus(\r\n          \"Blocked profiles cannot be \" + (action || \"interacted with\") + \".\",\r\n        ),\r\n        !0)\r\n      : !1;\r\n  }\r\n  function blockProfile(targetUid, targetProfileKey) {\n    ((targetProfileKey = clean(targetProfileKey || \"\", \"\")),\n      !targetUid &&\n        targetProfileKey &&\n        (targetUid = profileUidForKey(targetProfileKey)),\n      (targetUid = String(targetUid || \"\").trim()));\n    var sourceUid = actorRelationshipIdentity(),\n      targetStateKey = profileActionIdentity(targetUid, targetProfileKey);\n    if (\n      !requireActiveProfile(\"block profiles\") ||\n      !targetStateKey ||\n      identityMatchesCurrent(targetUid, targetProfileKey) ||\n      (targetUid && targetUid === sourceUid)\n    )\n      return Promise.resolve(null);\n    return relationshipMutationViaProxy(\"block\", targetUid, targetProfileKey)\n        .then(function (result) {\n          var resolvedUid = String((result && result.targetUid) || targetUid || \"\").trim(),\n            targetKey = normalizedProfileKeyValue((result && result.targetProfileKey) || targetProfileKey),\n            resolvedStateKey = profileActionIdentity(resolvedUid, targetKey) || targetStateKey;\n          state.followingByUid[resolvedStateKey] = !1; state.followRequestByUid[resolvedStateKey] = !1; state.blockedByUid[resolvedStateKey] = !0;\n          resolvedUid && (state.blockedByUid[resolvedUid] = !0);\n          targetKey && (state.blockedByUid[\"profile-key:\" + targetKey] = !0);\n          state.followingRecords = state.followingRecords.filter(function (item) {\n            return !relationshipRecordTargetsProfile(item, resolvedUid, targetKey);\n          });\n          renderProfileIdentity(); renderDiscovery(); renderRelationships(); renderMessages(); renderStatus(\"Profile blocked.\");\n          emit(\"profile-blocked\", { targetUid: resolvedUid, targetProfileKey: targetKey });\n          return result;\n        })\n        .catch(function () { renderStatus(\"Profile could not be blocked.\"); return null; });\n  }\n  function unblockProfile(targetUid, targetProfileKey) {\n    ((targetProfileKey = clean(targetProfileKey || \"\", \"\")),\r\n      !targetUid &&\r\n        targetProfileKey &&\r\n        (targetUid = profileUidForKey(targetProfileKey)),\r\n      (targetUid = String(targetUid || \"\").trim()));\r\n    var sourceUid = actorRelationshipIdentity(),\n      targetStateKey = profileActionIdentity(targetUid, targetProfileKey);\n    if (\n      !requireActiveProfile(\"unblock profiles\") ||\n      !targetStateKey ||\n      identityMatchesCurrent(targetUid, targetProfileKey) ||\n      (targetUid && targetUid === sourceUid)\n    )\n      return Promise.resolve(null);\n    return relationshipMutationViaProxy(\"unblock\", targetUid, targetProfileKey)\n        .then(function (result) {\n          var resolvedUid = String((result && result.targetUid) || targetUid || \"\").trim(),\n            targetKey = normalizedProfileKeyValue((result && result.targetProfileKey) || targetProfileKey),\n            resolvedStateKey = profileActionIdentity(resolvedUid, targetKey) || targetStateKey;\n          delete state.blockedByUid[resolvedStateKey];\n          resolvedUid && delete state.blockedByUid[resolvedUid];\n          targetKey && delete state.blockedByUid[\"profile-key:\" + targetKey];\n          state.blockedRecords = state.blockedRecords.filter(function (item) {\n            return !relationshipRecordTargetsProfile(\n              item,\n              resolvedUid,\n              targetKey,\n            );\n          });\n          renderProfileIdentity(); renderDiscovery(); renderRelationships(); renderMessages(); renderStatus(\"Profile unblocked.\");\n          return result;\n        })\n        .catch(function () { renderStatus(\"Profile could not be unblocked.\"); return null; });\n  }\n  function resolveFollowRequestViaProxy(sourceUid, sourceProfileKey, decision) {\n    return fetch(\r\n      \"/apps/dsd-firebase-custom-token/supabase/relationship-decision\",\r\n      {\r\n        method: \"POST\",\r\n        credentials: \"include\",\r\n        headers: {\r\n          \"Content-Type\": \"application/json\",\r\n          Accept: \"application/json\",\r\n        },\r\n        body: JSON.stringify({\n          sourceUid: sourceUid,\n          sourceProfileKey: sourceProfileKey || \"\",\n          decision: decision === \"active\" ? \"active\" : \"declined\",\n        }),\r\n      },\r\n    ).then(function (response) {\r\n      return response.text().then(function (text) {\r\n        var body = {};\r\n        try {\r\n          body = text ? JSON.parse(text) : {};\r\n        } catch (e) {\r\n          body = { raw: text };\r\n        }\r\n        if (!response.ok || body.ok === !1) {\r\n          var error = new Error(\r\n            (body && (body.message || body.error)) ||\r\n              \"relationship decision failed: \" + response.status,\r\n          );\r\n          throw ((error.status = response.status), (error.body = body), error);\r\n        }\r\n        return body;\r\n      });\r\n    });\r\n  }\r\n  function resolveFollowRequest(sourceUid, sourceProfileKey, decision) {\r\n    var targetUid = actorRelationshipIdentity();\r\n    if (\r\n      !requireActiveProfile(\"manage follow requests\") ||\r\n      (!sourceUid && !sourceProfileKey) ||\n      sourceUid === targetUid\n    )\r\n      return Promise.resolve(null);\r\n    var accepted = decision === \"active\",\r\n      follower = {\r\n        uid: targetUid,\r\n        sourceUid: sourceUid,\r\n        sourceProfileKey: sourceProfileKey || \"\",\r\n        targetUid: targetUid,\r\n        targetProfileKey: profileKey(),\r\n        state: accepted ? \"active\" : \"declined\",\r\n        firestorePath: PATHS.followers,\r\n      },\r\n      following = {\r\n        uid: sourceUid,\r\n        sourceUid: sourceUid,\r\n        sourceProfileKey: sourceProfileKey || \"\",\r\n        targetUid: targetUid,\r\n        targetProfileKey: profileKey(),\r\n        state: accepted ? \"active\" : \"declined\",\r\n        firestorePath: PATHS.following,\r\n      };\r\n    function applyResolved() {\r\n      return (\r\n        (state.incomingFollowRequests = state.incomingFollowRequests.filter(\r\n          function (item) {\r\n            return item.sourceUid !== sourceUid;\r\n          },\r\n        )),\r\n        accepted &&\r\n          ((state.followersRecords = mergeByKey(\n            state.followersRecords,\n            [follower],\n            [\"sourceUid\", \"id\"],\n          )),\n          refreshPublicRelationshipCounts(targetUid, profileKey(), 1)),\n        renderRelationships(),\r\n        renderProfileIdentity(),\r\n        renderStatus(\r\n          accepted ? \"Follow request accepted.\" : \"Follow request declined.\",\r\n        ),\r\n        follower\r\n      );\r\n    }\r\n    return resolveFollowRequestViaProxy(\n      sourceUid,\n      sourceProfileKey,\n      accepted ? \"active\" : \"declined\",\n    )\r\n      .then(applyResolved)\n      .catch(function (proxyError) {\n        return (\n          claim(\"follow-request-decision-proxy:blocked\", {\n            sourceUid: sourceUid,\n            decision: accepted ? \"active\" : \"declined\",\n            error: (proxyError && proxyError.message) || String(proxyError),\n          }),\n          renderStatus(\"Follow request could not be updated.\"),\n          null\n        );\n      });\n  }\r\n  function saveItem(targetType, targetId) {\r\n    if (!requireActiveProfile(\"save content\") || !targetId)\r\n      return Promise.resolve(null);\r\n    var actor = actorUid() || uid() || \"\";\r\n    if (\r\n      !actor ||\r\n      ((targetType === \"post\" || !targetType) &&\r\n        postOwnerBlocked(targetId, \"saved\"))\r\n    )\r\n      return Promise.resolve(null);\r\n    var payload = {\r\n        ownerUid: actor,\r\n        targetType: targetType || \"post\",\r\n        targetId: targetId,\r\n        state: \"saved\",\r\n        entity: entityMeta(\"save\", \"private\", \"standard\", {\r\n          targetType: targetType || \"post\",\r\n          targetId: targetId,\r\n        }),\r\n        firestorePath: PATHS.saved,\r\n      },\r\n      previous = state.savedItems.slice(),\r\n      previousOverrides = Object.assign(\r\n        {},\r\n        state.localSavedStateOverrides || {},\r\n      );\r\n    return (\r\n      setLocalSavedState(targetId, \"saved\"),\r\n      (state.savedItems = mergeByKey(\r\n        state.savedItems,\r\n        [payload],\r\n        [\"targetId\", \"id\"],\r\n      )),\r\n      syncSaveButtons(targetId, !0),\r\n      renderPosts(),\r\n      renderRelationships(),\r\n      interactionMutationViaProxy({ action: \"save_post\", postId: targetId })\n        .then(function (result) {\n          ((state.savedItems = mergeByKey(\r\n            state.savedItems,\r\n            [payload],\r\n            [\"targetId\", \"id\"],\r\n          )),\r\n            clearLocalSavedState(targetId),\r\n            syncSaveButtons(targetId, !0));\r\n          var savedPost =\r\n            targetType === \"post\" || !targetType\r\n              ? localPostById(targetId) || {}\r\n              : {};\r\n          return (\r\n            notify(\r\n              uid(),\r\n              \"saved\",\r\n              \"Saved\",\r\n              \"Item saved to your profile.\",\r\n              targetType === \"post\" || !targetType\r\n                ? postPermalink(targetId)\r\n                : profileRouteHref(profileKey()),\r\n              {\r\n                targetType: targetType || \"post\",\r\n                targetId: targetId,\r\n                postId: targetId,\r\n                sourcePath:\r\n                  targetType === \"post\" || !targetType\r\n                    ? \"posts/\" + targetId\r\n                    : \"\",\r\n                previewMedia: (savedPost.media || []).slice(0, 2),\r\n              },\r\n            ),\r\n            renderPosts(),\r\n            renderRelationships(),\r\n            renderStatus(\"Post saved.\"),\r\n            result || payload\n          );\r\n        })\r\n        .catch(function (error) {\r\n          return (\r\n            (state.savedItems = previous),\r\n            (state.localSavedStateOverrides = previousOverrides),\r\n            saveSavedStateOverrides(state.localSavedStateOverrides),\r\n            syncSaveButtons(\r\n              targetId,\r\n              previous.some(function (item) {\r\n                return (\r\n                  item &&\r\n                  item.state === \"saved\" &&\r\n                  savedItemMatchesPost(item, targetId)\r\n                );\r\n              }),\r\n            ),\r\n            renderPosts(),\r\n            renderRelationships(),\r\n            queueDraft(\"save-item\", payload, error),\r\n            null\r\n          );\r\n        })\r\n    );\r\n  }\r\n  function unsaveItem(targetType, targetId) {\r\n    if (!requireActiveProfile(\"unsave content\") || !targetId)\r\n      return Promise.resolve(null);\r\n    var actor = actorUid() || uid() || \"\";\r\n    if (!actor) return Promise.resolve(null);\r\n    var previous = state.savedItems.slice(),\r\n      previousOverrides = Object.assign(\r\n        {},\r\n        state.localSavedStateOverrides || {},\r\n      ),\r\n      payload = {\r\n        ownerUid: actor,\r\n        targetType: targetType || \"post\",\r\n        targetId: targetId,\r\n        state: \"removed\",\r\n        removedAt: serverTimestamp(),\r\n        entity: entityMeta(\"save\", \"private\", \"standard\", {\r\n          targetType: targetType || \"post\",\r\n          targetId: targetId,\r\n        }),\r\n        firestorePath: PATHS.saved,\r\n      };\r\n    return (\r\n      setLocalSavedState(targetId, \"removed\"),\r\n      (state.savedItems = state.savedItems.filter(function (item) {\r\n        return !savedItemMatchesPost(item, targetId);\r\n      })),\r\n      syncSaveButtons(targetId, !1),\r\n      renderPosts(),\r\n      renderRelationships(),\r\n      interactionMutationViaProxy({ action: \"unsave_post\", postId: targetId })\n        .then(function (result) {\n          return (\r\n            (state.savedItems = state.savedItems.filter(function (item) {\r\n              return !savedItemMatchesPost(item, targetId);\r\n            })),\r\n            clearLocalSavedState(targetId),\r\n            syncSaveButtons(targetId, !1),\r\n            renderPosts(),\r\n            renderRelationships(),\r\n            renderStatus(\"Post removed from saved.\"),\r\n            result || {\n              targetType: targetType || \"post\",\r\n              targetId: targetId,\r\n              state: \"removed\",\r\n            }\r\n          );\r\n        })\r\n        .catch(function (error) {\r\n          return (\r\n            (state.savedItems = previous),\r\n            (state.localSavedStateOverrides = previousOverrides),\r\n            saveSavedStateOverrides(state.localSavedStateOverrides),\r\n            syncSaveButtons(\r\n              targetId,\r\n              previous.some(function (item) {\r\n                return (\r\n                  item &&\r\n                  item.state === \"saved\" &&\r\n                  savedItemMatchesPost(item, targetId)\r\n                );\r\n              }),\r\n            ),\r\n            renderPosts(),\r\n            renderRelationships(),\r\n            queueDraft(\r\n              \"unsave-item\",\r\n              { targetType: targetType || \"post\", targetId: targetId },\r\n              error,\r\n            ),\r\n            null\r\n          );\r\n        })\r\n    );\r\n  }\r\n  function toggleSaveItem(targetType, targetId) {\n    var mutationKey = \"save:\" + String(targetId || \"\");\n    if (state.interactionMutations[mutationKey]) return Promise.resolve(null);\n    state.interactionMutations[mutationKey] = !0;\n    var savedOverride =\n        state.localSavedStateOverrides &&\r\n        state.localSavedStateOverrides[targetId],\r\n      saved = savedOverride\r\n        ? savedOverride === \"saved\"\r\n        : state.savedItems.some(function (item) {\r\n            return (\r\n              item &&\r\n              item.state === \"saved\" &&\r\n              savedItemMatchesPost(item, targetId)\r\n            );\r\n          });\r\n    return (saved\n      ? unsaveItem(targetType || \"post\", targetId)\n      : saveItem(targetType || \"post\", targetId)).then(function (result) {\n        delete state.interactionMutations[mutationKey];\n        return result;\n      }, function (error) {\n        delete state.interactionMutations[mutationKey];\n        throw error;\n      });\n  }\r\n  function stablePostShareData(postId) {\n    var id = String(postId || \"\").trim();\n    return id\n      ? { title: \"Detroit Sky Daddy post\", url: postPermalink(id) }\n      : null;\n  }\n  function copyStablePostLink(postId) {\n    var shareData = stablePostShareData(postId);\n    if (!shareData) return Promise.resolve(!1);\n    if (navigator.clipboard && navigator.clipboard.writeText)\n      return navigator.clipboard.writeText(shareData.url).then(\n        function () {\n          renderStatus(\"Post link copied.\");\n          return !0;\n        },\n        function () {\n          window.prompt(\"Copy this public post link\", shareData.url);\n          return !0;\n        },\n      );\n    window.prompt(\"Copy this public post link\", shareData.url);\n    return Promise.resolve(!0);\n  }\n  function systemShareStablePostLink(postId) {\n    var shareData = stablePostShareData(postId);\n    if (!shareData) return Promise.resolve(!1);\n    if (!navigator.share) return copyStablePostLink(postId);\n    return navigator.share(shareData).then(\n      function () {\n        return !0;\n      },\n      function (error) {\n        return error && error.name === \"AbortError\"\n          ? !1\n          : copyStablePostLink(postId);\n      },\n    );\n  }\n  function sharePost(postId) {\n    var id = String(postId || \"\").trim();\n    if (!id || postOwnerBlocked(id, \"shared\")) return Promise.resolve(!1);\n    if (!hasCustomer()) return systemShareStablePostLink(id);\n    return Promise.resolve(openShareComposer(id));\n  }\n  function favoriteUser(targetUid, targetProfileKey) {\n    ((targetProfileKey = clean(targetProfileKey || \"\", \"\")),\r\n      !targetUid &&\n        targetProfileKey &&\n        (targetUid = profileActionIdentity(\n          profileUidForKey(targetProfileKey),\n          targetProfileKey,\n        )));\n    var sourceUid = actorRelationshipIdentity();\r\n    if (\r\n      !requireActiveProfile(\"favorite profiles\") ||\r\n      !targetUid ||\r\n      targetUid === sourceUid\r\n    )\r\n      return Promise.resolve(null);\r\n    if (relationshipBlocked(targetUid))\r\n      return (\r\n        renderStatus(\"Blocked profiles cannot be favorited.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var payload = {\r\n      ownerUid: sourceUid,\r\n      targetUid: targetUid,\r\n      targetProfileKey: targetProfileKey || \"\",\r\n      state: \"favorite\",\r\n      entity: entityMeta(\"favorite\", \"private\", \"standard\", {\r\n        targetUid: targetUid,\r\n        targetProfileKey: targetProfileKey || \"\",\r\n      }),\r\n      firestorePath: PATHS.favorites,\r\n    };\r\n    return interactionMutationViaProxy({\n      action: \"favorite_profile\",\n      targetUid: targetUid,\n      targetProfileKey: targetProfileKey || \"\",\n    })\n      .then(function (result) {\n        return (\r\n          (state.favoritesByUid[targetUid] = !0),\r\n          (state.favoritesRecords = mergeByKey(\r\n            state.favoritesRecords,\r\n            [payload],\r\n            [\"targetUid\", \"id\"],\r\n          )),\r\n          renderProfileIdentity(),\r\n          renderDiscovery(),\r\n          renderRelationships(),\r\n          renderPosts(),\r\n          result || payload\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (queueDraft(\"favorite-user\", payload, error), null);\r\n      });\r\n  }\r\n  function unfavoriteUser(targetUid, targetProfileKey) {\r\n    var sourceUid = actorRelationshipIdentity();\r\n    if (\r\n      !requireActiveProfile(\"unfavorite profiles\") ||\r\n      !targetUid ||\r\n      targetUid === sourceUid\r\n    )\r\n      return Promise.resolve(null);\r\n    var payload = {\r\n      ownerUid: sourceUid,\r\n      targetUid: targetUid,\r\n      targetProfileKey: targetProfileKey || \"\",\r\n      state: \"removed\",\r\n      removedAt: serverTimestamp(),\r\n      entity: entityMeta(\"favorite\", \"private\", \"standard\", {\r\n        targetUid: targetUid,\r\n        targetProfileKey: targetProfileKey || \"\",\r\n      }),\r\n      firestorePath: PATHS.favorites,\r\n    };\r\n    return interactionMutationViaProxy({\n      action: \"unfavorite_profile\",\n      targetUid: targetUid,\n      targetProfileKey: targetProfileKey || \"\",\n    })\n      .then(function (result) {\n        return (\r\n          (state.favoritesByUid[targetUid] = !1),\r\n          (state.favoritesRecords = state.favoritesRecords.filter(\r\n            function (item) {\r\n              return item && item.targetUid !== targetUid;\r\n            },\r\n          )),\r\n          renderProfileIdentity(),\r\n          renderDiscovery(),\r\n          renderRelationships(),\r\n          renderPosts(),\r\n          result || payload\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (queueDraft(\"unfavorite-user\", payload, error), null);\r\n      });\r\n  }\r\n  function toggleFavoriteUser(targetUid, targetProfileKey) {\n    targetProfileKey = clean(targetProfileKey || \"\", \"\");\n    var mutationKey = \"favorite:\" + String(targetUid || targetProfileKey || \"\");\n    if (state.interactionMutations[mutationKey]) return Promise.resolve(null);\n    state.interactionMutations[mutationKey] = !0;\n    return Promise.resolve((\n      !targetUid &&\n        targetProfileKey &&\n        (targetUid = profileActionIdentity(\n          profileUidForKey(targetProfileKey),\n          targetProfileKey,\n        )),\n      !currentViewerFavoritedProfile(targetUid, targetProfileKey) &&\n      relationshipBlockedProfile(targetUid, targetProfileKey)\n        ? (renderStatus(\"Blocked profiles cannot be favorited.\"),\n          Promise.resolve(null))\n        : currentViewerFavoritedProfile(targetUid, targetProfileKey)\n          ? unfavoriteUser(targetUid, targetProfileKey)\n          : favoriteUser(targetUid, targetProfileKey)\n    )).then(function (result) {\n      delete state.interactionMutations[mutationKey];\n      return result;\n    }, function (error) {\n      delete state.interactionMutations[mutationKey];\n      throw error;\n    });\n  }\r\n  function notificationRecipientUid(value) {\r\n    var recipient = String(value || uid() || \"\").trim();\r\n    return !recipient ||\r\n      recipient.indexOf(\"/\") !== -1 ||\r\n      recipient.indexOf(\"\\\\\") !== -1 ||\r\n      /[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}/i.test(recipient) ||\r\n      !/^[A-Za-z0-9_-]{6,128}$/.test(recipient)\r\n      ? \"\"\r\n      : recipient;\r\n  }\r\n  function notify(recipientUid, type, title, body, href, meta) {\r\n    if (!hasCustomer()) return Promise.resolve(null);\r\n    var safeRecipient = notificationRecipientUid(recipientUid);\r\n    if (!safeRecipient)\r\n      return (\r\n        claim(\"notification-recipient:blocked\", {\r\n          category: type || \"system\",\r\n          reason: \"invalid-recipient\",\r\n        }),\r\n        Promise.resolve(null)\r\n      );\r\n    if (\r\n      !identityMatchesCurrent(safeRecipient, \"\") &&\r\n      relationshipBlocked(safeRecipient)\r\n    )\r\n      return (\r\n        claim(\"notification-recipient:blocked\", {\r\n          category: type || \"system\",\r\n          reason: \"relationship-blocked\",\r\n          recipientUid: safeRecipient,\r\n        }),\r\n        Promise.resolve(null)\r\n      );\r\n    var actorProfile = profileWithPublicMirror(\r\n        currentComposerProfile() ||\r\n          state.profile ||\r\n          publicProfileByKey(activeProfileKeyValue() || profileKey()) ||\r\n          {},\r\n      ),\r\n      actorKey =\r\n        activeProfileKeyValue() ||\r\n        nonPlaceholderProfileKey(\r\n          actorProfile.profileKey || actorProfile.handle || profileKey() || \"\",\r\n        ),\r\n      actorName =\r\n        activeDisplayNameValue() ||\r\n        actorProfile.displayName ||\r\n        actorKey ||\r\n        displayName(),\r\n      actorAvatarId =\r\n        canonicalProfileAvatarMediaId(actorProfile) ||\r\n        actorProfile.thumbnailMediaId ||\r\n        \"\",\r\n      actorHeaderId =\r\n        canonicalProfileBannerMediaId(actorProfile) ||\r\n        actorProfile.headerMediaId ||\r\n        \"\";\r\n    meta = meta && typeof meta == \"object\" ? meta : {};\r\n    var payload = {\r\n      recipientUid: safeRecipient,\r\n      category: type || \"system\",\r\n      type: type || \"system\",\r\n      title: title || \"Notification\",\r\n      body: body || \"\",\r\n      href: href || \"/pages/notifications\",\r\n      read: !1,\r\n      actorUid: actorRelationshipIdentity(),\r\n      actorProfileKey: actorKey,\r\n      actorDisplayName: actorName,\r\n      actorAvatarMediaId: actorAvatarId,\r\n      actorHeaderMediaId: actorHeaderId,\r\n      thumbnailMediaId: actorAvatarId,\r\n      firestorePath: PATHS.notification,\r\n    };\r\n    return (\r\n      [\r\n        \"targetUid\",\r\n        \"targetProfileKey\",\r\n        \"targetType\",\r\n        \"targetId\",\r\n        \"profileKey\",\r\n        \"postId\",\r\n        \"commentId\",\r\n        \"storyId\",\r\n        \"conversationId\",\r\n        \"sourcePath\",\r\n        \"contentMediaId\",\r\n        \"contentMediaKind\",\r\n        \"contentTitle\",\r\n        \"thumbnailMediaId\",\r\n        \"actorAvatarMediaId\",\r\n        \"actorHeaderMediaId\",\r\n      ].forEach(function (key) {\r\n        meta[key] !== void 0 &&\r\n          meta[key] !== null &&\r\n          (payload[key] = meta[key]);\r\n      }),\r\n      Array.isArray(meta.previewMedia) &&\r\n        (payload.previewMedia = meta.previewMedia.slice(0, 3)),\r\n      Array.isArray(meta.contentMedia) &&\r\n        (payload.contentMedia = meta.contentMedia.slice(0, 3)),\r\n      payload.actorProfileKey || (payload.actorProfileKey = actorKey),\r\n      payload.actorDisplayName || (payload.actorDisplayName = actorName),\r\n      payload.actorAvatarMediaId ||\r\n        (payload.actorAvatarMediaId = actorAvatarId),\r\n      payload.thumbnailMediaId || (payload.thumbnailMediaId = actorAvatarId),\r\n      fetch(\"/apps/dsd-firebase-custom-token/supabase/notification-create\", {\n        method: \"POST\",\n        credentials: \"include\",\n        headers: { \"Content-Type\": \"application/json\", Accept: \"application/json\" },\n        body: JSON.stringify(Object.assign({}, payload, {\n          recipientProfileKey:\n            nonPlaceholderProfileKey(\n              payload.targetProfileKey ||\n                meta.targetProfileKey ||\n                (profileByUid(safeRecipient) &&\n                  profileKeyFromRecord(profileByUid(safeRecipient))) ||\n                \"\",\n            ),\n          targetType: payload.targetType || payload.category || \"system\",\n          targetId:\n            payload.targetId || payload.postId || payload.storyId ||\n            payload.commentId || payload.conversationId || \"\",\n        })),\n      }).then(function (response) {\n        return response.text().then(function (text) {\n          var result = {};\n          try { result = text ? JSON.parse(text) : {}; } catch (e) { result = {}; }\n          if (!response.ok || result.ok === !1) throw new Error(result.error || \"notification_create_failed\");\n          return result.notification || result;\n        });\n      }).catch(function (error) {\n        claim(\"notification-pipeline:blocked\", { category: payload.category, error: error && error.message || String(error) });\n        return null;\n      })\n    );\n  }\r\n  function notificationCategory(item) {\n    var raw = String((item && (item.category || item.type)) || \"system\");\r\n    return raw === \"profile\"\r\n      ? \"relationships\"\r\n      : raw === \"saved\"\r\n        ? \"content\"\r\n        : raw === \"safetyReport\"\r\n          ? \"safety\"\r\n          : raw === \"moderation\"\r\n            ? \"founder\"\r\n            : raw;\n  }\n  function hydrateFavoriteProfiles() {\n    if (!hasCustomer() || state.favoritesProjectionPending)\n      return Promise.resolve(null);\n    state.favoritesProjectionPending = !0;\n    return interactionMutationViaProxy({ action: \"list_favorite_profiles\" })\n      .then(function (result) {\n        var profiles = Array.isArray(result && result.profiles)\n            ? result.profiles.filter(publicProfileVisible)\n            : [],\n          records = Array.isArray(result && result.favorites)\n            ? result.favorites\n            : [];\n        state.publicProfiles = dedupePublicProfiles(\n          (state.publicProfiles || []).concat(profiles),\n        );\n        state.favoritesByUid = {};\n        state.favoritesRecords = records.filter(function (item) {\n          return item && item.state === \"favorite\";\n        });\n        state.favoritesRecords.forEach(function (item) {\n          item.targetUid && (state.favoritesByUid[item.targetUid] = !0);\n        });\n        state.favoritesRecordsLoaded = !0;\n        publishPublicProfiles(state.publicProfiles);\n        renderProfileIdentity();\n        renderDiscovery();\n        renderRelationships();\n        renderPosts();\n        return records;\n      })\n      .catch(function (error) {\n        state.favoritesRecordsLoaded = !0;\n        claim(\"favorites-profile-projection:blocked\", {\n          error: (error && error.message) || String(error),\n          failClosed: !0,\n        });\n        renderRelationships();\n        return null;\n      })\n      .then(function (result) {\n        state.favoritesProjectionPending = !1;\n        return result;\n      });\n  }\n  function notificationRelationshipFilter(item) {\n    item = item || {};\n    var source = String(\n        item.sourceType || item.source_type || item.type || \"\",\n      ).toLowerCase(),\n      title = String(item.title || \"\").toLowerCase(),\n      body = String(item.body || \"\").toLowerCase();\n    if (source === \"connection_wave\" || /\\bnew wave\\b|\\bwaved you\\b/.test(title + \" \" + body))\n      return \"waves\";\n    if (source === \"mutual_heat\" || /\\bmutual heat\\b|\\bmutual interest\\b|\\bboth signaled interest\\b/.test(title + \" \" + body))\n      return \"interest\";\n    if (source === \"follow_request\" || /\\bfollow request\\b/.test(title + \" \" + body))\n      return \"follow-requests\";\n    if (\n      /(^|_)(mention|mentioned|tagged|reply)(_|$)/.test(source) ||\n      /\\b(mentioned you|tagged you|replied to you|mention)\\b/.test(\n        title + \" \" + body,\n      )\n    )\n      return \"mentions\";\n    return \"\";\n  }\n  function actionableFollowRequestNotification(item, filterKind) {\n    item = item || {};\n    if (filterKind !== \"follow-requests\") return !1;\n    var source = String(\n        item.sourceType || item.source_type || item.type || \"\",\n      ).toLowerCase(),\n      outcome = String(\n        item.relationshipState ||\n          item.relationship_state ||\n          item.requestState ||\n          item.request_state ||\n          item.decision ||\n          (item.entity && item.entity.state) ||\n          \"\",\n      ).toLowerCase(),\n      text = String((item.title || \"\") + \" \" + (item.body || \"\")).toLowerCase();\n    if (source !== \"follow_request\")\n      return !1;\n    if (outcome && [\"requested\", \"pending\", \"request_pending\"].indexOf(outcome) === -1)\n      return !1;\n    return !/\\bfollow request\\b[^.]{0,48}\\b(approved|accepted|declined|denied|cancelled|canceled|withdrawn|expired|resolved)\\b|\\b(approved|accepted|declined|denied|cancelled|canceled|withdrawn|expired|resolved)\\b[^.]{0,48}\\bfollow request\\b/.test(text);\n  }\n  function recipientIdentity(value, profileHint) {\r\n    var raw = String(value || \"\").trim(),\r\n      keyHint = clean(profileHint || raw || \"\", \"\"),\r\n      byUid = raw ? publicProfileByUid(raw) : null,\n      byKey = publicProfileByKey(keyHint),\r\n      profile = byUid || byKey || null;\r\n    return {\r\n      uid: (profile && profile.uid) || raw,\r\n      key:\r\n        (profile && (profile.profileKey || profile.handle)) || keyHint || raw,\r\n      name:\r\n        (profile && profile.displayName) || profileHint || raw || \"DSD member\",\r\n      avatarMediaId: (profile && canonicalProfileAvatarMediaId(profile)) || \"\",\r\n    };\r\n  }\r\n  function canonicalConversationId(targetUid, profileHint) {\r\n    var resolved = recipientIdentity(targetUid, profileHint),\r\n      selfKey = profileKey(),\r\n      peerKey = clean(resolved.key || \"\", \"\"),\r\n      parts =\r\n        selfKey && peerKey && selfKey !== peerKey\r\n          ? [selfKey, peerKey]\r\n          : [actorRelationshipIdentity(), resolved.uid];\r\n    return (\r\n      (parts = parts.filter(Boolean).sort()),\r\n      clean(\"conv-\" + parts.join(\"-\"), \"conversation\")\r\n    );\r\n  }\r\n  function messageRouteConversationMatch(requestedId, draft) {\r\n    var requested = String(requestedId || \"\").trim(),\r\n      records = activeConversationRecords(state.conversations || []),\r\n      exact = records.filter(function (conversation) {\r\n        return [\r\n          conversation && conversation.conversationId,\r\n          conversation && conversation.id,\r\n          conversation && conversation.legacyConversationId,\r\n          conversation && conversation.legacy_conversation_id,\r\n        ]\r\n          .map(function (value) {\r\n            return String(value || \"\").trim();\r\n          })\r\n          .indexOf(requested) !== -1;\r\n      })[0];\r\n    if (exact) return exact;\r\n    if (!draft) return null;\r\n    var draftKey = conversationDedupeKey(draft, conversationType(draft));\r\n    return (\r\n      records.filter(function (conversation) {\r\n        return (\r\n          conversationType(conversation) === \"direct\" &&\r\n          conversationDedupeKey(conversation, \"direct\") === draftKey\r\n        );\r\n      })[0] || null\r\n    );\r\n  }\r\n  function canonicalMessageRouteConversationId(requestedId, draft) {\r\n    var match = messageRouteConversationMatch(requestedId, draft);\r\n    return String(\r\n      (match &&\r\n        (match.conversationId ||\r\n          match.legacyConversationId ||\r\n          match.legacy_conversation_id ||\r\n          match.id)) ||\r\n        requestedId ||\r\n        \"\",\r\n    ).trim();\r\n  }\r\n  function routeRequestedConversationId() {\r\n    var requested = queryParam(\"conversationId\");\r\n    if (requested) return canonicalMessageRouteConversationId(requested, null);\r\n    var groupRecipients =\r\n      queryParam(\"groupRecipients\") || queryParam(\"group\") || \"\";\r\n    if (groupRecipients && canUseSocialActions()) {\r\n      var groupIdentities = uniqueIdentities(\r\n        parseGroupRecipients(groupRecipients),\r\n      );\r\n      if (groupIdentities.length >= 2)\r\n        return canonicalGroupConversationId(groupIdentities);\r\n    }\r\n    var profile = queryParam(\"profile\") || \"\",\r\n      recipient =\r\n        queryParam(\"recipientUid\") || queryParam(\"recipient\") || profile;\r\n    if (!recipient) return \"\";\r\n    var routeDraft = routeRecipientConversation();\r\n    return routeDraft\r\n      ? canonicalMessageRouteConversationId(\r\n          routeDraft.conversationId || routeDraft.id,\r\n          routeDraft,\r\n        )\r\n      : canonicalConversationId(recipient, profile);\r\n  }\r\n  function messagesRouteActive() {\r\n    return /\\/pages\\/messages(?:$|[/?#])/.test(\r\n      window.location.pathname + window.location.search,\r\n    );\r\n  }\r\n  function writeMessageConversationUrl(conversationId, replace, routeContext) {\n    if (!(\r\n      !messagesRouteActive() ||\r\n      !window.history ||\r\n      !(window.history.pushState || window.history.replaceState)\r\n    ))\r\n      try {\r\n        var url = new URL(window.location.href),\r\n          cid = String(conversationId || \"\").trim();\r\n        routeContext = routeContext || {};\n        if (cid) {\n          url.searchParams.set(\"conversationId\", cid);\n          [\"profile\", \"recipientUid\", \"recipient\"].forEach(function (key) {\r\n            url.searchParams.delete(key);\r\n          });\r\n          routeContext.groupRecipients &&\n            url.searchParams.set(\n              \"groupRecipients\",\n              String(routeContext.groupRecipients),\n            );\n          routeContext.groupName &&\n            url.searchParams.set(\"groupName\", String(routeContext.groupName));\n        }\n        else {\r\n          url.searchParams.delete(\"conversationId\");\r\n          [\r\n            \"profile\",\r\n            \"recipientUid\",\r\n            \"recipient\",\r\n            \"groupRecipients\",\r\n            \"group\",\r\n            \"groupName\",\r\n            \"name\",\r\n          ].forEach(function (key) {\r\n            url.searchParams.delete(key);\r\n          });\r\n        }\r\n        var next = url.pathname + url.search + url.hash;\r\n        if (\r\n          next ===\r\n          window.location.pathname +\r\n            window.location.search +\r\n            window.location.hash\r\n        )\r\n          return;\r\n        replace || !window.history.pushState\r\n          ? window.history.replaceState(\r\n              { dsdMessageConversation: !!cid, conversationId: cid },\r\n              \"\",\r\n              next,\r\n            )\r\n          : window.history.pushState(\r\n              { dsdMessageConversation: !0, conversationId: cid },\r\n              \"\",\r\n              next,\r\n            );\r\n      } catch (e) {}\r\n  }\r\n  function closeMessageDrawerState(options) {\n    options = options || {};\r\n    var closingConversationId = state.activeConversationId;\r\n    (stopMessageThreadOwner(closingConversationId, \"drawer-close\"),\r\n      clearMessageViewOnceReveals(closingConversationId),\n      (state.activeConversationId = \"\"),\n      (state.pendingMessageDraft = null),\n      clearMessageReplyDraft());\n    var messageRoot = qs(\"[data-dsd-msg384]\");\r\n    if (messageRoot) {\r\n      (messageRoot.removeAttribute(\"data-dsd-msg384-drawer-open\"),\r\n        messageRoot.removeAttribute(\"data-dsd-msg384-active-conversation\"));\r\n      try {\r\n        (document.documentElement.classList.remove(\"dsd-message-drawer-open\"),\r\n          scheduleGlobalOverlayStateSync());\r\n      } catch (e) {}\r\n      var drawer = qs(\"[data-dsd-msg384-summary]\", messageRoot);\r\n      drawer &&\r\n        ((drawer.hidden = !0), drawer.setAttribute(\"aria-hidden\", \"true\"));\r\n    }\r\n    (options.updateUrl !== !1 && writeMessageConversationUrl(\"\", !0),\r\n      refreshMessageDrawerHistory(\"\"),\r\n      renderMessages());\r\n  }\r\n  function openMessageConversationState(conversationId, options) {\n    var cid = String(conversationId || \"\").trim();\n    cid &&\n      ((options = options || {}),\n      state.activeConversationId &&\n        state.activeConversationId !== cid &&\n        (stopMessageThreadOwner(\n          state.activeConversationId,\n          \"conversation-switch\",\n        ),\n        clearMessageReplyDraft()),\n      (state.activeConversationId !== cid || options.pinToBottom === !0) &&\r\n        beginMessageThreadSession(cid, !0),\r\n      (state.activeConversationId = cid),\r\n      options.hydrate !== !1 && hydrateConversationMessages(cid),\n      renderMessages(),\r\n      options.markRead !== !1 && markConversationRead(cid),\r\n      options.updateUrl !== !1 &&\r\n        writeMessageConversationUrl(cid, !!options.replaceUrl));\r\n  }\r\n  function routeRecipientConversation() {\n    var profile = queryParam(\"profile\") || \"\",\n      recipient =\n        queryParam(\"recipientUid\") || queryParam(\"recipient\") || profile,\n      starterDraft = String(queryParam(\"starter\") || \"\").trim().slice(0, 160);\n    if (!recipient || !canUseSocialActions()) return null;\r\n    var resolved = recipientIdentity(recipient, profile),\r\n      targetUid = String(resolved.uid || recipient || \"\").trim(),\r\n      targetKey = resolved.key || profile || targetUid;\r\n    if (!targetUid || identityMatchesCurrent(targetUid, targetKey)) return null;\r\n    var cid = canonicalConversationId(targetUid, targetKey),\r\n      draft = {\r\n      conversationId: cid,\r\n      id: cid,\r\n      type: \"direct\",\r\n      conversationType: \"direct\",\r\n      state: \"active\",\r\n      participantIds: mergeUniqueSorted([\r\n        actorRelationshipIdentity(),\r\n        targetUid,\r\n      ]),\r\n      participantKeys: mergeUniqueSorted([profileKey(), targetKey]),\r\n      recipientUid: targetUid,\r\n      recipientProfileKey: targetKey,\r\n      recipientAvatarMediaId: resolved.avatarMediaId || \"\",\r\n      displayName: resolved.name || targetKey || \"DSD member\",\r\n      name: resolved.name || targetKey || \"DSD member\",\r\n      lastMessagePreview: \"Start a new message.\",\r\n      pendingRouteRecipient: !0,\n      starterDraft: starterDraft,\n      entity: entityMeta(\"message\", \"private\", \"standard\", {\r\n        conversationId: cid,\r\n        recordKind: \"conversation\",\r\n        pendingRouteRecipient: !0,\r\n      }),\r\n      firestorePath: PATHS.conversation,\r\n    },\r\n      existing = messageRouteConversationMatch(cid, draft),\r\n      existingId = canonicalMessageRouteConversationId(cid, draft);\r\n    if (existing && existingId) {\r\n      draft.conversationId = existingId;\r\n      draft.id = existingId;\r\n      draft.supabaseConversationId = existing.id || \"\";\r\n      draft.pendingRouteRecipient = !1;\r\n    }\r\n    return draft;\r\n  }\r\n  function routeGroupConversation() {\r\n    var groupRecipients =\r\n      queryParam(\"groupRecipients\") || queryParam(\"group\") || \"\";\r\n    if (!groupRecipients || !canUseSocialActions()) return null;\r\n    var identities = uniqueIdentities(parseGroupRecipients(groupRecipients));\r\n    if (identities.length < 2) return null;\r\n    var requestedGroupName = premiumMessagingEntitled()\r\n      ? String(queryParam(\"groupName\") || queryParam(\"name\") || \"\")\r\n          .trim()\r\n          .slice(0, 64)\r\n      : \"\";\r\n    return groupConversationDraftFromIdentities(identities, requestedGroupName);\r\n  }\r\n  function groupConversationDraftFromIdentities(identities, requestedGroupName) {\r\n    identities = uniqueIdentities(identities);\r\n    if (identities.length < 2) return null;\r\n    requestedGroupName = premiumMessagingEntitled()\r\n      ? String(requestedGroupName || \"\").trim().slice(0, 64)\r\n      : \"\";\r\n    var cid = canonicalGroupConversationId(identities),\r\n      participantIds = mergeUniqueSorted(\r\n        [actorRelationshipIdentity()],\r\n        identities.map(function (identity) {\r\n          return identity.uid || identity.key || \"\";\r\n        }),\r\n      ),\r\n      participantKeys = mergeUniqueSorted(\r\n        [profileKey()],\r\n        identities.map(function (identity) {\r\n          return identity.key || identity.uid || \"\";\r\n        }),\r\n      ),\r\n      fallbackGroupName = identities\r\n        .map(function (identity) {\r\n          return identity.name || identity.key || identity.uid || \"DSD member\";\r\n        })\r\n        .join(\", \");\r\n    return {\r\n      conversationId: cid,\r\n      id: cid,\r\n      type: \"groups\",\r\n      conversationType: \"groups\",\r\n      state: \"active\",\r\n      participantIds: participantIds,\r\n      participantKeys: participantKeys,\r\n      groupRecipients: identities\r\n        .map(function (identity) {\r\n          return identity.key || identity.uid || \"\";\r\n        })\r\n        .filter(Boolean)\r\n        .join(\",\"),\r\n      displayName: requestedGroupName || fallbackGroupName,\r\n      name: requestedGroupName || \"Group message\",\r\n      groupName: requestedGroupName,\r\n      lastMessagePreview: requestedGroupName\r\n        ? \"Start \" + requestedGroupName + \".\"\r\n        : \"Start a group message.\",\r\n      pendingRouteGroup: !0,\r\n      entity: entityMeta(\"message\", \"private\", \"standard\", {\r\n        conversationId: cid,\r\n        recordKind: \"conversation\",\r\n        conversationType: \"groups\",\r\n        pendingRouteGroup: !0,\r\n      }),\r\n      firestorePath: PATHS.conversation,\r\n    };\r\n  }\r\n  function parseGroupRecipients(value) {\r\n    return String(value || \"\")\r\n      .split(/[\\n,;]+/)\r\n      .map(function (item) {\r\n        return item.trim().replace(/^@+/, \"\");\r\n      })\r\n      .filter(Boolean);\r\n  }\r\n  function uniqueIdentities(items) {\n    var seen = {},\r\n      out = [];\r\n    return (\r\n      (items || []).forEach(function (item) {\r\n        var identity =\r\n            typeof item == \"string\" ? recipientIdentity(item, item) : item,\r\n          key = clean(\r\n            (identity && (identity.uid || identity.key || identity.name)) || \"\",\r\n            \"\",\r\n          );\r\n        !key ||\r\n          identityMatchesCurrent(\r\n            (identity && identity.uid) || key,\r\n            (identity && identity.key) || key,\r\n          ) ||\r\n          seen[key] ||\r\n          ((seen[key] = !0), out.push(identity));\r\n      }),\r\n      out\r\n    );\r\n  }\r\n  function mergeUniqueSorted() {\r\n    var seen = {},\r\n      out = [];\r\n    return (\r\n      Array.prototype.slice.call(arguments).forEach(function (items) {\r\n        (items || []).forEach(function (item) {\r\n          var value = String(item || \"\").trim();\r\n          !value || seen[value] || ((seen[value] = !0), out.push(value));\r\n        });\r\n      }),\r\n      out.sort()\r\n    );\r\n  }\r\n  function canonicalGroupConversationId(identities) {\r\n    var selfKey = profileKey() || actorRelationshipIdentity(),\r\n      parts = mergeUniqueSorted(\r\n        [selfKey],\r\n        (identities || []).map(function (identity) {\r\n          return identity.key || identity.uid || \"\";\r\n        }),\r\n      );\r\n    return clean(\"group-\" + parts.join(\"-\"), \"conversation\");\r\n  }\r\n  function sendGroupMessage(\r\n    conversationId,\r\n    body,\r\n    recipients,\r\n    mediaFiles,\r\n    options,\r\n  ) {\r\n    if (!requireActiveProfile(\"group message\")) return Promise.resolve(null);\r\n    options = options || {};\r\n    var premiumSendPatch = premiumMessageSendPatch(options),\r\n      text = String(body || \"\")\r\n        .trim()\r\n        .slice(0, MAX.message);\r\n    if (\r\n      ((mediaFiles = (mediaFiles || []).filter(Boolean)),\r\n      !text && !mediaFiles.length)\r\n    )\r\n      return Promise.resolve(null);\r\n    var identities = uniqueIdentities(recipients);\r\n    if (identities.length < 2)\r\n      return (\r\n        renderStatus(\"Group message requires at least two recipients.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    if (\r\n      identities.some(function (identity) {\r\n        return relationshipBlocked(\r\n          identity.uid || profileUidForKey(identity.key || \"\"),\r\n        );\r\n      })\r\n    )\r\n      return (\r\n        renderStatus(\"Blocked profiles cannot be messaged.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var cid = conversationId || canonicalGroupConversationId(identities);\n    {\n      var proxyMessageId = clean(\r\n          options.messageId ||\r\n            \"message-\" + Date.now() + \"-\" + Math.random().toString(36).slice(2, 6),\r\n          \"message\",\r\n        ),\r\n        proxyRecipientKeys = identities\n          .map(function (identity) {\n            return identity.key || \"\";\n          })\n          .filter(Boolean),\n        proxyGroupName = String(options.groupName || options.group_name || \"\")\n          .trim()\n          .slice(0, 64),\n        proxyMediaPromise = mediaFiles.length\r\n          ? uploadMediaFilesSequentially(mediaFiles, function (file) {\r\n              return createMediaManifest(\r\n                  file,\n                  \"message\",\n                  proxyMessageId,\n                  \"\",\n                  \"private\",\n                  \"standard\",\r\n                );\r\n            })\r\n          : Promise.resolve([]);\n      return proxyMediaPromise\n        .then(function (media) {\n          var uploaded = media.filter(function (manifest) {\n            return manifest && manifest.status === \"uploaded\";\n          });\n          if (uploaded.length !== mediaFiles.length)\n            throw new Error(\"group_message_media_upload_incomplete\");\n          return sendMessageViaProxy({\n            conversationId: cid,\n            conversationType: \"group\",\n            recipientProfileKeys: proxyRecipientKeys,\n            displayName: proxyGroupName,\n            body: text,\n            previewBody: (text || \"Media message\").slice(0, 140),\n            messageId: proxyMessageId,\n            expiresAt: premiumSendPatch.expiresAt || \"\",\n            viewOnce: premiumSendPatch.viewOnce === !0,\n            premiumState: premiumSendPatch.premiumState || void 0,\n            media: uploaded,\n          });\n        })\n        .then(function (proxyResult) {\n          var conversation = proxyResult && proxyResult.conversation,\n            message = proxyResult && proxyResult.message;\n          if (\n            !conversation ||\n            !conversation.supabaseConversationId ||\n            !message ||\n            !message.supabaseMessageId\n          )\n            throw new Error(\"group_message_proxy_persistence_receipt_missing\");\n          var groupClaimId =\n            message.messageId ||\n            message.id ||\n            message.legacyMessageId ||\n            message.legacy_message_id ||\n            \"\";\n          groupClaimId &&\n            (state.premiumMessageWriteClaims[groupClaimId] = Object.assign(\n              {},\n              message,\n              {\n                id: groupClaimId,\n                messageId: groupClaimId,\n                conversationId: conversation.conversationId || cid,\n                senderUid:\n                  message.senderUid || actorRelationshipIdentity(),\n                senderProfileKey: message.senderProfileKey || profileKey(),\n                createdAt: message.createdAt || now(),\n                updatedAt: message.updatedAt || now(),\n              },\n            ));\n          ((state.activeConversationId = conversation.conversationId || cid),\n            messageThreadSession(state.activeConversationId, !0),\n            (state.messagesByConversation[state.activeConversationId] =\n              dedupeConversationMessages(\n                (state.messagesByConversation[state.activeConversationId] || []).concat([\n                  message,\n                ]),\n              ).slice(-200)),\n            (state.conversations = mergeByKey(\n              state.conversations,\n              [conversation],\n              [\"conversationId\", \"id\"],\n            )),\n            clearUploadStatus(qs(\"[data-dsd-message-drawer-form]\") || document),\n            renderStatus(\"Group message sent.\"),\n            renderMessages());\n          identities.forEach(function (identity) {\n            identity.uid &&\n              !identityMatchesCurrent(identity.uid, identity.key) &&\n              notify(\n                identity.uid,\n                \"messages\",\n                \"New group message\",\n                displayName() + \" sent a group message.\",\n                \"/pages/messages?conversationId=\" +\n                  encodeURIComponent(state.activeConversationId),\n                {\n                  conversationId: state.activeConversationId,\n                  targetProfileKey: identity.key,\n                },\n              );\n          });\n          return { id: message.supabaseMessageId };\n        })\n        .catch(function (error) {\n          (queueDraft(\n            \"group-message\",\n            { conversationId: cid, body: text, mediaCount: mediaFiles.length },\n            error,\n          ),\n            renderStatus(\"Group message was not sent. Please retry.\"));\n          return null;\n        });\n    }\n  }\n  function groupRecipientIdentityKey(identity) {\n    return clean(\n      (identity && (identity.key || identity.uid || identity.name)) || \"\",\n      \"\",\n    );\n  }\n  var STORY_REPLY_ENVELOPE_PREFIX = \"[[DSD_STORY_REPLY:\";\r\n  function storyReferenceExcerpt(value) {\r\n    return String(value || \"\")\r\n      .replace(/\\s+/g, \" \")\r\n      .trim()\r\n      .slice(0, 120);\r\n  }\r\n  function sanitizeStoryReference(ref2) {\r\n    ref2 = ref2 || {};\r\n    var storyId = cleanEmpty(ref2.storyId || ref2.id || \"\");\r\n    if (!storyId) return null;\r\n    var sourcePath = \"stories/\" + storyId;\r\n    return {\r\n      type: \"story_reply\",\r\n      storyId: storyId,\r\n      sourcePath: sourcePath,\r\n      authorProfileKey: cleanEmpty(\r\n        ref2.authorProfileKey || ref2.ownerProfileKey || \"\",\r\n      ),\r\n      authorDisplayName: storyReferenceExcerpt(\r\n        ref2.authorDisplayName ||\r\n          ref2.ownerDisplayName ||\r\n          ref2.authorProfileKey ||\r\n          ref2.ownerProfileKey ||\r\n          \"Story\",\r\n      ),\r\n      captionExcerpt: storyReferenceExcerpt(\r\n        ref2.captionExcerpt || ref2.body || ref2.caption || \"\",\r\n      ),\r\n      mediaKind: /video/i.test(\r\n        String(ref2.mediaKind || ref2.kind || ref2.contentType || \"\"),\r\n      )\r\n        ? \"video\"\r\n        : /image/i.test(\r\n              String(ref2.mediaKind || ref2.kind || ref2.contentType || \"\"),\r\n            )\r\n          ? \"image\"\r\n          : \"\",\r\n      expiresAt: String(ref2.expiresAt || ref2.expires_at || \"\").slice(0, 80),\r\n    };\r\n  }\r\n  function encodeStoryReferenceBody(body, storyReference) {\r\n    var ref2 = sanitizeStoryReference(storyReference),\r\n      visible = String(body || \"\")\r\n        .trim()\r\n        .slice(0, ref2 ? Math.max(240, MAX.message - 520) : MAX.message);\r\n    if (!ref2) return visible;\r\n    try {\r\n      return (\r\n        STORY_REPLY_ENVELOPE_PREFIX +\r\n        encodeURIComponent(JSON.stringify(ref2)) +\r\n        \"]]\\n\" +\r\n        visible\r\n      );\r\n    } catch (e) {\r\n      return visible;\r\n    }\r\n  }\r\n  function storyReferenceEnvelope(message) {\r\n    var direct = sanitizeStoryReference(\r\n      message &&\r\n        (message.storyReference ||\r\n          message.story_reference ||\r\n          (message.metadata &&\r\n            (message.metadata.storyReference ||\r\n              message.metadata.story_reference))),\r\n    );\r\n    if (direct) return direct;\r\n    var body = String((message && message.body) || \"\"),\r\n      match = body.match(/^\\[\\[DSD_STORY_REPLY:([^\\]]+)\\]\\]\\s*/);\r\n    if (!match) return null;\r\n    try {\r\n      return sanitizeStoryReference(\r\n        JSON.parse(decodeURIComponent(match[1] || \"\")),\r\n      );\r\n    } catch (e) {\r\n      return null;\r\n    }\r\n  }\r\n  function stripStoryReferenceEnvelope(body) {\r\n    return String(body || \"\")\r\n      .replace(/^\\[\\[DSD_STORY_REPLY:[^\\]]+\\]\\]\\s*/, \"\")\r\n      .trim();\r\n  }\r\n  function sendMessage(\r\n    conversationId,\r\n    body,\r\n    recipientUid,\r\n    recipientProfileHint,\r\n    mediaFiles,\r\n    options,\r\n  ) {\r\n    if (!requireActiveProfile(\"message\")) return Promise.resolve(null);\r\n    options = options || {};\r\n    var storyReference = sanitizeStoryReference(options.storyReference || null),\n      replyToMessageId = String(options.replyToMessageId || \"\").trim(),\n      text = String(body || \"\")\n        .trim()\r\n        .slice(\r\n          0,\r\n          storyReference ? Math.max(240, MAX.message - 520) : MAX.message,\r\n        ),\r\n      storedBody = encodeStoryReferenceBody(text, storyReference),\r\n      premiumSendPatch = premiumMessageSendPatch(options);\r\n    if (\r\n      ((mediaFiles = (mediaFiles || []).filter(Boolean)),\r\n      !text && !mediaFiles.length)\r\n    )\r\n      return Promise.resolve(null);\r\n    var explicitRecipientUid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(\n        String(recipientUid || \"\").trim(),\n      )\n        ? String(recipientUid || \"\").trim()\n        : \"\",\n      targetIdentity = recipientIdentity(\n        explicitRecipientUid,\n        recipientProfileHint,\n      ),\n      targetKeyForUid = clean(\n        recipientProfileHint || targetIdentity.key || \"\",\n        \"\",\n      );\n    targetIdentity.uid = explicitRecipientUid;\n    targetIdentity.key = targetKeyForUid;\n    var targetUid = explicitRecipientUid,\n      cid =\n        conversationId ||\n        (targetUid || targetIdentity.key\n          ? canonicalConversationId(\n              targetUid || targetIdentity.key,\n              recipientProfileHint || targetIdentity.key || \"\",\n            )\n          : \"\"),\n      canonicalDirectCid = targetUid || targetIdentity.key\n        ? canonicalConversationId(\n            targetUid || targetIdentity.key,\n            targetIdentity.key || recipientProfileHint || \"\",\n          )\n        : \"\",\r\n      submittedConversation = conversationById(cid) || {};\r\n    if (\r\n      (canonicalDirectCid &&\n        cid &&\n        cid !== canonicalDirectCid &&\n        !(\n          submittedConversation &&\n          (submittedConversation.conversationId || submittedConversation.id)\n        ) &&\n        !/^group-/i.test(cid) &&\n        (cid = canonicalDirectCid),\n      !cid)\r\n    )\r\n      return (\r\n        renderStatus(\r\n          \"Message requires an existing conversation or recipient profile.\",\n        ),\r\n        Promise.resolve(null)\r\n      );\r\n    if (targetUid && relationshipBlocked(targetUid))\r\n      return (\r\n        renderStatus(\"Blocked profiles cannot be messaged.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var preview =\r\n      text ||\r\n      (storyReference\r\n        ? \"Story reply\"\r\n        : mediaFiles.length\r\n          ? \"Media message\"\r\n          : \"\");\r\n    function finishSentMessage(conversation, sentMessage, savedRef) {\r\n      return (\r\n        (sentMessage.supabaseMessageId =\r\n          sentMessage.supabaseMessageId ||\r\n          sentMessage.supabase_message_id ||\r\n          (savedRef && savedRef.id) ||\r\n          \"\"),\r\n        (sentMessage.id = sentMessage.messageId || sentMessage.id),\r\n        Promise.resolve(savedRef)\n          .then(function () {\r\n            ((state.activeConversationId = cid), messageThreadSession(cid, !0));\r\n            var claimId =\r\n              sentMessage.messageId ||\r\n              sentMessage.id ||\r\n              sentMessage.legacyMessageId ||\r\n              sentMessage.legacy_message_id ||\r\n              \"\";\r\n            return (\r\n              claimId &&\r\n                (state.premiumMessageWriteClaims[claimId] = Object.assign(\r\n                  {},\r\n                  sentMessage,\r\n                  {\r\n                    id: claimId,\r\n                    messageId: claimId,\r\n                    conversationId: cid,\r\n                    senderUid:\r\n                      sentMessage.senderUid || actorRelationshipIdentity(),\r\n                    senderProfileKey:\r\n                      sentMessage.senderProfileKey || profileKey(),\r\n                    createdAt: sentMessage.createdAt || now(),\r\n                    updatedAt: sentMessage.updatedAt || now(),\r\n                  },\r\n                )),\r\n              (state.messagesByConversation[cid] = dedupeConversationMessages(\r\n                (state.messagesByConversation[cid] || []).concat([sentMessage]),\r\n              ).slice(-200)),\r\n              (state.conversations = mergeByKey(\r\n                state.conversations,\r\n                [conversation],\r\n                [\"conversationId\", \"id\"],\r\n              )),\r\n              clearUploadStatus(\r\n                qs(\"[data-dsd-message-drawer-form]\") || document,\r\n              ),\n              renderStatus(\"Message sent.\"),\n              renderMessages(),\n              broadcastMessageChangeToParticipants(\n                cid,\n                sentMessage.supabaseMessageId ||\n                  sentMessage.supabase_message_id ||\n                  sentMessage.messageId ||\n                  sentMessage.id,\n                \"sent\",\n              ),\n              targetUid &&\n                !identityMatchesCurrent(targetUid, targetIdentity.key) &&\r\n                notify(\r\n                  targetUid,\r\n                  \"messages\",\r\n                  \"New message\",\r\n                  displayName() + \" sent you a message.\",\r\n                  \"/pages/messages?conversationId=\" + encodeURIComponent(cid),\r\n                  {\n                    conversationId: cid,\n                    targetProfileKey: targetIdentity.key,\n                  },\n                ),\r\n              savedRef || {\r\n                id:\r\n                  sentMessage.supabaseMessageId ||\r\n                  sentMessage.id ||\r\n                  sentMessage.messageId ||\r\n                  \"\",\r\n              }\r\n            );\r\n          })\r\n      );\r\n    }\r\n    function sendViaCanonicalProxy(reason) {\r\n      var proxyMessageId = clean(\r\n        options.messageId ||\r\n          \"message-\" + Date.now() + \"-\" + Math.random().toString(36).slice(2, 6),\r\n        \"message\",\r\n      );\r\n      claim(\"message-send:proxy-canonical-requested\", {\r\n        conversationId: cid,\r\n        reason: reason || \"supabase-cutover-canonical\",\r\n        mediaCount: mediaFiles.length,\r\n        canonical: \"supabase-app-proxy-message-send\",\r\n      });\r\n      var uploadedMediaPromise = mediaFiles.length\r\n        ? uploadMediaFilesSequentially(mediaFiles, function (file) {\r\n            return createMediaManifest(\r\n                file,\r\n                \"message\",\r\n                proxyMessageId,\r\n                \"\",\r\n                \"private\",\r\n                \"standard\",\r\n              );\r\n          }).then(function (media) {\r\n            var uploaded = media.filter(function (manifest) {\r\n              return manifest && manifest.status === \"uploaded\";\r\n            });\r\n            if (uploaded.length !== mediaFiles.length)\r\n              throw (\r\n                renderStatus(\r\n                  \"Media upload did not complete. Message was not sent.\",\r\n                ),\r\n                new Error(\"message_media_upload_incomplete\")\r\n              );\r\n            return uploaded;\r\n          })\r\n        : Promise.resolve([]);\r\n      return uploadedMediaPromise\r\n        .then(function (uploadedMessageMedia) {\r\n          return sendMessageViaProxy({\r\n            conversationId: cid,\r\n            recipientUid: targetUid || \"\",\r\n            recipientProfileKey: targetIdentity.key || \"\",\r\n            body: storedBody || preview,\r\n            previewBody: preview.slice(0, 140),\r\n            storyReference: storyReference || null,\r\n            messageId: proxyMessageId,\r\n            expiresAt: premiumSendPatch.expiresAt || \"\",\r\n            viewOnce: premiumSendPatch.viewOnce === !0,\r\n            premiumState: premiumSendPatch.premiumState || void 0,\n            replyToMessageId: replyToMessageId || \"\",\n            media: uploadedMessageMedia,\n          });\r\n        })\r\n        .then(function (proxyResult) {\r\n          var proxyConversation = (proxyResult && proxyResult.conversation) || {\r\n              conversationId: cid,\r\n              id: cid,\r\n              participantIds: mergeUniqueSorted(\r\n                [actorRelationshipIdentity(), targetUid].filter(Boolean),\r\n              ),\r\n              participantKeys: mergeUniqueSorted(\r\n                [profileKey(), targetIdentity.key || \"\"].filter(Boolean),\r\n              ),\r\n              lastMessagePreview: text.slice(0, 140),\r\n            },\r\n            proxyMessage = (proxyResult && proxyResult.message) || {},\n            resolvedMessageId =\n              proxyMessage.messageId || proxyMessage.id || proxyMessageId;\n          if (\n            !proxyConversation.supabaseConversationId ||\n            !proxyMessage.supabaseMessageId\n          )\n            throw new Error(\"message_proxy_persistence_receipt_missing\");\n          ((proxyMessage = Object.assign(\r\n            {\r\n              id: resolvedMessageId,\r\n              messageId: resolvedMessageId,\r\n              conversationId: cid,\r\n              senderUid: actorRelationshipIdentity(),\r\n              senderProfileKey: profileKey(),\r\n              recipientUid: targetUid || \"\",\r\n              recipientProfileKey: targetIdentity.key || \"\",\r\n              body: storedBody,\r\n              storyReference: storyReference || null,\n              replyToMessageId: replyToMessageId || \"\",\n              replyTo: options.replyTo || null,\n              media: [],\n              status: \"sent\",\r\n              createdAt: now(),\r\n              updatedAt: now(),\r\n            },\r\n            premiumSendPatch,\r\n            proxyMessage,\r\n          )),\n            (proxyMessage.body = storedBody),\n            (proxyMessage.id =\r\n              proxyMessage.messageId || proxyMessage.id || resolvedMessageId),\r\n            (proxyMessage.messageId =\r\n              proxyMessage.messageId || proxyMessage.id || resolvedMessageId));\r\n          var savedProxyMessage = {\n            id:\n              proxyMessage.supabaseMessageId ||\n              proxyMessage.supabase_message_id ||\n              \"\",\n            messageId: proxyMessage.messageId,\n            legacyMessageId: proxyMessage.messageId,\n            conversationId: cid,\n            supabaseConversationId:\n              proxyConversation.supabaseConversationId ||\n              proxyConversation.supabase_conversation_id ||\n              \"\",\n            conversation_id:\n              proxyConversation.supabaseConversationId ||\n              proxyConversation.supabase_conversation_id ||\n              \"\",\n          };\n          return finishSentMessage(\n            proxyConversation,\n            proxyMessage,\n            savedProxyMessage,\n          );\n        })\r\n        .catch(function (proxyError) {\r\n          return (\r\n            queueDraft(\r\n              \"message\",\r\n              {\r\n                conversationId: cid,\r\n                body: text,\r\n                mediaCount: mediaFiles.length,\r\n              },\r\n              proxyError,\r\n            ),\r\n            null\r\n          );\r\n        });\r\n    }\r\n    return sendViaCanonicalProxy(\"supabase-cutover-canonical-first\");\n  }\n  function createStory(input) {\r\n    if (!requireActiveProfile(\"create stories\")) return Promise.resolve(null);\r\n    var author = activeAuthorIdentity(\"create stories\");\r\n    if (!author) return Promise.resolve(null);\r\n    input = input || {};\r\n    var body = String(input.body || \"\")\r\n        .trim()\r\n        .slice(0, MAX.story),\r\n      selectedMedia = (input.media || []).filter(Boolean);\r\n    if (selectedMedia.length > 1)\r\n      return (\r\n        renderStatus(\"Stories support one photo or one video at a time.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    if (!body && !selectedMedia.length)\r\n      return (\r\n        renderStatus(\"Story requires text, image, or video.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var storyId = clean(\r\n        input.publicationId ||\r\n          \"story-\" + Date.now() + \"-\" + Math.random().toString(36).slice(2, 6),\r\n        \"story\",\r\n      ),\r\n      policy = visibilityPolicyFromInput(input),\r\n      visibility = policy.visibility,\r\n      contentRating = policy.contentRating,\r\n      accessGate = policy.accessGate,\r\n      review = reviewStateForAuthor(),\r\n      story = {\r\n        storyId: storyId,\r\n        ownerUid: author.uid,\r\n        authorUid: author.uid,\r\n        ownerProfileKey: author.profileKey,\r\n        authorProfileKey: author.profileKey,\r\n        ownerDisplayName: author.displayName,\r\n        authorDisplayName: author.displayName,\r\n        ownerAvatarMediaId: author.avatarMediaId || \"\",\r\n        authorAvatarMediaId: author.avatarMediaId || \"\",\r\n        body: body,\r\n        media: [],\r\n        visibility: visibility,\r\n        contentRating: contentRating,\r\n        accessGate: accessGate,\r\n        status: review.status,\r\n        moderation: review.moderation,\r\n        viewCount: 0,\r\n        watchCount: 0,\r\n        uniqueWatchCount: 0,\r\n        expiresAt: futureTimestamp(864e5),\r\n        entity: authoredEntityMeta(\"story\", visibility, contentRating, author, {\r\n          moderationStatus: review.status,\r\n          accessGate: accessGate,\r\n        }),\r\n        firestorePath: PATHS.story,\r\n        ownerScopedPath: PATHS.userStory,\r\n        createdAt: serverTimestamp(),\r\n      };\r\n    return uploadPublicationMedia(\r\n      selectedMedia,\r\n      \"story\",\r\n      storyId,\r\n      visibility,\r\n      contentRating,\r\n    )\r\n      .then(function (uploadedStoryMedia) {\r\n        ((story.media = uploadedStoryMedia),\r\n          (story.mediaCount = uploadedStoryMedia.length),\r\n          (story.mediaMode =\r\n            (uploadedStoryMedia[0] && uploadedStoryMedia[0].kind) || \"text\"),\r\n          claim(\"story-media:media-first-owner\", {\r\n            storyId: storyId,\r\n            mediaCount: uploadedStoryMedia.length,\r\n            requestedMediaCount: selectedMedia.length,\r\n            canonical: \"media_objects->stories->story_media\",\r\n            parentCreatedAfterUpload: !0,\r\n          }));\r\n        return publishStoryViaProxy({\n          storyId: storyId,\n          body: body,\n          visibility: visibility,\n          contentRating: contentRating,\n          accessGate: accessGate,\n          mediaIds: uploadedStoryMedia.map(function (manifest) {\n            return manifest.canonicalMediaId || manifest.supabaseMediaId || manifest.id;\n          }),\n        });\n      })\n      .then(function (publication) {\n        var row = (publication && publication.story) || {};\n        story.supabaseStoryId = row.id || story.supabaseStoryId || \"\";\n        story.createdAt = row.created_at || story.createdAt;\n        story.expiresAt = row.expires_at || story.expiresAt;\n        story.status = row.status || \"approved\";\n        story.moderation = { state: row.moderation_state || \"approved\" };\n        claim(\"story-publication:atomic-owner\", {\n          storyId: storyId,\n          mediaCount: story.media.length,\n          gatedShellDerived: accessGate === \"dsd_plus\" || contentRating === \"gated\",\n        });\n        return skipLegacyUserStoryShadow(storyId);\n      })\r\n      .then(function () {\r\n        return !story || story.status === \"hidden\"\r\n          ? null\r\n          : ((state.activeStoryId = storyId),\r\n            (state.stories = mergeRecords(state.stories, [story])),\r\n            clearRecoveredUploadDraftStatus(),\n            renderStatus(submissionStatusLabel(\"Story\")),\r\n            renderStories(),\r\n            story);\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          claim(\"story-create:transaction-aborted\", {\r\n            reason: (error && error.message) || String(error),\r\n            mediaCount: selectedMedia.length,\r\n            parentCreated: !1,\r\n          }),\r\n          renderStatus(\r\n            (error && error.message) || \"Story could not be published.\",\r\n          ),\r\n          Promise.reject(error)\r\n        );\r\n      });\r\n  }\r\n  function messageReportEvidence(conversationId) {\r\n    var cid = String(conversationId || state.activeConversationId || \"\").trim(),\r\n      conversation = conversationById(cid) || {},\r\n      messages = dedupeConversationMessages(\r\n        (state.messagesByConversation[cid] || []).filter(messageDisplayable),\r\n      )\r\n        .slice(-20)\r\n        .map(function (message) {\r\n          var premiumState = premiumStateObject(\r\n            message.premiumState || message.premium_state,\r\n          );\r\n          return {\r\n            messageId:\r\n              message.messageId ||\r\n              message.id ||\r\n              message.legacyMessageId ||\r\n              message.legacy_message_id ||\r\n              \"\",\r\n            senderUid: message.senderUid || \"\",\r\n            senderProfileKey: message.senderProfileKey || \"\",\r\n            body: stripStoryReferenceEnvelope(message.body || \"\").slice(0, 700),\r\n            status: message.status || \"\",\r\n            createdAt: timestampToIso(\r\n              message.createdAt ||\r\n                message.created_at ||\r\n                message.sentAt ||\r\n                message.sent_at ||\r\n                \"\",\r\n            ),\r\n            editedAt: timestampToIso(\r\n              message.editedAt || message.edited_at || \"\",\r\n            ),\r\n            unsentAt: timestampToIso(\r\n              message.unsentAt || message.unsent_at || \"\",\r\n            ),\r\n            expiresAt: timestampToIso(\r\n              message.expiresAt ||\r\n                message.expires_at ||\r\n                premiumState.expiresAt ||\r\n                premiumState.expires_at ||\r\n                \"\",\r\n            ),\r\n            viewOnce: message.viewOnce === !0 || message.view_once === !0,\r\n            viewOnceOpenedAt: timestampToIso(\r\n              message.viewOnceOpenedAt || message.view_once_opened_at || \"\",\r\n            ),\r\n            media: normalizeMessageMedia(message)\r\n              .slice(0, 8)\r\n              .map(function (item) {\r\n                return {\r\n                  mediaId: readableMediaId(item),\r\n                  kind: item.kind || item.mediaKind || item.contentType || \"\",\r\n                  status: item.status || \"\",\r\n                };\r\n              }),\r\n            premiumEvidence: {\r\n              editHistory: Array.isArray(premiumState.editHistory)\r\n                ? premiumState.editHistory.slice(-5)\r\n                : [],\r\n              unsendEvidence: premiumState.unsendEvidence || null,\r\n              viewOnceOpenedByProfileKey:\r\n                premiumState.viewOnceOpenedByProfileKey || \"\",\r\n              viewOnceOpenedByUserId: premiumState.viewOnceOpenedByUserId || \"\",\r\n            },\r\n          };\r\n        });\r\n    return {\r\n      kind: \"message-report-evidence\",\r\n      capturedAt: now(),\r\n      conversationId: cid,\r\n      conversationType: conversationType(conversation),\r\n      participants: mergeUniqueSorted(\r\n        conversation.participantIds || conversation.participants || [],\r\n      ),\r\n      participantKeys: mergeUniqueSorted(\r\n        conversation.participantKeys ||\r\n          conversation.participantProfileKeys ||\r\n          conversation.participant_profile_keys ||\r\n          [],\r\n      ),\r\n      messages: messages,\r\n    };\r\n  }\r\n  var reportModalState = null;\n  function closeReportModal() {\n    var layer = qs(\"[data-dsd-report-modal-layer]\"),\n      returnScroll = Number((reportModalState && reportModalState.returnScroll) || 0),\n      returnFocus = reportModalState && reportModalState.returnFocus;\n    if (!layer) return;\n    if (reportModalState && reportModalState.attachmentPreviewUrl) {\n      try { URL.revokeObjectURL(reportModalState.attachmentPreviewUrl); } catch (error) {}\n    }\n    ((layer.hidden = !0),\r\n      layer.setAttribute(\"aria-hidden\", \"true\"),\r\n      document.documentElement.removeAttribute(\"data-dsd-report-modal-open\"),\n      (reportModalState = null),\n      scheduleGlobalOverlayStateSync());\n    returnFocus && typeof returnFocus.focus === \"function\" &&\n      window.setTimeout(function () {\n        try {\n          returnFocus.focus({ preventScroll: !0 });\n        } catch (error) {}\n        window.scrollTo(0, returnScroll);\n      }, 0);\n  }\r\n  function ensureReportModal() {\r\n    var layer = qs(\"[data-dsd-report-modal-layer]\");\r\n    if (layer) return layer;\r\n    ((layer = document.createElement(\"div\")),\r\n      layer.setAttribute(\"data-dsd-report-modal-layer\", \"\"),\r\n      layer.setAttribute(\"aria-hidden\", \"true\"),\r\n      (layer.hidden = !0),\r\n      (layer.innerHTML =\n        '<div class=\"dsd-report-modal__backdrop\" data-dsd-report-modal-close></div><section class=\"dsd-report-modal__panel\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"dsd-report-modal-title\"><header><div><span data-dsd-report-modal-eyebrow>Safety report</span><h2 id=\"dsd-report-modal-title\">Report content</h2></div><button type=\"button\" data-dsd-report-modal-close aria-label=\"Close report form\">&times;</button></header><div class=\"dsd-report-modal__target\" data-dsd-report-modal-target></div><form data-dsd-report-modal-form><label data-dsd-report-reason-row><span>Reason</span><select name=\"reason\" required><option value=\"\">Choose a reason</option><option value=\"technical\">Technical issue</option><option value=\"harassment\">Harassment or bullying</option><option value=\"hate\">Hate or discrimination</option><option value=\"sexual\">Sexual or explicit content</option><option value=\"violence\">Violence or threats</option><option value=\"spam\">Spam or impersonation</option><option value=\"privacy\">Privacy or personal information</option><option value=\"other\">Something else</option></select></label><label data-dsd-report-setup-step-row hidden><span>Where did setup stop?</span><select name=\"setupStep\"><option value=\"profile-start\">Opening profile setup</option><option value=\"identity\">Name or handle</option><option value=\"profile-media\">Profile photo or banner</option><option value=\"location\">Hometown or location</option><option value=\"age-settings\">Birthdate or adult-content setting</option><option value=\"save\">Saving the profile</option><option value=\"account-connection\">Account connection</option><option value=\"other\">Another step</option></select></label><label><span data-dsd-report-details-label>Additional details</span><textarea name=\"details\" rows=\"4\" maxlength=\"1500\" placeholder=\"Add context for the moderation team\"></textarea></label><label data-dsd-report-contact-row hidden><span>Contact email (optional)</span><input name=\"contact\" type=\"email\" maxlength=\"254\" autocomplete=\"email\" inputmode=\"email\"></label><div data-dsd-report-attachment-row hidden><label><span>Screenshot or short recording (optional)</span><input name=\"supportAttachment\" type=\"file\" accept=\"image/jpeg,image/png,image/webp,image/gif,video/mp4,video/webm,video/quicktime\"><small>Private support evidence. Maximum 25 MB.</small></label><div data-dsd-report-attachment-preview></div></div><p data-dsd-report-modal-status aria-live=\"polite\"></p><div class=\"dsd-report-modal__actions\"><button type=\"button\" data-dsd-report-modal-close>Cancel</button><button type=\"submit\">Submit report</button></div></form></section>'),\n      document.body.appendChild(layer));\n    layer.addEventListener(\"click\", function (event) {\n      var removeAttachment = event.target.closest(\"[data-dsd-report-attachment-remove]\");\n      if (removeAttachment) {\n        event.preventDefault();\n        var attachmentInput = layer.querySelector('input[name=\"supportAttachment\"]');\n        if (attachmentInput) attachmentInput.value = \"\";\n        if (reportModalState && reportModalState.attachmentPreviewUrl) {\n          try { URL.revokeObjectURL(reportModalState.attachmentPreviewUrl); } catch (error) {}\n          reportModalState.attachmentPreviewUrl = \"\";\n        }\n        var attachmentPreview = qs(\"[data-dsd-report-attachment-preview]\", layer);\n        if (attachmentPreview) attachmentPreview.innerHTML = \"\";\n        return;\n      }\n      event.target.closest(\"[data-dsd-report-modal-close]\") &&\n        (event.preventDefault(), closeReportModal());\n    });\n    layer.querySelector('input[name=\"supportAttachment\"]').addEventListener(\"change\", function (event) {\n      var input = event.currentTarget,\n        file = input.files && input.files[0],\n        preview = qs(\"[data-dsd-report-attachment-preview]\", layer);\n      if (!preview || !reportModalState) return;\n      if (reportModalState.attachmentPreviewUrl) {\n        try { URL.revokeObjectURL(reportModalState.attachmentPreviewUrl); } catch (error) {}\n      }\n      reportModalState.attachmentPreviewUrl = \"\";\n      preview.innerHTML = \"\";\n      if (!file) return;\n      if (file.size > 25 * 1024 * 1024) {\n        input.value = \"\";\n        preview.innerHTML = \"<p>Attachment exceeds the 25 MB support limit.</p>\";\n        return;\n      }\n      reportModalState.attachmentPreviewUrl = URL.createObjectURL(file);\n      preview.innerHTML = (String(file.type || \"\").indexOf(\"video/\") === 0\n        ? '<video controls muted playsinline src=\"' + html(reportModalState.attachmentPreviewUrl) + '\"></video>'\n        : '<img alt=\"Selected support attachment preview\" src=\"' + html(reportModalState.attachmentPreviewUrl) + '\">') +\n        '<button type=\"button\" data-dsd-report-attachment-remove>Remove attachment</button>';\n    });\n    layer\r\n      .querySelector(\"[data-dsd-report-modal-form]\")\r\n      .addEventListener(\"submit\", function (event) {\r\n        event.preventDefault();\r\n        if (!reportModalState) return;\r\n        var form = event.currentTarget,\r\n          reason = String(form.elements.reason.value || \"\").trim(),\n          details = String(form.elements.details.value || \"\").trim(),\n          setupStep = String(form.elements.setupStep.value || \"\").trim(),\n          contact = String(form.elements.contact.value || \"\").trim(),\n          supportAttachment = form.elements.supportAttachment && form.elements.supportAttachment.files && form.elements.supportAttachment.files[0],\n          status = qs(\"[data-dsd-report-modal-status]\", layer),\n          submit = form.querySelector('button[type=\"submit\"]');\n        if (!reason && reportModalState.setupIssue !== !0) {\n          status.textContent = \"Choose a reason before submitting.\";\n          return;\n        }\n        if (reportModalState.setupIssue === !0 && details.length < 20) {\n          status.textContent = \"Describe what happened using at least 20 characters.\";\n          return;\n        }\n        if (supportAttachment && supportAttachment.size > 25 * 1024 * 1024) {\n          status.textContent = \"Attachment exceeds the 25 MB support limit.\";\n          return;\n        }\n        ((submit.disabled = !0), (status.textContent = \"Submitting report...\"));\n        var submittedSetup = reportModalState.setupIssue === !0,\n          submittedTechnical = reportModalState.technicalIssue === !0,\n          reportPromise = submittedSetup\n          ? submitSetupIssueReport(reportModalState, setupStep, details, contact, supportAttachment)\n          : submittedTechnical\n          ? submitTechnicalIssueReport(reportModalState, details)\n          : reportContent(\r\n              reportModalState.targetType,\r\n              reportModalState.targetId,\r\n              reportModalState.sourcePath,\r\n              \"Reason: \" + reason +\r\n                (details ? \"\\nDetails: \" + details : \"\"),\r\n            );\r\n        reportPromise\n          .then(function (report) {\n            report\n              ? (closeReportModal(),\n                renderStatus(\n                  submittedSetup\n                    ? \"Setup issue received. Reference \" + String(report.reference || \"available\") + \".\"\n                    : submittedTechnical\n                      ? \"Technical issue submitted.\"\n                      : \"Report submitted for moderation.\",\n                ))\n              : ((submit.disabled = !1),\n                (status.textContent = \"Report could not be submitted. Try again.\"));\n          })\n          .catch(function () {\n            submit.disabled = !1;\n            status.textContent = \"Report could not be submitted. Try again.\";\n          });\n      });\r\n    return layer;\r\n  }\r\n  function openReportModal(targetType, targetId, sourcePath, details) {\r\n    if (!requireActiveProfile(\"report content\")) return;\r\n    var context = safetyReportContext(\r\n        targetType,\r\n        targetId,\r\n        sourcePath,\r\n        details,\r\n      ),\r\n      layer = ensureReportModal(),\r\n      target = qs(\"[data-dsd-report-modal-target]\", layer),\r\n      form = qs(\"[data-dsd-report-modal-form]\", layer);\r\n    ((context.returnScroll = window.scrollY || window.pageYOffset || 0),\n      (context.returnFocus = document.activeElement || null),\n      (reportModalState = context),\n      (qs(\"[data-dsd-report-modal-eyebrow]\", layer).textContent =\r\n        \"Safety report\"),\r\n      (qs(\"#dsd-report-modal-title\", layer).textContent = \"Report content\"),\r\n      (qs(\"[data-dsd-report-reason-row]\", layer).hidden = !1),\n      (qs(\"[data-dsd-report-setup-step-row]\", layer).hidden = !0),\n      (qs(\"[data-dsd-report-contact-row]\", layer).hidden = !0),\n      (qs(\"[data-dsd-report-attachment-row]\", layer).hidden = !0),\n      (qs(\"[data-dsd-report-details-label]\", layer).textContent =\r\n        \"Additional details\"),\r\n      (target.innerHTML =\r\n        \"<strong>\" +\r\n        html(context.targetType || \"content\") +\r\n        \"</strong><span>\" +\r\n        html(context.preview || \"Reported content\") +\r\n        \"</span>\"),\r\n      form.reset(),\r\n      (form.elements.details.placeholder =\r\n        \"Add context for the moderation team\"),\r\n      (qs(\"[data-dsd-report-modal-status]\", layer).textContent = \"\"),\r\n      (form.querySelector('button[type=\"submit\"]').disabled = !1),\r\n      (layer.hidden = !1),\r\n      layer.setAttribute(\"aria-hidden\", \"false\"),\r\n      document.documentElement.setAttribute(\"data-dsd-report-modal-open\", \"true\"),\r\n      scheduleGlobalOverlayStateSync(),\r\n      window.setTimeout(function () {\r\n        form.elements.reason.focus();\r\n      }, 0));\r\n  }\r\n  function openCallReportFromRoute(attempt) {\r\n    if (!/\\/pages\\/safety-center(?:$|[/?#])/i.test(String(location.pathname || \"\"))) return;\r\n    var params = new URLSearchParams(window.location.search || \"\"),\r\n      targetType = String(params.get(\"targetType\") || \"\").toLowerCase(),\r\n      callId = String(params.get(\"callId\") || \"\").trim(),\r\n      conversationId = String(params.get(\"conversationId\") || \"\").trim();\r\n    if (targetType !== \"call\" || !callId) return;\r\n    if (!canUseSocialActions()) {\r\n      if (Number(attempt || 0) < 5) window.setTimeout(function () { openCallReportFromRoute(Number(attempt || 0) + 1); }, 750);\r\n      return;\r\n    }\r\n    openReportModal(\"call\", callId, \"calls/\" + callId, conversationId ? \"One-to-one call in conversation \" + conversationId : \"One-to-one call\");\r\n    params.delete(\"targetType\");\r\n    params.delete(\"callId\");\r\n    params.delete(\"conversationId\");\r\n    history.replaceState(history.state, \"\", location.pathname + (params.toString() ? \"?\" + params.toString() : \"\") + location.hash);\r\n  }\r\n  function technicalIssueBrowserClass() {\r\n    var ua = String((window.navigator && window.navigator.userAgent) || \"\");\r\n    return /iPhone|iPad|iPod/i.test(ua)\r\n      ? \"ios-safari\"\r\n      : /Android/i.test(ua)\r\n        ? \"android-browser\"\r\n        : /Edg\\//i.test(ua)\r\n          ? \"edge-desktop\"\r\n          : /Chrome\\//i.test(ua)\r\n            ? \"chrome-desktop\"\r\n            : /Safari\\//i.test(ua)\r\n              ? \"safari-desktop\"\r\n              : \"other-browser\";\r\n  }\r\n  function technicalIssueContext(postId) {\r\n    var roleList = roles();\r\n    return {\r\n      route: String(window.location.pathname || \"/\").slice(0, 160),\r\n      postId: String(postId || \"\").slice(0, 160),\r\n      runtimeBuild: BUILD,\r\n      browserClass: technicalIssueBrowserClass(),\r\n      viewport: {\r\n        width: Math.max(0, Number(window.innerWidth || 0)),\r\n        height: Math.max(0, Number(window.innerHeight || 0)),\r\n      },\r\n      timestamp: new Date().toISOString(),\r\n      viewerRole:\r\n        roleList.indexOf(\"founder\") !== -1\r\n          ? \"founder\"\r\n          : hasDsdPlus()\r\n            ? \"dsd_plus\"\r\n            : \"member\",\r\n      accountSuffix: String(profileKey() || \"\").slice(-4),\r\n      contentType: \"post\",\r\n    };\r\n  }\r\n  function submitTechnicalIssueReport(context, description) {\n    var reportId =\r\n      \"technical-\" + Date.now() + \"-\" + Math.random().toString(36).slice(2, 6);\r\n    return submitSafetyReportViaProxy({\r\n      reportId: reportId,\r\n      action: \"technical-issue\",\r\n      targetType: \"technical_issue\",\r\n      targetId: context.targetId || \"\",\r\n      sourcePath: \"technicalReports/\" + reportId,\r\n      details: String(description || \"\").trim().slice(0, 1000),\r\n      preview: \"Technical issue on post \" + String(context.targetId || \"\"),\r\n      technicalContext: context.technicalContext || {},\r\n    }).then(function (response) {\r\n      return response && response.report ? response.report : null;\r\n    });\r\n  }\r\n  function openTechnicalIssueModal(postId) {\r\n    if (!requireActiveProfile(\"report a technical issue\")) return;\r\n    var layer = ensureReportModal(),\r\n      target = qs(\"[data-dsd-report-modal-target]\", layer),\r\n      form = qs(\"[data-dsd-report-modal-form]\", layer),\r\n      context = technicalIssueContext(postId);\r\n    ((reportModalState = {\n      technicalIssue: !0,\n      targetType: \"technical_issue\",\r\n      targetId: String(postId || \"\"),\r\n      sourcePath: \"technicalReports/pending\",\r\n      technicalContext: context,\n      returnScroll: window.scrollY || window.pageYOffset || 0,\n      returnFocus: document.activeElement || null,\n    }),\r\n      (qs(\"[data-dsd-report-modal-eyebrow]\", layer).textContent =\r\n        \"Technical report\"),\r\n      (qs(\"#dsd-report-modal-title\", layer).textContent =\r\n        \"Report a technical issue\"),\r\n      (target.innerHTML =\r\n        \"<strong>Post issue</strong><span>Describe what did not work. Technical context is attached automatically.</span>\"),\r\n      form.reset(),\n      (form.elements.reason.value = \"technical\"),\n      (qs(\"[data-dsd-report-reason-row]\", layer).hidden = !0),\n      (qs(\"[data-dsd-report-setup-step-row]\", layer).hidden = !0),\n      (qs(\"[data-dsd-report-contact-row]\", layer).hidden = !0),\n      (qs(\"[data-dsd-report-attachment-row]\", layer).hidden = !0),\n      (qs(\"[data-dsd-report-details-label]\", layer).textContent =\n        \"What happened?\"),\n      (form.elements.details.placeholder =\r\n        \"Describe the problem and what you expected to happen\"),\r\n      (qs(\"[data-dsd-report-modal-status]\", layer).textContent = \"\"),\r\n      (form.querySelector('button[type=\"submit\"]').disabled = !1),\r\n      (layer.hidden = !1),\r\n      layer.setAttribute(\"aria-hidden\", \"false\"),\r\n      document.documentElement.setAttribute(\"data-dsd-report-modal-open\", \"true\"),\r\n      scheduleGlobalOverlayStateSync(),\r\n      window.setTimeout(function () {\r\n        form.elements.details.focus();\r\n      }, 0));\r\n  }\r\n  function safetyReportContext(targetType, targetId, sourcePath, details) {\r\n    var label = String(targetType || \"\").replace(/^report-/, \"\") || \"content\",\r\n      id = String(targetId || \"\"),\r\n      item = null;\r\n    (label === \"post\" &&\r\n      (item =\r\n        (state.posts || []).filter(function (post) {\r\n          return String(post.postId || post.id || \"\") === id;\r\n        })[0] || null),\r\n      label === \"story\" &&\r\n        (item =\r\n          (state.stories || []).filter(function (story) {\r\n            return String(story.storyId || story.id || \"\") === id;\r\n          })[0] || null),\r\n      label === \"comment\" &&\r\n        Object.keys(state.commentsByPost || {}).some(function (postId) {\r\n          return (\r\n            (item =\r\n              (state.commentsByPost[postId] || []).filter(function (comment) {\r\n                return String(commentKey(comment) || \"\") === id;\r\n              })[0] || null),\r\n            !!item\r\n          );\r\n        }));\r\n    var preview = publicDisplayText(\r\n        details ||\r\n          (item &&\r\n            (item.body ||\r\n              item.text ||\r\n              item.caption ||\r\n              item.lastMessagePreview)) ||\r\n          \"Reported \" + label,\r\n        \"Reported content\",\r\n      ),\r\n      defaultPath =\r\n        label === \"post\"\r\n          ? \"posts/\" + id\r\n          : label === \"story\"\r\n            ? \"stories/\" + id\r\n            : label === \"comment\"\r\n              ? \"comments/\" + id\r\n              : label === \"message\"\r\n                ? \"conversations/\" + id\r\n                : label + \"/\" + id;\r\n    return {\r\n      targetType: label,\r\n      targetId: id,\r\n      sourcePath: sourcePath || defaultPath,\r\n      preview: String(preview || \"\").slice(0, 280),\r\n      targetAuthorUid:\r\n        (item &&\r\n          (item.authorUid || item.ownerUid || item.userId || item.uid)) ||\r\n        \"\",\r\n      targetAuthorProfileKey:\r\n        (item &&\r\n          (item.authorProfileKey ||\r\n            item.ownerProfileKey ||\r\n            item.profileKey ||\r\n            item.handle)) ||\r\n        \"\",\r\n      details: String(details || \"\").trim(),\r\n    };\r\n  }\r\n  function createSafetyReport(action, targetId, details, sourcePath) {\r\n    if (!requireActiveProfile(\"use safety controls\"))\r\n      return Promise.resolve(null);\r\n    var reportId = clean(\r\n        \"safety-\" + Date.now() + \"-\" + Math.random().toString(36).slice(2, 6),\r\n        \"safety\",\r\n      ),\r\n      context = safetyReportContext(action, targetId, sourcePath || \"\", details),\r\n      payload = {\r\n        reportId: reportId,\r\n        action: action || \"report\",\r\n        targetId: targetId || \"\",\r\n        targetType: context.targetType,\r\n        targetAuthorUid: context.targetAuthorUid,\r\n        targetAuthorProfileKey: context.targetAuthorProfileKey,\r\n        reporterUid: uid(),\r\n        reporterProfileKey: profileKey(),\r\n        reporterDisplayName: displayName(),\r\n        state: \"pending\",\r\n        details: context.details || details || \"\",\r\n        preview: context.preview,\r\n        sourcePath: context.sourcePath,\r\n        createdAt: serverTimestamp(),\r\n        createdAtMs: now(),\r\n        entity: entityMeta(\"safetyReport\", \"moderator_scoped\", \"standard\", {\r\n          action: action || \"report\",\r\n          targetId: targetId || \"\",\r\n        }),\r\n        firestorePath: PATHS.safetyReport,\r\n      },\r\n      queuePayload = {\r\n        queueItemId: reportId,\r\n        surface: context.targetType || \"safetyReport\",\r\n        sourcePath: context.sourcePath || \"safetyReports/\" + reportId,\r\n        reportPath: \"safetyReports/\" + reportId,\r\n        state: \"pending\",\r\n        action: action || \"report\",\r\n        targetType: context.targetType,\r\n        targetId: targetId || \"\",\r\n        targetAuthorUid: context.targetAuthorUid,\r\n        targetAuthorProfileKey: context.targetAuthorProfileKey,\r\n        reporterUid: uid(),\r\n        reporterProfileKey: profileKey(),\r\n        reporterDisplayName: displayName(),\r\n        authorUid: uid(),\r\n        details: context.details || details || \"\",\r\n        preview: context.preview || details || action || \"safety report\",\r\n        createdAt: now(),\r\n        createdAtMs: now(),\r\n      };\r\n    return submitSafetyReportViaProxy(Object.assign({}, payload, queuePayload))\r\n      .then(function (response) {\r\n        return (\r\n          notify(\r\n            uid(),\r\n            \"safety\",\r\n            \"Safety request submitted\",\r\n            \"Your safety request entered moderation review.\",\r\n            \"/pages/notifications\",\r\n          ),\r\n          renderStatus(\"Safety request submitted.\"),\r\n          Object.assign({}, payload, response && response.report)\r\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          claim(\"safety-report:canonical-submit-failed\", {\r\n            reportId: reportId,\r\n            targetType: context.targetType,\r\n            reason: ((error && error.message) || String(error || \"\")).slice(\r\n              0,\r\n              180,\r\n            ),\r\n            canonical: \"supabase-app-proxy-safety-report-submit\",\r\n          }),\r\n          queueDraft(\"safety-report\", payload, error),\r\n          renderStatus(\"Report could not be submitted. Try again.\"),\r\n          null\r\n        );\r\n      });\r\n  }\r\n  function reportContent(targetType, targetId, sourcePath, details) {\r\n    var label = String(targetType || \"content\").toLowerCase();\r\n    return createSafetyReport(\r\n      \"report-\" + label,\r\n      targetId,\r\n      details || \"Report \" + label + \" \" + targetId,\r\n      sourcePath,\r\n    );\r\n  }\r\n  function updateStoryState(storyId, stateValue) {\r\n    if (!canModerate() || !storyId) return Promise.resolve(null);\r\n    var story =\r\n      state.stories.filter(function (item) {\r\n        return (item.storyId || item.id) === storyId;\r\n      })[0] || {};\r\n    return getDoc(\"stories/\" + storyId)\r\n      .catch(function () {\r\n        return null;\r\n      })\r\n      .then(function (snap) {\r\n        (snap &&\r\n          snap.exists &&\r\n          snap.exists() &&\r\n          (story = Object.assign({}, story, snap.data() || {})),\r\n          stateValue === \"approved\" &&\r\n            storyExpired(story) &&\r\n            (claim(\"story-expiry:restore-blocked\", {\r\n              storyId: storyId,\r\n              reason: \"expired-story-must-not-be-reapproved-or-extended\",\r\n              build: BUILD,\r\n            }),\r\n            (stateValue = \"expired\")));\r\n        var policy = visibilityPolicyFromInput(story),\r\n          payload = {\r\n            status: stateValue,\r\n            ownerUid: story.ownerUid || story.authorUid || \"\",\r\n            authorProfileKey:\r\n              story.authorProfileKey || story.ownerProfileKey || \"\",\r\n            ownerDisplayName:\r\n              story.ownerDisplayName || story.authorDisplayName || \"DSD member\",\r\n            visibility: policy.visibility,\r\n            contentRating: policy.contentRating,\r\n            accessGate: policy.accessGate,\r\n            moderation: {\r\n              state: stateValue,\r\n              gate: \"founder-review\",\r\n              lastActionAt: serverTimestamp(),\r\n              reviewedBy: uid(),\r\n            },\r\n            entity: Object.assign({}, story.entity || {}, {\r\n              visibility: policy.visibility,\r\n              contentRating: policy.contentRating,\r\n              accessGate: policy.accessGate,\r\n              moderationStatus: stateValue,\r\n            }),\r\n          };\r\n        return (\r\n          (state.stories = state.stories.map(function (item) {\r\n            return (item.storyId || item.id) === storyId\r\n              ? Object.assign({}, item, payload, {\r\n                  moderation: Object.assign(\r\n                    {},\r\n                    item.moderation || {},\r\n                    payload.moderation,\r\n                  ),\r\n                })\r\n              : item;\r\n          })),\r\n          renderStories(),\r\n          setDoc(\"stories/\" + storyId, payload, !0)\r\n            .then(function () {\r\n              return skipLegacyUserStoryShadow(storyId);\r\n            })\r\n            .then(function () {\r\n              return syncGatedStoryShell(\r\n                storyId,\r\n                Object.assign({}, story, payload),\r\n                stateValue,\r\n              );\r\n            })\r\n            .then(function () {\r\n              return setDoc(\r\n                \"moderationQueue/\" + storyId,\r\n                {\r\n                  state: stateValue,\r\n                  visibility: policy.visibility,\r\n                  contentRating: policy.contentRating,\r\n                  accessGate: policy.accessGate,\r\n                  reviewedBy: uid(),\r\n                  reviewedAt: serverTimestamp(),\r\n                },\r\n                !0,\r\n              ).catch(function () {\r\n                return null;\r\n              });\r\n            })\r\n            .then(function () {\r\n              return addDoc(\"founderAudit\", {\r\n                action: \"story.\" + stateValue,\r\n                actorUid: uid(),\r\n                sourcePath: \"stories/\" + storyId,\r\n                firestorePath: PATHS.founderAudit,\r\n              }).catch(function () {\r\n                return null;\r\n              });\r\n            })\r\n            .then(function () {\r\n              return (\r\n                renderStatus(\"Story \" + stateValue + \".\"),\r\n                renderStories(),\r\n                payload\r\n              );\r\n            })\r\n            .catch(function (error) {\r\n              return (\r\n                queueDraft(\r\n                  \"story-state\",\r\n                  { storyId: storyId, state: stateValue },\r\n                  error,\r\n                ),\r\n                payload\r\n              );\r\n            })\r\n        );\r\n      });\r\n  }\r\n  function deleteStory(storyId) {\n    if (!storyId || !canUseSocialActions()) return Promise.resolve(null);\n    var story =\r\n      state.stories.filter(function (item) {\r\n        return (item.storyId || item.id) === storyId;\r\n      })[0] || {};\r\n    if (!canModerate() && !recordOwnedByCurrentProfile(story))\n      return Promise.resolve(null);\n    var deletedActiveStory = state.activeStoryId === storyId;\n    return storyOwnerDeleteViaProxy({ storyId: storyId })\n      .then(function (result) {\n        state.stories = state.stories.filter(function (item) {\n          return (item.storyId || item.id) !== storyId;\n        });\n        state.gatedStoryShells = (state.gatedStoryShells || []).filter(\n          function (item) {\n            return (item.storyId || item.id) !== storyId;\n          },\n        );\n        if (deletedActiveStory) {\n          state.activeStoryId = \"\";\n          closeImmersiveOverlay();\n        }\n        renderStories();\n        renderStatus(\"Story deleted.\");\n        claim(\"story-owner-delete:canonical\", {\n          storyId: storyId,\n          owner: \"supabase-atomic-owner-story-delete\",\n        });\n        return result;\n      })\n      .catch(function (error) {\n        return (queueDraft(\"story-delete\", { storyId: storyId }, error), null);\n      });\n  }\r\n  function updateSourceRecordState(sourcePath, stateValue) {\r\n    return !sourcePath ||\r\n      !/^(posts|stories|profiles|publicProfiles)\\//.test(sourcePath)\r\n      ? Promise.resolve(null)\r\n      : setDoc(\r\n          sourcePath,\r\n          {\r\n            status: stateValue,\r\n            moderation: {\r\n              state: stateValue,\r\n              gate: \"founder-review\",\r\n              lastActionAt: serverTimestamp(),\r\n              reviewedBy: uid(),\r\n            },\r\n            entity: { moderationStatus: stateValue },\r\n          },\r\n          !0,\r\n        ).catch(function (error) {\r\n          return (\r\n            queueDraft(\r\n              \"source-record-state\",\r\n              { sourcePath: sourcePath, state: stateValue },\r\n              error,\r\n            ),\r\n            null\r\n          );\r\n        });\r\n  }\r\n  function scopedModerationSource() {\r\n    return null;\r\n  }\r\n  function updatePostState(postId, stateValue) {\r\n    return canModerate()\r\n      ? getDoc(\"posts/\" + postId)\r\n          .catch(function () {\r\n            return null;\r\n          })\r\n          .then(function (snap) {\r\n            var post =\r\n                snap && snap.exists && snap.exists() ? snap.data() || {} : {},\r\n              selfReviewed = !!(\r\n                stateValue === \"approved\" &&\r\n                identityMatchesCurrent(\r\n                  post.authorUid || post.ownerUid || \"\",\r\n                  post.authorProfileKey || post.ownerProfileKey || \"\",\r\n                )\r\n              ),\r\n              payload = {\r\n                status: stateValue,\r\n                authorUid: post.authorUid || post.ownerUid || \"\",\r\n                authorProfileKey:\r\n                  post.authorProfileKey || post.ownerProfileKey || \"\",\r\n                authorDisplayName:\r\n                  post.authorDisplayName ||\r\n                  post.ownerDisplayName ||\r\n                  \"DSD member\",\r\n                moderation: {\r\n                  state: stateValue,\r\n                  gate: \"founder-review\",\r\n                  lastActionAt: serverTimestamp(),\r\n                  reviewedBy: uid(),\r\n                  selfReviewed: selfReviewed,\r\n                },\r\n              };\r\n            if (stateValue === \"approved\") {\r\n              var policy = visibilityPolicyFromInput(post);\r\n              ((payload.visibility = policy.visibility),\r\n                (payload.contentRating = policy.contentRating),\r\n                (payload.accessGate = policy.accessGate),\r\n                (payload.entity = Object.assign({}, post.entity || {}, {\r\n                  visibility: payload.visibility,\r\n                  contentRating: payload.contentRating,\r\n                  accessGate: payload.accessGate,\r\n                  moderationStatus: \"approved\",\r\n                })));\r\n            }\r\n            return (\r\n              saveLocalPostStateOverride(postId, payload),\r\n              patchLocalPost(postId, payload),\r\n              (state.moderationQueueItems = state.moderationQueueItems.map(function (item) {\n                return (item.queueItemId || item.id) === postId\r\n                  ? Object.assign({}, item, {\r\n                      state: stateValue,\r\n                      reviewedBy: uid(),\r\n                      reviewedAt: serverTimestamp(),\r\n                      selfReviewed: selfReviewed,\r\n                    })\r\n                  : item;\r\n              })),\r\n              renderAll(),\r\n              setDoc(\"posts/\" + postId, payload, !0)\r\n                .then(function () {\r\n                  return setDoc(\r\n                    \"moderationQueue/\" + postId,\r\n                    {\r\n                      state: stateValue,\r\n                      reviewedBy: uid(),\r\n                      reviewedAt: serverTimestamp(),\r\n                      selfReviewed: selfReviewed,\r\n                    },\r\n                    !0,\r\n                  ).catch(function (error) {\r\n                    return (\r\n                      queueDraft(\r\n                        \"moderation-queue-post-state\",\r\n                        { postId: postId, state: stateValue },\r\n                        error,\r\n                      ),\r\n                      null\r\n                    );\r\n                  });\r\n                })\r\n                .then(function () {\r\n                  return payload.accessGate === \"dsd_plus\" ||\r\n                    payload.contentRating === \"gated\" ||\r\n                    post.accessGate === \"dsd_plus\" ||\r\n                    post.contentRating === \"gated\"\r\n                    ? syncGatedPostShell(\r\n                        postId,\r\n                        Object.assign({}, post, payload),\r\n                        stateValue,\r\n                      )\r\n                    : null;\r\n                })\r\n                .then(function () {\r\n                  return recordFounderAudit(\r\n                    {\r\n                      action: \"post.\" + stateValue,\r\n                      actorUid: uid(),\r\n                      sourcePath: \"posts/\" + postId,\r\n                      selfReviewed: selfReviewed,\r\n                    },\r\n                    \"post-state\",\r\n                  );\r\n                })\r\n                .then(function () {\r\n                  return (\r\n                    renderStatus(\"Post \" + stateValue + \".\"),\r\n                    renderAll(),\r\n                    payload\r\n                  );\r\n                })\r\n                .catch(function (error) {\r\n                  return (\r\n                    queueDraft(\r\n                      \"post-state\",\r\n                      { postId: postId, state: stateValue },\r\n                      error,\r\n                    ),\r\n                    renderAll(),\r\n                    payload\r\n                  );\r\n                })\r\n            );\r\n          })\r\n      : Promise.resolve(null);\r\n  }\r\n  function updateQueueItemState(queueItemId, stateValue) {\r\n    if (!canModerate() || !queueItemId) return Promise.resolve(null);\r\n    var payload = {\r\n        state: stateValue,\r\n        reviewedBy: uid(),\r\n        reviewedAt: serverTimestamp(),\r\n      },\r\n      queueItem =\r\n        state.moderationQueueItems.filter(function (item) {\n          return (item.queueItemId || item.id) === queueItemId;\r\n        })[0] || {},\r\n      sourcePath = queueSourcePath(queueItem, queueItemId),\r\n      scoped = scopedModerationSource(sourcePath),\r\n      sourcePatch = {\r\n        status: stateValue,\r\n        moderation: {\r\n          state: stateValue,\r\n          gate: \"founder-review\",\r\n          lastActionAt: serverTimestamp(),\r\n          reviewedBy: uid(),\r\n        },\r\n        entity: { moderationStatus: stateValue },\r\n      };\r\n    return (\r\n      stateValue === \"approved\" &&\r\n        ((sourcePatch.approvedAt = serverTimestamp()),\r\n        (sourcePatch.approvedBy = uid())),\r\n      setDoc(\"moderationQueue/\" + queueItemId, payload, !0)\r\n        .then(function () {\r\n          return sourcePath\r\n            ? setDoc(sourcePath, sourcePatch, !0).catch(function (error) {\r\n                return (\r\n                  queueDraft(\r\n                    \"source-record-state\",\r\n                    { sourcePath: sourcePath, state: stateValue },\r\n                    error,\r\n                  ),\r\n                  null\r\n                );\r\n              })\r\n            : null;\r\n        })\r\n        .then(function () {\r\n          return recordFounderAudit(\r\n            {\r\n              action: (scoped ? scoped.surface : \"queue\") + \".\" + stateValue,\r\n              actorUid: uid(),\r\n              sourcePath: sourcePath || \"moderationQueue/\" + queueItemId,\r\n            },\r\n            \"moderation-queue-state\",\r\n          );\r\n        })\r\n        .then(function () {\r\n          return (\r\n            (state.moderationQueueItems = state.moderationQueueItems.map(function (item) {\n              return (item.queueItemId || item.id) === queueItemId\r\n                ? Object.assign({}, item, payload)\r\n                : item;\r\n            })),\r\n            renderModeration(),\r\n            renderAll(),\r\n            payload\r\n          );\r\n        })\r\n        .catch(function (error) {\r\n          return (\r\n            queueDraft(\r\n              \"moderation-queue-state\",\r\n              { queueItemId: queueItemId, state: stateValue },\r\n              error,\r\n            ),\r\n            null\r\n          );\r\n        })\r\n    );\r\n  }\r\n  function queueItemById(queueItemId) {\r\n    return (\r\n      state.moderationQueueItems.filter(function (item) {\n        return (item.queueItemId || item.postId || item.id) === queueItemId;\r\n      })[0] ||\r\n      state.posts.filter(function (item) {\r\n        return (item.postId || item.id) === queueItemId;\r\n      })[0] ||\r\n      {}\r\n    );\r\n  }\r\n  function queueSourcePath(item, queueItemId) {\r\n    var source = item.sourcePath || item.firestorePath || \"\",\r\n      action = String(item.action || \"\").toLowerCase();\r\n    if (item.targetId && action === \"report-post\")\r\n      return \"posts/\" + item.targetId;\r\n    if (item.targetId && action === \"report-story\")\r\n      return \"stories/\" + item.targetId;\r\n    if (source && source.indexOf(\"{\") === -1) return source;\r\n    var surface = moderationSurface(item);\r\n    return surface === \"post\"\r\n      ? \"posts/\" + queueItemId\r\n      : surface === \"story\"\r\n        ? \"stories/\" + queueItemId\r\n        : surface === \"profile\"\r\n          ? \"profiles/\" + (item.targetId || item.ownerUid || queueItemId)\r\n          : \"\";\r\n  }\r\n  function syncGatedPostShell(postId, post, status) {\r\n    post = post || {};\r\n    var payload = {\r\n      postId: postId,\r\n      gatedShell: !0,\r\n      status: status || post.status || \"pending\",\r\n      authorUid: post.authorUid || \"\",\r\n      authorProfileKey: post.authorProfileKey || \"\",\r\n      ownerProfileKey: post.authorProfileKey || post.ownerProfileKey || \"\",\r\n      authorDisplayName: post.authorDisplayName || \"DSD member\",\r\n      authorAvatarMediaId: post.authorAvatarMediaId || \"\",\r\n      counts: Object.assign(\r\n        { views: 0, likes: 0, comments: 0, shares: 0 },\r\n        post.counts || {},\r\n      ),\r\n      visibility: \"public\",\r\n      contentRating: \"gated\",\r\n      accessGate: \"dsd_plus\",\r\n      entity: authoredEntityMeta(\r\n        \"gatedPostShell\",\r\n        \"public\",\r\n        \"gated\",\r\n        {\r\n          uid: post.authorUid || \"\",\r\n          profileKey: post.authorProfileKey || post.ownerProfileKey || \"\",\r\n          displayName: post.authorDisplayName || \"DSD member\",\r\n        },\r\n        {\r\n          sourcePostId: postId,\r\n          accessGate: \"dsd_plus\",\r\n          moderationStatus: status || post.status || \"pending\",\r\n        },\r\n      ),\r\n      createdAt: post.createdAt || serverTimestamp(),\r\n      updatedAt: serverTimestamp(),\r\n    };\r\n    return setDoc(\"gatedPostShells/\" + postId, payload, !0).then(function () {\r\n      return payload;\r\n    });\r\n  }\r\n  function syncGatedStoryShell(storyId, story, status) {\r\n    story = story || {};\r\n    return fetch(\r\n      \"/apps/dsd-firebase-custom-token/supabase/restricted-story-shells\",\r\n      {\r\n        method: \"POST\",\r\n        credentials: \"include\",\r\n        headers: {\r\n          \"Content-Type\": \"application/json\",\r\n          Accept: \"application/json\",\r\n        },\r\n        body: JSON.stringify({ action: \"sync\", storyId: storyId }),\r\n      },\r\n    ).then(function (response) {\r\n      return response.text().then(function (text) {\r\n        var body = {};\r\n        try {\r\n          body = text ? JSON.parse(text) : {};\r\n        } catch (error) {\r\n          body = { error: text || \"invalid_story_shell_response\" };\r\n        }\r\n        if (!response.ok) {\r\n          var failure = new Error(\r\n            body.error || body.message || \"story_shell_sync_failed\",\r\n          );\r\n          throw ((failure.status = response.status), (failure.body = body), failure);\r\n        }\r\n        return body;\r\n      });\r\n    });\r\n  }\r\n  function updateQueueClassification(queueItemId, classification) {\r\n    if (!canModerate() || !queueItemId) return Promise.resolve(null);\r\n    var item = queueItemById(queueItemId),\r\n      sourcePath = queueSourcePath(item, queueItemId),\r\n      rating =\r\n        classification === \"mature\"\r\n          ? \"mature\"\r\n          : classification === \"explicit\"\r\n            ? \"explicit\"\r\n            : classification === \"gated\"\r\n              ? \"gated\"\r\n              : \"standard\",\r\n      accessGate = classification === \"gated\" ? \"dsd_plus\" : \"\",\r\n      patch = {\r\n        authorUid: item.authorUid || item.ownerUid || \"\",\r\n        ownerUid: item.ownerUid || item.authorUid || \"\",\r\n        authorProfileKey:\r\n          item.authorProfileKey ||\r\n          item.ownerProfileKey ||\r\n          item.profileKey ||\r\n          \"\",\r\n        ownerProfileKey:\r\n          item.ownerProfileKey ||\r\n          item.authorProfileKey ||\r\n          item.profileKey ||\r\n          \"\",\r\n        authorDisplayName:\r\n          item.authorDisplayName ||\r\n          item.ownerDisplayName ||\r\n          item.displayName ||\r\n          \"DSD member\",\r\n        ownerDisplayName:\r\n          item.ownerDisplayName ||\r\n          item.authorDisplayName ||\r\n          item.displayName ||\r\n          \"DSD member\",\r\n        contentRating: rating,\r\n        accessGate: accessGate,\r\n        moderation: Object.assign({}, item.moderation || {}, {\r\n          state: item.state || item.status || \"pending\",\r\n          classification: classification,\r\n          lastActionAt: serverTimestamp(),\r\n          reviewedBy: uid(),\r\n        }),\r\n        entity: Object.assign({}, item.entity || {}, {\r\n          contentRating: rating,\r\n          accessGate: accessGate,\r\n        }),\r\n      },\r\n      writes = [];\r\n    (sourcePath && writes.push(setDoc(sourcePath, patch, !0)),\r\n      writes.push(\r\n        setDoc(\r\n          \"moderationQueue/\" + queueItemId,\r\n          {\r\n            classification: classification,\r\n            contentRating: rating,\r\n            accessGate: accessGate,\r\n            reviewedBy: uid(),\r\n            reviewedAt: serverTimestamp(),\r\n          },\r\n          !0,\r\n        ),\r\n      ));\r\n    var postSource = String(sourcePath || \"\").match(/^posts\\/([^/]+)$/),\r\n      storySource = String(sourcePath || \"\").match(/^stories\\/([^/]+)$/),\r\n      scopedSource = scopedModerationSource(sourcePath),\r\n      scopedPostSource = scopedSource && scopedSource.collection === \"posts\",\r\n      scopedStorySource = scopedSource && scopedSource.collection === \"stories\",\r\n      sourceId = postSource\r\n        ? postSource[1]\r\n        : storySource\r\n          ? storySource[1]\r\n          : scopedSource\r\n            ? scopedSource.itemId\r\n            : queueItemId,\r\n      sourceRecord = postSource\r\n        ? localPostById(sourceId) || item\r\n        : (storySource &&\r\n            state.stories.filter(function (story) {\r\n              return (story.storyId || story.id) === sourceId;\r\n            })[0]) ||\r\n          item;\r\n    ((patch.authorUid =\r\n      sourceRecord.authorUid || sourceRecord.ownerUid || patch.authorUid),\r\n      (patch.ownerUid =\r\n        sourceRecord.ownerUid || sourceRecord.authorUid || patch.ownerUid),\r\n      (patch.authorProfileKey =\r\n        sourceRecord.authorProfileKey ||\r\n        sourceRecord.ownerProfileKey ||\r\n        patch.authorProfileKey),\r\n      (patch.ownerProfileKey =\r\n        sourceRecord.ownerProfileKey ||\r\n        sourceRecord.authorProfileKey ||\r\n        patch.ownerProfileKey),\r\n      (patch.authorDisplayName =\r\n        sourceRecord.authorDisplayName ||\r\n        sourceRecord.ownerDisplayName ||\r\n        patch.authorDisplayName),\r\n      (patch.ownerDisplayName =\r\n        sourceRecord.ownerDisplayName ||\r\n        sourceRecord.authorDisplayName ||\r\n        patch.ownerDisplayName));\r\n    var shellStatus =\r\n      sourceRecord.status ||\r\n      (sourceRecord.moderation && sourceRecord.moderation.state) ||\r\n      item.status ||\r\n      item.state ||\r\n      \"pending\";\r\n    return (\r\n      classification === \"gated\" && (storySource || scopedStorySource)\r\n        ? (writes.push(\r\n            syncGatedStoryShell(\r\n              sourceId,\r\n              Object.assign({}, sourceRecord, patch),\r\n              shellStatus,\r\n            ),\r\n          ),\r\n          sourceId !== queueItemId)\r\n        : classification === \"gated\" && (postSource || scopedPostSource)\r\n          ? (writes.push(\r\n              syncGatedPostShell(\r\n                sourceId,\r\n                Object.assign({}, sourceRecord, patch),\r\n                shellStatus,\r\n              ),\r\n            ),\r\n            sourceId !== queueItemId &&\r\n              writes.push(\r\n                retireGatedPostShell(queueItemId).catch(function () {\r\n                  return null;\r\n                }),\r\n              ))\r\n          : classification === \"gated\"\r\n            ? writes.push(\r\n                syncGatedPostShell(\r\n                  queueItemId,\r\n                  Object.assign({}, item, patch),\r\n                  shellStatus,\r\n                ),\r\n              )\r\n            : (writes.push(\r\n                retireGatedPostShell(sourceId).catch(function () {\r\n                  return null;\r\n                }),\r\n              ),\r\n              sourceId !== queueItemId &&\r\n                (writes.push(\r\n                  retireGatedPostShell(queueItemId).catch(\r\n                    function () {\r\n                      return null;\r\n                    },\r\n                  ),\r\n                ))),\r\n      Promise.all(writes)\r\n        .then(function () {\r\n          return recordFounderAudit(\r\n            {\r\n              action: \"queue.classify.\" + classification,\r\n              actorUid: uid(),\r\n              sourcePath: sourcePath || \"moderationQueue/\" + queueItemId,\r\n            },\r\n            \"moderation-queue-classify\",\r\n          );\r\n        })\r\n        .then(function () {\r\n          return (\r\n            (state.moderationQueueItems = state.moderationQueueItems.map(function (record) {\n              return (record.queueItemId || record.postId || record.id) ===\r\n                queueItemId\r\n                ? Object.assign({}, record, patch, {\r\n                    classification: classification,\r\n                  })\r\n                : record;\r\n            })),\r\n            renderModeration(),\r\n            renderAll(),\r\n            patch\r\n          );\r\n        })\r\n        .catch(function (error) {\r\n          return (\r\n            queueDraft(\r\n              \"moderation-classification\",\r\n              {\r\n                queueItemId: queueItemId,\r\n                classification: classification,\r\n                sourcePath: sourcePath,\r\n              },\r\n              error,\r\n            ),\r\n            null\r\n          );\r\n        })\r\n    );\r\n  }\r\n  function applyPostDetailCounts(postId, payload) {\r\n    var commentCount = Number(payload && payload.commentCount),\r\n      reactionCount = Number(payload && payload.reactionCount);\r\n    state.posts = (state.posts || []).map(function (item) {\r\n      if (\r\n        counterIdentityKeys(item).indexOf(postId) === -1 &&\r\n        (item.postId || item.id) !== postId\r\n      )\r\n        return item;\r\n      var counts = Object.assign({}, item.counts || {});\r\n      isFinite(commentCount) && (counts.comments = Math.max(0, commentCount));\r\n      isFinite(reactionCount) && (counts.likes = Math.max(0, reactionCount));\r\n      return Object.assign({}, item, {\r\n        counts: counts,\r\n        reactionCount: isFinite(reactionCount)\r\n          ? Math.max(0, reactionCount)\r\n          : item.reactionCount,\r\n      });\r\n    });\r\n  }\r\n  function stopPostDetailRealtimeOwner(reason) {\r\n    var owner = state.postDetailRealtimeOwner;\r\n    state.postDetailRealtimeOwner = null;\r\n    state.postDetailRealtimePostId = \"\";\r\n    try {\r\n      owner && typeof owner.stop == \"function\" && owner.stop();\r\n    } catch (error) {}\r\n    owner &&\r\n      claim(\"post-detail-realtime:closed\", {\r\n        reason: reason || \"closed\",\r\n        perFeedCardChannels: 0,\r\n      });\r\n  }\r\n  function startPostDetailRealtimeOwner(postId, bootstrapOwner) {\n    postId = String(postId || \"\").trim();\r\n    if (!hasCustomer() || !postId) return;\r\n    if (\r\n      state.postDetailRealtimeOwner &&\r\n      state.postDetailRealtimePostId === postId\r\n    )\r\n      return;\r\n    stopPostDetailRealtimeOwner(\"post-detail-switch\");\r\n    state.postDetailRealtimePostId = postId;\r\n    waitForSupabaseAdapter(postId, \"openPrivatePostDetailChannel\")\r\n      .then(function (adapter) {\r\n        return adapter.openPrivatePostDetailChannel({\r\n          postId: postId,\r\n          onEvent: function (payload) {\r\n            if (\r\n              !state.postDrawer ||\r\n              !state.postDrawer.open ||\r\n              state.postDrawer.postId !== postId\r\n            )\r\n              return;\r\n            applyPostDetailCounts(postId, payload || {});\r\n            if (payload && payload.scope === \"comment\") {\r\n              bootstrapOwner &&\r\n                typeof bootstrapOwner.reload == \"function\" &&\r\n                bootstrapOwner.reload();\r\n            } else if (payload && payload.scope === \"reaction\") {\r\n              hydrateViewerReactionForPost(postId, { force: !0 });\r\n              renderPostDrawer();\r\n            }\r\n            scheduleRenderPosts(\"post-detail-delta\");\r\n          },\r\n          onStatus: function (status, detail) {\r\n            status === \"error\" &&\r\n              claim(\"post-detail-realtime:error\", {\r\n                postId: postId,\r\n                reason: (detail && detail.reason) || \"channel-error\",\r\n                pollingFallback: !1,\r\n              });\r\n          },\r\n        });\r\n      })\r\n      .then(function (owner) {\r\n        if (\r\n          !state.postDrawer ||\r\n          !state.postDrawer.open ||\r\n          state.postDrawer.postId !== postId\r\n        ) {\r\n          owner && owner.stop && owner.stop();\r\n          return;\r\n        }\r\n        state.postDetailRealtimeOwner = owner;\r\n      })\r\n      .catch(function (error) {\r\n        state.postDetailRealtimePostId === postId &&\r\n          (state.postDetailRealtimePostId = \"\");\r\n        claim(\"post-detail-realtime:blocked\", {\r\n          postId: postId,\r\n          error: (error && error.message) || String(error),\r\n          pollingFallback: !1,\r\n        });\r\n      });\n  }\n  function uploadSetupSupportAttachment(response, file) {\n    var reportRef = response && response.ticket && response.ticket.reference,\n      receipt = response && response.receipt;\n    if (!file || !reportRef || !receipt) return Promise.resolve(response);\n    return submitSetupIssueViaProxy({\n      action: \"attachment-create\",\n      reportRef: reportRef,\n      receipt: receipt,\n      contentType: String(file.type || \"\"),\n      bytes: Number(file.size || 0),\n      mediaKind: String(file.type || \"\").indexOf(\"video/\") === 0 ? \"short-recording\" : \"screenshot\",\n    }).then(function (created) {\n      var upload = created && created.upload,\n        attachmentId = created && created.attachment && created.attachment.attachmentId;\n      if (!upload || !upload.url || !attachmentId) throw new Error(\"support_attachment_upload_ticket_missing\");\n      return fetch(upload.url, {\n        method: upload.method || \"PUT\",\n        headers: upload.headers || { \"Content-Type\": file.type },\n        body: file,\n      }).then(function (uploadResponse) {\n        if (!uploadResponse.ok) throw new Error(\"support_attachment_upload_failed\");\n        return submitSetupIssueViaProxy({ action: \"attachment-confirm\", reportRef: reportRef, receipt: receipt, attachmentId: attachmentId });\n      }).then(function (confirmed) {\n        response.attachment = confirmed && confirmed.attachment || null;\n        return response;\n      });\n    });\n  }\n  function submitSetupIssueReport(context, setupStep, description, contact, supportAttachment) {\n    return submitSetupIssueViaProxy({\n      action: \"submit\",\n      clientReference: context.clientReference,\n      setupStep: String(setupStep || \"other\").slice(0, 80),\n      description: String(description || \"\").trim().slice(0, 1500),\n      contact: String(contact || \"\").trim().slice(0, 254),\n      diagnostics: context.technicalContext || {},\n    }).then(function (response) {\n      return uploadSetupSupportAttachment(response, supportAttachment);\n    }).then(function (response) {\n      return response && response.ticket ? response.ticket : null;\n    });\n  }\n  function openSetupIssueModal(source) {\n    var layer = ensureReportModal(),\n      target = qs(\"[data-dsd-report-modal-target]\", layer),\n      form = qs(\"[data-dsd-report-modal-form]\", layer),\n      context = technicalIssueContext(\"\");\n    context.contentType = \"profile_setup\";\n    context.route = String(window.location.pathname || \"/\").slice(0, 160);\n    ((reportModalState = {\n      setupIssue: !0,\n      clientReference:\n        \"setup-\" + Date.now() + \"-\" + Math.random().toString(36).slice(2, 10),\n      technicalContext: context,\n      returnScroll: window.scrollY || window.pageYOffset || 0,\n      returnFocus: source || document.activeElement || null,\n    }),\n      (qs(\"[data-dsd-report-modal-eyebrow]\", layer).textContent = \"Setup support\"),\n      (qs(\"#dsd-report-modal-title\", layer).textContent = \"Report a setup issue\"),\n      (target.innerHTML =\n        \"<strong>Profile setup</strong><span>Tell us where setup stopped. An optional screenshot or short recording stays private to authorized support review.</span>\"),\n      form.reset(),\n      (form.elements.reason.value = \"technical\"),\n      (qs(\"[data-dsd-report-reason-row]\", layer).hidden = !0),\n      (qs(\"[data-dsd-report-setup-step-row]\", layer).hidden = !1),\n      (qs(\"[data-dsd-report-contact-row]\", layer).hidden = !1),\n      (qs(\"[data-dsd-report-attachment-row]\", layer).hidden = !1),\n      (qs(\"[data-dsd-report-details-label]\", layer).textContent = \"What happened?\"),\n      (form.elements.details.placeholder =\n        \"Describe what you selected, what happened, and what you expected\"),\n      (qs(\"[data-dsd-report-modal-status]\", layer).textContent = \"\"),\n      (form.querySelector('button[type=\"submit\"]').disabled = !1),\n      (layer.hidden = !1),\n      layer.setAttribute(\"aria-hidden\", \"false\"),\n      document.documentElement.setAttribute(\"data-dsd-report-modal-open\", \"true\"),\n      scheduleGlobalOverlayStateSync(),\n      window.setTimeout(function () {\n        form.elements.setupStep.focus();\n      }, 0));\n  }\n  function hydrateCommentAuthorProfiles(comments, postId) {\n    var keys = Array.from(\n        new Set(\n          (comments || [])\n            .map(function (comment) {\n              return normalizedProfileKeyValue(\n                comment &&\n                  (comment.authorProfileKey ||\n                    comment.ownerProfileKey ||\n                    comment.profileKey ||\n                    \"\"),\n              );\n            })\n            .filter(Boolean),\n        ),\n      ).slice(0, 25),\n      missing = keys.filter(function (key) {\n        var profile = publicProfileByKey(key);\n        return !profile || publicProfileDedupeScore(profile) < 7;\n      }),\n      requestKey = missing.slice().sort().join(\",\");\n    if (!requestKey || state.commentAuthorProfileHydration[requestKey])\n      return Promise.resolve([]);\n    state.commentAuthorProfileHydration[requestKey] = !0;\n    return waitForSupabaseAdapter(postId || \"comments\", \"discoveryProfileCards\")\n      .then(function (adapter) {\n        return adapter.discoveryProfileCards({\n          limit: missing.length,\n          profileKeys: missing,\n        });\n      })\n      .then(function (profiles) {\n        cacheDiscoveryProfileCardRows(profiles || []);\n        state.postDrawer && state.postDrawer.open && renderPostDrawer();\n        scheduleRenderPosts(\"comment-author-profiles\");\n        return profiles || [];\n      })\n      .catch(function (error) {\n        delete state.commentAuthorProfileHydration[requestKey];\n        claim(\"comment-author-profiles:blocked\", {\n          postId: postId || \"\",\n          profiles: missing.length,\n          error: (error && error.message) || String(error),\n        });\n        return [];\n      });\n  }\n  function hydratePostComments(posts) {\n    if (supabaseCutoverReady()) {\r\n      var wanted = {};\r\n      Object.keys(state.openCommentPostIds || {}).forEach(function (id) {\r\n        id && (wanted[id] = !0);\r\n      });\r\n      (Object.keys(state.commentListeners || {}).forEach(function (id) {\r\n        if (!wanted[id]) {\r\n          var off = state.commentListeners[id];\r\n          try {\r\n            typeof off == \"function\"\r\n              ? off()\r\n              : off && typeof off.stop == \"function\" && off.stop();\r\n          } catch (e) {}\r\n          delete state.commentListeners[id];\r\n        }\r\n      }),\r\n        Object.keys(wanted).forEach(function (id) {\r\n          if (!state.commentListeners[id]) {\r\n            var bootstrapOwner = listen(\r\n              \"posts/\" + id + \"/comments\",\r\n              function (items) {\n                var normalizedComments = (items || []).map(function (item) {\n                    return Object.assign(\n                      {\r\n                        postId: item.postId || id,\r\n                        commentId: item.commentId || item.id,\r\n                      },\r\n                      item,\n                    );\n                  });\n                (setCommentsForPostAliases(id, normalizedComments),\n                  hydrateCommentAuthorProfiles(normalizedComments, id),\n                  hydrateCommentReactionsForPost(id),\n                  state.postDrawer &&\n                    state.postDrawer.open &&\r\n                    state.postDrawer.postId === id &&\r\n                    renderPostDrawer(),\r\n                  scheduleRenderPosts(\"comment-listener\"));\r\n              },\r\n              function (c, f) {\r\n                return !canModerate() && f.where\r\n                  ? f.query(c, f.where(\"status\", \"==\", \"approved\"), f.limit(8))\r\n                  : f.query(c, f.orderBy(\"createdAt\", \"asc\"), f.limit(8));\r\n              },\r\n              {\r\n                realtimeOwned: !0,\r\n                surface: \"active-post-detail-comments\",\r\n              },\r\n            );\r\n            state.commentListeners[id] = {\r\n              reload: function () {\r\n                return bootstrapOwner &&\r\n                  typeof bootstrapOwner.reload == \"function\"\r\n                  ? bootstrapOwner.reload()\r\n                  : Promise.resolve(null);\r\n              },\r\n              stop: function () {\r\n                try {\r\n                  bootstrapOwner && bootstrapOwner();\r\n                } catch (error) {}\r\n                state.listeners = state.listeners.filter(function (fn) {\r\n                  return fn !== bootstrapOwner;\r\n                });\r\n                state.postDetailRealtimePostId === id &&\r\n                  stopPostDetailRealtimeOwner(\"comment-detail-close\");\r\n              },\r\n            };\r\n            (startPostDetailRealtimeOwner(id, bootstrapOwner),\r\n              hydrateViewerReactionForPost(id),\r\n              loadPostCommentsOnce(id));\r\n          }\r\n        }),\r\n        (state.feedDiagnostics.commentListeners = Object.keys(\r\n          state.commentListeners || {},\r\n        ).length));\r\n    }\r\n  }\r\n  function loadPostCommentsOnce(postId) {\r\n    var id = String(postId || \"\").trim();\r\n    supabaseCutoverReady() ||\r\n      claim(\"comment-getDocs:firebase-social-fallback-disabled\", {\r\n        postId: id,\r\n        canonical: \"supabase-comments-only\",\r\n      });\r\n  }\r\n  function normalizeThreadProxyMessage(item, conversationId) {\r\n    var media = normalizeMessageMedia(item);\r\n    return Object.assign({}, item, {\r\n      conversationId: conversationId,\r\n      canonicalConversationId: conversationId,\r\n      supabaseConversationId:\r\n        (item &&\r\n          (item.supabaseConversationId ||\r\n            item.supabase_conversation_id ||\r\n            item.conversation_id)) ||\r\n        \"\",\r\n      messageId:\r\n        (item &&\r\n          (item.messageId ||\r\n            item.legacyMessageId ||\r\n            item.legacy_message_id ||\r\n            item.id)) ||\r\n        clean(\"message-\" + Date.now(), \"message\"),\r\n      media: media,\r\n      attachments: media,\r\n    });\r\n  }\r\n  function threadMessageSort(a, b) {\n    var timeDelta = stableMessageMillis(a) - stableMessageMillis(b);\r\n    if (timeDelta) return timeDelta;\r\n    return String(a && (a.supabaseMessageId || a.id) || \"\").localeCompare(\r\n      String(b && (b.supabaseMessageId || b.id) || \"\"),\r\n    );\n  }\n  function messageIdentityValues(message) {\n    return [\n      message && message.messageId,\n      message && message.id,\n      message && message.legacyMessageId,\n      message && message.legacy_message_id,\n      message && message.supabaseMessageId,\n      message && message.supabase_message_id,\n    ]\n      .map(function (value) {\n        return String(value || \"\").trim();\n      })\n      .filter(Boolean);\n  }\n  function pendingMessageWriteClaims(conversationId, incoming) {\n    var cid = String(conversationId || \"\").trim(),\n      incomingIds = {};\n    (incoming || []).forEach(function (message) {\n      messageIdentityValues(message).forEach(function (id) {\n        incomingIds[id] = !0;\n      });\n    });\n    return Object.keys(state.premiumMessageWriteClaims || {})\n      .map(function (claimId) {\n        var claim = state.premiumMessageWriteClaims[claimId],\n          claimIds = messageIdentityValues(claim),\n          acknowledged = claimIds.some(function (id) {\n            return incomingIds[id];\n          }),\n          createdAt = valueMillis(\n            claim &&\n              (claim.createdAt ||\n                claim.created_at ||\n                claim.updatedAt ||\n                claim.updated_at),\n          ),\n          stale = createdAt && Date.now() - createdAt > 5 * 60 * 1e3;\n        if (acknowledged || stale) {\n          delete state.premiumMessageWriteClaims[claimId];\n          return null;\n        }\n        return claim && String(claim.conversationId || \"\") === cid\n          ? claim\n          : null;\n      })\n      .filter(Boolean);\n  }\n  function mergeConversationThreadPage(conversationId, messages, mode) {\n    var incoming = (messages || [])\n        .filter(messageDisplayable)\n        .map(function (item) {\n          return normalizeThreadProxyMessage(item, conversationId);\n        }),\n      existing = state.messagesByConversation[conversationId] || [],\n      pendingClaims = pendingMessageWriteClaims(conversationId, incoming),\n      next =\n        mode === \"bootstrap\"\n          ? incoming.concat(pendingClaims)\n          : existing.concat(incoming, pendingClaims);\n    state.messagesByConversation[conversationId] =\n      dedupeConversationMessages(next).sort(threadMessageSort);\n    return state.messagesByConversation[conversationId];\r\n  }\r\n  function stopMessageThreadOwner(conversationId, reason) {\n    var cid = String(conversationId || \"\").trim(),\r\n      owner = cid && state.messageListeners[cid];\r\n    if (!owner) return;\r\n    try {\r\n      typeof owner.stop == \"function\" && owner.stop(reason || \"thread-close\");\r\n    } catch (error) {}\r\n    delete state.messageListeners[cid];\n  }\n  function broadcastMessageChangeToParticipants(conversationId, messageId, operation) {\n    var cid = String(conversationId || \"\").trim(),\n      mid = String(messageId || \"\").trim(),\n      controller = cid && state.messageListeners[cid],\n      realtime = controller && controller.realtime;\n    if (!mid || !realtime || typeof realtime.send != \"function\") return !1;\n    return realtime.send(\"message_change\", {\n      messageId: mid,\n      operation: String(operation || \"updated\").slice(0, 40),\n    });\n  }\n  function hydrateConversationMessages(conversationId, options) {\n    var cid = String(conversationId || \"\").trim();\r\n    options = options || {};\r\n    if (!cid || !supabaseCutoverReady()) return null;\r\n    var existing = state.messageListeners[cid];\r\n    if (existing) {\r\n      if (options.older === !0 && typeof existing.loadOlder == \"function\")\r\n        return existing.loadOlder();\r\n      if (options.reconcile === !0 && typeof existing.reconcile == \"function\")\r\n        return existing.reconcile(\"explicit\");\r\n      return existing;\r\n    }\r\n    var adapter = supabaseAdapter(),\r\n      controller = {\r\n        owner: \"MessagesRouteConversationRealtime\",\r\n        source: \"supabase-private-broadcast-plus-keyset-rest\",\r\n        conversationId: cid,\r\n        canonicalConversationId: \"\",\r\n        nextCursor: null,\r\n        deltaCursor: \"\",\r\n        hasMore: !1,\r\n        inFlight: null,\r\n        stopped: !1,\n        realtime: null,\n        realtimeCanonicalId: \"\",\n        realtimeStatus: \"waiting-bootstrap\",\n        disconnectedAt: 0,\r\n        bootstrapReads: 0,\r\n        deltaReads: 0,\r\n        affectedReads: 0,\r\n        load: null,\r\n        loadOlder: null,\r\n        reconcile: null,\r\n        stop: null,\r\n      };\r\n    function applyThreadResult(result, mode) {\r\n      if (controller.stopped || state.messageListeners[cid] !== controller)\r\n        return [];\r\n      var rows = mergeConversationThreadPage(\r\n        cid,\r\n        (result && result.messages) || [],\r\n        mode,\r\n      );\r\n      result &&\r\n        result.conversation &&\r\n        (state.conversations = mergeByKey(\r\n          state.conversations,\r\n          [result.conversation],\r\n          [\"conversationId\", \"id\"],\r\n        ));\r\n      controller.canonicalConversationId =\n        (result &&\n          (result.supabaseConversationId ||\n            result.supabase_conversation_id)) ||\n        controller.canonicalConversationId;\n      ensureRealtimeOwner();\n      if (mode === \"bootstrap\" || mode === \"older\") {\r\n        controller.nextCursor = result && result.nextCursor;\r\n        controller.hasMore =\r\n          result && result.hasMore !== void 0\r\n            ? result.hasMore === !0\r\n            : controller.hasMore;\r\n      }\r\n      controller.deltaCursor =\r\n        (result && result.deltaCursor) || controller.deltaCursor;\r\n      var session = messageThreadSession(cid, !0);\r\n      session &&\r\n        ((session.initialLoadComplete = !0),\r\n        (session.canonicalInitialLoadComplete = !0),\r\n        (session.initialMessagesRendered = !0),\r\n        (session.messageCount = rows.length),\r\n        (session.hasMore = controller.hasMore),\r\n        (session.nextCursor = controller.nextCursor),\r\n        (session.realtimeStatus = controller.realtimeStatus));\r\n      renderMessages();\r\n      return rows;\r\n    }\r\n    function requestThread(mode, extra) {\n      if (controller.stopped) return Promise.resolve([]);\r\n      if (controller.inFlight) return controller.inFlight;\r\n      var payload = Object.assign(\r\n        {\r\n          conversationId: cid,\r\n          mode: mode,\r\n          limit: mode === \"affected\" ? 1 : 50,\r\n        },\r\n        customer() || {},\r\n        extra || {},\r\n      );\r\n      mode === \"bootstrap\"\r\n        ? (controller.bootstrapReads += 1)\r\n        : mode === \"delta\"\r\n          ? (controller.deltaReads += 1)\r\n          : mode === \"affected\"\r\n            ? (controller.affectedReads += 1)\r\n            : null;\r\n      var moreDelta = !1;\r\n      controller.inFlight = readMessageThreadViaProxy(payload)\r\n        .then(function (result) {\r\n          moreDelta = mode === \"delta\" && result && result.hasMore === !0;\r\n          return applyThreadResult(\r\n            result,\r\n            mode === \"affected\" || mode === \"delta\" ? \"delta\" : mode,\r\n          );\r\n        })\r\n        .catch(function (error) {\r\n          var session = messageThreadSession(cid, !0);\r\n          session &&\r\n            ((session.initialLoadComplete = !0),\r\n            (session.canonicalInitialLoadComplete = !0),\r\n            (session.initialMessagesRendered = !0),\r\n            (session.loadError =\r\n              (error && error.message) || String(error)));\r\n          claim(\"message-thread:bounded-read-failed\", {\r\n            conversationId: cid,\r\n            mode: mode,\r\n            error: (error && error.message) || String(error),\r\n            permanentPollingFallback: !1,\r\n          });\r\n          renderMessages();\r\n          return [];\r\n        })\r\n        .finally(function () {\r\n          controller.inFlight = null;\r\n          moreDelta &&\r\n            !controller.stopped &&\r\n            window.setTimeout(function () {\r\n              controller.reconcile(\"delta-page\");\r\n            }, 0);\r\n        });\r\n      return controller.inFlight;\n    }\n    function ensureRealtimeOwner() {\n      var realtimeConversationId = String(\n        controller.canonicalConversationId || (uuidLike(cid) ? cid : \"\"),\n      ).trim();\n      if (\n        controller.stopped ||\n        !realtimeConversationId ||\n        !adapter ||\n        typeof adapter.openPrivateRealtimeChannel != \"function\"\n      )\n        return;\n      if (\n        controller.realtime &&\n        controller.realtimeCanonicalId === realtimeConversationId\n      )\n        return;\n      controller.realtime && controller.realtime.stop();\n      controller.realtimeCanonicalId = realtimeConversationId;\n      controller.realtimeStatus = \"connecting\";\n      controller.realtime = adapter.openPrivateRealtimeChannel({\n        purpose: \"message-thread\",\n        key: realtimeConversationId,\n        topic: \"conversation:\" + realtimeConversationId,\n        event: \"message_change\",\n        onEvent: function (event) {\n          if (controller.stopped) return;\n          var messageId =\n            event &&\n            (event.messageId ||\n              event.message_id ||\n              event.id ||\n              event.record_id);\n          messageId\n            ? requestThread(\"affected\", {\n                messageId: messageId,\n                operation: (event && event.operation) || \"\",\n              })\n            : controller.reconcile(\"broadcast-without-message-id\");\n        },\n        onStatus: function (status, detail) {\n          if (controller.stopped) return;\n          controller.realtimeStatus = status;\n          var session = messageThreadSession(cid, !0);\n          session && (session.realtimeStatus = status);\n          if (status === \"disconnected\") {\n            controller.disconnectedAt = Date.now();\n            claim(\"message-thread:realtime-degraded\", {\n              conversationId: cid,\n              canonicalConversationId: realtimeConversationId,\n              permanentPollingFallback: !1,\n              reason: (detail && detail.reason) || \"disconnected\",\n            });\n          } else if (status === \"subscribed\" && controller.disconnectedAt) {\n            controller.disconnectedAt = 0;\n            controller.reconcile(\"reconnected\");\n          } else if (status === \"error\") {\n            claim(\"message-thread:realtime-error\", {\n              conversationId: cid,\n              canonicalConversationId: realtimeConversationId,\n              permanentPollingFallback: !1,\n              reason: (detail && detail.reason) || \"channel-error\",\n            });\n          }\n        },\n      });\n    }\n    controller.load = function () {\r\n      return requestThread(\"bootstrap\");\r\n    };\r\n    controller.loadOlder = function () {\r\n      if (!controller.hasMore || !controller.nextCursor)\r\n        return Promise.resolve([]);\r\n      return requestThread(\"older\", { cursor: controller.nextCursor });\r\n    };\r\n    controller.reconcile = function (reason) {\r\n      if (!controller.deltaCursor) return controller.load();\r\n      return requestThread(\"delta\", {\r\n        cursor: controller.deltaCursor,\r\n        recoveryReason: reason || \"reconnect\",\r\n      });\r\n    };\r\n    controller.stop = function (reason) {\r\n      if (controller.stopped) return;\r\n      controller.stopped = !0;\r\n      controller.realtime && controller.realtime.stop();\n      controller.realtime = null;\n      controller.realtimeCanonicalId = \"\";\n      controller.inFlight = null;\r\n      claim(\"message-thread:owner-stopped\", {\r\n        conversationId: cid,\r\n        reason: reason || \"thread-close\",\r\n        activeRealtimeChannels:\r\n          adapter && typeof adapter.realtimeSnapshot == \"function\"\r\n            ? adapter.realtimeSnapshot().activeChannels\r\n            : null,\r\n      });\r\n    };\n    state.messageListeners[cid] = controller;\n    controller.load();\n    if (\n      !adapter ||\n      typeof adapter.openPrivateRealtimeChannel != \"function\"\n    ) {\n      controller.realtimeStatus = \"unsupported\";\n      claim(\"message-thread:realtime-unavailable\", {\n        conversationId: cid,\n        permanentPollingFallback: !1,\n      });\n    }\r\n    return controller;\r\n  }\r\n  function applyInboxCounts(counts, reason) {\n    counts = counts || {};\n    if (Array.isArray(counts.threads)) {\n      state.inboxUnreadByConversation = {};\n      counts.threads.forEach(function (thread) {\n        var count = Math.max(\n            0,\n            Number(thread.unreadCount || thread.unread_count || 0) || 0,\n          ),\n          ids = [\n            thread.conversationId,\n            thread.id,\n            thread.legacyConversationId,\n            thread.legacy_conversation_id,\n          ];\n        ids.forEach(function (id) {\n          id = String(id || \"\").trim();\n          id && (state.inboxUnreadByConversation[id] = count);\n        });\n      });\n      state.conversations = (state.conversations || []).map(function (thread) {\n        return Object.assign({}, thread, {\n          unreadCount: 0,\n          unread: 0,\n          unread_count: 0,\n        });\n      });\n      state.conversations = mergeByKey(\n        state.conversations || [],\n        counts.threads.map(normalizeInboxConversation),\n        [\"conversationId\", \"id\"],\n      );\n    }\n    if (Array.isArray(counts.mapThreads))\n      state.conversations = mergeByKey(\n        state.conversations || [],\n        counts.mapThreads.map(normalizeInboxConversation),\n        [\"conversationId\", \"id\"],\n      );\n    state.inboxCounts = {\r\n      ready: !0,\r\n      notificationUnread: Math.max(\r\n        0,\r\n        Number(counts.notificationUnread || 0) || 0,\r\n      ),\r\n      messageUnread: Math.max(0, Number(counts.messageUnread || 0) || 0),\r\n      founderUnread: Math.max(0, Number(counts.founderUnread || 0) || 0),\r\n      cursor: String(counts.cursor || state.inboxCounts.cursor || \"\"),\r\n    };\r\n    state.notificationCounts = Object.assign({}, state.notificationCounts, {\r\n      unread: state.inboxCounts.notificationUnread,\r\n      founder: state.inboxCounts.founderUnread,\r\n    });\r\n    (setDockBadge(\r\n      \"[data-dsd-notification-unread-count]\",\r\n      state.inboxCounts.notificationUnread,\r\n    ),\r\n      setDockBadge(\r\n        \"[data-dsd-message-unread-count]\",\r\n        state.inboxCounts.messageUnread,\r\n      ),\r\n      claim(\"inbox-counts:applied\", {\n        reason: reason || \"bootstrap\",\n        notificationUnread: state.inboxCounts.notificationUnread,\n        messageUnread: state.inboxCounts.messageUnread,\n        source: \"recipient-scoped-app-proxy\",\n      }),\n      updateInboxPageUnreadIndicators(),\n      activeRouteSurface() === \"notifications\" &&\n        hydrateNotificationInbox(reason || \"inbox-counts\"),\n      activeRouteSurface() === \"messages\" && Array.isArray(counts.threads) &&\n        renderMessages(),\n      activeRouteSurface() === \"messages\" && !Array.isArray(counts.threads) &&\n        hydrateUnreadConversationSummaries(reason || \"inbox-counts\"),\n      window.dispatchEvent(\n        new CustomEvent(\"dsd:launch-social:map-conversations-updated\"),\n      ));\n  }\n  function refreshInboxCounts(reason) {\n    if (!hasCustomer()) return Promise.resolve(null);\n    return premiumMessageActionViaProxy({ action: \"inbox_counts\" })\n      .then(function (counts) {\n        (applyInboxCounts(counts, reason), renderNotifications());\n        return counts;\n      })\n      .catch(function (error) {\n        (claim(\"inbox-counts:blocked\", {\n          reason: reason || \"bootstrap\",\n          error: (error && error.message) || String(error),\n          fallback: \"zero-fail-closed\",\n        }),\n          applyInboxCounts(\n            {\n              notificationUnread: 0,\n              messageUnread: 0,\n              founderUnread: 0,\n              threads: [],\n            },\n            (reason || \"bootstrap\") + \"-fail-closed\",\n          ));\n        return null;\n      });\n  }\n  function normalizeInboxConversation(row) {\r\n    row = row || {};\r\n    return Object.assign({}, row, {\r\n      conversationId:\r\n        row.conversationId || row.legacy_conversation_id || row.id || \"\",\r\n      participantIds: row.participantIds || row.participant_ids || [],\r\n      participantProfileKeys:\r\n        row.participantProfileKeys || row.participant_profile_keys || [],\r\n      lastMessagePreview:\r\n        row.lastMessagePreview || row.last_message_preview || \"\",\r\n      conversationType:\r\n        row.conversationType || row.conversation_type || \"direct\",\r\n      displayName: row.displayName || row.display_name || \"\",\r\n      premiumState: row.premiumState || row.premium_state || {},\r\n      createdAt: row.createdAt || row.created_at || \"\",\r\n      updatedAt: row.updatedAt || row.updated_at || \"\",\r\n      archivedAt: row.archivedAt || row.archived_at || null,\r\n    });\r\n  }\r\n  function normalizeInboxNotification(row) {\n    row = row || {};\r\n    return Object.assign({}, row, {\r\n      notificationId: row.notificationId || row.id || \"\",\r\n      recipientUid: row.recipientUid || row.recipient_user_id || \"\",\r\n      actorUid: row.actorUid || row.actor_user_id || \"\",\r\n      sourceId: row.sourceId || row.source_id || \"\",\r\n      sourceType: row.sourceType || row.source_type || \"\",\r\n      createdAt: row.createdAt || row.created_at || \"\",\r\n      expiresAt: row.expiresAt || row.expires_at || null,\n    });\n  }\n  var conversationPreferenceRequest = null,\n    conversationPreferenceHydratedAt = 0;\n  function hydrateConversationPreferences(reason, force) {\n    if (!hasCustomer()) return Promise.resolve([]);\n    var currentTime = Date.now();\n    if (conversationPreferenceRequest) return conversationPreferenceRequest;\n    if (!force && currentTime - conversationPreferenceHydratedAt < 2500)\n      return Promise.resolve([]);\n    conversationPreferenceHydratedAt = currentTime;\n    conversationPreferenceRequest = premiumMessageActionViaProxy({\n      action: \"inbox_conversation_preferences\",\n      limit: 50,\n    })\n      .then(function (result) {\n        var byConversation = {};\n        ((result && result.preferences) || []).forEach(function (preference) {\n          var id = String(preference.conversationId || \"\").trim();\n          id && (byConversation[id] = preference);\n        });\n        state.conversations = (state.conversations || []).map(function (item) {\n          var id = String(item.conversationId || item.id || \"\").trim(),\n            preference = byConversation[id];\n          return preference\n            ? Object.assign({}, item, {\n                pinned: preference.pinned === !0,\n                pinnedAt: preference.pinnedAt || \"\",\n              })\n            : item;\n        });\n        activeRouteSurface() === \"messages\" && renderMessages();\n        claim(\"conversation-preferences:hydrated\", {\n          reason: reason || \"conversation-page\",\n          count: Object.keys(byConversation).length,\n        });\n        return result.preferences || [];\n      })\n      .catch(function (error) {\n        claim(\"conversation-preferences:failed\", {\n          error: (error && error.message) || String(error),\n        });\n        return [];\n      })\n      .then(function (rows) {\n        conversationPreferenceRequest = null;\n        return rows;\n      });\n    return conversationPreferenceRequest;\n  }\n  function normalizeInboxDeltaEnvelope(event) {\r\n    event = (event && event.payload) || event || {};\r\n    if (event.notification) {\r\n      return {\r\n        scope: \"notification\",\r\n        operation: event.operation || \"INSERT\",\r\n        id: event.id || event.notification.id || \"\",\r\n        record: event.notification,\r\n        visible: event.visible,\r\n      };\r\n    }\r\n    if (\r\n      event.source_type ||\r\n      event.sourceType ||\r\n      event.notificationId ||\r\n      (event.recipient_user_id && event.href)\r\n    ) {\r\n      return {\r\n        scope: \"notification\",\r\n        operation: event.operation || \"INSERT\",\r\n        id: event.id || event.notificationId || \"\",\r\n        record: event,\r\n        visible: event.visible,\r\n      };\r\n    }\r\n    if (event.conversation) {\r\n      return {\r\n        scope: \"conversation\",\r\n        operation: event.operation || \"UPDATE\",\r\n        id: event.id || event.conversation.id || \"\",\r\n        record: event.conversation,\r\n        visible: event.visible,\r\n      };\r\n    }\r\n    return event;\r\n  }\r\n  function applyInboxDelta(event) {\r\n    event = normalizeInboxDeltaEnvelope(event);\r\n    var scope = String(event.scope || event.kind || \"\").toLowerCase(),\r\n      operation = String(event.operation || \"UPDATE\").toUpperCase(),\r\n      record = event.record || {},\r\n      id = String(event.id || record.id || \"\").trim();\r\n    if (!id || (scope !== \"conversation\" && scope !== \"notification\")) return;\r\n    if (scope === \"conversation\") {\r\n      state.conversations =\r\n        operation === \"DELETE\" || event.visible === !1\r\n          ? (state.conversations || []).filter(function (item) {\r\n              return String(item.id || item.conversationId || \"\") !== id;\r\n            })\r\n          : mergeByKey(\r\n              state.conversations || [],\r\n              [normalizeInboxConversation(record)],\r\n              [\"conversationId\", \"id\"],\r\n            );\r\n      (updateMessageDockBadge(state.conversations),\r\n        activeRouteSurface() === \"messages\" && renderMessages());\r\n    } else {\n      if (\r\n        operation !== \"DELETE\" &&\r\n        event.visible !== !1 &&\r\n        record.read !== !0 &&\r\n        typeof window.CustomEvent == \"function\"\r\n      )\r\n        window.dispatchEvent(\r\n          new CustomEvent(\"dsd:inbox:notification\", {\r\n            detail: normalizeInboxNotification(record),\r\n          }),\r\n        );\r\n      if (state.notificationProxyCanonical) {\n        hydrateNotificationInbox(\"recipient-delta\", !0);\n        refreshInboxCounts(\"recipient-delta\");\n        return;\n      }\n      state.notifications =\n        operation === \"DELETE\" || event.visible === !1\r\n          ? (state.notifications || []).filter(function (item) {\r\n              return String(item.id || item.notificationId || \"\") !== id;\r\n            })\r\n          : mergeByKey(\r\n              state.notifications || [],\r\n              [normalizeInboxNotification(record)],\r\n              [\"notificationId\", \"id\"],\r\n            );\r\n      (updateNotificationDockBadge(state.notifications),\r\n        (activeRouteSurface() === \"notifications\" ||\r\n          activeRouteSurface() === \"messages\") &&\r\n          renderNotifications());\r\n    }\r\n    refreshInboxCounts(\"recipient-delta\");\r\n  }\r\n  function reloadInboxLists(reason) {\r\n    var owners = state.inboxListOwners || {};\r\n    [owners.conversations, owners.notifications].forEach(function (owner) {\r\n      owner && typeof owner.reload == \"function\" && owner.reload();\r\n    });\r\n    refreshInboxCounts(reason || \"reconnect\");\r\n  }\r\n  function updateInboxPageCursor(kind, items) {\r\n    var rows = items || [],\r\n      last = rows[rows.length - 1],\r\n      cursor =\r\n        (last &&\r\n          (kind === \"conversations\"\r\n            ? last.updatedAt || last.updated_at\r\n            : last.createdAt || last.created_at)) ||\r\n        \"\";\r\n    state.inboxPageState[kind] = {\r\n      nextCursor: cursor,\r\n      hasMore: rows.length === 50,\r\n    };\r\n  }\r\n  var notificationOlderPageRequest = null,\n    notificationOlderPageObserver = null;\n  function observeNotificationOlderPageSentinel() {\n    var buttons = qsa(\"[data-dsd-load-older-notifications]\");\n    if (!(\"IntersectionObserver\" in window)) return;\n    if (!notificationOlderPageObserver)\n      notificationOlderPageObserver = new IntersectionObserver(\n        function (entries) {\n          entries.some(function (entry) {\n            return entry.isIntersecting && !entry.target.hidden;\n          }) && loadOlderInboxPage(\"notifications\");\n        },\n        { root: null, rootMargin: \"240px 0px\", threshold: 0.01 },\n      );\n    buttons.forEach(function (button) {\n      notificationOlderPageObserver.unobserve(button);\n      !button.hidden && notificationOlderPageObserver.observe(button);\n    });\n  }\n  function loadOlderInboxPage(kind) {\n    kind = String(kind || \"\").toLowerCase();\n    var adapter = supabaseAdapter(),\n      page = state.inboxPageState[kind];\n    if (\n      kind === \"notifications\" &&\n      page &&\n      page.hasMore &&\n      page.nextCursor &&\n      hasCustomer()\n    ) {\n      if (notificationOlderPageRequest) return notificationOlderPageRequest;\n      page.loading = !0;\n      page.error = \"\";\n      updateInboxPageUnreadIndicators();\n      notificationOlderPageRequest = premiumMessageActionViaProxy({\n        action: \"inbox_notifications\",\n        cursor: page.nextCursor,\n        limit: 50,\n      }).then(function (result) {\n        var rows = ((result && result.notifications) || []).map(\n          normalizeInboxNotification,\n        );\n        state.notifications = mergeByKey(\n          state.notifications || [],\n          rows,\n          [\"notificationId\", \"id\"],\n        );\n        state.inboxPageState.notifications = {\n          nextCursor: (result && result.nextCursor) || \"\",\n          hasMore: !!(result && result.hasMore),\n          loading: !1,\n          error: \"\",\n        };\n        (renderNotifications(), updateInboxPageUnreadIndicators());\n        return rows;\n      }).catch(function (error) {\n        page.loading = !1;\n        page.error = (error && error.message) || \"Unable to load older notifications.\";\n        updateInboxPageUnreadIndicators();\n        return [];\n      }).then(function (rows) {\n        notificationOlderPageRequest = null;\n        updateInboxPageUnreadIndicators();\n        return rows;\n      });\n      return notificationOlderPageRequest;\n    }\n    if (\n      !adapter ||\n      typeof adapter.readInboxPage != \"function\" ||\r\n      !page ||\r\n      !page.hasMore ||\r\n      !page.nextCursor\r\n    )\r\n      return Promise.resolve([]);\r\n    return adapter\r\n      .readInboxPage(kind, page.nextCursor, 50, { publicRead: !1 })\n      .then(function (result) {\n        var rows = (result && result.items) || [];\n        state.inboxPageState[kind] = {\n          nextCursor: (result && result.nextCursor) || \"\",\n          hasMore: !!(result && result.hasMore),\n        };\n        if (kind === \"conversations\") {\n          state.conversations = mergeByKey(\n            state.conversations || [],\n            rows,\r\n            [\"conversationId\", \"id\"],\r\n          );\r\n          renderMessages();\r\n        } else {\r\n          state.notifications = mergeByKey(\r\n            state.notifications || [],\r\n            rows,\r\n            [\"notificationId\", \"id\"],\r\n          );\n          renderNotifications();\n        }\n        return rows;\n      });\n  }\n  var unreadThreadSummaryRequest = null,\n    unreadThreadSummaryAt = 0;\n  var notificationInboxRequest = null,\n    notificationInboxAt = 0;\n  function hydrateNotificationInbox(reason, force) {\n    if (!hasCustomer()) return Promise.resolve([]);\n    var currentTime = Date.now();\n    if (notificationInboxRequest) return notificationInboxRequest;\n    if (!force && currentTime - notificationInboxAt < 2500)\n      return Promise.resolve([]);\n    notificationInboxAt = currentTime;\n    state.notificationProxyCanonical = !0;\n    state.notificationInboxLoading = !0;\n    state.notificationInboxError = \"\";\n    activeRouteSurface() === \"notifications\" && renderNotifications();\n    notificationInboxRequest = premiumMessageActionViaProxy({\n      action: \"inbox_notifications\",\n      limit: 50,\n    })\n      .then(function (result) {\n        var rows = ((result && result.notifications) || []).map(\n          normalizeInboxNotification,\n        );\n        state.notificationInboxReady = !0;\n        state.notificationInboxLoading = !1;\n        state.notificationInboxError = \"\";\n        state.notifications = rows;\n        state.inboxPageState.notifications = {\n          nextCursor: (result && result.nextCursor) || \"\",\n          hasMore: !!(result && result.hasMore),\n          loading: !1,\n          error: \"\",\n        };\n        (claim(\"notification-inbox:hydrated\", {\n          reason: reason || \"notifications-route\",\n          rows: rows.length,\n          source: \"recipient-scoped-app-proxy\",\n        }),\n          renderNotifications(),\n          updateInboxPageUnreadIndicators());\n        return rows;\n      })\n      .catch(function (error) {\n        state.notificationInboxLoading = !1;\n        state.notificationInboxError =\n          (error && error.message) || \"Unable to load notifications.\";\n        claim(\"notification-inbox:blocked\", {\n          reason: reason || \"notifications-route\",\n          error: (error && error.message) || String(error),\n          fallback: \"recipient-scoped-error-state\",\n        });\n        activeRouteSurface() === \"notifications\" && renderNotifications();\n        return [];\n      })\n      .then(function (rows) {\n        notificationInboxRequest = null;\n        return rows;\n      });\n    return notificationInboxRequest;\n  }\n  function updateInboxPageUnreadIndicators() {\n    var notificationUnread =\n        state.inboxCounts && state.inboxCounts.ready\n          ? Math.max(0, Number(state.inboxCounts.notificationUnread || 0) || 0)\n          : Math.max(0, Number(state.notificationCounts.unread || 0) || 0),\n      messageUnread =\n        state.inboxCounts && state.inboxCounts.ready\n          ? Math.max(0, Number(state.inboxCounts.messageUnread || 0) || 0)\n          : 0;\n    (qsa(\"[data-dsd-notification-unread]\").forEach(function (node) {\n      node.textContent = String(notificationUnread);\n    }),\n      qsa(\"[data-dsd-mark-all-notifications-read]\").forEach(function (button) {\n        button.disabled = notificationUnread < 1;\n        button.textContent = notificationUnread\n          ? \"Mark \" + String(notificationUnread) + \" read\"\n          : \"All read\";\n      }),\n      qsa(\"[data-dsd-message-page-unread-count]\").forEach(function (node) {\n        node.hidden = messageUnread < 1;\n        node.textContent = messageUnread\n          ? String(messageUnread) +\n            (messageUnread === 1 ? \" unread message\" : \" unread messages\")\n          : \"\";\n      }),\n      qsa(\"[data-dsd-load-older-notifications]\").forEach(function (button) {\n        var page = state.inboxPageState.notifications || {};\n        button.hidden = !page.hasMore;\n        button.disabled = !page.hasMore || !!page.loading;\n        button.textContent = page.loading\n          ? \"Loading older notifications...\"\n          : page.error\n            ? \"Retry older notifications\"\n            : \"Load older notifications\";\n        page.error\n          ? button.setAttribute(\"data-error\", \"true\")\n          : button.removeAttribute(\"data-error\");\n      }),\n      observeNotificationOlderPageSentinel());\n  }\n  function hydrateUnreadConversationSummaries(reason, force) {\n    if (\n      activeRouteSurface() !== \"messages\" ||\n      !hasCustomer() ||\n      !supabaseCutoverReady()\n    )\n      return Promise.resolve([]);\n    var currentTime = Date.now();\n    if (unreadThreadSummaryRequest) return unreadThreadSummaryRequest;\n    if (!force && currentTime - unreadThreadSummaryAt < 2500)\n      return Promise.resolve([]);\n    unreadThreadSummaryAt = currentTime;\n    unreadThreadSummaryRequest = premiumMessageActionViaProxy({\n      action: \"inbox_unread_threads\",\n    })\n      .then(function (result) {\n        var rows = ((result && result.threads) || []).map(function (row) {\n          return normalizeInboxConversation(row);\n        });\n        state.conversations = mergeByKey(\n          state.conversations || [],\n          rows,\n          [\"conversationId\", \"id\"],\n        );\n        (claim(\"message-unread-threads:hydrated\", {\n          reason: reason || \"messages-route\",\n          threads: rows.length,\n          totalUnread: Number((result && result.totalUnread) || 0),\n          source: \"recipient-scoped-app-proxy\",\n        }),\n          renderMessages(),\n          updateInboxPageUnreadIndicators());\n        return rows;\n      })\n      .catch(function (error) {\n        claim(\"message-unread-threads:blocked\", {\n          reason: reason || \"messages-route\",\n          error: (error && error.message) || String(error),\n          fallback: \"existing-conversation-page\",\n        });\n        return [];\n      })\n      .then(function (rows) {\n        unreadThreadSummaryRequest = null;\n        return rows;\n      });\n    return unreadThreadSummaryRequest;\n  }\n  function installInboxForegroundReconciliation() {\n    if (window.__DSDInboxForegroundReconciliation686) return;\n    var lastReconcileAt = 0;\n    function reconcile(event) {\n      if (document.visibilityState === \"hidden\" || !hasCustomer()) return;\n      var currentTime = Date.now();\n      if (currentTime - lastReconcileAt < 1500) return;\n      lastReconcileAt = currentTime;\n      refreshInboxCounts(\n        \"foreground-\" + String((event && event.type) || \"resume\"),\n      );\n    }\n    window.__DSDInboxForegroundReconciliation686 = {\n      owner: \"LaunchSocialActivation.InboxForegroundReconciliation\",\n      stop: function () {\n        (window.removeEventListener(\"pageshow\", reconcile),\n          window.removeEventListener(\"focus\", reconcile),\n          document.removeEventListener(\"visibilitychange\", reconcile));\n      },\n    };\n    (window.addEventListener(\"pageshow\", reconcile),\n      window.addEventListener(\"focus\", reconcile),\n      document.addEventListener(\"visibilitychange\", reconcile));\n  }\n  function startInboxRealtimeOwner(ownerIdentity) {\n    var adapter = supabaseAdapter(),\r\n      userId = String(ownerIdentity || \"\").trim().toLowerCase();\r\n    if (\r\n      !adapter ||\r\n      typeof adapter.openPrivateUserInboxChannel != \"function\" ||\r\n      !userId\r\n    )\r\n      return;\r\n    if (\r\n      state.inboxRealtimeOwner &&\r\n      state.inboxRealtimeUserId === userId\r\n    )\r\n      return;\r\n    state.inboxRealtimeOwner && state.inboxRealtimeOwner.stop();\r\n    var disconnected = !1;\r\n    state.inboxRealtimeUserId = userId;\r\n    try {\r\n      state.inboxRealtimeOwner = adapter.openPrivateUserInboxChannel({\r\n        userId: userId,\r\n        onEvent: applyInboxDelta,\r\n        onStatus: function (status, detail) {\r\n          if (status === \"disconnected\") disconnected = !0;\r\n          if (status === \"subscribed\" && disconnected) {\r\n            disconnected = !1;\r\n            reloadInboxLists(\"reconnect-reconciliation\");\r\n          }\r\n          if (status === \"error\")\r\n            claim(\"inbox-realtime:error\", {\r\n              reason: (detail && detail.reason) || \"channel-error\",\r\n              permanentPollingFallback: !1,\r\n            });\r\n        },\r\n      });\r\n    } catch (error) {\r\n      state.inboxRealtimeOwner = null;\r\n      state.inboxRealtimeUserId = \"\";\r\n      claim(\"inbox-realtime:blocked\", {\r\n        error: (error && error.message) || String(error),\r\n        permanentPollingFallback: !1,\r\n      });\r\n      return;\n    }\n    installInboxForegroundReconciliation();\n    state.listeners.push(function () {\n      state.inboxRealtimeOwner && state.inboxRealtimeOwner.stop();\r\n      state.inboxRealtimeOwner = null;\n      state.inboxRealtimeUserId = \"\";\n      state.inboxCounts.ready = !1;\n      state.notificationInboxReady = !1;\n      state.notificationInboxLoading = !1;\n      state.notificationInboxError = \"\";\n      state.notifications = [];\n      notificationInboxAt = 0;\n    });\n    refreshInboxCounts(\"session-bootstrap\");\r\n  }\r\n  function trackStoryListOwner(owner) {\r\n    owner && state.storyListOwners.push(owner);\r\n    return owner;\r\n  }\r\n  function stopStorySignalOwner(reason) {\r\n    var owner = state.storySignalOwner;\r\n    state.storySignalOwner = null;\r\n    state.storySignalPending = !1;\r\n    try {\r\n      owner && typeof owner.stop == \"function\" && owner.stop();\r\n    } catch (error) {}\r\n    owner &&\r\n      claim(\"story-signal-realtime:closed\", {\r\n        reason: reason || \"closed\",\r\n        payload: \"invalidation-only\",\r\n      });\r\n  }\r\n  function startStorySignalOwner() {\r\n    if (\r\n      !hasCustomer() ||\r\n      state.storySignalOwner ||\r\n      state.storySignalPending\r\n    )\r\n      return;\r\n    state.storySignalPending = !0;\r\n    waitForSupabaseAdapter(\"stories\", \"openPrivateStorySignalChannel\")\r\n      .then(function (adapter) {\r\n        return adapter.openPrivateStorySignalChannel({\r\n          onEvent: function () {\r\n            (state.storyListOwners || []).forEach(function (owner) {\r\n              owner && typeof owner.reload == \"function\" && owner.reload();\r\n            });\r\n          },\r\n          onStatus: function (status, detail) {\r\n            status === \"error\" &&\r\n              claim(\"story-signal-realtime:error\", {\r\n                reason: (detail && detail.reason) || \"channel-error\",\r\n                pollingFallback: !1,\r\n              });\r\n          },\r\n        });\r\n      })\r\n      .then(function (owner) {\r\n        state.storySignalPending = !1;\r\n        if (!routeNeedsStories(activeRouteSurface())) {\r\n          owner && owner.stop && owner.stop();\r\n          return;\r\n        }\r\n        state.storySignalOwner = owner;\r\n      })\r\n      .catch(function (error) {\r\n        state.storySignalPending = !1;\r\n        claim(\"story-signal-realtime:blocked\", {\r\n          error: (error && error.message) || String(error),\r\n          pollingFallback: !1,\r\n        });\r\n      });\r\n    state.listeners.push(function () {\r\n      stopStorySignalOwner(\"route-lifecycle-stop\");\r\n    });\r\n  }\r\n  function cacheDiscoveryProfileCardRows(items) {\n    (items || []).forEach(function (profile) {\n      var key = normalizedProfileKeyValue(\n        profile.profileKey || profile.profile_key || profile.handle || \"\",\n      );\n      if (!key) return;\n      state.discoveryStatsByKey[key] = {\n        followerCount: Number(profile.followerCount || 0),\n        followingCount: Number(profile.followingCount || 0),\n        postCount: Number(profile.postCount || 0),\n        storyCount: Number(profile.storyCount || 0),\n        mediaCount: Number(profile.mediaCount || 0),\n        fetchedAt: Date.now(),\n        source: \"dsd_discovery_profile_cards\",\n      };\n    });\n    state.publicProfiles = dedupePublicProfiles(\n      (state.publicProfiles || []).concat(items || []),\n    );\n    publishPublicProfiles(state.publicProfiles);\n  }\n  function loadDiscoveryProfileCardsPage(options) {\n    options = options || {};\n    var reset = options.reset === !0,\n      query = String(\n        reset ? options.query || \"\" : state.discoveryProfileQuery || \"\",\n      ).trim(),\n      limit = NEARBY_DISCOVERY_PAGE_LIMIT,\n      generation = reset\n        ? (state.discoveryProfileRequestGeneration += 1)\n        : state.discoveryProfileRequestGeneration,\n      offset = reset ? 0 : Number(state.discoveryProfileOffset || 0);\n    if (state.discoveryProfileLoading && !reset)\n      return state.discoveryProfileRequest || Promise.resolve([]);\n    if (reset) {\n      state.discoveryProfileRows = [];\n      state.discoveryProfileOffset = 0;\n      state.discoveryProfileHasMore = !1;\n      state.discoveryProfileError = \"\";\n      state.discoveryProfileQuery = query;\n    }\n    state.discoveryProfileLoading = !0;\n    renderDiscovery();\n    state.discoveryProfileRequest = waitForSupabaseAdapter(\n      \"publicProfiles\",\n      \"discoveryProfileCards\",\n    )\n      .then(function (adapter) {\n        return adapter.discoveryProfileCards(\n          { limit: limit, offset: offset, search: query },\n          {\n            publicRead: !hasCustomer(),\n            viewerAuthenticated: hasCustomer(),\n            surface: query\n              ? \"discovery-profile-search\"\n              : \"discovery-profile-cards\",\n          },\n        );\n      })\n      .then(function (items) {\n        if (\n          !state.discoveryProfileOwnerActive ||\n          generation !== state.discoveryProfileRequestGeneration\n        )\n          return [];\n        var visibleItems = (items || []).filter(publicProfileVisible);\n        state.publicProfilesLoaded = !0;\n        cacheDiscoveryProfileCardRows(visibleItems);\n        visibleItems = visibleItems.map(function (profile) {\n          var canonical =\n            publicProfileByUid(\n              profile && (profile.uid || profile.userId || profile.user_id || \"\"),\n            ) ||\n            publicProfileByKey(\n              profile && (profile.profileKey || profile.profile_key || profile.handle || \"\"),\n            );\n          return canonical || profile;\n        });\n        state.discoveryProfileRows = reset\n          ? dedupePublicProfiles(visibleItems)\n          : dedupePublicProfiles(\n              (state.discoveryProfileRows || []).concat(visibleItems),\n            );\n        state.discoveryProfileOffset = offset + (items || []).length;\n        state.discoveryProfileHasMore = (items || []).length === limit;\n        state.discoveryProfileLoading = !1;\n        state.discoveryProfileRequest = null;\n        hasCustomer() &&\n          visibleItems.length &&\n          fetchTargetDistanceRows(\n            visibleItems,\n            \"discovery-page-\" + String(offset),\n            !1,\n          );\n        renderDiscovery();\n        renderProfileIdentity();\n        renderRelationships();\n        renderSearchIndex();\n        claim(\"discovery-profile-cards:loaded\", {\n          pageRows: visibleItems.length,\n          loadedRows: state.discoveryProfileRows.length,\n          pageOffset: offset,\n          pageLimit: limit,\n          query: query,\n          hasMore: state.discoveryProfileHasMore,\n          listScans: 0,\n          timerRefetch: !1,\n        });\n        return visibleItems;\n      })\n      .catch(function (error) {\n        if (generation !== state.discoveryProfileRequestGeneration) return [];\n        state.publicProfilesLoaded = !0;\n        state.discoveryProfileLoading = !1;\n        state.discoveryProfileRequest = null;\n        state.discoveryProfileError =\n          (error && error.message) || String(error);\n        renderDiscovery();\n        claim(\"discovery-profile-cards:blocked\", {\n          error: state.discoveryProfileError,\n          failClosed: !0,\n        });\n        return [];\n      });\n    return state.discoveryProfileRequest;\n  }\n  function scheduleDiscoveryProfileSearch(root) {\n    var search = qs(\"[data-dsd-users311-search]\", root || document),\n      query = String((search && search.value) || \"\").trim();\n    state.discoverySearchTimer && window.clearTimeout(state.discoverySearchTimer);\n    state.discoverySearchTimer = window.setTimeout(function () {\n      state.discoverySearchTimer = null;\n      loadDiscoveryProfileCardsPage({ reset: !0, query: query });\n    }, 250);\n  }\n  function stopDiscoveryInfiniteScroll() {\n    state.discoveryScrollObserver && state.discoveryScrollObserver.disconnect();\n    state.discoveryScrollObserver = null;\n    state.discoveryScrollSentinel = null;\n  }\n  function syncDiscoveryInfiniteScroll(root, enabled) {\n    var sentinel = qs(\"[data-dsd-discovery-scroll-sentinel]\", root || document);\n    if (!enabled || !sentinel || !(\"IntersectionObserver\" in window)) {\n      stopDiscoveryInfiniteScroll();\n      return;\n    }\n    if (\n      state.discoveryScrollObserver &&\n      state.discoveryScrollSentinel === sentinel\n    )\n      return;\n    stopDiscoveryInfiniteScroll();\n    state.discoveryScrollSentinel = sentinel;\n    state.discoveryScrollObserver = new IntersectionObserver(\n      function (entries) {\n        if (\n          !state.discoveryProfileOwnerActive ||\n          state.discoveryProfileLoading ||\n          !state.discoveryProfileHasMore ||\n          !entries.some(function (entry) {\n            return entry.isIntersecting;\n          })\n        )\n          return;\n        claim(\"discovery-infinite-scroll:requested\", {\n          offset: state.discoveryProfileOffset,\n          pageLimit: NEARBY_DISCOVERY_PAGE_LIMIT,\n          query: state.discoveryProfileQuery || \"\",\n        });\n        loadDiscoveryProfileCardsPage({ reset: !1 });\n      },\n      { root: null, rootMargin: \"480px 0px\", threshold: 0 },\n    );\n    state.discoveryScrollObserver.observe(sentinel);\n  }\n  function startDiscoveryProfileCardsOwner() {\n    state.discoveryProfileOwnerActive = !0;\n    state.discoveryProfileRequestGeneration += 1;\n    var closed = !1,\n      stop = function () {\n        if (closed) return;\n        closed = !0;\n        state.discoveryProfileOwnerActive = !1;\n        state.discoveryProfileRequestGeneration += 1;\n        state.discoverySearchTimer &&\n          window.clearTimeout(state.discoverySearchTimer);\n        state.discoverySearchTimer = null;\n        stopDiscoveryInfiniteScroll();\n      };\n    state.listeners.push(stop);\n    loadDiscoveryProfileCardsPage({ reset: !0, query: \"\" });\n    return stop;\n  }\n  function loadFeedRecommendationCandidates() {\n    if (\n      state.feedRecommendationProfilesLoaded ||\n      state.feedRecommendationProfilesPending\n    )\n      return Promise.resolve(state.feedRecommendationProfiles || []);\n    state.feedRecommendationProfilesPending = !0;\n    return waitForSupabaseAdapter(\"publicProfiles\", \"discoveryProfileCards\")\n      .then(function (adapter) {\n        return adapter.discoveryProfileCards(\n          { limit: 12, offset: 0, search: \"\" },\n          {\n            publicRead: !hasCustomer(),\n            viewerAuthenticated: hasCustomer(),\n            surface: \"feed-recommendation-candidates\",\n          },\n        );\n      })\n      .then(function (items) {\n        var profiles = dedupePublicProfiles(\n          (items || []).filter(publicProfileVisible),\n        );\n        state.feedRecommendationProfiles = profiles;\n        state.feedRecommendationProfilesLoaded = !0;\n        state.publicProfiles = dedupePublicProfiles(\n          (state.publicProfiles || []).concat(profiles),\n        );\n        publishPublicProfiles(state.publicProfiles);\n        renderPosts(\"feed-recommendations-loaded\");\n        claim(\"feed-recommendation-candidates:loaded\", {\n          rows: profiles.length,\n          maxRows: 12,\n          requests: 1,\n          perCardReads: 0,\n          timerRefetch: !1,\n          canonical: \"dsd_discovery_profile_cards\",\n        });\n        return profiles;\n      })\n      .catch(function (error) {\n        state.feedRecommendationProfiles = [];\n        state.feedRecommendationProfilesLoaded = !0;\n        claim(\"feed-recommendation-candidates:blocked\", {\n          error: (error && error.message) || String(error),\n          failClosed: !0,\n        });\n        return [];\n      })\n      .finally(function () {\n        state.feedRecommendationProfilesPending = !1;\n      });\n  }\n  function startFeedPageOwner() {\n    var closed = !1,\n      loading = !1,\n      cursor = \"\",\n      hasMore = !0,\n      observer = null,\n      sentinel = null,\n      hashtag = routeHashtag();\n    function syncHashtagShell() {\n      var shell = qs(\"[data-dsd-feed-page] .dsd-feed368__shell\"),\n        filters = shell && qs(\".dsd-feed368__filters\", shell),\n        existing = shell && qs(\"[data-dsd-hashtag-feed-header]\", shell);\n      if (!shell) return;\n      if (!hashtag) {\n        existing && existing.remove();\n        filters && (filters.hidden = !1);\n        return;\n      }\n      if (!existing) {\n        existing = document.createElement(\"header\");\n        existing.className = \"dsd-hashtag-feed-header\";\n        existing.setAttribute(\"data-dsd-hashtag-feed-header\", \"\");\n        filters ? shell.insertBefore(existing, filters) : shell.prepend(existing);\n      }\n      existing.innerHTML =\n        '<div><span>Hashtag</span><strong>#' +\n        html(hashtag) +\n        '</strong></div><a href=\"/pages/feed\">All Posts</a>';\n      filters && (filters.hidden = !0);\n    }\n    function updateSentinel() {\r\n      if (closed) return;\r\n      var shell = qs(\"[data-dsd-feed-page] .dsd-feed368__shell\");\r\n      if (!shell) return;\r\n      if (!sentinel || !sentinel.isConnected) {\r\n        sentinel = document.createElement(\"button\");\r\n        sentinel.type = \"button\";\r\n        sentinel.className = \"dsd-feed-page-more\";\r\n        sentinel.setAttribute(\"data-dsd-feed-page-more\", \"\");\r\n        sentinel.setAttribute(\"aria-label\", \"Load more posts\");\r\n        sentinel.textContent = \"Load more\";\r\n        sentinel.addEventListener(\"click\", function () {\r\n          loadPage(!1);\r\n        });\r\n        shell.appendChild(sentinel);\r\n      }\r\n      sentinel.hidden = !hasMore;\r\n      sentinel.disabled = loading;\r\n      sentinel.textContent = loading ? \"Loading\" : \"Load more\";\r\n      if (!observer && \"IntersectionObserver\" in window) {\r\n        observer = new IntersectionObserver(\r\n          function (entries) {\r\n            entries &&\r\n              entries.some(function (entry) {\r\n                return entry.isIntersecting;\r\n              }) &&\r\n              hasMore &&\r\n              !loading &&\r\n              loadPage(!1);\r\n          },\r\n          { root: null, rootMargin: \"500px 0px\", threshold: 0.01 },\r\n        );\r\n        observer.observe(sentinel);\r\n      }\r\n    }\r\n    function applyPage(page, reset) {\r\n      var items = approvedPublicRecords((page && page.rows) || []),\r\n        viewedKeyForPreserve = routeProfileKey();\r\n      state.posts = mergeRecords(\n        reset\n          ? hashtag\n            ? []\n            : state.posts.filter(function (post) {\n                return (\n                  recordOwnedByCurrentProfile(post) ||\n                  (viewedKeyForPreserve &&\n                    recordBelongsToProfile(\n                      post,\n                      \"\",\n                      viewedKeyForPreserve,\n                      \"authorUid\",\n                    ))\n                );\n              })\n          : state.posts,\n        items,\r\n      );\r\n      state.publicProfiles = dedupePublicProfiles(\r\n        (state.publicProfiles || []).concat((page && page.profiles) || []),\r\n      );\r\n      publishPublicProfiles(state.publicProfiles);\r\n      cursor = String((page && page.nextCursor) || \"\");\n      hasMore = !!(page && page.hasMore && cursor);\n      state.feedHasMore = hasMore;\n      renderPosts();\r\n      renderDiscovery();\r\n      renderProfileIdentity();\r\n      renderModeration();\n      renderSearchIndex();\n      syncHashtagShell();\n      updateSentinel();\n    }\r\n    function loadPage(reset) {\r\n      if (closed || loading || (!reset && !hasMore)) return Promise.resolve();\r\n      loading = !0;\r\n      updateSentinel();\r\n      return waitForSupabaseAdapter(\"posts\", \"feedPage\")\r\n        .then(function (adapter) {\r\n          return adapter[hashtag ? \"hashtagFeedPage\" : \"feedPage\"](\n            { limit: 25, cursor: reset ? \"\" : cursor, tag: hashtag },\n            {\n              publicRead: !0,\n              viewerAuthenticated: hasCustomer(),\n              surface: hashtag\n                ? \"hashtag-feed-keyset-page\"\n                : \"feed-keyset-page\",\n            },\r\n          );\r\n        })\r\n        .then(function (page) {\r\n          if (!closed) applyPage(page || {}, reset);\r\n        })\r\n        .catch(function (error) {\r\n          if (!closed)\r\n            claim(\"feed-page:blocked\", {\r\n              error: (error && error.message) || String(error),\r\n              cursor: reset ? \"initial\" : cursor,\r\n              failClosed: !0,\r\n            });\r\n        })\r\n        .finally(function () {\r\n          loading = !1;\r\n          updateSentinel();\r\n        });\r\n    }\r\n    var stop = function () {\n      closed = !0;\n      state.feedNextPageLoader = null;\n      state.feedHasMore = !1;\n      observer && observer.disconnect();\r\n      observer = null;\r\n      sentinel && sentinel.remove();\r\n      sentinel = null;\r\n    };\n    state.feedNextPageLoader = function () {\n      return loadPage(!1);\n    };\n    state.listeners.push(stop);\n    syncHashtagShell();\n    loadPage(!0);\n    hashtag || loadFeedRecommendationCandidates();\n    return stop;\n  }\n  function mergeProfileFeedPage(existing, incoming, reset) {\n    var rows = reset ? [] : (existing || []).slice(),\n      positions = {};\n    rows.forEach(function (post, index) {\n      positions[postKey(post)] = index;\n    });\n    (incoming || []).forEach(function (post) {\n      var key = postKey(post);\n      if (!key) return;\n      if (positions[key] !== void 0) rows[positions[key]] = post;\n      else ((positions[key] = rows.length), rows.push(post));\n    });\n    return rows;\n  }\n  function profileFeedFilterFromRoute() {\n    var filter = String(queryParam(\"media\") || \"all\").toLowerCase();\n    return [\"photos\", \"videos\"].indexOf(filter) !== -1 ? filter : \"all\";\n  }\n  function writeProfileFeedFilterRoute(filter, replace) {\n    if (!window.history || !window.history.pushState) return;\n    try {\n      var url = new URL(window.location.href);\n      filter === \"all\"\n        ? url.searchParams.delete(\"media\")\n        : url.searchParams.set(\"media\", filter);\n      var next = url.pathname + url.search + url.hash;\n      (replace ? window.history.replaceState : window.history.pushState).call(\n        window.history,\n        { dsdProfileMediaFilter: filter },\n        \"\",\n        next,\n      );\n    } catch (e) {}\n    if (hasCustomer()) {\n      qsa(\n        \"[data-dsd-canonical-compact-composer], [data-dsd-post-composer], [data-dsd-profile-publisher]\",\n      ).forEach(syncComposerIdentity);\n      syncAuthenticatedMenuIdentity();\n    }\n  }\n  function startProfileFeedPageOwner(authorKey) {\n    authorKey = nonPlaceholderProfileKey(authorKey || \"\");\n    if (!authorKey) return null;\n    var closed = !1,\n      loading = !1,\n      cursor = \"\",\n      cursorId = \"\",\n      hasMore = !0,\n      generation = 0,\n      appliedFilter = profileFeedFilterFromRoute(),\r\n      observer = null,\n      sentinel = null,\n      fallbackScrollHandler = null;\n    function syncControls() {\n      var routeFilter = profileFeedFilterFromRoute();\n      routeFilter !== state.profileFeedFilter &&\n        (state.profileFeedFilter = routeFilter);\n      var title = qs(\"[data-dsd-profile-content-title]\");\n      if (!title) return;\n      var shell = title.parentNode,\n        controls = shell && qs(\"[data-dsd-profile-media-filters]\", shell);\n      if (!controls) {\n        controls = document.createElement(\"div\");\n        controls.className =\n          \"dsd-feed368__filters dsd-profile-media-filters\";\n        controls.setAttribute(\"data-dsd-profile-media-filters\", \"\");\n        controls.setAttribute(\"role\", \"group\");\n        controls.setAttribute(\"aria-label\", \"Profile post filters\");\n        controls.innerHTML = [\"all\", \"photos\", \"videos\"]\n          .map(function (filter) {\n            var label =\n              filter === \"all\"\n                ? \"All Posts\"\n                : filter.charAt(0).toUpperCase() + filter.slice(1);\n            return (\n              '<button type=\"button\" data-dsd-profile-media-filter=\"' +\n              filter +\n              '\">' +\n              label +\n              \"</button>\"\n            );\n          })\n          .join(\"\");\n        shell.appendChild(controls);\n      }\n      controls.setAttribute(\"aria-busy\", loading ? \"true\" : \"false\");\r\n      qsa(\"[data-dsd-profile-media-filter]\", controls).forEach(\n        function (button) {\n          var filter = button.getAttribute(\"data-dsd-profile-media-filter\"),\n            active = filter === state.profileFeedFilter;\n          (button.classList.toggle(\"is-active\", active),\n            button.setAttribute(\"aria-pressed\", String(active)));\n          active\n            ? button.setAttribute(\"aria-current\", \"true\")\n            : button.removeAttribute(\"aria-current\");\n        },\n      );\n    }\n    function syncSentinel() {\n      var list = qs(\"[data-dsd-profile-feed-list]\");\n      if (!list) return;\n      if (!sentinel || !sentinel.isConnected) {\n        sentinel = document.createElement(\"div\");\n        sentinel.className = \"dsd-profile-feed-sentinel\";\n        sentinel.setAttribute(\"data-dsd-profile-feed-sentinel\", \"\");\n        sentinel.setAttribute(\"aria-hidden\", \"true\");\n        sentinel.innerHTML =\r\n          '<span class=\"visually-hidden\">Load more profile posts</span>';\r\n        list.parentNode.appendChild(sentinel);\n      }\n      sentinel.hidden = !hasMore;\n      sentinel.setAttribute(\"data-loading\", loading ? \"true\" : \"false\");\n      if (!observer && \"IntersectionObserver\" in window) {\n        observer = new IntersectionObserver(\n          function (entries) {\n            entries &&\n              entries.some(function (entry) {\n                return entry.isIntersecting;\n              }) &&\n              hasMore &&\n              !loading &&\n              loadPage(!1);\n          },\n          { root: null, rootMargin: \"500px 0px\", threshold: 0.01 },\n        );\n        observer.observe(sentinel);\n      } else if (!observer && !fallbackScrollHandler) {\n        fallbackScrollHandler = function () {\n          if (\n            !closed &&\n            hasMore &&\n            !loading &&\n            sentinel &&\n            sentinel.isConnected &&\n            sentinel.getBoundingClientRect().top <=\n              (window.innerHeight || document.documentElement.clientHeight) +\n                500\n          )\n            loadPage(!1);\n        };\n        window.addEventListener(\"scroll\", fallbackScrollHandler, {\n          passive: !0,\n        });\n        window.addEventListener(\"resize\", fallbackScrollHandler);\n        fallbackScrollHandler();\n      }\n    }\n    function applyPage(page, reset, requestGeneration) {\n      if (closed || requestGeneration !== generation) return;\n      var rows = (page && page.rows) || [],\n        pinnedPosts = rows.filter(function (post) {\n          return post && post.pinned === !0;\n        }),\n        pinned = pinnedPosts[0];\n      state.profileFeedPosts = mergeProfileFeedPage(\n        state.profileFeedPosts,\n        rows,\n        reset,\n      );\n      reset && (appliedFilter = state.profileFeedFilter);\r\n      state.posts = mergeRecords(state.posts, rows);\n      reset &&\n        (state.profileFeedPinnedPostId = pinned ? postKey(pinned) : \"\");\n      cursor = String((page && page.nextCursor) || \"\");\n      cursorId = String((page && page.nextCursorId) || \"\");\n      hasMore = !!(page && page.hasMore && cursor && cursorId);\n      state.profileFeedHasMore = hasMore;\n      state.profileFeedError = \"\";\n      (renderPosts(),\n        renderProfileIdentity(),\n        renderSearchIndex(),\n        syncControls(),\n        syncSentinel());\n    }\n    function loadPage(reset) {\n      if (closed || (!reset && (loading || !hasMore))) return Promise.resolve();\n      var previousFilter = appliedFilter,\r\n        preserveCommittedPage = !!(reset && state.profileFeedPosts.length);\r\n      reset &&\n        ((generation += 1),\n        (cursor = \"\"),\n        (cursorId = \"\"),\n        (hasMore = !0),\n        (state.profileFeedError = \"\"));\n      var requestGeneration = generation;\n      loading = !0;\n      state.profileFeedLoading = !0;\n      (preserveCommittedPage || renderPosts(), syncControls(), syncSentinel());\r\n      return waitForSupabaseAdapter(\"posts\", \"profileFeedPage\")\n        .then(function (adapter) {\n          return adapter.profileFeedPage(\n            {\n              profileKey: authorKey,\n              mediaFilter: state.profileFeedFilter,\n              limit: 25,\n              cursor: reset ? \"\" : cursor,\n              cursorId: reset ? \"\" : cursorId,\n            },\n            {\n              publicRead: !hasCustomer(),\n              viewerAuthenticated: hasCustomer(),\n              surface: \"profile-feed-release-f-keyset-page\",\n            },\n          );\n        })\n        .then(function (page) {\n          applyPage(page || {}, reset, requestGeneration);\n        })\n        .catch(function (error) {\n          if (!closed && requestGeneration === generation) {\n            if (reset && preserveCommittedPage) {\r\n              state.profileFeedFilter = previousFilter;\r\n              writeProfileFeedFilterRoute(previousFilter, !0);\r\n              syncControls();\r\n            }\r\n            state.profileFeedError =\n              (error && error.message) || \"Profile posts could not load\";\n            claim(\"profile-feed-release-f:blocked\", {\n              profileKey: authorKey,\n              mediaFilter: state.profileFeedFilter,\n              error: state.profileFeedError,\n              failClosed: !0,\n            });\n            preserveCommittedPage || renderPosts();\r\n          }\n        })\n        .finally(function () {\n          if (!closed && requestGeneration === generation) {\n            loading = !1;\n            state.profileFeedLoading = !1;\n            (renderPosts(), syncControls(), syncSentinel());\r\n          }\n        });\n    }\n    function onPopState() {\n      var filter = profileFeedFilterFromRoute();\n      filter !== state.profileFeedFilter &&\n        ((state.profileFeedFilter = filter), loadPage(!0));\n    }\n    var stop = function () {\n      closed = !0;\n      state.profileFeedReload = null;\n      state.profileFeedSyncControls = null;\n      state.profileFeedHasMore = !1;\n      state.profileFeedLoading = !1;\n      observer && observer.disconnect();\n      observer = null;\n      fallbackScrollHandler &&\n        (window.removeEventListener(\"scroll\", fallbackScrollHandler),\n        window.removeEventListener(\"resize\", fallbackScrollHandler));\n      fallbackScrollHandler = null;\n      sentinel && sentinel.remove();\n      sentinel = null;\n      window.removeEventListener(\"popstate\", onPopState);\n    };\n    state.profileFeedFilter = profileFeedFilterFromRoute();\n    state.profileFeedReload = function () {\n      return loadPage(!0);\n    };\n    state.profileFeedSyncControls = syncControls;\n    window.addEventListener(\"popstate\", onPopState);\n    state.listeners.push(stop);\n    (syncControls(), loadPage(!0));\n    return stop;\n  }\n  function startProfileContentOwner(authorKey) {\n    authorKey = nonPlaceholderProfileKey(authorKey || \"\");\n    if (!authorKey) return;\n    startProfileFeedPageOwner(authorKey);\n    trackStoryListOwner(\n      listen(\n        \"stories/author/\" + encodeURIComponent(authorKey),\r\n        function (items) {\r\n          state.stories = mergeRecords(\r\n            activeStoryRecords(state.stories),\r\n            activeStoryRecords(items || []),\r\n          );\r\n          renderStories();\r\n          renderProfileIdentity();\r\n          renderSearchIndex();\r\n        },\r\n        null,\r\n        {\r\n          publicRead: !hasCustomer(),\r\n          viewerAuthenticated: hasCustomer(),\r\n          routeScopedProfile: !0,\r\n          pageSize: 24,\r\n        },\r\n      ),\r\n    );\r\n  }\r\n  function startListeners() {\r\n    if (supabaseCutoverConfigured()) {\r\n      var routeSurface = activeRouteSurface(),\r\n        needsPublicProfiles = routeNeedsPublicProfiles(routeSurface),\r\n        needsPublicFeed = routeNeedsPublicFeed(routeSurface),\r\n        needsStories = routeNeedsStories(routeSurface),\r\n        needsOwnerSocial = routeNeedsOwnerSocial(routeSurface),\r\n        needsRelationshipState = routeNeedsRelationshipState(routeSurface),\r\n        ownerIdentity = actorRelationshipIdentity(),\r\n        relationshipOwnerIdentity = relationshipListenerOwnerIdentity(),\r\n        listenerSignature = [\r\n          BUILD,\r\n          routeSurface,\r\n          hasCustomer() ? \"customer\" : \"public\",\r\n          uid() || \"anon\",\r\n          profileKey() || \"\",\r\n          ownerIdentity || \"\",\r\n          relationshipOwnerIdentity || \"\",\r\n          routeProfileKey() || \"\",\r\n        ].join(\"|\"),\r\n        criticalPublicProfilesEmpty =\r\n          needsPublicProfiles &&\r\n          state.publicProfilesLoaded === !0 &&\r\n          !(state.publicProfiles || []).length &&\r\n          /^(feed|users|profile|stories)$/.test(routeSurface);\r\n      if (\r\n        state.listenerSignature === listenerSignature &&\r\n        state.listeners &&\r\n        state.listeners.length &&\r\n        !criticalPublicProfilesEmpty\r\n      ) {\r\n        claim(\"supabase-listeners:deduped\", {\r\n          routeSurface: routeSurface,\r\n          signature: listenerSignature,\r\n          activeListeners: state.listeners.length,\r\n        });\r\n        return;\r\n      }\r\n      if (\r\n        (criticalPublicProfilesEmpty &&\r\n          claim(\"supabase-listeners:retry-empty-public-profiles\", {\r\n            routeSurface: routeSurface,\r\n            signature: listenerSignature,\r\n            reason:\r\n              \"empty adapter-wait fallback must not freeze public Discovery hydration\",\r\n          }),\r\n        stopPostDetailRealtimeOwner(\"route-listener-reset\"),\r\n        stopStorySignalOwner(\"route-listener-reset\"),\r\n        state.listeners.forEach(function (off) {\r\n          try {\r\n            off();\r\n          } catch (e) {}\r\n        }),\r\n        (state.listeners = []),\r\n        (state.inboxListOwners = { conversations: null, notifications: null }),\r\n        (state.storyListOwners = []),\r\n        (state.commentListeners = {}),\r\n        (state.messageListeners = {}),\r\n        (state.messageAttachmentHydrationRequests = {}),\r\n        (state.listenerSignature = listenerSignature),\r\n        dedicatedGovernanceRouteActive() && !canModerate())\r\n      ) {\r\n        (renderModeration(), renderNotifications(), renderMessages());\r\n        return;\r\n      }\r\n      (needsPublicProfiles &&\r\n        routeSurface !== \"profile\" &&\r\n        routeSurface !== \"feed\" &&\r\n        (routeSurface === \"users\"\r\n          ? startDiscoveryProfileCardsOwner()\r\n          : listen(\r\n          \"publicProfiles\",\r\n          function (items) {\r\n            ((state.publicProfilesLoaded = !0),\r\n              (state.publicProfiles = (items || []).filter(\r\n                publicProfileVisible,\r\n              )),\r\n              publishPublicProfiles(state.publicProfiles),\r\n              renderDiscovery(),\r\n              renderProfileIdentity(),\r\n              renderRelationships(),\r\n              renderPosts(),\r\n              renderNotifications(),\r\n              renderMessages(),\r\n              renderSearchIndex());\r\n          },\r\n          function (c, f) {\r\n            return f.query(\r\n              c,\r\n              f.where(\"searchable\", \"==\", !0),\r\n              f.where(\"status\", \"==\", \"active\"),\r\n              f.orderBy(\"updatedAt\", \"desc\"),\r\n              f.limit(100),\r\n            );\r\n          },\r\n              { publicRead: !0 },\r\n            )),\r\n        needsPublicFeed && startFeedPageOwner(),\r\n        routeSurface === \"profile\" &&\r\n          startProfileContentOwner(routeProfileKey() || profileKey()),\r\n        needsStories &&\r\n          routeSurface !== \"profile\" &&\r\n          trackStoryListOwner(listen(\r\n            \"stories\",\r\n            function (items) {\r\n              var viewedStoryKeyForPreserve = routeProfileKey();\r\n              ((state.stories = mergeRecords(\r\n                activeStoryRecords(state.stories).filter(function (s) {\r\n                  if (\r\n                    isRestrictedShellRecord(s) ||\r\n                    isPersistedGatedShellRecord(s)\r\n                  )\r\n                    return !0;\r\n                  var alreadyAuthorizedClassified =\r\n                    classifiedRestrictionType(s) &&\r\n                    isApprovedPublicRecord(s) &&\r\n                    publicRecordVisible(s) &&\r\n                    canViewClassified(s) &&\r\n                    canViewPrivateRecord(s);\r\n                  return (\r\n                    alreadyAuthorizedClassified ||\r\n                    recordOwnedByCurrentProfile(s) ||\r\n                    (viewedStoryKeyForPreserve &&\r\n                      (recordBelongsToProfile(\r\n                        s,\r\n                        \"\",\r\n                        viewedStoryKeyForPreserve,\r\n                        \"ownerUid\",\r\n                      ) ||\r\n                        recordBelongsToProfile(\r\n                          s,\r\n                          \"\",\r\n                          viewedStoryKeyForPreserve,\r\n                          \"authorUid\",\r\n                        )))\r\n                  );\r\n                }),\r\n                approvedPublicRecords(items).filter(function (story) {\r\n                  return !storyExpired(story);\r\n                }),\r\n              )),\r\n                renderStories(),\n                renderPosts(\"story-recommendations-loaded\"),\n                renderDiscovery(),\n                renderProfileIdentity(),\r\n                renderSearchIndex());\r\n            },\r\n            function (c, f) {\r\n              return f.where\r\n                ? f.query(\r\n                    c,\r\n                    f.where(\"visibility\", \"==\", \"public\"),\r\n                    f.orderBy(\"createdAt\", \"desc\"),\r\n                    f.limit(50),\r\n                  )\r\n                : f.query(c, f.orderBy(\"createdAt\", \"desc\"), f.limit(50));\r\n            },\r\n            { publicRead: !0, viewerAuthenticated: hasCustomer() },\r\n          )));\r\n      var viewedAuthorKey = clean(routeProfileKey() || \"\", \"\");\r\n      (\r\n        hasCustomer() &&\r\n          ownerIdentity &&\r\n          (needsOwnerSocial &&\r\n            routeSurface === \"stories\" &&\r\n            listen(\r\n              \"posts\",\r\n              function (items) {\r\n                (autoPublishLaunchRecords(\"post\", items),\r\n                  (state.posts = mergeRecords(state.posts, items)),\r\n                  renderPosts(),\r\n                  renderModeration());\r\n              },\r\n              function (c, f) {\r\n                return f.where\r\n                  ? f.query(\r\n                      c,\r\n                      f.where(\"authorUid\", \"==\", ownerIdentity),\r\n                      f.orderBy(\"createdAt\", \"desc\"),\r\n                      f.limit(50),\r\n                    )\r\n                  : f.query(c, f.orderBy(\"createdAt\", \"desc\"), f.limit(50));\r\n              },\r\n              { ownerScoped: !0, ownerProfileKey: profileKey() },\r\n            ),\r\n          needsStories &&\r\n            routeSurface === \"stories\" &&\r\n            trackStoryListOwner(listen(\r\n              \"stories\",\r\n              function (items) {\r\n                var activeOwnerStories = activeStoryRecords(items);\r\n                (autoPublishLaunchRecords(\"story\", activeOwnerStories),\r\n                  (state.stories = mergeRecords(\r\n                    activeStoryRecords(state.stories),\r\n                    activeOwnerStories,\r\n                  )),\r\n                  renderStories());\r\n              },\r\n              function (c, f) {\r\n                return f.where\r\n                  ? f.query(\r\n                      c,\r\n                      f.where(\"ownerUid\", \"==\", ownerIdentity),\r\n                      f.orderBy(\"createdAt\", \"desc\"),\r\n                      f.limit(50),\r\n                    )\r\n                  : f.query(c, f.orderBy(\"createdAt\", \"desc\"), f.limit(50));\r\n              },\r\n              { ownerScoped: !0, ownerProfileKey: profileKey() },\r\n            )),\r\n          (state.inboxListOwners.notifications = listen(\n            \"notifications/\" + ownerIdentity + \"/items\",\n            function (items) {\n              hydrateNotificationInbox(\"recipient-list-signal\", !0);\n              refreshInboxCounts(\"recipient-list-signal\");\n              if (routeSurface === \"messages\" && state.activeConversationId) {\n                var activeNotificationConversation = conversationById(\n                  state.activeConversationId,\n                ) || { conversationId: state.activeConversationId };\n                unreadMessageNotificationCount(activeNotificationConversation) >\r\n                  0 && markConversationRead(state.activeConversationId);\r\n              }\r\n            },\r\n            function (c, f) {\r\n              return f.query(c, f.orderBy(\"createdAt\", \"desc\"), f.limit(50));\r\n            },\r\n            {\r\n              realtimeOwned: !0,\r\n              ownerScoped: !0,\r\n              surface: \"sitewide-dock-notifications\",\r\n            },\r\n          )),\r\n          (state.inboxListOwners.conversations = listen(\r\n            \"conversations\",\r\n            function (items) {\r\n              if (\r\n                ((state.conversations = activeConversationRecords(items)),\n                hydrateConversationPreferences(\"conversation-page\"),\n                updateInboxPageCursor(\"conversations\", state.conversations),\n                updateMessageDockBadge(state.conversations),\r\n                routeSurface === \"messages\")\r\n              ) {\r\n                var requested = routeRequestedConversationId();\r\n                requested &&\r\n                  state.activeConversationId !== requested &&\r\n                  (stopMessageThreadOwner(\r\n                    state.activeConversationId,\r\n                    \"conversation-switch\",\r\n                  ),\r\n                  beginMessageThreadSession(requested, !0),\r\n                  (state.activeConversationId = requested));\r\n                var priorityConversationId =\r\n                  state.activeConversationId || requested || \"\";\r\n                if (\r\n                  (priorityConversationId &&\r\n                    hydrateConversationMessages(priorityConversationId),\r\n                  renderMessages(),\r\n                  state.activeConversationId)\r\n                ) {\r\n                  var activeConversationRecord = conversationById(\r\n                    state.activeConversationId,\r\n                  ) || { conversationId: state.activeConversationId };\r\n                  conversationUnreadCount(activeConversationRecord) > 0 &&\n                    markConversationRead(state.activeConversationId);\n                }\n                hydrateUnreadConversationSummaries(\"conversation-page\");\n              }\n            },\n            function (c, f) {\r\n              return f.where\r\n                ? f.query(\r\n                    c,\r\n                    f.where(\"participantIds\", \"array-contains\", ownerIdentity),\r\n                    f.orderBy(\"updatedAt\", \"desc\"),\r\n                    f.limit(50),\r\n                  )\r\n                : f.query(c, f.orderBy(\"updatedAt\", \"desc\"), f.limit(50));\r\n            },\r\n            {\r\n              realtimeOwned: !0,\r\n              ownerScoped: !0,\r\n              surface: \"sitewide-dock-messages\",\r\n            },\r\n          )),\r\n          startInboxRealtimeOwner(ownerIdentity),\r\n          needsRelationshipState &&\r\n            relationshipOwnerIdentity &&\r\n            listen(\r\n              \"relationships/\" + relationshipOwnerIdentity + \"/following\",\n              function (items) {\n                ((state.blockedByUid = {}),\n                  (state.blockedRecords = (items || []).filter(function (item) {\n                    return item && item.state === \"blocked\";\n                  })),\n                  state.blockedRecords.forEach(function (item) {\n                    item.targetUid && (state.blockedByUid[item.targetUid] = !0);\n                  }),\n                  renderMessages(),\n                  loadOwnProfileRelationshipsViaProxy());\n              },\r\n              function (c, f) {\r\n                return f.query(c, f.limit(50));\r\n              },\r\n              { pageSize: 50, surface: \"relationship-following-page\" },\r\n            ),\r\n          needsRelationshipState &&\r\n            relationshipOwnerIdentity &&\r\n            listen(\r\n              \"relationships/\" + relationshipOwnerIdentity + \"/followers\",\n              function (items) {\n                ((state.blockedMeByUid = {}),\n                  (items || [])\n                    .filter(function (item) {\n                      return item && item.state === \"blocked\";\n                    })\r\n                    .forEach(function (item) {\r\n                      item.sourceUid &&\n                        (state.blockedMeByUid[item.sourceUid] = !0);\n                    }),\n                  renderMessages());\n              },\r\n              function (c, f) {\r\n                return f.query(c, f.limit(50));\r\n              },\r\n              { pageSize: 50, surface: \"relationship-followers-page\" },\r\n            ),\r\n          /^(feed|users|profile|favorites)$/.test(routeSurface) &&\n            hydrateFavoriteProfiles(),\n          /^(feed|profile|saved)$/.test(routeSurface) &&\r\n            listen(\r\n              \"saves/\" + ownerIdentity + \"/items\",\r\n              function (items) {\r\n                var nextSavedItems = activeSavedItems(items);\r\n                (Object.keys(state.localSavedStateOverrides || {}).forEach(\r\n                  function (targetId) {\r\n                    var stateValue = state.localSavedStateOverrides[targetId];\r\n                    ((nextSavedItems = nextSavedItems.filter(function (item) {\r\n                      return (\r\n                        item &&\r\n                        !savedItemMatchesPost(item, targetId)\r\n                      );\r\n                    })),\r\n                      stateValue === \"saved\" &&\r\n                        nextSavedItems.push({\r\n                          id: targetId,\r\n                          ownerUid: ownerIdentity,\r\n                          targetId: targetId,\r\n                          targetType: \"post\",\r\n                          state: \"saved\",\r\n                        }));\r\n                  },\r\n                ),\r\n                  (state.savedItems = activeSavedItems(nextSavedItems)),\r\n                  (state.savedItemsLoaded = !0),\r\n                  renderPosts(),\r\n                  renderRelationships());\r\n              },\r\n              function (c, f) {\r\n                return f.query(c, f.limit(50));\r\n              },\r\n              { pageSize: 50, surface: \"saves-page\" },\r\n            )),\r\n          needsStories && startStorySignalOwner(),\r\n        hasCanonicalPrivateSocialSession() &&\r\n          canModerate() &&\n          routeSurface === \"governance\" &&\n          !qs('[data-dsd-owner=\"ModerationOperationsCenter\"]') &&\n          listen(\r\n            \"moderationQueue\",\r\n            function (items) {\r\n              ((state.moderationQueueItems = (items || []).filter(function (item) {\n                return !recordSourceRisk(item);\r\n              })),\r\n                renderModeration());\r\n            },\r\n            function (c, f) {\r\n              return f.query(c, f.orderBy(\"createdAt\", \"desc\"), f.limit(100));\r\n            },\r\n            { founderOnly: !0, supabaseQueueCanonical: !0 },\r\n          ));\r\n    }\r\n  }\r\n  function ensureViewedAuthorContentListeners() {\r\n    claim(\"viewed-author-legacy-listeners:deconstructed\", {\r\n      owner: \"startListeners\",\r\n      reason:\r\n        \"profile route content is now loaded once through route-scoped post/story listeners\",\r\n    });\r\n  }\r\n  function staleConnectionStatusPattern() {\r\n    return /connecting your account|profile connection is temporarily unavailable|profile connection is refreshing|account connection loading|account connection is still loading|profile display is available|profile identity is syncing|profile identity is still syncing|profile actions are loading|profile details are loading|refresh or log in again|complete profile setup before/i;\r\n  }\r\n  function connectionStatusCanClear() {\r\n    var composerProfile = currentComposerProfile\r\n      ? currentComposerProfile()\r\n      : null;\r\n    return (\r\n      canUseSocialActions() ||\r\n      profileRecordHasUsableKey(state.profile) ||\r\n      profileRecordHasUsableKey(composerProfile) ||\r\n      profileRecordHasSavedIdentity(state.profile) ||\r\n      profileRecordHasSavedIdentity(composerProfile) ||\r\n      !!customerProfileKeyValue() ||\r\n      privateBridgeCanonicalProfileResolved()\r\n    );\r\n  }\r\n  function renderStatus(message) {\r\n    var text = message || \"\";\r\n    (text &&\r\n      staleConnectionStatusPattern().test(String(text)) &&\r\n      connectionStatusCanClear() &&\r\n      (text = \"\"),\r\n      qsa(\"[data-dsd-activation-status]\").forEach(function (n) {\r\n        n.textContent = text;\r\n      }));\r\n  }\r\n  function clearUploadStatus(root) {\r\n    qsa(\"[data-dsd-upload-status]\", root || document).forEach(\r\n      function (status) {\r\n        ((status.textContent = \"\"), status.removeAttribute(\"aria-busy\"));\r\n      },\r\n    );\r\n  }\r\n  function clearStaleConnectionStatus() {\r\n    var canClear = connectionStatusCanClear();\r\n    if (canClear) {\r\n      var stale = staleConnectionStatusPattern();\r\n      (qsa(\"[data-dsd-activation-status], [data-dsd-upload-status]\").forEach(\n        function (node) {\r\n          stale.test(String(node.textContent || \"\")) && (node.textContent = \"\");\r\n        },\r\n      ),\n        canUseSocialActions() && syncRestrictedActionControls(document));\n    }\n  }\n  function composerMutationTimeoutMs(form) {\r\n    var files = collectFormFiles(form),\r\n      video = files.filter(function (file) {\r\n        return mediaFileKind(file) === \"video\";\r\n      })[0],\r\n      videoBytes = Number((video && video.size) || 0) || 0;\r\n    return video\r\n      ? videoBytes > 250 * 1024 * 1024\r\n        ? 4.25 * 60 * 60 * 1000\r\n        : 75 * 60 * 1000\r\n      : files.length\r\n        ? 10 * 60 * 1000\r\n        : 2e4;\r\n  }\r\n  function formSubmitControls(form) {\r\n    if (!form) return [];\r\n    var controls = qsa('button[type=\"submit\"]', form),\r\n      formId = String(form.id || \"\").trim();\r\n    formId &&\r\n      qsa('button[type=\"submit\"][form=\"' + formId + '\"]').forEach(function (\r\n        button,\r\n      ) {\r\n        controls.indexOf(button) === -1 && controls.push(button);\r\n      });\r\n    return controls;\r\n  }\r\n  function finishComposerBusyState(form, status) {\r\n    var mutationId = String(\r\n      (form && form.dataset && form.dataset.dsdComposerMutationId) || \"\",\r\n    );\r\n    (form.removeAttribute(\"aria-busy\"),\r\n      delete form.dataset.dsdComposerBusy,\r\n      delete form.dataset.dsdComposerMutationId,\r\n      document.documentElement.removeAttribute(\"data-dsd-upload-progress\"),\r\n      document.documentElement.removeAttribute(\"data-dsd-upload-media-id\"),\r\n      status && status.removeAttribute(\"aria-busy\"),\r\n      formSubmitControls(form).forEach(function (btn) {\r\n        ((btn.disabled = !1),\r\n          btn.dataset.dsdBusyText &&\r\n            (btn.textContent = btn.dataset.dsdBusyText),\r\n          delete btn.dataset.dsdBusyText);\r\n      }),\r\n      activeComposerMutationForm === form &&\r\n        ((activeComposerMutationForm = null),\r\n        (activeComposerMutationId = \"\")));\r\n    mutationId &&\r\n      window.setTimeout(function () {\r\n        qsa(\r\n          '[data-dsd-composer-mutation-id=\"' + mutationId + '\"]',\r\n        ).forEach(function (node) {\r\n          (node.removeAttribute(\"aria-busy\"),\r\n            delete node.dataset.dsdComposerBusy,\r\n            delete node.dataset.dsdComposerMutationId,\r\n            qsa('button[type=\"submit\"]', node).forEach(function (button) {\r\n              button.disabled = !1;\r\n            }));\r\n        });\r\n        (document.documentElement.removeAttribute(\"data-dsd-upload-progress\"),\r\n          document.documentElement.removeAttribute(\"data-dsd-upload-media-id\"));\r\n      }, 0);\r\n  }\r\n  function composerBusy(form, message, promise) {\r\n    if (!form) return Promise.resolve(promise);\r\n    if (form.dataset.dsdComposerBusy === \"true\") return Promise.resolve(null);\r\n    var mutationId =\r\n        \"publication-\" + Date.now() + \"-\" + (++composerMutationSequence),\r\n      status = qs(\r\n      \"[data-dsd-activation-status], [data-dsd-upload-status]\",\r\n      form,\r\n    );\r\n    (status ||\r\n      ((status = document.createElement(\"div\")),\r\n      status.setAttribute(\"data-dsd-upload-status\", \"\"),\r\n      (status.className = \"dsd-upload-status\"),\r\n      form.insertBefore(status, form.firstChild)),\r\n      form.setAttribute(\"aria-busy\", \"true\"),\r\n      (form.dataset.dsdComposerBusy = \"true\"),\r\n      (form.dataset.dsdComposerMutationId = mutationId),\r\n      (status.textContent = message || \"Saving media and post...\"),\r\n      formSubmitControls(form).forEach(function (btn) {\r\n        ((btn.disabled = !0),\r\n          (btn.dataset.dsdBusyText = btn.textContent),\r\n          (btn.textContent = \"Saving...\"));\r\n      }),\r\n      (activeComposerMutationForm = form),\r\n      (activeComposerMutationId = mutationId));\r\n    try {\r\n      promise = typeof promise === \"function\" ? promise() : promise;\r\n    } catch (error) {\r\n      finishComposerBusyState(form, status);\r\n      status.textContent = (error && error.message) || \"Save failed. Try again.\";\r\n      return Promise.resolve(null);\r\n    }\r\n    var timeoutMs = composerMutationTimeoutMs(form),\r\n      timer,\r\n      guarded = Promise.race([\r\n        Promise.resolve(promise),\r\n        new Promise(function (_, reject) {\r\n          timer = setTimeout(function () {\r\n            reject(new Error(\"Mutation timed out after \" + timeoutMs + \"ms\"));\r\n          }, timeoutMs);\r\n        }),\r\n      ]);\r\n    return guarded.then(\r\n      function (result) {\r\n        return (\r\n          clearTimeout(timer),\r\n          finishComposerBusyState(form, status),\r\n          result && clearUploadStatus(form),\r\n          !result &&\r\n            (status.querySelector(\"progress\") ||\r\n              status.textContent ===\r\n                (message || \"Saving media and post...\")) &&\r\n            (status.textContent = \"Save could not complete. Try again.\"),\r\n          result\r\n        );\r\n      },\r\n      function (error) {\r\n        return (\r\n          clearTimeout(timer),\r\n          finishComposerBusyState(form, status),\r\n          (status.textContent =\r\n            (error && error.message) || \"Save failed. Try again.\"),\r\n          (!error || !error.dsdNoDraftQueue) &&\n            queueDraft(\n              \"composer-timeout\",\n              { message: message || \"Saving media and post...\" },\n              error,\n            ),\n          null\n        );\n      },\r\n    );\r\n  }\r\n  function deferredLocalMediaPreviewHTML(file, isVideo) {\n    return (\r\n      '<div class=\"dsd-attachment-preview-deferred\" role=\"img\" aria-label=\"' +\r\n      html((isVideo ? \"Selected video: \" : \"Selected photo: \") + (file.name || \"Attachment\")) +\r\n      '\"><svg viewBox=\"0 0 24 24\" width=\"48\" height=\"48\" aria-hidden=\"true\"><path d=\"' +\r\n      (isVideo\r\n        ? \"M4 6h10a2 2 0 0 1 2 2v1.2l4-2.2v10l-4-2.2V16a2 2 0 0 1-2 2H4V6Zm3 3v6h6V9H7Z\"\r\n        : \"M4 5h16v14H4V5Zm2 2v7.2l3.2-3.2 3.1 3.1 2.2-2.5L18 15.5V7H6Zm3 1.8a1.7 1.7 0 1 1 0 3.4 1.7 1.7 0 0 1 0-3.4Z\") +\r\n      '\"></path></svg><span>' +\r\n      (isVideo ? \"Video selected\" : \"Photo selected\") +\r\n      \"</span></div>\"\r\n    );\n  }\n  function shouldDeferLocalMediaPreview(file) {\r\n    if (!file) return !1;\r\n    var navigatorRef = window.navigator || {},\r\n      appleTouch =\r\n        /iPhone|iPad|iPod/i.test(String(navigatorRef.userAgent || \"\")) ||\r\n        (String(navigatorRef.platform || \"\") === \"MacIntel\" &&\r\n          Number(navigatorRef.maxTouchPoints || 0) > 1),\r\n      largeMedia = Number(file.size || 0) >= 24 * 1024 * 1024;\r\n    return appleTouch && largeMedia;\r\n  }\r\n  function localMediaPreviewStatusHTML(isVideo, stateName, message) {\r\n    return (\r\n      '<p class=\"dsd-attachment-preview-status\" data-dsd-preview-status=\"' +\r\n      html(stateName || \"selected\") +\r\n      '\" role=\"status\" aria-live=\"polite\">' +\r\n      html(\r\n        message ||\r\n          (isVideo\r\n            ? \"Video selected. Preparing preview...\"\r\n            : \"Photo selected. Preparing preview...\"),\r\n      ) +\r\n      \"</p>\"\r\n    );\r\n  }\n  function videoTrimControlsHTML() {\n    return '<section class=\"dsd-video-trim\" data-dsd-video-trim aria-label=\"Video trim editor\"><div class=\"dsd-video-trim__summary\"><strong>Trim video</strong><span data-dsd-trim-original>Loading video length...</span><span data-dsd-trim-selected>Selected length unavailable</span></div><label class=\"dsd-video-trim__range\">Start <input type=\"range\" min=\"0\" max=\"0.1\" step=\"0.1\" value=\"0\" data-dsd-trim-start-range aria-label=\"Video trim start\"></label><label>Start seconds <input type=\"number\" inputmode=\"decimal\" min=\"0\" step=\"0.1\" value=\"0\" data-dsd-trim-start aria-label=\"Video trim start in seconds\"></label><label class=\"dsd-video-trim__range\">End <input type=\"range\" min=\"0.1\" max=\"0.1\" step=\"0.1\" value=\"0.1\" data-dsd-trim-end-range aria-label=\"Video trim end\"></label><label>End seconds <input type=\"number\" inputmode=\"decimal\" min=\"0.1\" step=\"0.1\" value=\"0.1\" data-dsd-trim-end aria-label=\"Video trim end in seconds\"></label><div class=\"dsd-video-trim__actions\"><button type=\"button\" data-dsd-trim-preview>Preview selection</button><button type=\"button\" data-dsd-trim-cancel>Cancel</button><button type=\"button\" data-dsd-trim-apply>Apply trim</button></div><p class=\"dsd-video-trim__status\" data-dsd-trim-status role=\"status\" aria-live=\"polite\"></p></section>';\n  }\n  function renderFilePreviews(form) {\n    if (form) {\n      var previewGeneration =\r\n        Number(form.dataset.dsdPreviewGeneration || 0) + 1;\r\n      form.dataset.dsdPreviewGeneration = String(previewGeneration);\r\n      revokeComposerPreviewObjectUrls(form);\n      var files = [],\n        fileEntries = [];\n      qsa('input[type=\"file\"]', form).forEach(function (input) {\n        selectedInputFiles(input).forEach(function (file, inputIndex) {\n          files.push(file);\n          fileEntries.push({ input: input, inputIndex: inputIndex });\n        });\n      });\n      var preview = qs(\"[data-dsd-attachment-preview]\", form);\r\n      if (!files.length) {\r\n        (delete form.dataset.dsdMediaSelectionExpected,\r\n          preview && preview.remove(),\r\n          updateComposerMediaControls(form));\r\n        return;\r\n      }\r\n      form.dataset.dsdMediaSelectionExpected = \"true\";\r\n      if (!preview) {\r\n        ((preview = document.createElement(\"div\")),\r\n          (preview.className = \"dsd-attachment-preview-grid\"),\r\n          preview.setAttribute(\"data-dsd-attachment-preview\", \"\"));\r\n        var actions = qs(\".dsd-composer-media-actions\", form);\r\n        actions && actions.parentNode\r\n          ? actions.parentNode.insertBefore(preview, actions.nextSibling)\r\n          : form.appendChild(preview);\r\n      }\r\n      var previewUrls = [];\n      preview.setAttribute(\"data-dsd-preview-mode\", \"visual\");\n      preview.setAttribute(\"data-dsd-media-count\", String(files.length));\n      preview.setAttribute(\n        \"data-dsd-media-layout\",\n        mediaLayoutType(\n          files.map(function (file) {\n            return { kind: mediaFileKind(file) };\n          }),\n        ),\n      );\n      var tiles = files\n        .slice(0, 10)\n        .map(function (file, fileIndex) {\n          var isVideo = mediaFileKind(file) === \"video\";\r\n          var itemActions =\n            '<div class=\"dsd-attachment-preview-item-actions\" aria-label=\"Attachment order controls\">' +\n            '<button type=\"button\" data-dsd-attachment-move=\"previous\" data-dsd-attachment-index=\"' +\n            fileIndex +\n            '\" aria-label=\"Move attachment ' +\n            (fileIndex + 1) +\n            ' earlier\"' +\n            (fileIndex === 0 ? \" disabled\" : \"\") +\n            '>Earlier</button><button type=\"button\" data-dsd-attachment-move=\"next\" data-dsd-attachment-index=\"' +\n            fileIndex +\n            '\" aria-label=\"Move attachment ' +\n            (fileIndex + 1) +\n            ' later\"' +\n            (fileIndex === files.length - 1 ? \" disabled\" : \"\") +\n            '>Later</button><button type=\"button\" data-dsd-attachment-remove data-dsd-attachment-index=\"' +\n            fileIndex +\n            '\" aria-label=\"Remove attachment ' +\n            (fileIndex + 1) +\n            '\">Remove</button></div>';\n          var url = \"\";\n          if (shouldDeferLocalMediaPreview(file))\r\n            return (\r\n              '<figure data-dsd-attachment-index=\"' + fileIndex + '\">' +\r\n              deferredLocalMediaPreviewHTML(file, isVideo) +\r\n              localMediaPreviewStatusHTML(\r\n                isVideo,\r\n                \"deferred\",\r\n                (isVideo ? \"Video\" : \"Photo\") +\r\n                  \" selected. Large-file preview is deferred on this device to keep the upload reliable.\",\r\n              ) +\r\n              \"<figcaption>\" +\r\n              html(file.name || (isVideo ? \"Video\" : \"Image\")) +\r\n              \"</figcaption>\" +\r\n              itemActions +\r\n              \"</figure>\"\r\n            );\r\n          try {\n            url = URL.createObjectURL(file);\n            previewUrls.push(url);\n          } catch (e) {}\n          if (!url)\n            return (\n              '<figure data-dsd-attachment-index=\"' + fileIndex + '\">' +\n              deferredLocalMediaPreviewHTML(file, isVideo) +\n              localMediaPreviewStatusHTML(\r\n                isVideo,\r\n                \"preview-error\",\r\n                (isVideo ? \"Video\" : \"Photo\") +\r\n                  \" selected, but its local preview could not start. Remove or reselect it to retry.\",\r\n              ) +\r\n              \"<figcaption>\" +\n              html(file.name || (isVideo ? \"Video\" : \"Image\")) +\n              \"</figcaption>\" + itemActions +\n              (isVideo ? videoTrimControlsHTML() : \"\") +\n              \"</figure>\"\n            );\n          return (\n            '<figure data-dsd-attachment-index=\"' + fileIndex + '\"><' +\n            (isVideo\n              ? 'video controls muted playsinline preload=\"metadata\" data-dsd-local-video-thumbnail'\n              : 'img loading=\"lazy\" decoding=\"async\" fetchpriority=\"low\"') +\n            ' src=\"' +\r\n            html(url) +\r\n            '\" alt=\"' +\r\n            html(file.name || \"Attachment\") +\r\n            '\" data-dsd-preview-generation=\"' +\r\n            previewGeneration +\r\n            '\"></' +\r\n            (isVideo ? \"video\" : \"img\") +\r\n            \">\" +\r\n            localMediaPreviewStatusHTML(isVideo) +\r\n            \"<figcaption>\" +\r\n            html(file.name || (isVideo ? \"Video\" : \"Image\")) +\n            \"</figcaption>\" + itemActions +\n            (isVideo ? videoTrimControlsHTML() : \"\") +\n            \"</figure>\"\n          );\r\n        })\n        .join(\"\");\n      composerPreviewObjectUrls &&\n        composerPreviewObjectUrls.set(form, previewUrls);\n      ((preview.innerHTML =\n        '<div class=\"dsd-attachment-preview-actions\"><strong>' +\r\n        files.length +\r\n        \" attachment\" +\r\n        (files.length === 1 ? \"\" : \"s\") +\r\n        '</strong><button type=\"button\" data-dsd-clear-attachments>Clear</button><button type=\"button\" data-dsd-cancel-composer>Cancel</button></div>' +\r\n        tiles),\n        qsa(\"video[data-dsd-local-video-thumbnail]\", preview).forEach(\n          function (video) {\n            var previewStatus =\r\n                video.parentNode &&\r\n                qs(\"[data-dsd-preview-status]\", video.parentNode),\r\n              generation = Number(\r\n                video.getAttribute(\"data-dsd-preview-generation\") || 0,\r\n              ),\r\n              previewReady = function () {\r\n                return (\r\n                  video.isConnected &&\r\n                  Number(form.dataset.dsdPreviewGeneration || 0) === generation\r\n                );\r\n              },\r\n              previewTimer = window.setTimeout(function () {\r\n                if (!previewReady() || !previewStatus) return;\r\n                previewStatus.setAttribute(\r\n                  \"data-dsd-preview-status\",\r\n                  \"delayed\",\r\n                );\r\n                previewStatus.textContent =\r\n                  \"Video selected. Preview is taking longer; you can still upload or reselect it.\";\r\n              }, 20000);\r\n            video.addEventListener(\n              \"loadedmetadata\",\n              function () {\n                if (!previewReady()) return;\r\n                var figure = video.closest(\"[data-dsd-attachment-index]\"),\n                  index = Number(figure && figure.getAttribute(\"data-dsd-attachment-index\")),\n                  file = files[index],\n                  duration = Number(video.duration || 0),\n                  trim = figure && qs(\"[data-dsd-video-trim]\", figure),\n                  startInput = figure && qs(\"[data-dsd-trim-start]\", figure),\n                  endInput = figure && qs(\"[data-dsd-trim-end]\", figure),\n                  startRange = figure && qs(\"[data-dsd-trim-start-range]\", figure),\n                  endRange = figure && qs(\"[data-dsd-trim-end-range]\", figure),\n                  originalLabel = figure && qs(\"[data-dsd-trim-original]\", figure);\n                try {\n                  video.currentTime = Math.min(\n                    0.1,\n                    Math.max(0, duration / 2),\n                  );\n                } catch (error) {}\n                if (previewStatus) {\r\n                  previewStatus.setAttribute(\r\n                    \"data-dsd-preview-status\",\r\n                    \"metadata-ready\",\r\n                  );\r\n                  previewStatus.textContent =\r\n                    \"Video selected. Preparing first frame...\";\r\n                }\r\n                if (file && duration > 0) {\n                  file.dsdVideoDurationSeconds = duration;\n                  var committedStart = Number(file.dsdTrimStartSeconds || 0),\n                    committedEnd = Number(file.dsdTrimEndSeconds || duration);\n                  [startInput, endInput, startRange, endRange].forEach(function (control) {\n                    control && (control.max = String(duration));\n                  });\n                  startInput && (startInput.value = String(Number(committedStart.toFixed(1))));\n                  startRange && (startRange.value = startInput.value);\n                  endInput && (endInput.value = String(Number(committedEnd.toFixed(1))));\n                  endRange && (endRange.value = endInput.value);\n                  originalLabel && (originalLabel.textContent = \"Original: \" + duration.toFixed(1) + \" seconds\");\n                  trim && trim.setAttribute(\"data-dsd-trim-ready\", \"true\");\n                  updateVideoTrimDraft(figure, file, video, false);\n                }\n              },\n              { once: !0 },\n            );\n            video.addEventListener(\r\n              \"loadeddata\",\r\n              function () {\r\n                if (!previewReady()) return;\r\n                window.clearTimeout(previewTimer);\r\n                if (previewStatus) {\r\n                  previewStatus.setAttribute(\r\n                    \"data-dsd-preview-status\",\r\n                    \"preview-ready\",\r\n                  );\r\n                  previewStatus.textContent = \"Video preview ready.\";\r\n                }\r\n              },\r\n              { once: !0 },\r\n            );\r\n            video.addEventListener(\r\n              \"error\",\r\n              function () {\r\n                if (!previewReady()) return;\r\n                window.clearTimeout(previewTimer);\r\n                if (previewStatus) {\r\n                  previewStatus.setAttribute(\r\n                    \"data-dsd-preview-status\",\r\n                    \"preview-error\",\r\n                  );\r\n                  previewStatus.textContent =\r\n                    \"Video selected, but its local preview is unavailable. Remove or reselect it to retry.\";\r\n                }\r\n              },\r\n              { once: !0 },\r\n            );\r\n            if (video.readyState >= 1)\r\n              video.dispatchEvent(new Event(\"loadedmetadata\"));\r\n            if (video.readyState >= 2)\r\n              video.dispatchEvent(new Event(\"loadeddata\"));\r\n          },\n        ),\n        qsa(\"img[data-dsd-preview-generation]\", preview).forEach(\r\n          function (image) {\r\n            var previewStatus =\r\n                image.parentNode &&\r\n                qs(\"[data-dsd-preview-status]\", image.parentNode),\r\n              generation = Number(\r\n                image.getAttribute(\"data-dsd-preview-generation\") || 0,\r\n              ),\r\n              previewReady = function () {\r\n                return (\r\n                  image.isConnected &&\r\n                  Number(form.dataset.dsdPreviewGeneration || 0) === generation\r\n                );\r\n              },\r\n              previewTimer = window.setTimeout(function () {\r\n                settle(\r\n                  \"delayed\",\r\n                  \"Photo selected. Preview is taking longer; you can still upload or reselect it.\",\r\n                );\r\n              }, 20000),\r\n              settle = function (stateName, message) {\r\n                if (!previewReady() || !previewStatus) return;\r\n                if (stateName !== \"delayed\") window.clearTimeout(previewTimer);\r\n                previewStatus.setAttribute(\"data-dsd-preview-status\", stateName);\r\n                previewStatus.textContent = message;\r\n              };\r\n            image.addEventListener(\r\n              \"load\",\r\n              function () {\r\n                settle(\"preview-ready\", \"Photo preview ready.\");\r\n              },\r\n              { once: !0 },\r\n            );\r\n            image.addEventListener(\r\n              \"error\",\r\n              function () {\r\n                settle(\r\n                  \"preview-error\",\r\n                  \"Photo selected, but its local preview is unavailable. Remove or reselect it to retry.\",\r\n                );\r\n              },\r\n              { once: !0 },\r\n            );\r\n            if (image.complete)\r\n              image.dispatchEvent(\r\n                new Event(image.naturalWidth > 0 ? \"load\" : \"error\"),\r\n              );\r\n          },\r\n        ),\r\n        qsa(\"[data-dsd-video-trim] input\", preview).forEach(function (input) {\n          input.addEventListener(\"input\", function () {\n            var figure = input.closest(\"[data-dsd-attachment-index]\"),\n              index = Number(figure && figure.getAttribute(\"data-dsd-attachment-index\")),\n              file = files[index],\n              video = figure && qs(\"video[data-dsd-local-video-thumbnail]\", figure),\n              paired = input.hasAttribute(\"data-dsd-trim-start-range\")\n                ? qs(\"[data-dsd-trim-start]\", figure)\n                : input.hasAttribute(\"data-dsd-trim-end-range\")\n                  ? qs(\"[data-dsd-trim-end]\", figure)\n                  : input.hasAttribute(\"data-dsd-trim-start\")\n                    ? qs(\"[data-dsd-trim-start-range]\", figure)\n                    : qs(\"[data-dsd-trim-end-range]\", figure);\n            if (!file) return;\n            paired && (paired.value = input.value);\n            updateVideoTrimDraft(figure, file, video, true);\n          });\n        }),\n        qsa(\"[data-dsd-trim-apply]\", preview).forEach(function (button) {\n          button.addEventListener(\"click\", function () {\n            var figure = button.closest(\"[data-dsd-attachment-index]\"),\n              index = Number(figure && figure.getAttribute(\"data-dsd-attachment-index\")),\n              file = files[index],\n              video = figure && qs(\"video[data-dsd-local-video-thumbnail]\", figure);\n            file && applyVideoTrimDraft(figure, file, video);\n          });\n        }),\n        qsa(\"[data-dsd-trim-preview]\", preview).forEach(function (button) {\n          button.addEventListener(\"click\", function () {\n            var figure = button.closest(\"[data-dsd-attachment-index]\"),\n              index = Number(\n                figure && figure.getAttribute(\"data-dsd-attachment-index\"),\n              ),\n              file = files[index],\n              video =\n                figure &&\n                qs(\"video[data-dsd-local-video-thumbnail]\", figure);\n            file && previewVideoTrimSelection(figure, file, video);\n          });\n        }),\n        qsa(\"[data-dsd-trim-cancel]\", preview).forEach(function (button) {\n          button.addEventListener(\"click\", function () {\n            var figure = button.closest(\"[data-dsd-attachment-index]\"),\n              index = Number(figure && figure.getAttribute(\"data-dsd-attachment-index\")),\n              file = files[index],\n              video = figure && qs(\"video[data-dsd-local-video-thumbnail]\", figure);\n            file && resetVideoTrimDraft(figure, file, video);\n          });\n        }),\n        qsa(\"[data-dsd-attachment-remove]\", preview).forEach(function (button) {\n          button.addEventListener(\"click\", function () {\n            var index = Number(button.getAttribute(\"data-dsd-attachment-index\")),\n              entry = fileEntries[index];\n            if (!entry) return;\n            var selected = selectedInputFiles(entry.input);\n            selected.splice(entry.inputIndex, 1);\n            setSelectedInputFiles(entry.input, selected);\n            renderFilePreviews(form);\n          });\n        }),\n        qsa(\"[data-dsd-attachment-move]\", preview).forEach(function (button) {\n          button.addEventListener(\"click\", function () {\n            var index = Number(button.getAttribute(\"data-dsd-attachment-index\")),\n              direction = button.getAttribute(\"data-dsd-attachment-move\"),\n              targetIndex = direction === \"previous\" ? index - 1 : index + 1,\n              entry = fileEntries[index],\n              targetEntry = fileEntries[targetIndex];\n            if (!entry || !targetEntry || entry.input !== targetEntry.input) return;\n            var selected = selectedInputFiles(entry.input),\n              moved = selected[entry.inputIndex];\n            selected[entry.inputIndex] = selected[targetEntry.inputIndex];\n            selected[targetEntry.inputIndex] = moved;\n            setSelectedInputFiles(entry.input, selected);\n            renderFilePreviews(form);\n          });\n        }),\n        updateComposerMediaControls(form));\n    }\n  }\n  function updateVideoTrimDraft(figure, file, video, seekPreview) {\n    var duration = Number(file.dsdVideoDurationSeconds || (video && video.duration) || 0),\n      startInput = qs(\"[data-dsd-trim-start]\", figure),\n      endInput = qs(\"[data-dsd-trim-end]\", figure),\n      selectedLabel = qs(\"[data-dsd-trim-selected]\", figure),\n      status = qs(\"[data-dsd-trim-status]\", figure),\n      start = Math.max(0, Number((startInput || {}).value || 0)),\n      end = Math.min(duration || Number((endInput || {}).value || 0), Number((endInput || {}).value || 0)),\n      valid = duration > 0 && end > start && end <= duration;\n    selectedLabel && (selectedLabel.textContent = valid ? \"Selected: \" + (end - start).toFixed(1) + \" seconds\" : \"Choose a valid start and end\");\n    status && (status.textContent = valid ? \"Previewing selection. Choose Apply trim to save it.\" : \"Start must be before end and within the video length.\");\n    qs(\"[data-dsd-trim-apply]\", figure) && (qs(\"[data-dsd-trim-apply]\", figure).disabled = !valid);\n    if (valid && seekPreview && video) {\n      try {\n        var active = document.activeElement,\n          seekToEnd =\n            active &&\n            (active.hasAttribute(\"data-dsd-trim-end\") ||\n              active.hasAttribute(\"data-dsd-trim-end-range\"));\n        video.pause && video.pause();\n        video.currentTime = seekToEnd ? end : start;\n      } catch (error) {}\n    }\n    return valid ? { start: start, end: end } : null;\n  }\n  function previewVideoTrimSelection(figure, file, video) {\n    var trim = updateVideoTrimDraft(figure, file, video, false),\n      status = qs(\"[data-dsd-trim-status]\", figure);\n    if (!trim || !video) return;\n    if (video.dsdTrimPreviewListener)\n      video.removeEventListener(\"timeupdate\", video.dsdTrimPreviewListener);\n    video.dsdTrimPreviewListener = function () {\n      if (video.currentTime + 0.04 < trim.end) return;\n      video.pause();\n      video.currentTime = trim.end;\n      status && (status.textContent = \"Selection preview finished.\");\n      video.removeEventListener(\"timeupdate\", video.dsdTrimPreviewListener);\n      video.dsdTrimPreviewListener = null;\n    };\n    video.addEventListener(\"timeupdate\", video.dsdTrimPreviewListener);\n    try {\n      video.currentTime = trim.start;\n      status && (status.textContent = \"Playing the selected range.\");\n      video.play &&\n        video.play().catch(function () {\n          status &&\n            (status.textContent =\n              \"Tap play to preview the selected range.\");\n        });\n    } catch (error) {\n      status &&\n        (status.textContent = \"The selection preview could not start.\");\n    }\n  }\n  function applyVideoTrimDraft(figure, file, video) {\n    var trim = updateVideoTrimDraft(figure, file, video, false),\n      status = qs(\"[data-dsd-trim-status]\", figure);\n    if (!trim) return;\n    file.dsdTrimStartSeconds = trim.start;\n    file.dsdTrimEndSeconds = trim.end;\n    status && (status.textContent = \"Trim applied: \" + trim.start.toFixed(1) + \" to \" + trim.end.toFixed(1) + \" seconds.\");\n  }\n  function resetVideoTrimDraft(figure, file, video) {\n    var duration = Number(file.dsdVideoDurationSeconds || (video && video.duration) || 0),\n      start = Number(file.dsdTrimStartSeconds || 0),\n      end = Number(file.dsdTrimEndSeconds || duration);\n    [qs(\"[data-dsd-trim-start]\", figure), qs(\"[data-dsd-trim-start-range]\", figure)].forEach(function (control) {\n      control && (control.value = String(Number(start.toFixed(1))));\n    });\n    [qs(\"[data-dsd-trim-end]\", figure), qs(\"[data-dsd-trim-end-range]\", figure)].forEach(function (control) {\n      control && (control.value = String(Number(end.toFixed(1))));\n    });\n    updateVideoTrimDraft(figure, file, video, false);\n    var status = qs(\"[data-dsd-trim-status]\", figure);\n    status && (status.textContent = \"Trim changes canceled.\");\n  }\n  function removeFilePreviews(form) {\n    var preview = qs(\"[data-dsd-attachment-preview]\", form);\n    (revokeComposerPreviewObjectUrls(form),\n      preview && preview.remove(),\n      form &&\r\n        !collectFormFiles(form).length &&\r\n        (delete form.dataset.dsdMediaSelectionExpected,\r\n        delete form.dataset.dsdMediaSelectionPending,\r\n        form.removeAttribute(\"data-dsd-media-picker-active\")),\r\n      updateComposerMediaControls(form));\r\n  }\r\n  function clearFormAttachments(form, resetText) {\r\n    form &&\n      (qsa('input[type=\"file\"]', form).forEach(function (input) {\r\n        clearMediaInput(input);\r\n      }),\r\n      delete form.dataset.dsdMediaSelectionExpected,\r\n      removeFilePreviews(form),\r\n      updateComposerMediaControls(form),\r\n      resetText &&\r\n        qsa('textarea, input[type=\"text\"], input[type=\"url\"]', form).forEach(\r\n          function (input) {\r\n            input.value = \"\";\r\n          },\r\n        ));\r\n  }\r\n  function renderPublicGuard() {\r\n    var root = qs(\"[data-dsd-user-profile]\");\r\n    !root ||\r\n      hasCustomer() ||\r\n      routeProfileKey() ||\r\n      (root.innerHTML =\r\n        '<div class=\"dsd-launch-auth-required\" data-dsd-owner=\"ProfileRenderer\"><h1>Log in to view your profile</h1><p>Log in to manage your profile, posts, comments, messages, and stories.</p><a class=\"dsd-launch-action\" href=\"' +\r\n        loginReturnUrl() +\r\n        '\">Log in</a></div>');\r\n  }\r\n  function privateGateHTML(title, body) {\r\n    return (\r\n      '<section class=\"dsd-social-private-auth-gate\" data-dsd-owner=\"LaunchSocialActivation\"><h2>' +\r\n      html(title) +\r\n      \"</h2><p>\" +\r\n      html(body) +\r\n      '</p><a class=\"dsd-launch-action\" href=\"' +\r\n      loginReturnUrl() +\r\n      '\">Log in</a></section>'\r\n    );\r\n  }\r\n  function publicProfileByKey(key) {\n    key = String(key || \"\")\n      .trim()\n      .replace(/^@+/, \"\")\n      .toLowerCase();\n    if (!key) return null;\n    return (\n      state.publicProfiles\n        .filter(function (profile) {\n          return [\n            profile && profile.profileKey,\n            profile && profile.profile_key,\n            profile && profile.handle,\n          ].some(function (value) {\n            return normalizedProfileKeyValue(value) === key;\n          });\n        })\n        .sort(function (a, b) {\n          return publicProfileDedupeScore(b) - publicProfileDedupeScore(a);\n        })[0] || null\n    );\n  }\n  function profileUidForKey(key) {\r\n    var profile = publicProfileByKey(key);\r\n    return (\r\n      (profile &&\r\n        (profile.uid ||\r\n          profile.userId ||\r\n          profile.user_id ||\r\n          profile.firebaseUid ||\r\n          profile.firebase_uid)) ||\r\n      \"\"\r\n    );\r\n  }\r\n  function publicProfileByUid(targetUid) {\n    targetUid = String(targetUid || \"\").trim();\n    if (!targetUid) return null;\n    return (\n      state.publicProfiles.filter(function (profile) {\n        return (\r\n          String(\r\n            profile.uid ||\r\n              profile.userId ||\r\n              profile.user_id ||\r\n              profile.firebaseUid ||\r\n              profile.firebase_uid ||\r\n              \"\",\r\n          ).trim() === targetUid\r\n        );\r\n      })[0] || null\r\n    );\r\n  }\r\n  function publicProfileByIdentity(value) {\r\n    var raw = String(value || \"\").trim();\r\n    return publicProfileByUid(raw) || publicProfileByKey(raw);\r\n  }\r\n  function canonicalProfileKeyForIdentity(value) {\n    var raw = String(value || \"\").trim();\r\n    if (!raw) return \"\";\r\n    var profile = publicProfileByIdentity(raw);\r\n    return profile\r\n      ? clean(profile.profileKey || profile.handle || \"\", \"\").toLowerCase()\r\n      : identityMatchesCurrent(raw, \"\")\r\n        ? clean(profileKey(), \"\").toLowerCase()\r\n        : \"\";\n  }\n  function profileForRecordIdentity(record) {\n    record = record || {};\n    var storedKey = nonPlaceholderProfileKey(\n        record.authorProfileKey ||\n          record.ownerProfileKey ||\n          record.profileKey ||\n          \"\",\n      ),\n      storedUid =\n        record.authorUid ||\n        record.ownerUid ||\n        record.uid ||\n        record.userId ||\n        \"\",\n      keyedProfile = storedKey ? publicProfileByKey(storedKey) : null,\n      uidProfile = storedUid ? publicProfileByUid(storedUid) : null,\n      uidProfileKey =\n        uidProfile &&\n        nonPlaceholderProfileKey(\n          uidProfile.profileKey || uidProfile.handle || \"\",\n        ),\n      keyedProfileUid = String(\n        keyedProfile &&\n          (keyedProfile.uid || keyedProfile.userId || keyedProfile.user_id || \"\"),\n      ).trim();\n    if (storedKey && keyedProfile) {\n      if (\n        storedUid &&\n        uuidLike(storedUid) &&\n        keyedProfileUid &&\n        keyedProfileUid !== String(storedUid).trim()\n      )\n        return null;\n      return keyedProfile;\n    }\n    if (storedUid && uidProfile) {\n      if (\n        storedKey &&\n        uidProfileKey &&\n        normalizedProfileKeyValue(uidProfileKey) !==\n          normalizedProfileKeyValue(storedKey)\n      )\n        return null;\n      return uidProfile;\n    }\n    if (\n      storedUid &&\n      keyedProfileUid &&\n      keyedProfileUid !== String(storedUid).trim()\n    )\n      return null;\n    return !storedKey ||\n      !uidProfileKey ||\n      normalizedProfileKeyValue(uidProfileKey) ===\n        normalizedProfileKeyValue(storedKey)\n      ? uidProfile\n      : null;\n  }\n  function hydrateRecordIdentity(record) {\n    record = record || {};\n    var storedKey = nonPlaceholderProfileKey(\n        record.authorProfileKey ||\n          record.ownerProfileKey ||\n          record.profileKey ||\n          \"\",\n      ),\n      profile = profileForRecordIdentity(record);\n    if (!profile) return record;\n    var key = profile.profileKey || profile.handle || storedKey || \"\",\n      profileUid = profile.uid || profile.userId || profile.user_id || \"\",\n      name =\n        profile.displayName ||\n        record.authorDisplayName ||\n        record.ownerDisplayName ||\r\n        key ||\r\n        \"User\";\n    return Object.assign({}, record, {\n      authorUid: profileUid || record.authorUid || record.ownerUid || \"\",\n      ownerUid: profileUid || record.ownerUid || record.authorUid || \"\",\n      authorProfileKey: key,\n      ownerProfileKey: key,\n      authorDisplayName: name,\n      ownerDisplayName: name,\n      authorAvatarMediaId:\r\n        profile.avatarMediaId ||\r\n        profile.thumbnailMediaId ||\r\n        record.authorAvatarMediaId ||\r\n        \"\",\r\n      ownerAvatarMediaId:\n        profile.avatarMediaId ||\n        profile.thumbnailMediaId ||\n        record.ownerAvatarMediaId ||\n        \"\",\n      avatarFocusX:\n        profile.avatarFocusX !== void 0\n          ? profile.avatarFocusX\n          : profile.avatar_focus_x !== void 0\n            ? profile.avatar_focus_x\n            : record.avatarFocusX,\n      avatarFocusY:\n        profile.avatarFocusY !== void 0\n          ? profile.avatarFocusY\n          : profile.avatar_focus_y !== void 0\n            ? profile.avatar_focus_y\n            : record.avatarFocusY,\n      avatar_focus_x:\n        profile.avatar_focus_x !== void 0\n          ? profile.avatar_focus_x\n          : profile.avatarFocusX !== void 0\n            ? profile.avatarFocusX\n            : record.avatar_focus_x,\n      avatar_focus_y:\n        profile.avatar_focus_y !== void 0\n          ? profile.avatar_focus_y\n          : profile.avatarFocusY !== void 0\n            ? profile.avatarFocusY\n            : record.avatar_focus_y,\n    });\n  }\r\n  function bridgeGateHTML(title, body) {\r\n    var href = hasCustomer() ? \"/account\" : loginReturnUrl(),\r\n      label = hasCustomer() ? \"Account\" : \"Log in\";\r\n    return (\r\n      '<section class=\"dsd-social-private-auth-gate\" data-dsd-owner=\"LaunchSocialActivation\"><h2>' +\r\n      html(title) +\r\n      \"</h2><p data-dsd-activation-status>\" +\r\n      html(body) +\r\n      '</p><a class=\"dsd-launch-action\" href=\"' +\r\n      href +\r\n      '\">' +\r\n      label +\r\n      \"</a></section>\"\r\n    );\r\n  }\r\n  function ensureImmersiveOverlayStyles() {\r\n    if (!document.getElementById(\"dsd-immersive-overlay-style-p11dz684\")) {\r\n      var style = document.createElement(\"style\");\r\n      ((style.id = \"dsd-immersive-overlay-style-p11dz684\"),\r\n        (style.textContent = [\r\n          \"html.dsd-immersive-overlay-open,html.dsd-immersive-overlay-open body{overflow:hidden!important;overscroll-behavior:none}\",\r\n          \"html.dsd-immersive-overlay-open .dsd-overlay-root{padding:0!important;margin:0!important}\",\n          'html.dsd-immersive-overlay-open .dsd-compact-dock,html.dsd-immersive-overlay-open nav.dsd-compact-dock,html.dsd-immersive-overlay-open .dsd-dock,html.dsd-immersive-overlay-open [class*=\"dsd\"][class*=\"dock\"],html.dsd-immersive-overlay-open .dsd-floating-menu-toggle,html.dsd-immersive-overlay-open .dsd-floating-menu-layer,html.dsd-immersive-overlay-open [data-dsd-owner=\"CompactCommerceNavigation\"],html.dsd-immersive-overlay-open [data-dsd-dock-icon],html.dsd-immersive-overlay-open [data-dsd-floating-menu-toggle],html.dsd-immersive-overlay-open [data-dsd-menu-toggle],html.dsd-immersive-overlay-open [data-dsd-menu-layer],html.dsd-immersive-overlay-open [data-dsd-floating-menu-root],body:has([data-dsd-immersive-overlay]) .dsd-compact-dock,body:has([data-dsd-immersive-overlay]) nav.dsd-compact-dock,body:has([data-dsd-immersive-overlay]) .dsd-floating-menu-toggle,body:has([data-dsd-immersive-overlay]) .dsd-floating-menu-layer,body:has([data-dsd-immersive-overlay]) [data-dsd-owner=\"CompactCommerceNavigation\"],body:has([data-dsd-immersive-overlay]) [data-dsd-dock-icon],body:has([data-dsd-immersive-overlay]) [data-dsd-floating-menu-toggle],body:has([data-dsd-immersive-overlay]) [data-dsd-menu-toggle],body:has([data-dsd-immersive-overlay]) [data-dsd-menu-layer],body:has([data-dsd-immersive-overlay]) [data-dsd-floating-menu-root]{display:none!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;z-index:1!important}',\r\n          \"html.dsd-video-playing #dsd-starfield-root-p11dz90 *,html.dsd-video-playing #star-background *,html.dsd-video-playing [data-dsd-starfield] *{animation-play-state:paused!important}\",\r\n          \".dsd-immersive-overlay{position:fixed;inset:0;z-index:2147483647!important;display:grid;color:#fff;background:#000;box-sizing:border-box;overflow:hidden!important;touch-action:none}\",\r\n          \".dsd-immersive-overlay *{box-sizing:border-box;min-width:0}\",\r\n          \".dsd-immersive-overlay__stage,.dsd-immersive-overlay__panel,.dsd-immersive-overlay__story-frame,.dsd-immersive-overlay__story-canvas{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;filter:none!important;overflow:hidden!important}\",\r\n          \".dsd-immersive-overlay__top{position:fixed!important;left:0!important;right:0!important;top:0!important;bottom:auto!important;z-index:2147483647!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;justify-content:stretch!important;gap:8px!important;padding:calc(18px + env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 38px max(10px,env(safe-area-inset-left))!important;background:linear-gradient(180deg,rgba(0,0,0,.50),rgba(0,0,0,.16) 58%,rgba(0,0,0,0))!important;pointer-events:none!important}\",\r\n          \".dsd-immersive-overlay__context{display:flex;align-items:center;gap:8px;max-width:min(520px,calc(100vw - 92px));min-width:0;pointer-events:auto!important;position:relative!important;z-index:2147483647!important;padding:5px 8px;border-radius:999px;background:rgba(0,0,0,.24);box-shadow:none}\",\r\n          \".dsd-immersive-overlay__profile-link{display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;color:inherit!important;text-decoration:none!important;pointer-events:auto!important}.dsd-immersive-overlay__identity-copy{display:block!important;min-width:0!important}\",\r\n          \".dsd-immersive-overlay__avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;overflow:hidden;flex:0 0 auto;background:linear-gradient(135deg,#f2c96f,#7045ff);color:#120817;font-weight:950;box-shadow:0 0 0 1px rgba(255,255,255,.72)}\",\r\n          \".dsd-immersive-overlay__avatar img{width:100%;height:100%;object-fit:cover}\",\r\n          \".dsd-immersive-overlay__context strong,.dsd-immersive-overlay__context span,.dsd-immersive-overlay__context small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 5px rgba(0,0,0,.42)}\",\r\n          \".dsd-immersive-overlay__context span{color:rgba(255,255,255,.72);font-size:12px;font-weight:800}\",\r\n          \".dsd-immersive-overlay__context small{color:rgba(255,255,255,.76);font-size:11px;font-weight:850}\",\r\n          \".dsd-immersive-overlay__context [data-dsd-story-expires]~[data-dsd-story-expires]{display:none!important}\",\r\n          \".dsd-immersive-overlay [data-dsd-story-expires]:not([data-dsd-story-context-expires]){display:none!important}\",\r\n          \".dsd-immersive-overlay button,.dsd-immersive-overlay__close,.dsd-immersive-overlay__nav{display:none!important}\",\r\n          \".dsd-immersive-overlay [data-dsd-immersive-close]{display:none!important;position:relative!important;right:auto!important;top:auto!important;z-index:2147483647!important;width:38px!important;height:38px!important;border:1px solid rgba(255,255,255,.22)!important;border-radius:50%!important;background:rgba(0,0,0,.38)!important;color:#fff!important;font-size:22px!important;line-height:1!important;place-items:center!important;pointer-events:auto!important}\",\n          '.dsd-immersive-overlay[data-dsd-immersive-mode=\"post-media\"] [data-dsd-immersive-close]{display:grid!important}',\n          \"@media(min-width:900px){.dsd-immersive-overlay [data-dsd-immersive-close]{display:grid!important}}\",\n          '@media(prefers-reduced-motion:reduce){.dsd-immersive-overlay,.dsd-immersive-overlay *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}',\n          \".dsd-immersive-overlay__story-frame{display:block!important;user-select:none;-webkit-user-select:none;background:#000!important}\",\r\n          \".dsd-immersive-overlay__story-progress{position:fixed;z-index:2147483647;top:calc(6px + env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px}\",\r\n          \".dsd-immersive-overlay__story-progress span{height:3px;border-radius:999px;background:rgba(255,255,255,.34)}\",\r\n          \".dsd-immersive-overlay__story-progress span.is-active{background:#fff}\",\r\n          \".dsd-immersive-overlay__post-frame,.dsd-immersive-overlay__post-canvas{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#000!important;box-shadow:none!important;filter:none!important;overflow:hidden!important}\",\r\n          \".dsd-immersive-overlay__post-progress{position:fixed;z-index:2147483647;top:calc(6px + env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px}\",\r\n          \".dsd-immersive-overlay__post-progress span{height:3px;border-radius:999px;background:rgba(255,255,255,.30)}\",\r\n          \".dsd-immersive-overlay__post-progress span.is-active{background:#fff}\",\r\n          \".dsd-immersive-overlay__post-canvas .dsd-launch-media-chip,.dsd-immersive-overlay__post-canvas .dsd-media-frame{position:absolute!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;filter:none!important;display:grid!important;place-items:center!important;z-index:3!important}\",\r\n          \".dsd-immersive-overlay__post-caption{position:fixed!important;left:max(14px,env(safe-area-inset-left))!important;right:max(14px,env(safe-area-inset-right))!important;bottom:calc(20px + env(safe-area-inset-bottom))!important;z-index:2147483647!important;max-width:min(720px,calc(100vw - 28px))!important;margin-inline:auto!important;padding:8px 11px!important;border:1px solid rgba(255,255,255,.14)!important;border-radius:14px!important;background:rgba(0,0,0,.34)!important;color:#fff!important;text-shadow:0 1px 8px rgba(0,0,0,.72)!important;pointer-events:auto!important}\",\r\n          \".dsd-immersive-overlay .dsd-story385__canvas,.dsd-immersive-overlay .dsd-story385__canvas-media,.dsd-immersive-overlay .dsd-story385__canvas-media .dsd-launch-media-chip,.dsd-immersive-overlay .dsd-media-frame--story-fullscreen{position:absolute!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;filter:none!important;outline:0!important;display:grid!important;place-items:center!important;z-index:3!important}\",\r\n          \".dsd-immersive-overlay .dsd-launch-media-chip,.dsd-immersive-overlay .dsd-media-frame,.dsd-immersive-overlay figure,.dsd-immersive-overlay picture{margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;filter:none!important;outline:0!important;overflow:hidden!important}\",\r\n          \".dsd-immersive-overlay .dsd-story385__canvas-media img,.dsd-immersive-overlay .dsd-story385__canvas-media video,.dsd-immersive-overlay .dsd-media-frame--story-fullscreen .dsd-media-element{width:100vw!important;height:100vh!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;object-fit:contain!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;filter:none!important}\",\r\n          \".dsd-immersive-overlay .dsd-modal,.dsd-immersive-overlay [data-dsd-modal],.dsd-immersive-overlay .dsd-modal-body,.dsd-immersive-overlay .dsd-up315__modal,.dsd-immersive-overlay .dsd-up315__modal-card,.dsd-immersive-overlay .dsd-up315__modal-panel{position:static!important;inset:auto!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;overflow:visible!important}\",\r\n          \".dsd-immersive-overlay,.dsd-immersive-overlay *{user-select:none!important;-webkit-user-select:none!important;-webkit-user-drag:none!important}\",\r\n          \".dsd-immersive-overlay,.dsd-immersive-overlay__stage,.dsd-immersive-overlay__panel,.dsd-immersive-overlay__story-frame,.dsd-immersive-overlay .dsd-story385__canvas{z-index:2147483647!important;box-shadow:none!important;text-shadow:none;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}\",\r\n          \".dsd-immersive-overlay .dsd-story385__caption{position:fixed!important;left:max(14px,env(safe-area-inset-left))!important;right:max(14px,env(safe-area-inset-right))!important;bottom:calc(128px + env(safe-area-inset-bottom))!important;z-index:2147483646!important;margin:0 auto!important;max-width:min(680px,calc(100vw - 28px))!important;color:#fff!important;background:rgba(0,0,0,.52)!important;border-radius:14px!important;padding:9px 12px!important;box-shadow:0 14px 30px rgba(0,0,0,.24)!important;text-align:center;text-shadow:0 1px 8px rgba(0,0,0,.72)!important;font-weight:850}\",\r\n          \".dsd-immersive-overlay__message{position:fixed!important;left:max(14px,env(safe-area-inset-left))!important;right:max(14px,env(safe-area-inset-right))!important;bottom:calc(16px + env(safe-area-inset-bottom))!important;z-index:2147483647!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;align-items:end!important;max-width:min(680px,calc(100vw - 28px))!important;margin-inline:auto!important;padding:8px!important;border:1px solid rgba(255,255,255,.18)!important;border-radius:18px!important;background:rgba(0,0,0,.42)!important;box-shadow:0 18px 44px rgba(0,0,0,.26)!important;pointer-events:auto!important}.dsd-immersive-overlay__message textarea{width:100%!important;min-height:42px!important;max-height:108px!important;resize:none!important;border:1px solid rgba(255,255,255,.16)!important;border-radius:14px!important;background:rgba(255,255,255,.10)!important;color:#fff!important;padding:10px 12px!important}.dsd-immersive-overlay__message button,.dsd-immersive-overlay__message a{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:42px!important;border-radius:14px!important;border:1px solid rgba(255,255,255,.18)!important;background:#f2c96f!important;color:#160d22!important;font-weight:900!important;padding:0 14px!important;text-decoration:none!important}.dsd-immersive-overlay__message span{color:rgba(255,255,255,.84)!important;font-size:13px!important}.dsd-immersive-overlay__message small{grid-column:1/-1!important;color:rgba(255,255,255,.72)!important}\",\r\n          \".dsd-immersive-overlay .dsd-story385__canvas>small,.dsd-immersive-overlay .dsd-story385__canvas [data-dsd-story-expires],.dsd-immersive-overlay .dsd-story385__expires,.dsd-immersive-overlay [data-dsd-story-expiry-duplicate],.dsd-immersive-overlay [data-dsd-story-time-left]{display:none!important}\",\r\n          \".dsd-immersive-overlay__swipe-hint,[data-dsd-story-tap-zone]{display:none!important}\",\r\n          \".dsd-immersive-overlay__controls{justify-self:end;display:grid!important;grid-auto-flow:column!important;grid-auto-columns:max-content!important;align-items:start!important;gap:8px!important;pointer-events:auto!important;position:relative!important;z-index:2147483647!important}.dsd-immersive-overlay [data-dsd-story-top-controls]{display:block!important;width:38px!important;min-width:38px!important;height:38px!important}.dsd-immersive-overlay .dsd-story385__actions,[data-dsd-immersive-overlay] .dsd-story385__actions{position:relative!important;right:auto!important;top:auto!important;z-index:2147483647!important;display:block!important;width:38px!important;min-width:38px!important;max-width:min(240px,calc(100vw - 28px))!important;pointer-events:auto!important}.dsd-immersive-overlay .dsd-story385__actions summary,[data-dsd-immersive-overlay] .dsd-story385__actions summary{position:relative!important;display:grid!important;place-items:center!important;width:38px!important;height:38px!important;border-radius:50%!important;border:1px solid rgba(255,255,255,.22)!important;background:rgba(0,0,0,.48)!important;color:#fff!important;font-size:17px!important;font-weight:950!important;letter-spacing:1px!important;list-style:none!important;cursor:pointer!important;backdrop-filter:blur(10px)!important;-webkit-backdrop-filter:blur(10px)!important}.dsd-immersive-overlay .dsd-story385__actions summary::-webkit-details-marker{display:none!important}.dsd-immersive-overlay .dsd-story385__actions-menu,[data-dsd-immersive-overlay] .dsd-story385__actions-menu{position:absolute!important;right:0!important;top:calc(100% + 8px)!important;display:grid!important;gap:6px!important;width:max-content!important;min-width:150px!important;padding:8px!important;border:1px solid rgba(255,255,255,.16)!important;border-radius:14px!important;background:rgba(0,0,0,.72)!important;box-shadow:0 18px 42px rgba(0,0,0,.34)!important}.dsd-immersive-overlay .dsd-story385__actions:not([open]) .dsd-story385__actions-menu{display:none!important}\",\r\n          \".dsd-immersive-overlay .dsd-story385__actions,.dsd-immersive-overlay .dsd-story385__actions summary,.dsd-immersive-overlay .dsd-story385__actions-menu,.dsd-immersive-overlay .dsd-story385__actions button,[data-dsd-immersive-overlay] .dsd-story385__actions,[data-dsd-immersive-overlay] .dsd-story385__actions summary,[data-dsd-immersive-overlay] .dsd-story385__actions-menu,[data-dsd-immersive-overlay] .dsd-story385__actions button{position:relative!important;z-index:2147483647!important;pointer-events:auto!important}.dsd-immersive-overlay .dsd-story385__canvas-media,[data-dsd-immersive-overlay] .dsd-story385__canvas-media,.dsd-immersive-overlay .dsd-story385__canvas-media *,[data-dsd-immersive-overlay] .dsd-story385__canvas-media *{z-index:3!important;pointer-events:none!important}.dsd-immersive-overlay .dsd-story385__actions{isolation:isolate!important}\",\r\n          \".dsd-immersive-overlay .dsd-story385__actions button,[data-dsd-immersive-overlay] .dsd-story385__actions button{display:flex!important;width:100%!important;align-items:center!important;justify-content:flex-start!important;min-height:34px!important;border-radius:10px!important;border:1px solid rgba(255,255,255,.14)!important;background:rgba(255,255,255,.08)!important;color:#fff!important;padding:8px 10px!important;font-size:12px!important;line-height:1!important;visibility:visible!important;pointer-events:auto!important}\",\r\n          \".dsd-story-audience-ribbon{position:fixed!important;z-index:2147483647!important;top:calc(82px + env(safe-area-inset-top))!important;left:max(12px,env(safe-area-inset-left))!important;display:inline-flex!important;align-items:center!important;gap:7px!important;max-width:min(260px,calc(100vw - 24px))!important;min-height:38px!important;padding:5px 10px!important;border:1px solid rgba(242,201,111,.36)!important;border-radius:999px!important;background:rgba(0,0,0,.48)!important;color:#fff!important;box-shadow:0 8px 24px rgba(0,0,0,.24)!important;pointer-events:auto!important}.dsd-story-audience-ribbon__avatars{display:flex!important;align-items:center!important;padding-left:4px!important}.dsd-story-audience-ribbon__avatar{display:grid!important;place-items:center!important;width:26px!important;height:26px!important;margin-left:-5px!important;border:2px solid #120f18!important;border-radius:50%!important;overflow:hidden!important;background:#332544!important;color:#fff8da!important;font:900 9px/1 system-ui!important}.dsd-story-audience-ribbon__avatar img{width:100%!important;height:100%!important;object-fit:cover!important}.dsd-story-audience-ribbon__copy{display:grid!important;gap:1px!important;text-align:left!important}.dsd-story-audience-ribbon__copy strong{font-size:11px!important;line-height:1.1!important}.dsd-story-audience-ribbon__copy small{font-size:9px!important;line-height:1.1!important;color:rgba(255,255,255,.72)!important}.dsd-story-audience-sheet{position:fixed!important;z-index:2147483647!important;left:50%!important;bottom:0!important;transform:translateX(-50%)!important;width:min(560px,100vw)!important;max-height:min(72dvh,620px)!important;display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;border:1px solid rgba(242,201,111,.28)!important;border-bottom:0!important;border-radius:18px 18px 0 0!important;background:rgba(5,5,10,.98)!important;color:#fff!important;box-shadow:0 -18px 50px rgba(0,0,0,.48)!important;pointer-events:auto!important;overflow:hidden!important}.dsd-story-audience-sheet[hidden]{display:none!important}.dsd-story-audience-sheet__header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:14px 16px!important;border-bottom:1px solid rgba(255,255,255,.10)!important}.dsd-story-audience-sheet__header div{display:grid!important;gap:2px!important}.dsd-story-audience-sheet__header strong{font-size:16px!important}.dsd-story-audience-sheet__header small{font-size:11px!important;color:rgba(255,255,255,.68)!important}.dsd-story-audience-sheet__close{display:grid!important;place-items:center!important;width:40px!important;height:40px!important;min-width:40px!important;padding:0!important;border:1px solid rgba(255,255,255,.16)!important;border-radius:50%!important;background:rgba(255,255,255,.08)!important;color:#fff!important;font-size:22px!important}.dsd-story-audience-sheet__list{display:grid!important;align-content:start!important;gap:4px!important;min-height:0!important;overflow-y:auto!important;padding:8px 12px calc(14px + env(safe-area-inset-bottom))!important}.dsd-story-audience-sheet__row{display:grid!important;grid-template-columns:42px minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;min-height:52px!important;padding:6px!important;border-radius:10px!important;background:rgba(255,255,255,.045)!important}.dsd-story-audience-sheet__avatar{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border-radius:50%!important;overflow:hidden!important;background:#322642!important;color:#fff8da!important;font-weight:900!important}.dsd-story-audience-sheet__avatar img{width:100%!important;height:100%!important;object-fit:cover!important}.dsd-story-audience-sheet__identity{display:grid!important;gap:1px!important;min-width:0!important}.dsd-story-audience-sheet__identity strong,.dsd-story-audience-sheet__identity span{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.dsd-story-audience-sheet__identity span,.dsd-story-audience-sheet__row time{font-size:11px!important;color:rgba(255,255,255,.66)!important}.dsd-story-audience-sheet__public{border:1px dashed rgba(242,201,111,.28)!important}.dsd-story-audience-sheet__more{margin:8px 12px calc(10px + env(safe-area-inset-bottom))!important;min-height:42px!important;border:1px solid rgba(242,201,111,.30)!important;border-radius:12px!important;background:rgba(242,201,111,.12)!important;color:#fff8da!important;font-weight:900!important}.dsd-story385__actions-menu [data-dsd-story-watch-open]{display:flex!important;width:100%!important;justify-content:flex-start!important}\",\n          \".dsd-story-audience-ribbon__avatar,.dsd-story-audience-sheet__avatar{aspect-ratio:1/1!important;flex:0 0 auto!important;box-sizing:border-box!important}.dsd-story-audience-sheet{height:min(72dvh,620px)!important;overscroll-behavior:contain!important}.dsd-story-audience-sheet__header{position:relative!important;z-index:2!important;flex:0 0 auto!important;background:rgba(5,5,10,.99)!important}.dsd-story-audience-sheet__list{overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}.dsd-story-audience-sheet__row>*{min-width:0!important}@media(max-width:430px){.dsd-story-audience-sheet{height:min(76dvh,640px)!important}.dsd-story-audience-sheet__row{grid-template-columns:40px minmax(0,1fr) auto!important}.dsd-story-audience-sheet__avatar{width:40px!important;height:40px!important}}\",\n          \".dsd-immersive-overlay .dsd-story-audience-ribbon{display:inline-flex!important}.dsd-immersive-overlay .dsd-story-audience-sheet button{display:grid!important;pointer-events:auto!important}\",\n          \".dsd-story-audience-ribbon__avatar,.dsd-story-audience-sheet__avatar{aspect-ratio:1/1!important;flex:0 0 auto!important;box-sizing:border-box!important;border-radius:999px!important;overflow:hidden!important}.dsd-story-audience-ribbon__avatar img,.dsd-story-audience-sheet__avatar img{display:block!important;width:100%!important;height:100%!important;min-width:100%!important;min-height:100%!important;max-width:100%!important;max-height:100%!important;border-radius:999px!important;object-fit:cover!important}.dsd-immersive-overlay.is-story-audience-open{touch-action:pan-y!important}.dsd-story-audience-sheet{display:flex!important;flex-direction:column!important;height:min(72dvh,620px)!important;min-height:0!important;overscroll-behavior:contain!important;isolation:isolate!important}.dsd-story-audience-sheet__header{position:relative!important;z-index:3!important;flex:0 0 auto!important;width:100%!important;background:rgba(5,5,10,.99)!important}.dsd-story-audience-sheet__list{position:relative!important;z-index:1!important;flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important;scrollbar-gutter:stable!important}.dsd-story-audience-sheet__more{position:relative!important;z-index:2!important;flex:0 0 auto!important}.dsd-story-audience-sheet__row>*{min-width:0!important}@media(max-width:430px){.dsd-story-audience-sheet{height:min(76dvh,640px)!important}.dsd-story-audience-sheet__row{grid-template-columns:40px minmax(0,1fr) auto!important}.dsd-story-audience-sheet__avatar{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;max-width:40px!important;max-height:40px!important}}\",\n          \".dsd-immersive-overlay__stage:before,.dsd-immersive-overlay__stage:after,.dsd-immersive-overlay__panel:before,.dsd-immersive-overlay__panel:after,.dsd-immersive-overlay__story-frame:before,.dsd-immersive-overlay__story-frame:after,.dsd-immersive-overlay .dsd-story385__canvas:before,.dsd-immersive-overlay .dsd-story385__canvas:after,.dsd-immersive-overlay .dsd-story385__canvas-media:before,.dsd-immersive-overlay .dsd-story385__canvas-media:after,.dsd-immersive-overlay .dsd-launch-media-chip:before,.dsd-immersive-overlay .dsd-launch-media-chip:after,.dsd-immersive-overlay .dsd-media-frame--story-fullscreen:before,.dsd-immersive-overlay .dsd-media-frame--story-fullscreen:after,.dsd-immersive-overlay .dsd-media-frame--story-fullscreen.is-loading:before,.dsd-immersive-overlay .dsd-media-frame--story-fullscreen.is-loading:after{content:none!important;display:none!important;background:none!important;box-shadow:none!important;filter:none!important}\",\r\n          '.dsd-immersive-overlay[data-dsd-swipe-close-active=\"true\"] .dsd-immersive-overlay__stage{transition:transform .16s ease;transform:translate3d(0,var(--dsd-story-swipe-y,0px),0)}',\r\n          \".dsd-immersive-overlay .dsd-story385__link-preview{position:fixed;left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));bottom:calc(160px + env(safe-area-inset-bottom));z-index:12;display:grid;gap:3px;max-width:540px;margin-inline:auto;padding:10px 12px;border:1px solid rgba(255,255,255,.18);border-radius:14px;background:rgba(0,0,0,.34);color:#fff;text-decoration:none;box-shadow:none!important}\",\r\n          \".dsd-immersive-overlay .dsd-story385__link-preview span{font-size:12px;color:rgba(255,255,255,.72);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\",\r\n          \".dsd-immersive-overlay__bottom{position:fixed!important;left:max(14px,env(safe-area-inset-left))!important;right:max(14px,env(safe-area-inset-right))!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;z-index:2147483647!important;display:grid!important;gap:8px!important;max-width:min(680px,calc(100vw - 28px))!important;margin-inline:auto!important;pointer-events:none!important}.dsd-immersive-overlay__bottom>*{pointer-events:auto!important}.dsd-immersive-overlay__bottom .dsd-story385__caption,.dsd-immersive-overlay__bottom .dsd-story385__link-preview,.dsd-immersive-overlay__bottom .dsd-immersive-overlay__message{position:static!important;left:auto!important;right:auto!important;bottom:auto!important;margin:0!important;width:100%!important;max-width:100%!important}.dsd-immersive-overlay__bottom .dsd-story385__caption{background:rgba(0,0,0,.42)!important;border:1px solid rgba(255,255,255,.10)!important}.dsd-immersive-overlay__bottom .dsd-story385__link-preview{background:rgba(0,0,0,.36)!important}.dsd-immersive-overlay__bottom .dsd-immersive-overlay__message{background:rgba(0,0,0,.36)!important}.dsd-immersive-overlay__bottom .dsd-immersive-overlay__context,.dsd-immersive-overlay__bottom .dsd-story385__poster,.dsd-immersive-overlay__bottom [data-dsd-story-identity],.dsd-immersive-overlay__bottom [data-dsd-story-actions-panel]{display:none!important;visibility:hidden!important;pointer-events:none!important}.dsd-immersive-overlay [data-dsd-story-control-row] [data-dsd-immersive-close]{width:38px!important;height:38px!important;min-width:38px!important;max-width:38px!important;min-height:38px!important;padding:0!important;position:relative!important;flex:0 0 38px!important}\",\r\n          \".dsd-immersive-overlay [data-dsd-story385-status]{display:grid;place-items:center;min-height:100vh;padding:24px;text-align:center}\",\r\n          '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"],.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] *{border-radius:0!important;box-shadow:none!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}',\r\n          '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__caption{border-radius:12px!important;box-shadow:none!important;background:rgba(0,0,0,.48)!important;text-shadow:0 1px 8px rgba(0,0,0,.76)!important}',\r\n          '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__context,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__link-preview,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__message,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions summary,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions-menu,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions button{border-radius:14px!important;box-shadow:none!important}',\r\n          '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__avatar{border-radius:50%!important}',\r\n          '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-modal,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] [class*=\"modal\"],.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] [class*=\"viewer\"],.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] [class*=\"card\"]{background:transparent!important;border-color:transparent!important;box-shadow:none!important;outline:0!important}',\r\n          '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] img,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] video{object-fit:contain!important;border-radius:0!important;background:transparent!important}',\n          '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story-audience-sheet{top:max(156px,24dvh)!important;right:auto!important;bottom:0!important;left:50%!important;width:min(560px,100vw)!important;height:auto!important;max-height:none!important;display:grid!important;grid-template-rows:max-content minmax(0,1fr) max-content!important;align-items:stretch!important;align-content:stretch!important;justify-items:stretch!important;justify-content:stretch!important;padding:0!important;transform:translateX(-50%)!important;overflow:hidden!important;overscroll-behavior:contain!important;border:1px solid rgba(242,201,111,.28)!important;border-bottom:0!important;border-radius:18px 18px 0 0!important;background:rgba(5,5,10,.98)!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story-audience-sheet__header{position:relative!important;inset:auto!important;z-index:2!important;flex:none!important;align-self:stretch!important;width:100%!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story-audience-sheet__list{position:relative!important;inset:auto!important;z-index:1!important;align-self:stretch!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-x:hidden!important;overflow-y:auto!important;touch-action:pan-y!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;scroll-padding-top:8px!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story-audience-ribbon__avatar,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story-audience-sheet__avatar,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story-audience-ribbon__avatar img,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story-audience-sheet__avatar img{aspect-ratio:1/1!important;border-radius:50%!important;overflow:hidden!important;object-fit:cover!important}.dsd-media-loading-state{font-size:0!important}.dsd-media-loading-state>span[aria-hidden=\"true\"]{display:block!important}',\n        ].join(\"\")),\n        (style.textContent +=\n          '.dsd-composer-media-button{position:relative!important;overflow:hidden!important}.dsd-composer-media-button input[type=\"file\"]{position:absolute!important;inline-size:1px!important;block-size:1px!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;pointer-events:none!important}.dsd-composer-media-button.is-disabled,.dsd-composer-media-button[aria-disabled=\"true\"]{opacity:.46!important;filter:saturate(.65)!important;cursor:not-allowed!important}.dsd-composer-media-button.is-disabled svg,.dsd-composer-media-button[aria-disabled=\"true\"] svg{opacity:.72!important}.dsd-composer-media-policy-status{display:block!important;box-sizing:border-box!important;max-width:100%!important;margin:2px 0 0!important;color:rgba(255,248,231,.68)!important;font:800 11px/1.25 system-ui,-apple-system,\"Segoe UI\",sans-serif!important;letter-spacing:0!important;overflow-wrap:anywhere!important}.dsd-composer-media-actions+.dsd-composer-media-policy-status{flex-basis:100%!important;width:100%!important;max-width:100%!important}'),\n        (style.textContent +=\r\n          'html.dsd-post-drawer-open footer,html.dsd-post-drawer-open main#MainContent~.shopify-section,html.dsd-post-drawer-open main#MainContent~[id^=\"shopify-section\"],html.dsd-post-drawer-open .shopify-section-footer,html.dsd-post-drawer-open [id*=\"shopify-section-footer\"],html.dsd-post-drawer-open .newsletter,html.dsd-post-drawer-open [class*=\"newsletter\"]{display:none!important;visibility:hidden!important;pointer-events:none!important}html.dsd-post-drawer-open .dsd-post-drawer{position:fixed!important;inset:0!important;display:grid!important;place-items:stretch!important;overflow:hidden!important}html.dsd-post-drawer-open .dsd-post-drawer__panel,html.dsd-post-drawer-open body.dsd-social-page .dsd-post-drawer__panel{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;border:0!important;background:rgba(0,0,0,.62)!important;box-shadow:none!important}html.dsd-post-drawer-open .dsd-post-drawer__body{max-height:none!important;min-height:0!important;overflow-y:auto!important}.dsd-composer-media-policy-status[data-dsd-media-policy-compact=\"sr-only\"]{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;background:transparent!important}'),\n        (style.textContent +=\r\n          'html.dsd-social-route body.dsd-social-page>footer,html.dsd-social-route body.dsd-social-page .shopify-section-footer,html.dsd-social-route body.dsd-social-page [id*=\"shopify-section-footer\"],html.dsd-social-route body.dsd-social-page main#MainContent~footer,html.dsd-social-route body.dsd-social-page main#MainContent~.shopify-section,html.dsd-social-route body.dsd-social-page main#MainContent~[id^=\"shopify-section\"],html.dsd-social-route body.dsd-social-page .newsletter,html.dsd-social-route body.dsd-social-page [class*=\"newsletter\"]{display:none!important;visibility:hidden!important;pointer-events:none!important}'),\r\n        (style.textContent +=\r\n          '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"]{background:#000!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__top{min-height:42px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;justify-content:stretch!important;gap:8px!important;padding:calc(18px + env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 28px max(10px,env(safe-area-inset-left))!important;background:linear-gradient(180deg,rgba(0,0,0,.42),rgba(0,0,0,.10) 66%,rgba(0,0,0,0))!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__context{max-width:min(420px,calc(100vw - 86px))!important;padding:4px 7px!important;gap:7px!important;background:rgba(0,0,0,.18)!important;border:1px solid rgba(255,255,255,.10)!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__avatar{width:30px!important;height:30px!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__context strong{font-size:13px!important;line-height:1.1!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__context span,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__context small{display:inline!important;font-size:10.5px!important;line-height:1.15!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__context span:after{content:\" \\\\00b7 \";color:rgba(255,255,255,.56)}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__caption{bottom:calc(104px + env(safe-area-inset-bottom))!important;background:rgba(0,0,0,.34)!important;border:1px solid rgba(255,255,255,.10)!important;padding:7px 10px!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__message{bottom:calc(10px + env(safe-area-inset-bottom))!important;background:rgba(0,0,0,.34)!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__canvas-media,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-media-frame--story-fullscreen{background:transparent!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__canvas [data-dsd-story-identity],.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__canvas [data-dsd-story-actions-panel],.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__canvas .dsd-story385__poster{display:none!important;visibility:hidden!important;pointer-events:none!important}@media(max-width:899px){.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] [data-dsd-immersive-close]{display:none!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__caption{bottom:calc(94px + env(safe-area-inset-bottom))!important}}@media(hover:none) and (pointer:coarse){.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] [data-dsd-immersive-close],.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] [data-dsd-story-desktop-helper],.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__desktop-helper{display:none!important;visibility:hidden!important;pointer-events:none!important}}'),\r\n        document.head.appendChild(style));\r\n    }\r\n  }\r\n  function ensureSocialMediaSaveDeterrence() {\r\n    if (!document.getElementById(\"dsd-social-media-save-deterrence-p11dz686\")) {\r\n      var style = document.createElement(\"style\");\r\n      ((style.id = \"dsd-social-media-save-deterrence-p11dz686\"),\r\n        (style.textContent =\r\n          '.dsd-post-card img,.dsd-post-card video,.dsd-launch-comment-media img,.dsd-launch-comment-media video,.dsd-story385 img,.dsd-story385 video,.dsd-immersive-overlay img,.dsd-immersive-overlay video,.dsd-msg384__media img,.dsd-msg384__media video,.dsd-users311__card img,[data-dsd-user-profile] img{-webkit-touch-callout:none!important;-webkit-user-select:none!important;user-select:none!important;-webkit-user-drag:none!important}'+\r\n          '.dsd-post-audience-badge{position:relative!important;cursor:help!important}.dsd-post-card.dsd-post-tooltip-open{overflow:visible!important;z-index:2147482999!important}.dsd-post-audience-tooltip{position:absolute!important;z-index:2147483000!important;right:0!important;top:calc(100% + 7px)!important;width:min(260px,calc(100vw - 28px))!important;padding:8px 10px!important;border:1px solid rgba(240,196,108,.34)!important;border-radius:8px!important;background:rgba(4,6,12,.97)!important;color:#fff!important;font:800 11px/1.35 system-ui,-apple-system,\"Segoe UI\",sans-serif!important;text-align:left!important;white-space:normal!important;box-shadow:0 12px 28px rgba(0,0,0,.36)!important}.dsd-post-audience-tooltip[hidden]{display:none!important}'),\r\n        document.head.appendChild(style));\r\n    }\r\n    if (document.documentElement.dataset.dsdMediaSaveDeterrenceBound === \"true\")\r\n      return;\r\n    document.documentElement.dataset.dsdMediaSaveDeterrenceBound = \"true\";\r\n    function protectedMedia(target) {\r\n      return target && target.closest && target.closest(\r\n        \".dsd-post-card img,.dsd-post-card video,.dsd-launch-comment-media img,.dsd-launch-comment-media video,.dsd-story385 img,.dsd-story385 video,.dsd-immersive-overlay img,.dsd-immersive-overlay video,.dsd-msg384__media img,.dsd-msg384__media video,.dsd-users311__card img,[data-dsd-user-profile] img\",\r\n      );\r\n    }\r\n    document.addEventListener(\r\n      \"contextmenu\",\r\n      function (event) {\r\n        protectedMedia(event.target) && event.preventDefault();\r\n      },\r\n      !0,\r\n    );\r\n    document.addEventListener(\r\n      \"dragstart\",\r\n      function (event) {\r\n        protectedMedia(event.target) && event.preventDefault();\r\n      },\r\n      !0,\r\n    );\r\n  }\r\n  function immersiveReturnScroll() {\r\n    var existing = qs(\"[data-dsd-immersive-overlay]\");\r\n    return Number(\r\n      (existing && existing.getAttribute(\"data-dsd-return-scroll\")) ||\r\n        window.scrollY ||\r\n        window.pageYOffset ||\r\n        0,\r\n    );\r\n  }\r\n  var immersivePreviousFocus = null;\r\n  function focusImmersiveOverlay(overlay) {\r\n    try {\r\n      var closeButton = overlay && qs(\"[data-dsd-immersive-close]\", overlay);\r\n      (closeButton || overlay).focus({ preventScroll: !0 });\r\n    } catch (e) {}\r\n  }\r\n  function closeImmersiveOverlay() {\r\n    var y = immersiveReturnScroll(),\r\n      previousFocus = immersivePreviousFocus;\r\n    if (\r\n      ((immersivePreviousFocus = null),\r\n      qsa(\"[data-dsd-immersive-overlay]\").forEach(function (node) {\r\n        if (\r\n          node._dsdGestureAbort &&\r\n          typeof node._dsdGestureAbort.abort == \"function\"\r\n        )\r\n          try {\r\n            node._dsdGestureAbort.abort();\r\n          } catch (e) {}\r\n        node.remove();\r\n      }),\r\n      document.documentElement.classList.remove(\"dsd-immersive-overlay-open\"),\n      (state.storyPauseTokens = {}),\n      (state.storyPausedVideoWasPlaying = !1),\n      (state.activePostMediaRecord = null),\r\n      scheduleGlobalOverlayStateSync(),\n      previousFocus && typeof previousFocus.focus == \"function\")\r\n    )\r\n      try {\r\n        previousFocus.focus({ preventScroll: !0 });\r\n      } catch (e) {}\r\n    window.setTimeout(function () {\r\n      try {\r\n        window.scrollTo(0, y);\r\n      } catch (e) {}\r\n    }, 0);\r\n  }\r\n  function canonicalOverlayRoot() {\r\n    var root = qs(\".dsd-overlay-root\");\r\n    return (\r\n      root ||\r\n        ((root = document.createElement(\"div\")),\r\n        (root.className = \"dsd-overlay-root\"),\r\n        root.setAttribute(\"data-dsd-owner\", \"OverlayManager\"),\r\n        document.body.appendChild(root)),\r\n      root.setAttribute(\"data-dsd-overlay-manager-bound\", \"true\"),\r\n      root.setAttribute(\"data-dsd-immersive-overlay-root\", \"true\"),\r\n      root\r\n    );\r\n  }\r\n  function ensureImmersiveOverlayRoot(mode, contextHTML) {\r\n    (ensureImmersiveOverlayStyles(),\r\n      (mode = mode === \"post-media\" ? \"post-media\" : \"story\"));\r\n    var root = canonicalOverlayRoot();\r\n    (qsa(\"[data-dsd-immersive-overlay]\").forEach(function (node) {\r\n      root.contains(node) || node.remove();\r\n    }),\r\n      qsa(\"[data-dsd-immersive-overlay]\", root).forEach(function (node) {\r\n        node.remove();\r\n      }));\r\n    var overlay = document.createElement(\"div\");\r\n    return (\r\n      (overlay.className = \"dsd-immersive-overlay\"),\r\n      overlay.setAttribute(\"data-dsd-immersive-overlay\", \"true\"),\r\n      overlay.setAttribute(\"data-dsd-owner\", \"ImmersiveOverlayController\"),\r\n      overlay.setAttribute(\"data-dsd-immersive-mode\", mode),\r\n      overlay.setAttribute(\r\n        \"data-dsd-return-scroll\",\r\n        String(window.scrollY || window.pageYOffset || 0),\r\n      ),\r\n      overlay.setAttribute(\"role\", \"dialog\"),\n      overlay.setAttribute(\"aria-modal\", \"true\"),\n      overlay.setAttribute(\"aria-keyshortcuts\", \"Escape ArrowLeft ArrowRight\"),\n      overlay.setAttribute(\r\n        \"aria-label\",\r\n        mode === \"post-media\"\r\n          ? \"Fullscreen post media viewer\"\r\n          : \"Fullscreen story viewer\",\r\n      ),\r\n      overlay.setAttribute(\"data-dsd-overlay-above-dock\", \"true\"),\r\n      overlay.setAttribute(\"data-dsd-post-media-modal-deconstructed\", \"true\"),\r\n      overlay.setAttribute(\"data-dsd-swipe-close-enabled\", \"true\"),\r\n      overlay.setAttribute(\r\n        \"data-dsd-swipe-owner\",\r\n        \"ImmersiveOverlayController\",\r\n      ),\r\n      overlay.setAttribute(\r\n        \"data-dsd-story-identity-contract\",\r\n        \"top-compact-only\",\r\n      ),\r\n      overlay.setAttribute(\"tabindex\", \"-1\"),\r\n      (overlay.innerHTML =\r\n        '<header class=\"dsd-immersive-overlay__top\" data-dsd-overlay-top-context data-dsd-story-top-context data-dsd-story-header-owner=\"ImmersiveOverlayController\"><div class=\"dsd-immersive-overlay__context\" data-dsd-overlay-identity data-dsd-story-identity>' +\r\n        (contextHTML ||\r\n          '<span class=\"dsd-immersive-overlay__avatar\">DS</span><div><strong>Story</strong><span>Detroit Sky Daddy</span></div>') +\r\n        '</div><div class=\"dsd-immersive-overlay__controls\" data-dsd-story-control-row><div data-dsd-overlay-top-controls data-dsd-story-top-controls></div><button type=\"button\" data-dsd-immersive-close aria-label=\"Close viewer\">&times;</button></div></header><section class=\"dsd-immersive-overlay__stage\" data-dsd-immersive-stage></section>'),\r\n      root.appendChild(overlay),\r\n      (!immersivePreviousFocus ||\r\n        !document.body.contains(immersivePreviousFocus)) &&\r\n        (immersivePreviousFocus = document.activeElement),\r\n      document.documentElement.classList.add(\"dsd-immersive-overlay-open\"),\r\n      scheduleGlobalOverlayStateSync(),\r\n      window.setTimeout(function () {\r\n        focusImmersiveOverlay(overlay);\r\n      }, 0),\r\n      overlay\r\n    );\r\n  }\r\n  function storyContextHTML(story) {\n    story = hydrateRecordIdentity(story || {});\n    var profile = profileForRecordIdentity(story) || {},\n      label = publicDisplayName(\r\n        profile.displayName ||\r\n          story.authorDisplayName ||\r\n          story.ownerDisplayName ||\r\n          story.authorProfileKey ||\r\n          \"Story\",\r\n        \"Story\",\r\n      ),\r\n      handle = publicHandleText(\r\n        profile.profileKey ||\r\n          profile.handle ||\r\n          story.authorProfileKey ||\r\n          story.ownerProfileKey ||\r\n          label,\r\n        label,\r\n        \"story\",\r\n      ),\r\n      mediaId =\r\n        canonicalProfileAvatarMediaId(profile) ||\r\n        story.authorAvatarMediaId ||\r\n        story.ownerAvatarMediaId ||\r\n        \"\",\r\n      avatar = mediaId\r\n        ? '<span class=\"dsd-immersive-overlay__avatar\" data-dsd-avatar-media-id=\"' +\r\n          html(mediaId) +\r\n          '\"></span>'\r\n        : '<span class=\"dsd-immersive-overlay__avatar\">' +\r\n          html(initials(label || \"DS\")) +\r\n          \"</span>\",\r\n      expires = formatDateTime(story.expiresAt || story.expires_at || \"\"),\r\n      href = profileRouteHref(\r\n        profile.profileKey ||\r\n          profile.handle ||\r\n          story.authorProfileKey ||\r\n          story.ownerProfileKey ||\r\n          handle,\r\n      );\r\n    return (\r\n      '<a class=\"dsd-immersive-overlay__profile-link\" data-dsd-story-profile-link href=\"' +\r\n      html(href) +\r\n      '\">' +\r\n      avatar +\r\n      '<span class=\"dsd-immersive-overlay__identity-copy\"><strong>' +\r\n      html(label) +\r\n      \"</strong><span>@\" +\r\n      html(handle) +\r\n      \"</span>\" +\r\n      (expires\r\n        ? \"<small data-dsd-story-expires data-dsd-story-context-expires>Expires \" +\r\n          html(expires) +\r\n          \"</small>\"\r\n        : \"\") +\r\n      \"</span></a>\"\r\n    );\r\n  }\r\n  function postContextHTML(post) {\r\n    post = hydrateRecordIdentity(post || {});\r\n    var profile =\r\n        publicProfileByUid(post.authorUid || post.ownerUid || \"\") ||\r\n        publicProfileByKey(\r\n          post.authorProfileKey || post.ownerProfileKey || \"\",\r\n        ) ||\r\n        {},\r\n      label = publicDisplayName(\r\n        profile.displayName ||\r\n          post.authorDisplayName ||\r\n          post.ownerDisplayName ||\r\n          post.authorProfileKey ||\r\n          \"Post\",\r\n        \"Post\",\r\n      ),\r\n      handle = publicHandleText(\r\n        profile.profileKey ||\r\n          profile.handle ||\r\n          post.authorProfileKey ||\r\n          post.ownerProfileKey ||\r\n          label,\r\n        label,\r\n        \"member\",\r\n      ),\r\n      mediaId =\r\n        canonicalProfileAvatarMediaId(profile) ||\r\n        post.authorAvatarMediaId ||\r\n        post.ownerAvatarMediaId ||\r\n        \"\",\r\n      avatar = mediaId\r\n        ? '<span class=\"dsd-immersive-overlay__avatar\" data-dsd-avatar-media-id=\"' +\r\n          html(mediaId) +\r\n          '\"></span>'\r\n        : '<span class=\"dsd-immersive-overlay__avatar\">' +\r\n          html(initials(label || \"DS\")) +\r\n          \"</span>\";\r\n    return (\r\n      avatar +\r\n      \"<div><strong>\" +\r\n      html(label) +\r\n      \"</strong><span>@\" +\r\n      html(handle) +\r\n      \"</span></div>\"\r\n    );\r\n  }\r\n  function storyMessageComposerHTML(story) {\r\n    if (!story) return \"\";\r\n    if (!hasCustomer())\r\n      return (\r\n        '<div class=\"dsd-immersive-overlay__message dsd-immersive-overlay__message-gate\" data-dsd-story-reply-public-gate><span>Log in to reply to this story.</span><a class=\"dsd-launch-action\" href=\"' +\r\n        html(loginReturnUrl()) +\r\n        '\">Log in</a></div>'\r\n      );\r\n    if (!canUseSocialActions()) return \"\";\r\n    story = hydrateRecordIdentity(story || {});\n    var targetUid = story.authorUid || story.ownerUid || \"\",\n      targetKey = story.authorProfileKey || story.ownerProfileKey || \"\",\n      profile = profileForRecordIdentity(story) || {};\n    if (\n      ((targetUid = profile.uid || profile.userId || targetUid || \"\"),\n      (targetKey =\n        profile.profileKey || profile.handle || targetKey || targetUid),\n      !targetKey ||\n        identityMatchesCurrent(targetUid, targetKey) ||\n        relationshipBlockedProfile(targetUid, targetKey))\n    )\n      return \"\";\n    var handle = publicHandleText(\r\n        targetKey || profile.handle || \"member\",\r\n        profile.displayName || targetKey || \"member\",\r\n        \"member\",\r\n      ),\r\n      conversationId = canonicalConversationId(targetUid, targetKey),\r\n      mediaItem =\r\n        (story.media || story.mediaObjects || story.media_objects || [])[0] ||\r\n        {},\r\n      mediaKind = /video/i.test(\r\n        String(\r\n          mediaItem.kind ||\r\n            mediaItem.mediaKind ||\r\n            mediaItem.contentType ||\r\n            mediaItem.content_type ||\r\n            \"\",\r\n        ),\r\n      )\r\n        ? \"video\"\r\n        : /image/i.test(\r\n              String(\r\n                mediaItem.kind ||\r\n                  mediaItem.mediaKind ||\r\n                  mediaItem.contentType ||\r\n                  mediaItem.content_type ||\r\n                  \"\",\r\n              ),\r\n            )\r\n          ? \"image\"\r\n          : \"\",\r\n      referenceInputs = [\r\n        [\"storyId\", story.storyId || story.id || \"\"],\r\n        [\"storyAuthorProfileKey\", targetKey || \"\"],\r\n        [\r\n          \"storyAuthorDisplayName\",\r\n          profile.displayName ||\r\n            story.authorDisplayName ||\r\n            story.ownerDisplayName ||\r\n            targetKey ||\r\n            \"Story\",\r\n        ],\r\n        [\"storyCaptionExcerpt\", story.body || story.caption || \"\"],\r\n        [\"storyMediaKind\", mediaKind],\r\n        [\"storyExpiresAt\", story.expiresAt || story.expires_at || \"\"],\r\n      ]\r\n        .map(function (pair) {\r\n          return (\r\n            '<input type=\"hidden\" name=\"' +\r\n            html(pair[0]) +\r\n            '\" value=\"' +\r\n            html(pair[1]) +\r\n            '\">'\r\n          );\r\n        })\r\n        .join(\"\");\r\n    return (\r\n      '<form class=\"dsd-immersive-overlay__message\" data-dsd-message-form data-dsd-story-message-form aria-label=\"Message story poster\"><input type=\"hidden\" name=\"recipientUid\" value=\"' +\r\n      html(targetUid) +\r\n      '\"><input type=\"hidden\" name=\"recipientProfileKey\" value=\"' +\r\n      html(targetKey) +\r\n      '\"><input type=\"hidden\" name=\"conversationId\" value=\"' +\r\n      html(conversationId) +\r\n      '\">' +\r\n      referenceInputs +\r\n      '<textarea name=\"body\" maxlength=\"' +\r\n      html(MAX.message) +\r\n      '\" rows=\"1\" placeholder=\"Message @' +\r\n      html(handle) +\r\n      '\"></textarea><button type=\"submit\" aria-label=\"Send story message\">Send</button><small data-dsd-upload-status></small></form>'\r\n    );\r\n  }\r\n  function ensureStoryOverlayViewer() {\r\n    var story =\r\n        visibleStories().filter(function (item) {\r\n          return (item.storyId || item.id || \"\") === state.activeStoryId;\r\n        })[0] || {},\r\n      overlay = ensureImmersiveOverlayRoot(\"story\", storyContextHTML(story)),\r\n      stage = qs(\"[data-dsd-immersive-stage]\", overlay);\r\n    return (\r\n      (stage.innerHTML =\r\n        '<main class=\"dsd-immersive-overlay__story-frame\" aria-label=\"Story viewer\" data-dsd-owner=\"ImmersiveOverlayController\" data-dsd-story-overlay-viewer data-dsd-story-swipe-enabled=\"true\" data-dsd-story-renderer-contract=\"top-identity-top-actions-bottom-caption-reply\"><div class=\"dsd-immersive-overlay__story-progress\" data-dsd-story-progress aria-hidden=\"true\"></div><section class=\"dsd-story385__canvas dsd-immersive-overlay__story-canvas\" data-dsd-story-fullscreen-canvas><strong data-dsd-story385-status>No story selected</strong></section><span class=\"dsd-immersive-overlay__swipe-hint\" aria-hidden=\"true\">Swipe</span></main>'),\r\n      bindStoryOverlayGestures(overlay),\r\n      hydrateAvatarMedia(overlay),\r\n      qs(\"[data-dsd-story-overlay-viewer]\", overlay)\r\n    );\r\n  }\r\n  function postMediaItems(post) {\r\n    return safeMediaItemsForRecord(post || {});\r\n  }\r\n  function postByMediaId(mediaId) {\r\n    return (\r\n      (mediaId = String(mediaId || \"\").trim()),\r\n      (mediaId &&\r\n        (state.posts || []).filter(function (post) {\r\n          return postMediaItems(post).some(function (item) {\r\n            return (\r\n              String(item.mediaId || item.id || item.media_id || \"\").trim() ===\r\n              mediaId\r\n            );\r\n          });\r\n        })[0]) ||\r\n        null\r\n    );\r\n  }\r\n  function resolvePostMediaIndex(post, mediaId, mediaIndex) {\r\n    var items = postMediaItems(post),\r\n      requested = Number(mediaIndex);\r\n    if (isFinite(requested) && requested >= 0 && requested < items.length)\r\n      return requested;\r\n    if (((mediaId = String(mediaId || \"\").trim()), mediaId)) {\r\n      for (var i = 0; i < items.length; i += 1)\r\n        if (\r\n          String(\r\n            items[i].mediaId || items[i].id || items[i].media_id || \"\",\r\n          ).trim() === mediaId\r\n        )\r\n          return i;\r\n    }\r\n    return 0;\r\n  }\r\n  function ensurePostMediaOverlayViewer(post) {\r\n    var overlay = ensureImmersiveOverlayRoot(\r\n      \"post-media\",\r\n      postContextHTML(post),\r\n    ),\r\n      profileMediaOverlay = state.activePostMediaSurface === \"profile-media\",\r\n      profileMediaLabel =\r\n        profileMediaOverlay && post && post.body === \"Profile banner\"\r\n          ? \"Fullscreen profile banner viewer\"\r\n          : profileMediaOverlay\r\n            ? \"Fullscreen profile photo viewer\"\r\n            : \"Fullscreen post media viewer\";\r\n    (overlay.setAttribute(\"data-dsd-post-media-overlay\", \"true\"),\r\n      overlay.setAttribute(\"aria-label\", profileMediaLabel));\r\n    var stage = qs(\"[data-dsd-immersive-stage]\", overlay);\r\n    return (\r\n      (stage.innerHTML =\r\n        '<main class=\"dsd-immersive-overlay__post-frame\" aria-label=\"' +\r\n        html(profileMediaLabel) +\r\n        '\" data-dsd-owner=\"ImmersiveOverlayController\" data-dsd-post-media-overlay-viewer data-dsd-post-media-swipe-enabled=\"true\"><div class=\"dsd-immersive-overlay__post-progress\" data-dsd-post-media-progress aria-hidden=\"true\"></div><section class=\"dsd-immersive-overlay__post-canvas\" data-dsd-post-media-fullscreen-canvas><strong data-dsd-post-media-status>No media selected</strong></section><span class=\"dsd-immersive-overlay__swipe-hint\" aria-hidden=\"true\">Swipe</span></main>'),\r\n      bindPostMediaOverlayGestures(overlay),\r\n      hydrateAvatarMedia(overlay),\r\n      qs(\"[data-dsd-post-media-overlay-viewer]\", overlay)\r\n    );\r\n  }\r\n  function activePostMediaPost() {\n    var postId = String(state.activePostMediaId || \"\").trim();\n    return (\r\n      state.activePostMediaRecord ||\r\n      localPostById(postId) ||\r\n      postByMediaId(postId) ||\r\n      null\r\n    );\r\n  }\n  function postMediaNavigationPosts() {\n    if (\r\n      state.activePostMediaSurface === \"message\" ||\r\n      state.activePostMediaSurface === \"profile-media\" ||\r\n      state.activePostMediaSurface === \"comment\"\r\n    )\r\n      return state.activePostMediaRecord ? [state.activePostMediaRecord] : [];\r\n    var rows = (state.posts || [])\n      .map(publicRenderablePost)\n      .filter(function (post) {\n        if (!post || isRestrictedShellRecord(post) || !postMediaItems(post).length)\n          return !1;\n        if (state.activePostMediaSurface !== \"profile\") return !0;\n        var target = profileContentTargetIdentity();\n        return recordBelongsToProfile(\n          post,\n          target.targetUid,\n          target.targetKey,\n          \"authorUid\",\n        );\n      });\n    return sortByCreatedAtDesc(rows);\n  }\n  function adjacentPostMediaTarget(post, delta) {\n    var rows = postMediaNavigationPosts(),\n      postKeys = counterIdentityKeys(post || {}),\n      currentIndex = -1;\n    rows.some(function (row, index) {\n      var matched = counterIdentityKeys(row).some(function (key) {\n        return postKeys.indexOf(key) !== -1;\n      });\n      if (matched) currentIndex = index;\n      return matched;\n    });\n    if (currentIndex < 0) return null;\n    var target = rows[currentIndex + (delta > 0 ? 1 : -1)] || null,\n      items = postMediaItems(target || {});\n    return target && items.length\n      ? { post: target, index: delta > 0 ? 0 : items.length - 1 }\n      : null;\n  }\n  function renderPostMediaOverlay() {\r\n    var overlay = qs(\r\n      '[data-dsd-immersive-overlay][data-dsd-immersive-mode=\"post-media\"]',\r\n    );\r\n    if (overlay) {\r\n      var post = activePostMediaPost(),\r\n        items = postMediaItems(post || {});\r\n      if (!post || !items.length) {\r\n        (closeImmersiveOverlay(),\r\n          renderStatus(\"Post media is no longer available.\"));\r\n        return;\r\n      }\r\n      var postId = post.postId || post.id || state.activePostMediaId || \"\",\n        index = Number(state.activePostMediaIndex || 0);\n      (isFinite(index) || (index = 0),\r\n        (index = Math.max(0, Math.min(items.length - 1, index))),\r\n        (state.activePostMediaId = postId),\r\n        (state.activePostMediaIndex = index));\n      var topControls = qs(\"[data-dsd-overlay-top-controls]\", overlay),\n        activeMedia = items[index] || {},\n        activeMediaId = activeMedia.mediaId || activeMedia.id || activeMedia.media_id || \"\";\n      topControls &&\n        (topControls.innerHTML = state.activePostMediaSurface !== \"message\" && canUseSocialActions() && !recordOwnedByCurrentProfile(post) && activeMediaId\r\n          ? '<button type=\"button\" data-dsd-report-media=\"' + html(activeMediaId) + '\" data-dsd-report-media-post=\"' + html(postId) + '\" aria-label=\"Report this media\">Report</button>'\n          : \"\");\n      var context = qs(\"[data-dsd-overlay-identity]\", overlay);\r\n      context &&\r\n        ((context.innerHTML = postContextHTML(post)),\r\n        hydrateAvatarMedia(context));\r\n      var viewer =\r\n          qs(\"[data-dsd-post-media-overlay-viewer]\", overlay) ||\r\n          ensurePostMediaOverlayViewer(post),\r\n        progress = qs(\"[data-dsd-post-media-progress]\", viewer);\r\n      progress &&\r\n        (progress.innerHTML = items\r\n          .map(function (item2, itemIndex) {\r\n            return (\r\n              '<span class=\"' +\r\n              (itemIndex === index ? \"is-active\" : \"\") +\r\n              '\"></span>'\r\n            );\r\n          })\r\n          .join(\"\"));\r\n      var canvas = qs(\"[data-dsd-post-media-fullscreen-canvas]\", viewer);\r\n      if (canvas) {\r\n        var item = items[index] || {},\r\n          kind = item.kind || \"image\",\r\n          caption = publicDisplayText(post.body || post.caption || \"\", \"\");\r\n        ((canvas.innerHTML =\r\n          '<figure class=\"dsd-launch-media-chip dsd-launch-media-chip--' +\r\n          html(kind) +\r\n          '\" data-dsd-inline-media=\"true\"' +\r\n          mediaReadAttrs(item) +\r\n          ' data-dsd-media-kind=\"' +\r\n          html(kind) +\r\n          '\" data-dsd-media-status=\"' +\r\n          html(item.status || \"uploaded\") +\r\n          '\"></figure>' +\r\n          (caption\r\n            ? '<p class=\"dsd-immersive-overlay__post-caption\">' +\r\n              linkify(caption) +\r\n              \"</p>\"\r\n            : \"\")),\r\n          hydrateMediaReads(canvas));\r\n      }\r\n    }\r\n  }\r\n  function stepPostMedia(delta) {\n    var post = activePostMediaPost(),\n      items = postMediaItems(post || {});\n    if (items.length) {\n      var current = Number(state.activePostMediaIndex || 0);\n      isFinite(current) || (current = 0);\n      var nextItem = current + (delta > 0 ? 1 : -1);\n      if (nextItem >= 0 && nextItem < items.length) {\n        state.activePostMediaIndex = nextItem;\n        renderPostMediaOverlay();\n        return;\n      }\n      var adjacent = adjacentPostMediaTarget(post, delta);\n      if (adjacent) {\n        state.activePostMediaId = adjacent.post.postId || adjacent.post.id || \"\";\n        state.activePostMediaIndex = adjacent.index;\n        renderPostMediaOverlay();\n        return;\n      }\n      if (\n        delta > 0 &&\n        state.activePostMediaSurface === \"feed\" &&\n        state.feedHasMore &&\n        typeof state.feedNextPageLoader === \"function\" &&\n        !state.postMediaPageAdvancePending\n      ) {\n        state.postMediaPageAdvancePending = !0;\n        state.feedNextPageLoader().then(function () {\n          state.postMediaPageAdvancePending = !1;\n          var loadedAdjacent = adjacentPostMediaTarget(post, delta);\n          if (loadedAdjacent) {\n            state.activePostMediaId =\n              loadedAdjacent.post.postId || loadedAdjacent.post.id || \"\";\n            state.activePostMediaIndex = loadedAdjacent.index;\n            renderPostMediaOverlay();\n          } else renderStatus(\"No more eligible media in this Feed page.\");\n        });\n        return;\n      }\n      renderStatus(\n        delta > 0\n          ? \"No more eligible media.\"\n          : \"This is the first eligible media.\",\n      );\n    }\n  }\n  function openPostMedia(postId, mediaId, mediaIndex, sourceSurface) {\n    ((postId = String(postId || \"\").trim()),\r\n      (mediaId = String(mediaId || \"\").trim()));\r\n    var post = postId ? localPostById(postId) : null;\r\n    if ((!post && mediaId && (post = postByMediaId(mediaId)), !post)) {\r\n      renderStatus(\"Post media is unavailable.\");\r\n      return;\r\n    }\r\n    var items = postMediaItems(post);\r\n    if (!items.length) {\r\n      renderStatus(\"This post has no visible media.\");\r\n      return;\r\n    }\r\n    var resolvedIndex = resolvePostMediaIndex(post, mediaId, mediaIndex);\n    ((state.activePostMediaRecord = null),\r\n      (state.activePostMediaId = post.postId || post.id || postId || \"\"),\r\n      (state.activePostMediaIndex = resolvedIndex),\n      (state.activePostMediaSurface =\n        sourceSurface === \"profile\" ? \"profile\" : \"feed\"),\n      ensurePostMediaOverlayViewer(post),\n      renderPostMediaOverlay());\r\n  }\r\n  function commentByCanonicalId(postId, commentId) {\r\n    postId = String(postId || \"\").trim();\r\n    commentId = String(commentId || \"\").trim();\r\n    if (!commentId) return null;\r\n    var pools = postId && state.commentsByPost && state.commentsByPost[postId]\r\n      ? [state.commentsByPost[postId]]\r\n      : Object.keys(state.commentsByPost || {}).map(function (key) {\r\n          return state.commentsByPost[key] || [];\r\n        });\r\n    for (var p = 0; p < pools.length; p += 1) {\r\n      for (var i = 0; i < pools[p].length; i += 1) {\r\n        var comment = pools[p][i];\r\n        if (\r\n          String(canonicalCommentId(comment) || \"\").trim() === commentId ||\r\n          String(commentKey(comment) || \"\").trim() === commentId ||\r\n          String(comment.id || \"\").trim() === commentId\r\n        ) return comment;\r\n      }\r\n    }\r\n    return null;\r\n  }\r\n  function openCommentMedia(postId, commentId, mediaId, mediaIndex) {\r\n    var comment = commentByCanonicalId(postId, commentId),\r\n      parentPost = localPostById(postId) || {},\r\n      media = comment ? safeCommentMediaItems(comment, parentPost) : [];\r\n    if (!comment || !media.length) {\r\n      renderStatus(\"Comment media is unavailable.\");\r\n      return;\r\n    }\r\n    var record = Object.assign({}, comment, {\r\n        id: \"comment-media:\" + commentId,\r\n        postId: \"comment-media:\" + commentId,\r\n        media: media,\r\n      }),\r\n      resolvedIndex = resolvePostMediaIndex(record, mediaId, mediaIndex);\r\n    ((state.activePostMediaRecord = record),\r\n      (state.activePostMediaId = record.postId),\r\n      (state.activePostMediaIndex = resolvedIndex),\r\n      (state.activePostMediaSurface = \"comment\"),\r\n      ensurePostMediaOverlayViewer(record),\r\n      renderPostMediaOverlay());\r\n  }\r\n  function openMessageMedia(conversationId, messageId, mediaId, mediaIndex) {\r\n    var message = conversationMessageById(conversationId, messageId),\r\n      media = normalizeMessageMedia(message || {});\r\n    if (!message || !media.length) {\r\n      renderStatus(\"Message media is unavailable.\");\r\n      return;\r\n    }\r\n    var record = {\r\n        id: \"message-media:\" + String(messageId || \"\"),\r\n        postId: \"message-media:\" + String(messageId || \"\"),\r\n        authorUid: message.senderUid || message.sender_uid || \"\",\r\n        authorProfileKey:\r\n          message.senderProfileKey || message.sender_profile_key || \"\",\r\n        authorDisplayName:\r\n          message.senderDisplayName || message.sender_display_name || \"\",\r\n        authorAvatarMediaId:\r\n          message.senderAvatarMediaId || message.sender_avatar_media_id || \"\",\r\n        media: media,\r\n        body: \"\",\r\n      },\r\n      resolvedIndex = resolvePostMediaIndex(record, mediaId, mediaIndex);\r\n    ((state.activePostMediaRecord = record),\r\n      (state.activePostMediaId = record.postId),\r\n      (state.activePostMediaIndex = resolvedIndex),\r\n      (state.activePostMediaSurface = \"message\"),\r\n      ensurePostMediaOverlayViewer(record),\r\n      renderPostMediaOverlay());\r\n    return !0;\r\n  }\r\n  function openProfileMedia(profile, slot) {\r\n    profile = profileWithPublicMirror(profile || viewedProfile() || {}) || {};\r\n    slot = slot === \"banner\" ? \"banner\" : \"avatar\";\r\n    var mediaId =\r\n      slot === \"banner\"\r\n        ? canonicalProfileBannerMediaId(profile)\r\n        : canonicalProfileAvatarMediaId(profile);\r\n    if (!mediaId) {\r\n      renderStatus(\r\n        slot === \"banner\"\r\n          ? \"This profile does not have a banner image.\"\r\n          : \"This profile does not have a profile image.\",\r\n      );\r\n      return !1;\r\n    }\r\n    var key = nonPlaceholderProfileKey(\r\n        profile.profileKey || profile.profile_key || profile.handle || \"\",\r\n      ),\r\n      label = publicDisplayName(\r\n        profile.displayName || profile.display_name || key,\r\n        \"DSD member\",\r\n      ),\r\n      record = {\r\n        id: \"profile-media:\" + slot + \":\" + (key || mediaId),\r\n        postId: \"profile-media:\" + slot + \":\" + (key || mediaId),\r\n        authorUid: profile.uid || profile.userId || profile.user_id || \"\",\r\n        authorProfileKey: key,\r\n        authorDisplayName: label,\r\n        authorAvatarMediaId: canonicalProfileAvatarMediaId(profile),\r\n        media: [\r\n          {\r\n            mediaId: mediaId,\r\n            id: mediaId,\r\n            kind: \"image\",\r\n            status: \"uploaded\",\r\n          },\r\n        ],\r\n        body: slot === \"banner\" ? \"Profile banner\" : \"Profile photo\",\r\n      };\r\n    return (\r\n      (state.activePostMediaRecord = record),\r\n      (state.activePostMediaId = record.postId),\r\n      (state.activePostMediaIndex = 0),\r\n      (state.activePostMediaSurface = \"profile-media\"),\r\n      ensurePostMediaOverlayViewer(record),\r\n      renderPostMediaOverlay(),\r\n      !0\r\n    );\r\n  }\r\n  function bindPostMediaOverlayGestures(overlay) {\r\n    if (!overlay || overlay.dataset.dsdPostMediaSwipeBound === \"true\") return;\r\n    overlay.dataset.dsdPostMediaSwipeBound = \"true\";\r\n    var gestureAbort = window.AbortController ? new AbortController() : null;\r\n    gestureAbort && (overlay._dsdGestureAbort = gestureAbort);\r\n    var documentGestureOptions = gestureAbort\r\n        ? { capture: !0, signal: gestureAbort.signal }\r\n        : !0,\r\n      startX = 0,\r\n      startY = 0,\r\n      lastX = 0,\r\n      lastY = 0,\r\n      started = !1,\r\n      didSwipe = !1;\r\n    function start(clientX, clientY) {\r\n      ((startX = Number(clientX || 0)),\r\n        (startY = Number(clientY || 0)),\r\n        (lastX = startX),\r\n        (lastY = startY),\r\n        (started = !0));\r\n    }\r\n    function move(clientX, clientY) {\r\n      started &&\r\n        ((lastX = Number(clientX || lastX || 0)),\r\n        (lastY = Number(clientY || lastY || 0)));\r\n    }\r\n    function finish(clientX, clientY) {\r\n      if (started) {\r\n        started = !1;\r\n        var dx = Number(clientX || lastX || 0) - startX,\r\n          dy = Number(clientY || lastY || 0) - startY;\r\n        if (\r\n          (overlay.removeAttribute(\"data-dsd-swipe-close-active\"),\r\n          overlay.style.removeProperty(\"--dsd-story-swipe-y\"),\r\n          Math.abs(dy) >= 54 && Math.abs(dy) > Math.abs(dx) * 1.15)\r\n        ) {\r\n          ((didSwipe = !0), closeImmersiveOverlay());\r\n          return;\r\n        }\r\n        Math.abs(dx) < 42 ||\r\n          Math.abs(dx) < Math.abs(dy) * 1.15 ||\r\n          ((didSwipe = !0), stepPostMedia(dx < 0 ? 1 : -1));\r\n      }\r\n    }\r\n    function isOverlayGestureTarget(ev) {\r\n      var target = ev && ev.target;\r\n      return !!(\r\n        target &&\r\n        (target === overlay || (overlay.contains && overlay.contains(target)))\r\n      );\r\n    }\r\n    (overlay.addEventListener(\r\n      \"touchstart\",\r\n      function (ev) {\r\n        var touch = ev.touches && ev.touches[0];\r\n        touch && start(touch.clientX, touch.clientY);\r\n      },\r\n      { passive: !0, capture: !0 },\r\n    ),\r\n      overlay.addEventListener(\r\n        \"touchmove\",\r\n        function (ev) {\r\n          var touch = ev.touches && ev.touches[0];\r\n          (touch && move(touch.clientX, touch.clientY),\r\n            started &&\r\n              Math.abs(lastY - startY) > Math.abs(lastX - startX) &&\r\n              (overlay.setAttribute(\"data-dsd-swipe-close-active\", \"true\"),\r\n              overlay.style.setProperty(\r\n                \"--dsd-story-swipe-y\",\r\n                Math.max(-90, Math.min(90, lastY - startY)) + \"px\",\r\n              )));\r\n        },\r\n        { passive: !0, capture: !0 },\r\n      ),\r\n      overlay.addEventListener(\r\n        \"touchend\",\r\n        function (ev) {\r\n          var touch = ev.changedTouches && ev.changedTouches[0];\r\n          finish(touch && touch.clientX, touch && touch.clientY);\r\n        },\r\n        { passive: !0, capture: !0 },\r\n      ),\r\n      overlay.addEventListener(\r\n        \"pointerdown\",\r\n        function (ev) {\r\n          (ev.pointerType === \"mouse\" && ev.button !== 0) ||\r\n            (ev.cancelable && ev.preventDefault(),\r\n            start(ev.clientX, ev.clientY));\r\n        },\r\n        !0,\r\n      ),\r\n      overlay.addEventListener(\r\n        \"pointermove\",\r\n        function (ev) {\r\n          (started && ev.cancelable && ev.preventDefault(),\r\n            move(ev.clientX, ev.clientY),\r\n            started &&\r\n              Math.abs(lastY - startY) > Math.abs(lastX - startX) &&\r\n              (overlay.setAttribute(\"data-dsd-swipe-close-active\", \"true\"),\r\n              overlay.style.setProperty(\r\n                \"--dsd-story-swipe-y\",\r\n                Math.max(-90, Math.min(90, lastY - startY)) + \"px\",\r\n              )));\r\n        },\r\n        !0,\r\n      ),\r\n      overlay.addEventListener(\r\n        \"pointerup\",\r\n        function (ev) {\r\n          finish(ev.clientX, ev.clientY);\r\n        },\r\n        !0,\r\n      ));\r\n    function documentPointerDown(ev) {\r\n      !document.body.contains(overlay) ||\r\n        !isOverlayGestureTarget(ev) ||\r\n        (ev.pointerType === \"mouse\" && ev.button !== 0) ||\r\n        (ev.cancelable && ev.preventDefault(), start(ev.clientX, ev.clientY));\r\n    }\r\n    (document.addEventListener(\r\n      \"pointerdown\",\r\n      documentPointerDown,\r\n      documentGestureOptions,\r\n    ),\r\n      window.addEventListener(\r\n        \"pointerdown\",\r\n        documentPointerDown,\r\n        documentGestureOptions,\r\n      ),\r\n      overlay.addEventListener(\r\n        \"click\",\r\n        function (ev) {\r\n          if (didSwipe) {\r\n            ((didSwipe = !1), ev.preventDefault(), ev.stopPropagation());\r\n            return;\r\n          }\r\n          if (!(\r\n            ev.target &&\r\n            ev.target.closest &&\r\n            ev.target.closest(\r\n              \"[data-dsd-immersive-close], a, button, input, textarea, select, label\",\r\n            )\r\n          )) {\r\n            var width =\r\n              overlay.getBoundingClientRect().width || window.innerWidth || 0;\r\n            width &&\r\n              (ev.clientX < width * 0.32\r\n                ? (ev.preventDefault(), stepPostMedia(-1))\r\n                : ev.clientX > width * 0.68 &&\r\n                  (ev.preventDefault(), stepPostMedia(1)));\r\n          }\r\n        },\r\n        !0,\r\n      ));\r\n  }\r\n  function bindStoryOverlayGestures(overlay) {\r\n    if (!overlay || overlay.dataset.dsdStorySwipeBound === \"true\") return;\r\n    overlay.dataset.dsdStorySwipeBound = \"true\";\r\n    var gestureAbort = window.AbortController ? new AbortController() : null;\r\n    gestureAbort && (overlay._dsdGestureAbort = gestureAbort);\r\n    var documentGestureOptions = gestureAbort\r\n        ? { capture: !0, signal: gestureAbort.signal }\r\n        : !0,\r\n      startX = 0,\r\n      startY = 0,\r\n      lastX = 0,\r\n      lastY = 0,\r\n      started = !1,\r\n      didSwipe = !1;\r\n    function start(clientX, clientY) {\r\n      ((startX = Number(clientX || 0)),\r\n        (startY = Number(clientY || 0)),\r\n        (lastX = startX),\r\n        (lastY = startY),\r\n        (started = !0));\r\n    }\r\n    function move(clientX, clientY) {\r\n      started &&\r\n        ((lastX = Number(clientX || lastX || 0)),\r\n        (lastY = Number(clientY || lastY || 0)));\r\n    }\r\n    function recoverMouseDragStart(ev) {\r\n      if (!(started || !ev || ev.buttons !== 1)) {\r\n        var movementX = Number(ev.movementX || 0),\r\n          movementY = Number(ev.movementY || 0);\r\n        (!movementX && !movementY) ||\r\n          start(\r\n            Number(ev.clientX || 0) - movementX,\r\n            Number(ev.clientY || 0) - movementY,\r\n          );\r\n      }\r\n    }\r\n    function finish(clientX, clientY) {\r\n      if (started) {\r\n        started = !1;\r\n        var endX = Number(clientX || lastX || 0),\r\n          endY = Number(clientY || lastY || 0),\r\n          dx = endX - startX,\r\n          dy = endY - startY;\r\n        if (\r\n          (overlay.removeAttribute(\"data-dsd-swipe-close-active\"),\r\n          overlay.style.removeProperty(\"--dsd-story-swipe-y\"),\r\n          Math.abs(dy) >= 54 && Math.abs(dy) > Math.abs(dx) * 1.15)\r\n        ) {\r\n          ((didSwipe = !0), closeStoryOverlay());\r\n          return;\r\n        }\r\n        Math.abs(dx) < 42 ||\r\n          Math.abs(dx) < Math.abs(dy) * 1.15 ||\r\n          ((didSwipe = !0), stepStory(dx < 0 ? 1 : -1));\r\n      }\r\n    }\r\n    function isOverlayGestureTarget(ev) {\r\n      var target = ev && ev.target;\r\n      return !!(\r\n        target &&\r\n        (target === overlay || (overlay.contains && overlay.contains(target)))\r\n      );\r\n    }\r\n    function isStoryOverlayControlTarget(target) {\r\n      return !!(\r\n        target &&\r\n        target.closest &&\r\n        target.closest(\r\n          \"[data-dsd-immersive-close], [data-dsd-story-profile-link], [data-dsd-story-actions-panel], [data-dsd-story-watch-sheet], [data-dsd-story-message-form], a, button, input, textarea, select, label, summary, details\",\r\n        )\r\n      );\r\n    }\r\n    function preventNativeStoryDrag(ev) {\r\n      isOverlayGestureTarget(ev) &&\r\n        (isStoryOverlayControlTarget(ev && ev.target) ||\r\n          (ev && ev.cancelable && ev.preventDefault()));\r\n    }\r\n    (overlay.addEventListener(\r\n      \"touchstart\",\r\n      function (ev) {\r\n        if (!isStoryOverlayControlTarget(ev && ev.target)) {\r\n          var touch = ev.touches && ev.touches[0];\r\n          touch && start(touch.clientX, touch.clientY);\r\n        }\r\n      },\r\n      { passive: !0, capture: !0 },\r\n    ),\r\n      overlay.addEventListener(\r\n        \"touchmove\",\r\n        function (ev) {\r\n          var touch = ev.touches && ev.touches[0];\r\n          (touch && move(touch.clientX, touch.clientY),\r\n            started &&\r\n              Math.abs(lastY - startY) > Math.abs(lastX - startX) &&\r\n              (overlay.setAttribute(\"data-dsd-swipe-close-active\", \"true\"),\r\n              overlay.style.setProperty(\r\n                \"--dsd-story-swipe-y\",\r\n                Math.max(-90, Math.min(90, lastY - startY)) + \"px\",\r\n              )));\r\n        },\r\n        { passive: !0, capture: !0 },\r\n      ),\r\n      overlay.addEventListener(\r\n        \"touchend\",\r\n        function (ev) {\r\n          var touch = ev.changedTouches && ev.changedTouches[0];\r\n          finish(touch && touch.clientX, touch && touch.clientY);\r\n        },\r\n        { passive: !0, capture: !0 },\r\n      ),\r\n      overlay.addEventListener(\r\n        \"touchcancel\",\r\n        function () {\r\n          ((started = !1),\r\n            overlay.removeAttribute(\"data-dsd-swipe-close-active\"),\r\n            overlay.style.removeProperty(\"--dsd-story-swipe-y\"));\r\n        },\r\n        { passive: !0, capture: !0 },\r\n      ),\r\n      overlay.addEventListener(\r\n        \"pointerdown\",\r\n        function (ev) {\r\n          isStoryOverlayControlTarget(ev && ev.target) ||\r\n            (ev.pointerType === \"mouse\" && ev.button !== 0) ||\r\n            (ev.cancelable && ev.preventDefault(),\r\n            start(ev.clientX, ev.clientY));\r\n        },\r\n        !0,\r\n      ),\r\n      overlay.addEventListener(\r\n        \"pointermove\",\r\n        function (ev) {\r\n          (started && ev.cancelable && ev.preventDefault(),\r\n            move(ev.clientX, ev.clientY),\r\n            started &&\r\n              Math.abs(lastY - startY) > Math.abs(lastX - startX) &&\r\n              (overlay.setAttribute(\"data-dsd-swipe-close-active\", \"true\"),\r\n              overlay.style.setProperty(\r\n                \"--dsd-story-swipe-y\",\r\n                Math.max(-90, Math.min(90, lastY - startY)) + \"px\",\r\n              )));\r\n        },\r\n        !0,\r\n      ),\r\n      overlay.addEventListener(\r\n        \"pointerup\",\r\n        function (ev) {\r\n          finish(ev.clientX, ev.clientY);\r\n        },\r\n        !0,\r\n      ),\r\n      overlay.addEventListener(\r\n        \"pointercancel\",\r\n        function () {\r\n          ((started = !1),\r\n            overlay.removeAttribute(\"data-dsd-swipe-close-active\"),\r\n            overlay.style.removeProperty(\"--dsd-story-swipe-y\"));\r\n        },\r\n        !0,\r\n      ),\r\n      overlay.addEventListener(\r\n        \"mousedown\",\r\n        function (ev) {\r\n          isStoryOverlayControlTarget(ev && ev.target) ||\r\n            (ev.button === 0 &&\r\n              (ev.cancelable && ev.preventDefault(),\r\n              start(ev.clientX, ev.clientY)));\r\n        },\r\n        !0,\r\n      ),\r\n      overlay.addEventListener(\r\n        \"mousemove\",\r\n        function (ev) {\r\n          (started && ev.cancelable && ev.preventDefault(),\r\n            recoverMouseDragStart(ev),\r\n            move(ev.clientX, ev.clientY),\r\n            started &&\r\n              Math.abs(lastY - startY) > Math.abs(lastX - startX) &&\r\n              (overlay.setAttribute(\"data-dsd-swipe-close-active\", \"true\"),\r\n              overlay.style.setProperty(\r\n                \"--dsd-story-swipe-y\",\r\n                Math.max(-90, Math.min(90, lastY - startY)) + \"px\",\r\n              )));\r\n        },\r\n        !0,\r\n      ),\r\n      overlay.addEventListener(\r\n        \"mouseup\",\r\n        function (ev) {\r\n          finish(ev.clientX, ev.clientY);\r\n        },\r\n        !0,\r\n      ));\r\n    function documentMouseMove(ev) {\r\n      (recoverMouseDragStart(ev),\r\n        !(!started || !document.body.contains(overlay)) &&\r\n          (move(ev.clientX, ev.clientY),\r\n          Math.abs(lastY - startY) > Math.abs(lastX - startX) &&\r\n            (overlay.setAttribute(\"data-dsd-swipe-close-active\", \"true\"),\r\n            overlay.style.setProperty(\r\n              \"--dsd-story-swipe-y\",\r\n              Math.max(-90, Math.min(90, lastY - startY)) + \"px\",\r\n            ))));\r\n    }\r\n    function documentMouseUp(ev) {\r\n      !started ||\r\n        !document.body.contains(overlay) ||\r\n        finish(ev.clientX, ev.clientY);\r\n    }\r\n    function documentTouchMove(ev) {\r\n      if (!(!started || !document.body.contains(overlay))) {\r\n        var touch = ev.touches && ev.touches[0];\r\n        touch &&\r\n          (move(touch.clientX, touch.clientY),\r\n          Math.abs(lastY - startY) > Math.abs(lastX - startX) &&\r\n            (overlay.setAttribute(\"data-dsd-swipe-close-active\", \"true\"),\r\n            overlay.style.setProperty(\r\n              \"--dsd-story-swipe-y\",\r\n              Math.max(-90, Math.min(90, lastY - startY)) + \"px\",\r\n            )));\r\n      }\r\n    }\r\n    function documentTouchEnd(ev) {\r\n      if (!(!started || !document.body.contains(overlay))) {\r\n        var touch = ev.changedTouches && ev.changedTouches[0];\r\n        finish(touch && touch.clientX, touch && touch.clientY);\r\n      }\r\n    }\r\n    function documentPointerDown(ev) {\r\n      !document.body.contains(overlay) ||\r\n        !isOverlayGestureTarget(ev) ||\r\n        isStoryOverlayControlTarget(ev && ev.target) ||\r\n        (ev.pointerType === \"mouse\" && ev.button !== 0) ||\r\n        (ev.cancelable && ev.preventDefault(), start(ev.clientX, ev.clientY));\r\n    }\r\n    function documentMouseDown(ev) {\r\n      !document.body.contains(overlay) ||\r\n        !isOverlayGestureTarget(ev) ||\r\n        ev.button !== 0 ||\r\n        isStoryOverlayControlTarget(ev && ev.target) ||\r\n        (ev.cancelable && ev.preventDefault(), start(ev.clientX, ev.clientY));\r\n    }\r\n    function documentTouchStart(ev) {\r\n      if (\r\n        !(!document.body.contains(overlay) || !isOverlayGestureTarget(ev)) &&\r\n        !isStoryOverlayControlTarget(ev && ev.target)\r\n      ) {\r\n        var touch = ev.touches && ev.touches[0];\r\n        touch && start(touch.clientX, touch.clientY);\r\n      }\r\n    }\r\n    (overlay.addEventListener(\"dragstart\", preventNativeStoryDrag, !0),\r\n      document.addEventListener(\r\n        \"dragstart\",\r\n        preventNativeStoryDrag,\r\n        documentGestureOptions,\r\n      ),\r\n      document.addEventListener(\r\n        \"pointerdown\",\r\n        documentPointerDown,\r\n        documentGestureOptions,\r\n      ),\r\n      document.addEventListener(\r\n        \"mousedown\",\r\n        documentMouseDown,\r\n        documentGestureOptions,\r\n      ),\r\n      document.addEventListener(\r\n        \"touchstart\",\r\n        documentTouchStart,\r\n        documentGestureOptions,\r\n      ),\r\n      document.addEventListener(\r\n        \"mousemove\",\r\n        documentMouseMove,\r\n        documentGestureOptions,\r\n      ),\r\n      document.addEventListener(\r\n        \"mouseup\",\r\n        documentMouseUp,\r\n        documentGestureOptions,\r\n      ),\r\n      document.addEventListener(\r\n        \"touchmove\",\r\n        documentTouchMove,\r\n        documentGestureOptions,\r\n      ),\r\n      document.addEventListener(\r\n        \"touchend\",\r\n        documentTouchEnd,\r\n        documentGestureOptions,\r\n      ),\r\n      window.addEventListener(\r\n        \"pointerdown\",\r\n        documentPointerDown,\r\n        documentGestureOptions,\r\n      ),\r\n      window.addEventListener(\r\n        \"mousedown\",\r\n        documentMouseDown,\r\n        documentGestureOptions,\r\n      ),\r\n      window.addEventListener(\r\n        \"touchstart\",\r\n        documentTouchStart,\r\n        documentGestureOptions,\r\n      ),\r\n      window.addEventListener(\r\n        \"mousemove\",\r\n        documentMouseMove,\r\n        documentGestureOptions,\r\n      ),\r\n      window.addEventListener(\r\n        \"mouseup\",\r\n        documentMouseUp,\r\n        documentGestureOptions,\r\n      ),\r\n      window.addEventListener(\r\n        \"touchmove\",\r\n        documentTouchMove,\r\n        documentGestureOptions,\r\n      ),\r\n      window.addEventListener(\r\n        \"touchend\",\r\n        documentTouchEnd,\r\n        documentGestureOptions,\r\n      ),\r\n      overlay.addEventListener(\r\n        \"click\",\r\n        function (ev) {\r\n          if (didSwipe) {\r\n            ((didSwipe = !1), ev.preventDefault(), ev.stopPropagation());\r\n            return;\r\n          }\r\n          if (!isStoryOverlayControlTarget(ev && ev.target)) {\r\n            var width =\r\n              overlay.getBoundingClientRect().width || window.innerWidth || 0;\r\n            width &&\r\n              (ev.clientX < width * 0.32\r\n                ? (ev.preventDefault(), stepStory(-1))\r\n                : ev.clientX > width * 0.68 &&\r\n                  (ev.preventDefault(), stepStory(1)));\r\n          }\r\n        },\r\n        !0,\r\n      ));\r\n  }\r\n  function closeStoryOverlay() {\r\n    closeImmersiveOverlay();\r\n  }\r\n  function ensureStoryViewerShell() {\r\n    var viewer = qs(\"[data-dsd-story-overlay-viewer]\");\r\n    return viewer\r\n      ? ((!qs(\".dsd-story385__canvas\", viewer) ||\r\n          qs(\".dsd-social-private-auth-gate\", viewer)) &&\r\n          ((viewer.innerHTML =\r\n            '<div class=\"dsd-immersive-overlay__story-progress\" data-dsd-story-progress aria-hidden=\"true\"></div><section class=\"dsd-story385__canvas dsd-immersive-overlay__story-canvas\" data-dsd-story-fullscreen-canvas><strong data-dsd-story385-status>No story selected</strong></section><span class=\"dsd-immersive-overlay__swipe-hint\" aria-hidden=\"true\">Swipe</span>'),\r\n          viewer.removeAttribute(\"data-dsd-public-locked\")),\r\n        viewer)\r\n      : null;\r\n  }\r\n  function activeStoryViewer() {\r\n    return qs(\"[data-dsd-story-overlay-viewer]\");\r\n  }\r\n  function renderRouteAccessGates() {\r\n    if (\r\n      (document.documentElement.classList.toggle(\r\n        \"dsd-shopify-authenticated\",\r\n        hasCustomer(),\r\n      ),\r\n      document.documentElement.classList.toggle(\r\n        \"dsd-shopify-public\",\r\n        !hasCustomer(),\r\n      ),\r\n      !(hasCustomer() && !state.bridgeChecked))\r\n    ) {\r\n      var needsGate = !hasCustomer() || !canUseSocialActions();\r\n      if (!needsGate) {\r\n        var activeMsg = qs(\"[data-dsd-msg384]\");\r\n        if (\r\n          activeMsg &&\r\n          qs(\".dsd-social-private-auth-gate, [data-dsd-auth-gate]\", activeMsg)\r\n        ) {\r\n          delete activeMsg.dataset.dsdPublicLocked;\r\n          try {\r\n            renderMessages();\r\n          } catch (e) {}\r\n        }\r\n        var activeNoti = qs(\"[data-dsd-noti321]\");\r\n        if (activeNoti && activeNoti.dataset.dsdPublicLocked === \"true\") {\r\n          delete activeNoti.dataset.dsdPublicLocked;\r\n          try {\r\n            renderNotifications();\r\n          } catch (e) {}\r\n        }\r\n        return;\r\n      }\r\n      var gateTitle = hasCustomer()\r\n          ? \"Profile connection loading\"\r\n          : \"Log in required\",\r\n        gateBody = hasCustomer()\r\n          ? \"Refresh or finish profile setup if this stays unavailable.\"\r\n          : \"\",\r\n        noti = qs(\"[data-dsd-noti321]\");\r\n      if (noti && !noti.dataset.dsdPublicLocked) {\r\n        noti.dataset.dsdPublicLocked = \"true\";\r\n        var notiFeed = qs(\".dsd-noti321__feed\", noti);\r\n        notiFeed &&\r\n          (notiFeed.innerHTML = hasCustomer()\r\n            ? bridgeGateHTML(gateTitle, gateBody)\r\n            : privateGateHTML(\r\n                \"Log in to view notifications\",\r\n                \"Log in to see your notifications and account updates.\",\r\n              ));\r\n      }\r\n      var msg = qs(\"[data-dsd-msg384]\");\r\n      if (msg && !msg.dataset.dsdPublicLocked) {\r\n        msg.dataset.dsdPublicLocked = \"true\";\r\n        var msgMain = qs(\".dsd-msg384__conversation\", msg);\r\n        msgMain &&\r\n          (msgMain.innerHTML = hasCustomer()\r\n            ? bridgeGateHTML(gateTitle, gateBody)\r\n            : privateGateHTML(\r\n                \"Log in to use messages\",\r\n                \"Log in to read and send messages.\",\r\n              ));\r\n      }\r\n      ensureStoryViewerShell();\r\n    }\r\n  }\r\n  function ensureProfileShell(root, name, safeHandle, profile) {\r\n    if (root) {\r\n      if (\r\n        (root.classList.add(\"dsd-up315\", \"dsd-up353\"),\r\n        qs(\".dsd-up315__identity-copy h1\", root) &&\r\n          qs(\"[data-dsd-profile-story-slot]\", root) &&\r\n          qs(\".dsd-up315__cover\", root))\r\n      ) {\n        ensureProfileLocationNode(root);\n        ensureProfileExternalLinkNode(root);\n        ensureProfileContentNavigation(root);\n        return;\n      }\r\n      var shellPending =\r\n          !String(name || \"\").trim() &&\r\n          !String(safeHandle || \"\").trim() &&\r\n          !profileRecordHasUsableKey(profile),\r\n        label = shellPending\r\n          ? \"\"\r\n          : publicDisplayName(name || \"DSD member\", \"DSD member\"),\r\n        handle = shellPending\r\n          ? \"\"\r\n          : publicHandleText(safeHandle || label, label, \"member\"),\r\n        avatarSeed = initials(label || handle || \"DS\").slice(0, 2),\r\n        storySeed = shellPending ? \"\" : avatarSeed;\r\n      if (\r\n        ((root.innerHTML =\r\n          '<div class=\"dsd-up315__shell dsd-up353__shell\" data-dsd-profile-shell-recovered=\"canonical\"><article class=\"dsd-up315__card dsd-up353__card\" aria-label=\"User profile\" data-dsd-profile-surface=\"identity-content-experience\"><div class=\"dsd-up315__cover dsd-up353__cover\" style=\"--dsd-up315-cover:linear-gradient(135deg,rgba(20,24,42,.92),rgba(118,83,178,.38));\"><button type=\"button\" class=\"dsd-up315__cover-edit\" data-dsd-profile-modal-open=\"banner\" data-dsd-owner-control hidden disabled aria-hidden=\"true\" style=\"display:none!important\">Edit banner</button></div><div class=\"dsd-up315__body dsd-up353__body\"><section class=\"dsd-up315__hero dsd-up353__hero\" aria-label=\"Profile identity, about, and actions\" data-dsd-profile-block=\"identity-about\"><div class=\"dsd-up315__identity dsd-up353__identity\"><div class=\"dsd-up315__avatar-wrap dsd-up353__avatar-wrap\"><div class=\"dsd-up315__avatar dsd-up353__avatar\" aria-label=\"Profile avatar\">' +\r\n          html(shellPending ? \"\" : avatarSeed) +\r\n          '</div><button type=\"button\" class=\"dsd-up315__photo-edit\" data-dsd-profile-modal-open=\"avatar\" data-dsd-owner-control hidden disabled aria-hidden=\"true\" style=\"display:none!important\">Edit photo</button></div><div class=\"dsd-up315__identity-copy dsd-up353__identity-copy\"><h1 data-dsd-profile-name>' +\r\n          html(label) +\r\n          '</h1><p class=\"dsd-up315__handle dsd-up353__handle\" data-dsd-profile-handle>' +\r\n          (handle ? \"@\" + html(handle) : \"\") +\r\n          '</p><p class=\"dsd-up315__bio dsd-up353__bio\" data-dsd-profile-about data-dsd-profile-bio>' +\n          html(shellPending ? \"\" : profileBioDisplayText(profile, !1)) +\n          '</p><p class=\"dsd-up315__location dsd-up353__location\" data-dsd-profile-location hidden></p><a class=\"dsd-up315__external-link\" data-dsd-profile-external-link target=\"_blank\" rel=\"noopener noreferrer external\" hidden></a></div></div><div class=\"dsd-up315__actions dsd-up353__actions\" aria-label=\"Profile actions\"><button type=\"button\" class=\"dsd-up315__action dsd-up315__action--gold\" data-dsd-profile-modal-open=\"edit\" data-dsd-owner-control hidden disabled aria-hidden=\"true\" style=\"display:none!important\">Edit Profile</button></div></section><section class=\"dsd-up353__relationship-strip\" aria-label=\"Profile relationship layer\" data-dsd-owner=\"ProfileRelationshipModal\" data-dsd-relationship-layer=\"modal-launchers\"><button type=\"button\" data-dsd-profile-modal-open=\"followers\" data-dsd-relationship-tab=\"followers\"><strong>0</strong><span>Followers</span></button><button type=\"button\" data-dsd-profile-modal-open=\"following\" data-dsd-relationship-tab=\"following\"><strong>0</strong><span>Following</span></button><button type=\"button\" data-dsd-profile-modal-open=\"favorites\" data-dsd-relationship-tab=\"favorites\"><strong>0</strong><span>Favorites</span></button><button type=\"button\" data-dsd-profile-modal-open=\"saved\" data-dsd-relationship-tab=\"saved\"><strong>0</strong><span>Saved</span></button></section><section class=\"dsd-story385__profile-slot\" aria-label=\"Profile stories\" data-dsd-profile-story-slot=\"p11dz385\" data-dsd-owner=\"StoryTray\" data-dsd-contract=\"profile-story-slot-owner-scoped-shell\"><div class=\"dsd-story385__profile-slot-head\"><div><strong>Stories</strong><span>Stories from this profile</span></div><button type=\"button\" data-dsd-story385-profile-action=\"create\">Create story</button></div><div class=\"dsd-story385__tray\" aria-label=\"Profile story tray\"><article class=\"dsd-story385__tray-card\" data-dsd-story385-profile-action=\"view-self\"><div class=\"dsd-story385__avatar\">' +\n          html(storySeed) +\r\n          '</div><strong>Story</strong><span>No active story</span></article></div></section><section class=\"dsd-up356__content-shell\" aria-label=\"Profile content architecture\" data-dsd-profile-content-architecture data-dsd-owner=\"ProfileContentController\" data-dsd-contract=\"profile-content-launch-activated\"><section class=\"dsd-up315__feed dsd-profile-feed dsd-up353__feed dsd-up356__feed\" id=\"profile-feed\" data-dsd-contract=\"profile-feed\" data-dsd-owner=\"FeedRenderer\" aria-label=\"Profile content feed\"><div class=\"dsd-up315__feed-title\"><h2 data-dsd-profile-content-title>Posts</h2></div><div class=\"dsd-up356__content-panel is-active\" data-dsd-profile-content-panel=\"posts\"><div class=\"dsd-up315__feed-list\" data-dsd-profile-feed-list data-dsd-profile-post-list></div></div></section></section></div></article><div class=\"dsd-up315__modal-layer dsd-up353__modal-layer\" data-dsd-profile-modal-layer hidden></div></div>'),\r\n        !qs(\"[data-dsd-profile-publisher]\", root))\r\n      ) {\n        var contentShell = qs(\"[data-dsd-profile-content-architecture]\", root);\n        contentShell &&\r\n          contentShell.insertAdjacentHTML(\r\n            \"afterbegin\",\r\n            '<section class=\"dsd-up315__composer dsd-up353__composer\" data-dsd-profile-publisher data-dsd-contract=\"profile-v3-publisher-launch-activated\" data-dsd-owner=\"PostComposerController\" aria-label=\"Profile post composer\" data-dsd-legacy-profile-composer-deconstructed=\"' +\r\n              html(BUILD) +\r\n              '\"></section>',\r\n          );\n      }\n      ensureProfileContentNavigation(root);\n    }\n  }\n  function ensureProfileContentNavigation(root) {\n    var shell = root && qs(\"[data-dsd-profile-content-architecture]\", root),\n      feed = shell && qs(\"[data-dsd-profile-post-list]\", shell),\n      postsPanel = feed && feed.closest('[data-dsd-profile-content-panel=\"posts\"]');\n    if (!shell || !feed || !postsPanel) return;\n    var legacyNav = qs(\"[data-dsd-profile-nav]\", shell);\n    legacyNav && legacyNav.remove();\n    var counts = qs(\".dsd-up356__content-counts\", shell);\n    if (!counts) {\n      postsPanel.insertAdjacentHTML(\n        \"beforebegin\",\n        '<nav class=\"dsd-up356__content-counts dsd-up356__content-nav\" data-dsd-profile-content-nav aria-label=\"Profile content\"><button type=\"button\" class=\"is-active\" data-dsd-profile-content-tab=\"posts\"><strong>0</strong><span>Posts</span></button><button type=\"button\" data-dsd-profile-content-tab=\"media\"><strong>0</strong><span>Media</span></button></nav>',\n      );\n      counts = qs(\".dsd-up356__content-counts\", shell);\n    }\n    if (counts) {\n      counts.hidden = !1;\n      counts.removeAttribute(\"aria-hidden\");\n      counts.setAttribute(\"data-dsd-profile-content-nav\", \"\");\n      if (!qs(\"[data-dsd-profile-content-search]\", shell))\n        counts.insertAdjacentHTML(\n          \"afterend\",\n          '<label class=\"dsd-profile-content-search\">Search this profile<input type=\"search\" data-dsd-profile-content-search autocomplete=\"off\" placeholder=\"Search Posts and media\"></label>',\n        );\n    }\n    var mediaPanel = qs('[data-dsd-profile-content-panel=\"media\"]', shell);\n    if (!mediaPanel) {\n      postsPanel.insertAdjacentHTML(\n        \"afterend\",\n        '<div class=\"dsd-up356__content-panel\" data-dsd-profile-content-panel=\"media\"><div class=\"dsd-profile-media-grid\" data-dsd-profile-media-grid></div></div>',\n      );\n    } else if (!qs(\"[data-dsd-profile-media-grid]\", mediaPanel)) {\n      mediaPanel.innerHTML = '<div class=\"dsd-profile-media-grid\" data-dsd-profile-media-grid></div>';\n    }\n    var activeTab = qs(\"[data-dsd-profile-content-tab].is-active\", root);\r\n    activateProfileContentTab(\r\n      (activeTab && activeTab.getAttribute(\"data-dsd-profile-content-tab\")) ||\r\n        \"posts\",\r\n      root,\r\n    );\r\n  }\n  function renderProfileMediaProjection(root) {\n    root = root || qs(\"[data-dsd-user-profile]\");\n    var grid = root && qs(\"[data-dsd-profile-media-grid]\", root);\n    if (!grid) return;\n    var target = profileContentTargetIdentity(),\n      profile = target.profile || {},\n      query = String(state.profileContentSearch || \"\").trim().toLowerCase(),\n      rows = [];\n    if (target.ready && canViewProfileContent(profile))\n      (state.posts || []).forEach(function (record) {\n        var post = publicRenderablePost(record);\n        if (!post || !recordBelongsToProfile(post, target.targetUid, target.targetKey, \"authorUid\")) return;\n        var body = publicDisplayText(post.body || \"\", \"\");\n        if (query && body.toLowerCase().indexOf(query) < 0) return;\n        safeMediaItemsForRecord(post).forEach(function (media, index) {\n          rows.push({ post: post, media: media, index: index, body: body });\n        });\n      });\n    var markup = rows.slice(0, 48).map(function (row) {\n      var postId = row.post.postId || row.post.id || \"\",\n        kind = row.media.kind === \"video\" ? \"video\" : \"image\";\n      return '<article class=\"dsd-profile-media-item dsd-post-card\" data-post-id=\"' + html(postId) + '\"><figure class=\"dsd-launch-media-chip dsd-launch-media-chip--' + html(kind) + '\" data-dsd-media-index=\"' + html(row.index) + '\" data-dsd-inline-media=\"true\" data-dsd-post-media-inline-only=\"true\"' + mediaReadAttrs(row.media) + ' data-dsd-media-kind=\"' + html(kind) + '\" data-dsd-media-status=\"' + html(row.media.status || \"uploaded\") + '\"></figure><small>' + html(row.body.slice(0, 90) || (kind === \"video\" ? \"Video Post\" : \"Photo Post\")) + \"</small></article>\";\n    }).join(\"\");\n    grid.innerHTML = markup || '<div class=\"dsd-up356__empty-state\"><strong>No permitted media found</strong><p>Media from visible Posts appears here.</p></div>';\n    hydrateMediaReads(grid);\n  }\n  function ensureProfileLocationNode(root) {\n    if (!(!root || qs(\"[data-dsd-profile-location]\", root))) {\r\n      var identityCopy = qs(\r\n        \".dsd-up315__identity-copy, .dsd-up353__identity-copy\",\r\n        root,\r\n      );\r\n      if (identityCopy) {\r\n        var bioNode = qs(\r\n            \"[data-dsd-profile-about], [data-dsd-profile-bio]\",\r\n            identityCopy,\r\n          ),\r\n          locationNode = document.createElement(\"p\");\r\n        ((locationNode.className = \"dsd-up315__location dsd-up353__location\"),\r\n          locationNode.setAttribute(\"data-dsd-profile-location\", \"\"),\r\n          (locationNode.hidden = !0),\r\n          bioNode && bioNode.parentNode === identityCopy\r\n            ? bioNode.insertAdjacentElement(\"afterend\", locationNode)\r\n            : identityCopy.appendChild(locationNode));\r\n      }\r\n    }\r\n  }\r\n  function profileBioDisplayText(profile, isOwn) {\r\n    var text =\r\n      profile &&\r\n      (profile.bio ||\r\n        profile.about ||\r\n        profile.description ||\r\n        profile.profileBio ||\r\n        profile.summary ||\r\n        \"\");\r\n    return text\r\n      ? publicDisplayText(text, \"\")\r\n      : isOwn && state.profile && !state.profile.setupComplete\r\n        ? \"Complete profile setup to publish your public profile.\"\r\n        : \"\";\r\n  }\r\n  function profileLocationText(profile) {\r\n    profile = profile || {};\r\n    var key = profile.profileKey || profile.profile_key || profile.handle || \"\",\r\n      targetUid = profile.uid || profile.userId || profile.user_id || \"\";\r\n    if (\r\n      !identityMatchesCurrent(targetUid, key) &&\r\n      !profileBooleanFlag(\r\n        profile,\r\n        [\r\n          \"showCurrentCityOnProfile\",\r\n          \"show_current_city_on_profile\",\r\n          \"showCurrentCity\",\r\n          \"show_current_city\",\r\n        ],\r\n        !0,\r\n      )\r\n    )\r\n      return \"\";\r\n    var location2 = String(profile.location || \"\").trim();\r\n    return location2\r\n      ? publicDisplayText(location2, \"\")\r\n      : [\r\n          profile.locationCity || profile.city,\r\n          profile.locationState || profile.state,\r\n        ]\r\n          .filter(Boolean)\r\n          .join(\", \");\r\n  }\r\n  function profileLocationIcon(kind) {\r\n    var path =\r\n      kind === \"active\"\r\n        ? \"M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5Z\"\r\n        : \"M3 10.8 12 3l9 7.8-1.3 1.5-1.7-1.5V21h-5v-6h-2v6H6V10.8l-1.7 1.5L3 10.8Z\";\r\n    return (\r\n      '<svg class=\"dsd-location-meta__icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"' +\r\n      path +\r\n      '\"></path></svg>'\r\n    );\r\n  }\r\n  function ownerActiveLocationLabel(profile) {\r\n    if (activeRouteSurface() !== \"profile\") return \"\";\r\n    var authenticatedOwnerRoute =\r\n      hasCustomer() && activeRouteSurface() === \"profile\" && !routeProfileKey();\r\n    if (!authenticatedOwnerRoute && !nearbyProfileIsCurrentViewer(profile))\r\n      return \"\";\r\n    var privateProfile = profileRecordHasUsableKey(state.profile)\r\n        ? state.profile\r\n        : profileRecordHasUsableKey(profile)\r\n          ? profile\r\n          : state.profile || profile || {},\r\n      ownerProfile =\r\n        profileWithPublicMirror(privateProfile) || privateProfile || {},\r\n      usesApproximateLocation = profileBooleanFlag(\r\n        ownerProfile,\r\n        [\r\n          \"useApproximateLocationForNearby\",\r\n          \"use_approximate_location_for_nearby\",\r\n        ],\r\n        !0,\r\n      );\r\n    if (!usesApproximateLocation) return \"\";\r\n    var persistedAt =\r\n        Date.parse(\r\n          ownerProfile.nearbyLocationUpdatedAt ||\r\n            ownerProfile.nearby_location_captured_at ||\r\n            ownerProfile.nearby_location_updated_at ||\r\n            \"\",\r\n        ) || 0,\r\n      persistedLocationFresh =\r\n        persistedAt > 0 &&\r\n        Date.now() - persistedAt < ACTIVE_LOCATION_FRESHNESS_MS;\r\n    return !usableNearbyLocation() && !persistedAt\r\n      ? \"Refresh active location\"\r\n      : persistedLocationFresh || usableNearbyLocation()\r\n        ? \"Active location on\"\r\n        : \"Active location on (refresh recommended)\";\r\n  }\r\n  function profileLocationMetaHTML(profile) {\r\n    var hometown = profileLocationText(profile),\r\n      active =\r\n        ownerActiveLocationLabel(profile) || nearbyDistanceLabel(profile),\r\n      parts = [];\r\n    return (\r\n      hometown &&\r\n        parts.push(\r\n          '<span class=\"dsd-location-meta__item\" data-dsd-location-kind=\"hometown\" aria-label=\"Hometown: ' +\r\n            html(hometown) +\r\n            '\">' +\r\n            profileLocationIcon(\"home\") +\r\n            \"<span>\" +\r\n            html(hometown) +\r\n            \"</span></span>\",\r\n        ),\r\n      active &&\r\n        parts.push(\r\n          '<span class=\"dsd-location-meta__item\" data-dsd-location-kind=\"active\" aria-label=\"Active location: ' +\r\n            html(active) +\r\n            '\">' +\r\n            profileLocationIcon(\"active\") +\r\n            \"<span>\" +\r\n            html(active) +\r\n            \"</span></span>\",\r\n        ),\r\n      parts.join(\r\n        '<span class=\"dsd-location-meta__separator\" aria-hidden=\"true\">&middot;</span>',\r\n      )\r\n    );\r\n  }\r\n  function profileLocationParts(profile) {\r\n    profile = profile || {};\r\n    var city = String(profile.locationCity || profile.city || \"\")\r\n        .trim()\r\n        .toLowerCase(),\r\n      region = String(profile.locationState || profile.state || \"\")\r\n        .trim()\r\n        .toLowerCase();\r\n    if ((!city || !region) && profile.location) {\r\n      var parts = String(profile.location || \"\")\r\n        .split(\",\")\r\n        .map(function (part) {\r\n          return part.trim().toLowerCase();\r\n        })\r\n        .filter(Boolean);\r\n      ((city = city || parts[0] || \"\"), (region = region || parts[1] || \"\"));\r\n    }\r\n    return {\r\n      city: city,\r\n      state: region,\r\n      text: [city, region].filter(Boolean).join(\", \"),\r\n    };\r\n  }\r\n  function loadNearbyLocationState() {\n    try {\r\n      localStorage.removeItem(\"dsd.nearby.location.v1\");\r\n    } catch (e) {}\r\n  }\n  function nearbyLocationStatusMessage() {\n    var locationState = (state.discoveryLocation || {}).status || \"idle\",\n      permission =\n        (state.discoveryLocation || {}).permissionState || \"unknown\";\n    if (permission === \"denied\" || locationState === \"denied\")\n      return \"Browser location is denied. You can continue without Nearby. Change browser permission before trying again.\";\n    if (locationState === \"locating\") return \"Finding location...\";\n    if (locationState === \"persisted\" || locationState === \"ready\")\n      return \"Last location saved. Exact coordinates stay private.\";\n    if (locationState === \"inaccurate\")\n      return \"Location accuracy is too low. The last valid active location was preserved.\";\n    if (locationState === \"stale\")\n      return \"The device returned an old location. The last valid active location was preserved.\";\n    if (locationState === \"timeout\")\n      return \"Location timed out. The last valid active location was preserved.\";\n    if (locationState === \"unavailable\")\n      return \"Location is unavailable in this browser. Your hometown remains available for Map discovery.\";\n    if (locationState === \"rejected\")\n      return \"Active location was not updated. Try Refresh location again.\";\n    return \"Browser location has not been requested on this device.\";\n  }\n  function renderNearbyProfileLocationState(root) {\n    qsa(\"[data-dsd-nearby-location-status]\", root || document).forEach(\n      function (node) {\n        node.textContent = nearbyLocationStatusMessage();\n      },\n    );\n  }\n  function saveNearbyLocationState(next) {\n    state.discoveryLocation = Object.assign(\n      {},\n      state.discoveryLocation,\n      next || {},\n    );\n    try {\n      localStorage.removeItem(\"dsd.nearby.location.v1\");\n    } catch (e) {}\n    renderNearbyProfileLocationState();\n  }\n  function usableNearbyLocation() {\r\n    var loc = state.discoveryLocation || {},\r\n      age = Date.now() - Number(loc.updatedAt || 0);\r\n    return (\r\n      loc.status === \"ready\" &&\r\n      isFinite(Number(loc.latitude)) &&\r\n      isFinite(Number(loc.longitude)) &&\r\n      age < ACTIVE_LOCATION_FRESHNESS_MS\r\n    );\r\n  }\r\n  function persistedNearbyLocationAvailable() {\r\n    var profile = profileWithPublicMirror(state.profile || {}) || state.profile || {},\r\n      enabled = profileBooleanFlag(\r\n        profile,\r\n        [\r\n          \"useApproximateLocationForNearby\",\r\n          \"use_approximate_location_for_nearby\",\r\n        ],\r\n        !0,\r\n      ),\r\n      refreshedAt =\r\n        Date.parse(\r\n          profile.nearbyLocationUpdatedAt ||\r\n            profile.nearby_location_captured_at ||\r\n            profile.nearby_location_updated_at ||\r\n            \"\",\r\n        ) || 0;\r\n    return (\r\n      enabled &&\r\n      refreshedAt > 0\r\n    );\r\n  }\r\n  function persistedNearbyLocationFresh() {\r\n    var profile = profileWithPublicMirror(state.profile || {}) || state.profile || {},\r\n      refreshedAt =\r\n        Date.parse(\r\n          profile.nearbyLocationUpdatedAt ||\r\n            profile.nearby_location_captured_at ||\r\n            profile.nearby_location_updated_at ||\r\n            \"\",\r\n        ) || 0;\r\n    return (\r\n      persistedNearbyLocationAvailable() &&\r\n      Date.now() - refreshedAt < ACTIVE_LOCATION_FRESHNESS_MS\r\n    );\r\n  }\r\n  function persistedNearbyLocationUsable() {\r\n    return persistedNearbyLocationAvailable();\r\n  }\r\n  function usableNearbyQueryLocation() {\r\n    return usableNearbyLocation() || persistedNearbyLocationAvailable();\r\n  }\r\n  function nearbyLocationStale() {\r\n    return !usableNearbyLocation() && !persistedNearbyLocationFresh();\r\n  }\r\n  function profileBooleanFlag(profile, keys, defaultValue) {\r\n    profile = profile || {};\r\n    for (var i = 0; i < keys.length; i += 1)\r\n      if (Object.prototype.hasOwnProperty.call(profile, keys[i]))\r\n        return (\r\n          profile[keys[i]] !== !1 &&\r\n          profile[keys[i]] !== \"false\" &&\r\n          profile[keys[i]] !== 0 &&\r\n          profile[keys[i]] !== \"0\"\r\n        );\r\n    return defaultValue !== !1;\r\n  }\r\n  function activeLocationDeviceSessionId() {\r\n    var storageKey = \"dsd.activeLocation.deviceSession.v1\",\r\n      value = \"\";\r\n    try {\r\n      value = String(sessionStorage.getItem(storageKey) || \"\").trim();\r\n      if (!value) {\r\n        value =\r\n          \"loc-\" +\r\n          (window.crypto && typeof window.crypto.randomUUID == \"function\"\r\n            ? window.crypto.randomUUID()\r\n            : Date.now().toString(36) + Math.random().toString(36).slice(2));\r\n        sessionStorage.setItem(storageKey, value);\r\n      }\r\n    } catch (e) {\r\n      value = \"loc-\" + Date.now().toString(36) + Math.random().toString(36).slice(2);\r\n    }\r\n    return value.slice(0, 120);\r\n  }\r\n  function nearbyParticipationAllowed(profile) {\r\n    return profileBooleanFlag(\r\n      profile,\r\n      [\r\n        \"appearInNearby\",\r\n        \"appear_in_nearby\",\r\n        \"nearbyVisible\",\r\n        \"nearby_visible\",\r\n        \"discoveryNearbyEnabled\",\r\n        \"discovery_nearby_enabled\",\r\n        \"nearbyOptIn\",\r\n        \"nearby_opt_in\",\r\n      ],\r\n      !0,\r\n    );\r\n  }\r\n  function nearbyProfileIsCurrentViewer(profile) {\r\n    if (!profile || !hasCustomer()) return !1;\r\n    var key = normalizedProfileKeyValue(\n        profile.profileKey || profile.profile_key || profile.handle || \"\",\r\n      ),\r\n      profileUid = String(\r\n        profile.uid || profile.userId || profile.user_id || \"\",\r\n      ).trim();\r\n    return identityMatchesCurrent(profileUid, key);\r\n  }\r\n  function nearbyDistanceVisibilityAllowed(profile) {\n    if (\r\n      !hasCustomer() ||\r\n      nearbyProfileIsCurrentViewer(profile) ||\r\n      relationshipBlocked(\r\n        profile && (profile.uid || profile.userId || profile.user_id),\r\n      )\r\n    )\r\n      return !1;\r\n    return !0;\n  }\r\n  function serverDistanceMiles(profile) {\r\n    profile = profile || {};\r\n    var raw =\r\n        profile.viewerDistanceMiles != null\r\n          ? profile.viewerDistanceMiles\r\n          : profile.viewer_distance_miles != null\r\n            ? profile.viewer_distance_miles\r\n            : profile.distanceMiles != null\r\n              ? profile.distanceMiles\r\n              : profile.distance_miles != null\r\n                ? profile.distance_miles\r\n                : profile.nearbyDistanceMiles != null\r\n                  ? profile.nearbyDistanceMiles\r\n                  : profile.nearby_distance_miles,\r\n      miles = Number(raw);\r\n    return isFinite(miles) && miles >= 0 ? miles : null;\r\n  }\r\n  function bucketDistanceLabel(miles) {\r\n    miles = Number(miles);\r\n    if (!isFinite(miles) || miles < 0) return \"\";\r\n    if (miles < 200 / 5280) return \"Nearby\";\r\n    if (miles < 1) return \"Less than 1 mile away\";\r\n    if (miles < 2) return \"1 mile away\";\r\n    if (miles < 1) return \"Less than 1 mile away\";\r\n    if (miles < 2) return \"1 mile away\";\r\n    if (miles < 10) return Math.round(miles) + \" miles away\";\r\n    if (miles < 100) return Math.round(miles) + \" miles away\";\r\n    if (miles < 1000)\r\n      return Math.round(miles / 10) * 10 + \" miles away\";\r\n    return (\r\n      (Math.round(miles / 100) / 10).toFixed(1).replace(/\\.0$/, \"\") +\r\n      \"k miles away\"\r\n    );\r\n  }\r\n  function nearbyDistanceLabel(profile) {\n    if (!nearbyDistanceVisibilityAllowed(profile)) return \"\";\n    var rawLabel = String(\n      (profile &&\r\n        (profile.viewerDistanceLabel ||\r\n          profile.viewer_distance_label ||\r\n          profile.distanceLabel ||\r\n          profile.distance_label ||\r\n          profile.distanceBucket ||\r\n          profile.distance_bucket ||\r\n          \"\")) ||\r\n        \"\",\r\n    ).trim();\r\n    if (/coordinate|latitude|longitude|\\d+\\.\\d+/.test(rawLabel.toLowerCase()))\r\n      return \"\";\r\n    var miles = serverDistanceMiles(profile);\n    if (miles !== null) return bucketDistanceLabel(miles);\n    if (rawLabel) return publicDisplayText(rawLabel, \"\");\n    if (\n      profile &&\n      (profile.activeLocationVisible === !0 ||\n        profile.active_location_visible === !0)\n    )\n      return \"Active location on\";\n    return \"\";\n  }\r\n  function nearbySortValue(profile) {\n    if (\r\n      nearbyProfileIsCurrentViewer(profile) ||\r\n      !nearbyParticipationAllowed(profile)\r\n    )\r\n      return Number.POSITIVE_INFINITY;\r\n    var miles = serverDistanceMiles(profile);\n    return miles !== null ? miles : Number.POSITIVE_INFINITY;\n  }\n  function ensureProfileExternalLinkNode(root) {\n    if (!root || qs(\"[data-dsd-profile-external-link]\", root)) return;\n    var identityCopy = qs(\".dsd-up315__identity-copy, .dsd-up353__identity-copy\", root);\n    if (!identityCopy) return;\n    var link = document.createElement(\"a\");\n    link.className = \"dsd-up315__external-link\";\n    link.setAttribute(\"data-dsd-profile-external-link\", \"\");\n    link.setAttribute(\"target\", \"_blank\");\n    link.setAttribute(\"rel\", \"noopener noreferrer external\");\n    link.hidden = !0;\n    identityCopy.appendChild(link);\n  }\n  function discoveryProximitySortTuple(profile) {\n    var miles = serverDistanceMiles(profile),\n      viewerLocation = profileLocationParts(state.profile || {}),\n      targetLocation = profileLocationParts(profile || {}),\n      exactHometown = !!(\n        viewerLocation.city &&\n        targetLocation.city &&\n        viewerLocation.city === targetLocation.city &&\n        (!viewerLocation.state ||\n          !targetLocation.state ||\n          viewerLocation.state === targetLocation.state)\n      ),\n      sameState = !!(\n        viewerLocation.state &&\n        targetLocation.state &&\n        viewerLocation.state === targetLocation.state\n      );\n    return miles !== null\n      ? [0, miles]\n      : exactHometown\n        ? [1, 0]\n        : sameState\n          ? [2, 0]\n          : targetLocation.text\n            ? [3, 0]\n            : [4, 0];\n  }\n  function compareDiscoveryByProximity(a, b) {\n    var aRank = discoveryProximitySortTuple(a),\n      bRank = discoveryProximitySortTuple(b),\n      rankOrder = aRank[0] - bRank[0] || aRank[1] - bRank[1],\n      aName = String(\n        a.displayName || a.display_name || a.handle || \"\",\n      ).toLowerCase(),\n      bName = String(\n        b.displayName || b.display_name || b.handle || \"\",\n      ).toLowerCase();\n    return rankOrder || aName.localeCompare(bName);\n  }\n  function nearbyDiscoveryMatch(profile) {\r\n    return !hasCustomer() ||\r\n      !nearbyParticipationAllowed(profile) ||\r\n      nearbyProfileIsCurrentViewer(profile)\r\n      ? !1\r\n      : profile.nearbyQueryEligible === !0 ||\r\n          serverDistanceMiles(profile) !== null ||\r\n          !!(\r\n            profile &&\r\n            (profile.viewerDistanceLabel || profile.viewer_distance_label)\r\n          );\r\n  }\r\n  function nearbyDiscoveryCacheKey() {\n    if (!usableNearbyQueryLocation())\n      return hasCustomer()\n        ? [\n            \"persisted-server\",\n            normalizedProfileKeyValue(activeProfileKeyValue() || profileKey() || \"\") ||\n              \"authenticated-viewer\",\n            String(NEARBY_DISCOVERY_MAX_MILES),\n            String(NEARBY_DISCOVERY_PAGE_LIMIT),\n          ].join(\"|\")\n        : \"\";\n    var loc = state.discoveryLocation || {};\r\n    if (!usableNearbyLocation()) {\r\n      var profile = profileWithPublicMirror(state.profile || {}) || state.profile || {};\r\n      return [\r\n        \"persisted\",\r\n        String(\r\n          profile.nearbyLocationUpdatedAt ||\r\n            profile.nearby_location_updated_at ||\r\n            \"\",\r\n        ),\r\n        String(NEARBY_DISCOVERY_MAX_MILES),\r\n        String(NEARBY_DISCOVERY_PAGE_LIMIT),\r\n      ].join(\"|\");\r\n    }\r\n    return [\r\n      Number(loc.latitude).toFixed(2),\r\n      Number(loc.longitude).toFixed(2),\r\n      String(Math.round(Number(loc.accuracyMeters) || 0)),\r\n      String(NEARBY_DISCOVERY_MAX_MILES),\r\n      String(NEARBY_DISCOVERY_PAGE_LIMIT),\r\n    ].join(\"|\");\r\n  }\r\n  function cachedNearbyDiscoveryRows() {\r\n    var key = nearbyDiscoveryCacheKey();\r\n    return !key ||\r\n      state.nearbyDiscoveryCacheKey !== key ||\r\n      Date.now() - Number(state.nearbyDiscoveryCacheAt || 0) > 6e4\r\n      ? null\r\n      : state.nearbyDiscoveryRows || [];\r\n  }\r\n  function cachedDsdPlusDiscoveryRows() {\r\n    return Date.now() - Number(state.dsdPlusDiscoveryCacheAt || 0) > 6e4\r\n      ? null\r\n      : state.dsdPlusDiscoveryRows || [];\r\n  }\r\n  function fetchDsdPlusDiscoveryRows(force) {\r\n    var cached = cachedDsdPlusDiscoveryRows();\r\n    if (!force && cached) return Promise.resolve(cached);\r\n    if (state.dsdPlusDiscoveryPending)\r\n      return Promise.resolve(state.dsdPlusDiscoveryRows || []);\r\n    var adapter = supabaseAdapter();\r\n    return !adapter || typeof adapter.dsdPlusDiscoveryProfiles != \"function\"\r\n      ? Promise.resolve([])\r\n      : ((state.dsdPlusDiscoveryPending = !0),\r\n        adapter\r\n          .dsdPlusDiscoveryProfiles(\r\n            { limit: NEARBY_DISCOVERY_PAGE_LIMIT, offset: 0 },\r\n            {\r\n              publicRead: !hasCustomer(),\r\n              viewerAuthenticated: hasCustomer(),\r\n              surface: \"dsdplus-discovery\",\r\n            },\r\n          )\r\n          .then(function (rows) {\r\n            return (\r\n              (state.dsdPlusDiscoveryPending = !1),\r\n              (state.dsdPlusDiscoveryCacheAt = Date.now()),\r\n              (state.dsdPlusDiscoveryRows = dedupePublicProfiles(\r\n                rows || [],\r\n              ).filter(function (profile) {\r\n                return profile && profile.dsdPlus === !0;\r\n              })),\r\n              state.dsdPlusDiscoveryRows.length &&\n                (state.publicProfiles = dedupePublicProfiles(\n                  (state.publicProfiles || []).concat(\n                    state.dsdPlusDiscoveryRows,\n                  ),\n                )),\n              hasCustomer() &&\n                state.dsdPlusDiscoveryRows.length &&\n                fetchTargetDistanceRows(\n                  state.dsdPlusDiscoveryRows,\n                  \"dsdplus-discovery-page\",\n                  !1,\n                ),\n              claim(\"dsdplus-discovery-rpc:loaded\", {\n                rows: state.dsdPlusDiscoveryRows.length,\r\n                source: \"app_users-server-derived-entitlement\",\r\n              }),\r\n              renderDiscovery(),\r\n              state.dsdPlusDiscoveryRows\r\n            );\r\n          })\r\n          .catch(function (error) {\r\n            return (\r\n              (state.dsdPlusDiscoveryPending = !1),\r\n              claim(\"dsdplus-discovery-rpc:fail-closed\", {\r\n                error: (error && error.message) || String(error),\r\n              }),\r\n              []\r\n            );\r\n          }));\r\n  }\r\n  function fetchNearbyDiscoveryRows(force) {\n    if (!hasCustomer()) {\n      state.nearbyDiscoveryRows = [];\r\n      state.nearbyDiscoveryCacheKey = \"\";\r\n      state.nearbyDiscoveryLoadedAt = 0;\r\n      return Promise.resolve([]);\r\n    }\r\n    var key = nearbyDiscoveryCacheKey();\r\n    if (!key) return Promise.resolve([]);\r\n    if (!force && cachedNearbyDiscoveryRows())\r\n      return Promise.resolve(state.nearbyDiscoveryRows || []);\r\n    if (\n      state.nearbyDiscoveryPendingKey === key &&\n      state.nearbyDiscoveryPendingPromise\n    )\n      return state.nearbyDiscoveryPendingPromise;\n    var adapter = supabaseAdapter();\r\n    if (\r\n      !adapter ||\r\n      typeof adapter.nearbyDiscoveryProfilesFromStoredLocation != \"function\"\r\n    )\r\n      return Promise.resolve([]);\r\n    state.nearbyDiscoveryPendingKey = key;\r\n    var request = adapter.nearbyDiscoveryProfilesFromStoredLocation(\r\n      {\r\n        maxMiles: NEARBY_DISCOVERY_MAX_MILES,\r\n        limit: NEARBY_DISCOVERY_PAGE_LIMIT,\r\n        offset: 0,\r\n      },\r\n      { surface: \"nearby-discovery-persisted\", maxAgeMs: 60 * 1e3 },\r\n    );\r\n    var pending = request\n      .then(function (rows) {\n        return (\r\n          (state.nearbyDiscoveryPendingKey = \"\"),\r\n          (state.nearbyDiscoveryCacheKey = key),\r\n          (state.nearbyDiscoveryCacheAt = Date.now()),\r\n          (state.nearbyDiscoveryRows = dedupePublicProfiles(rows || [])\r\n            .filter(function (row) {\r\n              return !nearbyProfileIsCurrentViewer(row);\r\n            })\r\n            .map(function (row) {\r\n              return Object.assign({}, row, { nearbyQueryEligible: !0 });\r\n            })),\r\n          state.nearbyDiscoveryRows.length &&\r\n            (state.publicProfiles = (state.publicProfiles || []).map(\r\n              function (profile) {\r\n                var key = normalizedProfileKeyValue(\r\n                    profile &&\r\n                      (profile.profileKey ||\r\n                        profile.profile_key ||\r\n                        profile.handle ||\r\n                        \"\"),\r\n                  ),\r\n                  nearby = state.nearbyDiscoveryRows.find(function (row) {\r\n                    return (\r\n                      normalizedProfileKeyValue(\r\n                        row &&\r\n                          (row.profileKey || row.profile_key || row.handle || \"\"),\r\n                      ) === key\r\n                    );\r\n                  });\r\n                return nearby\r\n                  ? Object.assign({}, profile, {\r\n                      appearInNearby: nearby.appearInNearby === !0,\r\n                      appear_in_nearby: nearby.appearInNearby === !0,\r\n                      showDistanceToUsers: nearby.showDistanceToUsers === !0,\r\n                      show_distance_to_users:\r\n                        nearby.showDistanceToUsers === !0,\r\n                      showCurrentCityOnProfile:\r\n                        nearby.showCurrentCityOnProfile === !0,\r\n                      show_current_city_on_profile:\r\n                        nearby.showCurrentCityOnProfile === !0,\r\n                      locationPrivacyHydrated: !0,\r\n                      viewerDistanceMiles: nearby.viewerDistanceMiles,\r\n                      viewerDistanceLabel: nearby.viewerDistanceLabel || \"\",\r\n                    })\r\n                  : profile;\r\n              },\r\n            )),\r\n          claim(\"nearby-discovery-rpc:loaded\", {\r\n            rows: state.nearbyDiscoveryRows.length,\r\n            exactCoordinatesExposed: !1,\r\n            cacheTtlMs: 6e4,\r\n          }),\r\n          renderDiscovery(),\r\n          state.nearbyDiscoveryRows\r\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          (state.nearbyDiscoveryPendingKey = \"\"),\r\n          claim(\"nearby-discovery-rpc:fallback\", {\r\n            error: (error && error.message) || String(error),\r\n            fallback: \"city-state-local-filter\",\r\n          }),\r\n          state.nearbyDiscoveryRows || []\n        );\n      });\n    state.nearbyDiscoveryPendingPromise = pending.finally(function () {\n      state.nearbyDiscoveryPendingPromise = null;\n    });\n    return state.nearbyDiscoveryPendingPromise;\n  }\n  function targetDistanceProfileKey(profile) {\n    return normalizedProfileKeyValue(\n      profile &&\n        (profile.profileKey || profile.profile_key || profile.handle || \"\"),\n    );\n  }\n  function mergeTargetDistanceProjection(profile) {\n    var key = targetDistanceProfileKey(profile),\n      projection = key && state.targetDistanceRowsByKey[key];\n    return projection ? Object.assign({}, profile || {}, projection) : profile;\n  }\n  function mergeTargetDistanceRows(rows, requestedKeys, reason) {\n    var byKey = Object.assign({}, state.targetDistanceRowsByKey || {});\n    (requestedKeys || []).forEach(function (key) {\n      delete byKey[key];\n    });\n    (rows || []).forEach(function (row) {\n      var key = targetDistanceProfileKey(row),\n        miles = serverDistanceMiles(row),\n        label = String(\n          row.viewerDistanceLabel || row.viewer_distance_label || \"\",\n        ).trim();\n      var activeLocationVisible =\n        row.activeLocationVisible === !0 || row.active_location_visible === !0;\n      if (!key || (miles === null && !label && !activeLocationVisible)) return;\n      byKey[key] = Object.assign({}, row, {\n        profileKey: key,\n        activeLocationVisible: activeLocationVisible,\n        active_location_visible: activeLocationVisible,\n        showDistanceToUsers: row.showDistanceToUsers === !0,\n        show_distance_to_users: row.showDistanceToUsers === !0,\n        viewerDistanceMiles: miles,\n        viewer_distance_miles: miles,\n        viewerDistanceLabel:\n          miles !== null ? bucketDistanceLabel(miles) : publicDisplayText(label, \"\"),\n        viewer_distance_label:\n          miles !== null ? bucketDistanceLabel(miles) : publicDisplayText(label, \"\"),\n        waveSent: row.waveSent === !0,\n        interestedSent: row.interestedSent === !0,\n        distanceHydrated: !0,\n        distanceHydratedBy: BUILD,\n      });\n    });\n    state.targetDistanceRowsByKey = byKey;\n    function mergeCollection(items) {\n      return (items || []).map(mergeTargetDistanceProjection);\n    }\n    state.publicProfiles = mergeCollection(state.publicProfiles);\n    state.discoveryProfileRows = mergeCollection(state.discoveryProfileRows);\n    state.viewProfile = mergeTargetDistanceProjection(state.viewProfile);\n    state.profile = mergeTargetDistanceProjection(state.profile);\n    publishPublicProfiles(state.publicProfiles);\n    claim(\"target-profile-distance:merged\", {\n      reason: reason || \"target-projection\",\n      requestedTargets: (requestedKeys || []).length,\n      returnedTargets: (rows || []).length,\n      exactCoordinatesExposed: !1,\n      source: \"dsd_target_profile_distance_projection\",\n    });\n  }\n  function fetchTargetDistanceRows(profiles, reason, force) {\n    if (!hasCustomer()) return Promise.resolve([]);\n    var keys = (profiles || [])\n      .filter(function (profile) {\n        return profile && !nearbyProfileIsCurrentViewer(profile);\n      })\n      .map(targetDistanceProfileKey)\n      .filter(Boolean)\n      .filter(function (key, index, values) {\n        return values.indexOf(key) === index;\n      })\n      .slice(0, 24);\n    if (!keys.length) return Promise.resolve([]);\n    var viewerKey = normalizedProfileKeyValue(\n        activeProfileKeyValue() || profileKey() || \"authenticated-viewer\",\n      ),\n      cacheKey = [viewerKey, keys.slice().sort().join(\",\")].join(\"|\"),\n      cacheFresh =\n        state.targetDistanceCacheKey === cacheKey &&\n        Date.now() - Number(state.targetDistanceCacheAt || 0) < 30 * 60 * 1e3;\n    if (!force && cacheFresh)\n      return Promise.resolve(\n        keys.map(function (key) {\n          return state.targetDistanceRowsByKey[key];\n        }).filter(Boolean),\n      );\n    if (\n      state.targetDistancePendingKey === cacheKey &&\n      state.targetDistancePendingPromise\n    )\n      return state.targetDistancePendingPromise;\n    state.targetDistancePendingKey = cacheKey;\n    state.targetDistancePendingPromise = connectionPresenceRequest(\"GET\", null, {\n      distanceOnly: !0,\n      includePulse: !1,\n      targetKeys: keys,\n    })\n      .then(function (body) {\n        var rows = Array.isArray(body.distanceProfiles)\n          ? body.distanceProfiles\n          : [];\n        state.targetDistanceCacheKey = cacheKey;\n        state.targetDistanceCacheAt = Date.now();\n        mergeTargetDistanceRows(rows, keys, reason);\n        renderProfileIdentity();\n        renderDiscovery();\n        return rows;\n      })\n      .catch(function (error) {\n        claim(\"target-profile-distance:blocked\", {\n          reason: reason || \"target-projection\",\n          requestedTargets: keys.length,\n          error: (error && error.message) || String(error),\n          failClosed: !0,\n        });\n        return [];\n      })\n      .finally(function () {\n        state.targetDistancePendingKey = \"\";\n        state.targetDistancePendingPromise = null;\n      });\n    return state.targetDistancePendingPromise;\n  }\n  function mergeNearbyDistanceForProfile(profile, reason) {\n    if (!profile || !hasCustomer() || nearbyProfileIsCurrentViewer(profile))\n      return Promise.resolve(profile || null);\n    return fetchTargetDistanceRows([profile], reason || \"profile-route\", !1).then(\n      function () {\n        return mergeTargetDistanceProjection(profile);\n      },\n    );\n  }\n  function persistNearbyLocationPreference(\n    enabled,\n    coordinates,\n    clearStoredLocation,\n    explicitEnable,\n  ) {\n    var current =\r\n        profileWithPublicMirror(state.profile || {}) || state.profile || {},\r\n      activeLocationOnly =\n        enabled === !0 && !!coordinates && clearStoredLocation !== !0,\n      patch = activeLocationOnly\n        ? {\n            useApproximateLocationForNearby: profileBooleanFlag(\n              current,\n              [\"useApproximateLocationForNearby\", \"use_approximate_location_for_nearby\"],\n              !0,\n            ),\n            appearInNearby: !0,\n            showDistanceToUsers: profileBooleanFlag(\n              current,\n              [\"showDistanceToUsers\", \"show_distance_to_users\"],\n              !1,\n            ),\n            showCurrentCityOnProfile: !0,\n            locationPreferencesInitialized: !0,\n            locationPrivacyHydrated: !0,\n            locationInvisibleMode:\n              hasDsdPlus() &&\n              profileBooleanFlag(\n                current,\n                [\"locationInvisibleMode\", \"location_invisible_mode\"],\n                !1,\n              ),\n            activeLocationOnly: !0,\n            locationEnableConfirmed: explicitEnable === !0,\n          }\n        : {\r\n            useApproximateLocationForNearby: enabled === !0,\r\n            appearInNearby: !0,\n            showDistanceToUsers: profileBooleanFlag(\r\n              current,\r\n              [\"showDistanceToUsers\", \"show_distance_to_users\"],\r\n              !1,\n            ),\r\n            showCurrentCityOnProfile: !0,\n            locationInvisibleMode:\n              hasDsdPlus() &&\n              profileBooleanFlag(\n                current,\n                [\"locationInvisibleMode\", \"location_invisible_mode\"],\n                !1,\n              ),\n          };\n    patch.use_approximate_location_for_nearby =\n      patch.useApproximateLocationForNearby;\n    patch.appear_in_nearby = patch.appearInNearby;\n    patch.show_distance_to_users = patch.showDistanceToUsers;\n    patch.show_current_city_on_profile = patch.showCurrentCityOnProfile;\n    patch.location_preferences_initialized = !0;\n    patch.location_invisible_mode = patch.locationInvisibleMode;\n    return (\n      enabled === !0 && coordinates\r\n        ? ((patch.nearbyLatitude = Number(\r\n            Number(coordinates.latitude).toFixed(6),\r\n          )),\r\n          (patch.nearbyLongitude = Number(\r\n            Number(coordinates.longitude).toFixed(6),\r\n          )),\r\n          (patch.nearbyLocationAccuracyMeters = Math.max(\r\n            1,\r\n            Math.round(Number(coordinates.accuracyMeters) || 10000),\r\n          )),\r\n          (patch.nearbyLocationUpdatedAt = new Date(\r\n            Number(coordinates.updatedAt || Date.now()),\r\n          ).toISOString()),\r\n          (patch.nearbyLocationDeviceSessionId =\r\n            activeLocationDeviceSessionId()))\r\n        : clearStoredLocation === !0 && (patch.clearNearbyLocation = !0),\r\n      saveProfileMediaPatch(patch).then(function (saved) {\r\n        return saved\r\n          ? (syncProfileSetupForms(document),\r\n            renderProfileIdentity(),\r\n            renderDiscovery(),\r\n            saved)\r\n          : null;\r\n      })\r\n    );\r\n  }\r\n  function activeLocationFeatureEnabled() {\r\n    return !0;\r\n  }\r\n  function readGeolocationPermissionState() {\r\n    if (!navigator.permissions || typeof navigator.permissions.query != \"function\")\r\n      return Promise.resolve(\"unknown\");\r\n    return navigator.permissions\r\n      .query({ name: \"geolocation\" })\r\n      .then(function (permission) {\r\n        return permission && permission.state\r\n          ? String(permission.state)\r\n          : \"unknown\";\r\n      })\r\n      .catch(function () {\r\n        return \"unknown\";\r\n      });\r\n  }\r\n  function requestBestNearbyBrowserPosition(onSuccess, onError) {\r\n    var bestPosition = null,\r\n      watchId = null,\r\n      timeoutId = null,\r\n      settled = !1;\r\n    function finish(position, error) {\r\n      if (settled) return;\r\n      settled = !0;\r\n      if (watchId !== null) navigator.geolocation.clearWatch(watchId);\r\n      if (timeoutId !== null) clearTimeout(timeoutId);\r\n      position ? onSuccess(position) : onError(error || { code: 3 });\r\n    }\r\n    function consider(position) {\r\n      var coords = (position && position.coords) || {},\r\n        accuracy = Number(coords.accuracy),\r\n        capturedAt = Number(position && position.timestamp) || 0,\r\n        capturedAge = capturedAt ? Math.max(0, Date.now() - capturedAt) : Infinity;\r\n      if (\r\n        !isFinite(Number(coords.latitude)) ||\r\n        !isFinite(Number(coords.longitude)) ||\r\n        !isFinite(accuracy) ||\r\n        accuracy < 1 ||\r\n        capturedAge > ACTIVE_LOCATION_EXPLICIT_MAX_AGE_MS\r\n      )\r\n        return;\r\n      if (\r\n        !bestPosition ||\r\n        accuracy < Number((bestPosition.coords || {}).accuracy || Infinity)\r\n      )\r\n        bestPosition = position;\r\n      if (accuracy <= ACTIVE_LOCATION_TARGET_ACCURACY_METERS)\r\n        finish(bestPosition, null);\r\n    }\r\n    function fail(error) {\r\n      finish(bestPosition, bestPosition ? null : error);\r\n    }\r\n    try {\r\n      watchId = navigator.geolocation.watchPosition(consider, fail, {\r\n        enableHighAccuracy: !0,\r\n        maximumAge: 0,\r\n        timeout: ACTIVE_LOCATION_SAMPLE_WINDOW_MS,\r\n      });\r\n      timeoutId = setTimeout(function () {\r\n        finish(bestPosition, bestPosition ? null : { code: 3 });\r\n      }, ACTIVE_LOCATION_SAMPLE_WINDOW_MS + 250);\r\n    } catch (error) {\r\n      finish(null, error);\r\n    }\r\n  }\r\n  function requestNearbyBrowserLocation(options) {\r\n    options = options || {};\r\n    if (!hasCustomer()) {\r\n      renderStatus(\"Log in to use Nearby discovery.\");\r\n      return Promise.resolve(null);\r\n    }\r\n    if (!activeLocationFeatureEnabled()) return Promise.resolve(null);\r\n    if (!navigator.geolocation) {\r\n      (saveNearbyLocationState({\r\n        status: \"unavailable\",\r\n        source: \"\",\r\n        error: \"geolocation-unavailable\",\r\n      }),\r\n        renderStatus(\r\n          \"Nearby location is unavailable in this browser. Use Current city and State on your profile.\",\r\n        ),\r\n        renderDiscovery());\r\n      return Promise.resolve(null);\r\n    }\r\n    if (state.discoveryLocation.requestPending)\r\n      return state.discoveryLocation.requestPending;\r\n    // A user-triggered refresh must enter geolocation synchronously from the\n    // click handler. Deferring it through even an already-resolved Promise can\n    // lose Safari's transient user activation before the permission prompt.\n    // Background refreshes keep the advisory Permissions API preflight.\n    function beginLocationCapture(permission) {\n      permission !== \"explicit-user-action\" &&\n        saveNearbyLocationState({ permissionState: permission });\n      if (permission === \"denied\" && options.explicit !== !0) {\n        saveNearbyLocationState({ status: \"denied\", error: \"permission-denied\" });\n        return null;\n      }\r\n      if (\r\n        options.allowPrompt !== !0 &&\r\n        (permission === \"prompt\" || permission === \"unknown\")\r\n      )\r\n        return null;\r\n      if (\r\n        permission === \"unknown\" &&\r\n        state.discoveryLocation.status === \"denied\" &&\r\n        options.explicit !== !0\r\n      )\r\n        return null;\r\n      saveNearbyLocationState({\r\n        status: \"locating\",\r\n        source: \"browser\",\r\n        lastRequestAt: Date.now(),\r\n        error: \"\",\r\n      });\r\n      renderStatus(\"Requesting active location for Nearby discovery.\");\r\n      renderDiscovery();\r\n      return new Promise(function (resolve) {\r\n        requestBestNearbyBrowserPosition(\r\n        function (position) {\r\n          var coords = (position && position.coords) || {};\r\n          var accuracyMeters = Math.max(\r\n            1,\r\n            Math.round(Number(coords.accuracy) || 10000),\r\n          );\r\n          if (\r\n            !isFinite(Number(coords.latitude)) ||\r\n            !isFinite(Number(coords.longitude)) ||\r\n            accuracyMeters > ACTIVE_LOCATION_MAX_ACCURACY_METERS\r\n          ) {\r\n            saveNearbyLocationState({\r\n              status: \"inaccurate\",\r\n              source: \"browser\",\r\n              error: \"accuracy-exceeds-100-meters\",\r\n            });\r\n            renderStatus(\r\n            \"Location accuracy is too low for a reliable distance. The last valid active location was preserved.\",\r\n            );\r\n            renderDiscovery();\r\n            resolve(null);\r\n            return;\r\n          }\r\n          var capturedAt = Number(position && position.timestamp) || Date.now(),\r\n            capturedAge = Math.max(0, Date.now() - capturedAt);\r\n          if (\r\n            options.explicit === !0 &&\r\n            capturedAge > ACTIVE_LOCATION_EXPLICIT_MAX_AGE_MS\r\n          ) {\r\n            saveNearbyLocationState({\r\n              status: \"stale\",\r\n              source: \"browser\",\r\n              error: \"explicit-reading-older-than-2-minutes\",\r\n            });\r\n            renderStatus(\r\n              \"The device returned an old location. The last valid active location was preserved.\",\r\n            );\r\n            renderDiscovery();\r\n            resolve(null);\r\n            return;\r\n          }\r\n          (saveNearbyLocationState({\r\n            status: \"ready\",\r\n            source: \"browser\",\r\n            permissionState: \"granted\",\r\n            latitude: Number(Number(coords.latitude).toFixed(6)),\r\n            longitude: Number(Number(coords.longitude).toFixed(6)),\r\n            accuracyMeters: accuracyMeters,\r\n            updatedAt: capturedAt,\r\n            error: \"\",\r\n          }),\r\n            persistNearbyLocationPreference(\n              !0,\n              state.discoveryLocation,\n              !1,\n              options.explicit === !0,\n            ).then(\n              function (saved) {\r\n                if (!saved) {\n                  renderStatus(\r\n                    \"Nearby location could not be saved. Try again.\",\r\n                  );\r\n                  resolve(null);\r\n                  return;\n                }\n                if (\n                  saved.locationSampleAccepted !== !0 &&\n                  saved.locationSamplePreserved !== !0\n                ) {\n                  saveNearbyLocationState({\n                    status: \"rejected\",\n                    source: \"profile\",\n                    error:\n                      saved.locationSelectionReason ||\n                      \"active-location-sample-not-accepted\",\n                  });\n                  renderStatus(\n                    \"Active location was not updated. Try Refresh location again.\",\n                  );\n                  renderDiscovery();\n                  resolve(null);\n                  return;\n                }\n                (saveNearbyLocationState({\n                  status: \"persisted\",\n                  source: \"profile\",\n                  latitude: null,\r\n                  longitude: null,\r\n                  accuracyMeters: null,\r\n                  updatedAt: 0,\n                  error: \"\",\n                }),\n                  (state.targetDistanceRowsByKey = {}),\n                  (state.targetDistanceCacheKey = \"\"),\n                  (state.targetDistanceCacheAt = 0),\n                  (state.targetDistancePendingKey = \"\"),\n                  (state.targetDistancePendingPromise = null),\n                  (state.nearbyDiscoveryRows = []),\n                  (state.nearbyDiscoveryCacheKey = \"\"),\n                  (state.nearbyDiscoveryCacheAt = 0),\n                  (state.nearbyDiscoveryPendingKey = \"\"),\n                  renderStatus(\n                    saved.locationSamplePreserved === !0\n                      ? \"A fresher, more accurate device location was preserved. Exact coordinates stay private.\"\n                      : \"Nearby location updated. Exact coordinates stay private.\",\n                  ),\n                  fetchNearbyDiscoveryRows(!0),\n                  fetchTargetDistanceRows(\n                    (state.discoveryProfileRows || state.publicProfiles || []).slice(0, 24),\n                    \"active-location-refresh\",\n                    !0,\n                  ),\n                  renderDiscovery(),\n                  resolve(saved));\n              },\r\n            ));\r\n        },\r\n        function (error) {\r\n          var errorCode = error && Number(error.code),\r\n            errorStatus =\r\n              errorCode === 1\r\n                ? \"denied\"\r\n                : errorCode === 3\r\n                  ? \"timeout\"\r\n                  : \"unavailable\";\r\n          (saveNearbyLocationState({\r\n            status: errorStatus,\r\n            source: \"browser\",\r\n            permissionState:\r\n              errorCode === 1 ? \"denied\" : \"unknown\",\r\n            error: errorCode ? String(errorCode) : \"unavailable\",\r\n          }),\r\n            renderStatus(\r\n              errorStatus === \"denied\"\r\n                ? \"Nearby location was not allowed. Change browser permission before trying again.\"\r\n                : errorStatus === \"timeout\"\r\n                  ? \"Nearby location timed out. The last valid active location was preserved.\"\r\n                  : \"Nearby location is unavailable. The last valid active location was preserved.\",\r\n            ),\r\n            renderDiscovery(),\r\n            resolve(null));\r\n        },\r\n      );\n      });\n    }\n    var pending =\n      options.explicit === !0\n        ? beginLocationCapture(\"explicit-user-action\")\n        : readGeolocationPermissionState().then(beginLocationCapture);\n    state.discoveryLocation.requestPending = pending.finally(function () {\n      state.discoveryLocation.requestPending = !1;\r\n    });\r\n    return state.discoveryLocation.requestPending;\r\n  }\r\n  function ensureActiveLocationFresh(reason, allowPrompt) {\n    var profile = state.profile || {};\n    if (\n      !hasCustomer() ||\n      !activeLocationFeatureEnabled() ||\n      !profileRecordHasUsableKey(profile) ||\n      profile.locationPrivacyHydrated !== !0 ||\n      !nearbyLocationStale()\n    )\n      return Promise.resolve(null);\n    return requestNearbyBrowserLocation({\r\n      reason: reason || \"location-dependent-surface\",\r\n      allowPrompt: allowPrompt === !0,\r\n      explicit: !1,\r\n    });\r\n  }\r\n  function bindActiveLocationLifecycle() {\r\n    if (state.activeLocationLifecycleBound) return;\r\n    state.activeLocationLifecycleBound = !0;\r\n    function refreshOnReturn() {\r\n      if (document.visibilityState && document.visibilityState !== \"visible\")\r\n        return;\r\n      ensureActiveLocationFresh(\"foreground-return\", !1);\r\n    }\r\n    document.addEventListener(\"visibilitychange\", refreshOnReturn);\r\n    window.addEventListener(\"pageshow\", refreshOnReturn);\r\n  }\r\n  function profilePresenceActive(profile) {\n    var lastActive = Date.parse(\n      (profile && (profile.lastActiveAt || profile.last_active_at)) || \"\",\n    );\n    return !!lastActive && Date.now() - lastActive < PROFILE_PRESENCE_ACTIVE_MS;\n  }\n  function ensureProfilePresenceNode(root) {\n    if (!root) return null;\n    var existing = qs(\"[data-dsd-profile-presence]\", root);\n    if (existing) return existing;\n    var identityCopy = qs(\n      \".dsd-up315__identity-copy, .dsd-up353__identity-copy\",\n      root,\n    );\n    if (!identityCopy) return null;\n    var handleNode = qs(\"[data-dsd-profile-handle]\", identityCopy),\n      presenceNode = document.createElement(\"p\");\n    presenceNode.className = \"dsd-up315__presence dsd-up353__presence\";\n    presenceNode.setAttribute(\"data-dsd-profile-presence\", \"true\");\n    handleNode && handleNode.nextSibling\n      ? identityCopy.insertBefore(presenceNode, handleNode.nextSibling)\n      : identityCopy.appendChild(presenceNode);\n    return presenceNode;\n  }\n  function profilePresenceLabel(profile) {\n    profile = profile || {};\n    var activityVisible = profileBooleanFlag(\n      profile,\n      [\"showActivityStatus\", \"show_activity_status\", \"activityVisible\", \"activity_visible\"],\n      !0,\n    );\n    if (!activityVisible) return \"Activity hidden\";\n    var lastActive = Date.parse(\n        profile.lastActiveAt || profile.last_active_at || \"\",\n      ),\n      elapsed = lastActive ? Math.max(0, Date.now() - lastActive) : null,\n      hours = elapsed === null ? 0 : Math.floor(elapsed / (60 * 60 * 1e3)),\n      days = elapsed === null ? 0 : Math.floor(elapsed / (24 * 60 * 60 * 1e3));\n    if (elapsed === null) {\n      var createdAt = Date.parse(profile.createdAt || profile.created_at || profile.updatedAt || profile.updated_at || \"\");\n      return createdAt && Date.now() - createdAt < 14 * 24 * 60 * 60 * 1e3\n        ? \"New to DSD\"\n        : \"No recent activity\";\n    }\n    if (elapsed < PROFILE_PRESENCE_ACTIVE_MS) return \"Active now\";\n    if (hours < 24) return \"Last active \" + Math.max(1, hours) + \"h ago\";\n    if (days === 1) return \"Last active yesterday\";\n    return \"Last active \" + days + \"d ago\";\n  }\n  function touchProfilePresence(reason) {\r\n    var adapter = supabaseAdapter();\r\n    if (\r\n      !hasCustomer() ||\r\n      !adapter ||\r\n      typeof adapter.touchProfilePresence !== \"function\"\r\n    )\r\n      return Promise.resolve(null);\r\n    if (\r\n      Date.now() - Number(state.profilePresenceTouchedAt || 0) <\r\n      PROFILE_PRESENCE_TOUCH_MS\r\n    )\r\n      return Promise.resolve(null);\r\n    state.profilePresenceTouchedAt = Date.now();\r\n    return adapter\r\n      .touchProfilePresence({ maxAgeMs: 0 })\r\n      .then(function (rows) {\r\n        var row = Array.isArray(rows) ? rows[0] : rows,\r\n          timestamp =\r\n            (row && (row.last_active_at || row.lastActiveAt)) ||\r\n            new Date().toISOString(),\r\n          currentKey = normalizedProfileKeyValue(profileKey());\r\n        state.profile && (state.profile.lastActiveAt = timestamp);\r\n        state.publicProfiles = (state.publicProfiles || []).map(\r\n          function (profile) {\r\n            var key = normalizedProfileKeyValue(\r\n              profile.profileKey ||\r\n                profile.profile_key ||\r\n                profile.handle ||\r\n                \"\",\r\n            );\r\n            return key && key === currentKey\r\n              ? Object.assign({}, profile, {\r\n                  lastActiveAt: timestamp,\r\n                  last_active_at: timestamp,\r\n                })\r\n              : profile;\r\n          },\r\n        );\r\n        renderDiscovery();\r\n        claim(\"profile-presence:touched\", { reason: reason || \"activity\" });\r\n        return row;\r\n      })\r\n      .catch(function (error) {\r\n        claim(\"profile-presence:touch-blocked\", {\r\n          error: (error && error.message) || String(error),\r\n        });\r\n        return null;\r\n      });\r\n  }\r\n  function bindProfilePresenceLifecycle() {\r\n    if (state.profilePresenceLifecycleBound) return;\r\n    state.profilePresenceLifecycleBound = !0;\r\n    function onActivity() {\r\n      if (!document.visibilityState || document.visibilityState === \"visible\")\r\n        touchProfilePresence(\"visible-activity\");\r\n    }\r\n    [\"pointerdown\", \"keydown\", \"touchstart\"].forEach(function (eventName) {\r\n      document.addEventListener(eventName, onActivity, { passive: !0 });\r\n    });\r\n    document.addEventListener(\"visibilitychange\", onActivity);\r\n    touchProfilePresence(\"session-start\");\n    window.setTimeout(function () {\r\n      touchProfilePresence(\"adapter-ready\");\r\n    }, 3e3);\r\n  }\r\n  function nearbyProfileSettingsHTML() {\n    var invisibleOption = hasDsdPlus()\r\n      ? '<label class=\"dsd-nearby-profile-settings__premium\"><input name=\"locationInvisibleMode\" type=\"checkbox\"> Invisible Mode <span>Hide active-distance labels from other users while keeping Nearby available to you.</span></label>'\r\n      : \"\";\r\n    return '<fieldset class=\"dsd-nearby-profile-settings\" data-dsd-nearby-profile-settings><legend>Location and Nearby</legend><p data-dsd-location-service-default>Your hometown appears on your profile and Discovery, and your profile participates in Nearby by default. Browser permission is requested only when a location-dependent feature needs a fresh position.</p>' + invisibleOption + '<div class=\"dsd-nearby-profile-settings__actions\"><button type=\"button\" data-dsd-nearby-location-refresh>Refresh location</button></div><output data-dsd-nearby-location-status aria-live=\"polite\">' + html(nearbyLocationStatusMessage()) + '</output><small>Signed-in members see privacy-safe distance labels while your active location is on. DSD+ Invisible Mode hides them. Exact coordinates, streets, movement history, and update times are never shown.</small></fieldset>';\n  }\n  function onboardingLegalConsentHTML(initialSetup) {\n    return '<fieldset class=\"dsd-onboarding-legal\" data-dsd-onboarding-legal><legend>Policies and location privacy</legend><p>Review the <a href=\"/policies/terms-of-service\" target=\"_blank\" rel=\"noopener\">Terms &amp; Conditions</a>, <a href=\"/policies/refund-policy\" target=\"_blank\" rel=\"noopener\">Return Policy</a>, and <a href=\"/policies/privacy-policy\" target=\"_blank\" rel=\"noopener\">Privacy Policy</a>.</p>' +\n      (initialSetup\n        ? '<label><input name=\"policiesAcknowledged\" type=\"checkbox\" required> I acknowledge the store policies, including location services for proximity features.</label>'\n        : '<p class=\"dsd-onboarding-legal__receipt\" data-dsd-policy-acknowledgement>Loading acknowledgement history...</p>') +\n      '<p>DSD requests browser location only when needed or refreshed. Exact coordinates remain private; eligible members receive only approved rounded distance labels. Browser permission remains controlled by the device.</p></fieldset>';\n  }\n  function profileSetupRequiredState(profile) {\n    return !!(\n      profile &&\n      (profile.setupComplete === !1 ||\n        profile.setup_complete === !1 ||\n        profile.status === \"setup_required\" ||\n        profile.accountState === \"setup_required\" ||\n        profile.account_state === \"setup_required\")\n    );\n  }\n  function profileSetupActorKey() {\n    return String(\n      (customer() && customer().id) ||\n        state.sessionActorId ||\n        state.sessionProfileKey ||\n        customerProfileKeyValue() ||\n        \"authenticated\",\n    ).trim();\n  }\n  function profileSetupResolvedComplete(profile) {\n    return !!(\n      profile &&\n      !profileSetupRequiredState(profile) &&\n      (profile.setupComplete === !0 ||\n        profile.setup_complete === !0 ||\n        profile.status === \"active\" ||\n        profile.accountState === \"active\" ||\n        profile.account_state === \"active\")\n    );\n  }\n  function profileSetupSignedIncompleteSession() {\n    return !!(\n      state.bridgeChecked === !0 &&\n      state.sessionActorId &&\n      state.sessionSetupRequired === !0 &&\n      state.sessionProvisioningReady === !0\n    );\n  }\n  function profileSetupAuthenticatedOwner() {\n    var htmlAuthenticated = !1;\n    try {\n      htmlAuthenticated =\n        document.documentElement &&\n        document.documentElement.classList.contains(\n          \"dsd-shopify-authenticated\",\n        );\n    } catch (e) {}\n    return !!(\n      hasCustomer() ||\n      (htmlAuthenticated && profileSetupSignedIncompleteSession())\n    );\n  }\n  function profileSetupIncompleteConfirmed(profile) {\n    var resolution = state.profileSetupResolution || {},\n      currentActorKey = profileSetupActorKey(),\n      signedIncompleteSession = profileSetupSignedIncompleteSession(),\n      actorMatches = !!(\n        currentActorKey &&\n        (!resolution.actorKey ||\n          resolution.actorKey === currentActorKey ||\n          (signedIncompleteSession &&\n            currentActorKey === state.sessionActorId))\n      ),\n      completionConfirmed = !!(\n        state.bridgeChecked === !0 &&\n        state.sessionSetupRequired !== !0 &&\n        profileSetupResolvedComplete(profile)\n      ),\n      incompleteEvidence = !!(\n        state.sessionSetupRequired === !0 || profileSetupRequiredState(profile)\n      ),\n      setupResolutionSettled = resolution.status === \"INCOMPLETE\";\n    return !!(\n      profileSetupAuthenticatedOwner() &&\n      (state.bridgeChecked === !0 || setupResolutionSettled) &&\n      actorMatches &&\n      incompleteEvidence &&\n      !completionConfirmed &&\n      resolution.status !== \"COMPLETE\"\n    );\n  }\n  function postProfileOnboardingVersion() {\n    return \"release-b-v1\";\n  }\n  function postProfileOnboardingActorKey() {\n    return String(\n      state.sessionProfileKey ||\n        activeOwnerProfileKey() ||\n        customerProfileKeyValue() ||\n        profileKey() ||\n        state.sessionActorId ||\n        \"authenticated\",\n    ).trim();\n  }\n  function postProfilePushOnboardingKey() {\n    return (\n      \"dsd.postProfileOnboarding.\" +\n      postProfileOnboardingVersion() +\n      \":\" +\n      encodeURIComponent(postProfileOnboardingActorKey().toLowerCase())\n    );\n  }\n  function legacyPostProfilePushOnboardingKey() {\n    return (\n      \"dsd.postProfilePushOnboarding.dismissed.v1:\" +\n      encodeURIComponent(postProfileOnboardingActorKey().toLowerCase())\n    );\n  }\n  function postProfileOnboardingSessionKey() {\n    return postProfilePushOnboardingKey() + \":presented-this-session\";\n  }\n  function postProfileOnboardingPresentedThisSession() {\n    try {\n      return window.sessionStorage.getItem(postProfileOnboardingSessionKey()) === \"1\";\n    } catch (_storageError) {\n      return !1;\n    }\n  }\n  function normalizePostProfileOnboardingState(value) {\n    value = value && typeof value === \"object\" ? value : {};\n    return {\n      version: postProfileOnboardingVersion(),\n      status: /^(AVAILABLE|IN_PROGRESS|DISMISSED|DONE)$/.test(\n        String(value.status || \"\"),\n      )\n        ? String(value.status)\n        : \"AVAILABLE\",\n      steps: Object.assign(\n        { photo: \"pending\", nearby: \"pending\", push: \"pending\" },\n        value.steps && typeof value.steps === \"object\" ? value.steps : {},\n      ),\n      shownAt: String(value.shownAt || \"\"),\n      updatedAt: String(value.updatedAt || \"\"),\n      dismissedAt: String(value.dismissedAt || \"\"),\n      completedAt: String(value.completedAt || \"\"),\n    };\n  }\n  function postProfileOnboardingState() {\n    var metadata =\n        state.profile &&\n        state.profile.metadata &&\n        typeof state.profile.metadata === \"object\"\n          ? state.profile.metadata\n          : {},\n      remote = metadata.postProfileOnboarding,\n      local = null;\n    try {\n      local = JSON.parse(\n        window.localStorage.getItem(postProfilePushOnboardingKey()) || \"null\",\n      );\n    } catch (_storageError) {}\n    if (\n      remote &&\n      remote.version === postProfileOnboardingVersion() &&\n      (!local ||\n        Date.parse(remote.updatedAt || 0) >= Date.parse(local.updatedAt || 0))\n    )\n      return normalizePostProfileOnboardingState(remote);\n    return normalizePostProfileOnboardingState(local);\n  }\n  function persistPostProfileOnboardingState(value) {\n    var next = normalizePostProfileOnboardingState(value),\n      now = new Date().toISOString(),\n      currentProfile = state.profile || {},\n      metadata = Object.assign(\n        {},\n        currentProfile.metadata && typeof currentProfile.metadata === \"object\"\n          ? currentProfile.metadata\n          : {},\n      ),\n      key = nonPlaceholderProfileKey(\n        currentProfile.profileKey ||\n          currentProfile.profile_key ||\n          currentProfile.handle ||\n          activeOwnerProfileKey() ||\n          profileKey() ||\n          \"\",\n      ),\n      ownerUid = actorUid() || uid() || currentProfile.uid || currentProfile.user_id || \"\";\n    next.updatedAt = now;\n    metadata.postProfileOnboarding = next;\n    currentProfile.metadata = metadata;\n    state.profile = currentProfile;\n    try {\n      window.localStorage.setItem(\n        postProfilePushOnboardingKey(),\n        JSON.stringify(next),\n      );\n    } catch (_storageError) {}\n    if (!key || !ownerUid || !supabaseCutoverReady()) return Promise.resolve(next);\n    return setDoc(\n      canonicalProfileWritePath(key),\n      {\n        profileKey: key,\n        handle: currentProfile.handle || key,\n        uid: ownerUid,\n        userId: ownerUid,\n        user_id: ownerUid,\n        metadata: metadata,\n      },\n      !0,\n    )\n      .then(function () {\n        return next;\n      })\n      .catch(function (error) {\n        claim(\"release-b-onboarding-state:remote-save-blocked\", {\n          error: (error && error.message) || String(error),\n          profileKey: key,\n        });\n        return next;\n      });\n  }\n  function updatePostProfileOnboardingStep(step, value) {\n    var current = postProfileOnboardingState();\n    current.status = \"IN_PROGRESS\";\n    current.steps[step] = value || \"completed\";\n    return persistPostProfileOnboardingState(current);\n  }\n  function dismissPostProfilePushOnboarding(status) {\n    var card = qs(\"[data-dsd-post-profile-push-onboarding]\"),\n      current = postProfileOnboardingState(),\n      now = new Date().toISOString(),\n      restore = card && card._dsdReleaseBRestoreFocus;\n    current.status = status === \"DONE\" ? \"DONE\" : \"DISMISSED\";\n    current.status === \"DONE\"\n      ? (current.completedAt = now)\n      : (current.dismissedAt = now);\n    persistPostProfileOnboardingState(current);\n    if (card && card._dsdReleaseBPushListener)\n      window.removeEventListener(\n        \"dsd:native-push:state\",\n        card._dsdReleaseBPushListener,\n      );\n    (card && card.remove(),\n      document.documentElement.classList.remove(\"dsd-release-b-onboarding-open\"),\n      scheduleGlobalOverlayStateSync(),\n      restore && restore.focus && restore.focus());\n    window.setTimeout(function () {\r\n      scheduleStandalonePushPrompt(\"post-profile-onboarding-closed\");\r\n    }, 250);\r\n  }\n  function postProfilePushOnboardingDismissed() {\n    var current = postProfileOnboardingState();\n    try {\n      return (\n        current.status === \"DISMISSED\" ||\n        current.status === \"DONE\" ||\n        window.localStorage.getItem(legacyPostProfilePushOnboardingKey()) === \"1\"\n      );\n    } catch (_storageError) {\n      return current.status === \"DISMISSED\" || current.status === \"DONE\";\n    }\n  }\n  function ordinaryIphoneSafari() {\n    var ua = String(window.navigator.userAgent || \"\"),\n      ios = /iPhone|iPad|iPod/i.test(ua),\n      webkit = /Safari/i.test(ua) && !/CriOS|FxiOS|EdgiOS/i.test(ua),\n      standalone =\n        window.navigator.standalone === !0 ||\n        (window.matchMedia &&\n          window.matchMedia(\"(display-mode: standalone)\").matches);\n    return ios && webkit && !standalone;\n  }\n  function standaloneAppleWebApp() {\r\n    var ua = String(window.navigator.userAgent || \"\"),\r\n      ios = /iPhone|iPad|iPod/i.test(ua),\r\n      standalone =\r\n        window.navigator.standalone === !0 ||\r\n        (window.matchMedia &&\r\n          window.matchMedia(\"(display-mode: standalone)\").matches);\r\n    return ios && standalone;\r\n  }\r\n  function standalonePushPromptStorageKey() {\r\n    return (\r\n      \"dsd.nativePush.standalonePrompt.r204.\" +\r\n      String(activeOwnerProfileKey() || profileKey() || \"account\")\r\n        .trim()\r\n        .toLowerCase()\r\n    );\r\n  }\r\n  function standalonePushPromptSnoozed() {\r\n    try {\r\n      return Number(\r\n        window.localStorage.getItem(standalonePushPromptStorageKey()) || 0,\r\n      ) > Date.now();\r\n    } catch (_storageError) {\r\n      return !1;\r\n    }\r\n  }\r\n  function snoozeStandalonePushPrompt(days) {\r\n    try {\r\n      window.localStorage.setItem(\r\n        standalonePushPromptStorageKey(),\r\n        String(Date.now() + Number(days || 7) * 86400000),\r\n      );\r\n    } catch (_storageError) {}\r\n  }\r\n  function removeStandalonePushPrompt(card, restoreFocus) {\r\n    if (!card) return;\r\n    var focus = card._dsdRestoreFocus;\r\n    if (card._dsdPushStateListener)\r\n      window.removeEventListener(\r\n        \"dsd:native-push:state\",\r\n        card._dsdPushStateListener,\r\n      );\r\n    card.remove();\r\n    restoreFocus && focus && focus.focus && focus.focus();\r\n  }\r\n  function renderStandalonePushPrompt() {\r\n    var push = window.DSDNativePush,\r\n      snapshot = push && typeof push.snapshot === \"function\" ? push.snapshot() : {},\r\n      response = snapshot.status || {},\r\n      active = !!(\r\n        response.currentDeviceSubscribed === !0 &&\r\n        response.preferences &&\r\n        response.preferences.pushEnabled === !0\r\n      ),\r\n      existing = qs(\"[data-dsd-standalone-push-prompt]\");\r\n    if (\r\n      existing ||\r\n      !hasCustomer() ||\r\n      !profileSetupResolvedComplete(state.profile) ||\r\n      !standaloneAppleWebApp() ||\r\n      !push ||\r\n      typeof push.enable !== \"function\" ||\r\n      snapshot.supported === !1 ||\r\n      snapshot.permission === \"denied\" ||\r\n      active ||\r\n      standalonePushPromptSnoozed() ||\r\n      qs(\"[data-dsd-post-profile-push-onboarding]\")\r\n    )\r\n      return null;\r\n    var card = document.createElement(\"section\");\r\n    card.className = \"dsd-standalone-push-prompt\";\r\n    card.setAttribute(\"data-dsd-standalone-push-prompt\", BUILD);\r\n    card.setAttribute(\"role\", \"dialog\");\r\n    card.setAttribute(\"aria-modal\", \"false\");\r\n    card.setAttribute(\"aria-labelledby\", \"dsd-standalone-push-title\");\r\n    card.innerHTML =\r\n      '<div class=\"dsd-standalone-push-prompt__copy\"><h2 id=\"dsd-standalone-push-title\">Turn on notifications</h2><p>Stay current with messages and activity from the DSD app.</p><output data-dsd-standalone-push-status aria-live=\"polite\"></output></div>' +\r\n      '<div class=\"dsd-standalone-push-prompt__actions\"><button type=\"button\" data-dsd-standalone-push-enable>Enable notifications</button><button type=\"button\" class=\"is-secondary\" data-dsd-standalone-push-later>Not now</button></div>';\r\n    card._dsdRestoreFocus = document.activeElement;\r\n    card._dsdPushStateListener = function (event) {\r\n      var detail = (event && event.detail) || {},\r\n        status = detail.status || {},\r\n        enabled = !!(\r\n          status.currentDeviceSubscribed === !0 &&\r\n          status.preferences &&\r\n          status.preferences.pushEnabled === !0\r\n        );\r\n      if (enabled) removeStandalonePushPrompt(card, !1);\r\n    };\r\n    window.addEventListener(\r\n      \"dsd:native-push:state\",\r\n      card._dsdPushStateListener,\r\n    );\r\n    card.addEventListener(\"click\", function (event) {\r\n      var enable = event.target.closest(\"[data-dsd-standalone-push-enable]\"),\r\n        later = event.target.closest(\"[data-dsd-standalone-push-later]\"),\r\n        status = qs(\"[data-dsd-standalone-push-status]\", card);\r\n      if (later) {\r\n        snoozeStandalonePushPrompt(7);\r\n        removeStandalonePushPrompt(card, !0);\r\n        return;\r\n      }\r\n      if (!enable) return;\r\n      enable.disabled = !0;\r\n      status && (status.textContent = \"Waiting for iPhone permission...\");\r\n      push\r\n        .enable()\r\n        .then(function (result) {\r\n          if (!result || result.currentDeviceSubscribed !== !0)\r\n            throw new Error(\"push_subscription_not_active\");\r\n          status && (status.textContent = \"Notifications are active.\");\r\n          snoozeStandalonePushPrompt(3650);\r\n          window.setTimeout(function () {\r\n            removeStandalonePushPrompt(card, !0);\r\n          }, 450);\r\n        })\r\n        .catch(function (error) {\r\n          enable.disabled = !1;\r\n          status &&\r\n            (status.textContent =\r\n              error && error.message === \"push_permission_denied\"\r\n                ? \"Notifications are blocked in iPhone Settings.\"\r\n                : \"Notifications could not be enabled. Try again.\");\r\n        });\r\n    });\r\n    card.addEventListener(\"keydown\", function (event) {\r\n      if (event.key !== \"Escape\") return;\r\n      snoozeStandalonePushPrompt(7);\r\n      removeStandalonePushPrompt(card, !0);\r\n    });\r\n    (document.body || document.documentElement).appendChild(card);\r\n    window.setTimeout(function () {\r\n      var enable = qs(\"[data-dsd-standalone-push-enable]\", card);\r\n      enable && enable.focus();\r\n    }, 0);\r\n    return card;\r\n  }\r\n  function scheduleStandalonePushPrompt(reason, attempt) {\r\n    attempt = Number(attempt || 0);\r\n    if (!standaloneAppleWebApp() || !hasCustomer()) return;\r\n    window.setTimeout(function () {\r\n      var push = window.DSDNativePush;\r\n      if (!push || typeof push.loadStatus !== \"function\") {\r\n        if (attempt < 3)\r\n          scheduleStandalonePushPrompt(reason || \"push-owner-wait\", attempt + 1);\r\n        return;\r\n      }\r\n      var snapshot = typeof push.snapshot === \"function\" ? push.snapshot() : {};\r\n      Promise.resolve(snapshot.status || push.loadStatus())\r\n        .then(function () {\r\n          renderStandalonePushPrompt();\r\n        })\r\n        .catch(function (error) {\r\n          claim(\"standalone-push-prompt:status-unavailable\", {\r\n            reason: reason || \"runtime-ready\",\r\n            error: (error && error.message) || String(error),\r\n          });\r\n        });\r\n    }, attempt ? 1200 : 600);\r\n  }\r\n  function releaseBPushPreferenceHTML(preferences) {\n    preferences = preferences || {};\n    function checked(key, fallback) {\n      return preferences[key] === !1 || (!fallback && preferences[key] !== !0)\n        ? \"\"\n        : \" checked\";\n    }\n    return (\n      '<fieldset class=\"dsd-release-b__push-categories\" data-dsd-release-b-push-preferences><legend>Push categories</legend>' +\n      '<label><input type=\"checkbox\" data-dsd-release-b-push-preference=\"directMessages\"' + checked(\"directMessages\", !0) + '> Direct messages</label>' +\n      '<label><input type=\"checkbox\" data-dsd-release-b-push-preference=\"groupMessages\"' + checked(\"groupMessages\", !0) + '> Group messages and requests</label>' +\n      '<label><input type=\"checkbox\" data-dsd-release-b-push-preference=\"relationships\"' + checked(\"relationships\", !0) + '> Follows, Waves, and Interest</label>' +\n      '<label><input type=\"checkbox\" data-dsd-release-b-push-preference=\"content\"' + checked(\"content\", !0) + '> Comments, replies, mentions, and reactions</label>' +\n      '<label><input type=\"checkbox\" data-dsd-release-b-push-preference=\"stories\"' + checked(\"stories\", !0) + '> Story activity</label>' +\n      '<label class=\"is-locked\"><input type=\"checkbox\" checked disabled> Safety and account updates</label></fieldset>' +\n      '<fieldset class=\"dsd-release-b__quiet\"><legend>Quiet hours</legend><label><input type=\"checkbox\" data-dsd-release-b-push-preference=\"quietHoursEnabled\"' + checked(\"quietHoursEnabled\", !1) + '> Suppress non-critical Push</label><div><label>From <input type=\"time\" data-dsd-release-b-push-preference=\"quietHoursStart\" value=\"' + html(String(preferences.quietHoursStart || \"22:00\").slice(0, 5)) + '\"></label><label>Until <input type=\"time\" data-dsd-release-b-push-preference=\"quietHoursEnd\" value=\"' + html(String(preferences.quietHoursEnd || \"08:00\").slice(0, 5)) + '\"></label></div><small>Safety and account updates may arrive during quiet hours.</small></fieldset>'\n    );\n  }\n  function releaseBPushPreferencePayload(card) {\n    var out = {},\n      push = window.DSDNativePush,\n      snapshot = push && typeof push.snapshot === \"function\" ? push.snapshot() : {},\n      preferences = (snapshot.status && snapshot.status.preferences) || {};\n    qsa(\"[data-dsd-release-b-push-preference]\", card).forEach(function (input) {\n      var key = input.getAttribute(\"data-dsd-release-b-push-preference\");\n      out[key] = input.type === \"checkbox\" ? input.checked : input.value;\n    });\n    try {\n      out.quietHoursTimezone =\n        Intl.DateTimeFormat().resolvedOptions().timeZone || \"America/Detroit\";\n    } catch (_error) {\n      out.quietHoursTimezone = \"America/Detroit\";\n    }\n    out.pushEnabled = preferences.pushEnabled === !0;\n    return Object.assign({}, preferences, out);\n  }\n  function renderReleaseBPushState(card, detail) {\n    if (!card) return;\n    var push = window.DSDNativePush,\n      snapshot =\n        detail ||\n        (push && typeof push.snapshot === \"function\" ? push.snapshot() : {}) ||\n        {},\n      response = snapshot.status || {},\n      active = !!(\n        response.currentDeviceSubscribed === !0 &&\n        response.preferences &&\n        response.preferences.pushEnabled === !0\n      ),\n      status = qs(\"[data-dsd-post-profile-push-status]\", card),\n      badge = qs(\"[data-dsd-release-b-push-badge]\", card),\n      enable = qs(\"[data-dsd-post-profile-push-enable]\", card),\n      fields = qsa(\"[data-dsd-release-b-push-preference]\", card);\n    if (badge)\n      badge.textContent = !snapshot.supported\n        ? \"Unsupported\"\n        : snapshot.permission === \"denied\"\n          ? \"Blocked\"\n          : active\n            ? \"Active\"\n            : \"Not connected\";\n    if (status)\n      status.textContent = !snapshot.supported\n        ? \"Web Push is not supported in this browser context. In-site notifications still work.\"\n        : snapshot.permission === \"denied\"\n          ? \"Notifications are blocked in browser settings. DSD will not ask again automatically.\"\n          : active\n            ? \"Notifications are active on this device.\"\n            : \"Permission is requested only after you select Enable notifications.\";\n    if (enable) {\n      enable.hidden = ordinaryIphoneSafari() || active || !snapshot.supported;\n      enable.disabled = !!snapshot.pending || snapshot.permission === \"denied\";\n    }\n    fields.forEach(function (field) {\n      field.disabled = !!snapshot.pending || !response.preferences;\n      if (\n        response.preferences &&\n        Object.prototype.hasOwnProperty.call(\n          response.preferences,\n          field.getAttribute(\"data-dsd-release-b-push-preference\"),\n        ) &&\n        field !== document.activeElement\n      ) {\n        var key = field.getAttribute(\"data-dsd-release-b-push-preference\");\n        field.type === \"checkbox\"\n          ? (field.checked = response.preferences[key] === !0)\n          : (field.value = String(response.preferences[key] || field.value || \"\").slice(0, 5));\n      }\n    });\n    active &&\n      postProfileOnboardingState().steps.push !== \"completed\" &&\n      updatePostProfileOnboardingStep(\"push\", \"completed\");\n  }\n  function renderReleaseBLocationState(card) {\n    if (!card) return;\n    var profile = state.profile || {},\n      enabled = profileBooleanFlag(\n        profile,\n        [\"useApproximateLocationForNearby\", \"use_approximate_location_for_nearby\"],\n        !0,\n      ),\n      toggle = qs(\"[data-dsd-release-b-nearby-toggle]\", card),\n      badge = qs(\"[data-dsd-release-b-nearby-badge]\", card),\n      status = qs(\"[data-dsd-release-b-nearby-status]\", card),\n      locationState = (state.discoveryLocation && state.discoveryLocation.status) || \"idle\",\n      permission =\n        (state.discoveryLocation && state.discoveryLocation.permissionState) ||\n        \"unknown\";\n    toggle && (toggle.checked = enabled);\n    badge && (badge.textContent = enabled ? \"Preference on\" : \"Preference off\");\n    status &&\n      (status.textContent = !enabled\n        ? \"Nearby is off. Standard Discovery remains available.\"\n        : locationState === \"persisted\" || locationState === \"ready\"\n          ? \"Last location saved. Exact coordinates stay private.\"\n          : permission === \"denied\" || locationState === \"denied\"\n            ? \"Browser location is denied. You can continue without Nearby.\"\n            : locationState === \"locating\"\n              ? \"Finding location...\"\n              : \"Browser location has not been requested on this device.\");\n  }\n  function syncReleaseBProfilePreview(markComplete) {\n    var card = qs(\"[data-dsd-post-profile-push-onboarding]\"),\n      profile = currentComposerProfile() || state.profile || {},\n      mediaId = canonicalProfileAvatarMediaId(profile),\n      bannerId = canonicalProfileBannerMediaId(profile),\n      avatars = card ? qsa(\"[data-dsd-release-b-avatar]\", card) : [],\n      badge = card ? qs(\"[data-dsd-release-b-photo-badge]\", card) : null,\n      bannerBadge = card ? qs(\"[data-dsd-release-b-banner-badge]\", card) : null,\n      bannerPreview = card ? qs(\"[data-dsd-release-b-banner-preview]\", card) : null;\n    markComplete &&\n      mediaId &&\n      postProfileOnboardingState().steps.photo !== \"completed\" &&\n      updatePostProfileOnboardingStep(\"photo\", \"completed\");\n    if (!card) return;\n    avatars.forEach(function (avatar) {\n      (mediaId\n        ? avatar.setAttribute(\"data-dsd-avatar-media-id\", mediaId)\n        : avatar.removeAttribute(\"data-dsd-avatar-media-id\"),\n      (avatar.textContent = mediaId\n        ? \"\"\n        : String(profile.displayName || profile.handle || \"DSD\")\n            .slice(0, 1)\n            .toUpperCase()));\n    });\n    if (avatars.length) {\n      hydrateAvatarMedia(card);\n    }\n    badge && (badge.textContent = mediaId ? \"Photo added\" : \"Optional\");\n    if (bannerPreview) {\n      bannerId\n        ? (bannerPreview.setAttribute(\"data-dsd-profile-cover-media-id\", bannerId),\n          bannerPreview.setAttribute(\"data-dsd-cover-media-id\", bannerId))\n        : (bannerPreview.removeAttribute(\"data-dsd-profile-cover-media-id\"),\n          bannerPreview.removeAttribute(\"data-dsd-cover-media-id\"));\n      hydrateProfileCardMedia(bannerPreview);\n    }\n    bannerBadge && (bannerBadge.textContent = bannerId ? \"Banner added\" : \"Optional\");\n  }\n  function pauseReleaseBOnboardingForProfileEditor(card, panelKey) {\n    if (!card) return;\n    card.classList.add(\"is-profile-editor-paused\");\n    card.setAttribute(\"aria-hidden\", \"true\");\n    card.dataset.dsdReleaseBProfileEditor = String(panelKey || \"\");\n    document.documentElement.classList.add(\"dsd-release-b-profile-editor-open\");\n    scheduleGlobalOverlayStateSync();\n  }\n  function resumeReleaseBOnboardingAfterProfileEditor() {\n    var card = qs(\"[data-dsd-post-profile-push-onboarding]\");\n    if (!card || !card.classList.contains(\"is-profile-editor-paused\")) return;\n    var panelKey = card.dataset.dsdReleaseBProfileEditor || \"\";\n    (card.classList.remove(\"is-profile-editor-paused\"),\n      card.removeAttribute(\"aria-hidden\"),\n      delete card.dataset.dsdReleaseBProfileEditor,\n      document.documentElement.classList.remove(\n        \"dsd-release-b-profile-editor-open\",\n      ),\n      syncReleaseBProfilePreview(panelKey === \"avatar\"),\n      scheduleGlobalOverlayStateSync());\n    var returnControl = qs(\n      panelKey === \"banner\"\n        ? \"[data-dsd-release-b-banner]\"\n        : \"[data-dsd-release-b-photo]\",\n      card,\n    );\n    returnControl && returnControl.focus();\n  }\n  function releaseBFocusTrap(event, card) {\n    if (event.key === \"Escape\") {\n      event.preventDefault();\n      dismissPostProfilePushOnboarding(\"DISMISSED\");\n      return;\n    }\n    if (event.key !== \"Tab\") return;\n    var focusable = qsa(\n      'button:not([disabled]):not([hidden]),a[href],input:not([disabled]),summary,[tabindex]:not([tabindex=\"-1\"])',\n      card,\n    ).filter(function (node) {\n      return node.offsetParent !== null;\n    });\n    if (!focusable.length) return;\n    var first = focusable[0],\n      last = focusable[focusable.length - 1];\n    if (event.shiftKey && document.activeElement === first) {\n      event.preventDefault();\n      last.focus();\n    } else if (!event.shiftKey && document.activeElement === last) {\n      event.preventDefault();\n      first.focus();\n    }\n  }\n  function showPostProfilePushOnboarding(options) {\n    options = options || {};\n    var force =\n        options.force === !0 || queryParam(\"release_b_onboarding\") === \"1\",\n      afterCompletion = options.afterCompletion === !0,\n      savedState = postProfileOnboardingState(),\n      resumable =\n        savedState.status === \"IN_PROGRESS\" &&\n        !postProfileOnboardingPresentedThisSession();\n    if (\n      !hasCustomer() ||\n      !profileSetupResolvedComplete(state.profile) ||\n      qs(\"[data-dsd-post-profile-push-onboarding]\") ||\n      (!force && !afterCompletion && !resumable) ||\n      (!force && postProfilePushOnboardingDismissed())\n    )\n      return null;\n    var push = window.DSDNativePush,\n      snapshot = push && typeof push.snapshot === \"function\" ? push.snapshot() : {},\n      preferences = (snapshot.status && snapshot.status.preferences) || {},\n      iphoneSafari = ordinaryIphoneSafari(),\n      profile = currentComposerProfile() || state.profile || {},\n      mediaId = canonicalProfileAvatarMediaId(profile),\n      bannerId = canonicalProfileBannerMediaId(profile),\n      current = savedState,\n      card = document.createElement(\"section\");\n    current.status = \"IN_PROGRESS\";\n    current.shownAt = current.shownAt || new Date().toISOString();\n    persistPostProfileOnboardingState(current);\n    try {\n      window.sessionStorage.setItem(postProfileOnboardingSessionKey(), \"1\");\n    } catch (_storageError) {}\n    (card.setAttribute(\"data-dsd-post-profile-push-onboarding\", BUILD),\n      card.setAttribute(\"role\", \"dialog\"),\n      card.setAttribute(\"aria-modal\", \"true\"),\n      card.setAttribute(\"aria-labelledby\", \"dsd-post-profile-push-title\"),\n      (card.className = \"dsd-post-profile-push-onboarding\"),\n      (card.innerHTML =\n        '<div class=\"dsd-release-b__panel\" tabindex=\"-1\"><header class=\"dsd-release-b__header\"><div class=\"dsd-release-b__identity\"><span class=\"dsd-release-b__avatar\" data-dsd-release-b-avatar' +\n        (mediaId ? ' data-dsd-avatar-media-id=\"' + html(mediaId) + '\"' : \"\") +\n        \">\" +\n        (mediaId ? \"\" : html(String(profile.displayName || profile.handle || \"DSD\").slice(0, 1).toUpperCase())) +\n        '</span><div><span>Profile ready</span><h2 id=\"dsd-post-profile-push-title\">Finish setting up DSD</h2><p>Your profile is complete and discoverable. Every step below is optional.</p></div></div><button type=\"button\" class=\"dsd-post-profile-push-onboarding__dismiss\" data-dsd-post-profile-push-dismiss aria-label=\"Skip optional setup\">&times;</button></header>' +\n        '<div class=\"dsd-release-b__steps\">' +\n        '<details class=\"dsd-release-b__step\" open><summary><span>1</span><strong>Profile photo</strong><em data-dsd-release-b-photo-badge>' +\n        (mediaId ? \"Photo added\" : \"Optional\") +\n        '</em></summary><div class=\"dsd-release-b__step-body\"><div class=\"dsd-release-b__photo-preview\"><div class=\"dsd-release-b__photo-state\"><span class=\"dsd-release-b__avatar\">?</span><small>Before</small></div><span class=\"dsd-release-b__photo-arrow\" aria-hidden=\"true\">to</span><div class=\"dsd-release-b__photo-state\"><span class=\"dsd-release-b__avatar\" data-dsd-release-b-avatar' +\n        (mediaId ? ' data-dsd-avatar-media-id=\"' + html(mediaId) + '\"' : \"\") +\n        \">\" +\n        (mediaId ? \"\" : html(String(profile.displayName || profile.handle || \"DSD\").slice(0, 1).toUpperCase())) +\n        '</span><small>Discovery preview</small></div><p><strong>Add a profile picture</strong><small>Profiles with a picture are easier to recognize in Discovery.</small></p></div><div class=\"dsd-release-b__row\"><button type=\"button\" data-dsd-release-b-photo>Edit photo</button><button type=\"button\" class=\"is-secondary\" data-dsd-release-b-skip=\"photo\">Skip</button></div></div></details>' +\n        '<details class=\"dsd-release-b__step\"><summary><span>2</span><strong>Profile banner</strong><em data-dsd-release-b-banner-badge>' +\n        (bannerId ? \"Banner added\" : \"Optional\") +\n        '</em></summary><div class=\"dsd-release-b__step-body\"><div class=\"dsd-release-b__banner-preview\" data-dsd-release-b-banner-preview' +\n        (bannerId ? ' data-dsd-profile-cover-media-id=\"' + html(bannerId) + '\" data-dsd-cover-media-id=\"' + html(bannerId) + '\"' : \"\") +\n        '><span>Optional profile banner</span></div><div class=\"dsd-release-b__row\"><button type=\"button\" data-dsd-release-b-banner>Edit banner</button><button type=\"button\" class=\"is-secondary\" data-dsd-release-b-skip=\"banner\">Skip</button></div></div></details>' +\n        '<details class=\"dsd-release-b__step\"><summary><span>3</span><strong>Nearby</strong><em data-dsd-release-b-nearby-badge>Preference on</em></summary><div class=\"dsd-release-b__step-body\"><label class=\"dsd-release-b__switch\"><input type=\"checkbox\" data-dsd-release-b-nearby-toggle checked> Use my approximate location for Nearby</label><p data-dsd-release-b-nearby-status>Browser location has not been requested on this device.</p><p class=\"dsd-release-b__privacy\">Permission is requested only after you choose Enable Nearby. Exact coordinates are never shown to other users.</p><div class=\"dsd-release-b__row\"><button type=\"button\" data-dsd-release-b-nearby-enable>Enable Nearby</button><button type=\"button\" class=\"is-secondary\" data-dsd-release-b-skip=\"nearby\">Skip</button></div></div></details>' +\n        '<details class=\"dsd-release-b__step\"><summary><span>4</span><strong>Notifications</strong><em data-dsd-release-b-push-badge>Checking</em></summary><div class=\"dsd-release-b__step-body\">' +\n        (iphoneSafari\n          ? '<div class=\"dsd-release-b__ios-guide\"><strong>Add DSD to your Home Screen</strong><ol><li><b>1</b><span>Open the Safari Share menu.</span></li><li><b>2</b><span>Choose Add to Home Screen or Open as Web App.</span></li><li><b>3</b><span>Launch DSD from the Home Screen, return here, and select Enable notifications.</span></li></ol><small>DSD cannot install itself or approve permission for you. Permission is requested only after you select Enable notifications.</small></div>'\n          : \"\") +\n        '<p data-dsd-post-profile-push-status aria-live=\"polite\"></p>' +\n        releaseBPushPreferenceHTML(preferences) +\n        '<div class=\"dsd-release-b__row\">' +\n        (iphoneSafari\n          ? \"\"\n          : '<button type=\"button\" data-dsd-post-profile-push-enable>Enable notifications</button>') +\n        '<button type=\"button\" class=\"is-secondary\" data-dsd-release-b-skip=\"push\">Skip</button></div></div></details></div>' +\n        '<div class=\"dsd-post-profile-push-onboarding__actions\"><button type=\"button\" class=\"is-secondary\" data-dsd-post-profile-push-dismiss>Skip for now</button><button type=\"button\" data-dsd-release-b-finish>Finish</button></div><output class=\"dsd-release-b__status\" data-dsd-release-b-status aria-live=\"polite\"></output></div>'),\n      (document.body || document.documentElement).appendChild(card));\n    card._dsdReleaseBRestoreFocus = document.activeElement;\n    document.documentElement.classList.add(\"dsd-release-b-onboarding-open\");\n    scheduleGlobalOverlayStateSync();\n    syncReleaseBProfilePreview(!1);\n    renderReleaseBLocationState(card);\n    readGeolocationPermissionState().then(function (permission) {\n      saveNearbyLocationState({ permissionState: permission });\n      renderReleaseBLocationState(card);\n    });\n    card._dsdReleaseBPushListener = function (event) {\n      renderReleaseBPushState(card, event.detail);\n    };\n    window.addEventListener(\n      \"dsd:native-push:state\",\n      card._dsdReleaseBPushListener,\n    );\n    renderReleaseBPushState(card, snapshot);\n    if (push && typeof push.loadStatus === \"function\" && !snapshot.status)\n      push.loadStatus().catch(function () {\n        var status = qs(\"[data-dsd-post-profile-push-status]\", card);\n        status &&\n          (status.textContent =\n            \"Push settings are temporarily unavailable. In-site notifications still work.\");\n      });\n    var preferenceSaveTimer = null;\n    card.addEventListener(\"click\", function (event) {\n      var dismiss = event.target.closest(\"[data-dsd-post-profile-push-dismiss]\"),\n        finish = event.target.closest(\"[data-dsd-release-b-finish]\"),\n        skip = event.target.closest(\"[data-dsd-release-b-skip]\"),\n        photo = event.target.closest(\"[data-dsd-release-b-photo]\"),\n        banner = event.target.closest(\"[data-dsd-release-b-banner]\"),\n        nearby = event.target.closest(\"[data-dsd-release-b-nearby-enable]\"),\n        enablePush = event.target.closest(\"[data-dsd-post-profile-push-enable]\"),\n        status = qs(\"[data-dsd-release-b-status]\", card);\n      if (dismiss) return dismissPostProfilePushOnboarding(\"DISMISSED\");\n      if (finish) return dismissPostProfilePushOnboarding(\"DONE\");\n      if (skip)\n        return updatePostProfileOnboardingStep(\n          skip.getAttribute(\"data-dsd-release-b-skip\"),\n          \"skipped\",\n        );\n      if (photo) {\n        var profileRoot = qs(\"[data-dsd-user-profile]\");\n        pauseReleaseBOnboardingForProfileEditor(card, \"avatar\");\n        if (openProfilePanel(\"avatar\", profileRoot)) return;\n        resumeReleaseBOnboardingAfterProfileEditor();\n        status &&\n          (status.textContent =\n            \"Open your Profile to use the existing photo editor.\");\n        return;\n      }\n      if (banner) {\n        var bannerProfileRoot = qs(\"[data-dsd-user-profile]\");\n        pauseReleaseBOnboardingForProfileEditor(card, \"banner\");\n        if (openProfilePanel(\"banner\", bannerProfileRoot)) return;\n        resumeReleaseBOnboardingAfterProfileEditor();\n        status &&\n          (status.textContent =\n            \"Open your Profile to use the existing banner editor.\");\n        return;\n      }\n      if (nearby) {\n        nearby.disabled = !0;\n        status && (status.textContent = \"Requesting browser location...\");\n        return requestNearbyBrowserLocation({ allowPrompt: !0, explicit: !0 })\n          .then(function (saved) {\n            saved && updatePostProfileOnboardingStep(\"nearby\", \"completed\");\n            renderReleaseBLocationState(card);\n            status &&\n              (status.textContent = saved\n                ? \"Nearby is ready. Exact coordinates stay private.\"\n                : \"Nearby was not enabled. Standard Discovery still works.\");\n          })\n          .finally(function () {\n            nearby.disabled = !1;\n          });\n      }\n      if (enablePush && push && typeof push.enable === \"function\") {\n        enablePush.disabled = !0;\n        status && (status.textContent = \"Waiting for browser permission...\");\n        return push\n          .enable()\n          .then(function (result) {\n            if (!result || result.currentDeviceSubscribed !== !0)\n              throw new Error(\"push_subscription_not_active\");\n            updatePostProfileOnboardingStep(\"push\", \"completed\");\n            status && (status.textContent = \"Notifications are active.\");\n          })\n          .catch(function (error) {\n            enablePush.disabled = !1;\n            status &&\n              (status.textContent =\n                error && error.message === \"push_permission_denied\"\n                  ? \"Notifications are blocked in this browser's settings.\"\n                  : \"Notifications could not be enabled. Try again from this setup step.\");\n          });\n      }\n    });\n    card.addEventListener(\"change\", function (event) {\n      var nearbyToggle = event.target.closest(\n          \"[data-dsd-release-b-nearby-toggle]\",\n        ),\n        preference = event.target.closest(\n          \"[data-dsd-release-b-push-preference]\",\n        ),\n        status = qs(\"[data-dsd-release-b-status]\", card);\n      if (nearbyToggle) {\n        persistNearbyLocationPreference(nearbyToggle.checked, null, !1).then(\n          function (saved) {\n            renderReleaseBLocationState(card);\n            status &&\n              (status.textContent = saved\n                ? nearbyToggle.checked\n                  ? \"Nearby preference is on. Select Enable Nearby when you are ready.\"\n                  : \"Nearby is off. Standard Discovery remains available.\"\n                : \"Nearby preference could not be saved. Try again.\");\n          },\n        );\n      }\n      if (preference && push && typeof push.savePreferences === \"function\") {\n        window.clearTimeout(preferenceSaveTimer);\n        preferenceSaveTimer = window.setTimeout(function () {\n          status && (status.textContent = \"Saving notification preferences...\");\n          push\n            .savePreferences(releaseBPushPreferencePayload(card))\n            .then(function () {\n              status && (status.textContent = \"Notification preferences saved.\");\n            })\n            .catch(function () {\n              status &&\n                (status.textContent =\n                  \"Notification preferences could not be saved. Try again.\");\n            });\n        }, 250);\n      }\n    });\n    card.addEventListener(\"keydown\", function (event) {\n      releaseBFocusTrap(event, card);\n    });\n    window.setTimeout(function () {\n      var panel = qs(\".dsd-release-b__panel\", card);\n      panel && panel.focus();\n    }, 0);\n    return card;\n  }\n  function beginProfileSetupResolution(source) {\n    var previous = state.profileSetupResolution || {},\n      actorKey = profileSetupActorKey(),\n      sameActor = !!(\n        previous.actorKey &&\n        actorKey &&\n        previous.actorKey === actorKey\n      ),\n      generation = Number(previous.generation || 0) + 1;\n    state.profileSetupResolution = {\n      generation: generation,\n      actorKey: actorKey,\n      status:\n        sameActor &&\n        (previous.status === \"COMPLETE\" || previous.status === \"INCOMPLETE\")\n          ? previous.status\n          : \"LOADING\",\n      source: source || \"profile-resolution\",\n    };\n    return generation;\n  }\n  function profileSetupActorTransitionAllowed(previousKey, currentKey) {\n    var resolution = state.profileSetupResolution || {};\n    return !!(\n      previousKey === \"authenticated\" &&\n      currentKey &&\n      currentKey !== previousKey &&\n      hasCustomer() &&\n      resolution.status === \"LOADING\" &&\n      (state.sessionActorId || state.sessionProfileKey)\n    );\n  }\n  function commitProfileSetupResolution(generation, profile, source) {\n    var current = state.profileSetupResolution || {},\n      currentActorKey = profileSetupActorKey(),\n      actorTransitionAllowed = profileSetupActorTransitionAllowed(\n        current.actorKey,\n        currentActorKey,\n      );\n    if (\n      Number(current.generation || 0) !== Number(generation || 0) ||\n      (current.actorKey &&\n        current.actorKey !== currentActorKey &&\n        !actorTransitionAllowed)\n    ) {\n      claim(\"profile-setup-resolution:stale-generation-ignored\", {\n        staleGeneration: Number(generation || 0),\n        currentGeneration: Number(current.generation || 0),\n        source: source || \"profile-resolution\",\n      });\n      return current.status || \"UNKNOWN\";\n    }\n    var nextStatus = profileSetupResolvedComplete(profile)\n      ? \"COMPLETE\"\n      : profileSetupRequiredState(profile) ||\n          state.sessionSetupRequired === !0\n        ? \"INCOMPLETE\"\n        : \"ERROR\";\n    if (current.status === \"COMPLETE\" && nextStatus === \"INCOMPLETE\")\n      nextStatus = \"COMPLETE\";\n    if (current.status === \"INCOMPLETE\" && nextStatus === \"ERROR\")\n      nextStatus = \"INCOMPLETE\";\n    state.profileSetupResolution = {\n      generation: Number(generation || 0),\n      actorKey: currentActorKey || current.actorKey,\n      status: nextStatus,\n      source: source || \"profile-resolution\",\n    };\n    syncProfileCompletionOverlay(nextStatus === \"INCOMPLETE\");\n    return nextStatus;\n  }\n  function profileCompletionRequired(profile, isOwn) {\n    var explicitSetupRoute =\n      window.location.pathname === \"/pages/user-profile\" &&\n      queryParam(\"setup\") === \"1\";\n    return !!(\n      isOwn &&\n      profileSetupIncompleteConfirmed(profile) &&\n      (explicitSetupRoute ||\n        state.sessionSetupRequired === !0 ||\n        profileSetupRequiredState(profile))\n    );\n  }\n  function syncProfileCompletionOverlay(visible, completionSaved, deferred) {\n    var currentActorKey = profileSetupActorKey();\n    visible = !!(\n      visible &&\n      profileSetupIncompleteConfirmed(state.profile)\n    );\n    var overlay = qs(\"[data-dsd-profile-completion-overlay]\");\n    if (\n      overlay &&\n      overlay.getAttribute(\"data-dsd-profile-completion-actor\") !==\n        currentActorKey\n    ) {\n      overlay.remove();\n      overlay = null;\n    }\n    if (!visible && state.profileCompletionShowTimer) {\n      window.clearTimeout(state.profileCompletionShowTimer);\n      state.profileCompletionShowTimer = null;\n    }\n    if (visible && deferred !== !0 && !overlay) {\n      if (!state.profileCompletionShowTimer)\n        state.profileCompletionShowTimer = window.setTimeout(function () {\n          state.profileCompletionShowTimer = null;\n          syncProfileCompletionOverlay(\n            profileSetupIncompleteConfirmed(state.profile),\n            !1,\n            !0,\n          );\n        }, 450);\n      return null;\n    }\n    if (!visible) {\n      if (\n        overlay &&\n        overlay.getAttribute(\"data-dsd-profile-completion-pending\") === \"true\" &&\n        completionSaved !== !0 &&\n        profileSetupIncompleteConfirmed(state.profile)\n      )\n        return overlay;\n      (overlay && overlay.remove(),\n        document.documentElement.classList.remove(\n          \"dsd-profile-completion-overlay-open\",\n        ),\n        scheduleGlobalOverlayStateSync());\n      completionSaved &&\n        window.setTimeout(function () {\n          showPostProfilePushOnboarding({ afterCompletion: !0 });\n        }, 700);\n      return null;\n    }\n    if (!overlay) {\n      overlay = document.createElement(\"section\");\n      (overlay.setAttribute(\"data-dsd-profile-completion-overlay\", BUILD),\n        overlay.setAttribute(\n          \"data-dsd-profile-completion-actor\",\n          currentActorKey,\n        ),\n        overlay.setAttribute(\"data-dsd-profile-completion-pending\", \"true\"),\n        overlay.setAttribute(\"role\", \"dialog\"),\n        overlay.setAttribute(\"aria-modal\", \"true\"),\n        overlay.setAttribute(\n          \"aria-labelledby\",\n          \"dsd-profile-completion-title\",\n        ),\n        (overlay.className = \"dsd-profile-completion-overlay\"),\n        (overlay.innerHTML =\n          '<div class=\"dsd-profile-completion-overlay__panel\"><header><span>Welcome to DSD</span><h1 id=\"dsd-profile-completion-title\">Complete your profile</h1><p>Choose the public identity and privacy settings you want to use across DSD.</p></header><form data-dsd-profile-setup-form data-dsd-profile-completion-form><label>Display name<input name=\"displayName\" required autocomplete=\"name\"></label><label>Handle<input name=\"handle\" required autocomplete=\"username\" minlength=\"2\" maxlength=\"80\" pattern=\"[A-Za-z0-9._-]+\"></label>' +\n          locationFieldsHTML(!0) +\n          nearbyProfileSettingsHTML() +\n          messagePrivacySettingsHTML() +\n          onboardingLegalConsentHTML(!0) +\n          '<label>Birthdate<input name=\"birthdate\" type=\"date\" autocomplete=\"bday\"></label><label>Age<input name=\"age\" type=\"number\" min=\"13\" max=\"120\" inputmode=\"numeric\"></label>' +\n          ageVerificationStatusHTML() +\n          '<label>Bio<textarea name=\"bio\" rows=\"4\" maxlength=\"500\"></textarea></label>' +\n          publicationOptions(\"Profile\") +\n          '<label class=\"dsd-adult-content-setting\" data-dsd-adult-content-row><input name=\"adultContentEnabled\" type=\"checkbox\"> Adult Content Enabled <small>Requires a saved or entered age of 18+.</small></label><div class=\"dsd-profile-completion-overlay__actions\"><button type=\"button\" data-dsd-report-setup-issue>Report a setup issue</button><button type=\"submit\">Finish profile</button></div><output data-dsd-activation-status aria-live=\"polite\"></output></form></div>'),\n        document.body.appendChild(overlay));\n    }\n    return (\n      document.documentElement.classList.add(\n        \"dsd-profile-completion-overlay-open\",\n      ),\n      syncProfileSetupForms(overlay),\n      scheduleGlobalOverlayStateSync(),\n      overlay\n    );\n  }\n  function ageVerificationStatusHTML() {\r\n    return '<output class=\"dsd-age-verification-status\" data-dsd-age-verification-status aria-live=\"polite\">Enter a birthdate or age to verify eligibility.</output>';\r\n  }\r\n  function messagePrivacySettingsHTML() {\n    return '<fieldset class=\"dsd-message-profile-settings\" data-dsd-message-profile-settings><legend>Messages</legend>' +\n      (hasDsdPlus()\n        ? '<label><input name=\"allowReadReceipts\" type=\"checkbox\"> Send read receipts</label><small>DSD+ members may turn read receipts off. Receipts appear only when both participants allow them.</small>'\n        : '<p data-dsd-general-read-receipts>Read receipts are on for General profiles.</p><small>DSD+ includes the option to turn read receipts off.</small>') +\n      '</fieldset>';\n  }\n  function activityPrivacySettingsHTML() {\n    return '<section class=\"dsd-activity-privacy-settings\" data-dsd-activity-privacy-settings aria-labelledby=\"dsd-activity-privacy-title\"><header><strong id=\"dsd-activity-privacy-title\">Activity and privacy</strong><p>Manage approved location and messaging preferences here. Push remains managed by the Notifications settings owner.</p></header><div class=\"dsd-activity-privacy-settings__status\"><strong>Presence and last active</strong><span>DSD derives these indicators from signed account activity. They do not change your profile visibility.</span></div>' +\n      nearbyProfileSettingsHTML() +\n      messagePrivacySettingsHTML() +\n      '<div class=\"dsd-activity-privacy-settings__push\"><strong>Push notifications</strong><span>Browser permission is requested only after you choose Enable notifications.</span><a href=\"/pages/notifications#dsd-notification-settings\">Manage Push settings</a></div></section>';\n  }\n  function conversationStarterSettingsHTML() {\n    return '<fieldset class=\"dsd-profile-conversation-starter\"><legend>Conversation starter</legend><label>Prompt<select name=\"conversationStarterPrompt\"><option value=\"\">No starter</option><option value=\"ask_me_about\">Ask me about...</option><option value=\"talk_for_hours\">I could talk for hours about...</option><option value=\"unpopular_opinion\">My unpopular opinion is...</option></select></label><label>Your answer<textarea name=\"conversationStarterAnswer\" rows=\"2\" maxlength=\"160\" placeholder=\"Optional, up to 160 characters\"></textarea></label><small>Shown on your map card. Members can use it to start an editable message draft.</small></fieldset>';\n  }\n  function mapStarSignatureSettingsHTML() {\n    return '<fieldset class=\"dsd-profile-map-signature\" data-dsd-map-signature-settings><legend>Map star signature</legend><div class=\"dsd-profile-map-signature__choices\"><label><input type=\"radio\" name=\"mapStarSignature\" value=\"none\" checked><span aria-hidden=\"true\">None</span><b>None</b></label><label><input type=\"radio\" name=\"mapStarSignature\" value=\"comet\"><span class=\"is-comet\" aria-hidden=\"true\">&#10022;</span><b>Comet</b></label><label><input type=\"radio\" name=\"mapStarSignature\" value=\"four_point\"><span class=\"is-four-point\" aria-hidden=\"true\">&#10022;</span><b>Four point</b></label><label><input type=\"radio\" name=\"mapStarSignature\" value=\"constellation\"><span class=\"is-constellation\" aria-hidden=\"true\">&#10022;&middot;&#10022;</span><b>Constellation</b></label><label><input type=\"radio\" name=\"mapStarSignature\" value=\"frame\"><span class=\"is-frame\" aria-hidden=\"true\">&#10022;</span><b>Purple-gold frame</b></label></div><small>Previewed here and used only on your Map marker and selected Map card. None removes it.</small></fieldset>';\n  }\n  function syncProfilePolicyControls(root) {\n    var policy = state.profilePolicyState || {},\n      receipts = Array.isArray(policy.acknowledgements)\n        ? policy.acknowledgements\n        : [],\n      receipt = receipts.length ? receipts[receipts.length - 1] : null,\n      receiptText = receipt\n        ? \"Acknowledged \" + (formatDateTime(receipt.acknowledgedAt) || \"on file\") +\n          (receipt.policyVersion ? \" (\" + receipt.policyVersion + \")\" : \"\")\n        : policy.legacyAcknowledged\n          ? \"Previously acknowledged - date unavailable.\"\n          : \"No acknowledgement receipt is available.\";\n    qsa(\"[data-dsd-policy-acknowledgement]\", root || document).forEach(function (node) {\n      node.textContent = receiptText;\n    });\n    var preference = policy.readReceipts || {};\n    qsa('[name=\"allowReadReceipts\"]', root || document).forEach(function (field) {\n      if (document.activeElement !== field && field.dataset.dsdUserEdited !== \"true\")\n        field.checked = preference.enabled !== false;\n    });\n  }\n  function locationSuggestionValue(item) {\r\n    return [item.city, item.state].filter(Boolean).join(\", \");\r\n  }\r\n  function ensureLocationSuggestionDatalist() {}\r\n  function canonicalLocationStates() {\r\n    var seen = {};\r\n    return LOCATION_SUGGESTIONS.filter(function (item) {\r\n      return !item.state || seen[item.state]\r\n        ? !1\r\n        : ((seen[item.state] = !0), !0);\r\n    })\r\n      .map(function (item) {\r\n        return item.state;\r\n      })\r\n      .sort();\r\n  }\r\n  function canonicalLocationCities(stateName) {\r\n    return LOCATION_SUGGESTIONS.filter(function (item) {\r\n      return !stateName || item.state === stateName;\r\n    })\r\n      .map(function (item) {\r\n        return item.city;\r\n      })\r\n      .sort();\r\n  }\r\n  function locationFieldsHTML(required) {\n    var requiredAttribute = required === !0 ? ' required aria-required=\"true\"' : \"\";\n    return (\r\n      '<fieldset class=\"dsd-profile-hometown-fields\" data-dsd-canonical-hometown><legend>Hometown</legend>' +\r\n      '<label>Country<select name=\"locationCountry\" data-dsd-location-country-input autocomplete=\"country-name\"' +\r\n      requiredAttribute +\r\n      '><option value=\"United States\">United States</option></select></label>' +\r\n      '<label>State<select name=\"locationState\" data-dsd-location-state-input autocomplete=\"address-level1\"' +\r\n      requiredAttribute +\r\n      '><option value=\"\">Choose a state</option>' +\r\n      canonicalLocationStates()\r\n        .map(function (stateName) {\r\n          return '<option value=\"' + html(stateName) + '\">' + html(stateName) + \"</option>\";\r\n        })\r\n        .join(\"\") +\r\n      \"</select></label>\" +\r\n      '<label>City<select name=\"locationCity\" data-dsd-location-city-input autocomplete=\"address-level2\"' +\r\n      requiredAttribute +\r\n      '><option value=\"\">Choose a city</option>' +\r\n      canonicalLocationCities(\"\")\r\n        .map(function (cityName) {\r\n          return '<option value=\"' + html(cityName) + '\">' + html(cityName) + \"</option>\";\r\n        })\r\n        .join(\"\") +\r\n      \"</select></label></fieldset>\"\r\n    );\r\n  }\r\n  function refreshCanonicalLocationCities(form, preferredCity) {\r\n    var stateField = form && formControl(form, \"locationState\"),\r\n      cityField = form && formControl(form, \"locationCity\");\r\n    if (!stateField || !cityField) return;\r\n    var selected = String(preferredCity || cityField.value || \"\").trim(),\r\n      cities = canonicalLocationCities(stateField.value || \"\");\r\n    cityField.innerHTML =\r\n      '<option value=\"\">Choose a city</option>' +\r\n      cities\r\n        .map(function (cityName) {\r\n          return '<option value=\"' + html(cityName) + '\">' + html(cityName) + \"</option>\";\r\n        })\r\n        .join(\"\");\r\n    cityField.value = cities.indexOf(selected) !== -1 ? selected : \"\";\r\n  }\r\n  function normalizeLocationSuggestion(value) {\r\n    var text = String(value || \"\")\r\n      .trim()\r\n      .replace(/\\s+/g, \" \");\r\n    if (!text) return null;\r\n    var lower = text.toLowerCase(),\r\n      match = LOCATION_SUGGESTIONS.filter(function (item) {\r\n        return (\r\n          lower === locationSuggestionValue(item).toLowerCase() ||\r\n          lower === String(item.city || \"\").toLowerCase()\r\n        );\r\n      })[0];\r\n    return match\r\n      ? { city: match.city, state: match.state, source: \"canonical-select\" }\r\n      : null;\r\n  }\r\n  function applyLocationSuggestion(input) {\r\n    if (\r\n      !input ||\r\n      !input.matches ||\r\n      !input.matches(\"[data-dsd-location-city-input]\")\r\n    )\r\n      return !1;\r\n    var form = input.closest(\"form\"),\r\n      stateField = form && formControl(form, \"locationState\"),\r\n      suggestion = normalizeLocationSuggestion(\r\n        [input.value, stateField && stateField.value].filter(Boolean).join(\", \"),\r\n      );\r\n    if (!suggestion || !suggestion.city) return !1;\r\n    return (\r\n      (input.value = suggestion.city),\r\n      input.setAttribute(\"data-dsd-location-normalized\", \"canonical-select\"),\r\n      stateField &&\r\n        suggestion.state &&\r\n        ((stateField.value = suggestion.state),\r\n        stateField.setAttribute(\r\n          \"data-dsd-location-normalized\",\r\n          \"canonical-select\",\r\n        )),\r\n      !0\r\n    );\r\n  }\r\n  function currentComposerProfile() {\r\n    var customerKey = customerProfileKeyValue(),\r\n      activeKey = activeProfileKeyValue(),\r\n      activeUid = actorUid(),\r\n      selfKey = profileKey(),\r\n      stateProfile = state.profile || null,\r\n      stateKey = normalizedProfileKeyValue(\r\n        stateProfile &&\r\n          (stateProfile.profileKey ||\r\n            stateProfile.handle ||\r\n            stateProfile.profile_key ||\r\n            \"\"),\r\n      ),\r\n      expectedKey = normalizedProfileKeyValue(\n        activeKey || selfKey || customerKey || \"\",\n      ),\n      stateUid = String(\n        stateProfile &&\n          (stateProfile.uid || stateProfile.userId || stateProfile.user_id || \"\"),\n      ).trim(),\n      stateMatchesExpected =\n        !stateProfile ||\n        !expectedKey ||\n        !stateKey ||\n        stateKey === expectedKey ||\n        (!!activeUid && stateUid === String(activeUid).trim()),\n      candidates = [\n        stateMatchesExpected ? stateProfile : null,\n        activeKey ? publicProfileByKey(activeKey) : null,\n        activeUid ? publicProfileByUid(activeUid) : null,\n        selfKey ? publicProfileByKey(selfKey) : null,\n        customerKey ? publicProfileByKey(customerKey) : null,\n      ]\n        .filter(Boolean)\n        .map(function (profile) {\n          return profileWithPublicMirror(profile) || profile;\n        });\n    return (\r\n      candidates.filter(function (profile) {\r\n        return !!canonicalProfileAvatarMediaId(profile);\r\n      })[0] ||\r\n      candidates[0] ||\r\n      {}\r\n    );\r\n  }\r\n  function currentComposerAvatarHTML() {\r\n    var selfProfile = currentComposerProfile(),\r\n      avatarId = canonicalProfileAvatarMediaId(selfProfile),\r\n      fallback = initials(\r\n        composerDisplayName() || composerProfileKey() || \"DS\",\r\n      ).slice(0, 1);\r\n    return avatarId\r\n      ? '<span class=\"dsd-up315__mini-avatar\" data-dsd-profile-composer-avatar data-dsd-avatar-media-id=\"' +\r\n          html(avatarId) +\r\n          '\" data-dsd-profile-key=\"' +\r\n          html(\r\n            selfProfile.profileKey ||\r\n              selfProfile.profile_key ||\r\n              selfProfile.handle ||\r\n              composerProfileKey(),\r\n          ) +\r\n          '\" data-dsd-profile-uid=\"' +\r\n          html(\r\n            selfProfile.uid ||\r\n              selfProfile.userId ||\r\n              selfProfile.user_id ||\r\n              actorUid() ||\r\n              \"\",\r\n          ) +\r\n          '\"><img src=\"' +\r\n          html(mediaReadProxyUrl(avatarId)) +\r\n          '\" alt=\"\" loading=\"eager\" decoding=\"async\" data-dsd-media-proxy-placeholder=\"false\"></span>'\r\n      : '<span class=\"dsd-up315__mini-avatar\" data-dsd-profile-composer-avatar>' +\r\n          html(fallback) +\r\n          \"</span>\";\r\n  }\r\n  function composerDisplayName() {\r\n    var selfProfile = currentComposerProfile();\r\n    return publicDisplayName(\r\n      selfProfile.displayName ||\r\n        selfProfile.name ||\r\n        activeDisplayNameValue() ||\r\n        \"DSD member\",\r\n      \"DSD member\",\r\n    );\r\n  }\r\n  function composerProfileKey() {\r\n    var selfProfile = currentComposerProfile();\r\n    return publicHandleText(\r\n      selfProfile.profileKey ||\r\n        selfProfile.handle ||\r\n        activeProfileKeyValue() ||\r\n        profileKey() ||\r\n        \"member\",\r\n      composerDisplayName(),\r\n      \"member\",\r\n    );\r\n  }\r\n  function canonicalComposerDisplayHandle() {\r\n    var expectedKey = nonPlaceholderProfileKey(\r\n        customerProfileKeyValue() ||\r\n          activeProfileKeyValue() ||\r\n          profileKey() ||\r\n          \"\",\r\n      ),\r\n      expectedUid = actorUid(),\r\n      mirror =\r\n        (expectedKey ? publicProfileByKey(expectedKey) : null) ||\r\n        (expectedUid ? publicProfileByUid(expectedUid) : null),\r\n      handle = nonPlaceholderProfileKey(\r\n        mirror && (mirror.handle || mirror.profileKey || mirror.profile_key),\r\n      );\r\n    return handle\r\n      ? publicHandleText(handle, composerDisplayName(), \"member\")\r\n      : \"\";\r\n  }\r\n  function composerHandleHTML() {\r\n    var handle = canonicalComposerDisplayHandle();\r\n    return handle\r\n      ? '<em data-dsd-composer-identity-handle>@' + html(handle) + \"</em>\"\r\n      : '<em data-dsd-composer-identity-handle hidden aria-busy=\"true\"></em>';\r\n  }\r\n  function syncAuthenticatedMenuIdentity() {\r\n    var avatarNodes = qsa(\"[data-dsd-menu-identity-avatar]\"),\r\n      nameNodes = qsa(\"[data-dsd-menu-identity-name]\"),\r\n      handleNodes = qsa(\"[data-dsd-menu-identity-handle]\");\r\n    if (!(!avatarNodes.length && !nameNodes.length && !handleNodes.length)) {\r\n      if (!hasCustomer()) {\r\n        (avatarNodes.forEach(function (node) {\r\n          (node.removeAttribute(\"data-dsd-avatar-media-id\"),\r\n            (node.textContent = \"DS\"));\r\n        }),\r\n          nameNodes.forEach(function (node) {\r\n            node.textContent = \"Guest\";\r\n          }),\r\n          handleNodes.forEach(function (node) {\r\n            node.textContent = \"Logged out\";\r\n          }));\r\n        return;\r\n      }\r\n      var selfProfile = currentComposerProfile(),\r\n        name = composerDisplayName(),\r\n        handle = composerProfileKey(),\r\n        avatarId = canonicalProfileAvatarMediaId(selfProfile);\r\n      (nameNodes.forEach(function (node) {\r\n        node.textContent = publicDisplayName(name, \"DSD member\");\r\n      }),\r\n        handleNodes.forEach(function (node) {\r\n          node.textContent = \"@\" + publicHandleText(handle, name, \"member\");\r\n        }),\r\n        avatarNodes.forEach(function (node) {\r\n          if (\r\n            (node.setAttribute(\"data-dsd-current-user-avatar\", \"true\"),\r\n            node.setAttribute(\r\n              \"data-dsd-profile-key\",\r\n              selfProfile.profileKey ||\r\n                selfProfile.profile_key ||\r\n                selfProfile.handle ||\r\n                handle,\r\n            ),\r\n            node.setAttribute(\r\n              \"data-dsd-profile-uid\",\r\n              selfProfile.uid ||\r\n                selfProfile.userId ||\r\n                selfProfile.user_id ||\r\n                actorUid() ||\r\n                \"\",\r\n            ),\r\n            !avatarId)\r\n          ) {\r\n            (node.removeAttribute(\"data-dsd-avatar-media-id\"),\r\n              (node.textContent = initials(name || handle || \"DS\").slice(\r\n                0,\r\n                1,\r\n              )));\r\n            return;\r\n          }\r\n          (node.getAttribute(\"data-dsd-avatar-media-id\") !== avatarId &&\r\n            (node.setAttribute(\"data-dsd-avatar-media-id\", avatarId),\r\n            delete node.dataset.dsdAvatarHydrated,\r\n            delete node.dataset.dsdAvatarHydratedMediaId),\r\n            qs(\"img\", node) ||\r\n              (node.innerHTML =\r\n                '<img src=\"' +\r\n                html(mediaReadProxyUrl(avatarId)) +\r\n                '\" alt=\"\" loading=\"eager\" decoding=\"async\" data-dsd-media-proxy-placeholder=\"false\">'),\r\n            hydrateAvatarMedia(node));\r\n        }));\r\n    }\r\n  }\r\n  function syncProfilePublisherIdentity(root, name, safeHandle) {\r\n    var publisher = qs(\"[data-dsd-profile-publisher]\", root);\r\n    if (publisher) {\r\n      var head = qs(\".dsd-up315__composer-head\", publisher);\r\n      if (head) {\r\n        var mini = qs(\".dsd-up315__mini-avatar\", head),\r\n          label = qs(\"strong\", head),\r\n          handle = qs(\"em\", head),\r\n          composerName =\r\n            composerDisplayName() || name || safeHandle || \"DSD member\",\r\n          composerHandle = canonicalComposerDisplayHandle();\r\n        if (mini) {\r\n          var selfProfile = currentComposerProfile(),\r\n            avatarId = canonicalProfileAvatarMediaId(selfProfile);\r\n          (mini.setAttribute(\"data-dsd-profile-composer-avatar\", \"true\"),\r\n            avatarId\r\n              ? (mini.setAttribute(\"data-dsd-avatar-media-id\", avatarId),\r\n                qs(\"img\", mini) ||\r\n                  (mini.innerHTML =\r\n                    '<img src=\"' +\r\n                    html(mediaReadProxyUrl(avatarId)) +\r\n                    '\" alt=\"\" loading=\"eager\" decoding=\"async\" data-dsd-media-proxy-placeholder=\"false\">'),\r\n                delete mini.dataset.dsdAvatarHydrated,\r\n                delete mini.dataset.dsdAvatarHydratedMediaId,\r\n                hydrateAvatarMedia(head))\r\n              : (mini.removeAttribute(\"data-dsd-avatar-media-id\"),\r\n                delete mini.dataset.dsdAvatarHydrated,\r\n                delete mini.dataset.dsdAvatarHydratedMediaId,\r\n                (mini.textContent = initials(\r\n                  composerName || composerHandle || \"DS\",\r\n                ).slice(0, 1))));\r\n        }\r\n        (label &&\r\n          (label.textContent = publicDisplayName(composerName, \"DSD member\")),\r\n          handle &&\r\n            (composerHandle\r\n              ? ((handle.hidden = !1),\r\n                handle.removeAttribute(\"aria-busy\"),\r\n                (handle.textContent = \"@\" + composerHandle))\r\n              : ((handle.hidden = !0),\r\n                handle.setAttribute(\"aria-busy\", \"true\"),\r\n                (handle.textContent = \"\"))));\r\n      }\r\n    }\r\n  }\r\n  function syncComposerIdentity(host) {\r\n    if (host) {\r\n      var head = qs(\".dsd-up315__composer-head\", host);\r\n      if (head) {\r\n        var mini = qs(\".dsd-up315__mini-avatar\", head),\r\n          label = qs(\"strong\", head),\r\n          handle = qs(\"em\", head),\r\n          name = composerDisplayName(),\r\n          safeHandle = canonicalComposerDisplayHandle(),\r\n          selfProfile = currentComposerProfile(),\r\n          avatarId = canonicalProfileAvatarMediaId(selfProfile);\r\n        (mini &&\r\n          (mini.setAttribute(\"data-dsd-profile-composer-avatar\", \"true\"),\r\n          avatarId\r\n            ? (mini.getAttribute(\"data-dsd-avatar-media-id\") !== avatarId &&\r\n                (mini.setAttribute(\"data-dsd-avatar-media-id\", avatarId),\r\n                delete mini.dataset.dsdAvatarHydrated,\r\n                delete mini.dataset.dsdAvatarHydratedMediaId),\r\n              qs(\"img\", mini) ||\r\n                (mini.innerHTML =\r\n                  '<img src=\"' +\r\n                  html(mediaReadProxyUrl(avatarId)) +\r\n                  '\" alt=\"\" loading=\"eager\" decoding=\"async\" data-dsd-media-proxy-placeholder=\"false\">'),\r\n              hydrateAvatarMedia(head))\r\n            : (mini.removeAttribute(\"data-dsd-avatar-media-id\"),\r\n              delete mini.dataset.dsdAvatarHydrated,\r\n              delete mini.dataset.dsdAvatarHydratedMediaId,\r\n              (mini.textContent = initials(name || safeHandle || \"DS\").slice(\r\n                0,\r\n                1,\r\n              )))),\r\n          label &&\r\n            (label.textContent = publicDisplayName(\r\n              name || safeHandle || \"DSD member\",\r\n              \"DSD member\",\r\n            )),\r\n          handle &&\r\n            (safeHandle\r\n              ? ((handle.hidden = !1),\r\n                handle.removeAttribute(\"aria-busy\"),\r\n                (handle.textContent = \"@\" + safeHandle))\r\n              : ((handle.hidden = !0),\r\n                handle.setAttribute(\"aria-busy\", \"true\"),\r\n                (handle.textContent = \"\"))));\r\n      }\r\n    }\r\n  }\r\n  function deconstructPublicProfileOwnerControls(root) {\r\n    if (root) {\r\n      (root.setAttribute(\"data-dsd-public-owner-controls-deconstructed\", BUILD),\r\n        qsa(\r\n          '[data-dsd-profile-modal-open=\"banner\"], [data-dsd-profile-modal-open=\"avatar\"], [data-dsd-profile-modal-open=\"edit\"]',\r\n          root,\r\n        ).forEach(function (control) {\r\n          setProfileOwnerControlState(control, !1);\r\n        }),\r\n        qsa(\"[data-dsd-profile-publisher]\", root).forEach(function (publisher) {\r\n          ((publisher.innerHTML = \"\"),\r\n            (publisher.hidden = !0),\r\n            publisher.setAttribute(\"aria-hidden\", \"true\"),\r\n            publisher.setAttribute(\r\n              \"data-dsd-public-view-publisher-deconstructed\",\r\n              BUILD,\r\n            ),\r\n            (publisher.style.display = \"none\"),\r\n            delete publisher.dataset.dsdFirebaseComposer,\r\n            delete publisher.dataset.dsdCanonicalComposerMounted);\r\n        }),\r\n        qsa('[data-dsd-story385-profile-action=\"create\"]', root).forEach(\r\n          function (control) {\r\n            ((control.hidden = !0),\r\n              (control.disabled = !0),\r\n              control.setAttribute(\"aria-hidden\", \"true\"),\r\n              control.style.setProperty(\"display\", \"none\", \"important\"));\r\n          },\r\n        ));\r\n      var actions = qs(\".dsd-up315__actions\", root);\r\n      actions &&\r\n        (actions.innerHTML =\r\n          '<a class=\"dsd-up315__action dsd-up315__action--gold\" href=\"' +\r\n          loginReturnUrl() +\r\n          '\">Log in</a><a class=\"dsd-up315__action\" href=\"' +\r\n          registerReturnUrl() +\r\n          '\">Create account</a>');\r\n    }\r\n  }\r\n  function setProfileOwnerControlState(control, visible) {\n    control &&\r\n      (control.setAttribute(\"data-dsd-owner-control\", \"true\"),\r\n      (control.hidden = !visible),\r\n      (control.disabled = !visible),\r\n      control.setAttribute(\"aria-hidden\", visible ? \"false\" : \"true\"),\r\n      control.setAttribute(\"aria-disabled\", visible ? \"false\" : \"true\"),\r\n      visible\r\n        ? control.style.removeProperty(\"display\")\r\n        : control.style.setProperty(\"display\", \"none\", \"important\"));\n  }\n  function setProfileRestrictedSurfaceState(node, restricted) {\n    if (!node) return;\n    ((node.hidden = restricted),\n      node.setAttribute(\"aria-hidden\", restricted ? \"true\" : \"false\"),\n      restricted\n        ? node.style.setProperty(\"display\", \"none\", \"important\")\n        : node.style.removeProperty(\"display\"));\n  }\n  function profileGlanceGuestSessionToken() {\n    var key = \"dsd.profile.glance.guest.session.v1\";\n    try {\n      var existing = window.sessionStorage.getItem(key);\n      if (existing) return existing;\n      var bytes = new Uint8Array(18);\n      window.crypto && window.crypto.getRandomValues\n        ? window.crypto.getRandomValues(bytes)\n        : bytes.forEach(function (_value, index) {\n            bytes[index] = Math.floor(Math.random() * 256);\n          });\n      var token = Array.prototype.map\n        .call(bytes, function (value) {\n          return value.toString(16).padStart(2, \"0\");\n        })\n        .join(\"\");\n      window.sessionStorage.setItem(key, token);\n      return token;\n    } catch (_error) {\n      return \"\";\n    }\n  }\n  function routeHashtag() {\n    var value = String(queryParam(\"hashtag\") || \"\")\n      .trim()\n      .replace(/^#+/, \"\")\n      .toLowerCase();\n    return /^[a-z0-9_]{1,48}$/.test(value) ? value : \"\";\n  }\n  function profileGlanceRequest(action, options) {\n    options = options || {};\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/profile-glances\", {\n      method: \"POST\",\n      credentials: \"include\",\n      headers: { \"Content-Type\": \"application/json\", Accept: \"application/json\" },\n      body: JSON.stringify({\n        action: action,\n        targetProfileKey: options.targetProfileKey || \"\",\n        guestSessionToken: options.guestSessionToken || \"\",\n        filter: options.filter || \"all\",\n        limit: options.limit || 0,\n        offset: options.offset || 0,\n      }),\n    }).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try {\n          body = text ? JSON.parse(text) : {};\n        } catch (_error) {}\n        if (!response.ok || body.ok === !1) {\n          var error = new Error(body.error || \"profile_glances_request_failed\");\n          error.status = response.status;\n          error.body = body;\n          throw error;\n        }\n        return body;\n      });\n    });\n  }\n  function ensureProfileGlanceUI(root, own) {\n    if (!root) return;\n    var strip = qs(\"[data-dsd-relationship-layer]\", root),\n      existing = qs(\"[data-dsd-profile-glance-stat]\", root),\n      legacyOwnerControl = qs('[data-dsd-profile-modal-open=\"glances\"]', root),\n      ownerControl = existing && existing.hasAttribute(\"data-dsd-profile-modal-open\"),\n      panel = qs('[data-dsd-profile-modal-panel=\"glances\"]', root);\n    if (!own) {\n      ownerControl && existing.remove();\n      legacyOwnerControl && legacyOwnerControl.remove();\n      panel && panel.remove();\n      existing = qs(\"[data-dsd-profile-glance-stat]\", root);\n      if (strip && !existing)\n        strip.insertAdjacentHTML(\n          \"beforeend\",\n          '<div data-dsd-profile-glance-stat data-dsd-profile-glance-readonly role=\"status\" aria-label=\"Profile Glances\"><strong data-dsd-profile-glance-count>0</strong><span>Glances</span></div>',\n        );\n      return;\n    }\n    existing && !ownerControl && existing.remove();\n    existing = qs('[data-dsd-profile-modal-open=\"glances\"]', root);\n    existing && existing.setAttribute(\"data-dsd-profile-glance-stat\", \"\");\n    existing && setProfileOwnerControlState(existing, !0);\n    if (strip && !existing)\n      strip.insertAdjacentHTML(\n        \"beforeend\",\n        '<button type=\"button\" data-dsd-profile-glance-stat data-dsd-profile-modal-open=\"glances\" data-dsd-owner-control aria-label=\"Open profile Glances\"><strong data-dsd-profile-glance-count>0</strong><span>Glances</span><span class=\"dsd-profile-glances__preview-avatars\" data-dsd-profile-glance-preview-avatars aria-hidden=\"true\"></span></button>',\n      );\n    var layer = qs(\"[data-dsd-profile-modal-layer]\", root);\n    if (layer && !qs('[data-dsd-profile-modal-panel=\"glances\"]', layer)) {\n      var dialog = qs('[role=\"dialog\"]', layer);\n      dialog &&\n        dialog.insertAdjacentHTML(\n          \"beforeend\",\n          '<div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"glances\"><div class=\"dsd-up315__modal-card dsd-profile-glances\" data-dsd-profile-glances><div class=\"dsd-profile-glances__state\">Glances load when this panel opens.</div></div></div>',\n        );\n    }\n  }\n  function profileGlanceAvatarHTML(row) {\n    var label = publicDisplayName(row.displayName || row.handle || \"DSD member\", \"DSD member\"),\n      mediaId = row.avatarMediaId || row.avatar_media_id || \"\";\n    return mediaId\n      ? '<span class=\"dsd-profile-glances__avatar\" data-dsd-avatar-media-id=\"' +\n          html(mediaId) +\n          '\" data-dsd-profile-key=\"' +\n          html(row.profileKey || row.handle || \"\") +\n          '\" aria-label=\"' +\n          html(label) +\n          '\"></span>'\n      : '<span class=\"dsd-profile-glances__avatar dsd-profile-glances__avatar--fallback\" aria-hidden=\"true\">' +\n          html(initials(label)) +\n          \"</span>\";\n  }\n  function renderProfileGlances() {\n    var root = qs(\"[data-dsd-user-profile]\"),\n      panel = root && qs(\"[data-dsd-profile-glances]\", root),\n      summary = state.profileGlanceSummary || {},\n      rows = state.profileGlanceRows || [],\n      countNode = root && qs(\"[data-dsd-profile-glance-count]\", root),\n      previewAvatars = root && qs(\"[data-dsd-profile-glance-preview-avatars]\", root),\n      profile = viewedProfile() || {},\n      publicProfileKey = normalizedProfileKeyValue(\n        routeProfileKey() || profile.profileKey || profile.profile_key || profile.handle || \"\",\n      ),\n      publicCount = Math.max(\n        0,\n        Number(\n          state.publicProfileGlanceCounts[publicProfileKey] != null\n            ? state.publicProfileGlanceCounts[publicProfileKey]\n            : profile.viewCount != null\n              ? profile.viewCount\n              : profile.profileViewCount != null\n                ? profile.profileViewCount\n                : profile.view_count || profile.profile_view_count || 0,\n        ) || 0,\n      ),\n      summaryCount = Math.max(\n        0,\n        Number(summary.identifiedCount || 0) + Number(summary.publicCount || 0),\n      ),\n      premium = !!(summary.entitlement && summary.entitlement.dsdPlus === !0);\n    if (countNode)\n      countNode.textContent = String(\n        isOwnProfileRoute() && state.profileGlanceSummary ? summaryCount : publicCount,\n      );\n    if (previewAvatars) {\n      previewAvatars.innerHTML = rows.slice(0, 3).map(profileGlanceAvatarHTML).join(\"\");\n      hydrateProfileCardMedia(previewAvatars);\n    }\n    if (!panel) return;\n    if (state.profileGlancePending && !rows.length) {\n      panel.innerHTML = '<div class=\"dsd-profile-glances__state\" aria-live=\"polite\">Loading Glances...</div>';\n      return;\n    }\n    var filters = premium\n        ? [\"all\", \"new\", \"returned\", \"connected\"]\n            .map(function (filter) {\n              return '<button type=\"button\" data-dsd-profile-glance-filter=\"' +\n                filter + '\" aria-pressed=\"' + (state.profileGlanceFilter === filter) + '\">' +\n                (filter === \"all\" ? \"All\" : filter.charAt(0).toUpperCase() + filter.slice(1)) +\n                \"</button>\";\n            })\n            .join(\"\")\n        : \"\",\n      cards = rows.length\n        ? rows.map(function (row) {\n            var key = normalizedProfileKeyValue(row.profileKey || row.handle || \"\"),\n              available = row.available !== !1 && !!key,\n              following = row.ownerFollowsViewer === !0 || row.owner_follows_viewer === !0,\n              status = state.profileGlanceFilter === \"new\"\n                ? \"NEW\"\n                : state.profileGlanceFilter === \"returned\"\n                  ? \"RETURNED\"\n                  : state.profileGlanceFilter === \"connected\"\n                    ? \"CONNECTED\"\n                    : [\"NEW\", \"RETURNED\", \"CONNECTED\"].indexOf(String(row.status || \"\")) !== -1\n                      ? String(row.status)\n                      : Number(row.viewCount || 1) > 1\n                        ? \"RETURNED\"\n                        : \"NEW\";\n            return '<article class=\"dsd-profile-glances__row\" data-dsd-profile-glance-row data-status=\"' +\n              html(status.toLowerCase()) + '\">' + profileGlanceAvatarHTML(row) +\n              '<div class=\"dsd-profile-glances__identity\"><strong>' +\n              html(publicDisplayName(row.displayName || \"Unavailable DSD member\", \"Unavailable DSD member\")) +\n              \"</strong>\" + (available ? \"<span>@\" + html(publicHandleText(key, row.displayName || \"\", \"member\")) + \"</span>\" : \"\") +\n              '<small><b>' + html(status) + \"</b> \" +\n              html(formatDateTime(row.latestViewedAt || row.latest_viewed_at) || \"Recently\") +\n              \"</small></div>\" +\n              (available\n                ? '<div class=\"dsd-profile-glances__actions\"><a href=\"' + html(profileRouteHref(key)) +\n                  '\">Profile</a><a href=\"/pages/messages?profile=' + encodeURIComponent(key) +\n                  '\">Message</a><button type=\"button\" data-dsd-connection-signal=\"wave\" data-dsd-target-profile=\"' + html(key) +\n                  '\">Wave</button><button type=\"button\" data-dsd-toggle-follow-profile=\"\" data-profile-key=\"' + html(key) +\n                  '\" aria-pressed=\"' + following + '\">' + (following ? \"Following\" : \"Follow\") + '</button></div>'\n                : \"\") + \"</article>\";\n          }).join(\"\")\n        : '<div class=\"dsd-profile-glances__state\"><strong>No Glances yet</strong><span>Authorized profile visits appear here.</span></div>';\n    panel.innerHTML = '<div class=\"dsd-profile-glances__summary\"><div><strong>' +\n      html(String(Number(summary.identifiedCount || 0))) + '</strong><span>Profiles</span></div><div><strong>' +\n      html(String(Number(summary.publicViews || 0))) + '</strong><span>Public views</span></div><div><strong>' +\n      html(String(Number(summary.returnedCount || 0))) + '</strong><span>Returned</span></div></div>' +\n      (filters ? '<div class=\"dsd-profile-glances__filters\" aria-label=\"Filter Glances\">' + filters + \"</div>\" : \"\") +\n      '<div class=\"dsd-profile-glances__list\">' + cards + \"</div>\" +\n      (summary.hasMore ? '<button type=\"button\" class=\"dsd-profile-glances__more\" data-dsd-profile-glance-more>Load more</button>' : \"\") +\n      (!premium ? '<p class=\"dsd-profile-glances__upgrade\">General history covers 7 days and 50 profiles. DSD+ expands history to 30 days, 150 profiles, and filters.</p>' : \"\");\n    hydrateProfileCardMedia(panel);\n  }\n  function hydratePublicProfileGlanceCount() {\n    if (isOwnProfileRoute()) return Promise.resolve(null);\n    var profile = viewedProfile() || {},\n      key = normalizedProfileKeyValue(\n        routeProfileKey() || profile.profileKey || profile.profile_key || profile.handle || \"\",\n      );\n    if (!key || state.publicProfileGlancePending[key]) return Promise.resolve(null);\n    if (state.publicProfileGlanceCounts[key] != null) {\n      renderProfileGlances();\n      return Promise.resolve(state.publicProfileGlanceCounts[key]);\n    }\n    state.publicProfileGlancePending[key] = !0;\n    return profileGlanceRequest(\"public_summary\", { targetProfileKey: key })\n      .then(function (result) {\n        state.publicProfileGlanceCounts[key] = Math.max(0, Number(result && result.count) || 0);\n        delete state.publicProfileGlancePending[key];\n        renderProfileGlances();\n        return state.publicProfileGlanceCounts[key];\n      })\n      .catch(function (error) {\n        delete state.publicProfileGlancePending[key];\n        claim(\"profile-glances:public-summary-fail-closed\", {\n          profileKey: key,\n          status: error && error.status,\n        });\n        return null;\n      });\n  }\n  function hydrateProfileGlances(force, append) {\n    if (!isOwnProfileRoute() || !hasCustomer() || state.profileGlancePending)\n      return Promise.resolve(null);\n    if (!force && state.profileGlanceSummary) {\n      renderProfileGlances();\n      return Promise.resolve(state.profileGlanceSummary);\n    }\n    state.profileGlancePending = !0;\n    append || ((state.profileGlanceRows = []), (state.profileGlanceOffset = 0));\n    renderProfileGlances();\n    var action = force || append ? \"page\" : \"summary\";\n    return profileGlanceRequest(action, {\n      filter: state.profileGlanceFilter,\n      limit: action === \"summary\" ? 3 : 25,\n      offset: append ? state.profileGlanceOffset : 0,\n    }).then(function (result) {\n      var incoming = Array.isArray(result.rows) ? result.rows : [];\n      state.profileGlanceSummary = result;\n      state.profileGlanceRows = append ? state.profileGlanceRows.concat(incoming) : incoming;\n      state.profileGlanceOffset = state.profileGlanceRows.length;\n      state.profileGlancePending = !1;\n      renderProfileGlances();\n      return result;\n    }).catch(function (error) {\n      state.profileGlancePending = !1;\n      claim(\"profile-glances:fail-closed\", { status: error && error.status, error: error && error.message });\n      var panel = qs(\"[data-dsd-profile-glances]\");\n      panel && (panel.innerHTML = '<div class=\"dsd-profile-glances__state\"><strong>Glances unavailable</strong><span>Try again from this panel.</span><button type=\"button\" data-dsd-profile-glance-retry>Retry</button></div>');\n      return null;\n    });\n  }\n  function recordProfileGlance(profile, profileContentVisible, profileReadyForDisplay) {\n    if (!profile || !profileContentVisible || !profileReadyForDisplay || isOwnProfileRoute()) return;\n    var targetKey = nonPlaceholderProfileKey(\n      profile.profileKey || profile.profile_key || profile.handle || routeProfileKey() || \"\",\n    );\n    if (!targetKey || state.profileGlanceRecordClaims[targetKey]) return;\n    state.profileGlanceRecordClaims[targetKey] = \"pending\";\n    profileGlanceRequest(\"record\", {\n      targetProfileKey: targetKey,\n      guestSessionToken: hasCustomer() ? \"\" : profileGlanceGuestSessionToken(),\n    }).then(function (result) {\n      state.profileGlanceRecordClaims[targetKey] = result && result.deduped ? \"deduped\" : \"recorded\";\n    }).catch(function (error) {\n      delete state.profileGlanceRecordClaims[targetKey];\n      claim(\"profile-glance-record:fail-closed\", {\n        profileKey: targetKey,\n        status: error && error.status,\n        error: error && error.message,\n      });\n    });\n  }\n  function renderProfileIdentity() {\n    var root = qs(\"[data-dsd-user-profile]\");\r\n    if (root) {\r\n      root.classList.add(\"dsd-up315\", \"dsd-up353\");\r\n      var profile = viewedProfile(),\r\n        targetProfileKey = routeProfileKey(),\r\n        rawProfileParam = String(queryParam(\"profile\") || \"\")\r\n          .trim()\r\n          .replace(/^@+/, \"\");\r\n      if (rawProfileParam && placeholderProfileKey(rawProfileParam)) {\r\n        ((root.hidden = !1),\r\n          root.setAttribute(\"data-dsd-profile-view-mode\", \"public-view\"),\r\n          root.setAttribute(\r\n            \"data-dsd-placeholder-profile-query-blocked\",\r\n            BUILD,\r\n          ),\r\n          (root.innerHTML =\r\n            '<section class=\"dsd-launch-auth-required\" data-dsd-owner=\"ProfileRenderer\" data-dsd-placeholder-profile-query=\"true\"><h1>Discover profiles</h1><p>This profile link is no longer active.</p><a class=\"dsd-launch-action\" href=\"/pages/users\">Discover users</a></section>'));\r\n        return;\r\n      }\r\n      var ownTargetProfile =\r\n        hasCustomer() && targetProfileKey && targetProfileKey === profileKey();\r\n      if (!profile && targetProfileKey) {\r\n        var listedProfile =\r\n          state.publicProfiles.filter(function (item) {\r\n            return (\r\n              item &&\r\n              (item.profileKey === targetProfileKey ||\r\n                item.handle === targetProfileKey ||\r\n                item.id === targetProfileKey)\r\n            );\r\n          })[0] || null;\r\n        listedProfile &&\r\n          viewedProfileVisible(listedProfile) &&\r\n          ((profile = listedProfile), (state.viewProfile = listedProfile));\r\n      }\r\n      if (\r\n        (hasCustomer() &&\r\n          (!targetProfileKey || ownTargetProfile) &&\r\n          reconcileCurrentPublicProfileMirror(\"owner-profile-render\"),\r\n        !profile && targetProfileKey && !ownTargetProfile)\r\n      ) {\r\n        if (\r\n          (loadViewedPublicProfile(),\r\n          state.publicProfilesLoaded &&\r\n            state.viewProfileResolvedKey !== targetProfileKey &&\r\n            (state.viewProfileResolvedKey = targetProfileKey),\r\n          state.viewProfileResolvedKey !== targetProfileKey ||\r\n            state.viewProfileMissingKey !== targetProfileKey)\r\n        ) {\r\n          ((root.hidden = !1),\r\n            root.setAttribute(\"data-dsd-profile-view-mode\", \"public-view\"),\r\n            root.setAttribute(\"data-dsd-profile-loading\", \"supabase-canonical\"),\r\n            ensureProfileShell(root, \"\", \"\", {\r\n              profileKey: targetProfileKey,\r\n              handle: targetProfileKey,\r\n              bio: \"\",\r\n            }));\r\n          var pendingName = qs(\r\n              \"[data-dsd-profile-name], .dsd-up315__identity-copy h1\",\r\n              root,\r\n            ),\r\n            pendingHandle = qs(\".dsd-up315__handle\", root);\r\n          (pendingName && (pendingName.textContent = \"\"),\r\n            pendingHandle && (pendingHandle.textContent = \"\"));\r\n          var pendingBio = qs(\"[data-dsd-profile-about]\", root);\r\n          (pendingBio && (pendingBio.textContent = \"\"),\r\n            deconstructPublicProfileOwnerControls(root));\r\n          return;\r\n        }\r\n        root.innerHTML =\r\n          '<section class=\"dsd-launch-auth-required\" data-dsd-owner=\"ProfileRenderer\" data-dsd-profile-unavailable=\"true\"><h1>Discover profiles</h1><p>This public profile is not active or cannot be displayed.</p><a class=\"dsd-launch-action\" href=\"/pages/users\">Discover users</a></section>';\r\n        return;\r\n      }\r\n      if (\r\n        (profile && (profile = profileWithPublicMirror(profile) || profile),\r\n        !profile && ownTargetProfile)\r\n      ) {\r\n        root.hidden = !1;\r\n        return;\r\n      }\r\n      if (!profile && !hasCustomer()) {\r\n        ((root.hidden = !1),\r\n          root.setAttribute(\"data-dsd-profile-view-mode\", \"public-view\"),\r\n          deconstructPublicProfileOwnerControls(root));\r\n        return;\r\n      }\r\n      if (\r\n        hasCustomer() &&\r\n        !routeProfileKey() &&\r\n        !state.profile\r\n      ) {\r\n        (supabaseCutoverReady() &&\r\n          root.dataset.dsdOwnerSessionRecoveryStarted !== BUILD &&\r\n          ((root.dataset.dsdOwnerSessionRecoveryStarted = BUILD),\r\n          primeSupabaseEntitlementSession()\r\n            .then(function () {\r\n              (scheduleLateProfileHydrationReconcile(),\r\n                renderProfileIdentity());\r\n            })\r\n            .catch(function (error) {\r\n              claim(\"owner-profile-session-recovery:blocked\", {\r\n                error: (error && error.message) || String(error),\r\n              });\r\n            })),\r\n          (root.hidden = !1),\n          root.setAttribute(\"data-dsd-profile-loading\", \"supabase-canonical\"),\n          ensureProfileShell(root, \"\", \"\", state.profile || {}),\n          syncProfileCompletionOverlay(\n            profileCompletionRequired(state.profile, !0),\n          ),\n          qsa(\r\n            '[data-dsd-profile-modal-open], [data-dsd-story385-profile-action=\"create\"]',\r\n            root,\r\n          ).forEach(function (control) {\r\n            (control.setAttribute(\"aria-disabled\", \"true\"),\r\n              control.tagName === \"BUTTON\" && (control.disabled = !0));\r\n          }),\r\n          renderProfileModals());\r\n        return;\r\n      }\r\n      root.hidden = !1;\r\n      var isOwn = isOwnProfileRoute(),\r\n        identityPending =\r\n          !!(profile && profile.identityRebindingRequired === !0) ||\r\n          ownIdentityRebindingRequired();\r\n      if (\r\n        (identityPending &&\r\n          !profile &&\r\n          (profile = state.profile || identityRebindingRequiredProfile()),\r\n        root.setAttribute(\r\n          \"data-dsd-profile-view-mode\",\r\n          isOwn ? \"owner\" : \"public-view\",\r\n        ),\r\n        root.setAttribute(\r\n          \"data-dsd-identity-rebinding-required\",\r\n          identityPending ? \"true\" : \"false\",\r\n        ),\r\n        isOwn &&\r\n          root.removeAttribute(\"data-dsd-public-owner-controls-deconstructed\"),\r\n        root.classList.toggle(\"dsd-up315--viewed-profile\", !isOwn),\r\n        root.classList.toggle(\"dsd-up315--owner-profile\", isOwn),\r\n        isOwn && !routeProfileKey() && !profileRecordHasUsableKey(profile))\r\n      ) {\r\n        var recoveredSelfProfile =\r\n          profileWithPublicMirror(\r\n            state.profile ||\r\n              publicProfileByUid(actorUid()) ||\r\n              publicProfileByKey(\r\n                customerProfileKeyValue() ||\r\n                  activeProfileKeyValue() ||\r\n                  profileKey() ||\r\n                  \"\",\r\n              ) ||\r\n              {},\r\n          ) || {};\r\n        (profileRecordHasUsableKey(recoveredSelfProfile) ||\r\n          profileRecordHasSavedIdentity(recoveredSelfProfile)) &&\r\n          ((profile =\r\n            profileWithPublicMirror(\r\n              Object.assign({}, profile || {}, recoveredSelfProfile),\r\n            ) || recoveredSelfProfile),\r\n          (state.profile = profile),\r\n          root.removeAttribute(\"data-dsd-profile-loading\"),\r\n          claim(\"profile-shell-placeholder:recovered-from-saved-identity\", {\r\n            profileKey: profile.profileKey || profile.handle || \"\",\r\n            owner: \"LaunchSocialActivation.ProfileRenderer\",\r\n            build: BUILD,\r\n          }));\r\n      }\r\n      var savedSelfProfile = profileWithPublicMirror(\r\n          state.profile ||\r\n            publicProfileByUid(actorUid()) ||\r\n            publicProfileByKey(\r\n              customerProfileKeyValue() ||\r\n                activeProfileKeyValue() ||\r\n                verifiedStoreScopedProfileKey() ||\r\n                state.sessionProfileKey ||\r\n                profileKey() ||\r\n                \"\",\r\n            ) ||\r\n            {},\r\n        ),\r\n        ownerResolvedProfileKey = nonPlaceholderProfileKey(\r\n          (profile &&\r\n            (profile.profileKey || profile.handle || profile.profile_key)) ||\r\n            (savedSelfProfile &&\r\n              (savedSelfProfile.profileKey ||\r\n                savedSelfProfile.handle ||\r\n                savedSelfProfile.profile_key)) ||\r\n            (state.profile &&\r\n              (state.profile.profileKey ||\r\n                state.profile.handle ||\r\n                state.profile.profile_key)) ||\r\n            state.sessionProfileKey ||\r\n            customerProfileKeyValue() ||\r\n            activeProfileKeyValue() ||\r\n            profileKey() ||\r\n            \"\",\r\n        ),\r\n        profileHasSavedIdentity =\r\n          !!ownerResolvedProfileKey ||\r\n          profileRecordHasSavedIdentity(profile) ||\r\n          profileRecordHasSavedIdentity(state.profile) ||\r\n          profileRecordHasSavedIdentity(savedSelfProfile),\r\n        placeholderSelfProfile =\r\n          isOwn &&\r\n          !routeProfileKey() &&\r\n          !ownerResolvedProfileKey &&\r\n          !profileRecordHasUsableKey(profile) &&\r\n          !profileHasSavedIdentity,\r\n        ownerPublishingLocked =\r\n          isOwn &&\r\n          !routeProfileKey() &&\r\n          !ownerResolvedProfileKey &&\r\n          !profileHasSavedIdentity,\r\n        ownerProfileHydrationPending =\r\n          isOwn &&\r\n          !routeProfileKey() &&\r\n          hasCustomer() &&\r\n          supabaseCutoverReady() &&\r\n          !identityPending &&\r\n          !ownerResolvedProfileKey &&\r\n          !profileRecordHasUsableKey(profile) &&\r\n          !profileHasSavedIdentity &&\r\n          (!state.bridgeChecked || !!state.sessionProfileKey);\r\n      if (ownerProfileHydrationPending) {\n        (ensureProfileShell(root, \"\", \"\", state.profile || {}),\n          syncProfileCompletionOverlay(\n            profileCompletionRequired(state.profile, !0),\n          ),\n          root.setAttribute(\"data-dsd-profile-loading\", \"supabase-canonical\"),\r\n          (root.dataset.dsdProfileHydrated = \"\"),\r\n          scheduleLateProfileHydrationReconcile(),\r\n          renderProfileModals());\r\n        return;\r\n      }\r\n      var key = nonPlaceholderProfileKey(\r\n          (profile && (profile.profileKey || profile.handle)) || profileKey(),\r\n        ),\r\n        name =\r\n          identityPending || placeholderSelfProfile\r\n            ? \"\"\r\n            : publicDisplayName(\r\n                (profile && profile.displayName) || \"\",\r\n                profileDisplayNameFallback(key),\r\n              ),\r\n        safeHandle =\r\n          identityPending || placeholderSelfProfile\r\n            ? \"\"\r\n            : publicHandleText(key, name, \"member\");\r\n      !isOwn && targetProfileKey && profile &&\r\n        loadViewedPublicRelationships(profile);\r\n      ensureProfileShell(root, name, safeHandle, profile);\r\n      var h = qs(\"[data-dsd-profile-name], .dsd-up315__identity-copy h1\", root);\r\n      h && (h.textContent = name);\r\n      var handle = qs(\".dsd-up315__handle\", root);\n      var presenceNode = ensureProfilePresenceNode(root);\n      (handle && (handle.textContent = safeHandle ? \"@\" + safeHandle : \"\"),\n        presenceNode &&\n          ((presenceNode.textContent = identityPending\n            ? \"\"\n            : profilePresenceLabel(profile)),\n          presenceNode.classList.toggle(\n            \"is-active\",\n            profilePresenceActive(profile),\n          ),\n          presenceNode.classList.toggle(\n            \"is-inactive\",\n            !profilePresenceActive(profile),\n          ),\n          (presenceNode.hidden = identityPending)),\n        isOwn &&\n          !identityPending &&\r\n          syncProfilePublisherIdentity(root, name, safeHandle));\r\n      var profileContentVisible = canViewProfileContent(profile),\n        profileRestriction = profileRestrictionType(profile),\n        privateIdentityShellVisible =\n          !isOwn &&\n          !profileContentVisible &&\n          profileRestriction === \"private\",\n        profileRestrictionCopy = restrictedShellText(\n          { restrictedKind: profileRestriction },\r\n          \"profile\",\r\n        ),\r\n        bio = qs(\"[data-dsd-profile-about]\", root);\r\n      (bio &&\r\n        (bio.textContent =\r\n          identityPending || placeholderSelfProfile\r\n            ? \"\"\r\n            : !isOwn && !profileContentVisible && !privateIdentityShellVisible\n              ? profileRestrictionCopy.body\n              : profileBioDisplayText(profile, isOwn)),\n        identityPending &&\r\n          (qsa(\r\n            '[data-dsd-profile-modal-open], [data-dsd-story385-profile-action=\"create\"]',\r\n            root,\r\n          ).forEach(function (control) {\r\n            (control.setAttribute(\"aria-disabled\", \"true\"),\r\n              control.tagName === \"BUTTON\" && (control.disabled = !0));\r\n          }),\r\n          qsa(\"[data-dsd-profile-publisher]\", root).forEach(\r\n            function (publisher) {\r\n              ((publisher.hidden = !0),\r\n                publisher.setAttribute(\"data-dsd-identity-locked\", \"true\"));\r\n            },\r\n          )),\r\n        qsa(\"[data-dsd-profile-location]\", root).forEach(function (node) {\n          ((node.innerHTML =\n            !isOwn && !profileContentVisible && !privateIdentityShellVisible\n              ? \"\"\n              : profileLocationMetaHTML(profile)),\n            (node.hidden = !node.innerHTML));\n        }),\n        qsa(\"[data-dsd-profile-external-link]\", root).forEach(function (node) {\n          var externalHref = normalizePublicUrl(\n            (profile && (profile.externalUrl || profile.external_url)) || \"\",\n          );\n          if (!isOwn && !profileContentVisible && !privateIdentityShellVisible)\n            externalHref = \"\";\n          node.hidden = !externalHref;\n          if (externalHref) {\n            node.href = externalHref;\n            node.textContent = externalHref\n              .replace(/^https?:\\/\\//i, \"\")\n              .replace(/\\/$/, \"\");\n          } else {\n            node.removeAttribute(\"href\");\n            node.textContent = \"\";\n          }\n        }),\n        qsa(\"[data-dsd-relationship-layer]\", root).forEach(function (node) {\n          setProfileRestrictedSurfaceState(\n            node,\n            !isOwn && !profileContentVisible,\n          );\n        }),\n        qsa(\"[data-dsd-profile-story-slot]\", root).forEach(function (node) {\n          setProfileRestrictedSurfaceState(\n            node,\n            !isOwn && !profileContentVisible && !privateIdentityShellVisible,\n          );\n        }));\n      var profileAvatarMediaId = canonicalProfileAvatarMediaId(profile),\n        profileBannerMediaId = canonicalProfileBannerMediaId(profile);\n      var avatar = qs(\".dsd-up315__avatar\", root);\n      if (profileAvatarMediaId)\r\n        avatar &&\r\n          (avatar.setAttribute(\r\n            \"data-dsd-avatar-media-id\",\r\n            profileAvatarMediaId,\r\n          ),\r\n          avatar.setAttribute(\"data-dsd-profile-media-open\", \"avatar\"),\r\n          avatar.setAttribute(\"role\", \"button\"),\r\n          avatar.setAttribute(\"tabindex\", \"0\"),\r\n          avatar.setAttribute(\"aria-label\", \"Open profile photo\"),\r\n          avatar.setAttribute(\"data-dsd-profile-key\", key),\r\n          avatar.setAttribute(\r\n            \"data-dsd-profile-uid\",\r\n            profile.uid || profile.userId || profile.user_id || \"\",\r\n          ),\r\n          applyProfileMediaFocusToElement(avatar, \"avatar\", profile),\r\n          qs(\"img\", avatar) ||\r\n            (avatar.textContent = initials(name || safeHandle || \"DS\")),\r\n          hydrateAvatarMedia(avatar));\r\n      else {\r\n        var fallbackAvatar = avatar || qs(\".dsd-up315__avatar\", root);\r\n        fallbackAvatar &&\r\n          (fallbackAvatar.removeAttribute(\"data-dsd-avatar-media-id\"),\r\n          fallbackAvatar.removeAttribute(\"data-dsd-media-id\"),\r\n          delete fallbackAvatar.dataset.dsdAvatarHydrated,\r\n          delete fallbackAvatar.dataset.dsdAvatarHydratedMediaId,\r\n          fallbackAvatar.removeAttribute(\"data-dsd-profile-media-open\"),\r\n          fallbackAvatar.removeAttribute(\"role\"),\r\n          fallbackAvatar.removeAttribute(\"tabindex\"),\r\n          fallbackAvatar.removeAttribute(\"aria-label\"),\r\n          fallbackAvatar.innerHTML = html(\r\n            initials(name || safeHandle || \"DS\"),\r\n          ));\r\n      }\r\n      if (profileBannerMediaId) {\r\n        var profileBannerPosition = canonicalBannerPosition(profile),\r\n          profileBannerFocusPosition = profileMediaFocusPosition(\r\n            profile,\r\n            \"banner\",\r\n          ),\r\n          cachedBanner =\r\n            (state.mediaReadCache[profileBannerMediaId] &&\r\n              state.mediaReadCache[profileBannerMediaId].objectUrl) ||\r\n            \"\",\r\n          immediateBanner =\r\n            cachedBanner || mediaReadProxyUrl(profileBannerMediaId),\r\n          immediateCover = qs(\".dsd-up315__cover\", root);\r\n        (immediateCover &&\r\n          (immediateCover.style.setProperty(\r\n            \"--dsd-up315-cover-position\",\r\n            profileBannerFocusPosition,\r\n          ),\r\n          immediateCover.style.setProperty(\r\n            \"--dsd-up315-cover-size\",\r\n            bannerBackgroundSize(profileBannerPosition),\r\n          ),\r\n          immediateBanner &&\r\n            setMediaBackgroundUrl(immediateCover, immediateBanner),\r\n          immediateCover.style.setProperty(\r\n            \"background-position\",\r\n            profileBannerFocusPosition,\r\n            \"important\",\r\n          ),\r\n          immediateCover.style.setProperty(\r\n            \"background-size\",\r\n            bannerBackgroundSize(profileBannerPosition),\r\n            \"important\",\r\n          ),\r\n          immediateCover.setAttribute(\r\n            \"data-dsd-profile-cover-media-id\",\r\n            profileBannerMediaId,\r\n          ),\r\n          immediateCover.setAttribute(\r\n            \"data-dsd-cover-media-id\",\r\n            profileBannerMediaId,\r\n          ),\r\n          immediateCover.setAttribute(\"data-dsd-profile-media-open\", \"banner\"),\r\n          immediateCover.setAttribute(\"role\", \"button\"),\r\n          immediateCover.setAttribute(\"tabindex\", \"0\"),\r\n          immediateCover.setAttribute(\"aria-label\", \"Open profile banner\"),\r\n          immediateBanner &&\r\n            immediateCover.setAttribute(\r\n              \"data-dsd-media-proxy-placeholder\",\r\n              \"false\",\r\n            )),\r\n          resolveMediaDisplayUrl(profileBannerMediaId).then(function (url) {\r\n            var cover = qs(\".dsd-up315__cover\", root);\r\n            url &&\r\n              cover &&\r\n              (cover.style.setProperty(\r\n                \"--dsd-up315-cover-position\",\r\n                profileBannerFocusPosition,\r\n              ),\r\n              cover.style.setProperty(\r\n                \"--dsd-up315-cover-size\",\r\n                bannerBackgroundSize(profileBannerPosition),\r\n              ),\r\n              setMediaBackgroundUrl(cover, url),\r\n              cover.style.setProperty(\r\n                \"background-position\",\r\n                profileBannerFocusPosition,\r\n                \"important\",\r\n              ),\r\n              cover.style.setProperty(\r\n                \"background-size\",\r\n                bannerBackgroundSize(profileBannerPosition),\r\n                \"important\",\r\n              ),\r\n              cover.setAttribute(\r\n                \"data-dsd-profile-cover-media-id\",\r\n                profileBannerMediaId,\r\n              ),\r\n              cover.setAttribute(\r\n                \"data-dsd-cover-media-id\",\r\n                profileBannerMediaId,\r\n              ),\r\n              cover.setAttribute(\"data-dsd-media-proxy-placeholder\", \"false\"));\r\n          }));\r\n      } else {\r\n        var fallbackCover = qs(\".dsd-up315__cover\", root);\r\n        fallbackCover &&\r\n          (fallbackCover.style.setProperty(\r\n            \"--dsd-up315-cover\",\r\n            \"linear-gradient(135deg,rgba(20,24,42,.92),rgba(118,83,178,.38))\",\r\n          ),\r\n          fallbackCover.style.setProperty(\r\n            \"background-image\",\r\n            \"linear-gradient(135deg,rgba(20,24,42,.92),rgba(118,83,178,.38))\",\r\n            \"important\",\r\n          ),\r\n          fallbackCover.style.removeProperty(\"background-position\"),\r\n          fallbackCover.style.removeProperty(\"background-size\"),\r\n          fallbackCover.removeAttribute(\"data-dsd-profile-cover-media-id\"),\r\n          fallbackCover.removeAttribute(\"data-dsd-cover-media-id\"),\r\n          fallbackCover.removeAttribute(\"data-dsd-profile-media-open\"),\r\n          fallbackCover.removeAttribute(\"role\"),\r\n          fallbackCover.removeAttribute(\"tabindex\"),\r\n          fallbackCover.removeAttribute(\"aria-label\"));\r\n      }\r\n      var profileCover = qs(\".dsd-up315__cover\", root);\r\n      (profileCover &&\r\n        ((profileCover.hidden = !1),\r\n        profileCover.style.removeProperty(\"display\"),\r\n        profileCover.setAttribute(\"data-dsd-profile-cover-active\", \"true\")),\r\n        qsa(\r\n          '[data-dsd-profile-modal-open=\"banner\"], [data-dsd-profile-modal-open=\"avatar\"], [data-dsd-profile-modal-open=\"edit\"]',\r\n          root,\r\n        ).forEach(function (n) {\r\n          setProfileOwnerControlState(n, isOwn);\r\n        }),\r\n        qsa(\r\n          '[data-dsd-profile-publisher], [data-dsd-story385-profile-action=\"create\"]',\r\n          root,\r\n        ).forEach(function (n) {\r\n          ((n.hidden = !isOwn || ownerPublishingLocked),\r\n            (n.disabled = !isOwn || ownerPublishingLocked),\r\n            n.setAttribute(\r\n              \"aria-disabled\",\r\n              isOwn && !ownerPublishingLocked ? \"false\" : \"true\",\r\n            ),\r\n            n.setAttribute(\r\n              \"aria-hidden\",\r\n              isOwn && !ownerPublishingLocked ? \"false\" : \"true\",\r\n            ),\r\n            (n.style.display = isOwn && !ownerPublishingLocked ? \"\" : \"none\"));\r\n        }),\r\n        isOwn || deconstructPublicProfileOwnerControls(root));\r\n      var actions = qs(\".dsd-up315__actions\", root);\r\n      if (\r\n        (actions &&\r\n          isOwn &&\r\n          (qs('[data-dsd-profile-modal-open=\"edit\"]', actions) ||\r\n            (actions.innerHTML =\r\n              '<button type=\"button\" class=\"dsd-up315__action dsd-up315__action--gold\" data-dsd-profile-modal-open=\"edit\" data-dsd-owner-control>Edit Profile</button>'),\r\n          qsa('[data-dsd-profile-modal-open=\"edit\"]', actions).forEach(\r\n            function (control) {\r\n              setProfileOwnerControlState(control, !placeholderSelfProfile);\r\n            },\r\n          )),\r\n        actions && !isOwn && profile && key)\n      )\r\n        if (!canUseSocialActions())\r\n          actions.innerHTML =\r\n            '<a class=\"dsd-up315__action dsd-up315__action--gold\" href=\"' +\r\n            loginReturnUrl() +\r\n            '\">Log in</a><a class=\"dsd-up315__action\" href=\"' +\r\n            registerReturnUrl() +\r\n            '\">Create account</a>';\r\n        else {\r\n          var profileActionUid = profileActionIdentity(profile.uid, key),\n            isFollowing = currentViewerFollowsProfile(profile.uid, key),\n            isRequested = currentViewerRequestedProfile(profile.uid, key),\n            isFavorite = currentViewerFavoritedProfile(profile.uid, key),\n            isBlocked = relationshipBlockedProfile(profile.uid, key),\n            messageHref = \"/pages/messages?profile=\" + encodeURIComponent(key);\n          actions.innerHTML = isBlocked\n            ? '<button type=\"button\" class=\"dsd-up315__action dsd-up315__action--gold\" data-dsd-unblock-profile=\"' +\n              html(profileActionUid) +\n              '\" data-profile-key=\"' +\r\n              html(key) +\r\n              '\">Unblock</button>'\r\n            : '<button type=\"button\" class=\"dsd-up315__action dsd-up315__action--gold\" data-dsd-toggle-follow-profile=\"' +\r\n              html(profileActionUid) +\n              '\" data-profile-key=\"' +\r\n              html(key) +\r\n              '\" aria-pressed=\"' +\r\n              (isFollowing || isRequested) +\r\n              '\">' +\r\n              (isFollowing\r\n                ? \"Following\"\r\n                : isRequested\r\n                  ? \"Requested\"\r\n                  : profileVisibility(profile) === \"private\"\r\n                    ? \"Request follow\"\r\n                    : \"Follow\") +\r\n              '</button><a class=\"dsd-up315__action\" href=\"' +\r\n              messageHref +\r\n              '\">Message</a><a class=\"dsd-up315__action\" data-dsd-call-profile-shortcut=\"voice\" data-profile-key=\"' +\r\n              html(key) +\r\n              '\" href=\"' +\r\n              messageHref +\r\n              '&amp;call=voice\" hidden>Voice</a><a class=\"dsd-up315__action\" data-dsd-call-profile-shortcut=\"video\" data-profile-key=\"' +\r\n              html(key) +\r\n              '\" href=\"' +\r\n              messageHref +\r\n              '&amp;call=video\" hidden>Video</a><button type=\"button\" class=\"dsd-up315__action\" data-dsd-favorite-user=\"' +\r\n              html(profileActionUid) +\n              '\" data-profile-key=\"' +\r\n              html(key) +\r\n              '\" aria-pressed=\"' +\r\n              isFavorite +\r\n              '\">' +\r\n              (isFavorite ? \"Favorited\" : \"Favorite\") +\n              '</button><button type=\"button\" class=\"dsd-up315__action\" data-dsd-report-profile=\"' +\n              html(key) +\n              '\">Report</button>';\n        }\n      if (actions && isOwn && profile) {\n        qsa(\"[data-dsd-profile-privacy-toggle]\", actions).forEach(function (node) {\n          node.remove();\n        });\n        actions.insertAdjacentHTML(\"beforeend\", profilePrivacyControlHTML(profile));\n      }\n      if (actions && !isOwn && profile) {\n        qsa(\"[data-dsd-profile-privacy-status]\", actions).forEach(function (node) {\n          node.remove();\n        });\n        actions.insertAdjacentHTML(\"beforeend\", profilePrivacyStatusHTML(profile));\n      }\n      if (actions && key) {\n        qsa(\"[data-dsd-profile-map-link]\", actions).forEach(function (node) {\n          node.remove();\n        });\n        actions.insertAdjacentHTML(\n          \"beforeend\",\n          '<a class=\"dsd-up315__action dsd-users311__map-link\" data-dsd-profile-map-link href=\"/pages/users?discovery=map&amp;profile=' +\r\n            encodeURIComponent(key) +\n            '\" aria-label=\"Show ' +\n            html(name || safeHandle || \"profile\") +\n            ' on map\" title=\"Show on map\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"12\" r=\"9\"></circle><path d=\"M3 12h18M12 3c2.7 2.5 4 5.5 4 9s-1.3 6.5-4 9c-2.7-2.5-4-5.5-4-9s1.3-6.5 4-9Z\"></path></svg><span>Map</span></a>',\n        );\n      }\n      emit(\"profile-identity-rendered\", { profileKey: key, isOwnProfile: isOwn });\r\n      var showProfileCompletion =\n        !identityPending && profileCompletionRequired(profile, isOwn);\n      syncProfileCompletionOverlay(showProfileCompletion);\n      var profileReadyForDisplay =\r\n        !identityPending &&\r\n        (!placeholderSelfProfile || showProfileCompletion) &&\n        (profileRecordHasUsableKey(profile) ||\r\n          (isOwn && profileHasSavedIdentity) ||\r\n          (!isOwn && key));\r\n      (isOwn && syncProfileSetupForms(root),\r\n        profileReadyForDisplay\r\n          ? (root.dataset.dsdProfileHydrated = \"true\")\r\n          : delete root.dataset.dsdProfileHydrated);\r\n      (ensureProfileAlbumUI(root),\r\n        renderProfileAlbums(),\r\n        ensureProfileGlanceUI(root, isOwn),\r\n        renderProfileGlances(),\n        !isOwn && profileReadyForDisplay && hydratePublicProfileGlanceCount(),\n        isOwn &&\n          profileReadyForDisplay &&\n          hydrateProfileGlances(!1, !1),\n        qsa(\n        \".dsd-up315__identity-copy, .dsd-up353__identity-copy\",\r\n        root,\r\n      ).forEach(function (node) {\r\n        (node.style.removeProperty(\"visibility\"),\r\n          node.style.removeProperty(\"opacity\"));\r\n      }),\r\n        qsa(\"[data-dsd-profile-publisher]\", root).forEach(function (node) {\r\n          profileReadyForDisplay\r\n            ? (node.style.removeProperty(\"visibility\"),\r\n              node.style.removeProperty(\"opacity\"))\r\n            : (node.style.setProperty(\"visibility\", \"hidden\", \"important\"),\r\n              node.style.setProperty(\"opacity\", \"0\", \"important\"));\r\n        }),\r\n        profileReadyForDisplay\n          ? root.removeAttribute(\"data-dsd-profile-loading\")\n          : root.setAttribute(\n              \"data-dsd-profile-loading\",\n              \"supabase-canonical\",\n            ),\n        recordProfileGlance(\n          profile,\n          profileContentVisible,\n          profileReadyForDisplay,\n        ),\n        isOwn &&\n          profileReadyForDisplay &&\r\n          queryParam(\"edit\") === \"adult-content\" &&\r\n          root.dataset.dsdAdultSettingsRouteOpened !== BUILD &&\r\n          ((root.dataset.dsdAdultSettingsRouteOpened = BUILD),\r\n          window.setTimeout(function () {\r\n            var editButton = qs(\r\n              '[data-dsd-profile-modal-open=\"edit\"]',\r\n              root,\r\n            );\r\n            editButton && editButton.click();\r\n          }, 80)));\r\n    }\r\n  }\r\n  function postActionIcon(name) {\r\n    var paths = {\r\n      like: \"M12 21s-7-4.4-9.2-8.2C1 9.8 2.5 6 6 6c2 0 3.2 1.1 4 2.2C10.8 7.1 12 6 14 6c3.5 0 5 3.8 3.2 6.8C19 16.6 12 21 12 21Z\",\r\n      comment: \"M4 5h16v10H8l-4 4V5Zm4 4v2h8V9H8Z\",\r\n      share: \"M14 5l5 5-5 5v-3H9a5 5 0 0 0-5 5v-1a7 7 0 0 1 7-7h3V5Z\",\r\n      save: \"M6 3h12v18l-6-3-6 3V3Z\",\r\n    };\r\n    return (\r\n      '<svg class=\"dsd-launch-action-svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"' +\r\n      (paths[name] || paths.like) +\r\n      '\"></path></svg>'\r\n    );\r\n  }\r\n  function postAuthorAvatar(post, authorKey) {\r\n    var profile = profileForRecordIdentity(post || {}) || publicProfileByKey(authorKey),\n      mediaId =\n        (profile && canonicalProfileAvatarMediaId(profile)) ||\r\n        post.authorAvatarMediaId ||\r\n        post.ownerAvatarMediaId ||\r\n        \"\",\r\n      focusPosition = profileMediaFocusPosition(profile || post || {}, \"avatar\"),\n      label = publicDisplayName(\n        post.authorDisplayName || authorKey || \"DSD member\",\r\n        \"DSD member\",\r\n      );\r\n    return mediaId\r\n      ? '<a class=\"dsd-post-card__avatar\" href=\"' +\r\n          html(profileRouteHref(authorKey)) +\r\n          '\" data-dsd-avatar-media-id=\"' +\r\n          html(mediaId) +\r\n          '\" data-dsd-profile-key=\"' +\n          html(authorKey) +\n          '\" data-dsd-author-profile-key=\"' +\n          html(authorKey) +\r\n          '\" data-dsd-author-uid=\"' +\r\n          html(\r\n            post.authorUid ||\r\n              post.ownerUid ||\r\n              (profile && (profile.uid || profile.userId || profile.user_id)) ||\r\n              \"\",\r\n          ) +\n          '\" style=\"--dsd-avatar-focus-position:' +\n          html(focusPosition) +\n          '\" data-dsd-avatar-focus-position=\"' +\n          html(focusPosition) +\n          '\" aria-label=\"' +\n          html(label) +\r\n          '\"></a>'\r\n      : '<a class=\"dsd-post-card__avatar dsd-post-card__avatar--fallback\" href=\"' +\n          html(profileRouteHref(authorKey)) +\n          '\" data-dsd-profile-key=\"' +\n          html(authorKey) +\n          '\" aria-label=\"' +\n          html(label) +\r\n          '\">' +\r\n          html(initials(label || authorKey || \"DS\")) +\r\n          \"</a>\";\r\n  }\r\n  function postTimestamp(post) {\r\n    return (\r\n      formatDateTime(post.createdAt || post.updatedAt || post.submittedAt) ||\r\n      \"Just now\"\r\n    );\r\n  }\r\n  function mediaLayoutType(items) {\r\n    items = (items || []).filter(Boolean);\r\n    var count = items.length,\r\n      videos = items.filter(function (item) {\r\n        return String(item.kind || \"\").toLowerCase() === \"video\";\r\n      }).length,\r\n      images = count - videos;\r\n    return count\r\n      ? count === 1 && videos === 1\r\n        ? \"single-video\"\r\n        : count === 1\r\n          ? \"single-image\"\r\n          : count === 2 && videos === 1 && images === 1\r\n            ? \"mixed-2\"\r\n            : count === 2\r\n              ? videos\r\n                ? \"video-2\"\r\n                : \"image-2\"\r\n              : count === 3\r\n                ? videos\r\n                  ? \"mixed-3\"\r\n                  : \"image-3\"\r\n                : videos\r\n                  ? \"mixed-grid\"\r\n                  : \"image-grid\"\r\n      : \"none\";\r\n  }\r\n  function recordMillis(record) {\r\n    var value =\r\n      record &&\r\n      (record.createdAt ||\r\n        record.publishedAt ||\r\n        record.updatedAt ||\r\n        record.submittedAt ||\r\n        record.expiresAt);\r\n    return valueMillis(value);\r\n  }\r\n  function stableMessageMillis(message) {\r\n    return (\r\n      (message = message || {}),\r\n      valueMillis(\r\n        message.createdAt ||\r\n          message.created_at ||\r\n          message.sentAt ||\r\n          message.sent_at ||\r\n          message.submittedAt ||\r\n          message.submitted_at,\r\n      ) ||\r\n        identifierMillis(\r\n          message.messageId ||\r\n            message.id ||\r\n            message.legacyMessageId ||\r\n            message.legacy_message_id,\r\n        )\r\n    );\r\n  }\r\n  function conversationActivityMillis(conversation) {\r\n    conversation = conversation || {};\r\n    var sourceId = String(conversation.conversationId || conversation.id || \"\"),\r\n      canonicalId =\r\n        (conversationType(conversation) === \"direct\" &&\r\n          canonicalDirectConversationIdFromKeys(\r\n            directConversationIdentityKeys(conversation),\r\n          )) ||\r\n        sourceId,\r\n      rows = []\r\n        .concat(state.messagesByConversation[canonicalId] || [])\r\n        .concat(\r\n          canonicalId === sourceId\r\n            ? []\r\n            : state.messagesByConversation[sourceId] || [],\r\n        ),\r\n      messageMillis = rows.reduce(function (latest, message) {\r\n        return Math.max(latest, stableMessageMillis(message));\r\n      }, 0);\r\n    return (\r\n      messageMillis ||\r\n      valueMillis(\r\n        conversation.lastMessageAt ||\r\n          conversation.last_message_at ||\r\n          conversation.lastActivityAt ||\r\n          conversation.last_activity_at,\r\n      ) ||\r\n      valueMillis(\r\n        conversation.updatedAt ||\r\n          conversation.updated_at ||\r\n          conversation.createdAt ||\r\n          conversation.created_at,\r\n      )\r\n    );\r\n  }\r\n  function sortByCreatedAtDesc(items) {\r\n    return (items || []).slice().sort(function (a, b) {\r\n      var pinDelta = (b && b.pinned ? 1 : 0) - (a && a.pinned ? 1 : 0);\r\n      return pinDelta || recordMillis(b) - recordMillis(a);\r\n    });\r\n  }\r\n  function renderSignature(items) {\r\n    return (items || [])\r\n      .map(function (item) {\r\n        var counts = item.counts || {},\r\n          isStoryRecord = !!(\r\n            item.storyId ||\r\n            (item.ownerUid &&\r\n              !item.postId &&\r\n              String((item.entity && item.entity.type) || \"\").toLowerCase() ===\r\n                \"story\")\r\n          ),\r\n          counterSignature = isStoryRecord\r\n            ? [\r\n                item.viewCount || 0,\r\n                item.watchCount || 0,\r\n                item.uniqueWatchCount || 0,\r\n              ].join(\",\")\r\n            : [\r\n                stableViewCounter(item, counts),\r\n                counts.likes || 0,\r\n                counts.comments || 0,\r\n                counts.shares || 0,\r\n              ].join(\",\"),\r\n          relationshipTargetUid = isStoryRecord\n            ? \"\"\n            : String(\n                item.authorUid ||\r\n                  item.ownerUid ||\r\n                  profileUidForKey(\r\n                    item.authorProfileKey || item.ownerProfileKey || \"\",\r\n                  ) ||\r\n                  \"\",\n              ).trim(),\n          relationshipTargetKey = isStoryRecord\n            ? \"\"\n            : nonPlaceholderProfileKey(\n                item.authorProfileKey || item.ownerProfileKey || \"\",\n              ),\n          relationshipSignature = isStoryRecord\n            ? \"\"\n            : currentViewerFollowsProfile(\n                  relationshipTargetUid,\n                  relationshipTargetKey,\n                )\n              ? \"active\"\n              : currentViewerRequestedProfile(\n                    relationshipTargetUid,\n                    relationshipTargetKey,\n                  )\n                ? \"requested\"\n                : \"\";\n        return [\r\n          item.postId || item.storyId || item.id || item.queueItemId || \"\",\r\n          item.status || (item.moderation && item.moderation.state) || \"\",\r\n          item.visibility || (item.entity && item.entity.visibility) || \"\",\r\n          item.contentRating ||\r\n            (item.entity && item.entity.contentRating) ||\r\n            \"\",\r\n          item.authorDisplayName || item.ownerDisplayName || \"\",\r\n          item.authorAvatarMediaId || item.ownerAvatarMediaId || \"\",\r\n          String(item.body || item.caption || \"\").slice(0, 180),\r\n          item.originalsReference || item.originals_reference\r\n            ? JSON.stringify(item.originalsReference || item.originals_reference)\r\n            : \"\",\r\n          counterSignature,\r\n          relationshipSignature,\r\n          recordMillis(item),\r\n          (item.media || [])\r\n            .map(function (m) {\r\n              return mediaSignatureId(m);\r\n            })\r\n            .join(\",\"),\r\n        ].join(\":\");\r\n      })\r\n      .join(\"|\");\r\n  }\r\n  function commentRenderSignature(posts) {\r\n    return (posts || [])\r\n      .map(function (post) {\r\n        var id = (post && (post.postId || post.id)) || \"\",\r\n          comments = commentsForPostAliases(post);\r\n        return (\r\n          id +\r\n          \"[\" +\r\n          comments\r\n            .map(function (comment) {\r\n              var commentMediaSignature = (comment.media || [])\r\n                .map(function (media) {\r\n                  return [\r\n                    mediaSignatureId(media),\r\n                    Number(media.width || media.mediaWidth || 0),\r\n                    Number(media.height || media.mediaHeight || 0),\r\n                    media.status || \"\",\r\n                  ].join(\"/\");\r\n                })\r\n                .join(\",\");\r\n              return [\r\n                commentKey(comment),\r\n                comment.status ||\r\n                  (comment.moderation && comment.moderation.state) ||\r\n                  \"\",\r\n                String(comment.body || \"\").slice(0, 80),\r\n                commentMediaSignature,\r\n              ].join(\":\");\r\n            })\r\n            .join(\",\") +\r\n          \"]\"\r\n        );\r\n      })\r\n      .join(\"|\");\r\n  }\r\n  function replaceHtmlIfChanged(root, signature, htmlText) {\r\n    return !root || root.dataset.dsdRenderSignature === signature\r\n      ? !1\r\n      : ((root.dataset.dsdRenderSignature = signature),\r\n        (root.innerHTML = htmlText),\r\n        !0);\r\n  }\r\n  function applyProfileMediaFallbackFromRenderedAuthors() {}\r\n  function mediaStateAllowed(media) {\r\n    var status = String(\r\n        (media &&\r\n          (media.status ||\r\n            media.state ||\r\n            media.moderationStatus ||\r\n            (media.moderation && media.moderation.state) ||\r\n            \"uploaded\")) ||\r\n          \"uploaded\",\r\n      ).toLowerCase(),\r\n      visibility = String(\r\n        (media && (media.visibility || media.mediaVisibility || \"public\")) ||\r\n          \"public\",\r\n      ).toLowerCase(),\r\n      mediaId = String(\r\n        readableMediaId(media) || durableMediaId(media) || \"\",\r\n      ).toLowerCase();\r\n    return mediaReadQuarantineReason(mediaId) ||\r\n      [\r\n        \"deleted\",\r\n        \"hidden\",\r\n        \"rejected\",\r\n        \"archived\",\r\n        \"blocked\",\r\n        \"removed\",\r\n        \"expired\",\r\n      ].indexOf(status) !== -1\r\n      ? !1\r\n      : visibility !== \"hidden\";\r\n  }\r\n  function recordAllowsPublicMedia(record) {\r\n    if (\r\n      !record ||\r\n      isRestrictedShellRecord(record) ||\r\n      !publicRecordVisible(record) ||\r\n      !isApprovedPublicRecord(record)\r\n    )\r\n      return !1;\r\n    var visibility = String(\r\n        record.visibility ||\r\n          (record.entity && record.entity.visibility) ||\r\n          \"public\",\r\n      ).toLowerCase(),\r\n      rating = String(\r\n        record.contentRating ||\r\n          record.content_rating ||\r\n          (record.entity && record.entity.contentRating) ||\r\n          \"standard\",\r\n      ).toLowerCase(),\r\n      gate = String(\r\n        record.accessGate ||\r\n          record.access_gate ||\r\n          (record.entity && record.entity.accessGate) ||\r\n          \"\",\r\n      ).toLowerCase();\r\n    return visibility !== \"public\" ||\r\n      gate === \"dsd_plus\" ||\r\n      gate === \"gated\" ||\r\n      (rating !== \"standard\" && rating !== \"\")\r\n      ? !1\r\n      : !classifiedRestrictionType(record);\r\n  }\r\n  function canRenderMediaForRecord(record, media) {\r\n    if (\r\n      !media ||\r\n      !(readableMediaId(media) || durableMediaId(media)) ||\r\n      !mediaStateAllowed(media) ||\r\n      media.wasabiReadQuarantined === !0\r\n    )\r\n      return !1;\r\n    if (canModerate() || recordOwnedByCurrentProfile(record)) return !0;\r\n    var mediaPolicy = Object.assign({}, record || {}, {\r\n      visibility:\r\n        media.visibility ||\r\n        media.mediaVisibility ||\r\n        (record && record.visibility),\r\n      contentRating:\r\n        media.contentRating ||\r\n        media.content_rating ||\r\n        (record && (record.contentRating || record.content_rating)),\r\n      accessGate:\r\n        media.accessGate ||\r\n        media.access_gate ||\r\n        (record && (record.accessGate || record.access_gate)),\r\n    });\r\n    return (\r\n      !isRestrictedShellRecord(record) &&\r\n      publicRecordVisible(record) &&\r\n      isApprovedPublicRecord(record) &&\r\n      canViewClassified(mediaPolicy) &&\r\n      canViewPrivateRecord(record)\r\n    );\r\n  }\r\n  function safeMediaItemsForRecord(record) {\r\n    return ((record && record.media) || []).filter(function (item) {\r\n      return canRenderMediaForRecord(record, item);\r\n    });\r\n  }\r\n  function canRenderComment(comment, parentPost) {\r\n    var status = String(\r\n      (comment &&\r\n        (comment.status ||\r\n          comment.state ||\r\n          comment.moderationStatus ||\r\n          (comment.moderation && comment.moderation.state) ||\r\n          \"pending\")) ||\r\n        \"pending\",\r\n    ).toLowerCase();\r\n    return status === \"deleted\"\r\n      ? !1\r\n      : canModerate() || canEditComment(comment)\r\n        ? !0\r\n        : status !== \"approved\"\r\n          ? !1\r\n          : !!publicRenderablePost(parentPost || {});\r\n  }\r\n  function safeCommentMediaItems(comment, parentPost) {\n    return canRenderComment(comment, parentPost)\n      ? ((comment && comment.media) || []).filter(function (item) {\n          return canRenderMediaForRecord(parentPost, item);\n        })\n      : [];\n  }\n  function canonicalCommentId(comment) {\n    return String(\n      (comment &&\n        (comment.supabaseCommentId ||\n          comment.supabase_comment_id ||\n          (uuidLike(comment.id) && comment.id))) ||\n        \"\",\n    ).trim();\n  }\n  function parentCommentId(comment) {\n    return String(\n      (comment && (comment.parentCommentId || comment.parent_comment_id)) || \"\",\n    ).trim();\n  }\n  function commentReactionState(comment) {\n    var keys = [canonicalCommentId(comment), commentKey(comment)].filter(Boolean),\n      value = null;\n    keys.some(function (key) {\n      if (state.commentReactionProjection[key]) {\n        value = state.commentReactionProjection[key];\n        return !0;\n      }\n      return !1;\n    });\n    return value || { counts: {}, total: 0, viewerReaction: \"\" };\n  }\n  function commentReactionHTML(comment, postId, removed) {\n    if (removed) return \"\";\n    var cid = canonicalCommentId(comment) || commentKey(comment),\n      reaction = commentReactionState(comment),\n      selected = String(reaction.viewerReaction || \"\"),\n      total = Number(reaction.total || 0),\n      pending = !!state.commentReactionMutations[cid],\n      choices = reactionChoices();\n    return (\n      '<div class=\"dsd-comment-reactions\" data-dsd-comment-reactions=\"' +\n      html(cid) +\n      '\"><button type=\"button\" class=\"dsd-comment-reactions__current' +\n      (selected ? \" is-active\" : \"\") +\n      '\" data-dsd-toggle-comment-reactions=\"' +\n      html(cid) +\n      '\" data-post-id=\"' +\n      html(postId) +\n      '\" aria-expanded=\"false\" aria-label=\"' +\n      html((selected ? reactionLabel(selected) + \" reaction selected\" : \"Choose comment reaction\") + \", \" + total + \" reactions\") +\n      '\">' +\n      '<span aria-hidden=\"true\">' +\n      reactionIconHTML(selected || \"like\") +\n      \"</span><strong>\" +\n      html(total) +\n      \"</strong>\" +\n      '</button><div class=\"dsd-comment-reactions__tray\" hidden>' +\n      choices\n        .map(function (choice) {\n          return (\n            '<button type=\"button\" data-dsd-comment-reaction=\"' +\n            html(choice) +\n            '\" data-comment-id=\"' +\n            html(cid) +\n            '\" data-post-id=\"' +\n            html(postId) +\n            '\"' +\n            (pending ? ' disabled aria-busy=\"true\"' : \"\") +\n            ' aria-pressed=\"' +\n            (selected === choice ? \"true\" : \"false\") +\n            '\" aria-label=\"' +\n            html(reactionLabel(choice)) +\n            ' reaction\"><span aria-hidden=\"true\">' +\n            reactionIconHTML(choice) +\n            \"</span>\" +\n            \"</button>\"\n          );\n        })\n        .join(\"\") +\n      (selected\n        ? '<button type=\"button\" data-dsd-comment-reaction=\"\" data-comment-id=\"' +\n          html(cid) +\n          '\" data-post-id=\"' +\n          html(postId) +\n          '\"' +\n          (pending ? ' disabled aria-busy=\"true\"' : \"\") +\n          '>Remove</button>'\n        : \"\") +\n      \"</div></div>\"\n    );\n  }\n  function closeCommentReactionTrays(focusRoot) {\n    qsa(\".dsd-comment-reactions__tray\", document).forEach(function (tray) {\n      tray.hidden = !0;\n      tray.removeAttribute(\"style\");\n    });\n    qsa(\"[data-dsd-toggle-comment-reactions]\", document).forEach(\n      function (button) {\n        button.setAttribute(\"aria-expanded\", \"false\");\n      },\n    );\n    var toggle = focusRoot && qs(\"[data-dsd-toggle-comment-reactions]\", focusRoot);\n    if (toggle && typeof toggle.focus == \"function\") {\n      try {\n        toggle.focus({ preventScroll: !0 });\n      } catch (error) {\n        toggle.focus();\n      }\n    }\n  }\n  function syncCommentReactionControls(commentId, reaction, pending) {\n    commentId = String(commentId || \"\").trim();\n    reaction = reaction || { counts: {}, total: 0, viewerReaction: \"\" };\n    var selected = String(\n        reaction.viewerReaction || reaction.viewer_reaction || \"\",\n      ).toLowerCase(),\n      total = Math.max(0, Number(reaction.total || 0));\n    qsa(\n      '[data-dsd-comment-reactions=\"' + cssAttrValue(commentId) + '\"]',\n      document,\n    ).forEach(function (root) {\n      var current = qs(\"[data-dsd-toggle-comment-reactions]\", root);\n      if (current) {\n        current.classList.toggle(\"is-active\", !!selected);\n        current.setAttribute(\n          \"aria-label\",\n          (selected\n            ? reactionLabel(selected) + \" reaction selected\"\n            : \"Choose comment reaction\") +\n            \", \" +\n            total +\n            \" reactions\",\n        );\n        var icon = qs(\"span[aria-hidden='true']\", current),\n          count = qs(\"strong\", current);\n        icon && (icon.innerHTML = reactionIconHTML(selected || \"like\"));\n        count && (count.textContent = String(total));\n      }\n      var tray = qs(\".dsd-comment-reactions__tray\", root);\n      if (!tray) return;\n      qsa(\"[data-dsd-comment-reaction]\", tray).forEach(function (choice) {\n        var choiceType = String(\n          choice.getAttribute(\"data-dsd-comment-reaction\") || \"\",\n        ).toLowerCase();\n        choice.setAttribute(\n          \"aria-pressed\",\n          selected && choiceType === selected ? \"true\" : \"false\",\n        );\n        choice.disabled = !!pending;\n        pending\n          ? choice.setAttribute(\"aria-busy\", \"true\")\n          : choice.removeAttribute(\"aria-busy\");\n      });\n      var remove = qs('[data-dsd-comment-reaction=\"\"]', tray);\n      if (selected && !remove) {\n        remove = document.createElement(\"button\");\n        remove.type = \"button\";\n        remove.setAttribute(\"data-dsd-comment-reaction\", \"\");\n        remove.setAttribute(\"data-comment-id\", commentId);\n        remove.setAttribute(\n          \"data-post-id\",\n          (current && current.getAttribute(\"data-post-id\")) || \"\",\n        );\n        remove.textContent = \"Remove\";\n        tray.appendChild(remove);\n      } else if (!selected && remove) remove.remove();\n      if (remove) {\n        remove.disabled = !!pending;\n        pending\n          ? remove.setAttribute(\"aria-busy\", \"true\")\n          : remove.removeAttribute(\"aria-busy\");\n      }\n    });\n  }\n  function renderCommentCard(comment, parentPost, replyLevel) {\n    comment = hydrateRecordIdentity(comment || {});\r\n    var id = postKey(parentPost || {}),\r\n      cid = commentKey(comment),\r\n      status = String(\r\n        comment.status ||\r\n          (comment.moderation && comment.moderation.state) ||\r\n          \"pending\",\r\n      ).toLowerCase(),\r\n      removed = status === \"deleted\",\n      actions = \"\",\n      canonicalId = canonicalCommentId(comment) || cid;\n    (cid &&\r\n      !removed &&\r\n      canEditComment(comment) &&\r\n      (actions +=\r\n        '<button type=\"button\" data-dsd-edit-comment=\"' +\r\n        html(cid) +\r\n        '\" data-post-id=\"' +\r\n        html(id) +\r\n        '\">Edit</button><button type=\"button\" data-dsd-delete-comment=\"' +\r\n        html(cid) +\r\n        '\" data-post-id=\"' +\r\n        html(id) +\r\n        '\">Delete</button>'),\r\n      cid &&\r\n        canModerate() &&\r\n        !removed &&\r\n        (actions +=\r\n          '<button type=\"button\" data-dsd-approve-comment=\"' +\r\n          html(cid) +\r\n          '\" data-post-id=\"' +\r\n          html(id) +\r\n          '\">Approve</button><button type=\"button\" data-dsd-hide-comment=\"' +\r\n          html(cid) +\r\n          '\" data-post-id=\"' +\r\n          html(id) +\r\n          '\">Hide</button><button type=\"button\" data-dsd-reject-comment=\"' +\r\n          html(cid) +\r\n          '\" data-post-id=\"' +\r\n          html(id) +\r\n          '\">Reject</button><button type=\"button\" data-dsd-restore-comment=\"' +\r\n          html(cid) +\r\n          '\" data-post-id=\"' +\r\n          html(id) +\r\n          '\">Restore</button>'),\r\n      cid &&\r\n        !removed &&\r\n        canUseSocialActions() &&\r\n        !canEditComment(comment) &&\r\n        (actions +=\r\n          '<button type=\"button\" data-dsd-report-comment=\"' +\r\n          html(cid) +\r\n          '\" data-post-id=\"' +\r\n          html(id) +\r\n          '\">Report</button>'));\r\n    var actionMenu = actions\r\n        ? '<details class=\"dsd-comment-action-menu\"><summary aria-label=\"Comment options\" title=\"Comment options\"><span aria-hidden=\"true\">...</span></summary><div class=\"dsd-comment-action-menu__panel\">' +\r\n          actions +\r\n          \"</div></details>\"\r\n        : \"\",\r\n      commentMediaItems = safeCommentMediaItems(comment, parentPost),\r\n      media = commentMediaItems\r\n        .map(function (m, mediaIndex) {\r\n          var kind = m.kind || \"image\";\r\n          return (\r\n            '<figure class=\"dsd-launch-media-chip dsd-launch-comment-media\" data-dsd-inline-media=\"true\" data-dsd-comment-media-open=\"true\" data-dsd-comment-id=\"' +\r\n            html(cid) +\r\n            '\" data-post-id=\"' +\r\n            html(id) +\r\n            '\" data-dsd-media-index=\"' +\r\n            html(mediaIndex) +\r\n            '\" tabindex=\"0\" role=\"button\" aria-label=\"Open comment media full screen\"' +\r\n            mediaReadAttrs(m) +\r\n            ' data-dsd-media-kind=\"' +\r\n            html(kind) +\r\n            '\" data-dsd-media-status=\"' +\r\n            html(m.status || \"uploaded\") +\r\n            '\"></figure>'\r\n          );\r\n        })\r\n        .join(\"\"),\r\n      blockedMedia =\r\n        (comment.media || []).length && !media\r\n          ? '<div class=\"dsd-comment-media-unavailable\">Comment media unavailable for this viewer.</div>'\r\n          : \"\",\r\n      commentBody = removed\r\n        ? \"Comment removed.\"\r\n        : publicDisplayText(comment.body || \"\", \"\"),\r\n      commentAuthorName = removed\n        ? \"Unavailable profile\"\n        : publicDisplayName(comment.authorDisplayName || \"User\", \"User\"),\n      commentAuthorKey = comment.authorProfileKey || comment.profileKey || \"\",\n      commentTime = postTimestamp(comment),\n      interactionRow = removed\n        ? \"\"\n        : '<div class=\"dsd-launch-comment__interactions\">' +\n          (canUseSocialActions()\n            ? '<button type=\"button\" data-dsd-reply-comment=\"' +\n              html(canonicalId) +\n              '\" data-post-id=\"' +\n              html(id) +\n              '\" data-profile-key=\"' +\n              html(commentAuthorKey) +\n              '\">Reply</button>'\n            : \"\") +\n          commentReactionHTML(comment, id, removed) +\n          \"</div>\";\n    return (\n      '<article class=\"dsd-launch-comment' +\n      (replyLevel ? \" dsd-launch-comment--reply\" : \"\") +\n      '\" id=\"' +\n      html(routeAnchorId(\"dsd-comment\", cid)) +\r\n      '\" data-dsd-comment-id=\"' +\r\n      html(cid) +\r\n      '\" data-dsd-comment-status=\"' +\r\n      html(status) +\r\n      '\"><div class=\"dsd-launch-comment__avatar\">' +\r\n      postAuthorAvatar(comment, commentAuthorKey) +\r\n      '</div><div class=\"dsd-launch-comment__body\"><div class=\"dsd-launch-comment__meta\"><strong>' +\r\n      html(commentAuthorName) +\r\n      \"</strong>\" +\r\n      (commentAuthorKey\r\n        ? \"<span>@\" +\r\n          html(\r\n            publicHandleText(commentAuthorKey, commentAuthorName, \"member\"),\r\n          ) +\r\n          \"</span>\"\r\n        : \"\") +\r\n      (commentTime\n        ? '<time data-dsd-relative-time=\"' +\n          html(comment.createdAt || comment.updatedAt || \"\") +\n          '\">' +\n          html(commentTime) +\n          \"</time>\"\n        : \"\") +\n      \"</div>\" +\r\n      (commentBody ? \"<p>\" + linkify(commentBody) + \"</p>\" : \"\") +\r\n      (media\r\n        ? '<div class=\"dsd-launch-comment-media-grid\" data-dsd-media-count=\"' +\r\n          html(commentMediaItems.length) +\r\n          '\" aria-label=\"' +\r\n          html(commentMediaItems.length + (commentMediaItems.length === 1 ? \" comment attachment\" : \" comment attachments\")) +\r\n          '\">' + media + \"</div>\"\r\n        : blockedMedia) +\n      interactionRow +\n      \"</div>\" +\n      actionMenu +\r\n      \"</article>\"\r\n    );\r\n  }\r\n  function visibleCommentsForPost(post) {\n    return uniqueComments(commentsForPostAliases(post || {}))\r\n      .filter(function (comment) {\r\n        return canRenderComment(comment, post);\r\n      })\r\n      .slice(-50);\n  }\n  function commentThreadHTML(post, comments) {\n    var byCanonicalId = {},\n      topLevel = [],\n      repliesByRoot = {};\n    comments.forEach(function (comment) {\n      var canonicalId = canonicalCommentId(comment);\n      canonicalId && (byCanonicalId[canonicalId] = comment);\n      commentKey(comment) && (byCanonicalId[commentKey(comment)] = comment);\n    });\n    comments.forEach(function (comment) {\n      var parentId = parentCommentId(comment),\n        parent = parentId && byCanonicalId[parentId],\n        root = parent;\n      if (parentId && !parent) {\n        parent = {\n          id: parentId,\n          supabaseCommentId: parentId,\n          status: \"deleted\",\n          body: \"\",\n          authorDisplayName: \"Unavailable profile\",\n          authorProfileKey: \"\",\n        };\n        byCanonicalId[parentId] = parent;\n        topLevel.push(parent);\n        root = parent;\n      }\n      if (!parent) {\n        topLevel.push(comment);\n        return;\n      }\n      parentCommentId(root) && byCanonicalId[parentCommentId(root)] &&\n        (root = byCanonicalId[parentCommentId(root)]);\n      var rootId = canonicalCommentId(root) || commentKey(root);\n      (repliesByRoot[rootId] || (repliesByRoot[rootId] = [])).push(comment);\n    });\n    return topLevel\n      .slice(-20)\n      .map(function (comment) {\n        var rootId = canonicalCommentId(comment) || commentKey(comment),\n          replies = repliesByRoot[rootId] || [],\n          expanded = !!state.expandedCommentThreads[rootId];\n        return (\n          '<div class=\"dsd-comment-thread\" data-dsd-comment-thread=\"' +\n          html(rootId) +\n          '\">' +\n          renderCommentCard(comment, post, !1) +\n          (replies.length\n            ? '<button type=\"button\" class=\"dsd-comment-thread__toggle\" data-dsd-toggle-comment-replies=\"' +\n              html(rootId) +\n              '\" aria-controls=\"' +\n              html(routeAnchorId(\"dsd-comment-replies\", rootId)) +\n              '\" aria-expanded=\"' +\n              (expanded ? \"true\" : \"false\") +\n              '\">' +\n              (expanded ? \"Hide replies\" : \"View \" + replies.length + \" replies\") +\n              '</button><div class=\"dsd-comment-thread__replies\" id=\"' +\n              html(routeAnchorId(\"dsd-comment-replies\", rootId)) +\n              '\"' +\n              (expanded ? \"\" : \" hidden\") +\n              \">\" +\n              replies\n                .map(function (reply) {\n                  return renderCommentCard(reply, post, !0);\n                })\n                .join(\"\") +\n              \"</div>\"\n            : \"\") +\n          \"</div>\"\n        );\n      })\n      .join(\"\");\n  }\n  function hydrateCommentReactionsForPost(postId) {\n    var comments = commentsForPostAliases(postId),\n      commentIds = comments\n        .map(function (comment) {\n          return canonicalCommentId(comment);\n        })\n        .filter(Boolean)\n        .slice(-50),\n      key = String(postId || \"\") + \":\" + commentIds.join(\",\");\n    if (!commentIds.length || state.commentReactionHydrationByPost[key])\n      return Promise.resolve([]);\n    state.commentReactionHydrationByPost[key] = !0;\n    return commentInteractionViaProxy({\n      action: \"projection\",\n      postId: postId,\n      commentIds: commentIds,\n    })\n      .then(function (result) {\n        (result.reactions || []).forEach(function (row) {\n          var commentId = String(row.commentId || row.comment_id || \"\");\n          commentId && (state.commentReactionProjection[commentId] = row);\n        });\n        state.postDrawer &&\n          state.postDrawer.open &&\n          state.postDrawer.postId === postId &&\n          renderPostDrawer();\n        return result.reactions || [];\n      })\n      .catch(function (error) {\n        claim(\"comment-reactions:projection-failed\", {\n          postId: postId,\n          error: (error && error.message) || String(error),\n        });\n        return [];\n      })\n      .then(function (rows) {\n        delete state.commentReactionHydrationByPost[key];\n        return rows;\n      });\n  }\n  function setCommentReaction(postId, commentId, reactionType) {\n    if (!requireActiveProfile(\"react to a comment\")) return Promise.resolve(null);\n    var mutationKey = String(commentId || \"\").trim();\n    if (!mutationKey || state.commentReactionMutations[mutationKey])\n      return Promise.resolve(null);\n    reactionType = String(reactionType || \"\").trim().toLowerCase();\n    var priorReaction = state.commentReactionProjection[mutationKey] || {\n        commentId: mutationKey,\n        counts: {},\n        total: 0,\n        viewerReaction: \"\",\n      },\n      priorSnapshot = Object.assign({}, priorReaction, {\n        counts: Object.assign({}, priorReaction.counts || {}),\n      }),\n      priorType = String(priorSnapshot.viewerReaction || \"\").toLowerCase(),\n      optimisticCounts = Object.assign({}, priorSnapshot.counts || {}),\n      optimisticTotal = Math.max(0, Number(priorSnapshot.total || 0));\n    if (reactionType) {\n      if (priorType && priorType !== reactionType)\n        optimisticCounts[priorType] = Math.max(\n          0,\n          Number(optimisticCounts[priorType] || 0) - 1,\n        );\n      priorType || (optimisticTotal += 1);\n      optimisticCounts[reactionType] = Math.max(\n        1,\n        Number(optimisticCounts[reactionType] || 0) +\n          (priorType === reactionType ? 0 : 1),\n      );\n    } else if (priorType) {\n      optimisticTotal = Math.max(0, optimisticTotal - 1);\n      optimisticCounts[priorType] = Math.max(\n        0,\n        Number(optimisticCounts[priorType] || 0) - 1,\n      );\n    }\n    var optimisticReaction = Object.assign({}, priorSnapshot, {\n      counts: optimisticCounts,\n      total: optimisticTotal,\n      viewerReaction: reactionType,\n    });\n    state.commentReactionMutations[mutationKey] = !0;\n    state.commentReactionProjection[mutationKey] = optimisticReaction;\n    syncCommentReactionControls(mutationKey, optimisticReaction, !0);\n    return commentInteractionViaProxy({\n      action: \"set_reaction\",\n      postId: postId,\n      commentId: commentId,\n      reactionType: reactionType,\n    })\n      .then(function (result) {\n        var row = result.reaction || {},\n          canonicalId = String(row.commentId || row.comment_id || commentId);\n        state.commentReactionProjection[canonicalId] = row;\n        canonicalId !== mutationKey &&\n          (state.commentReactionProjection[mutationKey] = row);\n        delete state.commentReactionMutations[mutationKey];\n        (syncCommentReactionControls(mutationKey, row, !1),\n          canonicalId !== mutationKey &&\n            syncCommentReactionControls(canonicalId, row, !1));\n        return row;\n      })\n      .catch(function (error) {\n        delete state.commentReactionMutations[mutationKey];\n        state.commentReactionProjection[mutationKey] = priorSnapshot;\n        syncCommentReactionControls(mutationKey, priorSnapshot, !1);\n        renderStatus(\n          (error && error.message) || \"Comment reaction could not be updated.\",\n        );\n        return null;\n      });\n  }\n  function ensurePostDrawerRoot() {\r\n    var root = qs(\"[data-dsd-post-drawer-root]\");\r\n    return (\r\n      root ||\r\n      ((root = document.createElement(\"div\")),\r\n      root.setAttribute(\"data-dsd-post-drawer-root\", \"\"),\r\n      root.setAttribute(\"data-dsd-owner\", \"LaunchSocialActivation.PostDrawer\"),\r\n      (root.hidden = !0),\r\n      document.body.appendChild(root),\r\n      root)\r\n    );\r\n  }\r\n  function capturePostDrawerMediaHandoff(postId) {\r\n    var card =\r\n        qsa(\".dsd-post-card[data-post-id]\", document).filter(function (item) {\r\n          return (\r\n            String(item.getAttribute(\"data-post-id\") || \"\") ===\r\n            String(postId || \"\")\r\n          );\r\n        })[0] || null,\r\n      video = card && qs(\"video.dsd-media-element--video\", card);\r\n    if (!video) return null;\r\n    var frame = video.closest(\"[data-dsd-media-id]\"),\r\n      mediaId =\r\n        (frame &&\r\n          (frame.getAttribute(\"data-dsd-media-resolved-id\") ||\r\n            frame.getAttribute(\"data-dsd-media-id\"))) ||\r\n        \"\",\r\n      handoff = {\r\n        mediaId: String(mediaId || \"\").trim(),\r\n        currentTime: Number(video.currentTime || 0),\r\n        muted: !!video.muted,\r\n        wasPlaying: !video.paused && !video.ended,\r\n        userPaused: !1,\r\n      };\r\n    return (\r\n      pauseVideoProgrammatically(video, \"comments-handoff\"),\r\n      handoff.mediaId ? handoff : null\r\n    );\r\n  }\r\n  function capturePostDrawerPreviewProgress(root) {\r\n    var handoff = state.postDrawer && state.postDrawer.mediaHandoff;\r\n    if (!(!handoff || !root)) {\r\n      var preview = qs(\".dsd-post-drawer__post-media video\", root);\r\n      preview &&\r\n        ((handoff.currentTime = Number(\r\n          preview.currentTime || handoff.currentTime || 0,\r\n        )),\r\n        (handoff.wasPlaying = !preview.paused && !preview.ended));\r\n    }\r\n  }\r\n  function applyPostDrawerMediaHandoff(root) {\r\n    var handoff = state.postDrawer && state.postDrawer.mediaHandoff;\r\n    if (!handoff || !handoff.mediaId || !root) return;\r\n    var attempts = 0;\r\n    function apply() {\r\n      if (!(!state.postDrawer || !state.postDrawer.open || !root.isConnected)) {\r\n        var frame =\r\n            qsa(\".dsd-post-drawer__post-media[data-dsd-media-id]\", root).filter(\r\n              function (item) {\r\n                return (\r\n                  String(\r\n                    item.getAttribute(\"data-dsd-media-resolved-id\") ||\r\n                      item.getAttribute(\"data-dsd-media-id\") ||\r\n                      \"\",\r\n                  ) === handoff.mediaId\r\n                );\r\n              },\r\n            )[0] || null,\r\n          preview = frame && qs(\"video\", frame);\r\n        if (!preview || preview.readyState < 1) {\r\n          ((attempts += 1), attempts < 30 && window.setTimeout(apply, 100));\r\n          return;\r\n        }\r\n        try {\r\n          var duration = Number(preview.duration || 0),\r\n            target = Math.max(0, Number(handoff.currentTime || 0));\r\n          (duration &&\r\n            isFinite(duration) &&\r\n            (target = Math.min(target, Math.max(0, duration - 0.05))),\r\n            Math.abs(Number(preview.currentTime || 0) - target) > 0.2 &&\r\n              (preview.currentTime = target));\r\n        } catch (e) {}\r\n        if (\r\n          ((preview.muted = currentVideoMutedPreference()),\r\n          preview.muted\r\n            ? preview.setAttribute(\"muted\", \"\")\r\n            : preview.removeAttribute(\"muted\"),\r\n          handoff.wasPlaying && !handoff.userPaused)\r\n        ) {\r\n          if (window.DSDGMOR && typeof window.DSDGMOR.playWhenReady == \"function\")\r\n            window.DSDGMOR.playWhenReady(preview, {\r\n              owner: \"LaunchSocialActivation.PostDrawerMediaHandoff\",\r\n              surface: \"post-drawer\",\r\n            });\r\n          else {\r\n            var playAttempt = preview.play();\r\n            playAttempt &&\r\n              typeof playAttempt.catch == \"function\" &&\r\n              playAttempt.catch(function () {});\r\n          }\r\n        } else preview.pause();\r\n        frame.setAttribute(\"data-dsd-comment-media-handoff\", \"applied\");\r\n      }\r\n    }\r\n    apply();\r\n  }\r\n  function closePostDrawer() {\n    var root = qs(\"[data-dsd-post-drawer-root]\");\n    var closingPostId = String(\n      (state.postDrawer && state.postDrawer.postId) || \"\",\n    ).trim(),\n      returnScroll = Number((state.postDrawer && state.postDrawer.returnScroll) || 0);\n    if (closingPostId) {\r\n      delete state.openCommentPostIds[closingPostId];\r\n      var detailOwner = state.commentListeners[closingPostId];\r\n      try {\r\n        detailOwner && typeof detailOwner.stop == \"function\" && detailOwner.stop();\r\n      } catch (error) {}\r\n      delete state.commentListeners[closingPostId];\r\n      delete state.reactionHydrationByPost[closingPostId];\r\n    }\r\n    stopPostDetailRealtimeOwner(\"post-drawer-close\");\r\n    ((state.postDrawer = {\r\n      open: !1,\r\n      mode: \"\",\r\n      postId: \"\",\n      returnFocus: (state.postDrawer && state.postDrawer.returnFocus) || null,\n      returnScroll: returnScroll,\n    }),\r\n      window.DSDGMOR &&\r\n      typeof window.DSDGMOR.clearCommentDrawerPriority == \"function\"\r\n        ? window.DSDGMOR.clearCommentDrawerPriority()\r\n        : document.documentElement.removeAttribute(\r\n            \"data-dsd-comment-video-priority\",\r\n          ),\r\n      document.documentElement.classList.remove(\"dsd-post-drawer-open\"),\r\n      scheduleGlobalOverlayStateSync(),\r\n      root && ((root.hidden = !0), (root.innerHTML = \"\")));\r\n    var restore = state.postDrawer.returnFocus;\r\n    ((state.postDrawer.returnFocus = null),\r\n      restore &&\r\n        typeof restore.focus == \"function\" &&\r\n        window.setTimeout(function () {\r\n          try {\n            restore.focus({ preventScroll: !0 });\n          } catch (e) {}\n          try {\n            window.scrollTo(0, returnScroll);\n          } catch (e) {}\n        }, 0));\n  }\r\n  function openPostDrawer(mode, postId, trigger) {\r\n    ((mode = \"comments\"), (postId = String(postId || \"\").trim()));\r\n    Object.keys(state.openCommentPostIds || {}).forEach(function (id) {\r\n      id !== postId && delete state.openCommentPostIds[id];\r\n    });\r\n    var mediaHandoff = capturePostDrawerMediaHandoff(postId);\r\n    ((state.postDrawer = {\r\n      open: !0,\r\n      mode: mode,\r\n      postId: postId,\n      returnFocus: trigger || document.activeElement || null,\n      returnScroll: window.scrollY || window.pageYOffset || 0,\n      mediaHandoff: mediaHandoff,\n    }),\r\n      postId &&\n        ((state.openCommentPostIds[postId] = !0),\n        hydratePostComments([localPostById(postId) || { postId: postId }]),\n        hydrateCommentReactionsForPost(postId)),\n      document.documentElement.classList.add(\"dsd-post-drawer-open\"),\r\n      scheduleGlobalOverlayStateSync(),\r\n      window.DSDGMOR &&\r\n      typeof window.DSDGMOR.setCommentDrawerPriority == \"function\"\r\n        ? window.DSDGMOR.setCommentDrawerPriority(\"preview\")\r\n        : document.documentElement.setAttribute(\r\n            \"data-dsd-comment-video-priority\",\r\n            \"preview\",\r\n          ),\r\n      renderPostDrawer());\r\n    var root = ensurePostDrawerRoot(),\r\n      focusTarget = qs(\"textarea, input, button, [href]\", root);\r\n    focusTarget &&\r\n      window.setTimeout(function () {\r\n        try {\r\n          focusTarget.focus();\r\n        } catch (e) {}\r\n      }, 0);\r\n  }\r\n  function submitCommentForm(commentForm) {\r\n    if (\r\n      !commentForm ||\r\n      commentForm.dataset.dsdComposerBusy === \"true\" ||\r\n      !requireActiveProfile(\"comment\")\r\n    )\r\n      return Promise.resolve(null);\r\n    var commentInput = qs('[name=\"body\"]', commentForm),\n      commentBody = (commentInput && commentInput.value) || \"\",\n      commentMedia = collectFormFiles(commentForm),\n      parentCommentId = commentForm.getAttribute(\"data-parent-comment-id\") || \"\";\n    if (\r\n      !validatePublicationMediaSelectionIntegrity(\r\n        commentForm,\r\n        commentMedia,\r\n        \"comment\",\r\n      ) ||\r\n      !validateSocialMediaRequirements(\r\n        commentMedia,\r\n        commentForm,\r\n        \"Comment\",\r\n        socialAttachmentLimits(),\r\n      )\r\n    )\r\n      return Promise.resolve(null);\r\n    var commentId = canonicalComposerPublicationId(commentForm, \"comment\");\r\n    return (\n      composerBusy(\n        commentForm,\r\n        commentMedia.length\r\n          ? \"Saving media and comment...\"\r\n          : \"Saving comment...\",\r\n        addComment(commentForm.getAttribute(\"data-post-id\"), {\r\n          commentId: commentId,\r\n          body: commentBody,\n          media: commentMedia,\n          parentCommentId: parentCommentId,\n        }),\n      ).then(function (result) {\r\n        return (\r\n          result &&\n            (commentForm.reset(),\n            clearCanonicalComposerPublicationId(commentForm, \"comment\"),\r\n            clearSocialDraft(commentForm),\n            removeFilePreviews(commentForm),\n            delete state.commentReplyParentByPost[\n              commentForm.getAttribute(\"data-post-id\") || \"\"\n            ],\n            updateComposerCounters(commentForm),\n            renderPostDrawer()),\r\n          result\r\n        );\r\n      })\r\n    );\r\n  }\r\n  function postDrawerCommentsHTML(post) {\r\n    if (!post)\r\n      return '<div class=\"dsd-post-drawer__empty\"><strong>Post unavailable</strong><p>This post is not available in the current view.</p></div>';\r\n    var comments = visibleCommentsForPost(post),\r\n      body = String(post.body || \"\").trim(),\r\n      postMediaItems2 = safeMediaItemsForRecord(post),\r\n      handoffMediaId =\r\n        (state.postDrawer &&\r\n          state.postDrawer.mediaHandoff &&\r\n          state.postDrawer.mediaHandoff.mediaId) ||\r\n        \"\";\r\n    handoffMediaId &&\r\n      (postMediaItems2 = postMediaItems2.slice().sort(function (a, b) {\r\n        return (\r\n          (readableMediaId(b) === handoffMediaId ? 1 : 0) -\r\n          (readableMediaId(a) === handoffMediaId ? 1 : 0)\r\n        );\r\n      }));\r\n    var postMediaPreview = postMediaItems2\r\n        .slice(0, 1)\r\n        .map(function (m) {\r\n          return (\r\n            '<figure class=\"dsd-post-drawer__post-media\" data-dsd-inline-media=\"true\"' +\r\n            mediaReadAttrs(m) +\r\n            ' data-dsd-media-kind=\"' +\r\n            html(m.kind || \"image\") +\r\n            '\" data-dsd-media-status=\"' +\r\n            html(m.status || \"uploaded\") +\r\n            '\"></figure>'\r\n          );\r\n        })\r\n        .join(\"\"),\r\n      cards = comments.length\n        ? commentThreadHTML(post, comments)\n        : '<div class=\"dsd-post-drawer__empty\"><strong>No comments yet</strong><p>Comments appear here when they are available.</p></div>',\n      replyParentId = state.commentReplyParentByPost[postKey(post)] || \"\",\n      replyParent = replyParentId\n        ? comments.filter(function (comment) {\n            return (\n              canonicalCommentId(comment) === replyParentId ||\n              commentKey(comment) === replyParentId\n            );\n          })[0] || null\n        : null,\n      replyContext = replyParent\n        ? '<div class=\"dsd-comment-reply-context\"><span>Replying to @' +\n          html(replyParent.authorProfileKey || replyParent.profileKey || \"member\") +\n          '</span><button type=\"button\" data-dsd-cancel-comment-reply aria-label=\"Cancel reply\">&times;</button></div>'\n        : \"\",\n      form = canUseSocialActions()\n        ? '<form class=\"dsd-comment-compact-composer\" data-dsd-comment-form data-dsd-comment-composer-contract=\"compact-sticky\" data-post-id=\"' +\n          html(postKey(post)) +\n          '\"' +\n          (replyParent\n            ? ' data-parent-comment-id=\"' +\n              html(canonicalCommentId(replyParent) || commentKey(replyParent)) +\n              '\"'\n            : \"\") +\n          \">\" +\n          replyContext +\n          '<textarea name=\"body\" rows=\"1\" maxlength=\"' +\n          html(MAX.comment) +\r\n          '\" aria-label=\"Write a comment\" placeholder=\"Write a comment\"></textarea><div class=\"dsd-composer-media-actions dsd-launch-comment-media-actions\" aria-label=\"Attach comment media\">' +\r\n          composerMixedMediaButton(!0, \"Add comment media\", 4) +\n          '</div><div class=\"dsd-post-drawer__form-actions\">' +\r\n          composerCountHTML(MAX.comment) +\r\n          '<button type=\"submit\">Reply</button></div></form>'\r\n        : '<div class=\"dsd-post-drawer__login\"><p>Log in to add a comment.</p><a class=\"dsd-launch-action\" href=\"' +\r\n          loginReturnUrl() +\r\n          '\">Log in</a></div>';\r\n    return (\r\n      '<div class=\"dsd-post-drawer__post-summary\">' +\r\n      postAuthorAvatar(post, post.authorProfileKey || \"\") +\r\n      \"<div><strong>\" +\r\n      html(publicDisplayName(post.authorDisplayName || \"User\", \"User\")) +\r\n      \"</strong><span>@\" +\r\n      html(\r\n        publicHandleText(\r\n          post.authorProfileKey || \"\",\r\n          post.authorDisplayName || \"User\",\r\n          \"member\",\r\n        ),\r\n      ) +\r\n      \" \\xB7 \" +\r\n      html(postTimestamp(post)) +\r\n      \" \\xB7 \" +\r\n      html(String(comments.length)) +\r\n      \" comments</span>\" +\r\n      (body ? \"<p>\" + linkify(publicDisplayText(body, \"\")) + \"</p>\" : \"\") +\r\n      \"</div>\" +\r\n      postMediaPreview +\r\n      '</div><div class=\"dsd-post-drawer__comments\" data-dsd-post-drawer-comment-list>' +\r\n      cards +\r\n      \"</div>\" +\r\n      form\r\n    );\r\n  }\r\n  function renderPostDrawer() {\r\n    var root = ensurePostDrawerRoot();\r\n    if (!state.postDrawer || !state.postDrawer.open) {\r\n      ((root.hidden = !0),\r\n        (root.innerHTML = \"\"),\r\n        document.documentElement.classList.remove(\"dsd-post-drawer-open\"),\r\n        scheduleGlobalOverlayStateSync());\r\n      return;\r\n    }\r\n    var mode = \"comments\";\r\n    capturePostDrawerPreviewProgress(root);\r\n    var post = state.postDrawer.postId\r\n        ? localPostById(state.postDrawer.postId)\r\n        : null,\r\n      title = \"Comments\",\r\n      commentCount = post ? visibleCommentsForPost(post).length : 0;\r\n    ((root.hidden = !1),\r\n      (root.innerHTML =\r\n        '<div class=\"dsd-post-drawer\" data-dsd-post-drawer data-dsd-comment-drawer-contract=\"compact-full-height\" data-mode=\"' +\r\n        html(mode) +\r\n        '\"><button type=\"button\" class=\"dsd-post-drawer__backdrop\" data-dsd-close-post-drawer aria-label=\"Close post drawer\"></button><aside class=\"dsd-post-drawer__panel\" role=\"region\" aria-label=\"' +\r\n        html(title) +\r\n        '\" tabindex=\"-1\"><header><strong>' +\r\n        html(title) +\r\n        \"<span>\" +\r\n        html(String(commentCount)) +\r\n        '</span></strong><button type=\"button\" data-dsd-close-post-drawer aria-label=\"Close\">&times;</button></header><div class=\"dsd-post-drawer__body\">' +\r\n        postDrawerCommentsHTML(post) +\r\n        \"</div></aside></div>\"),\r\n      hydrateAvatarMedia(root),\r\n      hydrateMediaReads(root),\r\n      applyPostDrawerMediaHandoff(root),\n      updateComposerCounters(root),\n      bindSocialDraftRecovery(qs(\"[data-dsd-comment-form]\", root)),\n      bindPostMentionAutocomplete(root),\n      bindPostDrawerCommentActions(root));\r\n    var panel = qs(\".dsd-post-drawer__panel\", root);\r\n    panel && panel.focus();\r\n  }\r\n  function bindPostDrawerCommentActions(root) {\r\n    ((root = root || ensurePostDrawerRoot()),\r\n      qsa(\r\n        \"[data-dsd-delete-comment], [data-dsd-hide-comment], [data-dsd-approve-comment], [data-dsd-reject-comment], [data-dsd-restore-comment]\",\r\n        root,\r\n      ).forEach(function (button) {\r\n        button.dataset.dsdCommentActionBound !== BUILD &&\r\n          ((button.dataset.dsdCommentActionBound = BUILD),\r\n          button.addEventListener(\"click\", function (ev) {\r\n            (ev.preventDefault(), ev.stopPropagation());\r\n            var postId = button.getAttribute(\"data-post-id\") || \"\",\r\n              commentId =\r\n                button.getAttribute(\"data-dsd-delete-comment\") ||\r\n                button.getAttribute(\"data-dsd-hide-comment\") ||\r\n                button.getAttribute(\"data-dsd-approve-comment\") ||\r\n                button.getAttribute(\"data-dsd-reject-comment\") ||\r\n                button.getAttribute(\"data-dsd-restore-comment\") ||\r\n                \"\";\r\n            if (!postId || !commentId || button.disabled) return;\r\n            function finish() {\r\n              ((button.disabled = !1),\r\n                button.removeAttribute(\"aria-busy\"),\r\n                renderPostDrawer());\r\n            }\r\n            if (\r\n              ((button.disabled = !0),\r\n              button.setAttribute(\"aria-busy\", \"true\"),\r\n              button.hasAttribute(\"data-dsd-delete-comment\"))\r\n            ) {\r\n              deleteComment(postId, commentId).then(finish, finish);\r\n              return;\r\n            }\r\n            var stateValue = button.hasAttribute(\"data-dsd-hide-comment\")\r\n              ? \"hidden\"\r\n              : button.hasAttribute(\"data-dsd-reject-comment\")\r\n                ? \"rejected\"\r\n                : \"approved\";\r\n            updateCommentState(postId, commentId, stateValue).then(\r\n              finish,\r\n              finish,\r\n            );\r\n          }));\r\n      }));\r\n  }\r\n  function postViewCounterHTML(post, counts) {\n    counts = counts || (post && post.counts) || {};\n    var viewCounterValue = stableViewCounter(post, counts),\n      ownerCanInspect = !!(\n        hasCustomer() &&\n        post &&\n        identityMatchesCurrent(\n          post.authorUid || post.authorUserId || post.author_user_id || \"\",\n          post.authorProfileKey || post.author_profile_key || \"\",\n        )\n      ),\n      tagName = ownerCanInspect ? \"button\" : \"span\",\n      ownerAttributes = ownerCanInspect\n        ? ' type=\"button\" data-dsd-post-audience-open=\"' +\n          html(\n            post.supabasePostId ||\n              post.supabase_post_id ||\n              post.postId ||\n              post.id ||\n              \"\",\n          ) +\n          '\" title=\"View Post audience\"'\n        : \"\";\n    return (\n      '<' + tagName + ownerAttributes + ' class=\"dsd-post-view-counter\" data-dsd-counter-surface=\"post\" data-dsd-counter-source=\"' +\n      (supabaseCutoverConfigured()\r\n        ? \"supabase-view-counter\"\r\n        : \"owner-fallback\") +\r\n      '\" data-dsd-counter-dedupe=\"' +\r\n      (supabaseCutoverConfigured()\r\n        ? \"viewer-key-server-dedupe\"\r\n        : \"owner-session-fallback\") +\r\n      '\" data-dsd-counter-value=\"' +\r\n      html(viewCounterValue) +\r\n      '\" aria-label=\"' +\r\n      viewCounterValue +\r\n      ' post views\">' +\r\n      viewCounterValue +\n      \" views</\" + tagName + \">\"\n    );\n  }\n  function postAudienceRequest(postId, offset) {\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/post-audience\", {\n      method: \"POST\",\n      credentials: \"include\",\n      headers: { Accept: \"application/json\", \"Content-Type\": \"application/json\" },\n      body: JSON.stringify({ postId: postId, limit: 24, offset: Number(offset || 0) }),\n    }).then(function (res) {\n      if (!res.ok) {\n        var error = new Error(\"Post audience failed: \" + res.status);\n        error.status = res.status;\n        throw error;\n      }\n      return res.json();\n    });\n  }\n  function postAudienceAvatarHTML(row) {\n    return row && row.avatarMediaId\n      ? '<span class=\"dsd-post-audience__avatar\" data-dsd-avatar-media-id=\"' +\n          html(row.avatarMediaId) +\n          '\">' +\n          html(initials(row.displayName || row.handle || \"DSD member\")) +\n          \"</span>\"\n      : '<span class=\"dsd-post-audience__avatar\" aria-hidden=\"true\">' +\n          html(initials((row && (row.displayName || row.handle)) || \"DSD member\")) +\n          \"</span>\";\n  }\n  function closePostAudienceSheet() {\n    qsa(\"[data-dsd-post-audience-sheet]\").forEach(function (sheet) {\n      sheet.remove();\n    });\n    scheduleGlobalOverlayStateSync();\n  }\n  function renderPostAudienceSheet(summary, append) {\n    summary = summary || {};\n    var root = canonicalOverlayRoot(),\n      postId = summary.postId || state.activePostAudienceId || \"\",\n      existing = qs('[data-dsd-post-audience-sheet=\"' + cssAttrValue(postId) + '\"]'),\n      rows = Array.isArray(summary.rows) ? summary.rows : [],\n      rowHTML = rows.map(function (row) {\n        var key = row.profileKey || row.handle || \"\",\n          identity = row.available === !1\n            ? '<span class=\"dsd-post-audience__identity\"><strong>Unavailable DSD member</strong><small>Identity hidden</small></span>'\n            : '<a class=\"dsd-post-audience__identity\" href=\"' + html(profileRouteHref(key)) + '\"><strong>' + html(publicDisplayName(row.displayName || key, \"DSD member\")) + '</strong><small>@' + html(publicHandleText(key, row.displayName || \"\", \"member\")) + '</small></a>';\n        return '<article class=\"dsd-post-audience__row\">' + postAudienceAvatarHTML(row) + identity + '<time datetime=\"' + html(row.latestViewedAt || \"\") + '\">' + html(formatDateTime(row.latestViewedAt || \"\") || \"Recently\") + '</time></article>';\n      }).join(\"\"),\n      publicHTML = Number(summary.publicCount || 0)\n        ? '<article class=\"dsd-post-audience__row is-public\"><span class=\"dsd-post-audience__avatar\" aria-hidden=\"true\">P</span><span class=\"dsd-post-audience__identity\"><strong>Public views</strong><small>Guest identities are not collected</small></span><strong>' + html(String(summary.publicCount)) + '</strong></article>'\n        : \"\";\n    if (append && existing) {\n      var list = qs(\"[data-dsd-post-audience-list]\", existing);\n      list && list.insertAdjacentHTML(\"beforeend\", rowHTML);\n      var more = qs(\"[data-dsd-post-audience-more]\", existing);\n      if (more) {\n        summary.hasMore\n          ? more.setAttribute(\"data-offset\", String(Number(summary.offset || 0) + rows.length))\n          : more.remove();\n      }\n      hydrateProfileCardMedia(existing);\n      hydrateMediaReads(existing);\n      return existing;\n    }\n    closePostAudienceSheet();\n    var sheet = document.createElement(\"section\");\n    sheet.className = \"dsd-post-audience\";\n    sheet.setAttribute(\"data-dsd-post-audience-sheet\", postId);\n    var identifiedCount = Number(summary.identifiedCount || 0),\n      publicCount = Number(summary.publicCount || 0),\n      canonicalViewCount = Math.max(0, Number(summary.canonicalViewCount || 0) || 0),\n      historicalOnly = canonicalViewCount > identifiedCount + publicCount;\n    sheet.innerHTML = '<div class=\"dsd-post-audience__backdrop\" data-dsd-post-audience-close></div><div class=\"dsd-post-audience__dialog\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"dsd-post-audience-title\" tabindex=\"-1\"><header><div><strong id=\"dsd-post-audience-title\">Post viewers</strong><small>' + html(String(canonicalViewCount) + \" total views \u00B7 \" + String(identifiedCount) + \" members\" + (publicCount ? \" \u00B7 \" + publicCount + \" public\" : \"\")) + '</small></div><button type=\"button\" data-dsd-post-audience-close aria-label=\"Close Post viewers\">&times;</button></header><div class=\"dsd-post-audience__list\" data-dsd-post-audience-list>' + (rowHTML || publicHTML ? rowHTML + publicHTML : '<p class=\"dsd-post-audience__empty\">' + (historicalOnly ? \"Viewer identities are available for views recorded after this release.\" : \"No one has viewed this Post yet.\") + '</p>') + '</div>' + (summary.hasMore ? '<button type=\"button\" class=\"dsd-post-audience__more\" data-dsd-post-audience-more data-offset=\"' + html(String(rows.length)) + '\">Load more</button>' : \"\") + '</div>';\n    root.appendChild(sheet);\n    hydrateProfileCardMedia(sheet);\n    hydrateMediaReads(sheet);\n    scheduleGlobalOverlayStateSync();\n    var dialog = qs('[role=\"dialog\"]', sheet);\n    dialog && dialog.focus();\n    return sheet;\n  }\n  function openPostAudienceSheet(postId) {\n    if (!postId) return Promise.resolve(null);\n    state.activePostAudienceId = postId;\n    renderPostAudienceSheet({ postId: postId, rows: [] }, !1);\n    var list = qs(\"[data-dsd-post-audience-list]\");\n    list && (list.innerHTML = '<p class=\"dsd-post-audience__empty\" aria-busy=\"true\">Loading Post viewers...</p>');\n    return postAudienceRequest(postId, 0)\n      .then(function (summary) {\n        return renderPostAudienceSheet(summary, !1);\n      })\n      .catch(function (error) {\n        list = qs(\"[data-dsd-post-audience-list]\");\n        list && (list.innerHTML = '<p class=\"dsd-post-audience__empty\">Post viewers are unavailable. Try again.</p>');\n        claim(\"post-audience:blocked\", { status: error && error.status, error: error && error.message });\n        return null;\n      });\n  }\n  function postAudienceBadgeHTML(post) {\n    post = post || {};\r\n    var policy = visibilityPolicyFromInput(\r\n        Object.assign({}, post.entity || {}, post),\r\n      ),\r\n      kind =\r\n        policy.accessGate === \"dsd_plus\" || policy.contentRating === \"gated\"\r\n          ? \"gated\"\r\n          : policy.contentRating === \"explicit\"\r\n            ? \"explicit\"\r\n            : policy.contentRating === \"mature\"\r\n              ? \"mature\"\r\n              : policy.visibility === \"followers\"\n                ? \"followers\"\n                : policy.visibility === \"private\"\n                  ? \"private\"\n                  : \"public\",\n      labels = {\n        public: \"Public\",\n        followers: \"Followers\",\n        private: \"Private\",\n        mature: \"Mature\",\r\n        explicit: \"Explicit\",\r\n        gated: \"DSD+\",\r\n      },\r\n      descriptions = {\n        public: \"Public: eligible visitors and members can view this post.\",\n        followers: \"Followers: only approved followers can view this post.\",\n        private: \"Private: only the author and approved access can view this post.\",\n        mature: \"Mature: signed-in viewers must have an age-verified 18+ account.\",\r\n        explicit: \"Explicit: signed-in viewers must be 18+ and enable adult content.\",\r\n        gated: \"DSD+: viewers need an active DSD+ membership to open the post.\",\r\n      },\r\n      marks = {\n        public: \"&#9673;\",\n        followers: \"&#128101;\",\n        private: \"&#128274;\",\n        mature: \"18+\",\r\n        explicit: \"EX\",\r\n        gated: \"+\",\r\n      },\r\n      label = labels[kind] || labels.public;\r\n    return (\r\n      '<button type=\"button\" class=\"dsd-post-audience-badge dsd-post-audience-badge--' +\r\n      html(kind) +\r\n      '\" data-dsd-post-audience=\"' +\r\n      html(kind) +\r\n      '\" data-dsd-visibility=\"' +\r\n      html(policy.visibility) +\r\n      '\" data-dsd-content-rating=\"' +\r\n      html(policy.contentRating) +\r\n      '\" data-dsd-access-gate=\"' +\r\n      html(policy.accessGate) +\r\n      '\" aria-label=\"' +\r\n      html(label + \" post audience\") +\r\n      '\" aria-expanded=\"false\"><span aria-hidden=\"true\">' +\r\n      marks[kind] +\r\n      '</span><span class=\"dsd-post-audience-tooltip\" role=\"tooltip\" hidden>' +\r\n      html(descriptions[kind] || descriptions.public) +\r\n      \"</span></button>\"\r\n    );\n  }\n  function pollTimeLabel(poll) {\n    var closesAt = Date.parse((poll && (poll.closesAt || poll.closes_at)) || \"\"),\n      remaining = closesAt - Date.now();\n    if (!isFinite(closesAt) || remaining <= 0 || String(poll && poll.status) === \"closed\")\n      return \"Poll closed\";\n    var minutes = Math.max(1, Math.ceil(remaining / 6e4));\n    if (minutes < 60) return minutes + \"m left\";\n    var hours = Math.ceil(minutes / 60);\n    return hours < 48 ? hours + \"h left\" : Math.ceil(hours / 24) + \"d left\";\n  }\n  function postPollHTML(post, embedded) {\n    var poll = post && post.poll,\n      options = poll && Array.isArray(poll.options) ? poll.options : [];\n    if (!poll || options.length < 2) return \"\";\n    var postId = String(post.supabasePostId || \"\"),\n      selectedId = String(poll.selectedOptionId || poll.selected_option_id || \"\"),\n      totalVotes = Number(poll.totalVotes || poll.total_votes || 0),\n      closesAt = String(poll.closesAt || poll.closes_at || \"\"),\n      open = String(poll.status || \"open\") === \"open\" && (!closesAt || Date.parse(closesAt) > Date.now()),\n      pending = !!state.pollVotePendingByPost[postId],\n      canVote = canUseSocialActions() && open && !!postId;\n    return (\n      '<section class=\"dsd-post-poll' + (embedded ? \" dsd-post-poll--embedded\" : \"\") +\n      '\" data-dsd-post-poll data-post-id=\"' + html(postId) + '\" role=\"radiogroup\" aria-label=\"Poll choices\">' +\n      '<div class=\"dsd-post-poll__options\">' +\n      options.map(function (option, index) {\n        option = typeof option === \"object\" && option ? option : { text: option };\n        var optionId = String(option.id || option.optionId || \"\"),\n          votes = Math.max(0, Number(option.votes || 0)),\n          percentage = totalVotes ? Math.round((votes / totalVotes) * 100) : 0,\n          selected = !!(optionId && optionId === selectedId);\n        return '<button type=\"button\" class=\"dsd-post-poll__option' + (selected ? \" is-selected\" : \"\") +\n          '\" data-dsd-poll-vote data-post-id=\"' + html(postId) + '\" data-option-id=\"' + html(optionId) +\n          '\" role=\"radio\" aria-checked=\"' + selected + '\" aria-label=\"' +\n          html(publicDisplayText(option.text || \"Choice \" + (index + 1), \"Choice\") + \", \" + percentage + \" percent\") +\n          '\"' + (canVote && optionId && !pending ? \"\" : \" disabled\") +\n          '><span class=\"dsd-post-poll__fill\" style=\"--dsd-poll-result:' + percentage + '%\"></span>' +\n          '<span class=\"dsd-post-poll__label\">' + html(publicDisplayText(option.text, \"Choice\")) + '</span>' +\n          '<span class=\"dsd-post-poll__result\">' + percentage + '%</span></button>';\n      }).join(\"\") +\n      '</div><div class=\"dsd-post-poll__meta\"><span data-dsd-poll-total>' + totalVotes + (totalVotes === 1 ? \" vote\" : \" votes\") +\n      '</span><span data-dsd-poll-closes-at=\"' + html(closesAt) + '\">' + html(pollTimeLabel(poll)) + '</span></div>' +\n      (!canUseSocialActions() && open ? '<a href=\"' + html(loginReturnUrl()) + '\">Log in to vote</a>' : \"\") +\n      '</section>'\n    );\n  }\n  function applyPollProjection(postId, poll) {\n    state.posts = (state.posts || []).map(function (post) {\n      var updated = post;\n      if (String(post.supabasePostId || \"\") === String(postId))\n        updated = Object.assign({}, post, { poll: poll, postType: \"poll\" });\n      if (post.originalPost && String(post.originalPost.supabasePostId || \"\") === String(postId))\n        updated = Object.assign({}, updated, {\n          originalPost: Object.assign({}, post.originalPost, { poll: poll, postType: \"poll\" }),\n        });\n      return updated;\n    });\n  }\n  function votePostPoll(postId, optionId) {\n    if (!requireActiveProfile(\"vote in polls\")) return Promise.resolve(null);\n    postId = String(postId || \"\");\n    optionId = String(optionId || \"\");\n    if (!uuidLike(postId) || !uuidLike(optionId) || state.pollVotePendingByPost[postId])\n      return Promise.resolve(null);\n    state.pollVotePendingByPost[postId] = !0;\n    renderPosts(\"poll-vote-pending\");\n    return waitForSupabaseAdapter(\"posts\", \"votePostPoll\")\n      .then(function (adapter) {\n        return adapter.votePostPoll(postId, optionId);\n      })\n      .then(function (payload) {\n        if (!payload || !payload.poll) throw new Error(\"Poll vote did not return authoritative results.\");\n        applyPollProjection(postId, payload.poll);\n        renderStatus(\"Vote saved.\");\n        return payload.poll;\n      })\n      .catch(function (error) {\n        renderStatus(\n          error && error.status === 409\n            ? \"This Poll is closed.\"\n            : (error && error.message) || \"Vote could not be saved.\",\n        );\n        throw error;\n      })\n      .finally(function () {\n        delete state.pollVotePendingByPost[postId];\n        renderPosts(\"poll-vote-settled\");\n      });\n  }\n  function sharedPostEmbedHTML(post) {\n    if (!post || (!post.originalPostId && post.postType !== \"share\")) return \"\";\n    var original = post.originalPost\n      ? hydrateRecordIdentity(post.originalPost)\n      : null;\n    if (\n      !original ||\n      post.originalUnavailable ||\n      (canUseSocialActions() &&\n        relationshipBlockedProfile(\n          original.authorUid || original.ownerUid || \"\",\n          original.authorProfileKey || original.ownerProfileKey || \"\",\n        ))\n    )\n      return (\n        '<section class=\"dsd-shared-post dsd-shared-post--unavailable\" data-dsd-shared-original-unavailable=\"true\"><strong>Original post unavailable</strong><p>The original was removed, restricted, or is no longer available to you.</p></section>'\n      );\n    var originalId = original.postId || original.id || \"\",\n      authorKey = original.authorProfileKey || \"\",\n      authorName = publicDisplayName(\n        original.authorDisplayName || authorKey || \"DSD member\",\n        \"DSD member\",\n      ),\n      body = String(original.body || \"\").trim(),\n      originalMediaItems = safeMediaItemsForRecord(original),\r\n      media = originalMediaItems\r\n        .map(function (item, index) {\n          return (\n            '<figure class=\"dsd-shared-post__media dsd-launch-media-chip\" data-dsd-post-media-inline-only=\"true\" data-dsd-media-index=\"' +\n            html(index) +\n            '\" data-dsd-inline-media=\"true\"' +\n            mediaReadAttrs(item) +\n            ' data-dsd-media-kind=\"' +\n            html(item.kind || \"image\") +\n            '\" data-dsd-media-status=\"' +\n            html(item.status || \"uploaded\") +\n            '\"></figure>'\n          );\n        })\n        .join(\"\");\n    return (\n      '<section class=\"dsd-shared-post\" data-dsd-shared-original-id=\"' +\n      html(originalId) +\n      '\"><header>' +\n      postAuthorAvatar(original, authorKey) +\n      '<div><strong><a href=\"' +\n      html(profileRouteHref(authorKey)) +\n      '\">' +\n      html(authorName) +\n      '</a></strong><span>@' +\n      html(publicHandleText(authorKey, authorName, \"member\")) +\n      ' \u00B7 <time data-dsd-relative-time=\"' +\n      html(original.createdAt || original.updatedAt || \"\") +\n      '\">' +\n      html(postTimestamp(original)) +\n      \"</time>\" +\n      '</span></div></header>' +\n      (body\n        ? '<p class=\"dsd-shared-post__body\">' +\n          linkify(publicDisplayText(body, \"\")) +\n          \"</p>\" +\n          postLinkPreviewHTML(body)\n        : \"\") +\n      (media\r\n        ? '<div class=\"dsd-shared-post__media-grid\" data-dsd-media-count=\"' +\r\n          html(originalMediaItems.length) +\r\n          '\" aria-label=\"' +\r\n          html(originalMediaItems.length + (originalMediaItems.length === 1 ? \" shared post attachment\" : \" shared post attachments\")) +\r\n          '\">' + media + \"</div>\"\r\n        : \"\") +\r\n      postPollHTML(original, !0) +\n      '<a class=\"dsd-shared-post__open\" href=\"' +\n      html(postPermalink(originalId)) +\n      '\">View original post</a></section>'\n    );\n  }\n  function originalsPostReferenceSlot(post) {\r\n    var source = post && (post.originals_reference || post.originalsReference);\r\n    if (!source || source.version !== 1 || source.seriesId !== \"just-the-homie\" || ![\"series\", \"chapter\"].includes(source.type)) return \"\";\r\n    if (source.type === \"chapter\" && !/^chapter-0[1-8]$/.test(String(source.chapterId || \"\"))) return \"\";\r\n    var reference = source.type === \"chapter\"\r\n      ? { version: 1, type: \"chapter\", seriesId: \"just-the-homie\", chapterId: source.chapterId }\r\n      : { version: 1, type: \"series\", seriesId: \"just-the-homie\" };\r\n    return '<div data-originals-post-reference=\"' + html(JSON.stringify(reference)) + '\"></div>';\r\n  }\r\n  function postCard(post) {\r\n    if (\r\n      ((post = hydrateRecordIdentity(post)),\r\n      post && isRestrictedShellRecord(post) && !canModerate())\r\n    ) {\r\n      var gatedId = post.postId || post.id || \"\",\r\n        gatedAuthorKey = post.authorProfileKey || \"\",\r\n        gatedAuthorName = publicDisplayName(\r\n          post.authorDisplayName || \"DSD member\",\r\n          \"DSD member\",\r\n        ),\r\n        gatedHeader =\r\n          '<div class=\"dsd-post-card__head\">' +\r\n          postAuthorAvatar(post, gatedAuthorKey) +\r\n          '<div class=\"dsd-post-card__identity\"><strong><a href=\"' +\r\n          html(profileRouteHref(gatedAuthorKey)) +\r\n          '\">' +\r\n          html(gatedAuthorName) +\r\n          '</a></strong><span class=\"dsd-post-card__handle\">@' +\r\n          html(publicHandleText(gatedAuthorKey, gatedAuthorName, \"member\")) +\r\n          '</span></div><div class=\"dsd-post-card__context\"><time class=\"dsd-post-card__time\" data-dsd-relative-time=\"' +\n          html(post.createdAt || post.updatedAt || \"\") +\n          '\">' +\n          html(postTimestamp(post)) +\r\n          \"</time>\" +\r\n          postAudienceBadgeHTML(post) +\r\n          \"</div></div>\",\r\n        restrictedCopy = restrictedShellText(post, \"post\");\r\n      return (\r\n        '<article class=\"dsd-post-card dsd-post-card--gated\" data-post-id=\"' +\r\n        html(gatedId) +\r\n        '\" data-dsd-gated-shell=\"' +\r\n        (post.gatedShell === !0) +\r\n        '\" data-dsd-restricted-shell=\"true\" data-dsd-restricted-kind=\"' +\r\n        html(\r\n          post.restrictedKind || classifiedRestrictionType(post) || \"gated\",\r\n        ) +\r\n        '\">' +\r\n        gatedHeader +\r\n        '<div class=\"dsd-gated-post-shell\">' +\r\n        postViewCounterHTML(post, post.counts || {}) +\r\n        \"<strong>\" +\r\n        html(restrictedCopy.title) +\r\n        \"</strong><p>\" +\r\n        html(restrictedCopy.body) +\r\n        \"</p>\" +\r\n        restrictedShellActionHTML(restrictedCopy) +\r\n        \"</div></article>\"\r\n      );\r\n    }\r\n    var counts = post.counts || {},\r\n      postMediaItems2 = safeMediaItemsForRecord(post),\r\n      layoutType = mediaLayoutType(postMediaItems2),\r\n      media = postMediaItems2\n        .slice(0, 4)\n        .map(function (m, mediaIndex) {\n          var kind = m.kind || \"image\",\n            remainder =\n              mediaIndex === 3 && postMediaItems2.length > 4\n                ? '<span class=\"dsd-launch-media-remainder\" aria-label=\"' +\n                  html(String(postMediaItems2.length - 4) + \" more media items\") +\n                  '\">+' +\n                  html(postMediaItems2.length - 4) +\n                  \"</span>\"\n                : \"\",\n            ownerUploadError =\n              (canEditPost(post) || canModerate()) && m.uploadError\r\n                ? ' data-dsd-upload-error=\"' +\r\n                  html(String(m.uploadError).slice(0, 180)) +\r\n                  '\"'\r\n                : \"\";\r\n          return (\r\n            '<figure class=\"dsd-launch-media-chip dsd-launch-media-chip--' +\r\n            html(kind) +\r\n            '\" data-dsd-media-index=\"' +\r\n            html(mediaIndex) +\r\n            '\" data-dsd-inline-media=\"true\" data-dsd-post-media-inline-only=\"true\"' +\r\n            mediaReadAttrs(m) +\r\n            ' data-dsd-media-kind=\"' +\r\n            html(kind) +\r\n            '\" data-dsd-media-status=\"' +\r\n            html(m.status || \"pending_upload\") +\r\n            '\"' +\n            ownerUploadError +\n            \">\" + remainder + \"</figure>\"\n          );\n        })\r\n        .join(\"\"),\r\n      id = post.postId || post.id,\r\n      authorKey = post.authorProfileKey || \"\",\r\n      selectedReaction = String(state.reactionsByPost[id] || \"\"),\n      reacted = !!selectedReaction,\n      savedOverride =\r\n        state.localSavedStateOverrides && state.localSavedStateOverrides[id],\r\n      saved = savedOverride\r\n        ? savedOverride === \"saved\"\r\n        : state.savedItems.some(function (item) {\r\n            return item && item.state === \"saved\" && savedItemMatchesPost(item, post);\r\n          }),\r\n      visibleCommentCount = visibleCommentsForPost(post).length,\n      profilePinAction =\n        canEditPost(post) &&\n        /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(\n          String(post.supabasePostId || \"\"),\n        )\n          ? '<button type=\"button\" data-dsd-profile-pin-post=\"' +\n            html(id) +\n            '\" data-dsd-profile-pin-post-uuid=\"' +\n            html(post.supabasePostId) +\n            '\" data-dsd-profile-pin-action=\"' +\n            (post.pinned ? \"unpin\" : \"pin\") +\n            '\">' +\n            (post.pinned ? \"Unpin from profile\" : \"Pin to profile\") +\n            \"</button>\"\n          : \"\",\n      ownerActions = canEditPost(post)\n        ? '<button type=\"button\" data-dsd-edit-post=\"' +\n          html(id) +\n          '\">Edit</button>' +\n          profilePinAction +\n          '<button type=\"button\" data-dsd-change-post-audience=\"' +\n          html(id) +\n          '\">Change audience</button><button type=\"button\" data-dsd-delete-post=\"' +\n          html(id) +\r\n          '\">Delete</button>'\r\n        : \"\",\r\n      postStatus =\r\n        post.status || (post.moderation && post.moderation.state) || \"pending\",\r\n      modActions = \"\";\r\n    canModerate() &&\r\n      (postStatus !== \"approved\" &&\r\n        (modActions +=\r\n          '<button type=\"button\" data-dsd-approve-post=\"' +\r\n          html(id) +\r\n          '\">Approve</button>'),\r\n      postStatus !== \"hidden\" &&\r\n        (modActions +=\r\n          '<button type=\"button\" data-dsd-hide-post=\"' +\r\n          html(id) +\r\n          '\">Hide</button>'),\r\n      postStatus !== \"rejected\" &&\r\n        (modActions +=\r\n          '<button type=\"button\" data-dsd-reject-post=\"' +\r\n          html(id) +\r\n          '\">Reject</button>'));\r\n    var reportAction = canUseSocialActions()\r\n        ? '<button type=\"button\" data-dsd-report-post=\"' +\r\n          html(id) +\r\n          '\">Report</button>'\r\n        : \"\",\r\n      technicalReportAction = canUseSocialActions()\r\n        ? '<button type=\"button\" data-dsd-report-technical-issue=\"' +\r\n          html(id) +\r\n          '\">Report technical issue</button>'\r\n        : \"\",\r\n      menuActions =\r\n        ownerActions || modActions || reportAction || technicalReportAction\r\n          ? '<details class=\"dsd-post-more-menu\"><summary aria-label=\"Post options\" title=\"Post options\"><span aria-hidden=\"true\">...</span></summary><div class=\"dsd-post-more-menu__panel\">' +\r\n            ownerActions +\r\n            reportAction +\r\n            technicalReportAction +\r\n            modActions +\r\n            \"</div></details>\"\r\n          : \"\",\r\n      viewCounter = postViewCounterHTML(post, counts),\r\n      commentButton =\r\n        '<button type=\"button\" data-dsd-action=\"comment\" data-post-id=\"' +\r\n        html(id) +\r\n        '\" aria-label=\"Open comments\" title=\"Comments\"><span class=\"dsd-launch-action-icon\" aria-hidden=\"true\">' +\r\n        postActionIcon(\"comment\") +\r\n        '</span><span class=\"dsd-launch-action-text\">Comments</span><span class=\"dsd-launch-action-count\">' +\r\n        Math.max(Number(counts.comments || 0), visibleCommentCount) +\r\n        \"</span></button>\",\r\n      authorUid =\n        post.authorUid || post.ownerUid || profileUidForKey(authorKey) || \"\",\n      authorActionUid = profileActionIdentity(authorUid, authorKey),\n      authorIsSelf = identityMatchesCurrent(authorUid, authorKey),\n      authorProfile = profileByUid(authorUid, authorKey) || {},\n      authorFollowed = currentViewerFollowsProfile(authorUid, authorKey),\n      authorRequested = currentViewerRequestedProfile(authorUid, authorKey),\n      authorFollowLabel =\r\n        profileVisibility(authorProfile) === \"private\"\r\n          ? \"Request follow\"\r\n          : \"Follow\",\r\n      showAuthorFollow =\r\n        canUseSocialActions() &&\n        authorActionUid &&\n        !authorIsSelf &&\n        !relationshipBlockedProfile(authorUid, authorKey) &&\n        !authorFollowed &&\r\n        !authorRequested,\r\n      followAuthorAction = showAuthorFollow\r\n        ? '<button type=\"button\" class=\"dsd-post-author-follow-action\" data-dsd-toggle-follow-profile=\"' +\r\n          html(authorActionUid) +\n          '\" data-profile-key=\"' +\r\n          html(authorKey) +\r\n          '\" aria-label=\"' +\r\n          html(\r\n            authorFollowLabel +\r\n              \" \" +\r\n              publicDisplayName(\r\n                post.authorDisplayName || authorKey || \"member\",\r\n                \"member\",\r\n              ),\r\n          ) +\r\n          '\" title=\"' +\r\n          html(authorFollowLabel) +\r\n          '\" aria-pressed=\"false\"><span class=\"dsd-post-author-follow-label\">' +\r\n          html(authorFollowLabel) +\r\n          \"</span></button>\"\r\n        : \"\",\r\n      actionRow = canUseSocialActions()\n        ? '<footer class=\"dsd-launch-actions\"><div class=\"dsd-post-reaction\" data-dsd-post-reaction-owner=\"canonical\"><button type=\"button\" data-dsd-toggle-post-reactions data-post-id=\"' +\n          html(id) +\n          '\" aria-label=\"' +\n          html(reacted ? reactionLabel(selectedReaction) + \" reaction selected\" : \"Choose a reaction\") +\n          '\" title=\"' +\n          html(reacted ? reactionLabel(selectedReaction) : \"React\") +\n          '\" aria-pressed=\"' +\n          reacted +\n           '\" aria-expanded=\"false\"><span class=\"dsd-post-reaction__selected-emoji\" aria-hidden=\"true\">' +\n           reactionIconHTML(selectedReaction || \"like\") +\n           '</span>' +\n           postReactionSummaryHTML(id, counts.likes || 0) +\n           '</button><div class=\"dsd-post-reaction__tray\" hidden>' +\n          reactionChoices().map(function (reactionType) {\n            return '<button type=\"button\" data-dsd-post-reaction=\"' +\n              html(reactionType) +\n              '\" data-post-id=\"' +\n              html(id) +\n              '\" aria-label=\"' +\n              html(reactionLabel(reactionType)) +\n              ' reaction\" aria-pressed=\"' +\n              (selectedReaction === reactionType ? \"true\" : \"false\") +\n              '\"><span aria-hidden=\"true\">' +\n              reactionIconHTML(reactionType) +\n              '</span>' +\n              postReactionChoiceCountHTML(id, reactionType) +\n              '</button>';\n          }).join(\"\") +\n           '</div>' +\n           \"</div>\" +\n          commentButton +\n          '<button type=\"button\" class=\"dsd-share-button\" data-dsd-action=\"share\" data-dsd-owner=\"LaunchSocialActivation.ShareComposer\" data-post-id=\"' +\n          html(id) +\r\n          '\" aria-label=\"Share post\" title=\"Share\"><span class=\"dsd-launch-action-icon\" aria-hidden=\"true\">' +\r\n          postActionIcon(\"share\") +\r\n          '</span><span class=\"dsd-launch-action-text\">Share</span><span class=\"dsd-launch-action-count\">' +\r\n          (counts.shares || 0) +\r\n          '</span></button><button type=\"button\" data-dsd-action=\"save\" data-post-id=\"' +\r\n          html(id) +\r\n          '\" data-dsd-save-post=\"' +\r\n          html(id) +\r\n          '\" aria-label=\"' +\r\n          (saved ? \"Unsave post\" : \"Save post\") +\r\n          '\" title=\"' +\r\n          (saved ? \"Saved\" : \"Save\") +\r\n          '\" aria-pressed=\"' +\r\n          saved +\r\n          '\"><span class=\"dsd-launch-action-icon\" aria-hidden=\"true\">' +\r\n          postActionIcon(\"save\") +\r\n          '</span><span class=\"dsd-launch-action-text\">' +\r\n          (saved ? \"Saved\" : \"Save\") +\r\n          \"</span></button>\" +\r\n          menuActions +\r\n          \"</footer>\"\r\n        : '<footer class=\"dsd-launch-actions\"><span class=\"dsd-launch-action dsd-post-public-reactions\" aria-label=\"' +\n          html(String(counts.likes || 0) + \" reactions\") +\n          '\"><span class=\"dsd-launch-action-icon\" aria-hidden=\"true\">' +\n          reactionIconHTML(\"like\") +\n          '</span><span class=\"dsd-launch-action-count\">' +\n          Number(counts.likes || 0) +\n          \"</span></span>\" +\n          commentButton +\n          '<button type=\"button\" class=\"dsd-share-button\" data-dsd-action=\"share\" data-post-id=\"' +\n          html(id) +\n          '\" aria-label=\"Share public post\" title=\"Share\"><span class=\"dsd-launch-action-icon\" aria-hidden=\"true\">' +\n          postActionIcon(\"share\") +\n          '</span><span class=\"dsd-launch-action-text\">Share</span><span class=\"dsd-launch-action-count\">' +\n          Number(counts.shares || 0) +\n          \"</span></button>\" +\n          '<a class=\"dsd-launch-action\" href=\"' +\n          loginReturnUrl() +\r\n          '\">Log in to interact</a></footer>',\r\n      body = String(post.body || \"\").trim(),\n      sharedEmbed = sharedPostEmbedHTML(post),\n      scopeBadges =\n        (post.pinned ? \"<span>Pinned</span>\" : \"\") +\n        (post.announcement ? \"<span>Announcement</span>\" : \"\") +\n        (post.postType === \"poll\" ? \"<span>Poll</span>\" : \"\"),\n      poll = postPollHTML(post, !1),\n      authorName = publicDisplayName(post.authorDisplayName || \"User\", \"User\"),\r\n      authorHeader =\r\n        '<div class=\"dsd-post-card__head\">' +\r\n        postAuthorAvatar(post, authorKey) +\r\n        '<div class=\"dsd-post-card__identity\"><div class=\"dsd-post-card__author-row\"><strong><a href=\"' +\n        html(profileRouteHref(authorKey)) +\n        '\">' +\n        html(authorName) +\r\n        \"</a></strong>\" +\r\n        followAuthorAction +\r\n        '</div><a class=\"dsd-post-card__handle\" href=\"' +\r\n        html(profileRouteHref(authorKey)) +\r\n        '\">@' +\r\n        html(publicHandleText(authorKey, authorName, \"member\")) +\r\n        '</a></div><div class=\"dsd-post-card__context\"><time class=\"dsd-post-card__time\" data-dsd-relative-time=\"' +\r\n        html(post.createdAt || post.updatedAt || \"\") +\n        '\">' +\n        html(postTimestamp(post)) +\r\n        \"</time>\" +\r\n        postAudienceBadgeHTML(post) +\r\n        \"</div></div>\",\r\n      commentsOpen = !!state.openCommentPostIds[id];\r\n    return (\r\n      '<article class=\"dsd-post-card' +\r\n      (commentsOpen ? \" dsd402-comments-open\" : \"\") +\r\n      '\" style=\"background:transparent!important;background-color:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important\" id=\"' +\r\n      html(routeAnchorId(\"dsd-post\", id)) +\r\n      '\" data-post-id=\"' +\r\n      html(id) +\r\n      '\" data-dsd-post-status=\"' +\r\n      html(\r\n        post.status || (post.moderation && post.moderation.state) || \"pending\",\r\n      ) +\r\n      '\" data-dsd-media-layout=\"' +\r\n      html(layoutType) +\r\n      '\"' +\r\n      (commentsOpen ? ' data-dsd402-comments-open=\"true\"' : \"\") +\r\n      \">\" +\r\n      authorHeader +\r\n      (scopeBadges\r\n        ? '<div class=\"dsd-post-card__badges\">' + scopeBadges + \"</div>\"\r\n        : \"\") +\r\n      viewCounter +\r\n      (body\r\n        ? '<p class=\"dsd-post-card__body\">' +\r\n          linkify(publicDisplayText(body, \"\")) +\r\n          \"</p>\"\r\n        : \"\") +\r\n      postLinkPreviewHTML(body) +\n      originalsPostReferenceSlot(post) +\r\n      sharedEmbed +\n      poll +\n      '<div class=\"dsd-launch-media-grid dsd-launch-media-grid--' +\r\n      html(layoutType) +\r\n      '\" data-dsd-media-count=\"' +\r\n      html(postMediaItems2.length) +\r\n      '\" data-dsd-media-layout=\"' +\r\n      html(layoutType) +\r\n      '\">' +\r\n      media +\r\n      \"</div>\" +\r\n      actionRow +\r\n      \"</article>\"\r\n    );\r\n  }\r\n  function bindPostMoreMenuActions(root) {\n    function requestPostDelete(button, deleteId) {\r\n      if (!(!button || !deleteId)) {\r\n        if (button.getAttribute(\"data-dsd-confirm-delete\") === \"true\") {\r\n          (button.removeAttribute(\"data-dsd-confirm-delete\"),\r\n            (button.textContent = \"Delete\"),\r\n            deletePost(deleteId));\r\n          return;\r\n        }\r\n        (button.setAttribute(\"data-dsd-confirm-delete\", \"true\"),\r\n          (button.textContent = \"Confirm delete\"),\r\n          renderStatus(\"Select Confirm delete to remove this post.\"),\r\n          window.setTimeout(function () {\r\n            button.getAttribute(\"data-dsd-confirm-delete\") === \"true\" &&\r\n              (button.removeAttribute(\"data-dsd-confirm-delete\"),\r\n              (button.textContent = \"Delete\"));\r\n          }, 5e3));\r\n      }\r\n    }\n    function requestProfilePin(button, displayId, postUuid, action) {\n      if (!button || !postUuid || ![\"pin\", \"unpin\"].includes(action)) return;\n      var replacing =\n          action === \"pin\" &&\n          !hasDsdPlus() &&\n          state.profileFeedPinnedPostId &&\n          state.profileFeedPinnedPostId !== displayId,\n        replacementConfirmed =\n          button.getAttribute(\"data-dsd-confirm-pin-replace\") === \"true\";\n      if (replacing && !replacementConfirmed) {\n        button.setAttribute(\"data-dsd-confirm-pin-replace\", \"true\");\n        button.textContent = \"Confirm replace pinned post\";\n        renderStatus(\"Select Confirm replace pinned post to continue.\");\n        window.setTimeout(function () {\n          button.getAttribute(\"data-dsd-confirm-pin-replace\") === \"true\" &&\n            (button.removeAttribute(\"data-dsd-confirm-pin-replace\"),\n            (button.textContent = \"Pin to profile\"));\n        }, 5e3);\n        return;\n      }\n      button.disabled = !0;\n      button.removeAttribute(\"data-dsd-confirm-pin-replace\");\n      renderStatus(action === \"pin\" ? \"Pinning post\" : \"Removing pinned post\");\n      waitForSupabaseAdapter(\"posts\", \"profilePinMutation\")\n        .then(function (adapter) {\n          return adapter.profilePinMutation(postUuid, action, {\n            replaceConfirmed: replacementConfirmed,\n            idempotencyKey: [\n              \"release-f-profile-pin\",\n              action,\n              postUuid,\n              Date.now(),\n            ].join(\":\"),\n          });\n        })\n        .then(function () {\n          renderStatus(\n            action === \"pin\" ? \"Post pinned to profile.\" : \"Post unpinned.\",\n          );\n          (button.setAttribute(\n            \"data-dsd-profile-pin-action\",\n            action === \"pin\" ? \"unpin\" : \"pin\",\n          ),\n            (button.textContent =\n              action === \"pin\" ? \"Unpin from profile\" : \"Pin to profile\"),\n            (button.disabled = !1));\n          var menu = button.closest(\"details\");\n          menu && menu.removeAttribute(\"open\");\n          return state.profileFeedReload ? state.profileFeedReload() : null;\n        })\n        .catch(function (error) {\n          if (/profile_pin_replace_confirmation_required/.test(\n            String((error && error.message) || error || \"\"),\n          )) {\n            (button.setAttribute(\"data-dsd-confirm-pin-replace\", \"true\"),\n              (button.textContent = \"Confirm replace pinned post\"),\n              (button.disabled = !1),\n              renderStatus(\"Select Confirm replace pinned post to continue.\"));\n            return;\n          }\n          (renderStatus(\n            (error && error.message) || \"Pinned post could not be updated.\",\n          ),\n            (button.disabled = !1));\n        });\n    }\n    qsa(\n      \"[data-dsd-edit-post], [data-dsd-delete-post], [data-dsd-report-post], [data-dsd-profile-pin-post]\",\n      root || document,\n    ).forEach(function (button) {\r\n      button.dataset.dsdPostMenuActionBound !== BUILD &&\r\n        ((button.dataset.dsdPostMenuActionBound = BUILD),\r\n        button.addEventListener(\"click\", function (ev) {\r\n          (ev.preventDefault(), ev.stopPropagation());\r\n          var editId = button.getAttribute(\"data-dsd-edit-post\") || \"\",\n            deleteId = button.getAttribute(\"data-dsd-delete-post\") || \"\",\n            reportId = button.getAttribute(\"data-dsd-report-post\") || \"\",\n            pinId = button.getAttribute(\"data-dsd-profile-pin-post\") || \"\",\n            pinUuid =\n              button.getAttribute(\"data-dsd-profile-pin-post-uuid\") || \"\",\n            pinAction =\n              button.getAttribute(\"data-dsd-profile-pin-action\") || \"\";\n          if (pinId) {\n            requestProfilePin(button, pinId, pinUuid, pinAction);\n            return;\n          }\n          if (editId) {\r\n            var existing =\r\n                state.posts.filter(function (item) {\r\n                  return (item.postId || item.id) === editId;\r\n                })[0] || {},\r\n              body = window.prompt(\"Edit post text\", existing.body || \"\");\r\n            body != null && editPost(editId, { body: body, caption: \"\" });\r\n            return;\r\n          }\r\n          if (deleteId) {\r\n            requestPostDelete(button, deleteId);\r\n            return;\r\n          }\r\n          reportId &&\r\n            openReportModal(\r\n              \"post\",\r\n              reportId,\r\n              \"posts/\" + reportId,\r\n              \"User reported post\",\r\n            );\r\n        }));\r\n    });\r\n  }\r\n  function scheduleRenderPosts(reason) {\r\n    ((renderPostsQueued = !0),\r\n      !renderPostsTimer &&\r\n        ((state.feedDiagnostics.scheduled += 1),\r\n        (renderPostsTimer = window.setTimeout(function () {\r\n          ((renderPostsTimer = null), renderPosts(reason || \"scheduled\"));\r\n        }, 60))));\r\n  }\r\n  function feedRecommendationProfileRows() {\n    var selfKey = normalizedProfileKeyValue(profileKey() || \"\"),\n      rows = (state.feedRecommendationProfiles || []).filter(function (profile) {\n        var key = normalizedProfileKeyValue(\n            profile.profileKey || profile.profile_key || profile.handle || \"\",\n          ),\n          targetUid = profile.uid || profile.userId || \"\";\n        return !!(\n          key &&\n          key !== selfKey &&\n          publicProfileVisible(profile) &&\n          !relationshipBlockedProfile(targetUid, key) &&\n          !currentViewerFollowsProfile(targetUid, key) &&\n          !state.favoritesByUid[targetUid]\n        );\n      });\n    rows.sort(function (a, b) {\n      var aScore =\n          Number(a.mutualCount || 0) * 1000 +\n          Number(a.followerCount || 0) * 5 +\n          Number(a.postCount || 0) +\n          (Date.parse(a.lastActiveAt || a.updatedAt || \"\") || 0) / 1e12,\n        bScore =\n          Number(b.mutualCount || 0) * 1000 +\n          Number(b.followerCount || 0) * 5 +\n          Number(b.postCount || 0) +\n          (Date.parse(b.lastActiveAt || b.updatedAt || \"\") || 0) / 1e12;\n      return bScore - aScore;\n    });\n    return rows.slice(0, 4);\n  }\n  function feedRecommendationStoryRows() {\n    var seenOwners = {};\n    return activeStoryRecords(state.stories || [])\n      .map(publicRenderableStory)\n      .filter(Boolean)\n      .filter(function (story) {\n        var ownerKey = normalizedProfileKeyValue(\n            story.authorProfileKey || story.ownerProfileKey || \"\",\n          ),\n          ownerUid = story.authorUid || story.ownerUid || \"\";\n        if (\n          !ownerKey ||\n          seenOwners[ownerKey] ||\n          relationshipBlockedProfile(ownerUid, ownerKey) ||\n          isRestrictedShellRecord(story)\n        )\n          return !1;\n        seenOwners[ownerKey] = !0;\n        return !0;\n      })\n      .slice(0, 4);\n  }\n  function feedProfileRecommendationModule() {\n    var rows = feedRecommendationProfileRows();\n    if (!rows.length) return \"\";\n    return (\n      '<aside class=\"dsd-feed-recommendation dsd-feed-recommendation--profiles\" data-dsd-feed-recommendation=\"profiles\" aria-label=\"Suggested profiles\"><header><strong>Suggested for you</strong><a href=\"/pages/users\">See Discovery</a></header><div class=\"dsd-feed-recommendation__grid\">' +\n      rows\n        .map(function (profile) {\n          var key = normalizedProfileKeyValue(\n              profile.profileKey || profile.profile_key || profile.handle || \"\",\n            ),\n            targetUid = profile.uid || profile.userId || \"\",\n            name = publicDisplayName(profile.displayName || key, \"DSD member\"),\n            avatarId = canonicalProfileAvatarMediaId(profile),\n            avatar = avatarId\n              ? '<span class=\"dsd-feed-recommendation__avatar\" data-dsd-avatar-media-id=\"' +\n                html(avatarId) +\n                '\"></span>'\n              : '<span class=\"dsd-feed-recommendation__avatar dsd-feed-recommendation__avatar--fallback\">' +\n                html(initials(name)) +\n                \"</span>\";\n          return (\n            '<article><a class=\"dsd-feed-recommendation__profile\" href=\"' +\n            html(profileRouteHref(key)) +\n            '\">' +\n            avatar +\n            '<span><strong>' +\n            html(name) +\n            \"</strong><small>@\" +\n            html(publicHandleText(key, name, \"member\")) +\n            \"</small></span></a>\" +\n            (hasCustomer()\n              ? '<button type=\"button\" data-dsd-follow-profile=\"' +\n                html(targetUid) +\n                '\" data-profile-key=\"' +\n                html(key) +\n                '\">Follow</button>'\n              : '<a class=\"dsd-feed-recommendation__login\" href=\"' +\n                loginReturnUrl() +\n                '\">Log in</a>') +\n            \"</article>\"\n          );\n        })\n        .join(\"\") +\n      \"</div></aside>\"\n    );\n  }\n  function feedStoryRecommendationModule() {\n    var rows = feedRecommendationStoryRows();\n    if (!rows.length) return \"\";\n    return (\n      '<aside class=\"dsd-feed-recommendation dsd-feed-recommendation--stories\" data-dsd-feed-recommendation=\"stories\" aria-label=\"Suggested stories\"><header><strong>Stories you may like</strong><a href=\"/pages/stories\">See stories</a></header><div class=\"dsd-feed-recommendation__stories dsd-story385__tray\">' +\r\n      rows\n        .map(function (story) {\n          story = hydrateRecordIdentity(story || {});\n          var id = story.storyId || story.id || \"\",\n            profile = profileForRecordIdentity(story) || {},\n            key = profile.profileKey || profile.handle || story.authorProfileKey || story.ownerProfileKey || \"\",\n            name = publicDisplayName(profile.displayName || story.authorDisplayName || key, \"Story\"),\n            avatarId = canonicalProfileAvatarMediaId(profile) || story.authorAvatarMediaId || story.ownerAvatarMediaId || \"\",\n            firstMedia = safeMediaItemsForRecord(story)[0] || {},\n            firstKind = String(firstMedia.kind || firstMedia.mediaKind || firstMedia.contentType || \"image\").toLowerCase(),\n            mediaKind = firstKind.indexOf(\"video\") !== -1 ? \"video\" : \"image\",\r\n            media = readableMediaId(firstMedia)\r\n              ? '<figure class=\"dsd-story385__media\"' +\r\n                mediaReadAttrs(firstMedia) +\r\n                ' data-dsd-media-kind=\"' +\r\n                html(mediaKind) +\r\n                '\"></figure>'\r\n              : '<span class=\"dsd-story385__media dsd-story385__media--fallback\">' +\r\n                html(initials(name)) +\r\n                \"</span>\",\r\n            profileHref = profileRouteHref(key),\r\n            avatar = avatarId\r\n              ? '<a class=\"dsd-story385__poster\" data-dsd-story-profile-link href=\"' +\r\n                html(profileHref) +\r\n                '\" data-dsd-avatar-media-id=\"' +\r\n                html(avatarId) +\r\n                '\" aria-label=\"View ' +\r\n                html(name) +\r\n                ' profile\"></a>'\r\n              : '<a class=\"dsd-story385__poster dsd-story385__poster--fallback\" data-dsd-story-profile-link href=\"' +\r\n                html(profileHref) +\r\n                '\" aria-label=\"View ' +\r\n                html(name) +\r\n                ' profile\">' +\r\n                html(initials(name)) +\r\n                \"</a>\",\r\n            caption = storyReferenceExcerpt(story.body || story.caption || \"\");\n          return (\n            '<article role=\"button\" tabindex=\"0\" class=\"dsd-feed-recommendation__story-card dsd-story385__story dsd-story385__tray-card\" data-dsd-view-story=\"' +\r\n            html(id) +\n            '\" aria-label=\"Open story from ' +\n            html(name) +\n            '\">' +\r\n            media +\r\n            avatar +\r\n            \"<strong>\" +\r\n            html(name) +\n            \"</strong>\" +\r\n            (caption ? \"<em>\" + html(caption) + \"</em>\" : \"\") +\n            \"</article>\"\r\n          );\n        })\n        .join(\"\") +\n      \"</div></aside>\"\n    );\n  }\n  function feedHtmlWithRecommendations(posts) {\n    var profileModule = feedProfileRecommendationModule(),\n      storyModule = feedStoryRecommendationModule(),\n      htmlRows = [];\n    (posts || []).forEach(function (post, index) {\n      htmlRows.push(postCard(post));\n      index === 3 && profileModule && htmlRows.push(profileModule);\n      index === 11 && storyModule && htmlRows.push(storyModule);\n    });\n    return htmlRows.join(\"\");\n  }\n  function feedRecommendationSignature() {\n    return (\n      feedRecommendationProfileRows()\n        .map(function (profile) {\n          return normalizedProfileKeyValue(\n            profile.profileKey || profile.profile_key || profile.handle || \"\",\n          );\n        })\n        .join(\",\") +\n      \":\" +\n      feedRecommendationStoryRows()\n        .map(function (story) {\n          story = hydrateRecordIdentity(story || {});\r\n          var profile = profileForRecordIdentity(story) || {},\r\n            firstMedia = safeMediaItemsForRecord(story)[0] || {};\r\n          return [\r\n            story.storyId || story.id || \"\",\r\n            readableMediaId(firstMedia),\r\n            firstMedia.kind || firstMedia.mediaKind || firstMedia.contentType || \"\",\r\n            canonicalProfileAvatarMediaId(profile) ||\r\n              story.authorAvatarMediaId ||\r\n              story.ownerAvatarMediaId ||\r\n              \"\",\r\n          ].join(\"|\");\r\n        })\n        .join(\",\")\n    );\n  }\n  function renderPosts(reason) {\n    if (renderPostsBusy) {\r\n      scheduleRenderPosts(reason || \"busy\");\r\n      return;\r\n    }\r\n    ((renderPostsBusy = !0),\r\n      (renderPostsQueued = !1),\r\n      (state.feedDiagnostics.renders += 1));\r\n    try {\r\n      var feed = qs(\"#dsd-feed-container\"),\r\n        approved = function (p) {\r\n          return (\r\n            p.status === \"approved\" ||\r\n            (p.moderation && p.moderation.state === \"approved\")\r\n          );\r\n        },\r\n        classifiedVisible2 = function (p) {\r\n          return canViewClassified(p) && canViewPrivateRecord(p);\r\n        },\r\n        commentHydrationPosts = [];\r\n      if ((hydrateViewerReactionsForPosts(state.posts), feed)) {\r\n        var surface = feed.getAttribute(\"data-dsd-feed-surface\") || \"\",\r\n          feedList = feed,\n          publicPosts = state.posts.map(publicRenderablePost).filter(Boolean),\n          mainFilter = state.feedFilter || \"all\";\n        canUseSocialActions() &&\n          (publicPosts = publicPosts.filter(function (p) {\n            var authorUid = p.authorUid || p.ownerUid || \"\",\n              authorKey = p.authorProfileKey || p.ownerProfileKey || \"\";\n            return !relationshipBlockedProfile(authorUid, authorKey);\n          }));\n        (qsa(\"[data-dsd-feed-filter]\").forEach(function (btn) {\n          var active =\r\n            (btn.getAttribute(\"data-dsd-feed-filter\") || \"all\") === mainFilter;\r\n          (btn.classList.toggle(\"is-active\", active),\r\n            btn.setAttribute(\"aria-pressed\", active ? \"true\" : \"false\"));\r\n        }),\r\n          mainFilter === \"media\"\r\n            ? (publicPosts = publicPosts.filter(function (p) {\r\n                return (p.media || []).length > 0;\r\n              }))\r\n            : mainFilter === \"following\" &&\r\n              (publicPosts = publicPosts.filter(function (p) {\r\n                var authorUid = p.authorUid || p.ownerUid || \"\",\r\n                  authorKey = p.authorProfileKey || p.ownerProfileKey || \"\";\r\n                return (\r\n                  currentViewerFollowsProfile(authorUid, authorKey) ||\r\n                  !!state.favoritesByUid[authorUid]\r\n                );\r\n              })),\r\n          (publicPosts = sortByCreatedAtDesc(publicPosts).slice(0, 100)));\r\n        var feedHtml = publicPosts.length\n          ? feedHtmlWithRecommendations(publicPosts)\n          : '<article class=\"dsd-feed368__empty\"><strong>No approved posts yet</strong><span>Approved public posts appear here when available.</span></article>';\r\n        (replaceHtmlIfChanged(\r\n          feedList,\r\n          \"feed:\" +\r\n            surface +\r\n            \":\" +\n            renderSignature(publicPosts) +\n            \":comments:\" +\n            commentRenderSignature(publicPosts) +\n            \":recommendations:\" +\n            feedRecommendationSignature(),\n          feedHtml,\r\n        ),\r\n          hydrateAvatarMedia(feedList),\r\n          hydrateMediaReads(feedList),\r\n          (commentHydrationPosts = commentHydrationPosts.concat(publicPosts)));\r\n      }\r\n      var profileList = qs(\"[data-dsd-profile-feed-list]\");\r\n      if (profileList) {\r\n        var targetIdentity = profileContentTargetIdentity(),\r\n          targetUid = targetIdentity.targetUid,\r\n          targetProfile = targetIdentity.profile || {},\r\n          targetKey = targetIdentity.targetKey,\r\n          privateBlocked = !canViewProfileContent(targetProfile),\r\n          mine =\n            privateBlocked || !targetIdentity.ready\n              ? []\n              : state.profileFeedPosts\n                  .map(function (p) {\n                    var rendered = publicRenderablePost(p);\n                    return rendered &&\r\n                      recordBelongsToProfile(\r\n                        rendered,\r\n                        targetUid,\r\n                        targetKey,\r\n                        \"authorUid\",\r\n                      )\r\n                      ? rendered\r\n                      : null;\r\n                  })\n                  .filter(Boolean);\n        var profileContentQuery = String(state.profileContentSearch || \"\")\r\n          .trim()\r\n          .toLowerCase();\r\n        profileContentQuery &&\r\n          (mine = mine.filter(function (post) {\r\n            return (\r\n              publicDisplayText(post.body || post.caption || \"\", \"\")\r\n                .toLowerCase()\r\n                .indexOf(profileContentQuery) !== -1\r\n            );\r\n          }));\r\n        mine = mine.slice(0, 100);\r\n        var privateShell = profileRestrictedAccessShellHTML(\n            targetProfile,\n            \"post\",\n          ),\n          profileEmptyCopy =\n            state.profileFeedFilter === \"photos\"\n              ? \"No photos yet\"\n              : state.profileFeedFilter === \"videos\"\n                ? \"No videos yet\"\n                : \"No profile posts yet\",\n          profileFeedHtml = privateBlocked\n            ? privateShell\n            : mine.length\n              ? mine.map(postCard).join(\"\")\n              : state.profileFeedLoading\n                ? '<article class=\"dsd-up315__post dsd-profile-feed-state\" role=\"status\"><strong>Loading profile posts</strong></article>'\n                : state.profileFeedError\n                  ? '<article class=\"dsd-up315__post dsd-profile-feed-state\" role=\"alert\"><strong>Profile posts could not load</strong><button type=\"button\" data-dsd-profile-feed-retry>Retry</button></article>'\n                  : '<article class=\"dsd-up315__post dsd-profile-feed-state\" role=\"status\"><strong>' +\n                    html(profileEmptyCopy) +\n                    \"</strong></article>\";\n        (replaceHtmlIfChanged(\n          profileList,\n          \"profile:\" +\r\n            targetUid +\r\n            \":\" +\r\n            targetKey +\r\n            \":\" +\n            (privateBlocked\n              ? profileRestrictionType(targetProfile) || \"restricted\"\n              : renderSignature(mine)) +\n            \":filter:\" +\r\n            state.profileFeedFilter +\n            \":search:\" +\r\n            profileContentQuery +\r\n            \":pin:\" +\n            state.profileFeedPinnedPostId +\n            \":loading:\" +\n            state.profileFeedLoading +\n            \":error:\" +\n            !!state.profileFeedError +\n            \":comments:\" +\n            commentRenderSignature(mine),\n          profileFeedHtml,\n        ),\n          hydrateAvatarMedia(profileList),\n          hydrateMediaReads(profileList),\n          (commentHydrationPosts = commentHydrationPosts.concat(mine)),\n          qsa(\"[data-dsd-profile-feed-retry]\", profileList).forEach(\n            function (button) {\n              button.dataset.dsdReleaseFRetryBound !== BUILD &&\n                ((button.dataset.dsdReleaseFRetryBound = BUILD),\n                button.addEventListener(\"click\", function () {\n                  state.profileFeedReload && state.profileFeedReload();\n                }));\n            },\n          ));\n      }\n      (renderProfileMediaProjection(qs(\"[data-dsd-user-profile]\")),\n        recordPostViews(commentHydrationPosts),\n        hydratePostComments(commentHydrationPosts.slice(0, 12)),\r\n        bindPostMoreMenuActions(document),\r\n        qsa('[data-dsd-profile-content-tab=\"posts\"] strong').forEach(\r\n          function (n) {\r\n            var targetIdentity2 = profileContentTargetIdentity(),\r\n              targetUid2 = targetIdentity2.targetUid,\r\n              targetProfile2 = targetIdentity2.profile || {},\r\n              targetKey2 = targetIdentity2.targetKey,\r\n              visibleCountPosts =\r\n                !canViewProfileContent(targetProfile2) || !targetIdentity2.ready\r\n                  ? []\r\n                  : state.posts\r\n                      .map(function (p) {\r\n                        var rendered = publicRenderablePost(p);\r\n                        return rendered &&\r\n                          recordBelongsToProfile(\r\n                            rendered,\r\n                            targetUid2,\r\n                            targetKey2,\r\n                            \"authorUid\",\r\n                          )\r\n                          ? rendered\r\n                          : null;\r\n                      })\r\n                      .filter(Boolean);\r\n            n.textContent = String(visibleCountPosts.length);\r\n          },\r\n        ),\r\n        renderRelationships(),\r\n        focusRequestedPost(),\r\n        focusRequestedComment());\r\n    } finally {\r\n      ((renderPostsBusy = !1),\r\n        renderPostsQueued && scheduleRenderPosts(\"queued-after-render\"));\r\n      try {\r\n        (document.documentElement.setAttribute(\r\n          \"data-dsd-feed-render-count\",\r\n          String(state.feedDiagnostics.renders),\r\n        ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-feed-comment-listeners\",\r\n            String(state.feedDiagnostics.commentListeners || 0),\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-feed-comment-loads\",\r\n            String(state.feedDiagnostics.commentLoads || 0),\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-feed-comment-load-results\",\r\n            String(state.feedDiagnostics.commentLoadResults || 0),\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-feed-comment-load-errors\",\r\n            String(state.feedDiagnostics.commentLoadErrors || 0),\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-feed-last-comment-load\",\r\n            String(state.feedDiagnostics.lastCommentLoad || \"\"),\r\n          ),\r\n          document.documentElement.setAttribute(\r\n            \"data-dsd-feed-media-hydrations\",\r\n            String(state.feedDiagnostics.mediaHydrationRequests || 0),\r\n          ));\r\n      } catch (e) {}\r\n    }\r\n  }\r\n  function profileKeyFromRecord(profile) {\r\n    return nonPlaceholderProfileKey(\r\n      (profile &&\r\n        (profile.profileKey ||\r\n          profile.profile_key ||\r\n          profile.handle ||\r\n          profile.username ||\r\n          \"\")) ||\r\n        \"\",\r\n    );\r\n  }\r\n  function notificationProfileRecord(n) {\n    n = n || {};\n    if (\n      state.notificationProxyCanonical &&\n      (n.actorDisplayName ||\n        n.actorProfileKey ||\n        n.actorHandle ||\n        n.actorAvatarMediaId)\n    )\n      return {\n        uid: n.actorUid || \"\",\n        userId: n.actorUid || \"\",\n        profileKey: n.actorProfileKey || n.actorHandle || \"\",\n        handle: n.actorHandle || n.actorProfileKey || \"\",\n        displayName: n.actorDisplayName || \"DSD member\",\n        avatarMediaId: n.actorAvatarMediaId || \"\",\n        headerMediaId: n.actorHeaderMediaId || \"\",\n      };\n    var targetUid =\n        n.actorUid || n.authorUid || n.sourceUid || n.ownerUid || \"\",\r\n      targetKey = nonPlaceholderProfileKey(\r\n        n.actorProfileKey ||\r\n          n.authorProfileKey ||\r\n          n.sourceProfileKey ||\r\n          n.ownerProfileKey ||\r\n          n.profileKey ||\r\n          n.actorHandle ||\r\n          n.authorHandle ||\r\n          n.sourceHandle ||\r\n          n.ownerHandle ||\r\n          n.handle ||\r\n          \"\",\r\n      ),\r\n      profile =\n        profileByUid(targetUid, targetKey) ||\n        publicProfileByIdentity(targetUid || targetKey) ||\n        publicProfileByKey(targetKey);\n    profile &&\n      !notificationSelfAlert(n) &&\n      (identityMatchesCurrent(targetUid, targetKey) ||\n        normalizedProfileKeyValue(profileKeyFromRecord(profile)) ===\n          normalizedProfileKeyValue(activeProfileKeyValue() || profileKey())) &&\n      (profile = null);\n    if (!profile) {\r\n      var hrefProfile = \"\";\r\n      try {\r\n        var hrefUrl = new URL(String(n.href || \"\"), window.location.origin);\r\n        hrefProfile = nonPlaceholderProfileKey(\r\n          hrefUrl.searchParams.get(\"profile\") || \"\",\r\n        );\r\n      } catch (e) {}\n      hrefProfile &&\n        (profile = publicProfileByKey(hrefProfile));\n    }\n    if (!profile) {\n      var text = String(\n        [n.actorDisplayName, n.authorDisplayName, n.title, n.body]\n          .filter(Boolean)\n          .join(\" \"),\n        ).toLowerCase(),\n        identityText = text.replace(/[^a-z0-9]+/g, \"\");\n      profile =\n        (state.publicProfiles || []).filter(function (item) {\n          var key = normalizedProfileKeyValue(\n              (item &&\n                (item.profileKey || item.handle || item.profile_key || \"\")) ||\n                \"\",\n            ),\n            name = clean((item && item.displayName) || \"\", \"\").toLowerCase(),\n            keyIdentity = key.replace(/[^a-z0-9]+/g, \"\"),\n            nameIdentity = name.replace(/[^a-z0-9]+/g, \"\");\n          return (\n            (key && text.indexOf(key) !== -1) ||\n            (name && text.indexOf(name) !== -1) ||\n            (keyIdentity.length >= 3 &&\n              identityText.indexOf(keyIdentity) !== -1) ||\n            (nameIdentity.length >= 3 &&\n              identityText.indexOf(nameIdentity) !== -1)\n          );\n        })[0] || null;\n    }\r\n    return (\r\n      !profile &&\n        notificationSelfAlert(n) &&\n        ((targetUid && identityMatchesCurrent(targetUid, targetKey)) ||\n          (!targetUid &&\n            !targetKey &&\n            /^your\\b/i.test(String(n.body || n.title || \"\")))) &&\n        (profile = state.profile || {}),\r\n      profile || null\r\n    );\r\n  }\r\n  function notificationTargetHref(n, cat) {\r\n    n = n || {};\r\n    var postId = String(\r\n        n.postId || n.targetPostId || n.sourcePostId || \"\",\r\n      ).trim(),\r\n      commentId = String(\r\n        n.commentId || n.targetCommentId || n.sourceCommentId || \"\",\r\n      ).trim(),\r\n      storyId = String(\r\n        n.storyId || n.targetStoryId || n.sourceStoryId || \"\",\r\n      ).trim(),\r\n      conversationId = String(\r\n        n.conversationId || n.targetConversationId || \"\",\r\n      ).trim(),\r\n      actorProfileRecord = notificationProfileRecord(n),\r\n      actorProfileKey = nonPlaceholderProfileKey(\r\n        profileKeyFromRecord(actorProfileRecord) ||\r\n          n.actorProfileKey ||\r\n          n.authorProfileKey ||\r\n          n.sourceProfileKey ||\r\n          n.ownerProfileKey ||\r\n          \"\",\r\n      ),\r\n      targetProfileKey = nonPlaceholderProfileKey(\r\n        n.targetProfileKey || n.profileKey || \"\",\r\n      ),\r\n      profileKey2 = \"\",\r\n      targetUidValue = String(\r\n        n.targetUid ||\r\n          n.actorUid ||\r\n          n.authorUid ||\r\n          n.sourceUid ||\r\n          n.ownerUid ||\r\n          \"\",\r\n      ).trim(),\r\n      sourcePath = String(\r\n        n.sourcePath || n.path || n.firestorePath || \"\",\r\n      ).trim(),\r\n      sourceMatch,\r\n      notificationSelfTarget = notificationSelfAlert(n);\r\n    (!postId &&\r\n      sourcePath &&\r\n      ((sourceMatch = sourcePath.match(/(?:^|\\/)posts\\/([^\\/?#]+)/i)),\r\n      sourceMatch && (postId = sourceMatch[1] || \"\")),\r\n      !commentId &&\r\n        sourcePath &&\r\n        ((sourceMatch = sourcePath.match(/(?:^|\\/)comments\\/([^\\/?#]+)/i)),\r\n        sourceMatch && (commentId = sourceMatch[1] || \"\")),\r\n      !storyId &&\r\n        sourcePath &&\r\n        ((sourceMatch = sourcePath.match(/(?:^|\\/)stories\\/([^\\/?#]+)/i)),\r\n        sourceMatch && (storyId = sourceMatch[1] || \"\")));\r\n    var href = String(n.href || \"\").trim(),\r\n      explicitHref = \"\";\r\n    if (href && !/\\/pages\\/notifications(?:$|[?#])/.test(href))\r\n      try {\r\n        var explicitUrl = new URL(href, window.location.origin);\r\n        if (\n          /\\/pages\\/feed(?:$|[/?#])/.test(\n            explicitUrl.pathname + explicitUrl.search,\n          )\n        )\n          ((postId = postId || explicitUrl.searchParams.get(\"post\") || \"\"),\n            (commentId =\n              commentId ||\n              explicitUrl.searchParams.get(\"comment\") ||\n              ((explicitUrl.hash || \"\").match(/^#comment-([a-z0-9-]+)$/i) || [])[1] ||\n              \"\"),\n            (explicitHref =\n              explicitUrl.pathname + explicitUrl.search + explicitUrl.hash));\n        else if (\r\n          /\\/pages\\/stories(?:$|[/?#])/.test(\r\n            explicitUrl.pathname + explicitUrl.search,\r\n          )\r\n        )\r\n          ((storyId = storyId || explicitUrl.searchParams.get(\"story\") || \"\"),\r\n            (explicitHref = storyId\r\n              ? \"/pages/feed?story=\" + encodeURIComponent(storyId)\r\n              : \"/pages/feed?story=open\"));\r\n        else if (\n          /\\/pages\\/messages(?:$|[/?#])/.test(\n            explicitUrl.pathname + explicitUrl.search,\n          )\n        )\r\n          ((conversationId =\r\n            conversationId ||\r\n            explicitUrl.searchParams.get(\"conversationId\") ||\r\n            \"\"),\r\n            (explicitHref =\n              explicitUrl.pathname + explicitUrl.search + explicitUrl.hash));\n        else if (\n          /\\/pages\\/users(?:$|[/?#])/.test(\n            explicitUrl.pathname + explicitUrl.search,\n          )\n        ) {\n          var connectionProfile = nonPlaceholderProfileKey(\n            explicitUrl.searchParams.get(\"connection\") || \"\",\n          );\n          explicitHref = connectionProfile\n            ? profileRouteHref(connectionProfile)\n            : explicitUrl.pathname + explicitUrl.search + explicitUrl.hash;\n        }\n        else if (\n          /\\/pages\\/user-profile(?:$|[/?#])/.test(\n            explicitUrl.pathname + explicitUrl.search,\n          )\n        ) {\r\n          var hrefProfile = nonPlaceholderProfileKey(\r\n              explicitUrl.searchParams.get(\"profile\") || \"\",\r\n            ),\r\n            ownProfileKey = nonPlaceholderProfileKey(\r\n              profileKeyFromRecord(actorProfileRecord) ||\r\n                activeProfileKeyValue() ||\r\n                profileKey2() ||\r\n                (state.profile &&\r\n                  (state.profile.profileKey || state.profile.handle)) ||\r\n                \"\",\r\n            );\r\n          hrefProfile\n            ? (explicitHref = /^\\d+$/.test(hrefProfile)\r\n                ? \"/pages/users\"\r\n                : profileRouteHref(hrefProfile))\r\n            : notificationSelfTarget && ownProfileKey\r\n              ? (explicitHref = profileRouteHref(ownProfileKey))\r\n              : placeholderProfileKey(\r\n                  explicitUrl.searchParams.get(\"profile\") || \"\",\r\n                ) &&\r\n                (explicitHref = \"/pages/users\");\r\n        }\r\n      } catch (e) {}\r\n    if (\r\n      (!profileKey2 &&\r\n        sourcePath &&\r\n        ((sourceMatch = sourcePath.match(\r\n          /(?:^|\\/)(?:publicProfiles|profiles)\\/([^\\/?#]+)/i,\r\n        )),\r\n        sourceMatch &&\r\n          (profileKey2 = nonPlaceholderProfileKey(sourceMatch[1] || \"\"))),\r\n      postId && commentId)\r\n    )\r\n      return postCommentPermalink(postId, commentId);\r\n    if (postId) return postPermalink(postId);\r\n    if (storyId) return \"/pages/feed?story=\" + encodeURIComponent(storyId);\r\n    if (conversationId || cat === \"messages\")\r\n      return (\r\n        \"/pages/messages\" +\r\n        (conversationId\r\n          ? \"?conversationId=\" + encodeURIComponent(conversationId)\r\n          : \"\")\r\n      );\r\n    if (explicitHref) return explicitHref;\r\n    var notificationText = String(\r\n        [n.actorDisplayName, n.authorDisplayName, n.title, n.body]\r\n          .filter(Boolean)\r\n          .join(\" \"),\r\n      ).toLowerCase(),\r\n      actorFromText =\r\n        (state.publicProfiles || []).filter(function (item) {\r\n          var itemKey = clean(\r\n              (item &&\r\n                (item.profileKey || item.handle || item.profile_key || \"\")) ||\r\n                \"\",\r\n              \"\",\r\n            ).toLowerCase(),\r\n            itemName = clean(\r\n              (item && item.displayName) || \"\",\r\n              \"\",\r\n            ).toLowerCase();\r\n          return (\r\n            (itemKey && notificationText.indexOf(itemKey) !== -1) ||\r\n            (itemName && notificationText.indexOf(itemName) !== -1)\r\n          );\r\n        })[0] || null,\r\n      selfAlert = notificationSelfTarget,\r\n      actorDriven =\r\n        /comment|follow|reaction|liked|saved|shared|mentioned|message/i.test(\r\n          String(n.title || \"\") +\r\n            \" \" +\r\n            String(n.body || \"\") +\r\n            \" \" +\r\n            String(cat || \"\"),\r\n        );\r\n    if (selfAlert)\r\n      return \"/pages/user-profile\";\r\n    if (\r\n      (!profileKey2 &&\r\n        actorDriven &&\r\n        (profileKey2 = nonPlaceholderProfileKey(\r\n          actorProfileKey ||\r\n            (actorFromText &&\r\n              (actorFromText.profileKey || actorFromText.handle)) ||\r\n            \"\",\r\n        )),\r\n      profileKey2 || (profileKey2 = targetProfileKey || actorProfileKey),\r\n      !profileKey2)\r\n    ) {\r\n      var actorUidValue = String(\r\n          n.actorUid || n.authorUid || n.sourceUid || n.ownerUid || \"\",\r\n        ).trim(),\r\n        actorProfile = profileByUid(\r\n          actorUidValue,\r\n          n.actorProfileKey ||\r\n            n.authorProfileKey ||\r\n            n.sourceProfileKey ||\r\n            n.ownerProfileKey ||\r\n            \"\",\r\n        );\r\n      profileKey2 = nonPlaceholderProfileKey(\r\n        (actorProfile && (actorProfile.profileKey || actorProfile.handle)) ||\r\n          \"\",\r\n      );\r\n    }\r\n    if (!profileKey2) {\r\n      var profileText = String(\r\n        n.actorHandle ||\r\n          n.authorHandle ||\r\n          n.sourceHandle ||\r\n          n.ownerHandle ||\r\n          n.targetHandle ||\r\n          n.handle ||\r\n          n.username ||\r\n          n.profile ||\r\n          \"\",\r\n      ).replace(/^@+/, \"\");\r\n      profileKey2 = nonPlaceholderProfileKey(profileText);\r\n    }\r\n    var routedProfile =\r\n      actorProfileRecord ||\r\n      profileByUid(targetUidValue, profileKey2 || \"\") ||\r\n      publicProfileByIdentity(targetUidValue || profileKey2 || \"\") ||\r\n      publicProfileByKey(profileKey2 || \"\");\r\n    if (\r\n      ((profileKey2 = nonPlaceholderProfileKey(\r\n        profileKeyFromRecord(routedProfile) || profileKey2,\r\n      )),\r\n      profileKey2)\r\n    )\r\n      return profileRouteHref(profileKey2);\r\n    if (href && !/\\/pages\\/notifications(?:$|[?#])/.test(href)) {\r\n      try {\r\n        var hrefUrl = new URL(href, window.location.origin);\r\n        if (\r\n          /\\/pages\\/user-profile(?:$|[/?#])/.test(\r\n            hrefUrl.pathname + hrefUrl.search,\r\n          )\r\n        ) {\r\n          var hrefProfile = nonPlaceholderProfileKey(\n            hrefUrl.searchParams.get(\"profile\") || \"\",\n          );\n          return hrefProfile && !/^\\d+$/.test(hrefProfile)\n            ? profileRouteHref(hrefProfile)\n            : \"/pages/users\";\r\n        }\r\n      } catch (e) {}\r\n      return \"/pages/notifications\";\n    }\r\n    return \"/pages/notifications\";\r\n  }\r\n  function setDockBadge(selector, count) {\r\n    var value = Number(count || 0),\r\n      label = value > 99 ? \"99+\" : String(value);\r\n    qsa(selector).forEach(function (n) {\r\n      ((n.textContent = label), (n.hidden = value === 0));\r\n    });\r\n  }\r\n  function notificationNotExpiredRecord(n) {\r\n    var expires = n && (n.expiresAt || n.expires_at || \"\");\r\n    if (!expires) return !0;\r\n    var expiresMs = Date.parse(expires);\r\n    return !expiresMs || expiresMs > Date.now();\r\n  }\r\n  function notificationSelfAlert(n) {\r\n    var text = (\r\n      ((n && n.title) || \"\") +\r\n      \" \" +\r\n      ((n && n.body) || \"\")\r\n    ).toLowerCase();\n    return (\n      /profile saved|profile is active|item saved to your profile|your profile|your account|your story is live|story published|safety request submitted|your safety request/.test(\n        text,\n      )\n    );\n  }\r\n  function notificationDedupeKey(n) {\r\n    return (\r\n      (n = n || {}),\r\n      [\r\n        notificationCategory(n),\r\n        clean(n.title || \"\", \"\").toLowerCase(),\r\n        clean(n.body || \"\", \"\").toLowerCase(),\r\n        clean(\r\n          notificationTargetHref(n, notificationCategory(n)) || n.href || \"\",\r\n          \"\",\r\n        ).toLowerCase(),\r\n        clean(\r\n          n.actorProfileKey ||\r\n            n.authorProfileKey ||\r\n            n.sourceProfileKey ||\r\n            n.ownerProfileKey ||\r\n            n.targetProfileKey ||\r\n            n.profileKey ||\r\n            \"\",\r\n          \"\",\r\n        ).toLowerCase(),\r\n      ].join(\"|\")\r\n    );\r\n  }\r\n  function notificationDedupeScore(n) {\n    return (\r\n      (n = n || {}),\r\n      (n.read ? 0 : 1e15) +\r\n        valueMillis(\r\n          n.updatedAt || n.createdAt || n.created_at || n.updated_at,\r\n        ) +\r\n        (n.actorDisplayName || n.actorProfileKey || n.actorHandle ? 1e3 : 0) +\n        notificationPreviewMediaIds(n).length * 100\r\n    );\r\n  }\r\n  function notificationPreviewMediaIds(n) {\r\n    var out = [];\r\n    ([\"previewMedia\", \"contentMedia\", \"media\"].forEach(function (key) {\r\n      var value = n && n[key];\r\n      Array.isArray(value) &&\r\n        value.forEach(function (item) {\r\n          var id =\r\n            readableMediaId(item) ||\r\n            (item && (item.mediaId || item.id)) ||\r\n            (typeof item == \"string\" ? item : \"\");\r\n          id && out.push(id);\r\n        });\r\n    }),\r\n      [\"contentMediaId\", \"mediaId\", \"thumbnailMediaId\"].forEach(function (key) {\r\n        n && n[key] && out.push(n[key]);\r\n      }));\r\n    var seen = {};\r\n    return out.filter(function (id) {\r\n      return (\r\n        (id = String(id || \"\").trim()),\r\n        !id || seen[id] ? !1 : ((seen[id] = !0), !0)\r\n      );\r\n    });\r\n  }\r\n  function notificationActorLabel(n) {\n    var profile = notificationProfileRecord(n) || {};\n    return publicDisplayName(\n      n.actorDisplayName ||\n        profile.displayName ||\n        profile.profileKey ||\r\n        profile.handle ||\r\n        n.actorDisplayName ||\r\n        n.authorDisplayName ||\r\n        n.sourceDisplayName ||\r\n        n.actorProfileKey ||\r\n        n.authorProfileKey ||\r\n        n.sourceProfileKey ||\r\n        \"\",\r\n      \"DSD member\",\r\n    );\r\n  }\r\n  function notificationActionFamily(n, cat) {\r\n    var text = (\r\n      ((n && n.title) || \"\") +\r\n      \" \" +\r\n      ((n && n.body) || \"\") +\r\n      \" \" +\r\n      (cat || \"\") +\r\n      \" \" +\r\n      ((n && (n.type || n.sourceType || n.source_type)) || \"\")\r\n    ).toLowerCase();\r\n    return /\\b(followed|follow request|started following|relationship)\\b/.test(\r\n      text,\r\n    )\r\n      ? \"follow\"\r\n      : /\\b(liked|reaction|reacted|favorite|favorited)\\b/.test(text)\r\n        ? \"reaction\"\r\n        : /\\b(saved|bookmark)\\b/.test(text)\r\n          ? \"save\"\r\n          : /\\b(commented|comment|replied|reply)\\b/.test(text)\r\n            ? \"reply\"\r\n            : /\\b(mentioned|mention)\\b/.test(text)\r\n              ? \"mention\"\r\n              : /\\b(story viewed|viewed your story|story activity)\\b/.test(text)\r\n                ? \"story\"\r\n                : /\\b(sent an update|posted|post is live|story published|story is live|profile saved|profile is active)\\b/.test(\r\n                      text,\r\n                    )\r\n                  ? \"content\"\r\n                  : \"\";\r\n  }\r\n  function notificationGroupCopy(family) {\r\n    return family === \"follow\"\r\n      ? \"followed you\"\r\n      : family === \"reaction\"\r\n        ? \"reacted to your content\"\r\n        : family === \"save\"\r\n          ? \"saved your content\"\r\n          : family === \"reply\"\r\n            ? \"replied to your content\"\r\n            : family === \"mention\"\r\n              ? \"mentioned you\"\r\n              : family === \"story\"\r\n                ? \"interacted with your story\"\r\n                : family === \"content\"\r\n                  ? \"updated content\"\r\n                  : \"interacted with your content\";\r\n  }\r\n  function notificationAggregateKey(n) {\r\n    var cat = notificationCategory(n),\r\n      family = notificationActionFamily(n, cat),\r\n      href = notificationTargetHref(n, cat);\r\n    return !href ||\r\n      /\\/pages\\/notifications(?:$|[?#])/.test(href) ||\r\n      (!family &&\r\n        /^system$/i.test(cat) &&\r\n        /\\/pages\\/user-profile(?:$|[?#])/.test(href) &&\r\n        (family = \"content\"),\r\n      !family) ||\r\n      /^(messages|requests|safety|founder|moderation|account|security)$/i.test(\r\n        cat,\r\n      ) ||\r\n      (/^system$/i.test(cat) &&\r\n        !/^(content|follow|reaction|save|reply|mention|story)$/.test(family))\r\n      ? \"\"\r\n      : [cat, family, href].join(\"|\");\r\n  }\r\n  function aggregateNotifications(items) {\r\n    var out = [],\r\n      buckets = {};\r\n    return (\r\n      (items || []).forEach(function (item) {\r\n        var key = notificationAggregateKey(item);\r\n        if (!key) {\r\n          out.push(item);\r\n          return;\r\n        }\r\n        (buckets[key] || (buckets[key] = []), buckets[key].push(item));\r\n      }),\r\n      Object.keys(buckets).forEach(function (key) {\r\n        var group = buckets[key].slice().sort(function (a, b) {\r\n          return notificationDedupeScore(b) - notificationDedupeScore(a);\r\n        });\r\n        if (group.length < 2) {\r\n          out.push(group[0]);\r\n          return;\r\n        }\r\n        var representative = Object.assign({}, group[0]),\r\n          cat = notificationCategory(representative),\r\n          family = notificationActionFamily(representative, cat),\r\n          actors = [];\r\n        group.forEach(function (item) {\r\n          var label = notificationActorLabel(item);\r\n          label && actors.indexOf(label) === -1 && actors.push(label);\r\n        });\r\n        var firstActor = actors[0] || \"DSD member\",\r\n          others = Math.max(0, actors.length - 1);\r\n        ((representative.notificationGroupCount = group.length),\r\n          (representative.notificationGroupedActors = actors.slice(0, 5)),\r\n          (representative.notificationGroupFamily = family),\r\n          (representative.title =\r\n            firstActor +\r\n            (others\r\n              ? \" and \" + others + \" other\" + (others === 1 ? \"\" : \"s\")\r\n              : \"\") +\r\n            \" \" +\r\n            notificationGroupCopy(family)),\r\n          (representative.body =\r\n            representative.body || group.length + \" related updates\"),\r\n          (representative.read = group.every(function (item) {\r\n            return !!item.read;\r\n          })),\r\n          (representative.createdAt = group.reduce(\r\n            function (value, item) {\r\n              var next =\r\n                (item &&\r\n                  (item.createdAt ||\r\n                    item.created_at ||\r\n                    item.updatedAt ||\r\n                    item.updated_at)) ||\r\n                \"\";\r\n              return valueMillis(next) > valueMillis(value) ? next : value;\r\n            },\r\n            representative.createdAt ||\r\n              representative.created_at ||\r\n              representative.updatedAt ||\r\n              representative.updated_at ||\r\n              \"\",\r\n          )),\r\n          out.push(representative));\r\n      }),\r\n      out.sort(function (a, b) {\r\n        return (\r\n          valueMillis(\r\n            b && (b.createdAt || b.created_at || b.updatedAt || b.updated_at),\r\n          ) -\r\n          valueMillis(\r\n            a && (a.createdAt || a.created_at || a.updatedAt || a.updated_at),\r\n          )\r\n        );\r\n      })\r\n    );\r\n  }\r\n  function dedupeNotifications(items) {\r\n    var out = [],\r\n      indexByKey = {};\r\n    return (\r\n      (items || []).forEach(function (item) {\r\n        var key = notificationDedupeKey(item);\r\n        if (!key) {\r\n          out.push(item);\r\n          return;\r\n        }\r\n        if (indexByKey[key] === void 0) {\r\n          ((indexByKey[key] = out.length), out.push(item));\r\n          return;\r\n        }\r\n        var index = indexByKey[key];\r\n        notificationDedupeScore(item) >= notificationDedupeScore(out[index]) &&\r\n          (out[index] = item);\r\n      }),\r\n      out.sort(function (a, b) {\r\n        return (\r\n          valueMillis(\r\n            b && (b.createdAt || b.created_at || b.updatedAt || b.updated_at),\r\n          ) -\r\n          valueMillis(\r\n            a && (a.createdAt || a.created_at || a.updatedAt || a.updated_at),\r\n          )\r\n        );\r\n      })\r\n    );\r\n  }\r\n  function notificationRecordIsNewer(candidate, current) {\r\n    var candidateTime = valueMillis(\r\n        candidate &&\r\n          (candidate.updatedAt ||\r\n            candidate.updated_at ||\r\n            candidate.createdAt ||\r\n            candidate.created_at),\r\n      ),\r\n      currentTime = valueMillis(\r\n        current &&\r\n          (current.updatedAt ||\r\n            current.updated_at ||\r\n            current.createdAt ||\r\n            current.created_at),\r\n      );\r\n    if (candidateTime !== currentTime) return candidateTime > currentTime;\r\n    if (!!(candidate && candidate.read) !== !!(current && current.read))\r\n      return !!(candidate && candidate.read);\r\n    return notificationDedupeScore(candidate) >= notificationDedupeScore(current);\r\n  }\r\n  function canonicalNotificationRows(items) {\r\n    var rowsById = {},\r\n      unkeyed = [];\r\n    return (\r\n      (items || []).forEach(function (item) {\r\n        var id = String(\r\n          (item && (item.id || item.notificationId || item.notification_id)) ||\r\n            \"\",\r\n        ).trim();\r\n        if (!id) {\r\n          unkeyed.push(item);\r\n          return;\r\n        }\r\n        var current = rowsById[id];\r\n        (!current || notificationRecordIsNewer(item, current)) &&\r\n          (rowsById[id] = item);\r\n      }),\r\n      Object.keys(rowsById)\r\n        .map(function (id) {\r\n          return rowsById[id];\r\n        })\r\n        .concat(dedupeNotifications(unkeyed))\r\n    );\r\n  }\r\n  function updateNotificationDockBadge(items) {\r\n    if (!hasCustomer()) {\r\n      ((state.notificationCounts = { total: 0, unread: 0, founder: 0 }),\r\n        setDockBadge(\"[data-dsd-notification-unread-count]\", 0),\r\n        setDockBadge(\"[data-dsd-message-unread-count]\", 0));\r\n      return;\r\n    }\r\n    if (state.inboxCounts && state.inboxCounts.ready) {\n      state.notificationCounts = {\n        total: state.notificationCounts.total || (state.notifications || []).length,\n        unread: state.inboxCounts.notificationUnread,\n        founder: state.inboxCounts.founderUnread,\r\n      };\r\n      setDockBadge(\r\n        \"[data-dsd-notification-unread-count]\",\r\n        state.inboxCounts.notificationUnread,\r\n      );\n      return;\n    }\n    setDockBadge(\"[data-dsd-notification-unread-count]\", 0);\n  }\r\n  function notificationIsMessageItem(item) {\r\n    var text = String(\r\n      (item &&\r\n        (item.category ||\r\n          item.type ||\r\n          item.sourceType ||\r\n          item.source_type ||\r\n          item.title ||\r\n          item.body ||\r\n          item.href)) ||\r\n        \"\",\r\n    ).toLowerCase();\r\n    return (\r\n      /\\b(message|conversation|direct)\\b/.test(text) ||\r\n      /\\/pages\\/messages(?:$|[?#])/.test(String((item && item.href) || \"\"))\r\n    );\r\n  }\r\n  function notificationConversationToken(item) {\r\n    for (\r\n      var values = [\r\n          item && (item.conversationId || item.conversation_id),\r\n          item && (item.sourceId || item.source_id),\r\n          item && item.targetId,\r\n          item && item.href,\r\n        ],\r\n        i = 0;\r\n      i < values.length;\r\n      i++\r\n    ) {\r\n      var raw = String(values[i] || \"\").trim();\r\n      if (raw) {\r\n        try {\r\n          var parsed = new URL(raw, window.location.origin),\r\n            token =\r\n              parsed.searchParams.get(\"conversationId\") ||\r\n              parsed.searchParams.get(\"conversation\") ||\r\n              parsed.searchParams.get(\"thread\");\r\n          if (token) return token;\r\n        } catch (e) {}\r\n        if (\r\n          /conversation/i.test(raw) ||\r\n          uuidLike(raw) ||\r\n          /^direct-|^group-/i.test(raw)\r\n        )\r\n          return raw;\r\n      }\r\n    }\r\n    return \"\";\r\n  }\r\n  function unreadMessageNotificationCount(conversation) {\r\n    var cidValues = conversation\r\n      ? [\r\n          conversation.conversationId,\r\n          conversation.id,\r\n          conversation.supabaseConversationId,\r\n          conversation.legacyConversationId,\r\n          conversation.legacy_conversation_id,\r\n        ]\r\n          .map(function (value) {\r\n            return String(value || \"\").trim();\r\n          })\r\n          .filter(Boolean)\r\n      : [];\r\n    return (state.notifications || []).filter(function (item) {\r\n      if (\r\n        !item ||\r\n        item.read ||\r\n        !publicRecordVisible(item) ||\r\n        !notificationNotExpiredRecord(item) ||\r\n        !notificationIsMessageItem(item)\r\n      )\r\n        return !1;\r\n      if (!cidValues.length) return !0;\r\n      var token = notificationConversationToken(item);\r\n      return token ? cidValues.indexOf(String(token || \"\").trim()) !== -1 : !1;\r\n    }).length;\r\n  }\r\n  function conversationUnreadCount(conversation) {\n    if (state.inboxCounts && state.inboxCounts.ready) {\n      var canonicalUnread = state.inboxUnreadByConversation || {},\n        canonicalIds = [\n          conversation && conversation.conversationId,\n          conversation && conversation.id,\n          conversation && conversation.legacyConversationId,\n          conversation && conversation.legacy_conversation_id,\n        ],\n        canonicalValue = 0;\n      canonicalIds.some(function (id) {\n        id = String(id || \"\").trim();\n        if (!id || !Object.prototype.hasOwnProperty.call(canonicalUnread, id))\n          return !1;\n        canonicalValue = Math.max(0, Number(canonicalUnread[id]) || 0);\n        return !0;\n      });\n      return canonicalValue;\n    }\n    for (\n      var explicitKeys = [\"unreadCount\", \"unread\", \"unread_count\"], i = 0;\r\n      conversation && i < explicitKeys.length;\r\n      i++\r\n    )\r\n      if (\r\n        Object.prototype.hasOwnProperty.call(conversation, explicitKeys[i]) &&\r\n        conversation[explicitKeys[i]] !== null &&\r\n        conversation[explicitKeys[i]] !== \"\"\r\n      )\r\n        return Math.max(0, Number(conversation[explicitKeys[i]]) || 0);\r\n    return unreadMessageNotificationCount(conversation);\n  }\n  function mapConversationShortcuts() {\n    if (!hasCustomer() || !canUseSocialActions()) return [];\n    var seen = {};\n    return (state.conversations || [])\n      .filter(function (conversation) {\n        return !!(\n          conversation &&\n          conversationType(conversation) === \"direct\" &&\n          conversationParticipantMatch(conversation) &&\n          directConversationHasPeer(conversation) &&\n          !conversationBlocked(conversation) &&\n          !conversation.deleted_at &&\n          !conversation.archived_at &&\n          isNormalContentRecord(conversation)\n        );\n      })\n      .sort(function (left, right) {\n        return conversationActivityMillis(right) - conversationActivityMillis(left);\n      })\n      .map(function (conversation) {\n        var peer = conversationPeer(conversation),\n          key = normalizedProfileKeyValue(peer && peer.key),\n          conversationId = String(\n            conversation.conversationId || conversation.id || \"\",\n          ).trim();\n        if (!key || !conversationId || seen[key]) return null;\n        seen[key] = !0;\n        var unread = conversationUnreadCount(conversation);\n        return {\n          profileKey: key,\n          label: unread > 0 ? \"New message\" : \"Continue conversation\",\n          unreadCount: unread,\n          href:\n            \"/pages/messages?conversationId=\" +\n            encodeURIComponent(conversationId),\n        };\n      })\n      .filter(Boolean)\n      .slice(0, 3);\n  }\n  function updateMessageDockBadge(items) {\r\n    if (!hasCustomer()) {\r\n      setDockBadge(\"[data-dsd-message-unread-count]\", 0);\r\n      return;\r\n    }\r\n    if (state.inboxCounts && state.inboxCounts.ready) {\n      setDockBadge(\n        \"[data-dsd-message-unread-count]\",\n        state.inboxCounts.messageUnread,\n      );\n      return;\n    }\n    setDockBadge(\"[data-dsd-message-unread-count]\", 0);\n  }\n  var CONNECTION_INTENT_OPTIONS = [\n    [\"friends\", \"Friends\"], [\"chat\", \"Chat\"], [\"dating\", \"Dating\"],\n    [\"casual\", \"Casual\"], [\"going_out\", \"Going Out\"], [\"networking\", \"Networking\"],\n    [\"show_me_around\", \"Show Me Around\"], [\"relationship\", \"Relationship\"], [\"other\", \"Other\"],\n  ];\n  function connectionIntentLabel(value) {\n    var match = CONNECTION_INTENT_OPTIONS.filter(function (item) { return item[0] === value; })[0];\n    return match ? match[1] : \"\";\n  }\n  function connectionSettingsHTML() {\n    var prefs = state.connectionPreferences || {},\n      hasHiddenSelections = Array.isArray(prefs.connectionIntents) && prefs.connectionIntents.length > 0 && prefs.connectionIntentsVisible !== !0;\n    return '<fieldset class=\"dsd-connection-settings\" data-dsd-connection-settings><legend>Connections</legend><p>Choose up to five ways you are open to connecting. Selected intents are shown only to signed-in members.</p><div class=\"dsd-connection-settings__intents\">' +\n      CONNECTION_INTENT_OPTIONS.map(function (item) {\n        return '<label><input type=\"checkbox\" name=\"connectionIntent\" value=\"' + html(item[0]) + '\"> ' + html(item[1]) + '</label>';\n      }).join(\"\") +\n      '</div>' +\n      (hasHiddenSelections ? '<label class=\"dsd-connection-settings__publication-confirm\"><input type=\"checkbox\" name=\"confirmIntentPublication\"> Confirm these previously hidden selections may be shown to signed-in members.</label>' : '') +\n      '<label>Right Now<input name=\"rightNowStatus\" maxlength=\"120\" placeholder=\"Open to coffee, a walk, or conversation\"></label><div class=\"dsd-connection-settings__row\"><label>Keep active<select name=\"rightNowMinutes\"><option value=\"60\">1 hour</option><option value=\"120\">2 hours</option><option value=\"240\">4 hours</option></select></label><label><input type=\"checkbox\" name=\"rightNowVisible\"> Show Right Now status</label></div><button type=\"button\" data-dsd-save-connection-settings>Save connections</button><output data-dsd-connection-settings-status aria-live=\"polite\"></output></fieldset>';\n  }\n  function syncConnectionSettings(root) {\n    var prefs = state.connectionPreferences || {};\n    qsa(\"[data-dsd-connection-settings]\", root || document).forEach(function (fieldset) {\n      var selected = Array.isArray(prefs.connectionIntents) ? prefs.connectionIntents : [];\n      qsa('input[name=\"connectionIntent\"]', fieldset).forEach(function (field) {\n        field.checked = selected.indexOf(field.value) !== -1;\n      });\n      var rightNow = qs('input[name=\"rightNowStatus\"]', fieldset),\n        rightNowVisible = qs('input[name=\"rightNowVisible\"]', fieldset);\n      rightNow && document.activeElement !== rightNow && (rightNow.value = prefs.rightNowStatus || \"\");\n      rightNowVisible && (rightNowVisible.checked = prefs.rightNowVisible === !0);\n    });\n  }\n  function normalizedDiscoveryFilter(value) {\n    value = String(value || \"all\").trim().toLowerCase();\n    return [\"all\", \"verified\", \"dsdplus\", \"nearby\"].indexOf(value) !== -1\n      ? value\n      : \"all\";\n  }\n  function canonicalDiscoveryFilter() {\n    return normalizedDiscoveryFilter(state.discoveryCanonicalFilter || \"all\");\n  }\n  function syncCanonicalDiscoveryFilter(root) {\n    var filter = canonicalDiscoveryFilter();\n    qsa(\"[data-dsd-users311-filter]\", root || document).forEach(function (button) {\n      button.classList.toggle(\n        \"is-active\",\n        button.getAttribute(\"data-dsd-users311-filter\") === filter,\n      );\n      button.setAttribute(\n        \"aria-pressed\",\n        button.getAttribute(\"data-dsd-users311-filter\") === filter\n          ? \"true\"\n          : \"false\",\n      );\n    });\n    qsa('[name=\"discoveryProfileFilter\"]', root || document).forEach(\n      function (field) {\n        field.value = filter;\n      },\n    );\n    qsa(\"[data-dsd-users311]\", root || document).forEach(function (surface) {\n      surface.dataset.dsdDiscoveryFilter = filter;\n    });\n  }\n  function setCanonicalDiscoveryFilter(value, root) {\n    var nextFilter = normalizedDiscoveryFilter(value);\n    canonicalDiscoveryFilter() !== nextFilter && (state.connectionShuffleIndex = 0);\n    state.discoveryCanonicalFilter = nextFilter;\n    syncCanonicalDiscoveryFilter(root || document);\n    return state.discoveryCanonicalFilter;\n  }\n  function discoveryProfileVerified(profile) {\n    return !!(profile && profile.verified === !0);\n  }\n  function connectionRowsForCanonicalFilter(rows) {\n    var filter = canonicalDiscoveryFilter();\n    return (rows || []).filter(function (row) {\n      if (filter === \"verified\") {\n        var profile = publicProfileByKey(\n          normalizedProfileKeyValue(row && (row.profileKey || row.handle || \"\")),\n        );\n        return discoveryProfileVerified(profile);\n      }\n      if (filter === \"dsdplus\") return row && row.dsdPlus === !0;\n      if (filter === \"nearby\")\n        return !!nearbyDistanceLabel(row);\n      return !0;\n    });\n  }\n  function connectionDiscoveryControlsHTML() {\n    var prefs = state.connectionPreferences || {},\n      premium = state.connectionDiscoveryDsdPlus === !0,\n      profileFilter = canonicalDiscoveryFilter(),\n      selected = Array.isArray(prefs.radarIntentFilters) ? prefs.radarIntentFilters : [],\n      passportSummary = prefs.passportActive\n        ? ([prefs.passportCity, prefs.passportState].filter(Boolean).join(\", \") || \"Passport active\")\n        : \"Current location\",\n      activityCount = [prefs.radarUseRadiusFilter, prefs.radarRightNowOnly, prefs.radarRecentlyActiveOnly, prefs.radarDsdPlusOnly].filter(Boolean).length,\n      activitySummary = activityCount ? activityCount + \" active\" : \"No activity filters\",\n      intentSummary = selected.length ? selected.length + \" selected\" : \"Any connection\",\n      presetSummary = prefs.radarSavedPresetName || \"No saved preset\";\n    return '<div class=\"dsd-connection-discovery__toolbar\" aria-label=\"Connection discovery modes\">' +\n      '<div class=\"dsd-connection-discovery__modes\"><button type=\"button\" data-dsd-connection-mode=\"radar\" class=\"' + (state.connectionDiscoveryMode === \"radar\" ? \"is-active\" : \"\") + '\">Radar</button><button type=\"button\" data-dsd-connection-mode=\"shuffle\" class=\"' + (state.connectionDiscoveryMode === \"shuffle\" ? \"is-active\" : \"\") + '\">Shuffle</button><button type=\"button\" data-dsd-connection-mode=\"connections\" class=\"' + (state.connectionDiscoveryMode === \"connections\" ? \"is-active\" : \"\") + '\">Connections</button></div>' +\n      '<details class=\"dsd-connection-discovery__filters\"><summary>Filters</summary>' +\n      (premium\n        ? '<div class=\"dsd-connection-discovery__filter-grid\">' +\n          '<details class=\"dsd-connection-discovery__filter-group\" data-dsd-filter-group=\"profile\"><summary><span><strong>Profile set</strong><small data-dsd-filter-summary=\"profile\">' + html(profileFilter === \"dsdplus\" ? \"DSD+\" : profileFilter.charAt(0).toUpperCase() + profileFilter.slice(1)) + '</small></span></summary><fieldset><legend class=\"visually-hidden\">Profile set</legend><label>Show<select name=\"discoveryProfileFilter\"><option value=\"all\"' + (profileFilter === \"all\" ? \" selected\" : \"\") + '>All Users</option><option value=\"verified\"' + (profileFilter === \"verified\" ? \" selected\" : \"\") + '>Verified</option><option value=\"dsdplus\"' + (profileFilter === \"dsdplus\" ? \" selected\" : \"\") + '>DSD+</option><option value=\"nearby\"' + (profileFilter === \"nearby\" ? \" selected\" : \"\") + '>Nearby</option></select></label><small>This is the same profile filter shown above the Discovery grid.</small></fieldset></details>' +\n          '<details class=\"dsd-connection-discovery__filter-group\" data-dsd-filter-group=\"location\"><summary><span><strong>Location &amp; Passport</strong><small data-dsd-filter-summary=\"location\">' + html(passportSummary) + '</small></span></summary><fieldset><legend class=\"visually-hidden\">Location and Passport</legend><label><input type=\"checkbox\" name=\"passportActive\"' + (prefs.passportActive ? \" checked\" : \"\") + '> Explore another city</label><label>City<input name=\"passportCity\" maxlength=\"80\" value=\"' + html(prefs.passportCity || \"\") + '\"></label><label>State<input name=\"passportState\" maxlength=\"40\" value=\"' + html(prefs.passportState || \"\") + '\"></label><small>Passport changes only your exploration context. It never changes hometown or active location.</small></fieldset></details>' +\n          '<details class=\"dsd-connection-discovery__filter-group\" data-dsd-filter-group=\"activity\"><summary><span><strong>Activity &amp; Distance</strong><small data-dsd-filter-summary=\"activity\">' + html(activitySummary) + '</small></span></summary><fieldset><legend class=\"visually-hidden\">Activity and Distance</legend><label><input type=\"checkbox\" name=\"radarUseRadiusFilter\"' + (prefs.radarUseRadiusFilter ? \" checked\" : \"\") + '> Limit by radius</label><label>Radius<select name=\"radarRadiusMiles\">' + [5,10,25,50,100].map(function (miles) { return '<option value=\"' + miles + '\"' + (Number(prefs.radarRadiusMiles || 50) === miles ? \" selected\" : \"\") + '>' + miles + ' miles</option>'; }).join(\"\") + '</select></label><label><input type=\"checkbox\" name=\"radarRightNowOnly\"' + (prefs.radarRightNowOnly ? \" checked\" : \"\") + '> Right Now only</label><label><input type=\"checkbox\" name=\"radarRecentlyActiveOnly\"' + (prefs.radarRecentlyActiveOnly ? \" checked\" : \"\") + '> Recently active only</label><label><input type=\"checkbox\" name=\"radarDsdPlusOnly\"' + (prefs.radarDsdPlusOnly ? \" checked\" : \"\") + '> DSD+ profiles only</label></fieldset></details>' +\n          '<details class=\"dsd-connection-discovery__filter-group\" data-dsd-filter-group=\"intent\"><summary><span><strong>Connection Intent</strong><small data-dsd-filter-summary=\"intent\">' + html(intentSummary) + '</small></span></summary><fieldset class=\"dsd-connection-discovery__intents\"><legend class=\"visually-hidden\">Connection Intent</legend>' + CONNECTION_INTENT_OPTIONS.map(function (item) { return '<label><input type=\"checkbox\" name=\"radarIntentFilter\" value=\"' + html(item[0]) + '\"' + (selected.indexOf(item[0]) !== -1 ? \" checked\" : \"\") + '> ' + html(item[1]) + '</label>'; }).join(\"\") + '</fieldset></details>' +\n          '<details class=\"dsd-connection-discovery__filter-group\" data-dsd-filter-group=\"presets\"><summary><span><strong>Advanced &amp; Presets</strong><small data-dsd-filter-summary=\"presets\">' + html(presetSummary) + '</small></span></summary><fieldset><legend class=\"visually-hidden\">Advanced and Presets</legend><label>Preset name<input name=\"radarSavedPresetName\" maxlength=\"40\" value=\"' + html(prefs.radarSavedPresetName || \"\") + '\" placeholder=\"My local mix\"></label></fieldset></details>' +\n          '</div><button type=\"button\" data-dsd-save-discovery-settings>Save discovery settings</button><output data-dsd-discovery-settings-status aria-live=\"polite\"></output>'\n        : '<div class=\"dsd-connection-discovery__filter-grid\"><details class=\"dsd-connection-discovery__filter-group\" data-dsd-filter-group=\"activity\" open><summary><span><strong>Activity &amp; Distance</strong><small data-dsd-filter-summary=\"activity\">' + html(activitySummary) + '</small></span></summary><fieldset><legend class=\"visually-hidden\">Activity and Distance</legend><label><input type=\"checkbox\" name=\"radarUseRadiusFilter\"' + (prefs.radarUseRadiusFilter ? \" checked\" : \"\") + '> Limit by radius</label><label>Radius<select name=\"radarRadiusMiles\">' + [5,10,25,50,100].map(function (miles) { return '<option value=\"' + miles + '\"' + (Number(prefs.radarRadiusMiles || 50) === miles ? \" selected\" : \"\") + '>' + miles + ' miles</option>'; }).join(\"\") + '</select></label><label><input type=\"checkbox\" name=\"radarRecentlyActiveOnly\"' + (prefs.radarRecentlyActiveOnly ? \" checked\" : \"\") + '> Active within 48 hours</label></fieldset></details></div><button type=\"button\" data-dsd-save-discovery-settings>Save discovery settings</button><output data-dsd-discovery-settings-status aria-live=\"polite\"></output><p>Passport, intent filters, Right Now, DSD+ profile filtering, and saved presets are DSD+ enhancements.</p><a href=\"/products/dsd\">View DSD+</a>') +\n      '</details></div>';\n  }\n  function updateDiscoveryFilterSummaries(root) {\n    if (!root) return;\n    var profileFilter = normalizedDiscoveryFilter((qs('[name=\"discoveryProfileFilter\"]', root) || {}).value || canonicalDiscoveryFilter()),\n      passportActive = !!((qs('input[name=\"passportActive\"]', root) || {}).checked),\n      passportCity = String((qs('input[name=\"passportCity\"]', root) || {}).value || \"\").trim(),\n      passportState = String((qs('input[name=\"passportState\"]', root) || {}).value || \"\").trim(),\n      activeCount = ['radarUseRadiusFilter', 'radarRightNowOnly', 'radarRecentlyActiveOnly', 'radarDsdPlusOnly'].filter(function (name) {\n        return !!((qs('input[name=\"' + name + '\"]', root) || {}).checked);\n      }).length,\n      intentCount = qsa('input[name=\"radarIntentFilter\"]:checked', root).length,\n      presetName = String((qs('input[name=\"radarSavedPresetName\"]', root) || {}).value || \"\").trim(),\n      profileSummary = qs('[data-dsd-filter-summary=\"profile\"]', root),\n      locationSummary = qs('[data-dsd-filter-summary=\"location\"]', root),\n      activitySummary = qs('[data-dsd-filter-summary=\"activity\"]', root),\n      intentSummary = qs('[data-dsd-filter-summary=\"intent\"]', root),\n      presetSummary = qs('[data-dsd-filter-summary=\"presets\"]', root);\n    profileSummary && (profileSummary.textContent = profileFilter === \"dsdplus\" ? \"DSD+\" : profileFilter.charAt(0).toUpperCase() + profileFilter.slice(1));\n    locationSummary && (locationSummary.textContent = passportActive ? ([passportCity, passportState].filter(Boolean).join(\", \") || \"Passport active\") : \"Current location\");\n    activitySummary && (activitySummary.textContent = activeCount ? activeCount + \" active\" : \"No activity filters\");\n    intentSummary && (intentSummary.textContent = intentCount ? intentCount + \" selected\" : \"Any connection\");\n    presetSummary && (presetSummary.textContent = presetName || \"No saved preset\");\n  }\n  function connectionShuffleCard(row) {\n    if (state.connectionShuffleComplete === !0)\n      return '<div class=\"dsd-connection-shuffle__empty is-complete\"><strong>You reached the end of Shuffle</strong><p>Review mutual Waves and Interest in Connections, or return to Radar for another look.</p><button type=\"button\" data-dsd-shuffle-connections>View Connections</button></div>';\n    if (!row) return '<div class=\"dsd-connection-shuffle__empty\"><strong>No eligible profiles</strong><p>Adjust your Radar+ filters or try again later.</p><button type=\"button\" data-dsd-shuffle-connections>View Connections</button></div>';\n    var key = row.profileKey || row.handle || \"\",\n      intents = Array.isArray(row.connectionIntents) ? row.connectionIntents : [],\n      context = [],\n      distanceLabel = nearbyDistanceLabel(row);\n    distanceLabel && context.push(distanceLabel);\n    row.recentlyActive && context.push(\"Active recently\");\n    row.hasActiveStory && context.push(\"Story available\");\n    return '<article class=\"dsd-connection-shuffle__card\" data-profile-key=\"' + html(key) + '\" data-dsd-shuffle-banner-contract=\"canonical-cover\"><div class=\"dsd-connection-shuffle__media\"' + (row.bannerMediaId ? ' data-dsd-cover-media-id=\"' + html(row.bannerMediaId) + '\"' : \"\") + '><span class=\"dsd-connection-shuffle__avatar\"' + (row.avatarMediaId ? ' data-dsd-avatar-media-id=\"' + html(row.avatarMediaId) + '\"' : \"\") + '>' + html(initials(row.displayName || key)) + '</span></div><div class=\"dsd-connection-shuffle__identity\"><strong>' + html(publicDisplayName(row.displayName || key, \"DSD member\")) + '</strong><span>@' + html(publicHandleText(key, row.displayName || \"\", \"member\")) + '</span>' +\n      (row.locationCity ? '<small>' + html([row.locationCity, row.locationState].filter(Boolean).join(\", \")) + '</small>' : \"\") +\n      (row.bio ? '<p class=\"dsd-connection-shuffle__bio\">' + html(publicDisplayText(row.bio, \"\")) + '</p>' : \"\") +\n      (context.length ? '<div class=\"dsd-connection-shuffle__context\" aria-label=\"Matchmaking context\">' + context.map(function (item) { return '<span>' + html(item) + '</span>'; }).join(\"\") + '</div>' : \"\") +\n      (row.rightNowStatus ? '<p><b>Right Now</b> ' + html(row.rightNowStatus) + '</p>' : \"\") +\n      (intents.length ? '<div class=\"dsd-connection-radar__intents\">' + intents.map(function (intent) { return '<span>' + html(connectionIntentLabel(intent)) + '</span>'; }).join(\"\") + '</div>' : \"\") + '</div><div class=\"dsd-connection-shuffle__actions\">' +\n      connectionSignalButton(\"wave\", row, key) + connectionSignalButton(\"interested\", row, key) +\n      '<button type=\"button\" data-dsd-shuffle-back' + (state.connectionShuffleIndex > 0 ? \"\" : ' disabled aria-disabled=\"true\"') + '>Back</button><button type=\"button\" data-dsd-shuffle-next>Next</button>' +\n      '<a class=\"dsd-users311__map-link\" href=\"/pages/users?discovery=map&amp;profile=' + encodeURIComponent(key) + '\" aria-label=\"Show ' + html(row.displayName || key || \"profile\") + ' on map\" title=\"Show on map\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M12 21s6-5.1 6-11a6 6 0 1 0-12 0c0 5.9 6 11 6 11Zm0-8.5A2.5 2.5 0 1 1 12 7a2.5 2.5 0 0 1 0 5.5Z\"></path></svg></a><a href=\"' + profileRouteHref(key) + '\">View Profile</a><details class=\"dsd-connection-secondary-menu dsd-connection-secondary-menu--shuffle\"><summary aria-label=\"More Shuffle actions\">More</summary><label class=\"dsd-connection-icebreaker\"><span>Private note</span><input data-dsd-wave-icebreaker maxlength=\"180\" placeholder=\"Add a private note\"></label></details></div></article>';\r\n  }\n  function closeConnectionShuffle() {\n    state.connectionShuffleOpen = !1;\n    state.connectionShuffleComplete = !1;\n    document.documentElement.classList.remove(\"dsd-connection-shuffle-open\");\n    renderConnectionSurfaces();\n  }\n  function moveConnectionShuffle(direction) {\n    var rows = connectionRowsForCanonicalFilter(state.connectionShuffleRows || []);\n    if (direction > 0) {\n      if (state.connectionShuffleIndex >= rows.length - 1)\n        state.connectionShuffleComplete = !0;\n      else state.connectionShuffleIndex += 1;\n    } else {\n      state.connectionShuffleComplete = !1;\n      state.connectionShuffleIndex = Math.max(0, state.connectionShuffleIndex - 1);\n    }\n    renderConnectionSurfaces();\n  }\n  function openConnectionShuffle() {\n    state.connectionDiscoveryMode = \"shuffle\";\n    state.connectionShuffleOpen = !0;\n    state.connectionShuffleComplete = !1;\n    state.connectionShuffleIndex = 0;\n    renderConnectionSurfaces();\n    return loadConnectionPresence(!0, \"shuffle\");\n  }\n  function bindConnectionShuffleGestures(layer) {\n    if (!layer || layer.dataset.dsdShuffleGestures === BUILD) return;\n    layer.dataset.dsdShuffleGestures = BUILD;\n    var start = null;\n    layer.addEventListener(\"touchstart\", function (event) {\n      if (event.target.closest(\"button, a, input, textarea, select, summary\")) {\n        start = null;\n        return;\n      }\n      var touch = event.touches && event.touches[0];\n      start = touch ? { x: touch.clientX, y: touch.clientY } : null;\n    }, { passive: !0 });\n    layer.addEventListener(\"touchend\", function (event) {\n      if (!start) return;\n      var touch = event.changedTouches && event.changedTouches[0];\n      if (!touch) return;\n      var dx = touch.clientX - start.x,\n        dy = touch.clientY - start.y;\n      start = null;\n      if (Math.abs(dx) > 56 && Math.abs(dx) > Math.abs(dy))\n        moveConnectionShuffle(dx < 0 ? 1 : -1);\n    }, { passive: !0 });\n  }\n  document.addEventListener(\"dsd:open-connection-shuffle\", openConnectionShuffle);\n  function syncConnectionShuffleLayer() {\n    var root = canonicalOverlayRoot(),\n      layers = qsa(\".dsd-connection-shuffle__fullscreen\", document),\n      activeLayer =\n        layers.filter(function (layer) {\n          return !!layer.closest(\"[data-dsd-connection-radar]\");\n        })[0] ||\n        layers[0] ||\n        null;\n    layers.forEach(function (layer) {\n      if (layer === activeLayer && state.connectionShuffleOpen === !0) {\n        layer.setAttribute(\"data-dsd-connection-shuffle-layer\", BUILD);\n        layer.setAttribute(\"data-dsd-owner\", \"ConnectionShuffleController\");\n        root.contains(layer) || root.appendChild(layer);\n        bindConnectionShuffleGestures(layer);\n      } else layer.remove();\n    });\n    if (!state.connectionShuffleOpen)\n      qsa(\"[data-dsd-connection-shuffle-layer]\", root).forEach(function (layer) {\n        layer.remove();\n      });\n    document.documentElement.classList.toggle(\n      \"dsd-connection-shuffle-open\",\n      !!activeLayer,\n    );\n    scheduleGlobalOverlayStateSync();\n  }\n  function saveConnectionDiscoverySettings(root) {\n    if (!root) return Promise.resolve(null);\n    setCanonicalDiscoveryFilter(\n      (qs('[name=\"discoveryProfileFilter\"]', root) || {}).value || canonicalDiscoveryFilter(),\n      document,\n    );\n    var status = qs(\"[data-dsd-discovery-settings-status]\", root),\n      button = qs(\"[data-dsd-save-discovery-settings]\", root),\n      payload = {\n        action: \"save_discovery\",\n        passportActive: !!((qs('input[name=\"passportActive\"]', root) || {}).checked),\n        passportCity: (qs('input[name=\"passportCity\"]', root) || {}).value || \"\",\n        passportState: (qs('input[name=\"passportState\"]', root) || {}).value || \"\",\n        radarUseRadiusFilter: !!((qs('input[name=\"radarUseRadiusFilter\"]', root) || {}).checked),\n        radarRadiusMiles: Number((qs('select[name=\"radarRadiusMiles\"]', root) || {}).value || 50),\n        radarIntentFilters: qsa('input[name=\"radarIntentFilter\"]:checked', root).map(function (field) { return field.value; }).slice(0, 5),\n        radarRightNowOnly: !!((qs('input[name=\"radarRightNowOnly\"]', root) || {}).checked),\n        radarRecentlyActiveOnly: !!((qs('input[name=\"radarRecentlyActiveOnly\"]', root) || {}).checked),\n        radarDsdPlusOnly: !!((qs('input[name=\"radarDsdPlusOnly\"]', root) || {}).checked),\n        radarSavedPresetName: (qs('input[name=\"radarSavedPresetName\"]', root) || {}).value || \"\",\n      };\n    button && (button.disabled = !0);\n    status && (status.textContent = \"Saving discovery settings...\");\n    return connectionPresenceRequest(\"POST\", payload).then(function (body) {\n      state.connectionPreferences = body.preferences || {};\n      state.connectionPresenceStatus = \"idle\";\n      status && (status.textContent = \"Discovery settings saved.\");\n      return loadConnectionPresence(!0, state.connectionDiscoveryMode);\n    }).catch(function (error) {\n      status && (status.textContent = (error && error.status === 402) ? \"DSD+ is required for advanced discovery settings.\" : ((error && error.message) || \"Discovery settings could not be saved.\"));\n      return null;\n    }).finally(function () { button && (button.disabled = !1); });\n  }\n  function connectionRadarCard(row) {\n    var key = row.profileKey || row.handle || \"\",\n      intents = Array.isArray(row.connectionIntents) ? row.connectionIntents : [],\n      distanceLabel = nearbyDistanceLabel(row);\n    return '<article class=\"dsd-connection-radar__card\"><a href=\"' + profileRouteHref(key) + '\"><span class=\"dsd-connection-radar__avatar\"' + (row.avatarMediaId ? ' data-dsd-avatar-media-id=\"' + html(row.avatarMediaId) + '\"' : \"\") + '>' + html(initials(row.displayName || key)) + '</span><span><strong>' + html(publicDisplayName(row.displayName || key, \"DSD member\")) + '</strong><small>@' + html(publicHandleText(key, row.displayName || \"\", \"member\")) + '</small></span></a>' +\n      (distanceLabel ? '<span class=\"dsd-connection-radar__distance\">' + html(distanceLabel) + '</span>' : \"\") +\n      (row.rightNowStatus ? '<p class=\"dsd-connection-radar__now\"><strong>Right Now</strong> ' + html(row.rightNowStatus) + '</p>' : \"\") +\n      (intents.length ? '<div class=\"dsd-connection-radar__intents\">' + intents.map(function (intent) { return '<span>' + html(connectionIntentLabel(intent)) + '</span>'; }).join(\"\") + '</div>' : \"\") +\n      '<div class=\"dsd-connection-radar__signals\">' + (row.recentlyActive ? '<span>Active</span>' : \"\") + (row.hasActiveStory ? '<button type=\"button\" data-dsd-connection-story=\"' + html(key) + '\" aria-label=\"Open ' + html(publicDisplayName(row.displayName || key, \"member\")) + ' story\">Story</button>' : \"\") + '</div><div class=\"dsd-connection-radar__actions\">' + connectionSignalButton(\"wave\", row, key) + connectionSignalButton(\"interested\", row, key) + '</div></article>';\n  }\n  function openConnectionStoryForProfile(targetProfileKey, targetStoryId) {\n    var key = normalizedProfileKeyValue(targetProfileKey || \"\"),\n      requestedStoryId = String(targetStoryId || \"\").trim(),\n      stories = visibleStories().filter(function (item) {\n        item = hydrateRecordIdentity(item || {});\n        var profile = profileForRecordIdentity(item) || {},\n          ownerKey = normalizedProfileKeyValue(\n            profile.profileKey || profile.handle || item.authorProfileKey || item.ownerProfileKey || \"\",\n          );\n        return ownerKey === key && !isRestrictedShellRecord(item);\n      }),\n      story = (requestedStoryId\n        ? stories.filter(function (item) {\n            return String(item.storyId || item.id || \"\") === requestedStoryId;\n          })[0]\n        : stories[0]) || null;\n    if (story) {\n      state.storySelectionExplicit = !0;\n      state.activeStoryId = story.storyId || story.id || \"\";\n      renderStories();\n      openStoryOverlay(state.activeStoryId);\n      return;\n    }\n    if (key)\n      window.location.assign(\n        profileRouteHref(key) + \"&story=\" + encodeURIComponent(requestedStoryId || \"open\"),\n      );\n  }\n  function connectionHubCard(row) {\n    var key = row.profileKey || row.handle || \"\",\n      shared = Array.isArray(row.sharedIntents) ? row.sharedIntents.map(connectionIntentLabel).filter(Boolean) : [],\n      badges = [];\n    row.mutualHeat && badges.push(\"The interest is mutual.\");\n    row.mutualWave && badges.push(\"You waved at each other.\");\n    row.waveReceived && !row.waveSent && badges.push(\"They waved at you.\");\n    row.interestedSent && !row.mutualHeat && badges.push(\"You marked them Interested.\");\n    return '<article class=\"dsd-connection-hub__card\"><a href=\"' + profileRouteHref(key) + '\"><span class=\"dsd-connection-radar__avatar\"' + (row.avatarMediaId ? ' data-dsd-avatar-media-id=\"' + html(row.avatarMediaId) + '\"' : \"\") + '>' + html(initials(row.displayName || key)) + '</span><span><strong>' + html(publicDisplayName(row.displayName || key, \"DSD member\")) + '</strong><small>@' + html(publicHandleText(key, row.displayName || \"\", \"member\")) + '</small></span></a>' +\n      (row.locationCity ? '<p>' + html([row.locationCity, row.locationState].filter(Boolean).join(\", \")) + '</p>' : \"\") +\n      (badges.length ? '<div class=\"dsd-connection-hub__badges\">' + badges.map(function (badge) { return '<span>' + html(badge) + '</span>'; }).join(\"\") + '</div>' : \"\") +\n      (shared.length ? '<p class=\"dsd-connection-hub__chemistry\"><strong>' + shared.length + ' thing' + (shared.length === 1 ? \"\" : \"s\") + ' in common</strong><span>' + html(shared.join(\" + \")) + '</span></p>' : '<p class=\"dsd-connection-hub__chemistry\"><span>You both chose to connect.</span></p>') +\n      '<div class=\"dsd-connection-hub__actions\"><a class=\"is-primary\" href=\"/pages/messages?profile=' + encodeURIComponent(key) + '\">Message</a><a href=\"' + profileRouteHref(key) + '\">Profile</a><details class=\"dsd-connection-secondary-menu dsd-connection-secondary-menu--connections\"><summary aria-label=\"More connection actions\"><span aria-hidden=\"true\">&#8230;</span><span class=\"visually-hidden\">More</span></summary><div><label class=\"dsd-connection-icebreaker\"><span>Optional Wave icebreaker</span><input data-dsd-wave-icebreaker maxlength=\"180\" placeholder=\"Say hello\"></label>' + (row.waveSent ? '<button type=\"button\" data-dsd-connection-signal=\"wave\" data-dsd-target-profile=\"' + html(key) + '\" data-dsd-signal-active=\"false\">Remove Wave</button>' : '<button type=\"button\" data-dsd-connection-signal=\"wave\" data-dsd-target-profile=\"' + html(key) + '\">Wave</button>') + (row.interestedSent ? '<button type=\"button\" data-dsd-connection-signal=\"interested\" data-dsd-target-profile=\"' + html(key) + '\" data-dsd-signal-active=\"false\">Remove Interest</button>' : '') + '</div></details></div></article>';\n  }\n  function connectionSignalButton(signalType, row, key) {\n    row = row || {};\n    var sent = signalType === \"wave\" ? row.waveSent === !0 : row.interestedSent === !0,\n      label = signalType === \"wave\"\n        ? (sent ? \"Remove Wave\" : \"Wave\")\n        : (sent ? \"Remove Interest\" : \"Interested\");\n    return '<button type=\"button\" data-dsd-connection-signal=\"' + html(signalType) + '\" data-dsd-target-profile=\"' + html(key) + '\" aria-pressed=\"' + (sent ? \"true\" : \"false\") + '\"' + (sent ? ' data-dsd-signal-active=\"false\"' : \"\") + '>' + label + '</button>';\n  }\n  function updateConnectionSignalRows(targetProfileKey, signalType, active) {\n    var targetKey = normalizedProfileKeyValue(targetProfileKey || \"\"),\n      field = signalType === \"wave\" ? \"waveSent\" : \"interestedSent\";\n    [\"connectionRadarRows\", \"connectionShuffleRows\", \"connectionHubRows\"].forEach(function (stateKey) {\n      (state[stateKey] || []).forEach(function (row) {\n        var rowKey = normalizedProfileKeyValue(row && (row.profileKey || row.handle || \"\"));\n        rowKey === targetKey && (row[field] = active === !0);\n      });\n    });\n    if (state.viewedConnectionSummary && normalizedProfileKeyValue(state.viewedConnectionSummary.profileKey || \"\") === targetKey)\n      state.viewedConnectionSummary[field] = active === !0;\n  }\n  function preserveShuffleCandidate(targetProfileKey, snapshot, priorIndex) {\n    var targetKey = normalizedProfileKeyValue(targetProfileKey || \"\"),\n      rows = state.connectionShuffleRows || [],\n      baseIndex = rows.findIndex(function (row) {\n        return normalizedProfileKeyValue(row && (row.profileKey || row.handle || \"\")) === targetKey;\n      });\n    if (baseIndex === -1 && snapshot) {\n      baseIndex = Math.min(Math.max(Number(priorIndex) || 0, 0), rows.length);\n      rows.splice(baseIndex, 0, snapshot);\n    }\n    var filteredIndex = connectionRowsForCanonicalFilter(rows).findIndex(function (row) {\n      return normalizedProfileKeyValue(row && (row.profileKey || row.handle || \"\")) === targetKey;\n    });\n    filteredIndex !== -1 && (state.connectionShuffleIndex = filteredIndex);\n  }\n  function currentConnectionSignalRow(targetProfileKey) {\n    var targetKey = normalizedProfileKeyValue(targetProfileKey || \"\"),\n      row = null;\n    [\"connectionRadarRows\", \"connectionShuffleRows\", \"connectionHubRows\"].some(function (stateKey) {\n      row = (state[stateKey] || []).filter(function (candidate) {\n        return normalizedProfileKeyValue(candidate && (candidate.profileKey || candidate.handle || \"\")) === targetKey;\n      })[0] || null;\n      return !!row;\n    });\n    if (!row && state.viewedConnectionSummary && normalizedProfileKeyValue(state.viewedConnectionSummary.profileKey || \"\") === targetKey)\n      row = state.viewedConnectionSummary;\n    return row;\n  }\n  function syncConnectionSignalButtons(targetProfileKey, signalType, active) {\n    var targetKey = normalizedProfileKeyValue(targetProfileKey || \"\"),\n      label = signalType === \"wave\"\n        ? (active ? \"Remove Wave\" : \"Wave\")\n        : (active ? \"Remove Interest\" : \"Interested\");\n    qsa('[data-dsd-connection-signal=\"' + signalType + '\"]').forEach(function (candidate) {\n      if (normalizedProfileKeyValue(candidate.getAttribute(\"data-dsd-target-profile\") || \"\") !== targetKey) return;\n      candidate.textContent = label;\n      candidate.setAttribute(\"aria-pressed\", active ? \"true\" : \"false\");\n      active\n        ? candidate.setAttribute(\"data-dsd-signal-active\", \"false\")\n        : candidate.removeAttribute(\"data-dsd-signal-active\");\n      candidate.disabled = false;\n    });\n  }\n  function mutateConnectionSignal(button) {\n    if (!button || !hasCustomer()) return Promise.resolve(null);\n    var signalType = button.getAttribute(\"data-dsd-connection-signal\") || \"\",\n      targetProfileKey = button.getAttribute(\"data-dsd-target-profile\") || \"\",\n      active = button.getAttribute(\"data-dsd-signal-active\") !== \"false\",\n      mutationKey = signalType + \":\" + normalizedProfileKeyValue(targetProfileKey),\n      card = button.closest(\"article\"),\n      icebreakerField = card && qs(\"[data-dsd-wave-icebreaker]\", card),\n      icebreaker = signalType === \"wave\" && active ? String((icebreakerField && icebreakerField.value) || \"\").trim().slice(0, 180) : \"\",\n      priorIndex = state.connectionShuffleIndex,\n      priorSnapshotRow = currentConnectionSignalRow(targetProfileKey),\n      priorSnapshot = priorSnapshotRow ? Object.assign({}, priorSnapshotRow) : null,\n      priorValue = signalType === \"wave\" ? !!(priorSnapshot && priorSnapshot.waveSent) : !!(priorSnapshot && priorSnapshot.interestedSent),\n      idempotencyKey = \"connection-\" + signalType + \":\" + Date.now() + \":\" + Math.random().toString(36).slice(2, 12);\n    if ([\"wave\", \"interested\"].indexOf(signalType) === -1 || !targetProfileKey) return Promise.resolve(null);\n    state.connectionSignalMutations = state.connectionSignalMutations || {};\n    if (state.connectionSignalMutations[mutationKey]) return state.connectionSignalMutations[mutationKey];\n    button.disabled = !0;\n    button.textContent = active ? (signalType === \"wave\" ? \"Waving...\" : \"Saving...\") : \"Removing...\";\n    updateConnectionSignalRows(targetProfileKey, signalType, active);\n    renderConnectionSurfaces();\n    state.connectionSignalMutations[mutationKey] = connectionSignalMutationRequest({ action: \"signal\", signalType: signalType, targetProfileKey: targetProfileKey, active: active, icebreaker: icebreaker, idempotencyKey: idempotencyKey }).then(function (body) {\n      var mutation = body.mutation || {};\n      renderStatus(mutation.mutualHeat ? \"Mutual Heat. You can message this connection.\" : (signalType === \"wave\" ? (active ? \"Wave sent.\" : \"Wave removed.\") : (active ? \"Interest saved privately.\" : \"Interest removed.\")));\n      active && (signalType === \"wave\" || mutation.mutualHeat === true) && emit(\"connection-signal-confirmed\", {\n        signalType: signalType,\n        targetProfileKey: normalizedProfileKeyValue(targetProfileKey),\n        active: true,\n        mutualHeat: mutation.mutualHeat === true,\n        idempotencyKey: idempotencyKey\n      });\n      updateConnectionSignalRows(targetProfileKey, signalType, active);\n      if (state.connectionDiscoveryMode === \"shuffle\")\n        preserveShuffleCandidate(targetProfileKey, priorSnapshot, priorIndex);\n      renderConnectionSurfaces();\n      syncConnectionSignalButtons(targetProfileKey, signalType, active);\n      return body;\n    }).catch(function (error) {\n      updateConnectionSignalRows(targetProfileKey, signalType, priorValue);\n      if (state.connectionDiscoveryMode === \"shuffle\")\n        preserveShuffleCandidate(targetProfileKey, priorSnapshot, priorIndex);\n      renderConnectionSurfaces();\n      syncConnectionSignalButtons(targetProfileKey, signalType, priorValue);\n      renderStatus((error && error.message) || \"Connection signal could not be saved.\");\n      return null;\n    }).finally(function () {\n      button.disabled = !1;\n      delete state.connectionSignalMutations[mutationKey];\n    });\n    return state.connectionSignalMutations[mutationKey];\n  }\n  function localPulseMetric(value, label) {\n    return '<span class=\"dsd-local-pulse__metric\"><strong>' +\n      (value === null || value === void 0 ? \"Private\" : html(String(value))) +\n      '</strong> ' + html(label) + '</span>';\n  }\n  function localPulseEventCard(eventRow) {\n    eventRow = eventRow || {};\n    var presence = String(eventRow.viewerPresence || \"\"),\n      gated = eventRow.accessGate === \"dsd_plus\" && !state.connectionDiscoveryDsdPlus,\n      location = [eventRow.city, eventRow.state].filter(Boolean).join(\", \"),\n      conversation = presence === \"going\" && eventRow.conversationId\n        ? '<a href=\"/pages/messages?conversationId=' + encodeURIComponent(eventRow.conversationId) + '\">Event conversation</a>'\n        : \"\";\n    return '<article class=\"dsd-local-pulse__event\"><div><strong>' + html(eventRow.title || \"Local event\") + '</strong>' +\n      (location ? '<span>' + html(location) + '</span>' : \"\") +\n      (eventRow.startsAt ? '<time datetime=\"' + html(eventRow.startsAt) + '\">' + html(formatDateTime(eventRow.startsAt)) + '</time>' : \"\") +\n      (eventRow.description ? '<p>' + html(eventRow.description) + '</p>' : \"\") +\n      '<small>' + html(eventRow.attendanceLabel || \"New event\") + (gated ? \" - DSD+\" : \"\") + '</small></div><div class=\"dsd-local-pulse__event-actions\">' +\n      (gated\n        ? '<a href=\"/products/dsd\">View DSD+</a>'\n        : '<button type=\"button\" data-dsd-event-presence=\"interested\" data-dsd-event-id=\"' + html(eventRow.id || \"\") + '\"' + (presence === \"interested\" ? ' data-dsd-event-active=\"false\">Remove interest' : '>Interested') + '</button>' +\n          '<button type=\"button\" data-dsd-event-presence=\"going\" data-dsd-event-id=\"' + html(eventRow.id || \"\") + '\"' + (presence === \"going\" ? ' data-dsd-event-active=\"false\">Not going' : '>Going') + '</button>') +\n      conversation + '</div></article>';\n  }\n  function renderLocalPulse() {\n    qsa(\"[data-dsd-local-pulse]\").forEach(function (root) {\n      if (!hasCustomer()) {\n        root.innerHTML = '<div class=\"dsd-local-pulse__state\"><strong>DSD Pulse</strong><p>Log in to see privacy-safe local activity.</p></div>';\n        return;\n      }\n      if (state.localPulseStatus === \"loading\" || state.localPulseStatus === \"idle\") {\n        root.innerHTML = '<div class=\"dsd-local-pulse__state\" aria-busy=\"true\"><strong>DSD Pulse</strong><p>Reading the local heartbeat...</p></div>';\n        return;\n      }\n      if (state.localPulseStatus === \"error\") {\n        root.innerHTML = '<div class=\"dsd-local-pulse__state\"><strong>Pulse unavailable</strong><p>Discovery still works normally.</p><button type=\"button\" data-dsd-local-pulse-retry>Retry</button></div>';\n        return;\n      }\n      var pulse = state.localPulse || {}, context = pulse.context || {}, counts = pulse.counts || {},\n        events = Array.isArray(pulse.events) ? pulse.events : [],\n        posts = Array.isArray(pulse.trendingPosts) ? pulse.trendingPosts : [],\n        location = [context.city, context.state].filter(Boolean).join(\", \");\n      if (!context.city) {\n        root.innerHTML = '<div class=\"dsd-local-pulse__state\"><strong>DSD Pulse</strong><p>Add a current city to your profile to view the local heartbeat.</p><a href=\"/pages/user-profile\">Update profile</a></div>';\n        return;\n      }\n      root.innerHTML = '<details class=\"dsd-local-pulse__details\"><summary><span class=\"dsd-local-pulse__identity\"><strong>DSD Pulse</strong><small>' + html(location) + (context.passportActive ? \" - Passport\" : \"\") + '</small></span><span class=\"dsd-local-pulse__summary\">' +\n        html(String(counts.activeUsers || 0)) + ' active &middot; ' + html(String(counts.trendingPosts || 0)) + ' posts &middot; ' + html(String(counts.activeStories || 0)) + ' Stories &middot; ' + html(String(counts.upcomingEvents || 0)) + ' events</span><span class=\"dsd-local-pulse__expand\">Explore</span></summary><div class=\"dsd-local-pulse__expanded\">' +\n        '<div class=\"dsd-local-pulse__metrics\">' +\n          localPulseMetric(counts.activeUsers, \"active\") +\n          localPulseMetric(counts.freshFaces, \"fresh faces\") +\n          localPulseMetric(counts.activeStories, \"Stories\") +\n          localPulseMetric(counts.trendingPosts, \"posts\") +\n          localPulseMetric(counts.rightNow, \"Right Now\") +\n          localPulseMetric(counts.upcomingEvents, \"events\") +\n        '</div><section class=\"dsd-local-pulse__events\"><div class=\"dsd-local-pulse__section-head\"><strong>Events</strong><span>Event Mode</span></div>' +\n          (events.length ? '<div class=\"dsd-local-pulse__event-grid\">' + events.map(localPulseEventCard).join(\"\") + '</div>' : '<div class=\"dsd-local-pulse__compact-empty\"><strong>Nothing nearby yet</strong><span>Approved events will appear here.</span></div>') +\n        '</section><section class=\"dsd-local-pulse__trending\"><div class=\"dsd-local-pulse__section-head\"><strong>Trending locally</strong><a href=\"/pages/feed\">See all</a></div>' +\n          (posts.length ? '<div class=\"dsd-local-pulse__post-list\">' + posts.slice(0, 3).map(function (post) { return '<a href=\"' + html(post.href || \"/pages/feed\") + '\"><span>@' + html(post.authorProfileKey || \"member\") + '</span><strong>' + html(post.excerpt || \"Post\") + '</strong></a>'; }).join(\"\") + '</div>' : '<div class=\"dsd-local-pulse__compact-empty\"><span>No eligible local posts yet.</span></div>') +\n        '</section></div></details>';\n    });\n  }\n  function mutateEventPresence(button) {\n    if (!button || !hasCustomer()) return Promise.resolve(null);\n    var eventId = button.getAttribute(\"data-dsd-event-id\") || \"\",\n      presenceState = button.getAttribute(\"data-dsd-event-presence\") || \"\",\n      active = button.getAttribute(\"data-dsd-event-active\") !== \"false\";\n    if (!eventId || [\"interested\", \"going\"].indexOf(presenceState) === -1) return Promise.resolve(null);\n    button.disabled = !0;\n    button.textContent = active ? \"Saving...\" : \"Removing...\";\n    return connectionPresenceRequest(\"POST\", { action: \"event_presence\", eventId: eventId, presenceState: presenceState, active: active }).then(function () {\n      renderStatus(active ? \"Event preference saved.\" : \"Event preference removed.\");\n      state.localPulseStatus = \"idle\";\n      return loadConnectionPresence(!0, \"pulse\");\n    }).catch(function (error) {\n      renderStatus((error && error.message) || \"Event preference could not be saved.\");\n      return null;\n    }).finally(function () { button.disabled = !1; });\n  }\n  function renderConnectionSurfaces() {\n    qsa(\"[data-dsd-map-intent-editor-body]\").forEach(function (body) {\n      var prefs = state.connectionPreferences || {},\n        mode = Array.isArray(prefs.connectionIntents) && prefs.connectionIntents.length && prefs.connectionIntentsVisible !== !0\n          ? \"hidden-selection-confirmation\"\n          : \"canonical\";\n      if (!qs(\"[data-dsd-connection-settings]\", body) || body.dataset.dsdIntentEditorMode !== mode) {\n        body.innerHTML = connectionSettingsHTML();\n        body.dataset.dsdIntentEditorMode = mode;\n      }\n    });\n    syncConnectionSettings(document);\n    var profileIdentity = qs(\"[data-dsd-profile-static-shell], .dsd-up315__identity-copy\"),\n      existingProfileSummary = qs(\"[data-dsd-profile-connection-summary]\"),\n      viewedRouteKey = normalizedProfileKeyValue(queryParam(\"profile\") || \"\"),\n      preferences = state.connectionPreferences || {},\n      viewedSummary = viewedRouteKey\n        ? (state.viewedConnectionSummary || {})\n        : {\n            profileKey: normalizedProfileKeyValue(profileKey()),\n            connectionIntents: preferences.connectionIntentsVisible === !0 ? (preferences.connectionIntents || []) : [],\n            rightNowStatus: preferences.rightNowVisible === !0 ? (preferences.rightNowStatus || \"\") : \"\",\n            rightNowExpiresAt: preferences.rightNowVisible === !0 ? (preferences.rightNowExpiresAt || null) : null,\n            isSelf: !0\n          },\n      viewedIntents = Array.isArray(viewedSummary.connectionIntents) ? viewedSummary.connectionIntents.map(connectionIntentLabel).filter(Boolean) : [],\n      sharedIntents = Array.isArray(viewedSummary.sharedIntents) ? viewedSummary.sharedIntents.map(connectionIntentLabel).filter(Boolean) : [],\n      contextBadges = [],\n      targetKey = normalizedProfileKeyValue(viewedSummary.profileKey || viewedRouteKey || \"\"),\n      targetProfile = targetKey ? (publicProfileByKey(targetKey) || {}) : {},\n      viewedIsSelf =\n        isOwnProfileRoute() ||\n        viewedSummary.isSelf === !0 ||\n        identityMatchesCurrent(\n          targetProfile.uid ||\n            targetProfile.userId ||\n            targetProfile.user_id ||\n            \"\",\n          targetKey,\n        ),\n      profileActions = \"\";\n    viewedSummary.mutualHeat && contextBadges.push(\"Mutual Heat\");\n    viewedSummary.mutualWave && contextBadges.push(\"Mutual Wave\");\n    viewedSummary.waveReceived && !viewedSummary.mutualWave && contextBadges.push(\"Waved you\");\n    viewedSummary.waveSent && !viewedSummary.mutualWave && contextBadges.push(\"Wave sent\");\n    if (viewedRouteKey && targetKey && !viewedIsSelf) {\n      profileActions = '<div class=\"dsd-profile-connection-summary__actions\">' +\n        connectionSignalButton(\"wave\", viewedSummary, targetKey) +\n        connectionSignalButton(\"interested\", viewedSummary, targetKey) +\n        '</div>';\n    }\n    if (profileIdentity && hasCustomer() && (viewedIntents.length || viewedSummary.rightNowStatus || contextBadges.length || sharedIntents.length || profileActions)) {\n      if (!existingProfileSummary) {\n        existingProfileSummary = document.createElement(\"div\");\n        existingProfileSummary.className = \"dsd-profile-connection-summary\";\n        existingProfileSummary.setAttribute(\"data-dsd-profile-connection-summary\", \"\");\n        profileIdentity.appendChild(existingProfileSummary);\n      }\n      existingProfileSummary.innerHTML =\n        (viewedSummary.rightNowStatus ? '<p><strong>Right Now</strong> ' + html(viewedSummary.rightNowStatus) + '</p>' : \"\") +\n        (viewedIntents.length ? '<div class=\"dsd-profile-connection-summary__intents\">' + viewedIntents.map(function (intent) { return '<span>' + html(intent) + '</span>'; }).join(\"\") + '</div>' : \"\") +\n        (contextBadges.length ? '<div class=\"dsd-profile-connection-summary__context\">' + contextBadges.map(function (badge) { return '<span>' + html(badge) + '</span>'; }).join(\"\") + '</div>' : \"\") +\n        (sharedIntents.length ? '<p class=\"dsd-profile-connection-summary__chemistry\"><strong>' + sharedIntents.length + ' thing' + (sharedIntents.length === 1 ? '' : 's') + ' in common</strong> ' + html(sharedIntents.join(' + ')) + '</p>' : \"\") +\n        profileActions;\n    } else if (existingProfileSummary) existingProfileSummary.remove();\n    qsa(\"[data-dsd-connection-radar]\").forEach(function (root) {\n      var discoveryRoot = root.closest(\"[data-dsd-users311]\");\n      discoveryRoot && discoveryRoot.setAttribute(\"data-dsd-discovery-mode\", state.connectionDiscoveryMode || \"radar\");\n      root.classList.toggle(\"is-shuffle-open\", state.connectionShuffleOpen === !0);\n      document.documentElement.classList.toggle(\"dsd-connection-shuffle-open\", state.connectionShuffleOpen === !0);\n      if (!hasCustomer()) {\n        root.innerHTML = '<div class=\"dsd-connection-radar__state\"><strong>DSD Radar</strong><p>Log in to see privacy-safe nearby connection signals.</p></div>';\n        return;\n      }\n      if (state.connectionPresenceStatus === \"loading\") {\n        root.innerHTML = '<div class=\"dsd-connection-radar__state\" aria-busy=\"true\"><strong>DSD Radar</strong><p>Finding nearby connections...</p></div>';\n        return;\n      }\n      if (state.connectionPresenceStatus === \"error\") {\n        root.innerHTML = '<div class=\"dsd-connection-radar__state\"><strong>Radar unavailable</strong><p>Your standard Discovery grid still works.</p><button type=\"button\" data-dsd-connection-radar-retry>Retry</button></div>';\n        return;\n      }\n      var shuffleMode = state.connectionDiscoveryMode === \"shuffle\",\n        connectionsMode = state.connectionDiscoveryMode === \"connections\",\n        rows = connectionRowsForCanonicalFilter(shuffleMode ? (state.connectionShuffleRows || []) : (connectionsMode ? (state.connectionHubRows || []) : (state.connectionRadarRows || []))),\n        current = rows[Math.min(state.connectionShuffleIndex, Math.max(rows.length - 1, 0))] || null;\n      root.innerHTML = connectionDiscoveryControlsHTML() + (connectionsMode\n        ? (rows.length ? '<div class=\"dsd-connection-radar__heading\"><strong>Connections</strong><span>People where interest or a Wave is mutual</span></div><div class=\"dsd-connection-hub\">' + rows.map(connectionHubCard).join(\"\") + '</div>' : '<div class=\"dsd-connection-radar__state\"><strong>No Connections yet</strong><p>Send a Wave or private Interest from Radar or Shuffle.</p></div>')\n        : shuffleMode\n        ? '<div class=\"dsd-connection-shuffle__launch\"><div><strong>Shuffle</strong><span>One profile at a time from the canonical Discovery pool</span></div><button type=\"button\" data-dsd-open-shuffle>Open Shuffle</button></div>' + (state.connectionShuffleOpen ? '<div class=\"dsd-connection-shuffle__fullscreen\"><button type=\"button\" class=\"dsd-connection-shuffle__close\" data-dsd-close-shuffle aria-label=\"Close Shuffle\">Close</button>' + connectionShuffleCard(current) + '</div>' : \"\")\n        : (rows.length\n          ? '<div class=\"dsd-connection-radar__heading\"><strong>' + (state.connectionDiscoveryDsdPlus ? \"DSD Radar+\" : \"DSD Radar\") + '</strong><span>Nearby, active, and open to connect</span></div><div class=\"dsd-connection-radar__track\">' + rows.map(connectionRadarCard).join(\"\") + '</div>'\n          : '<div class=\"dsd-connection-radar__state is-compact\"><strong>' + (state.connectionDiscoveryDsdPlus ? \"DSD Radar+\" : \"DSD Radar\") + '</strong><p>No one new on your Radar right now. Showing eligible nearby users.</p></div>'));\n      hydrateProfileCardMedia(root);\n      hydrateMediaReads(root);\n      syncCanonicalDiscoveryFilter(root.closest(\"[data-dsd-users311]\") || document);\n    });\n    syncConnectionShuffleLayer();\n    renderLocalPulse();\n  }\n  function loadConnectionPresence(force, mode) {\n    if (!hasCustomer()) return Promise.resolve(null);\n    mode = [\"shuffle\", \"connections\", \"pulse\"].indexOf(mode) !== -1 ? mode : \"radar\";\n    mode !== \"pulse\" && (state.connectionDiscoveryMode = mode);\n    if (!force && [\"loading\", \"ready\"].indexOf(state.connectionPresenceStatus) !== -1)\n      return Promise.resolve(state.connectionPreferences);\n    state.connectionPresenceStatus = \"loading\";\n    state.connectionPresenceError = \"\";\n    if (qsa(\"[data-dsd-local-pulse]\").length && state.localPulseStatus === \"idle\") state.localPulseStatus = \"loading\";\n    renderConnectionSurfaces();\n    return connectionPresenceRequest(\"GET\", null, { mode: mode, includePulse: mode === \"pulse\" || state.localPulseStatus !== \"ready\" }).then(function (body) {\n      state.connectionPreferences = body.preferences || {};\n      state.connectionDiscoveryDsdPlus = !!(body.entitlement && body.entitlement.dsdPlus === !0);\n      mode === \"pulse\"\n        ? null\n        : mode === \"shuffle\"\n        ? (state.connectionShuffleRows = Array.isArray(body.shuffle) ? body.shuffle : [])\n        : mode === \"connections\"\n          ? (state.connectionHubRows = Array.isArray(body.connections) ? body.connections : [])\n          : (state.connectionRadarRows = Array.isArray(body.radar) ? body.radar : []);\n      state.viewedConnectionSummary = body.viewedProfile || null;\n      Array.isArray(body.distanceProfiles) &&\n        body.distanceProfiles.length &&\n        mergeTargetDistanceRows(\n          body.distanceProfiles,\n          body.distanceProfiles.map(targetDistanceProfileKey).filter(Boolean),\n          \"connection-presence\",\n        );\n      if (body.pulse) {\n        state.localPulse = body.pulse;\n        state.localPulseStatus = \"ready\";\n        state.localPulseError = \"\";\n      }\n      state.connectionPresenceStatus = \"ready\";\n      renderConnectionSurfaces();\n      qsa(\"[data-dsd-users311-grid]\").length && renderDiscovery();\n      claim(\"connection-presence:loaded\", { mode: mode, rows: mode === \"shuffle\" ? state.connectionShuffleRows.length : (mode === \"connections\" ? state.connectionHubRows.length : state.connectionRadarRows.length), exactCoordinatesExposed: !1 });\n      return state.connectionPreferences;\n    }).catch(function (error) {\n      state.connectionPresenceStatus = \"error\";\n      state.connectionPresenceError = (error && error.message) || String(error);\n      if (state.localPulseStatus === \"loading\") {\n        state.localPulseStatus = \"error\";\n        state.localPulseError = state.connectionPresenceError;\n      }\n      renderConnectionSurfaces();\n      return null;\n    });\n  }\n  function saveConnectionSettings(fieldset) {\n    if (!fieldset) return Promise.resolve(null);\n    var selected = qsa('input[name=\"connectionIntent\"]:checked', fieldset).map(function (field) { return field.value; }).slice(0, 5),\n      status = qs(\"[data-dsd-connection-settings-status]\", fieldset),\n      button = qs(\"[data-dsd-save-connection-settings]\", fieldset),\n      payload = {\n        connectionIntents: selected,\n        confirmIntentPublication: !!((qs('input[name=\"confirmIntentPublication\"]', fieldset) || {}).checked),\n        rightNowStatus: (qs('input[name=\"rightNowStatus\"]', fieldset) || {}).value || \"\",\n        rightNowMinutes: Number((qs('select[name=\"rightNowMinutes\"]', fieldset) || {}).value || 60),\n        rightNowVisible: !!((qs('input[name=\"rightNowVisible\"]', fieldset) || {}).checked),\n      };\n    button && (button.disabled = !0);\n    status && (status.textContent = \"Saving connections...\");\n    return connectionPresenceRequest(\"POST\", payload).then(function (body) {\n      state.connectionPreferences = body.preferences || {};\n      state.connectionPresenceStatus = \"idle\";\n      status && (status.textContent = \"Connection preferences saved.\");\n      return loadConnectionPresence(!0, state.connectionDiscoveryMode);\n    }).catch(function (error) {\n      status && (status.textContent = (error && error.message) || \"Connection preferences could not be saved.\");\n      return null;\n    }).finally(function () { button && (button.disabled = !1); });\n  }\n  function markNotificationReadById(notificationId) {\n    var unreadTarget = (state.notifications || []).find(function (item) {\r\n      return (\r\n        !item.read &&\r\n        (item.id === notificationId || item.notificationId === notificationId)\r\n      );\r\n    });\r\n    return ((notificationId = String(notificationId || \"\").trim()),\n      !notificationId || !hasCustomer()\n        ? Promise.resolve(null)\n        : premiumMessageActionViaProxy({\n            action: \"mark_notification_read\",\n            notificationId: notificationId,\n          }).then(function (result) {\n            state.notifications = state.notifications.map(function (item) {\n            return item.id === notificationId ||\n              item.notificationId === notificationId\n              ? Object.assign({}, item, { read: !0 })\n              : item;\n            });\n            state.inboxCounts.ready && unreadTarget\n            ? ((state.inboxCounts.notificationUnread = Math.max(\n                0,\r\n                state.inboxCounts.notificationUnread - 1,\r\n              )),\r\n              (unreadTarget.category === \"founder\" ||\r\n                unreadTarget.type === \"founder\") &&\r\n                (state.inboxCounts.founderUnread = Math.max(\r\n                  0,\r\n                  state.inboxCounts.founderUnread - 1,\r\n                )))\r\n            : null;\n            (renderNotifications(), updateNotificationDockBadge(state.notifications));\n            return refreshInboxCounts(\"notification-mark-read\").then(function () {\n              return result;\n            });\n          }).catch(function (error) {\n            (renderStatus(\"Notification could not be marked read.\"),\n              claim(\"notification-mark-read:blocked\", {\n                notificationId: notificationId,\n                error: (error && error.message) || String(error),\n              }));\n            return null;\n          }));\n  }\r\n  function compactNotificationTitle(n, cat, actorLine) {\r\n    var raw = publicDisplayText((n && n.title) || \"\", \"\").trim();\r\n    if (raw && !/^notification$/i.test(raw) && !/^system$/i.test(raw))\r\n      return raw;\r\n    var body = publicDisplayText((n && n.body) || \"\", \"\").trim();\r\n    if (/your profile/i.test(body)) return \"Your profile is active\";\r\n    if (/your story/i.test(body)) return \"Your story is live\";\r\n    if (/your post/i.test(body)) return \"Your post is live\";\r\n    if (/your comment/i.test(body)) return \"Your comment is live\";\r\n    if (/item saved to your profile/i.test(body)) return \"Item saved\";\r\n    var type = String(\r\n        (n && (n.type || n.eventType || n.kind)) || cat || \"\",\r\n      ).toLowerCase(),\r\n      actor = publicDisplayText(actorLine || \"\", \"DSD member\");\r\n    return /message/.test(type)\r\n      ? actor + \" sent a message\"\r\n      : /comment|reply/.test(type)\r\n        ? actor + \" commented\"\r\n        : /follow/.test(type)\r\n          ? actor + \" followed you\"\r\n          : /like|reaction/.test(type)\r\n            ? actor + \" reacted\"\r\n            : /story/.test(type)\r\n              ? actor + \" shared a story\"\r\n              : /moderation|safety/.test(type)\r\n                ? \"Safety update\"\r\n                : /founder/.test(type)\r\n                  ? \"Founder operations update\"\r\n                  : actor\r\n                    ? actor + \" sent an update\"\r\n                    : \"Account update\";\r\n  }\r\n  function notificationBadgeLabel(n, cat, groupCount) {\r\n    var type = String(\r\n        (n && (n.type || n.eventType || n.kind)) || cat || \"\",\r\n      ).toLowerCase(),\r\n      priority = String((n && (n.priority || \"\")) || \"\").toLowerCase();\r\n    return cat === \"founder\" || /founder/.test(type)\r\n      ? \"Founder\"\r\n      : cat === \"moderation\" || /moderation/.test(type)\r\n        ? \"Moderation\"\r\n        : cat === \"safety\" || /safety|report/.test(type)\r\n          ? \"Safety\"\r\n          : priority === \"urgent\" || priority === \"high\"\r\n            ? \"Priority\"\r\n            : (Number(groupCount || 0) > 1 ||\r\n                /^(system|notification|content|stories|relationships|messages|saved|profile)$/i.test(\r\n                  String(cat || \"\"),\r\n                ),\r\n              \"\");\r\n  }\r\n  function notificationDeliveryContract() {\n    return {\r\n      owner: \"LaunchSocialActivation.NotificationPipeline\",\r\n      canonicalTruth: \"Supabase recipient-scoped notification records\",\r\n      channels: {\r\n        inSite: { active: !0, available: !0 },\r\n        email: { active: !1, available: !1, reason: \"provider-not-approved\" },\r\n        sms: { active: !1, available: !1, reason: \"provider-not-approved\" },\r\n        webPush: {\r\n          active: !1,\r\n          available: !1,\r\n          reason: \"provider-not-approved\",\r\n        },\r\n      },\r\n    };\n  }\n  function syncNotificationTabUnreadCounts(notifications) {\n    var counts = {\n      all: 0,\n      \"follow-requests\": 0,\n      waves: 0,\n      interest: 0,\n      priority: 0,\n      mentions: 0,\n    };\n    (notifications || []).forEach(function (notification) {\n      if (notification.read) return;\n      var kind = notificationRelationshipFilter(notification);\n      counts.all += 1;\n      Object.prototype.hasOwnProperty.call(counts, kind) && (counts[kind] += 1);\n      String(notification.priority || \"\").toLowerCase().match(/high|urgent/) &&\n        kind !== \"priority\" &&\n        (counts.priority += 1);\n    });\n    qsa(\"[data-dsd-noti321-tab]\").forEach(function (button) {\n      var kind = button.getAttribute(\"data-dsd-noti321-tab\") || \"all\",\n        badge = qs(\"[data-dsd-notification-tab-unread]\", button),\n        count = Math.max(0, Number(counts[kind] || 0));\n      if (!badge) {\n        badge = document.createElement(\"span\");\n        badge.setAttribute(\"data-dsd-notification-tab-unread\", \"\");\n        badge.setAttribute(\"aria-label\", \"unread\");\n        button.appendChild(badge);\n      }\n      badge.textContent = String(count);\n      badge.hidden = count === 0;\n      button.setAttribute(\"data-unread-count\", String(count));\n    });\n  }\n  function renderNotifications() {\n    var feed = qs(\".dsd-noti321__feed\");\r\n    if (!feed) return;\r\n    if (!hasCustomer() || !hasCanonicalPrivateSocialSession()) {\r\n      var gateTitle = hasCustomer()\r\n          ? \"Account connection required\"\r\n          : \"Log in to view notifications\",\r\n        gateBody = hasCustomer()\r\n          ? \"Reconnect your account to load notifications.\"\r\n          : \"Log in to see your notifications and account updates.\";\r\n      ((feed.innerHTML = hasCustomer()\r\n        ? bridgeGateHTML(gateTitle, gateBody)\r\n        : privateGateHTML(gateTitle, gateBody)),\r\n        (state.notificationCounts = { total: 0, unread: 0, founder: 0 }),\r\n        qsa(\"[data-dsd-notification-total]\").forEach(function (n) {\r\n          n.textContent = \"0\";\r\n        }),\r\n        qsa(\"[data-dsd-notification-unread]\").forEach(function (n) {\r\n          n.textContent = \"0\";\r\n        }),\r\n        qsa(\"[data-dsd-notification-founder]\").forEach(function (n) {\r\n          n.textContent = \"0\";\r\n        }),\r\n        setDockBadge(\"[data-dsd-notification-unread-count]\", 0),\r\n        qsa(\".dsd-noti321__panel--founder\").forEach(function (n) {\r\n          n.hidden = !0;\r\n        }),\r\n        qsa(\".dsd-noti321__panel input\").forEach(function (input) {\r\n          input.disabled = !0;\r\n        }));\r\n      return;\n    }\n    if (state.notificationProxyCanonical && !state.notificationInboxReady) {\n      feed.innerHTML = state.notificationInboxError\n        ? '<article class=\"dsd-noti321__empty\" role=\"alert\"><strong>Notifications unavailable</strong><p>Your notification data was not displayed because the secure recipient request failed.</p><button type=\"button\" data-dsd-notification-inbox-retry>Retry</button></article>'\n        : '<article class=\"dsd-noti321__empty\" role=\"status\" aria-live=\"polite\"><strong>Loading notifications</strong><p>Connecting to your secure notification inbox.</p></article>';\n      return;\n    }\n    var visibleRows = state.notifications.filter(function (n) {\n        return (\n          publicRecordVisible(n) &&\n          notificationNotExpiredRecord(n) &&\n          (canModerate() || n.category !== \"founder\")\n        );\n      }),\n      visible = state.notificationProxyCanonical\n        ? aggregateNotifications(canonicalNotificationRows(visibleRows))\n        : aggregateNotifications(dedupeNotifications(visibleRows));\n    syncNotificationTabUnreadCounts(visible);\n    state.notificationCounts = {\n      total: visible.length,\n      unread:\n        state.inboxCounts && state.inboxCounts.ready\n          ? Math.max(\n              0,\n              Number(state.inboxCounts.notificationUnread || 0) || 0,\n            )\n          : visible.filter(function (n) {\n              return !n.read;\n            }).length,\n      founder: visible.filter(function (n) {\r\n        return n.category === \"founder\" || n.type === \"founder\";\r\n      }).length,\r\n    };\r\n    function notificationProfile(n) {\r\n      return notificationProfileRecord(n);\r\n    }\r\n    function notificationMediaItem(item, fallbackKind) {\r\n      if (!item) return null;\r\n      if (typeof item == \"string\")\r\n        return { mediaId: item, kind: fallbackKind || \"image\" };\r\n      var mediaId = readableMediaId(item) || item.contentMediaId || \"\";\r\n      return mediaId\r\n        ? {\r\n            mediaId: mediaId,\r\n            kind:\r\n              item.kind ||\r\n              item.mediaKind ||\r\n              item.contentMediaKind ||\r\n              fallbackKind ||\r\n              \"image\",\r\n            status: item.status || \"\",\r\n          }\r\n        : null;\r\n    }\r\n    function notificationPreviewMedia(n) {\r\n      var raw = [];\r\n      return (\r\n        Array.isArray(n.previewMedia) && (raw = raw.concat(n.previewMedia)),\r\n        Array.isArray(n.contentMedia) && (raw = raw.concat(n.contentMedia)),\r\n        Array.isArray(n.media) && (raw = raw.concat(n.media)),\r\n        n.contentMediaId &&\r\n          raw.push({\r\n            mediaId: n.contentMediaId,\r\n            kind: n.contentMediaKind || \"image\",\r\n          }),\r\n        n.mediaId &&\r\n          n.mediaId !== n.thumbnailMediaId &&\r\n          raw.push({ mediaId: n.mediaId, kind: n.mediaKind || \"image\" }),\r\n        raw\r\n          .map(function (item) {\r\n            return notificationMediaItem(item, \"image\");\r\n          })\r\n          .filter(Boolean)\r\n          .slice(0, 2)\r\n      );\r\n    }\r\n    ((feed.innerHTML = visible.length\r\n      ? visible\r\n          .map(function (n) {\r\n            var nid = n.notificationId || n.id || \"\",\r\n              cat = notificationCategory(n),\r\n              unread = !n.read,\r\n              href = notificationTargetHref(n, cat),\r\n              selfAlert = notificationSelfAlert(n),\r\n              actorProfile =\r\n                selfAlert && state.profile\r\n                  ? state.profile\r\n                  : notificationProfile(n) ||\r\n                    (!n.actorUid &&\r\n                    !n.actorProfileKey &&\r\n                    !n.actorHandle &&\r\n                    !n.authorHandle\r\n                      ? state.profile || {}\r\n                      : {}),\r\n              systemAlert =\r\n                cat === \"founder\" ||\r\n                cat === \"moderation\" ||\r\n                String(n.type || \"\").toLowerCase() === \"moderation\",\r\n              thumbId = systemAlert\r\n                ? \"\"\r\n                : canonicalProfileAvatarMediaId(actorProfile) ||\r\n                  n.actorAvatarMediaId ||\r\n                  n.authorAvatarMediaId ||\r\n                  n.sourceAvatarMediaId ||\r\n                  n.ownerAvatarMediaId ||\r\n                  n.profileMediaId ||\r\n                  n.thumbnailMediaId ||\r\n                  n.mediaId ||\r\n                  \"\",\r\n              initials2 = String(\r\n                selfAlert && actorProfile\r\n                  ? actorProfile.displayName ||\r\n                      actorProfile.profileKey ||\r\n                      actorProfile.handle\r\n                  : n.actorDisplayName ||\r\n                      n.authorDisplayName ||\r\n                      actorProfile.displayName ||\r\n                      actorProfile.profileKey ||\r\n                      n.profileKey ||\r\n                      cat ||\r\n                      \"DS\",\r\n              )\r\n                .slice(0, 2)\r\n                .toUpperCase(),\r\n              storeLogo = String(window.DSDStoreLogoAsset || \"\").trim(),\r\n              thumbProfileKey = nonPlaceholderProfileKey(\r\n                actorProfile.profileKey ||\r\n                  actorProfile.handle ||\r\n                  n.actorProfileKey ||\r\n                  n.authorProfileKey ||\r\n                  n.sourceProfileKey ||\r\n                  n.ownerProfileKey ||\r\n                  n.profileKey ||\r\n                  \"\",\r\n              ),\r\n              thumbProfileUid =\r\n                actorProfile.uid ||\r\n                actorProfile.userId ||\r\n                actorProfile.user_id ||\r\n                n.actorUid ||\r\n                n.authorUid ||\r\n                n.sourceUid ||\r\n                n.ownerUid ||\r\n                \"\",\r\n              thumb = thumbId && thumbProfileKey\r\n                ? '<a class=\"dsd-noti321__thumb\" href=\"' +\r\n                  html(profileRouteHref(thumbProfileKey)) +\r\n                  '\" data-dsd-avatar-media-id=\"' +\r\n                  html(thumbId) +\r\n                  '\" data-dsd-profile-key=\"' +\r\n                  html(thumbProfileKey) +\r\n                  '\" data-dsd-author-profile-key=\"' +\r\n                  html(thumbProfileKey) +\r\n                   '\" data-dsd-author-uid=\"' +\n                   html(thumbProfileUid) +\n                   '\" aria-label=\"Profile avatar\">' +\n                  html(initials2) +\r\n                  \"</a>\"\r\n                : thumbId\r\n                  ? '<span class=\"dsd-noti321__thumb\" data-dsd-avatar-media-id=\"' +\r\n                    html(thumbId) +\r\n                    '\" aria-label=\"Profile avatar\">' +\r\n                    html(initials2) +\r\n                    \"</span>\"\r\n                : systemAlert\r\n                  ? '<span class=\"dsd-noti321__thumb dsd-noti321__thumb--store-logo\" aria-label=\"Store logo\">' +\r\n                    (storeLogo\r\n                      ? '<img src=\"' +\r\n                        html(storeLogo) +\r\n                        '\" alt=\"Detroit Sky Daddy logo\" loading=\"eager\" decoding=\"async\">'\r\n                      : \"DS\") +\r\n                    \"</span>\"\r\n                  : thumbProfileKey\r\n                    ? '<a class=\"dsd-noti321__thumb dsd-noti321__thumb--fallback\" href=\"' +\r\n                      html(profileRouteHref(thumbProfileKey)) +\r\n                      '\" data-dsd-profile-key=\"' +\r\n                      html(thumbProfileKey) +\r\n                      '\">' +\r\n                      html(initials2) +\r\n                      \"</a>\"\r\n                    : '<span class=\"dsd-noti321__thumb dsd-noti321__thumb--fallback\" data-dsd-profile-key=\"' +\r\n                    html(thumbProfileKey) +\n                    '\">' +\n                    html(initials2) +\n                    \"</span>\",\n              actorLine = publicDisplayName(\r\n                selfAlert && actorProfile\r\n                  ? actorProfile.displayName ||\r\n                      actorProfile.profileKey ||\r\n                      actorProfile.handle\r\n                  : n.actorDisplayName ||\r\n                      actorProfile.displayName ||\r\n                      actorProfile.profileKey ||\r\n                      n.actorProfileKey ||\r\n                      \"\",\r\n                \"DSD member\",\r\n              ),\r\n              groupCount = Number(n.notificationGroupCount || 0),\r\n              groupLabel =\r\n                groupCount > 1\r\n                  ? '<span class=\"dsd-noti321__group\" data-dsd-notification-group-count=\"' +\r\n                    html(String(groupCount)) +\r\n                    '\">' +\r\n                    html(String(groupCount)) +\r\n                    \" related updates</span>\"\r\n                  : \"\",\r\n              previewMedia = notificationPreviewMedia(n),\r\n              preview = previewMedia.length\r\n                ? '<div class=\"dsd-noti321__preview\" aria-label=\"Notification media preview\">' +\r\n                  previewMedia\r\n                    .map(function (media) {\r\n                      return (\r\n                        '<span class=\"dsd-noti321__preview-media\"' +\r\n                        mediaReadAttrs(media) +\r\n                        ' data-dsd-media-kind=\"' +\r\n                        html(media.kind || \"image\") +\r\n                        '\" data-dsd-inline-media=\"true\"></span>'\r\n                      );\r\n                    })\r\n                    .join(\"\") +\r\n                  \"</div>\"\r\n                : \"\",\r\n              title = compactNotificationTitle(n, cat, actorLine),\r\n              body = publicDisplayText(n.body || \"\", \"\"),\r\n              badgeLabel = notificationBadgeLabel(n, cat, groupCount),\r\n              badge = badgeLabel\r\n                ? '<span class=\"dsd-noti321__badge\">' +\r\n                  html(badgeLabel) +\r\n                  \"</span>\"\r\n                : \"\",\r\n              rowHref = href || \"/pages/notifications\",\n              filterKind = notificationRelationshipFilter(n),\n              followRequestActionable = actionableFollowRequestNotification(n, filterKind),\n              followRequestSourceUid = followRequestActionable\n                ? String(n.actorUid || n.sourceUid || n.authorUid || \"\").trim()\n                : \"\",\n              followRequestSourceKey = followRequestActionable\n                ? nonPlaceholderProfileKey(n.actorProfileKey || n.sourceProfileKey || n.authorProfileKey || thumbProfileKey || \"\")\n                : \"\",\n              followRequestActions = followRequestSourceUid || followRequestSourceKey\n                ? '<span class=\"dsd-noti321__inline-actions\" role=\"group\" aria-label=\"Follow request actions\"><button type=\"button\" data-dsd-accept-follow-request=\"' +\n                  html(followRequestSourceUid) +\n                  '\" data-profile-key=\"' +\n                  html(followRequestSourceKey) +\n                  '\">Accept</button><button type=\"button\" data-dsd-decline-follow-request=\"' +\n                  html(followRequestSourceUid) +\n                  '\" data-profile-key=\"' +\n                  html(followRequestSourceKey) +\n                  '\">Decline</button></span>'\n                : \"\";\n            return (\n              '<article class=\"dsd-noti321__card dsd-launch-notification-card ' +\n              (unread ? \"is-unread \" : \"\") +\r\n              (cat === \"founder\" ? \"is-founder \" : \"\") +\r\n              (groupCount > 1 ? \"is-grouped\" : \"\") +\r\n              '\" href=\"' +\r\n              html(rowHref) +\r\n              '\" data-notification-card data-notification-compact=\"true\" data-notification-id=\"' +\r\n              html(nid) +\r\n              '\" data-category=\"' +\n              html(cat) +\n              '\" data-dsd-notification-filter-kind=\"' +\n              html(filterKind) +\n              '\" data-unread=\"' +\n              unread +\r\n              '\" data-dsd-target-href=\"' +\r\n              html(rowHref) +\r\n              '\" data-dsd-notification-group-count=\"' +\r\n              html(String(groupCount || 1)) +\r\n              '\" aria-label=\"' +\r\n              html(title + (actorLine ? \" from \" + actorLine : \"\")) +\r\n              '\">' +\r\n              thumb +\r\n              '<div class=\"dsd-noti321__content\"><strong>' +\r\n              html(title) +\r\n              \"</strong>\" +\r\n              (actorLine\r\n                ? thumbProfileKey\r\n                  ? '<a class=\"dsd-noti321__actor\" href=\"' +\r\n                    html(profileRouteHref(thumbProfileKey)) +\r\n                    '\">' +\r\n                    html(actorLine) +\r\n                    \"</a>\"\r\n                  : '<span class=\"dsd-noti321__actor\">' +\r\n                    html(actorLine) +\r\n                    \"</span>\"\r\n                : \"\") +\r\n              groupLabel +\r\n              (body ? \"<p>\" + html(body) + \"</p>\" : \"\") +\r\n              preview +\n              followRequestActions +\n              '<small><span data-dsd-relative-time=\"' +\n              html(n.createdAt || n.updatedAt || \"\") +\n              '\">' +\n              html(formatDateTime(n.createdAt || n.updatedAt)) +\n              \"</span></small></div>\" +\n              badge +\n              \"</article>\"\n            );\r\n          })\r\n          .join(\"\")\r\n      : '<article class=\"dsd-launch-notification-card\"><h3>No notifications yet</h3><p>New relationship, content, message, story, and safety updates appear here.</p></article>'),\r\n      hydrateAvatarMedia(feed),\r\n      hydrateMediaReads(feed),\r\n      qsa(\"[data-dsd-notification-total]\").forEach(function (n) {\r\n        n.textContent = String(state.notificationCounts.total);\r\n      }),\r\n      qsa(\"[data-dsd-notification-unread]\").forEach(function (n) {\r\n        n.textContent = String(state.notificationCounts.unread);\r\n      }),\r\n      qsa(\"[data-dsd-notification-founder]\").forEach(function (n) {\n        n.textContent = String(\r\n          canModerate() ? state.notificationCounts.founder : 0,\r\n        );\r\n      }),\n      updateNotificationDockBadge(state.notifications),\n      updateInboxPageUnreadIndicators(),\n      emit(\n        \"notifications\",\r\n        Object.assign({}, state.notificationCounts, {\r\n          items: visible.slice(0, 50),\r\n          notificationPreferences:\r\n            (state.profile && state.profile.notificationPreferences) || {},\r\n          delivery: notificationDeliveryContract(),\r\n          canModerate: canModerate(),\r\n        }),\r\n      ),\r\n      qsa(\".dsd-noti321__panel--founder\").forEach(function (n) {\n        n.hidden = !canModerate();\n      }));\n  }\r\n  function profileIdentity(targetUid, fallbackKey, fallbackName) {\r\n    var profile =\r\n        publicProfileByUid(targetUid || \"\") ||\r\n        publicProfileByKey(fallbackKey || \"\"),\r\n      key =\r\n        (profile && (profile.profileKey || profile.handle)) ||\r\n        fallbackKey ||\r\n        targetUid ||\r\n        \"member\",\r\n      name =\r\n        (profile && profile.displayName) || fallbackName || key || \"DSD member\";\r\n    return {\r\n      uid: targetUid || (profile && profile.uid) || \"\",\r\n      key: key,\r\n      handle: \"@\" + publicHandleText(key, name, \"member\"),\r\n      name: publicDisplayName(name, \"DSD member\"),\r\n      avatarMediaId: (profile && canonicalProfileAvatarMediaId(profile)) || \"\",\r\n    };\r\n  }\r\n  function conversationPeer(conversation) {\n    conversation = conversation || {};\n    if (\n      conversation.source === \"runtime-new-message-draft\" ||\n      conversation.pendingRouteRecipient === !0\n    ) {\n      var draftKey = clean(\n          conversation.recipientProfileKey || conversation.profileKey || \"\",\n          \"\",\n        ),\n        draftName = publicDisplayName(\n          conversation.displayName || conversation.name || draftKey,\n          \"DSD member\",\n        );\n      return {\n        uid: String(conversation.recipientUid || \"\").trim(),\n        key: draftKey,\n        handle: \"@\" + publicHandleText(draftKey, draftName, \"member\"),\n        name: draftName,\n        avatarMediaId: conversation.recipientAvatarMediaId || \"\",\n      };\n    }\n    var ids = (\n        conversation.participantIds ||\r\n        conversation.participants ||\r\n        []\r\n      ).filter(Boolean),\r\n      keys = (conversation.participantKeys || []).filter(Boolean),\r\n      isGroup = conversationType(conversation) === \"groups\";\r\n    if (isGroup) {\r\n      var groupKeys = keys\r\n          .filter(function (item) {\r\n            return clean(item, \"\") !== profileKey();\r\n          })\r\n          .sort(),\r\n        groupIds = ids\r\n          .filter(function (item) {\r\n            return !identityMatchesCurrent(item, \"\");\r\n          })\r\n          .sort(),\r\n        groupProfiles = groupKeys\r\n          .map(function (key) {\r\n            return publicProfileByKey(key);\r\n          })\r\n          .filter(Boolean),\r\n        groupNames = groupProfiles.length\r\n          ? groupProfiles.map(function (profile) {\r\n              return publicDisplayName(\r\n                profile.displayName || profile.profileKey || profile.handle,\r\n                \"DSD member\",\r\n              );\r\n            })\r\n          : groupKeys,\r\n        groupPremiumState = premiumStateObject(\r\n          conversation.premiumState || conversation.premium_state,\r\n        ),\r\n        sharedName = publicDisplayText(\r\n          conversation.displayName ||\r\n            conversation.display_name ||\r\n            conversation.name ||\r\n            groupPremiumState.groupName ||\r\n            groupPremiumState.group_name ||\r\n            \"\",\r\n          \"\",\r\n        ),\r\n        label =\r\n          sharedName ||\r\n          (groupNames.length\r\n            ? groupNames.slice(0, 2).join(\", \") +\r\n              (groupNames.length > 2\r\n                ? \" +\" + String(groupNames.length - 2)\r\n                : \"\")\r\n            : \"Group conversation\"),\r\n        firstProfile = groupProfiles[0] || null;\r\n      return {\r\n        uid: groupIds[0] || \"\",\r\n        key:\r\n          (firstProfile && (firstProfile.profileKey || firstProfile.handle)) ||\r\n          groupKeys[0] ||\r\n          \"\",\r\n        handle: \"group\",\r\n        name: sharedName || \"Group: \" + label,\r\n        avatarMediaId:\r\n          (firstProfile &&\r\n            (firstProfile.avatarMediaId || firstProfile.thumbnailMediaId)) ||\r\n          \"\",\r\n      };\r\n    }\r\n    var canonicalKeys = directConversationIdentityKeys(conversation),\r\n      canonicalPeerKey =\r\n        canonicalKeys.filter(function (item) {\r\n          return clean(item, \"\") !== profileKey();\r\n        })[0] || \"\",\r\n      localNickname = currentPrivateConversationNickname(conversation);\r\n    if (canonicalPeerKey) {\n      var canonicalProfile = publicProfileByKey(canonicalPeerKey),\n        canonicalPeerUid =\n          ids.filter(function (item) {\n            return (\n              /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(\n                String(item || \"\").trim(),\n              ) && !identityMatchesCurrent(item, \"\")\n            );\n          })[0] || \"\",\n        canonicalIdentity = profileIdentity(\n          \"\",\n          canonicalPeerKey,\n          (canonicalProfile && canonicalProfile.displayName) ||\n            canonicalPeerKey,\n        );\n      return (\n        (canonicalIdentity.uid = canonicalPeerUid),\n        localNickname &&\n          (canonicalIdentity.name = publicDisplayName(\r\n            localNickname,\r\n            canonicalIdentity.name,\r\n          )),\r\n        canonicalIdentity\r\n      );\r\n    }\r\n    var peerUid =\r\n        ids.filter(function (item) {\r\n          return !identityMatchesCurrent(item, \"\");\r\n        })[0] ||\r\n        ids[0] ||\r\n        conversation.recipientUid ||\r\n        \"\",\r\n      peerKey =\r\n        keys.filter(function (item) {\r\n          return clean(item, \"\") !== profileKey();\r\n        })[0] ||\r\n        keys[0] ||\r\n        conversation.recipientProfileKey ||\r\n        conversation.profileKey ||\r\n        peerUid,\r\n      directIdentity = profileIdentity(\r\n        peerUid,\r\n        peerKey,\r\n        localNickname ||\r\n          conversation.displayName ||\r\n          conversation.name ||\r\n          peerKey ||\r\n          conversation.conversationId ||\r\n          conversation.id ||\r\n          \"Conversation\",\r\n      );\r\n    return (\r\n      localNickname &&\r\n        (directIdentity.name = publicDisplayName(\r\n          localNickname,\r\n          directIdentity.name,\r\n        )),\r\n      directIdentity\r\n    );\r\n  }\r\n  function messageParticipantProfileKeys(conversations) {\r\n    var keys = {};\r\n    function add(value) {\r\n      value = normalizedProfileKeyValue(value || \"\");\r\n      value && (keys[value] = !0);\r\n    }\r\n    add(profileKey());\r\n    (conversations || []).forEach(function (conversation) {\r\n      (\r\n        conversation.participantKeys ||\r\n        conversation.participantProfileKeys ||\r\n        conversation.participant_profile_keys ||\r\n        []\r\n      ).forEach(add);\r\n      add(conversation.recipientProfileKey || conversation.profileKey || \"\");\r\n      directConversationIdentityKeys(conversation).forEach(add);\r\n    });\r\n    return Object.keys(keys).sort().slice(0, 48);\r\n  }\r\n  function hydrateMessageParticipantProfiles(reason) {\r\n    if (!messagesRouteActive() || !hasCustomer()) return Promise.resolve([]);\r\n    var keys = messageParticipantProfileKeys(state.conversations),\r\n      signature = keys.join(\"|\");\r\n    if (!signature) return Promise.resolve([]);\r\n    if (state.messageParticipantProfilesLoadedSignature === signature)\r\n      return Promise.resolve([]);\r\n    if (\r\n      state.messageParticipantProfilesPromise &&\r\n      state.messageParticipantProfilesSignature === signature\r\n    )\r\n      return state.messageParticipantProfilesPromise;\r\n    state.messageParticipantProfilesSignature = signature;\r\n    state.messageParticipantProfilesPromise = waitForSupabaseAdapter(\r\n      \"publicProfiles\",\r\n      \"discoveryProfileCards\",\r\n    )\r\n      .then(function (adapter) {\r\n        return adapter.discoveryProfileCards(\r\n          { limit: keys.length, profileKeys: keys },\r\n          {\r\n            publicRead: !1,\r\n            viewerAuthenticated: !0,\r\n            surface: \"message-participant-profiles\",\r\n          },\r\n        );\r\n      })\r\n      .then(function (profiles) {\r\n        if (state.messageParticipantProfilesSignature !== signature) return [];\r\n        state.publicProfiles = dedupePublicProfiles(\r\n          (state.publicProfiles || []).concat(profiles || []),\r\n        );\r\n        state.messageParticipantProfilesLoadedSignature = signature;\r\n        publishPublicProfiles(state.publicProfiles);\r\n        claim(\"message-participant-profiles:loaded\", {\r\n          reason: reason || \"messages-route\",\r\n          requested: keys.length,\r\n          resolved: (profiles || []).length,\r\n          requests: 1,\r\n          perThreadReads: 0,\r\n          canonical: \"dsd_discovery_profile_cards\",\r\n        });\r\n        renderMessages();\r\n        return profiles || [];\r\n      })\r\n      .catch(function (error) {\r\n        claim(\"message-participant-profiles:blocked\", {\r\n          reason: reason || \"messages-route\",\r\n          requested: keys.length,\r\n          error: (error && error.message) || String(error),\r\n          failClosed: !0,\r\n        });\r\n        return [];\r\n      })\r\n      .then(function (profiles) {\r\n        state.messageParticipantProfilesPromise = null;\r\n        return profiles;\r\n      });\r\n    return state.messageParticipantProfilesPromise;\r\n  }\r\n  function privateConversationNicknamesMap() {\r\n    var p = state.profile || {},\r\n      meta = p.metadata && typeof p.metadata == \"object\" ? p.metadata : {};\r\n    return Object.assign(\r\n      {},\r\n      meta.messageConversationNicknames ||\r\n        meta.message_conversation_nicknames ||\r\n        {},\r\n      meta.directConversationNicknames ||\r\n        meta.direct_conversation_nicknames ||\r\n        {},\r\n      p.messageConversationNicknames || p.message_conversation_nicknames || {},\r\n      p.directConversationNicknames || p.direct_conversation_nicknames || {},\r\n    );\r\n  }\r\n  function privateConversationNicknameKey(conversationId, conversation) {\r\n    return (\r\n      (conversation = conversation || conversationById(conversationId) || {}),\r\n      String(\r\n        conversationId ||\r\n          conversation.conversationId ||\r\n          conversation.id ||\r\n          state.activeConversationId ||\r\n          \"\",\r\n      ).trim()\r\n    );\r\n  }\r\n  function privateConversationNicknameKeys(conversationId, conversation) {\r\n    conversation = conversation || conversationById(conversationId) || {};\r\n    var keys = [];\r\n    function add(value) {\r\n      ((value = String(value || \"\").trim()),\r\n        value && keys.indexOf(value) === -1 && keys.push(value));\r\n    }\r\n    return (\r\n      add(conversationId),\r\n      add(conversation.conversationId),\r\n      add(conversation.id),\r\n      conversationId || add(state.activeConversationId),\r\n      conversationType(conversation) !== \"groups\" &&\r\n        (directConversationIdentityKeys(conversation).forEach(function (key) {\r\n          clean(key, \"\") !== profileKey() && add(clean(key, \"\"));\r\n        }),\r\n        (\r\n          conversation.participantKeys ||\r\n          conversation.participantProfileKeys ||\r\n          conversation.participant_profile_keys ||\r\n          []\r\n        ).forEach(function (key) {\r\n          clean(key, \"\") !== profileKey() && add(clean(key, \"\"));\r\n        })),\r\n      keys\r\n    );\r\n  }\r\n  function currentPrivateConversationNickname(conversation) {\r\n    for (\r\n      var map = privateConversationNicknamesMap(),\r\n        keys = privateConversationNicknameKeys(\"\", conversation),\r\n        i = 0;\r\n      i < keys.length;\r\n      i += 1\r\n    ) {\r\n      var value = String(map[keys[i]] || \"\").trim();\r\n      if (value) return value;\r\n    }\r\n    return \"\";\r\n  }\r\n  function messageSenderIdentity(message, mine, conversation) {\r\n    if (mine)\r\n      return profileIdentity(\r\n        actorRelationshipIdentity(),\r\n        profileKey(),\r\n        displayName(),\r\n      );\r\n    if (conversation && conversationType(conversation) !== \"groups\") {\r\n      var peer = conversationPeer(conversation);\r\n      if (peer && (peer.uid || peer.key)) return peer;\r\n    }\r\n    return profileIdentity(\r\n      message.senderUid || message.authorUid || \"\",\r\n      message.senderProfileKey || message.authorProfileKey || \"\",\r\n      message.senderDisplayName || message.authorDisplayName || \"DSD member\",\r\n    );\r\n  }\r\n  function messageAvatar(identity, extraClass, actionMode) {\r\n    var cls = \"dsd-msg384__avatar\" + (extraClass ? \" \" + extraClass : \"\"),\r\n      media =\r\n        identity && identity.avatarMediaId\r\n          ? ' data-dsd-avatar-media-id=\"' + html(identity.avatarMediaId) + '\"'\r\n          : \"\",\r\n      key = (identity && identity.key) || \"\",\r\n      inner =\r\n        '<span class=\"' +\r\n        cls +\r\n        '\"' +\r\n        media +\r\n        \">\" +\r\n        html(initials((identity && identity.name) || key || \"DS\")) +\r\n        \"</span>\";\r\n    return actionMode === \"plain-avatar\"\r\n      ? inner\r\n      : actionMode === \"button-profile\" && key\r\n        ? '<a class=\"dsd-msg384__profile-avatar-link\" href=\"' +\r\n          html(profileRouteHref(key)) +\r\n          '\" aria-label=\"View profile ' +\r\n          html((identity && identity.name) || key) +\r\n          '\">' +\r\n          inner +\r\n          \"</a>\"\r\n        : extraClass && key\r\n          ? '<a class=\"dsd-msg384__profile-avatar-link\" href=\"' +\r\n            html(profileRouteHref(key)) +\r\n            '\" aria-label=\"View profile ' +\r\n            html((identity && identity.name) || key) +\r\n            '\">' +\r\n            inner +\r\n            \"</a>\"\r\n          : inner;\r\n  }\r\n  function directConversationIdentityKeys(conversation) {\n    conversation = conversation || {};\n    var byKey = {},\n      declaredKeys =\n        conversation.participantKeys ||\n        conversation.participantProfileKeys ||\n        conversation.participant_profile_keys ||\n        [];\n    function addKey(value) {\r\n      var key = clean(value || \"\", \"\");\r\n      key && (byKey[key] = !0);\r\n    }\r\n    function addIdentity(value) {\r\n      var raw = String(value || \"\").trim();\r\n      if (raw) {\r\n        var canonicalKey = canonicalProfileKeyForIdentity(raw);\r\n        (canonicalKey && addKey(canonicalKey),\r\n          identityMatchesCurrent(raw, \"\") && addKey(profileKey()));\r\n        var profile = publicProfileByIdentity(raw);\r\n        profile && addKey(profile.profileKey || profile.handle || raw);\r\n      }\r\n    }\r\n    (declaredKeys.forEach(addKey),\n      !declaredKeys.length && (\n        conversation.participantIds ||\n        conversation.participants ||\n        conversation.participant_ids ||\n        []\n      ).forEach(addIdentity));\n    var legacy = String(\r\n      conversation.conversationId ||\r\n        conversation.id ||\r\n        conversation.legacy_conversation_id ||\r\n        \"\",\r\n    ).toLowerCase();\r\n    return (\n      legacy &&\n        !declaredKeys.length &&\n        (state.publicProfiles.forEach(function (profile) {\n          var identityValues = [\r\n            profile.uid,\r\n            profile.profileKey,\r\n            profile.handle,\r\n          ].filter(Boolean);\r\n          identityValues.some(function (value) {\r\n            return value && legacy.indexOf(String(value).toLowerCase()) !== -1;\r\n          }) && addKey(profile.profileKey || profile.handle);\r\n        }),\r\n        currentIdentityValues().forEach(function (value) {\r\n          legacy.indexOf(String(value).toLowerCase()) !== -1 &&\r\n            addKey(profileKey());\r\n        })),\r\n      Object.keys(byKey).filter(Boolean).sort()\r\n    );\r\n  }\r\n  function conversationDedupeKey(conversation, type) {\r\n    if (type === \"groups\") {\r\n      var groupKeys = directConversationIdentityKeys(conversation);\r\n      if (groupKeys.length >= 2) return \"groups:\" + groupKeys.join(\"|\");\r\n    }\r\n    if (type === \"direct\") {\r\n      var keys = directConversationIdentityKeys(conversation);\r\n      if (keys.length >= 2) return \"direct:\" + keys.join(\"|\");\r\n      if (keys.length === 1) {\r\n        var peer = conversationPeer(conversation);\r\n        return (\r\n          \"direct:\" +\r\n          [keys[0], clean((peer && (peer.key || peer.uid)) || \"\", \"member\")]\r\n            .sort()\r\n            .join(\"|\")\r\n        );\r\n      }\r\n    }\r\n    var ids = (conversation.participantIds || conversation.participants || [])\r\n        .filter(Boolean)\r\n        .sort(),\r\n      peerIdentity = conversationPeer(conversation);\r\n    return (\r\n      type +\r\n      \":\" +\r\n      (ids.length\r\n        ? ids.join(\"|\")\r\n        : peerIdentity.uid ||\r\n          peerIdentity.key ||\r\n          conversation.conversationId ||\r\n          conversation.id ||\r\n          \"\")\r\n    );\r\n  }\r\n  function conversationDedupeScore(conversation) {\r\n    var score = conversationActivityMillis(conversation);\r\n    return (\r\n      conversation &&\r\n        String(conversation.lastMessagePreview || \"\").trim() &&\r\n        (score += 1e13),\r\n      score\r\n    );\r\n  }\r\n  function canonicalDirectConversationIdFromKeys(keys) {\r\n    if (\r\n      ((keys = (keys || [])\r\n        .map(function (key) {\r\n          return clean(key || \"\", \"\");\r\n        })\r\n        .filter(Boolean)\r\n        .sort()),\r\n      keys.length < 2)\r\n    )\r\n      return \"\";\r\n    var selfKey = clean(profileKey() || \"\", \"\");\r\n    if (selfKey && keys.indexOf(selfKey) !== -1) {\r\n      var peerKey =\r\n        keys.filter(function (key) {\r\n          return key !== selfKey;\r\n        })[0] || \"\";\r\n      keys = [selfKey, peerKey].filter(Boolean).sort();\r\n    } else keys = keys.slice(0, 2).sort();\r\n    return keys.length === 2\r\n      ? clean(\"conv-\" + keys.join(\"-\"), \"conversation\")\r\n      : \"\";\r\n  }\r\n  function conversationType(conversation) {\r\n    var explicit = String(\r\n      (conversation &&\r\n        (conversation.type ||\r\n          conversation.conversationType ||\r\n          conversation.kind ||\r\n          \"\")) ||\r\n        \"\",\r\n    ).toLowerCase();\r\n    if (\r\n      explicit === \"request\" ||\r\n      explicit === \"requests\" ||\r\n      String((conversation && conversation.state) || \"\").toLowerCase() ===\r\n        \"request\"\r\n    )\r\n      return \"requests\";\r\n    if (\r\n      explicit === \"safety\" ||\r\n      (conversation &&\r\n        (conversation.reported || conversation.blocked || conversation.muted))\r\n    )\r\n      return \"safety\";\r\n    var cid = String(\r\n      (conversation &&\r\n        (conversation.conversationId || conversation.id || \"\")) ||\r\n        \"\",\r\n    ).toLowerCase();\r\n    if (\r\n      explicit === \"group\" ||\r\n      explicit === \"groups\" ||\r\n      cid.indexOf(\"group-\") === 0\r\n    ) {\r\n      var groupKeys = directConversationIdentityKeys(conversation),\r\n        nonSelfKeys = groupKeys.filter(function (key) {\r\n          return clean(key, \"\") !== profileKey();\r\n        }),\r\n        declaredRecipients = parseGroupRecipients(\r\n          (conversation && conversation.groupRecipients) || \"\",\r\n        ).filter(function (key) {\r\n          return clean(key, \"\") !== profileKey();\r\n        });\r\n      return nonSelfKeys.length >= 2 || declaredRecipients.length >= 2\r\n        ? \"groups\"\r\n        : \"direct\";\r\n    }\r\n    var ids = (\r\n      (conversation &&\r\n        (conversation.participantIds || conversation.participants)) ||\r\n      []\r\n    ).filter(Boolean);\r\n    return ids.length > 2 ? \"groups\" : \"direct\";\r\n  }\r\n  function directConversationHasPeer(conversation) {\r\n    if (\r\n      !conversation ||\r\n      conversationType(conversation) !== \"direct\" ||\r\n      conversation.pendingRouteRecipient\r\n    )\r\n      return !0;\r\n    var peer = conversationPeer(conversation);\r\n    return !!(\r\n      peer &&\r\n      (peer.uid || peer.key) &&\r\n      !identityMatchesCurrent(peer.uid, peer.key || \"\")\r\n    );\r\n  }\r\n  function conversationById(conversationId) {\r\n    var cid = String(conversationId || \"\").trim();\r\n    if (!cid) return null;\r\n    var match =\r\n      (state.conversations || []).filter(function (conversation) {\r\n        return (\r\n          String(conversation.conversationId || conversation.id || \"\") === cid\r\n        );\r\n      })[0] || null;\r\n    if (match) return match;\r\n    var routeDraft = routeRecipientConversation();\r\n    if (\r\n      routeDraft &&\r\n      String(routeDraft.conversationId || routeDraft.id || \"\") === cid\r\n    )\r\n      return routeDraft;\r\n    var routeGroupDraft = routeGroupConversation();\r\n    return routeGroupDraft &&\r\n      String(routeGroupDraft.conversationId || routeGroupDraft.id || \"\") === cid\r\n      ? routeGroupDraft\r\n      : null;\r\n  }\r\n  function conversationPinnedByCurrent(conversation) {\r\n    var premiumState = premiumStateObject(\r\n        conversation &&\r\n          (conversation.premiumState || conversation.premium_state),\r\n      ),\r\n      uidPin =\r\n        premiumState.pinsByUserId &&\r\n        premiumState.pinsByUserId[actorRelationshipIdentity()],\r\n      keyPin =\r\n        premiumState.pinsByProfileKey &&\r\n        premiumState.pinsByProfileKey[profileKey()];\r\n    // Viewer-scoped preferences are canonical. A stored false value must\n    // override the retired conversation-level flag so unpin survives reload.\n    if (uidPin && typeof uidPin.pinned == \"boolean\") return uidPin.pinned;\n    if (keyPin && typeof keyPin.pinned == \"boolean\") return keyPin.pinned;\n    return !!(conversation && conversation.pinned === !0);\n  }\r\n  function currentPinnedConversationCount(excludeConversationId) {\r\n    var exclude = String(excludeConversationId || \"\").trim();\r\n    return activeConversationRecords(state.conversations || []).filter(\r\n      function (conversation) {\r\n        var id = String(\r\n          conversation.conversationId || conversation.id || \"\",\r\n        ).trim();\r\n        return (\r\n          id && id !== exclude && conversationPinnedByCurrent(conversation)\r\n        );\r\n      },\r\n    ).length;\r\n  }\r\n  function normalizeMessageMedia(message) {\r\n    message = message || {};\r\n    var media = [];\r\n    function add(item) {\r\n      if (item) {\r\n        typeof item == \"string\" && (item = { mediaId: item });\r\n        var id =\r\n          readableMediaId(item) ||\r\n          item.media_id ||\r\n          item.mediaObjectId ||\r\n          item.media_object_id ||\r\n          item.supabaseMediaId ||\r\n          item.supabase_media_id ||\r\n          item.legacyMediaId ||\r\n          item.legacy_media_id ||\r\n          item.id ||\r\n          \"\";\r\n        if (id) {\r\n          var kind =\r\n            String(\r\n              item.kind ||\r\n                item.mediaKind ||\r\n                item.media_kind ||\r\n                item.contentType ||\r\n                item.content_type ||\r\n                \"\",\r\n            )\r\n              .toLowerCase()\r\n              .indexOf(\"video\") !== -1\r\n              ? \"video\"\r\n              : \"image\";\r\n          media.push(\n            Object.assign({}, item, {\n              mediaId: item.mediaId || id,\r\n              id: item.id || id,\r\n              kind: kind,\r\n              status:\r\n                item.status ||\r\n                item.uploadState ||\r\n                item.upload_state ||\r\n                \"uploaded\",\r\n            }),\n          );\n        }\n      }\n    }\n    ([\n      message.media,\r\n      message.attachments,\r\n      message.messageMedia,\r\n      message.message_media,\r\n      message.messageAttachments,\r\n      message.message_attachments,\r\n      message.mediaObjects,\r\n      message.media_objects,\r\n      message.mediaManifests,\r\n      message.media_manifests,\r\n    ].forEach(function (list) {\r\n      Array.isArray(list)\r\n        ? list.forEach(add)\r\n        : list && typeof list == \"object\" && add(list);\r\n    }),\r\n      [\r\n        message.mediaId,\r\n        message.media_id,\r\n        message.mediaObjectId,\r\n        message.media_object_id,\r\n        message.attachmentMediaId,\r\n        message.attachment_media_id,\r\n      ].forEach(function (id) {\r\n        id &&\r\n          add({\r\n            mediaId: id,\r\n            kind:\r\n              message.mediaKind ||\r\n              message.media_kind ||\r\n              message.kind ||\r\n              \"image\",\r\n          });\r\n      }));\r\n    var seen = {};\r\n    return media.filter(function (item) {\r\n      var id = readableMediaId(item) || item.mediaId || item.id || \"\";\r\n      return !id || seen[id] ? !1 : ((seen[id] = !0), !0);\r\n    });\r\n  }\r\n  function messageMediaHTML(message) {\r\n    var media = normalizeMessageMedia(message),\r\n      messageId = (message && (message.messageId || message.id || \"\")) || \"\",\r\n      viewOnce = !!(message && (message.viewOnce || message.view_once)),\r\n      mine = identityMatchesCurrent(\r\n        message && message.senderUid,\r\n        message && message.senderProfileKey,\r\n      ),\r\n      revealActive = messageViewOnceRevealActive(message),\n      revealKey = messageViewOnceRevealKey(\n        state.activeConversationId || (message && message.conversationId),\n        messageId,\n      ),\n      prepared =\n        (state.messageViewOncePreparedMedia &&\n          state.messageViewOncePreparedMedia[revealKey]) ||\n        [],\n      visibleMedia = media.slice(0, 4),\n      mediaRemainder = Math.max(0, media.length - visibleMedia.length),\n      mediaLayout = mediaLayoutType(media);\n    if (viewOnce && mine)\n      return (\n        '<div class=\"dsd-msg384__view-once-status\" role=\"status\"><strong>' +\n        (messageViewOnceConsumed(message)\n          ? \"View-once media opened\"\n          : \"View-once media sent\") +\n        \"</strong><span>\" +\n        (messageViewOnceConsumed(message)\n          ? \"The recipient opened this media.\"\n          : \"The recipient can open this media once.\") +\n        \"</span></div>\"\n      );\n    if (messageViewOnceConsumed(message) && !revealActive) return \"\";\n    return viewOnce && !mine && revealActive && prepared.length\r\n      ? '<div class=\"dsd-msg384__message-media\" data-dsd-media-count=\"' +\r\n          html(prepared.length) +\r\n          '\" aria-label=\"View-once message media\">' +\r\n          prepared\r\n            .map(function (item) {\r\n              var kind = item.kind === \"video\" ? \"video\" : \"image\",\r\n                mediaElement =\r\n                  kind === \"video\"\r\n                    ? '<video src=\"' +\r\n                      html(item.objectUrl) +\r\n                      '\" controls playsinline preload=\"metadata\"></video>'\r\n                    : '<img src=\"' +\r\n                      html(item.objectUrl) +\r\n                      '\" alt=\"\" decoding=\"async\">';\r\n              return (\r\n                '<figure class=\"dsd-launch-media-chip dsd-launch-media-chip--' +\r\n                kind +\r\n                ' dsd-msg384__media-chip is-ready\" data-dsd-media-kind=\"' +\r\n                kind +\r\n                '\" data-dsd-message-view-once-revealed=\"true\">' +\r\n                mediaElement +\r\n                \"</figure>\"\r\n              );\r\n            })\r\n            .join(\"\") +\r\n          \"</div>\"\r\n      : media.length\r\n        ? '<div class=\"dsd-msg384__message-media\" data-dsd-media-count=\"' +\n          html(Math.min(4, media.length)) +\n          '\" data-dsd-media-layout=\"' +\n          html(mediaLayout) +\n          '\" aria-label=\"' +\n          html(media.length + (media.length === 1 ? \" message attachment\" : \" message attachments\")) +\n          '\">' +\n          visibleMedia\n            .map(function (item, mediaIndex) {\n              var kind =\r\n                  String(item.kind || item.mediaKind || item.contentType || \"\")\r\n                    .toLowerCase()\r\n                    .indexOf(\"video\") !== -1\r\n                    ? \"video\"\r\n                    : \"image\",\r\n                mediaId = readableMediaId(item);\r\n              return viewOnce && !mine && !revealActive\r\n                ? '<button type=\"button\" class=\"dsd-msg384__view-once-open\" data-dsd-message-media-open=\"true\" data-message-id=\"' +\r\n                    html(messageId) +\r\n                    '\" data-dsd-message-view-once=\"true\" data-dsd-view-once-media-id=\"' +\r\n                    html(mediaId) +\r\n                    '\"><strong>Open view-once ' +\r\n                    html(kind) +\r\n                    \"</strong><span>This media closes after viewing.</span></button>\"\r\n                : '<figure class=\"dsd-launch-media-chip dsd-launch-media-chip--' +\r\n                    html(kind) +\r\n                    ' dsd-msg384__media-chip\" data-dsd-inline-media=\"true\" data-dsd-message-media-open=\"true\" data-message-id=\"' +\r\n                    html(messageId) +\r\n                    '\" data-dsd-media-index=\"' +\r\n                    html(mediaIndex) +\r\n                    '\" data-dsd-message-view-once=\"' +\r\n                    (viewOnce ? \"true\" : \"false\") +\r\n                    '\"' +\r\n                    mediaReadAttrs(item) +\r\n                    ' data-dsd-media-kind=\"' +\r\n                    html(kind) +\r\n                    '\" data-dsd-media-status=\"' +\r\n                    html(item.status || \"uploaded\") +\n                    '\" aria-label=\"Open message ' +\n                    html(kind) +\n                    '\">' +\n                    (mediaRemainder && mediaIndex === visibleMedia.length - 1\n                      ? '<span class=\"dsd-launch-media-remainder\" aria-label=\"' +\n                        html(mediaRemainder + \" more attachments\") +\n                        '\">+' +\n                        html(mediaRemainder) +\n                        \"</span>\"\n                      : \"\") +\n                    \"</figure>\";\n            })\n            .join(\"\") +\r\n          \"</div>\"\r\n        : \"\";\r\n  }\r\n  function messageStoryReferenceHTML(message) {\n    var ref2 = storyReferenceEnvelope(message);\r\n    if (!ref2 || !ref2.storyId) return \"\";\r\n    var label = ref2.authorDisplayName || ref2.authorProfileKey || \"Story\",\r\n      caption = ref2.captionExcerpt\r\n        ? \"<p>\" + html(ref2.captionExcerpt) + \"</p>\"\r\n        : \"<p>Story reply</p>\",\r\n      kind = ref2.mediaKind\r\n        ? \"<span>\" + html(ref2.mediaKind) + \"</span>\"\r\n        : \"<span>story</span>\",\r\n      expires = ref2.expiresAt\r\n        ? \"<small>Expires \" +\r\n          html(formatDateTime(ref2.expiresAt) || ref2.expiresAt) +\r\n          \"</small>\"\r\n        : \"\";\r\n    return (\r\n      '<a class=\"dsd-msg384__story-ref\" href=\"/pages/feed?story=' +\r\n      encodeURIComponent(ref2.storyId) +\r\n      '\" data-dsd-open-story-viewer data-dsd-message-story-reference=\"' +\r\n      html(ref2.storyId) +\r\n      '\"><strong>Replying to ' +\r\n      html(label) +\r\n      \"</strong>\" +\r\n      caption +\r\n      \"<div>\" +\r\n      kind +\r\n      expires +\n      \"</div></a>\"\n    );\n  }\n  function messageReplySourceHTML(message, premiumState) {\n    var reply = message && (message.replyTo || message.reply_to),\n      replyId = message && (message.replyToMessageId || message.reply_to_message_id);\n    if (!reply && !replyId) return \"\";\n    if (!reply || reply.available === !1 || !premiumState.allowReference)\n      return '<button type=\"button\" class=\"dsd-msg384__reply-source is-unavailable\" disabled><strong>Original message unavailable</strong><span>The quoted content is no longer available.</span></button>';\n    return (\n      '<button type=\"button\" class=\"dsd-msg384__reply-source\" data-dsd-message-jump=\"' +\n      html(reply.messageId || replyId || \"\") +\n      '\"><strong>' +\n      html(reply.senderProfileKey ? \"@\" + reply.senderProfileKey : \"Reply\") +\n      \"</strong><span>\" +\n      html(String(reply.excerpt || \"Message\").slice(0, 180)) +\n      \"</span></button>\"\n    );\n  }\n  function messageReactionState(message) {\n    var value = (message && message.reactions) || {},\n      counts = value.counts && typeof value.counts === \"object\" ? value.counts : {};\n    return { counts: counts, selectedReaction: String(value.selectedReaction || value.selected_reaction || \"\") };\n  }\n  function messageInteractionActionsHTML(message, premiumState) {\n    var messageId = String((message && (message.messageId || message.id)) || \"\"),\n      supabaseMessageId = String((message && (message.supabaseMessageId || message.supabase_message_id)) || \"\"),\n      terminal = !messageId || !supabaseMessageId || !premiumState.allowReference || message.viewOnce || message.view_once,\n      reaction = messageReactionState(message),\n      definitions = [\n        [\"thumbs_up\", \"Like\"], [\"love\", \"Love\"], [\"laugh\", \"Laugh\"],\n        [\"wow\", \"Wow\"], [\"sad\", \"Sad\"], [\"angry\", \"Angry\"]\n      ];\n    if (terminal) return \"\";\n    return (\n      '<div class=\"dsd-msg384__interaction-actions\" aria-label=\"Message actions\">' +\n      '<button type=\"button\" data-dsd-message-row-action=\"reply\" data-message-id=\"' + html(messageId) + '\" data-supabase-message-id=\"' + html(supabaseMessageId) + '\">Reply</button>' +\n      (String(premiumState.body || \"\").trim()\n        ? '<button type=\"button\" data-dsd-message-row-action=\"copy\" data-message-id=\"' + html(messageId) + '\">Copy</button>'\n        : \"\") +\n      '<button type=\"button\" data-dsd-message-row-action=\"report\" data-message-id=\"' + html(messageId) + '\" data-supabase-message-id=\"' + html(supabaseMessageId) + '\">Report</button>' +\n      '<details class=\"dsd-msg384__reaction-picker\"><summary>React</summary><div>' +\n      definitions.map(function (entry) {\n        var key = entry[0], count = Math.max(0, Number(reaction.counts[key] || 0) || 0), selected = reaction.selectedReaction === key;\n        return '<button type=\"button\" data-dsd-message-reaction=\"' + key + '\" data-message-id=\"' + html(messageId) + '\" aria-pressed=\"' + (selected ? \"true\" : \"false\") + '\"><span>' + html(entry[1]) + '</span>' + (count ? '<strong>' + count + '</strong>' : \"\") + '</button>';\n      }).join(\"\") +\n      \"</div></details></div>\"\n    );\n  }\n  function clearMessageReplyDraft() {\n    state.messageReplyDraft = null;\n    var preview = qs(\"[data-dsd-message-reply-draft]\");\n    preview && preview.remove();\n  }\n  function renderMessageReplyDraft() {\n    var form = qs(\"[data-dsd-message-drawer-form]\"),\n      draft = state.messageReplyDraft,\n      preview = form && qs(\"[data-dsd-message-reply-draft]\", form);\n    if (!form || !draft) return (preview && preview.remove(), null);\n    if (!preview) {\n      preview = document.createElement(\"div\");\n      preview.setAttribute(\"data-dsd-message-reply-draft\", \"\");\n      preview.className = \"dsd-msg384__reply-draft\";\n      var textarea = qs('textarea[name=\"body\"]', form);\n      form.insertBefore(preview, textarea || form.firstChild);\n    }\n    preview.innerHTML = '<div><strong>Replying to ' + html(draft.senderLabel || \"message\") + '</strong><span>' + html(draft.excerpt || \"Message\") + '</span></div><button type=\"button\" data-dsd-message-reply-cancel aria-label=\"Cancel reply\">Cancel</button>';\n    return preview;\n  }\n  function beginMessageReplyDraft(conversationId, messageId, supabaseMessageId) {\n    var message = conversationMessageById(conversationId, messageId);\n    if (!message || !supabaseMessageId) return renderStatus(\"This message cannot be replied to.\"), null;\n    var premiumState = messagePremiumDisplayState(message, conversationById(conversationId) || {}, identityMatchesCurrent(message.senderUid, message.senderProfileKey));\n    if (!premiumState.allowReference || message.viewOnce || message.view_once) return renderStatus(\"Protected or unavailable messages cannot be quoted.\"), null;\n    var sender = messageSenderIdentity(\r\n      message,\r\n      identityMatchesCurrent(message.senderUid, message.senderProfileKey),\r\n      conversationById(conversationId) || {},\r\n    );\r\n    state.messageReplyDraft = {\n      conversationId: conversationId,\n      messageId: supabaseMessageId,\n      legacyMessageId: messageId,\n      senderLabel: sender.handle || sender.name || \"message\",\n      excerpt: String(premiumState.body || \"Message\").slice(0, 180)\n    };\n    renderMessageReplyDraft();\n    var field = qs('[data-dsd-message-drawer-form] textarea[name=\"body\"]');\n    field && field.focus();\n    return state.messageReplyDraft;\n  }\n  function reactToMessage(conversationId, messageId, reaction) {\n    var message = conversationMessageById(conversationId, messageId),\n      current = messageReactionState(message),\n      next = current.selectedReaction === reaction ? \"\" : reaction;\n    if (!message) return Promise.resolve(null);\n    return premiumMessageActionViaProxy({\n      action: \"react_message\",\n      conversationId: conversationId,\n      messageId: messageId,\n      reaction: next\n    }).then(function (result) {\n      var persisted = result && result.reaction ? result.reaction : result || {},\n        patch = { reactions: { counts: persisted.counts || {}, selectedReaction: persisted.selectedReaction || persisted.selected_reaction || \"\" } };\n      updateLocalMessage(conversationId, messageId, patch);\n      renderMessages();\n      broadcastMessageChangeToParticipants(conversationId, messageId, \"reaction\");\n      hydrateConversationMessages(conversationId, { mode: \"affected\", messageId: messageId, force: !0 });\n      return persisted;\n    }).catch(function (error) {\n      renderStatus(\"Message reaction could not be updated.\");\n      return null;\n    });\n  }\n  function jumpToMessageSource(conversationId, messageId, attempt) {\n    var target = qsa('[data-message-id]').filter(function (node) {\n      return String(node.getAttribute(\"data-message-id\") || \"\") === String(messageId || \"\");\n    })[0];\n    if (target) {\n      target.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n      target.classList.add(\"is-jump-target\");\n      window.setTimeout(function () {\n        target && target.classList.remove(\"is-jump-target\");\n      }, 1600);\n      return Promise.resolve(target);\n    }\n    attempt = Math.max(0, Number(attempt || 0));\n    var owner = state.messageListeners[conversationId] || null;\n    if (attempt >= 5 || !owner || !owner.hasMore) {\n      renderStatus(\"The original message is no longer available in this conversation.\");\n      return Promise.resolve(null);\n    }\n    return Promise.resolve(owner.loadOlder())\n      .then(function () { return jumpToMessageSource(conversationId, messageId, attempt + 1); });\n  }\n  function messageDayPresentation(value) {\n    var millis = valueMillis(value),\n      date = millis ? new Date(millis) : null;\n    if (!date || isNaN(date.getTime())) return null;\n    var today = new Date(),\n      yesterday = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 1),\n      day = new Date(date.getFullYear(), date.getMonth(), date.getDate()),\n      key = [\n        date.getFullYear(),\n        String(date.getMonth() + 1).padStart(2, \"0\"),\n        String(date.getDate()).padStart(2, \"0\"),\n      ].join(\"-\");\n    return {\n      key: key,\n      label:\n        day.getTime() ===\n        new Date(today.getFullYear(), today.getMonth(), today.getDate()).getTime()\n          ? \"Today\"\n          : day.getTime() === yesterday.getTime()\n            ? \"Yesterday\"\n            : date.toLocaleDateString(void 0, {\n                month: \"short\",\n                day: \"numeric\",\n                year: date.getFullYear() === today.getFullYear() ? void 0 : \"numeric\",\n              }),\n    };\n  }\n  function messageLatestOutgoingState(message, conversation) {\n    if (!message || !identityMatchesCurrent(message.senderUid, message.senderProfileKey))\n      return \"\";\n    if (conversationMessageReadByPeer(message, conversation)) {\n      var receiptCount = Math.max(\n        0,\n        Number(message.readReceiptCount || message.read_receipt_count || 0) || 0,\n      );\n      return conversationType(conversation) === \"groups\" && receiptCount > 0\n        ? \"Read by \" + receiptCount\n        : \"Read\";\n    }\n    var status = String(\n      message.deliveryStatus ||\n        message.delivery_status ||\n        message.status ||\n        \"\",\n    ).toLowerCase();\n    if (status === \"delivered\") return \"Delivered\";\n    return [\"sent\", \"confirmed\", \"persisted\"].indexOf(status) !== -1\n      ? \"Sent\"\n      : \"\";\n  }\n  function messageListHTML(conversationId, conversation) {\n    if (conversation && conversationBlocked(conversation))\r\n      return '<article class=\"dsd-msg384__bubble is-system\"><p>Conversation blocked.</p><small>Unblock this participant to resume messaging.</small></article>';\r\n    var threadOwner = state.messageListeners[conversationId] || null,\r\n      olderControl =\r\n        threadOwner && threadOwner.hasMore\r\n          ? '<button type=\"button\" class=\"dsd-msg384__load-older\" data-dsd-message-load-older>Load older messages</button>'\r\n          : \"\",\r\n      messages = dedupeConversationMessages(\n      (state.messagesByConversation[conversationId] || []).filter(\n        messageDisplayable,\n      ),\n    ).filter(messageVisibleAfterViewOnce),\n      cancelledMeetingProposalIds = {},\n      latestOutgoingId = \"\",\n      previousDayKey = \"\";\n    messages.forEach(function (item) {\n      var itemState = premiumStateObject(item.premiumState || item.premium_state),\n        itemProposal = meetingAreaProposalState(itemState.meetingAreaProposal || itemState.meeting_area_proposal);\n      if (itemProposal && itemProposal.state === \"CANCELLED\" && itemProposal.referenceProposalId)\n        cancelledMeetingProposalIds[itemProposal.referenceProposalId] = true;\n      identityMatchesCurrent(item.senderUid, item.senderProfileKey) &&\n        (latestOutgoingId = String(item.messageId || item.id || \"\"));\n    });\n    return messages.length\r\n      ? olderControl +\r\n        messages\r\n          .map(function (message) {\r\n            var mine = identityMatchesCurrent(\r\n                message.senderUid,\r\n                message.senderProfileKey,\r\n              ),\r\n              sender = messageSenderIdentity(message, mine, conversation),\r\n              stableStampValue =\r\n                message.createdAt ||\r\n                message.created_at ||\r\n                message.sentAt ||\r\n                message.sent_at ||\r\n                message.submittedAt ||\r\n                message.submitted_at,\r\n              stamp = formatDateTime(stableStampValue);\r\n            if (!stamp) {\r\n              var stableStampMillis = identifierMillis(\r\n                message.messageId ||\r\n                  message.id ||\r\n                  message.legacyMessageId ||\r\n                  message.legacy_message_id,\r\n              );\r\n              stamp = stableStampMillis\n                ? ((stableStampValue = new Date(stableStampMillis).toISOString()),\n                  formatDateTime(stableStampValue))\n                : \"\";\n            }\r\n            var premiumState = messagePremiumDisplayState(\r\n                message,\r\n                conversation,\r\n                mine,\r\n              ),\r\n              body = premiumState.body,\n              metaLabels = premiumState.labels.filter(Boolean),\n              messageId = String(message.messageId || message.id || \"\"),\n              lifecycleLabel =\n                messageId && messageId === latestOutgoingId\n                  ? messageLatestOutgoingState(message, conversation)\n                  : \"\",\n              day = messageDayPresentation(stableStampValue),\n              daySeparator =\n                day && day.key !== previousDayKey\n                  ? ((previousDayKey = day.key),\n                    '<div class=\"dsd-msg384__date-separator\" role=\"separator\" aria-label=\"' +\n                      html(day.label) +\n                      '\"><span>' +\n                      html(day.label) +\n                      \"</span></div>\")\n                  : \"\";\n            metaLabels = metaLabels.filter(function (label) {\n              return !/^(?:Read(?: by \\d+)?|Delivered|Sent)$/i.test(\n                String(label || \"\").trim(),\n              );\n            });\n            return (\n              daySeparator +\n              '<article class=\"dsd-msg384__bubble ' +\n              (mine ? \"is-me\" : \"\") +\r\n              (premiumState.className ? \" \" + premiumState.className : \"\") +\r\n              '\" data-message-id=\"' +\r\n              html(message.messageId || message.id || \"\") +\r\n              '\" data-dsd-message-render-signature=\"' +\r\n              html(\r\n                messageRowRenderSignature(\n                  message,\n                  conversation,\n                  premiumState,\n                  lifecycleLabel,\n                ),\n              ) +\r\n              '\">' +\r\n              messageAvatar(sender, \"dsd-msg384__bubble-avatar\") +\n              \"<div><strong>\" +\n              html(sender.name) +\r\n              \"</strong><em>\" +\r\n              html(sender.handle) +\r\n              \"</em>\" +\r\n              (premiumState.allowReference\n                ? messageStoryReferenceHTML(message)\n                : \"\") +\n              messageReplySourceHTML(message, premiumState) +\n              (body\r\n                ? \"<p>\" + linkify(publicDisplayText(body, \"\")) + \"</p>\"\r\n                : \"\") +\r\n              (premiumState.allowMedia ? messageMediaHTML(message) : \"\") +\n              (premiumState.meetingAreaProposal &&\n              premiumState.meetingAreaProposal.state === \"SHARED\" &&\n              !cancelledMeetingProposalIds[premiumState.meetingAreaProposal.proposalId] &&\n              !mine\n                ? '<button type=\"button\" class=\"dsd-msg384__meeting-agree\" data-dsd-meeting-respond=\"' +\n                  html(premiumState.meetingAreaProposal.proposalId) +\n                  '\" data-dsd-meeting-city=\"' +\n                  html(premiumState.meetingAreaProposal.city) +\n                  '\" data-dsd-meeting-region=\"' +\n                  html(premiumState.meetingAreaProposal.region) +\n                  '\">Choose your area</button>'\n                : premiumState.meetingAreaProposal &&\n                    premiumState.meetingAreaProposal.state === \"SHARED\" &&\n                    !cancelledMeetingProposalIds[premiumState.meetingAreaProposal.proposalId] &&\n                    mine\n                  ? '<button type=\"button\" class=\"dsd-msg384__meeting-agree\" data-dsd-meeting-cancel-proposal=\"' +\n                    html(premiumState.meetingAreaProposal.proposalId) +\n                    '\" data-dsd-meeting-city=\"' +\n                    html(premiumState.meetingAreaProposal.city) +\n                    '\" data-dsd-meeting-region=\"' +\n                    html(premiumState.meetingAreaProposal.region) +\n                    '\">Cancel proposal</button>'\n                : \"\") +\n              '<small><span data-dsd-relative-time=\"' +\n              html(stableStampValue || \"\") +\n              '\">' +\n              html(stamp || \"Just now\") +\n              \"</span>\" +\n              (metaLabels.length ? \" \\xB7 \" + html(metaLabels.join(\" \\xB7 \")) : \"\") +\n              (lifecycleLabel ? \" \\xB7 \" + html(lifecycleLabel) : \"\") +\n              \"</small>\" +\n              premiumMessageActionsHTML(message, mine, premiumState) +\n              messageInteractionActionsHTML(message, premiumState) +\n              \"</div></article>\"\n            );\r\n          })\r\n          .join(\"\")\r\n      : '<article class=\"dsd-msg384__bubble is-system\"><p>Ready to send a message.</p><small>Messages appear here after delivery.</small></article>';\r\n  }\r\n  function messageRowRenderSignature(\n    message,\r\n    conversation,\r\n    premiumState,\r\n    meta,\r\n  ) {\r\n    var reply = message && (message.replyTo || message.reply_to) || {},\n      reaction = messageReactionState(message),\n      reactionCounts = Object.keys(reaction.counts || {})\n        .sort()\n        .map(function (key) {\n          return key + \":\" + (Number(reaction.counts[key] || 0) || 0);\n        })\n        .join(\",\");\n    for (\n      var mediaIds = normalizeMessageMedia(message)\r\n          .map(function (item) {\r\n            return mediaSignatureId(item);\r\n          })\r\n          .join(\",\"),\r\n        raw = [\r\n          message.messageId || message.id || \"\",\r\n          message.body || \"\",\r\n          message.status || \"\",\r\n          message.updatedAt || message.updated_at || \"\",\r\n          message.unsentAt || message.unsent_at || \"\",\r\n          message.viewOnceOpenedAt || message.view_once_opened_at || \"\",\n          message.viewOnceState || message.view_once_state || \"\",\n          message.viewOnce || message.view_once\n            ? messageViewOnceConsumed(message)\n              ? \"consumed\"\n              : messageViewOnceRevealActive(message)\n                ? \"revealed\"\n                : \"available\"\n            : \"\",\n          message.readReceiptCount || message.read_receipt_count || 0,\n          message.readReceiptAt || message.read_receipt_at || \"\",\n          message.replyToMessageId || message.reply_to_message_id || \"\",\n          reply.messageId || \"\",\n          reply.available === !1 ? \"unavailable\" : \"available\",\n          reply.senderProfileKey || \"\",\n          reply.excerpt || \"\",\n          reaction.selectedReaction || \"\",\n          reactionCounts,\n          (premiumState && premiumState.className) || \"\",\n          (premiumState && premiumState.body) || \"\",\r\n          meta || \"\",\r\n          mediaIds,\r\n        ].join(\"|\"),\r\n        hash = 2166136261,\r\n        i = 0;\r\n      i < raw.length;\r\n      i += 1\r\n    )\r\n      ((hash ^= raw.charCodeAt(i)), (hash = Math.imul(hash, 16777619)));\r\n    return (hash >>> 0).toString(36);\r\n  }\r\n  function messagePremiumDisplayState(message, conversation, mine) {\r\n    message = message || {};\r\n    var labels = [],\r\n      body = stripStoryReferenceEnvelope(message.body || \"\"),\r\n      premiumState = premiumStateObject(\r\n        message.premiumState || message.premium_state,\r\n      ),\r\n      nowMs = Date.now(),\r\n      expiresValue =\r\n        message.expiresAt ||\r\n        message.expires_at ||\r\n        premiumState.expiresAt ||\r\n        premiumState.expires_at ||\r\n        \"\",\r\n      expiresMs = expiresValue ? valueMillis(expiresValue) : 0,\r\n      expired = expiresMs ? expiresMs <= nowMs : !1,\r\n      unsent = !!(\r\n        message.unsentAt ||\r\n        message.unsent_at ||\r\n        premiumState.unsendEvidence ||\r\n        premiumState.unsentByProfileKey ||\r\n        String(message.status || \"\").toLowerCase() === \"unsent\"\r\n      ),\r\n      viewOnceOpened = !!(\n        message.viewOnceOpenedAt ||\n        message.view_once_opened_at ||\n        message.viewOnceState === \"CONSUMED\" ||\n        message.view_once_state === \"CONSUMED\"\n      ),\n      viewOnceRevealActive = messageViewOnceRevealActive(message);\n    var meetingProposal = meetingAreaProposalState(\n        premiumState.meetingAreaProposal || premiumState.meeting_area_proposal,\n      ),\n      meetingExpired =\n        meetingProposal && valueMillis(meetingProposal.expiresAt) <= nowMs;\n    return (\n      meetingProposal &&\n        !meetingExpired &&\n        labels.push(\n          meetingProposal.state === \"AGREED\"\n            ? \"Meeting area agreed\"\n            : meetingProposal.state === \"CANCELLED\"\n              ? \"Meeting proposal canceled\"\n              : \"Meeting area proposal\",\n        ),\n      (message.editedAt || message.edited_at) && labels.push(\"Edited\"),\r\n      expiresMs &&\r\n        !expired &&\r\n        labels.push(\"Expires \" + messageExpiryRemainingLabel(expiresMs, nowMs)),\r\n      (message.viewOnce || message.view_once) &&\r\n        !unsent &&\r\n        !viewOnceOpened &&\r\n        labels.push(\"View once\"),\r\n      mine &&\r\n        conversationMessageReadByPeer(message, conversation) &&\r\n        labels.push(\"Read\"),\r\n      unsent\r\n        ? {\r\n            body: \"Message unsent.\",\r\n            labels: labels.concat([\"Unsent\"]),\r\n            allowMedia: !1,\r\n            allowReference: !1,\r\n            className: \"is-placeholder\",\r\n          }\r\n        : expired\n          ? {\n              body: \"Message expired.\",\n              labels: labels.concat([\"Expired\"]),\n              allowMedia: !1,\n              allowReference: !1,\n              className: \"is-placeholder\",\n            }\n          : viewOnceOpened && !viewOnceRevealActive\n            ? {\n                body: \"View-once media opened.\",\n                labels: labels.concat([\"Consumed\"]),\n                allowMedia: !1,\n                allowReference: !1,\n                className: \"is-placeholder\",\n              }\n            : {\n                body: body,\n                labels: labels,\n                allowMedia: !0,\n                allowReference: !0,\n                className: \"\",\n                meetingAreaProposal: meetingExpired ? null : meetingProposal,\n              }\n    );\r\n  }\r\n  function messageExpiryRemainingLabel(expiresMs, nowMs) {\r\n    var diff = Math.max(\r\n        0,\r\n        Number(expiresMs || 0) - Number(nowMs || Date.now()),\r\n      ),\r\n      minutes = Math.max(1, Math.ceil(diff / 6e4));\r\n    if (minutes < 60) return minutes + \" min\";\r\n    var hours = Math.ceil(minutes / 60);\r\n    if (hours < 24) return hours + \" hour\" + (hours === 1 ? \"\" : \"s\");\r\n    var days = Math.ceil(hours / 24);\r\n    return days + \" day\" + (days === 1 ? \"\" : \"s\");\r\n  }\r\n  function conversationMessageReadByPeer(message, conversation) {\r\n    if (\r\n      !profileAllowsMessageReadReceipts(\r\n        currentComposerProfile() || state.profile || {},\r\n      )\r\n    )\r\n      return !1;\r\n    var premiumState = premiumStateObject(\r\n        conversation &&\r\n          (conversation.premiumState || conversation.premium_state),\r\n      ),\r\n      receipts = Object.assign(\r\n        {},\r\n        premiumState.readReceiptsByUserId || {},\r\n        premiumState.readReceiptsByProfileKey || {},\r\n      ),\r\n      sentAt = valueMillis(\r\n        message &&\r\n          (message.createdAt ||\r\n            message.created_at ||\r\n            message.sentAt ||\r\n            message.sent_at ||\r\n            message.updatedAt ||\r\n            message.updated_at),\r\n      );\r\n    return sentAt\r\n      ? Object.keys(receipts).some(function (key) {\r\n          return !key || identityMatchesCurrent(key, key)\r\n            ? !1\r\n            : valueMillis(receipts[key]) >= sentAt &&\r\n                identityAllowsMessageReadReceipts(key);\r\n        })\r\n      : !1;\r\n  }\r\n  function messageViewOnceRevealKey(conversationId, messageId) {\n    return (\n      String(conversationId || state.activeConversationId || \"\").trim() +\n      \"::\" +\n      String(messageId || \"\").trim()\n    );\n  }\n  function clearMessageViewOnceReveals(conversationId) {\r\n    var cid = String(conversationId || \"\").trim(),\r\n      prefix = cid ? cid + \"::\" : \"\";\r\n    Object.keys(state.messageViewOnceRevealUntil || {}).forEach(function (key) {\r\n      (prefix && key.indexOf(prefix) !== 0) ||\r\n        clearMessageViewOnceRevealKey(key);\r\n    });\r\n  }\r\n  function clearMessageViewOnceRevealKey(key) {\r\n    ((key = String(key || \"\").trim()),\r\n      key &&\r\n        ((state.messageViewOncePreparedMedia[key] || []).forEach(\r\n          function (item) {\r\n            if (item && item.objectUrl && /^blob:/i.test(item.objectUrl))\r\n              try {\r\n                URL.revokeObjectURL(item.objectUrl);\r\n              } catch (e) {}\r\n            item && item.mediaId && delete state.mediaReadCache[item.mediaId];\r\n          },\r\n        ),\n        delete state.messageViewOncePreparedMedia[key],\n        delete state.messageViewOnceRevealUntil[key],\n        delete state.messageViewOnceConsumptionPending[key]));\n  }\r\n  function messageViewOnceRevealActive(message) {\r\n    var messageId =\r\n        message &&\r\n        (message.messageId ||\r\n          message.id ||\r\n          message.legacyMessageId ||\r\n          message.legacy_message_id ||\r\n          \"\"),\r\n      key = messageViewOnceRevealKey(\n        state.activeConversationId || (message && message.conversationId),\n        messageId,\n      );\n    return !!(\n      key &&\n      state.messageViewOnceRevealUntil &&\n      Number(state.messageViewOnceRevealUntil[key] || 0) > Date.now()\n    );\n  }\n  function messageViewOnceConsumed(message) {\r\n    return !!(\r\n      message &&\r\n      (message.viewOnce || message.view_once) &&\r\n      (message.viewOnceOpenedAt ||\r\n        message.view_once_opened_at ||\r\n        message.viewOnceState === \"CONSUMED\" ||\r\n        message.view_once_state === \"CONSUMED\")\r\n    );\r\n  }\r\n  function messageVisibleAfterViewOnce(message) {\n    return !!message;\n  }\n  function profileAllowsMessageReadReceipts(profile) {\r\n    return profileBooleanFlag(\r\n      profile || {},\r\n      [\r\n        \"allowReadReceipts\",\r\n        \"allow_read_receipts\",\r\n        \"showReadReceipts\",\r\n        \"show_read_receipts\",\r\n        \"messageReadReceiptsEnabled\",\r\n        \"message_read_receipts_enabled\",\r\n        \"readReceiptsEnabled\",\r\n        \"read_receipts_enabled\",\r\n      ],\r\n      !0,\r\n    );\r\n  }\r\n  function currentProfileAllowsMessageReadReceipts() {\r\n    return profileAllowsMessageReadReceipts(\r\n      profileWithPublicMirror(\r\n        currentComposerProfile() || state.profile || {},\r\n      ) ||\r\n        state.profile ||\r\n        {},\r\n    );\r\n  }\r\n  function identityAllowsMessageReadReceipts(identity) {\r\n    if (identityMatchesCurrent(identity, identity))\r\n      return currentProfileAllowsMessageReadReceipts();\r\n    var profile = publicProfileByIdentity(identity);\r\n    return !!(profile && profileAllowsMessageReadReceipts(profile));\r\n  }\r\n  function premiumMessagingEntitled() {\r\n    return canUseSocialActions() && hasDsdPlus();\r\n  }\r\n  function premiumMessagePolicy() {\r\n    return {\r\n      editWindowMs: 900 * 1e3,\r\n      unsendWindowMs: 1440 * 60 * 1e3,\r\n      freePinnedLimit: 3,\r\n      dsdPlusPinnedLimit: 20,\r\n    };\r\n  }\r\n  function timestampToIso(value) {\r\n    if (!value) return \"\";\r\n    if (value instanceof Date && !isNaN(value.getTime()))\r\n      return value.toISOString();\r\n    var millis = valueMillis(value);\r\n    return millis ? new Date(millis).toISOString() : String(value || \"\");\r\n  }\r\n  function premiumStateObject(value) {\r\n    if (!value) return {};\r\n    if (typeof value == \"object\") return Object.assign({}, value);\r\n    try {\r\n      var parsed = JSON.parse(String(value || \"{}\"));\r\n      return parsed && typeof parsed == \"object\" ? parsed : {};\r\n    } catch (e) {\r\n      return {};\r\n    }\r\n  }\r\n  function meetingAreaProposalState(value) {\n    value = value && typeof value == \"object\" ? value : null;\n    if (!value) return null;\n    var stateValue = String(value.state || \"SHARED\").toUpperCase();\n    if ([\"DRAFT\", \"SHARED\", \"AGREED\", \"CANCELLED\", \"EXPIRED\"].indexOf(stateValue) === -1) return null;\n    var city = String(value.city || \"\").replace(/[<>]/g, \"\").trim().slice(0, 64),\n      region = String(value.region || value.stateCode || \"\").replace(/[<>]/g, \"\").trim().slice(0, 64),\n      proposalId = clean(value.proposalId || value.id || \"meeting-\" + Date.now(), \"meeting\"),\n      expiresAt = timestampToIso(value.expiresAt || futureTimestamp(7 * 24 * 60 * 60 * 1e3));\n    return city && region ? {\n      version: 1,\n      state: stateValue,\n      proposalId: proposalId,\n      city: city,\n      region: region,\n      expiresAt: expiresAt,\n      referenceProposalId: clean(value.referenceProposalId || \"\", \"meeting\"),\n      participantAreas: Array.isArray(value.participantAreas) ? value.participantAreas.slice(0, 2) : [],\n      approximateArea: value.approximateArea && typeof value.approximateArea === \"object\" ? value.approximateArea : null,\n      resolutionMethod: String(value.resolutionMethod || \"\").slice(0, 48)\n    } : null;\n  }\n  function premiumMessageSendPatch(options) {\n    options = options || {};\r\n    var out = {};\r\n    var meetingProposal = meetingAreaProposalState(options.meetingAreaProposal || options.meeting_area_proposal);\n    if (meetingProposal) out.premiumState = { meetingAreaProposal: meetingProposal };\n    if (!premiumMessagingEntitled()) return out;\n    var expiresAt = options.expiresAt || options.expires_at || \"\";\r\n    return (\r\n      expiresAt && (out.expiresAt = timestampToIso(expiresAt) || expiresAt),\r\n      (options.viewOnce === !0 || options.view_once === !0) &&\r\n        (out.viewOnce = !0),\r\n      (out.expiresAt || out.viewOnce) &&\r\n        (out.premiumState = Object.assign(\r\n          {}, out.premiumState || {},\n          premiumStateObject(options.premiumState || options.premium_state),\r\n          {\r\n            initiatorUserId: actorRelationshipIdentity(),\r\n            initiatorProfileKey: profileKey(),\r\n            premiumFeature: !0,\r\n            setAt: now(),\r\n          },\r\n        )),\r\n      out\r\n    );\r\n  }\r\n  function messageExpiryFromPreset(value) {\r\n    return (\r\n      (value = String(value || \"\")\r\n        .trim()\r\n        .toLowerCase()),\r\n      value === \"1h\"\r\n        ? futureTimestamp(3600 * 1e3)\r\n        : value === \"24h\"\r\n          ? futureTimestamp(1440 * 60 * 1e3)\r\n          : value === \"7d\"\r\n            ? futureTimestamp(10080 * 60 * 1e3)\r\n            : \"\"\r\n    );\r\n  }\r\n  function conversationMessageById(conversationId, messageId) {\r\n    var cid = String(conversationId || state.activeConversationId || \"\").trim(),\r\n      mid = String(messageId || \"\").trim(),\r\n      list = state.messagesByConversation[cid] || [],\r\n      found =\r\n        list.filter(function (message) {\r\n          return (\r\n            [\r\n              message && message.messageId,\r\n              message && message.id,\r\n              message && message.legacyMessageId,\r\n              message && message.legacy_message_id,\r\n              message && message.supabaseMessageId,\r\n              message && message.supabase_message_id,\r\n            ]\r\n              .map(function (value) {\r\n                return String(value || \"\");\r\n              })\r\n              .indexOf(mid) !== -1\r\n          );\r\n        })[0] || null;\r\n    if (found) return found;\r\n    var claim2 =\r\n      state.premiumMessageWriteClaims && state.premiumMessageWriteClaims[mid];\r\n    return claim2 && String(claim2.conversationId || \"\") === cid\r\n      ? claim2\r\n      : null;\r\n  }\r\n  function messageActionWindowOpen(message, windowMs) {\r\n    var created = valueMillis(\r\n      message &&\r\n        (message.createdAt ||\r\n          message.created_at ||\r\n          message.sentAt ||\r\n          message.sent_at),\r\n    );\r\n    return created ? Date.now() <= created + (windowMs || 0) : !1;\r\n  }\r\n  function messageEditWindowOpen(message) {\r\n    var until = valueMillis(\r\n      message && (message.editWindowUntil || message.edit_window_until),\r\n    );\r\n    return until\r\n      ? Date.now() <= until\r\n      : messageActionWindowOpen(message, premiumMessagePolicy().editWindowMs);\r\n  }\r\n  function premiumMessageActionsHTML(message, mine, premiumState) {\r\n    var messageId = (message && (message.messageId || message.id || \"\")) || \"\";\r\n    if (\r\n      !messageId ||\r\n      !mine ||\r\n      !premiumMessagingEntitled() ||\r\n      premiumState.className === \"is-system\"\r\n    )\r\n      return \"\";\r\n    var buttons = [];\r\n    return (\r\n      messageEditWindowOpen(message) &&\r\n        buttons.push(\r\n          '<button type=\"button\" data-dsd-message-row-action=\"edit\" data-message-id=\"' +\r\n            html(messageId) +\r\n            '\">Edit</button>',\r\n        ),\r\n      messageActionWindowOpen(message, premiumMessagePolicy().unsendWindowMs) &&\r\n        buttons.push(\r\n          '<button type=\"button\" data-dsd-message-row-action=\"unsend\" data-message-id=\"' +\r\n            html(messageId) +\r\n            '\">Unsend</button>',\r\n        ),\r\n      buttons.length\r\n        ? '<div class=\"dsd-msg384__premium-actions\" aria-label=\"DSD+ message actions\">' +\r\n          buttons.join(\"\") +\r\n          \"</div>\"\r\n        : \"\"\r\n    );\r\n  }\r\n  function updateLocalMessage(conversationId, messageId, patch) {\r\n    var cid = String(conversationId || state.activeConversationId || \"\").trim(),\r\n      mid = String(messageId || \"\").trim();\r\n    (state.premiumMessageWriteClaims &&\r\n      state.premiumMessageWriteClaims[mid] &&\r\n      (state.premiumMessageWriteClaims[mid] = Object.assign(\r\n        {},\r\n        state.premiumMessageWriteClaims[mid],\r\n        patch || {},\r\n        { conversationId: cid },\r\n      )),\r\n      (state.messagesByConversation[cid] = (\r\n        state.messagesByConversation[cid] || []\r\n      ).map(function (message) {\r\n        var ids = [\r\n          message.messageId,\r\n          message.id,\r\n          message.legacyMessageId,\r\n          message.legacy_message_id,\r\n          message.supabaseMessageId,\r\n          message.supabase_message_id,\r\n        ].map(function (value) {\r\n          return String(value || \"\");\r\n        });\r\n        return ids.indexOf(mid) !== -1\r\n          ? Object.assign({}, message, patch || {})\r\n          : message;\r\n      })));\r\n  }\r\n  function editMessage(conversationId, messageId, nextBody) {\r\n    if (!requireActiveProfile(\"edit messages\")) return Promise.resolve(null);\r\n    if (!premiumMessagingEntitled())\r\n      return (\r\n        renderStatus(\"DSD+ is required to edit messages.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var cid = String(conversationId || state.activeConversationId || \"\").trim(),\r\n      mid = String(messageId || \"\").trim(),\r\n      message = conversationMessageById(cid, mid),\r\n      text = String(nextBody || \"\")\r\n        .trim()\r\n        .slice(0, MAX.message);\r\n    if (!text)\r\n      return (\r\n        renderStatus(\"Edited message cannot be empty.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    if (!message)\r\n      return supabaseCutoverReady() && mid\r\n        ? premiumMessageActionViaProxy({\r\n            action: \"edit_message\",\r\n            conversationId: cid,\r\n            messageId: mid,\r\n            body: text,\r\n          })\r\n            .then(function (result) {\r\n              return (\r\n                renderStatus(\"Message edited.\"),\r\n                hydrateConversationMessages(cid, { force: !0 }),\r\n                (result && (result.message || result)) || null\r\n              );\r\n            })\r\n            .catch(function (error) {\r\n              return (\r\n                queueDraft(\r\n                  \"premium-message-edit-proxy\",\r\n                  { conversationId: cid, messageId: mid },\r\n                  error,\r\n                ),\r\n                renderStatus(\"Message unavailable.\"),\r\n                null\r\n              );\r\n            })\r\n        : (renderStatus(\"Message unavailable.\"), Promise.resolve(null));\r\n    if (!identityMatchesCurrent(message.senderUid, message.senderProfileKey))\r\n      return (\r\n        renderStatus(\"Only the sender can edit this message.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    if (!messageEditWindowOpen(message))\r\n      return (\r\n        renderStatus(\"The 15 minute edit window has closed.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var ref2 = storyReferenceEnvelope(message),\r\n      storedBody = encodeStoryReferenceBody(text, ref2),\r\n      premiumState = premiumStateObject(\r\n        message.premiumState || message.premium_state,\r\n      ),\r\n      history = Array.isArray(premiumState.editHistory)\r\n        ? premiumState.editHistory.slice(-9)\r\n        : [];\r\n    (history.push({\r\n      body: stripStoryReferenceEnvelope(message.body || \"\"),\r\n      editedAt: now(),\r\n      editorUserId: actorRelationshipIdentity(),\r\n      editorProfileKey: profileKey(),\r\n    }),\r\n      (premiumState.editHistory = history),\r\n      (premiumState.lastEditedByUserId = actorRelationshipIdentity()),\r\n      (premiumState.lastEditedByProfileKey = profileKey()));\r\n    var patch = {\r\n        premiumMessageAction: \"edit\",\r\n        body: storedBody,\r\n        editedAt: now(),\r\n        editWindowUntil:\r\n          message.editWindowUntil ||\r\n          message.edit_window_until ||\r\n          new Date(\r\n            (valueMillis(message.createdAt || message.created_at) ||\r\n              Date.now()) + premiumMessagePolicy().editWindowMs,\r\n          ).toISOString(),\r\n        premiumState: premiumState,\r\n      },\r\n      patchMid =\r\n        message.supabaseMessageId || message.supabase_message_id || mid,\r\n      writePromise = supabaseCutoverReady()\r\n        ? premiumMessageActionViaProxy({\r\n            action: \"edit_message\",\r\n            conversationId: cid,\r\n            messageId: patchMid,\r\n            body: storedBody,\r\n          }).then(function (result) {\r\n            return (result && (result.message || result)) || patch;\r\n          })\r\n        : Promise.reject(new Error(\"premium proxy not active\"));\r\n    return writePromise\r\n      .catch(function (proxyError) {\n        claim(\"premium-message:edit-proxy-fail-closed\", {\n          conversationId: cid,\n          messageId: patchMid,\n          error: (proxyError && proxyError.message) || String(proxyError),\n        });\n        throw proxyError;\n      })\r\n      .then(function (updated) {\r\n        return (\r\n          updateLocalMessage(cid, mid, Object.assign({}, patch, updated || {})),\r\n          renderMessages(),\r\n          renderStatus(\"Message edited.\"),\r\n          updated || patch\r\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          queueDraft(\r\n            \"premium-message-edit\",\r\n            { conversationId: cid, messageId: mid },\r\n            error,\r\n          ),\r\n          null\r\n        );\r\n      });\r\n  }\r\n  function unsendMessage(conversationId, messageId) {\r\n    if (!requireActiveProfile(\"unsend messages\")) return Promise.resolve(null);\r\n    if (!premiumMessagingEntitled())\r\n      return (\r\n        renderStatus(\"DSD+ is required to unsend messages.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var cid = String(conversationId || state.activeConversationId || \"\").trim(),\r\n      mid = String(messageId || \"\").trim(),\r\n      message = conversationMessageById(cid, mid);\r\n    if (!message)\r\n      return supabaseCutoverReady() && mid\r\n        ? premiumMessageActionViaProxy({\r\n            action: \"unsend_message\",\r\n            conversationId: cid,\r\n            messageId: mid,\r\n          })\r\n            .then(function (result) {\n              return (\n                renderStatus(\"Message unsent.\"),\n                broadcastMessageChangeToParticipants(\n                  cid,\n                  (result &&\n                    result.message &&\n                    (result.message.id || result.message.legacy_message_id)) ||\n                    mid,\n                  \"unsent\",\n                ),\n                hydrateConversationMessages(cid, { force: !0 }),\n                renderMessages(),\r\n                (result && (result.message || result)) || null\r\n              );\r\n            })\r\n            .catch(function (error) {\r\n              return (\r\n                queueDraft(\r\n                  \"premium-message-unsend-proxy\",\r\n                  { conversationId: cid, messageId: mid },\r\n                  error,\r\n                ),\r\n                renderStatus(\"Message unavailable.\"),\r\n                null\r\n              );\r\n            })\r\n        : (renderStatus(\"Message unavailable.\"), Promise.resolve(null));\r\n    if (!identityMatchesCurrent(message.senderUid, message.senderProfileKey))\r\n      return (\r\n        renderStatus(\"Only the sender can unsend this message.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    if (\r\n      !messageActionWindowOpen(message, premiumMessagePolicy().unsendWindowMs)\r\n    )\r\n      return (\r\n        renderStatus(\"The unsend window has closed.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var premiumState = premiumStateObject(\r\n      message.premiumState || message.premium_state,\r\n    );\r\n    ((premiumState.unsendEvidence = premiumState.unsendEvidence || {\r\n      body: stripStoryReferenceEnvelope(message.body || \"\"),\r\n      mediaCount: normalizeMessageMedia(message).length,\r\n      capturedAt: now(),\r\n    }),\r\n      (premiumState.unsentByProfileKey = profileKey()));\r\n    var patch = {\r\n        premiumMessageAction: \"unsend\",\r\n        status: \"unsent\",\r\n        unsentAt: now(),\r\n        unsentByUserId: actorRelationshipIdentity(),\r\n        premiumState: premiumState,\r\n      },\r\n      patchMid =\r\n        message.supabaseMessageId || message.supabase_message_id || mid,\r\n      writePromise = supabaseCutoverReady()\r\n        ? premiumMessageActionViaProxy({\r\n            action: \"unsend_message\",\r\n            conversationId: cid,\r\n            messageId: patchMid,\r\n          }).then(function (result) {\r\n            return (result && (result.message || result)) || patch;\r\n          })\r\n        : Promise.reject(new Error(\"premium proxy not active\"));\r\n    return writePromise\r\n      .catch(function (proxyError) {\n        claim(\"premium-message:unsend-proxy-fail-closed\", {\n          conversationId: cid,\n          messageId: patchMid,\n          error: (proxyError && proxyError.message) || String(proxyError),\n        });\n        throw proxyError;\n      })\r\n      .then(function (updated) {\n        return (\n          updateLocalMessage(cid, mid, Object.assign({}, patch, updated || {})),\n          broadcastMessageChangeToParticipants(cid, patchMid, \"unsent\"),\n          renderMessages(),\n          renderStatus(\"Message unsent.\"),\r\n          updated || patch\r\n        );\r\n      })\r\n      .catch(function (error) {\r\n        return (\r\n          queueDraft(\r\n            \"premium-message-unsend\",\r\n            { conversationId: cid, messageId: mid },\r\n            error,\r\n          ),\r\n          null\r\n        );\r\n      });\r\n  }\r\n  function markMessageViewOnceOpened(conversationId, messageId) {\r\n    var cid = String(conversationId || state.activeConversationId || \"\").trim(),\r\n      mid = String(messageId || \"\").trim(),\r\n      message = conversationMessageById(cid, mid);\r\n    if (\r\n      !message ||\r\n      !(message.viewOnce || message.view_once) ||\r\n      identityMatchesCurrent(message.senderUid, message.senderProfileKey)\r\n    )\r\n      return Promise.resolve(null);\r\n    var revealKey = messageViewOnceRevealKey(cid, mid),\r\n      media = normalizeMessageMedia(message);\r\n    if (!media.length) return Promise.resolve(null);\r\n    var canonicalMid =\r\n      message.supabaseMessageId ||\r\n      message.supabase_message_id ||\r\n      (uuidLike(message.id) ? message.id : \"\") ||\r\n      mid;\r\n    return (\r\n      messageLifecycleProofEvent(\"VIEW-ONCE EVENT\", {\r\n        messageId: mid,\r\n        recipientId: actorRelationshipIdentity(),\n        stateBefore: \"AVAILABLE\",\n        consumeRequest: \"not-started\",\n        prepareRequest: \"pending\",\n        mediaUrlIssued: !1,\n      }),\r\n      markMessageViewOnceOpenedViaProxy(\n        Object.assign(\n          {\n            action: \"prepare_view_once\",\n            conversationId: cid,\n            messageId: canonicalMid,\n          },\n          customer() || {},\n        ),\n      )\r\n        .then(function (result) {\r\n          var responsePayload =\r\n              (result && (result.data || result.result)) || result || {},\r\n            alreadyConsumed = !!(\r\n              responsePayload.alreadyConsumed ||\r\n              responsePayload.already_consumed ||\r\n              responsePayload.alreadyOpened ||\r\n              responsePayload.already_opened\r\n            ),\r\n            proxyMessage =\n              responsePayload.message || (result && result.message) || {},\n            openedAt =\n              proxyMessage.viewOnceOpenedAt ||\n              proxyMessage.view_once_opened_at ||\n              responsePayload.viewOnceOpenedAt ||\n              responsePayload.view_once_opened_at ||\n              \"\",\n            messagePatch = Object.assign(\n              {},\n              proxyMessage,\n              alreadyConsumed\n                ? {\n                    viewOnce: !0,\n                    view_once: !0,\n                    viewOnceOpenedAt: openedAt || now(),\n                    view_once_opened_at: openedAt || now(),\n                    viewOnceState: \"CONSUMED\",\n                    view_once_state: \"CONSUMED\",\n                    media: [],\n                    attachments: [],\n                  }\n                : {\n                    viewOnce: !0,\n                    view_once: !0,\n                    viewOnceOpenedAt: \"\",\n                    view_once_opened_at: \"\",\n                    viewOnceState: \"AVAILABLE\",\n                    view_once_state: \"AVAILABLE\",\n                  },\n            );\n          updateLocalMessage(cid, mid, messagePatch);\n          if (alreadyConsumed)\n            return (\n              delete state.messageViewOncePreparedMedia[revealKey],\r\n              delete state.messageViewOnceRevealUntil[revealKey],\r\n              messageLifecycleProofEvent(\"VIEW-ONCE EVENT\", {\n                messageId: mid,\r\n                recipientId: actorRelationshipIdentity(),\r\n                stateBefore: \"CONSUMED\",\r\n                consumeRequest: \"complete\",\r\n                consumeResponse: \"already-consumed\",\r\n                stateAfter: \"CONSUMED\",\r\n                mediaUrlIssued: !1,\r\n                mediaRemoved: !0,\r\n              }),\r\n              renderMessages(),\r\n              result\r\n            );\r\n          var rawGrant =\r\n              responsePayload.viewOnceGrant ||\r\n              responsePayload.view_once_grant ||\r\n              (result && (result.viewOnceGrant || result.view_once_grant)) ||\r\n              \"\",\r\n            grant = String(\r\n              (rawGrant && (rawGrant.token || rawGrant.grant)) ||\r\n                rawGrant ||\r\n                \"\",\r\n            );\r\n          if (!grant) throw new Error(\"View-once media grant was not issued.\");\r\n          return Promise.all(\r\n            media.map(function (item) {\r\n              var mediaId = readableMediaId(item);\r\n              return mediaId\r\n                ? fetch(mediaReadProxyUrl(mediaId, grant), {\r\n                    method: \"GET\",\r\n                    credentials: \"include\",\r\n                    cache: \"no-store\",\r\n                  })\r\n                    .then(function (response) {\r\n                      if (!response.ok) {\r\n                        var readError = new Error(\r\n                          \"View-once media could not be prepared: \" +\r\n                            response.status,\r\n                        );\r\n                        throw ((readError.status = response.status), readError);\r\n                      }\r\n                      return response.blob();\r\n                    })\r\n                    .then(function (blob) {\r\n                      return {\r\n                        mediaId: mediaId,\r\n                        kind:\r\n                          String(\r\n                            item.kind ||\r\n                              item.mediaKind ||\r\n                              item.contentType ||\r\n                              \"\",\r\n                          )\r\n                            .toLowerCase()\r\n                            .indexOf(\"video\") !== -1\r\n                            ? \"video\"\r\n                            : \"image\",\r\n                        objectUrl: URL.createObjectURL(blob),\r\n                      };\r\n                    })\r\n                : null;\r\n            }),\r\n          ).then(function (prepared) {\r\n            if (((prepared = prepared.filter(Boolean)), !prepared.length))\r\n              throw new Error(\"View-once media could not be prepared.\");\r\n            return (\r\n              (state.messageViewOncePreparedMedia[revealKey] = prepared),\r\n              (state.messageViewOnceRevealUntil[revealKey] =\r\n                Number.MAX_SAFE_INTEGER),\r\n              messageLifecycleProofEvent(\"VIEW-ONCE EVENT\", {\n                messageId: mid,\n                recipientId: actorRelationshipIdentity(),\n                stateBefore: \"AVAILABLE\",\n                consumeRequest: \"deferred-until-media-displayed\",\n                consumeResponse: \"prepared\",\n                stateAfter: \"PREPARED\",\n                mediaUrlIssued: !0,\n                mediaRemoved: !1,\n                revealKeySuffix: messageLifecycleProofSuffix(revealKey),\n                activeConversationSuffix: messageLifecycleProofSuffix(\n                  state.activeConversationId,\n                ),\n                rendererSeesReveal: messageViewOnceRevealActive(\n                  conversationMessageById(cid, mid),\n                ),\n              }),\n              renderMessages(),\r\n              result\r\n            );\r\n          });\r\n        })\r\n        .catch(function (error) {\r\n          return supabaseCutoverReady()\r\n            ? premiumMessageActionViaProxy({\r\n                action: \"view_once_status\",\r\n                conversationId: cid,\r\n                messageId: canonicalMid,\r\n              })\r\n                .then(function (statusResult) {\r\n                  if (!(statusResult && statusResult.consumed)) throw error;\r\n                  var statusMessage = statusResult.message || {},\r\n                    statusOpenedAt =\r\n                      statusMessage.view_once_opened_at ||\r\n                      statusMessage.viewOnceOpenedAt ||\r\n                      now();\r\n                  return (\r\n                    updateLocalMessage(\r\n                      cid,\r\n                      mid,\r\n                      Object.assign({}, statusMessage, {\r\n                        viewOnce: !0,\r\n                        view_once: !0,\r\n                        viewOnceOpenedAt: statusOpenedAt,\r\n                        view_once_opened_at: statusOpenedAt,\r\n                        viewOnceState: \"CONSUMED\",\r\n                        view_once_state: \"CONSUMED\",\r\n                        media: [],\r\n                        attachments: [],\r\n                      }),\r\n                    ),\r\n                    delete state.messageViewOncePreparedMedia[revealKey],\r\n                    delete state.messageViewOnceRevealUntil[revealKey],\r\n                    messageLifecycleProofEvent(\"VIEW-ONCE EVENT\", {\r\n                      messageId: mid,\r\n                      recipientId: actorRelationshipIdentity(),\r\n                      stateBefore: \"AVAILABLE\",\r\n                      consumeRequest: \"status-reconcile\",\r\n                      consumeResponse: \"already-consumed\",\r\n                      stateAfter: \"CONSUMED\",\r\n                      mediaUrlIssued: !1,\r\n                      mediaRemoved: !0,\r\n                    }),\r\n                    renderMessages(),\r\n                    statusResult\r\n                  );\r\n                })\r\n                .catch(function (statusError) {\r\n                  return (\r\n                    delete state.messageViewOncePreparedMedia[revealKey],\r\n                    delete state.messageViewOnceRevealUntil[revealKey],\r\n                    queueDraft(\r\n                      \"premium-message-view-once-opened\",\r\n                      { conversationId: cid, messageId: mid },\r\n                      statusError,\r\n                    ),\r\n                    renderMessages(),\r\n                    renderStatus(\r\n                      \"View-once state could not be saved. Try again.\",\r\n                    ),\r\n                    null\r\n                  );\r\n                })\r\n            : (delete state.messageViewOncePreparedMedia[revealKey],\r\n              delete state.messageViewOnceRevealUntil[revealKey],\r\n              queueDraft(\r\n                \"premium-message-view-once-opened\",\r\n                { conversationId: cid, messageId: mid },\r\n                error,\r\n              ),\r\n              messageLifecycleProofEvent(\"VIEW-ONCE EVENT\", {\r\n                messageId: mid,\r\n                recipientId: actorRelationshipIdentity(),\r\n                stateBefore: \"AVAILABLE\",\r\n                consumeRequest: \"failed\",\r\n                consumeResponse: (error && error.message) || String(error),\r\n                stateAfter: \"AVAILABLE\",\r\n                mediaUrlIssued: !1,\r\n                mediaRemoved: !0,\r\n              }),\r\n              renderMessages(),\r\n              renderStatus(\"View-once state could not be saved. Try again.\"),\r\n              null);\r\n        })\r\n    );\n  }\n  function consumePreparedMessageViewOnce(conversationId, messageId) {\n    var cid = String(conversationId || state.activeConversationId || \"\").trim(),\n      mid = String(messageId || \"\").trim(),\n      revealKey = messageViewOnceRevealKey(cid, mid),\n      message = conversationMessageById(cid, mid);\n    if (\n      !cid ||\n      !mid ||\n      !message ||\n      messageViewOnceConsumed(message) ||\n      state.messageViewOnceConsumptionPending[revealKey]\n    )\n      return Promise.resolve(null);\n    var canonicalMid =\n      message.supabaseMessageId ||\n      message.supabase_message_id ||\n      (uuidLike(message.id) ? message.id : \"\") ||\n      mid;\n    state.messageViewOnceConsumptionPending[revealKey] = !0;\n    messageLifecycleProofEvent(\"VIEW-ONCE EVENT\", {\n      messageId: mid,\n      recipientId: actorRelationshipIdentity(),\n      stateBefore: \"PREPARED\",\n      consumeRequest: \"pending-after-successful-display\",\n      mediaUrlIssued: !0,\n    });\n    return premiumMessageActionViaProxy({\n      action: \"consume_view_once\",\n      conversationId: cid,\n      messageId: canonicalMid,\n    })\n      .then(function (result) {\n        var responsePayload =\n            (result && (result.data || result.result)) || result || {},\n          proxyMessage =\n            responsePayload.message || (result && result.message) || {},\n          openedAt =\n            proxyMessage.view_once_opened_at ||\n            proxyMessage.viewOnceOpenedAt ||\n            now();\n        updateLocalMessage(\n          cid,\n          mid,\n          Object.assign({}, proxyMessage, {\n            viewOnce: !0,\n            view_once: !0,\n            viewOnceOpenedAt: openedAt,\n            view_once_opened_at: openedAt,\n            viewOnceState: \"CONSUMED\",\n            view_once_state: \"CONSUMED\",\n          }),\n        );\n        delete state.messageViewOnceConsumptionPending[revealKey];\n        broadcastMessageChangeToParticipants(\n          cid,\n          canonicalMid,\n          \"view_once_consumed\",\n        );\n        messageLifecycleProofEvent(\"VIEW-ONCE EVENT\", {\n          messageId: mid,\n          recipientId: actorRelationshipIdentity(),\n          stateBefore: \"PREPARED\",\n          consumeRequest: \"complete\",\n          consumeResponse: \"success\",\n          stateAfter: \"CONSUMED\",\n          mediaUrlIssued: !0,\n          mediaRemoved: !1,\n        });\n        renderMessages();\n        return result;\n      })\n      .catch(function (error) {\n        delete state.messageViewOnceConsumptionPending[revealKey];\n        messageLifecycleProofEvent(\"VIEW-ONCE EVENT\", {\n          messageId: mid,\n          recipientId: actorRelationshipIdentity(),\n          stateBefore: \"PREPARED\",\n          consumeRequest: \"failed\",\n          consumeResponse: (error && error.message) || String(error),\n          stateAfter: \"AVAILABLE\",\n          mediaUrlIssued: !0,\n          mediaRemoved: !1,\n        });\n        renderStatus(\"View-once state could not be saved. Try again.\");\n        return null;\n      });\n  }\n  function bindPreparedMessageViewOnceConsumption(root) {\n    qsa(\n      '[data-dsd-message-view-once-revealed=\"true\"] img, [data-dsd-message-view-once-revealed=\"true\"] video',\n      root || document,\n    ).forEach(function (media) {\n      if (media.getAttribute(\"data-dsd-view-once-consume-bound\") === BUILD)\n        return;\n      media.setAttribute(\"data-dsd-view-once-consume-bound\", BUILD);\n      var row = media.closest(\"[data-message-id]\"),\n        messageId = row && row.getAttribute(\"data-message-id\");\n      if (!messageId) return;\n      var commit = function () {\n        consumePreparedMessageViewOnce(\n          state.activeConversationId,\n          messageId,\n        );\n      };\n      if (media.tagName === \"VIDEO\") {\n        media.readyState >= 2\n          ? window.setTimeout(commit, 0)\n          : media.addEventListener(\"loadeddata\", commit, { once: !0 });\n      } else\n        media.complete && media.naturalWidth > 0\n          ? window.setTimeout(commit, 0)\n          : media.addEventListener(\"load\", commit, { once: !0 });\n    });\n  }\n  function conversationMediaGallery(conversationId) {\n    var cid = String(conversationId || state.activeConversationId || \"\").trim(),\r\n      conversation = conversationById(cid);\r\n    return !cid ||\r\n      !conversationParticipantMatch(conversation || { conversationId: cid })\r\n      ? []\r\n      : dedupeConversationMessages(\r\n          (state.messagesByConversation[cid] || []).filter(messageDisplayable),\r\n        )\r\n          .reduce(function (out, message) {\n            var mine = identityMatchesCurrent(\n                message.senderUid,\n                message.senderProfileKey,\n              ),\n              permitted = messagePremiumDisplayState(\n                message,\n                conversation,\n                mine,\n              );\n            if (\n              message.viewOnce ||\n              message.view_once ||\n              !permitted.allowMedia ||\n              message.unsentAt ||\n              message.unsent_at ||\n              String(message.status || \"\").toLowerCase() === \"unsent\"\n            )\r\n              return out;\r\n            if (message.expiresAt || message.expires_at) {\r\n              var expiresAt = valueMillis(\r\n                message.expiresAt || message.expires_at,\r\n              );\r\n              if (expiresAt && expiresAt <= Date.now()) return out;\r\n            }\r\n            return (\r\n              normalizeMessageMedia(message).forEach(function (item) {\r\n                out.push({\r\n                  conversationId: cid,\r\n                  messageId: message.messageId || message.id || \"\",\r\n                  mediaId: readableMediaId(item),\r\n                  kind:\r\n                    String(\r\n                      item.kind || item.mediaKind || item.contentType || \"\",\r\n                    )\r\n                      .toLowerCase()\r\n                      .indexOf(\"video\") !== -1\r\n                      ? \"video\"\r\n                      : \"image\",\r\n                  contentType: item.contentType || item.content_type || \"\",\r\n                  bytes: Number(item.bytes || item.size || 0) || 0,\r\n                  createdAt:\n                    message.createdAt ||\n                    message.created_at ||\n                    item.createdAt ||\n                    item.created_at ||\n                    \"\",\n                });\n              }),\r\n              out\r\n            );\r\n          }, [])\r\n          .filter(function (item) {\r\n            return item.mediaId;\r\n          })\r\n          .slice(-80);\n  }\n  function conversationSearchMatches(conversationId, query, filter) {\n    var cid = String(conversationId || \"\").trim(),\n      conversation = conversationById(cid),\n      normalizedQuery = String(query || \"\").trim().toLowerCase(),\n      normalizedFilter = [\"all\", \"media\", \"links\"].indexOf(filter) !== -1\n        ? filter\n        : \"all\";\n    if (\n      !cid ||\n      !conversation ||\n      !conversationParticipantMatch(conversation) ||\n      (normalizedFilter === \"all\" && normalizedQuery.length < 2)\n    )\n      return [];\n    return dedupeConversationMessages(\n      (state.messagesByConversation[cid] || []).filter(messageDisplayable),\n    )\n      .filter(messageVisibleAfterViewOnce)\n      .slice(-250)\n      .reduce(function (matches, message) {\n        var mine = identityMatchesCurrent(\n            message.senderUid,\n            message.senderProfileKey,\n          ),\n          permitted = messagePremiumDisplayState(\n            message,\n            conversation,\n            mine,\n          ),\n          body = permitted.allowReference ? String(permitted.body || \"\") : \"\",\n          hasMedia =\n            permitted.allowMedia && normalizeMessageMedia(message).length > 0,\n          hasLink =\n            permitted.allowReference &&\n            /(?:https?:\\/\\/|www\\.)[^\\s<]+|\\b[a-z0-9-]+\\.(?:com|net|org|io|co)\\b/i.test(\n              body,\n            ),\n          filterMatch =\n            normalizedFilter === \"media\"\n              ? hasMedia\n              : normalizedFilter === \"links\"\n                ? hasLink\n                : !0,\n          textMatch =\n            !normalizedQuery || body.toLowerCase().indexOf(normalizedQuery) !== -1;\n        if (filterMatch && textMatch)\n          matches.push(String(message.messageId || message.id || \"\"));\n        return matches;\n      }, [])\n      .filter(Boolean);\n  }\n  function conversationToolsState(conversationId) {\n    var tools = state.messageConversationTools;\n    if (tools.conversationId !== conversationId) {\n      tools.conversationId = conversationId;\n      tools.mode = \"\";\n      tools.query = \"\";\n      tools.filter = \"all\";\n      tools.matches = [];\n      tools.index = -1;\n    }\n    return tools;\n  }\n  function renderMessageConversationTools(conversation, mode, forceOpen) {\n    var panel = qs(\"[data-dsd-msg384-conversation-tools]\");\n    if (!panel) return;\n    var cid = String(\n        (conversation && (conversation.conversationId || conversation.id)) ||\n          state.activeConversationId ||\n          \"\",\n      ).trim(),\n      tools = conversationToolsState(cid);\n    if (\n      !conversation ||\n      !cid ||\n      !conversationParticipantMatch(conversation)\n    ) {\n      panel.hidden = !0;\n      panel.innerHTML = \"\";\n      panel.setAttribute(\"aria-hidden\", \"true\");\n      return;\n    }\n    if (forceOpen === !1 || (tools.mode === mode && forceOpen !== !0)) {\n      tools.mode = \"\";\n      panel.hidden = !0;\n      panel.innerHTML = \"\";\n      panel.setAttribute(\"aria-hidden\", \"true\");\n      return;\n    }\n    tools.mode = mode === \"info\" ? \"info\" : \"search\";\n    panel.hidden = !1;\n    panel.setAttribute(\"aria-hidden\", \"false\");\n    if (tools.mode === \"search\") {\n      tools.matches = conversationSearchMatches(\n        cid,\n        tools.query,\n        tools.filter,\n      );\n      if (tools.index >= tools.matches.length) tools.index = tools.matches.length - 1;\n      panel.innerHTML =\n        '<div class=\"dsd-msg384__tools-head\"><strong>Search conversation</strong><button type=\"button\" data-dsd-message-tools-close aria-label=\"Close conversation search\">Close</button></div>' +\n        '<div class=\"dsd-msg384__search-row\"><input type=\"search\" maxlength=\"96\" autocomplete=\"off\" data-dsd-message-conversation-search aria-label=\"Search this conversation\" placeholder=\"Search loaded messages\" value=\"' +\n        html(tools.query) +\n        '\"><select data-dsd-message-conversation-filter aria-label=\"Filter conversation search\"><option value=\"all\"' +\n        (tools.filter === \"all\" ? \" selected\" : \"\") +\n        '>Text</option><option value=\"media\"' +\n        (tools.filter === \"media\" ? \" selected\" : \"\") +\n        '>Media</option><option value=\"links\"' +\n        (tools.filter === \"links\" ? \" selected\" : \"\") +\n        \">Links</option></select></div>\" +\n        '<div class=\"dsd-msg384__search-status\" role=\"status\"><span>' +\n        html(\n          tools.matches.length\n            ? String(Math.max(0, tools.index) + 1) + \" of \" + tools.matches.length\n            : tools.filter === \"all\" && tools.query.length < 2\n              ? \"Type at least two characters\"\n              : \"No authorized matches\",\n        ) +\n        '</span><div><button type=\"button\" data-dsd-message-search-step=\"previous\"' +\n        (tools.matches.length ? \"\" : \" disabled\") +\n        '>Previous</button><button type=\"button\" data-dsd-message-search-step=\"next\"' +\n        (tools.matches.length ? \"\" : \" disabled\") +\n        \">Next</button></div></div><small>Search is limited to 250 loaded, authorized messages.</small>\";\n      return;\n    }\n    var gallery = premiumMessagingEntitled()\n        ? conversationMediaGallery(cid)\n        : [],\n      nickname = currentPrivateConversationNickname(conversation),\n      pinned = conversationPinnedByCurrent(conversation),\n      participantCount = conversationParticipantIdentities(conversation).length;\n    panel.innerHTML =\n      '<div class=\"dsd-msg384__tools-head\"><strong>Conversation info</strong><button type=\"button\" data-dsd-message-tools-close aria-label=\"Close conversation info\">Close</button></div>' +\n      '<div class=\"dsd-msg384__participants\" aria-label=\"Conversation participants\">' +\n      participantLinksHTML(conversation) +\n      \"</div><dl><div><dt>Participants</dt><dd>\" +\n      html(String(participantCount)) +\n      \"</dd></div><div><dt>Conversation</dt><dd>\" +\n      html(pinned ? \"Pinned\" : \"Not pinned\") +\n      \"</dd></div>\" +\n      (premiumMessagingEntitled() && conversationType(conversation) !== \"groups\"\n        ? \"<div><dt>Nickname</dt><dd>\" + html(nickname || \"Not set\") + \"</dd></div>\"\n        : \"\") +\n      \"</dl>\" +\n      (premiumMessagingEntitled()\n        ? '<div class=\"dsd-msg384__gallery-head\"><strong>Authorized media</strong><small>' +\n          html(String(gallery.length)) +\n          \" items</small></div>\" +\n          (gallery.length\n            ? '<div class=\"dsd-msg384__gallery-grid\">' +\n              gallery\n                .map(function (item) {\n                  return (\n                    '<button type=\"button\" data-dsd-message-gallery-item=\"' +\n                    html(item.mediaId) +\n                    '\" data-dsd-message-id=\"' +\n                    html(item.messageId) +\n                    '\"><strong>' +\n                    html(item.kind === \"video\" ? \"Video\" : \"Image\") +\n                    \"</strong><span>\" +\n                    html(formatDateTime(item.createdAt) || \"message media\") +\n                    \"</span></button>\"\n                  );\n                })\n                .join(\"\") +\n              \"</div>\"\n            : \"<p>No authorized message media in the loaded history.</p>\")\n        : \"<p>DSD+ is required to revisit conversation media and set private nicknames.</p>\");\n  }\n  function stepConversationSearch(direction) {\n    var cid = String(state.activeConversationId || \"\").trim(),\n      conversation = conversationById(cid),\n      tools = conversationToolsState(cid);\n    tools.matches = conversationSearchMatches(cid, tools.query, tools.filter);\n    if (!tools.matches.length) {\n      renderMessageConversationTools(conversation, \"search\", !0);\n      return;\n    }\n    tools.index =\n      direction === \"previous\"\n        ? (tools.index - 1 + tools.matches.length) % tools.matches.length\n        : (tools.index + 1) % tools.matches.length;\n    renderMessageConversationTools(conversation, \"search\", !0);\n    jumpToMessageSource(cid, tools.matches[tools.index], 0);\n  }\n  function patchConversationPremiumState(\r\n    conversationId,\r\n    action,\r\n    updater,\r\n    options,\r\n  ) {\r\n    if (!requireActiveProfile(\"update conversation\"))\r\n      return Promise.resolve(null);\r\n    if (\r\n      ((options = options || {}),\r\n      !premiumMessagingEntitled() && options.allowFree !== !0)\r\n    )\r\n      return (\r\n        renderStatus(\"DSD+ is required for premium conversation controls.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var cid = String(conversationId || state.activeConversationId || \"\").trim();\r\n    if (!cid)\r\n      return (\r\n        renderStatus(\"Select a conversation first.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var conversation = conversationById(cid) || {},\r\n      premiumState = premiumStateObject(\r\n        conversation.premiumState || conversation.premium_state,\r\n      ),\r\n      patch = updater(premiumState, conversation);\r\n    if (!patch) return Promise.resolve(null);\r\n    ((patch.premiumConversationAction = action || \"premium-conversation\"),\r\n      (patch.premiumState = patch.premiumState || premiumState));\r\n    var proxyAction = \"\";\r\n    return (\r\n      action === \"pin-conversation\" && (proxyAction = \"pin_conversation\"),\r\n      action === \"unpin-conversation\" && (proxyAction = \"unpin_conversation\"),\r\n      action === \"group-rename\" && (proxyAction = \"set_group_name\"),\r\n      proxyAction && supabaseCutoverReady()\r\n        ? premiumMessageActionViaProxy({\r\n            action: proxyAction,\r\n            conversationId: cid,\r\n            name: patch.displayName || patch.display_name || patch.name || \"\",\r\n          })\r\n            .then(function (result) {\r\n              return (\r\n                (state.conversations = state.conversations.map(function (item) {\r\n                  return String(item.conversationId || item.id || \"\") === cid\r\n                    ? Object.assign(\r\n                        {},\r\n                        item,\r\n                        patch,\r\n                        (result && result.conversation) || {},\r\n                      )\r\n                    : item;\r\n                })),\r\n                renderMessages(),\r\n                result || patch\r\n              );\r\n            })\r\n            .catch(function (error) {\n              claim(\"premium-conversation-action:proxy-fail-closed\", {\n                conversationId: cid,\n                action: action || \"\",\n                error: (error && error.message) || String(error),\n              });\n              throw error;\n            })\n            .catch(function (fallbackError) {\r\n              return (\r\n                queueDraft(\r\n                  \"premium-conversation-action\",\r\n                  { conversationId: cid, action: action || \"\" },\r\n                  fallbackError,\r\n                ),\r\n                null\r\n              );\r\n            })\r\n        : (renderStatus(\"Secure message controls are temporarily unavailable.\"), Promise.resolve(null))\n    );\r\n  }\r\n  function setDirectConversationNickname(conversationId, nickname) {\n    var value = String(nickname || \"\")\r\n      .trim()\r\n      .slice(0, 48);\r\n    if (!requireActiveProfile(\"set direct-message nickname\"))\r\n      return Promise.resolve(null);\r\n    if (!premiumMessagingEntitled())\r\n      return (\r\n        renderStatus(\"DSD+ is required for direct-message nicknames.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var cid = String(conversationId || state.activeConversationId || \"\").trim(),\r\n      conversation = conversationById(cid) || {};\r\n    if (!cid)\r\n      return (\r\n        renderStatus(\"Select a direct conversation first.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    if (conversationType(conversation) === \"groups\")\r\n      return (\r\n        renderStatus(\r\n          \"Direct nicknames are private labels for direct messages.\",\r\n        ),\r\n        Promise.resolve(null)\r\n      );\r\n    if (!supabaseCutoverReady())\n      return (\n        renderStatus(\"Secure nickname controls are temporarily unavailable.\"),\n        Promise.resolve(null)\n      );\n    return premiumMessageActionViaProxy({\n      action: \"set_nickname\",\n      conversationId: cid,\n      nickname: value,\n    })\n      .then(function (result) {\n        var nicknames = privateConversationNicknamesMap(),\n          privateSettingsUpdatedAt = now();\n        return (\n          privateConversationNicknameKeys(cid, conversation).forEach(\n            function (nicknameKey) {\n              value\n                ? (nicknames[nicknameKey] = value)\n                : delete nicknames[nicknameKey];\n            },\n          ),\n          (state.profile = Object.assign({}, state.profile || {}, {\n            messageConversationNicknames: nicknames,\n            directConversationNicknames: nicknames,\n            privateMessageSettingsUpdatedAt: privateSettingsUpdatedAt,\n          })),\n          renderStatus(value ? \"Nickname saved.\" : \"Nickname cleared.\"),\n          renderMessages(),\n          result || state.profile\n        );\n      })\n      .catch(function (error) {\n        return (\n          claim(\"premium-message-direct-nickname:proxy-fail-closed\", {\n            conversationId: cid,\n            error: (error && error.message) || String(error),\n          }),\n          renderStatus(\"Nickname could not be saved.\"),\n          queueDraft(\n            \"premium-message-direct-nickname\",\n            { conversationId: cid },\n            error,\n          ),\n          null\n        );\n      });\n  }\n  function renameGroupConversation(conversationId, name) {\r\n    var value = String(name || \"\")\r\n      .trim()\r\n      .slice(0, 64);\r\n    if (!value)\r\n      return (\r\n        renderStatus(\"Group name cannot be empty.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var cid = String(conversationId || state.activeConversationId || \"\").trim(),\r\n      targetConversation = conversationById(cid) || {};\r\n    if (!canRenameGroupConversation(targetConversation))\r\n      return (\r\n        renderStatus(\"You cannot rename this group.\"),\r\n        Promise.resolve(null)\r\n      );\r\n    var systemPreview =\r\n      (displayName() || profileKey() || \"A member\") +\r\n      \" renamed the group to \" +\r\n      value +\r\n      \".\";\r\n    return patchConversationPremiumState(\r\n      conversationId,\r\n      \"group-rename\",\r\n      function (premiumState, conversation) {\r\n        if (!canRenameGroupConversation(conversation))\r\n          return (renderStatus(\"You cannot rename this group.\"), null);\r\n        var history = Array.isArray(premiumState.groupNameHistory)\r\n          ? premiumState.groupNameHistory.slice(-9)\r\n          : [];\r\n        return (\r\n          history.push({\r\n            name:\r\n              conversation.displayName ||\r\n              conversation.display_name ||\r\n              conversation.name ||\r\n              \"\",\r\n            renamedAt: now(),\r\n            renamedByUserId: actorRelationshipIdentity(),\r\n            renamedByProfileKey: profileKey(),\r\n          }),\r\n          (premiumState.groupNameHistory = history),\r\n          (premiumState.groupName = value),\r\n          (premiumState.groupRenamedAt = now()),\r\n          (premiumState.groupRenamedByProfileKey = profileKey()),\r\n          {\r\n            displayName: value,\r\n            name: value,\r\n            lastMessagePreview: systemPreview.slice(0, 140),\r\n            renamedAt: now(),\r\n            renamedByUserId: actorRelationshipIdentity(),\r\n            premiumState: premiumState,\r\n          }\r\n        );\r\n      },\r\n    ).then(function (result) {\r\n      if (!result || !cid) return result;\r\n      (renderStatus(\"Group renamed.\"), renderMessages());\r\n      var renamedConversation = conversationById(cid) || {},\r\n        recipients = mergeUniqueSorted(\r\n          renamedConversation.participantIds ||\r\n            renamedConversation.participants ||\r\n            [],\r\n        );\r\n      return (\r\n        recipients.forEach(function (recipientId) {\r\n          !recipientId ||\r\n            identityMatchesCurrent(recipientId, \"\") ||\r\n            notify(\r\n              recipientId,\r\n              \"messages\",\r\n              \"Group renamed\",\r\n              systemPreview,\r\n              \"/pages/messages?conversationId=\" + encodeURIComponent(cid),\r\n              { conversationId: cid, action: \"group-rename\", groupName: value },\r\n            );\r\n        }),\r\n        result\r\n      );\r\n    });\r\n  }\r\n  function closeMessageNameEditor() {\r\n    var panel = qs(\"[data-dsd-msg384-name-editor]\");\r\n    if (panel) {\r\n      ((panel.hidden = !0), panel.setAttribute(\"aria-hidden\", \"true\"));\r\n      var form = qs(\"[data-dsd-msg384-name-editor-form]\", panel);\r\n      form && form.reset();\r\n    }\r\n  }\r\n  function openMessageNameEditor(mode, conversationId, currentValue) {\r\n    var panel = qs(\"[data-dsd-msg384-name-editor]\"),\r\n      form = panel && qs(\"[data-dsd-msg384-name-editor-form]\", panel);\r\n    if (!panel || !form) {\r\n      renderStatus(\r\n        \"Conversation editor unavailable. Reopen the thread and try again.\",\r\n      );\r\n      return;\r\n    }\r\n    var normalizedMode = mode === \"group\" ? \"group\" : \"direct\",\r\n      cid = String(conversationId || state.activeConversationId || \"\").trim();\r\n    if (!cid) {\r\n      renderStatus(\"Select a conversation first.\");\r\n      return;\r\n    }\r\n    var label = qs(\"[data-dsd-msg384-name-editor-label]\", form),\r\n      modeField = qs('[name=\"mode\"]', form),\r\n      conversationField = qs('[name=\"conversationId\"]', form),\r\n      valueField = qs('[name=\"value\"]', form);\r\n    (form.removeAttribute(\"aria-busy\"),\r\n      delete form.dataset.dsdComposerBusy,\r\n      qsa('button[type=\"submit\"]', form).forEach(function (btn) {\r\n        ((btn.disabled = !1),\r\n          btn.dataset.dsdBusyText &&\r\n            (btn.textContent = btn.dataset.dsdBusyText),\r\n          delete btn.dataset.dsdBusyText);\r\n      }),\r\n      label &&\r\n        (label.textContent =\r\n          normalizedMode === \"group\" ? \"Group name\" : \"Private nickname\"),\r\n      modeField && (modeField.value = normalizedMode),\r\n      conversationField && (conversationField.value = cid),\r\n      valueField &&\r\n        (valueField.value = String(currentValue || \"\").slice(\r\n          0,\r\n          normalizedMode === \"group\" ? 64 : 48,\r\n        )),\r\n      (panel.hidden = !1),\r\n      panel.setAttribute(\"aria-hidden\", \"false\"),\r\n      qsa(\".dsd-msg384__menu[open]\").forEach(function (menu) {\r\n        menu.removeAttribute(\"open\");\r\n      }),\r\n      renderStatus(\r\n        normalizedMode === \"group\"\r\n          ? \"Rename the group and save.\"\r\n          : \"Set a private nickname for this direct thread.\",\r\n      ),\r\n      valueField &&\r\n        window.setTimeout(function () {\r\n          (valueField.focus(), valueField.select && valueField.select());\r\n        }, 0));\r\n  }\r\n  function handleMessageNameEditorSubmit(form) {\r\n    if (!(!form || form.dataset.dsdComposerBusy === \"true\")) {\r\n      var mode = String((qs('[name=\"mode\"]', form) || {}).value || \"\").trim(),\r\n        cid = String(\r\n          (qs('[name=\"conversationId\"]', form) || {}).value ||\r\n            state.activeConversationId ||\r\n            \"\",\r\n        ).trim(),\r\n        value = String((qs('[name=\"value\"]', form) || {}).value || \"\").trim();\r\n      if (!cid) {\r\n        renderStatus(\"Select a conversation first.\");\r\n        return;\r\n      }\r\n      var action =\r\n        mode === \"group\"\r\n          ? renameGroupConversation(cid, value)\r\n          : setDirectConversationNickname(cid, value);\r\n      composerBusy(\r\n        form,\r\n        mode === \"group\" ? \"Saving group name...\" : \"Saving nickname...\",\r\n        action,\r\n      ).then(function (result) {\r\n        result && closeMessageNameEditor();\r\n      });\r\n    }\r\n  }\r\n  function pinConversation(conversationId, pinned) {\r\n    return patchConversationPremiumState(\r\n      conversationId,\r\n      pinned === !1 ? \"unpin-conversation\" : \"pin-conversation\",\r\n      function (premiumState) {\r\n        var cid = String(\r\n          conversationId || state.activeConversationId || \"\",\r\n        ).trim();\r\n        ((premiumState.pinsByUserId = Object.assign(\r\n          {},\r\n          premiumState.pinsByUserId || {},\r\n        )),\r\n          (premiumState.pinsByProfileKey = Object.assign(\r\n            {},\r\n            premiumState.pinsByProfileKey || {},\r\n          )));\r\n        var next = pinned !== !1;\r\n        return next &&\r\n          !conversationPinnedByCurrent(conversationById(cid) || {}) &&\r\n          currentPinnedConversationCount(cid) >=\r\n            (hasDsdPlus()\r\n              ? premiumMessagePolicy().dsdPlusPinnedLimit\r\n              : premiumMessagePolicy().freePinnedLimit)\r\n          ? (renderStatus(\"Pinned conversation limit reached.\"), null)\r\n          : ((premiumState.pinsByUserId[actorRelationshipIdentity()] = {\r\n              pinned: next,\r\n              at: now(),\r\n            }),\r\n            (premiumState.pinsByProfileKey[profileKey()] = {\r\n              pinned: next,\r\n              at: now(),\r\n            }),\r\n            { premiumState: premiumState });\r\n      },\r\n      { allowFree: !0 },\r\n    );\r\n  }\r\n  function messageListSignature(conversationId) {\r\n    return dedupeConversationMessages(\r\n      (state.messagesByConversation[conversationId] || []).filter(\r\n        messageDisplayable,\r\n      ),\r\n    )\r\n      .map(function (message) {\r\n        var media = normalizeMessageMedia(message);\r\n        return [\r\n          (message && (message.messageId || message.id)) || \"\",\r\n          valueMillis(\r\n            message &&\r\n              (message.updatedAt || message.createdAt || message.sentAt),\r\n          ),\r\n          media\r\n            .map(function (item) {\r\n              return mediaSignatureId(item);\r\n            })\r\n            .join(\",\"),\r\n          (message &&\n            (message.status ||\n              message.unsentAt ||\n              message.expiresAt ||\n              message.viewOnceOpenedAt ||\n              message.editedAt)) ||\n            \"\",\n          message && (message.viewOnce || message.view_once)\n            ? messageViewOnceConsumed(message)\n              ? \"consumed\"\n              : messageViewOnceRevealActive(message)\n                ? \"revealed\"\n                : \"available\"\n            : \"\",\n        ].join(\":\");\n      })\r\n      .join(\"|\");\r\n  }\r\n  function scheduleMessageExpiryTimer(conversationId) {\r\n    messageExpiryTimer &&\r\n      (window.clearTimeout(messageExpiryTimer), (messageExpiryTimer = null));\r\n    var cid = String(conversationId || state.activeConversationId || \"\").trim();\r\n    if (cid) {\r\n      var nowMs = Date.now(),\r\n        soonest = 0;\r\n      (dedupeConversationMessages(\r\n        (state.messagesByConversation[cid] || []).filter(messageDisplayable),\r\n      ).forEach(function (message) {\r\n        var premiumState = premiumStateObject(\r\n            message.premiumState || message.premium_state,\r\n          ),\r\n          expiresMs = valueMillis(\r\n            message.expiresAt ||\r\n              message.expires_at ||\r\n              premiumState.expiresAt ||\r\n              premiumState.expires_at ||\r\n              \"\",\r\n          );\r\n        expiresMs &&\r\n          expiresMs > nowMs &&\r\n          (!soonest || expiresMs < soonest) &&\r\n          (soonest = expiresMs);\r\n      }),\r\n        soonest &&\r\n          (messageExpiryTimer = window.setTimeout(\r\n            function () {\r\n              ((messageExpiryTimer = null), renderMessages());\r\n            },\r\n            Math.min(Math.max(1e3, soonest - nowMs + 1e3), 2147483e3),\r\n          )));\r\n    }\r\n  }\r\n  function messageDisplayable(message) {\r\n    return !!(\r\n      message &&\r\n      isNormalContentRecord(message) &&\r\n      !message.deletedAt &&\r\n      !message.deleted_at &&\r\n      !message.hiddenAt &&\r\n      !message.hidden_at &&\r\n      !message.archivedAt &&\r\n      !message.archived_at &&\r\n      messageVisibleAfterViewOnce(message)\r\n    );\r\n  }\r\n  function canonicalMessageDedupeKey(message) {\r\n    return (\r\n      (message = message || {}),\r\n      clean(\r\n        message.messageId ||\r\n          message.id ||\r\n          message.legacyMessageId ||\r\n          message.legacy_message_id ||\r\n          message.supabaseMessageId ||\r\n          message.supabase_message_id ||\r\n          \"\",\r\n        \"\",\r\n      )\r\n    );\r\n  }\r\n  function messageDedupeScore(message) {\r\n    message = message || {};\r\n    var media = normalizeMessageMedia(message),\r\n      body = stripStoryReferenceEnvelope(\r\n        message.body || message.text || message.message || \"\",\r\n      ),\r\n      opened =\r\n        message.viewOnceOpenedAt || message.view_once_opened_at ? 1e6 : 0,\r\n      unsent =\r\n        message.unsentAt ||\r\n        message.unsent_at ||\r\n        String(message.status || \"\").toLowerCase() === \"unsent\"\r\n          ? 5e5\r\n          : 0;\r\n    return (\r\n      opened +\r\n      unsent +\r\n      (body ? Math.min(String(body).length, 400) : 0) +\r\n      media.length * 1e3 +\r\n      (message.storyReference || message.story_reference ? 120 : 0) +\r\n      valueMillis(\r\n        message.updatedAt ||\r\n          message.updated_at ||\r\n          message.createdAt ||\r\n          message.created_at ||\r\n          message.sentAt ||\r\n          message.sent_at,\r\n      ) /\r\n        1e13\r\n    );\r\n  }\r\n  function dedupeConversationMessages(messages) {\r\n    var out = [],\r\n      indexByKey = {};\r\n    return (\r\n      (messages || []).forEach(function (message) {\r\n        if (messageDisplayable(message)) {\r\n          var key = canonicalMessageDedupeKey(message);\r\n          if (!key) {\r\n            out.push(message);\r\n            return;\r\n          }\r\n          if (indexByKey[key] === void 0) {\r\n            ((indexByKey[key] = out.length), out.push(message));\r\n            return;\r\n          }\r\n          var index = indexByKey[key];\r\n          messageDedupeScore(message) >= messageDedupeScore(out[index]) &&\r\n            (out[index] = message);\r\n        }\r\n      }),\r\n      out.sort(function (a, b) {\r\n        return (\r\n          valueMillis(\r\n            a &&\r\n              (a.createdAt ||\r\n                a.created_at ||\r\n                a.sentAt ||\r\n                a.sent_at ||\r\n                a.updatedAt ||\r\n                a.updated_at),\r\n          ) -\r\n          valueMillis(\r\n            b &&\r\n              (b.createdAt ||\r\n                b.created_at ||\r\n                b.sentAt ||\r\n                b.sent_at ||\r\n                b.updatedAt ||\r\n                b.updated_at),\r\n          )\r\n        );\r\n      })\r\n    );\r\n  }\r\n  function conversationParticipantIdentities(conversation) {\r\n    conversation = conversation || {};\r\n    for (\r\n      var out = [],\r\n        keys = (\r\n          conversation.participantKeys ||\r\n          conversation.participantProfileKeys ||\r\n          conversation.participant_profile_keys ||\r\n          []\r\n        ).filter(Boolean),\r\n        ids = (\r\n          conversation.participantIds ||\r\n          conversation.participants ||\r\n          conversation.participant_ids ||\r\n          []\r\n        ).filter(Boolean),\r\n        max = Math.max(keys.length, ids.length, 1),\r\n        i = 0;\r\n      i < max;\r\n      i++\r\n    ) {\r\n      var key = keys[i] || \"\",\r\n        id = ids[i] || \"\";\r\n      !key && identityMatchesCurrent(id, \"\") && (key = profileKey());\r\n      var identity = profileIdentity(id, key, key || id || \"Participant\");\r\n      out.some(function (item) {\r\n        return (\r\n          (item.uid && item.uid === identity.uid) ||\r\n          (item.key && item.key === identity.key)\r\n        );\r\n      }) || out.push(identity);\r\n    }\r\n    return (out.length || out.push(conversationPeer(conversation)), out);\r\n  }\r\n  function participantLinksHTML(conversation) {\n    return conversationParticipantIdentities(conversation)\n      .map(function (person) {\n        var safeKey = person.key && !uuidLike(person.key) ? person.key : \"\",\n          safeName = publicDisplayName(person.name, \"DSD member\"),\n          href = safeKey ? profileRouteHref(safeKey) : \"/pages/user-profile\";\n        return (\n          '<a href=\"' +\n          html(href) +\n          '\" data-dsd-message-participant-profile=\"' +\n          html(safeKey) +\n          '\">' +\n          messageAvatar(person, \"dsd-msg384__avatar\", \"plain-avatar\") +\n          \"<strong>\" +\n          html(safeName) +\n          \"</strong></a>\"\n        );\n      })\n      .join(\"\");\r\n  }\r\n  function messageLifecycleProofEnabled() {\r\n    try {\r\n      return (\r\n        new URL(window.location.href).searchParams.get(\r\n          \"messageLifecycleProof\",\r\n        ) === \"1\"\r\n      );\r\n    } catch (e) {\r\n      return !1;\r\n    }\r\n  }\r\n  function messageLifecycleProofSuffix(value) {\r\n    return (\r\n      (value = String(value || \"\").trim()),\r\n      value ? \"...\" + value.slice(-8) : \"\"\r\n    );\r\n  }\r\n  function renderMessageLifecycleProofPanel() {\r\n    if (!(!messageLifecycleProofEnabled() || !document.body)) {\r\n      var panel = qs(\"[data-dsd-message-lifecycle-proof]\");\r\n      if (!panel) {\r\n        ((panel = document.createElement(\"aside\")),\r\n          panel.setAttribute(\"data-dsd-message-lifecycle-proof\", BUILD),\r\n          panel.setAttribute(\"aria-label\", \"Message lifecycle proof\"),\r\n          (panel.style.cssText =\r\n            \"position:fixed;left:8px;top:72px;z-index:2147483647;width:min(360px,calc(100vw - 16px));max-height:48vh;overflow:auto;padding:9px;background:#020713;color:#eef4ff;border:1px solid #caa457;border-radius:8px;font:11px/1.35 ui-monospace,monospace;white-space:pre-wrap\"),\r\n          (panel.innerHTML =\r\n            '<button type=\"button\" data-dsd-copy-message-lifecycle-log style=\"position:sticky;top:0;float:right\">Copy Log</button><pre data-dsd-message-lifecycle-log style=\"margin:28px 0 0;white-space:pre-wrap\"></pre>'),\r\n          document.body.appendChild(panel));\r\n        var copy = qs(\"[data-dsd-copy-message-lifecycle-log]\", panel);\r\n        copy &&\r\n          copy.addEventListener(\"click\", function () {\r\n            var text = JSON.stringify(\r\n              state.messageLifecycleProofLog || [],\r\n              null,\r\n              2,\r\n            );\r\n            navigator.clipboard &&\r\n              navigator.clipboard.writeText &&\r\n              navigator.clipboard.writeText(text).catch(function () {});\r\n          });\r\n      }\r\n      var output = qs(\"[data-dsd-message-lifecycle-log]\", panel);\r\n      output &&\r\n        (output.textContent = JSON.stringify(\r\n          (state.messageLifecycleProofLog || []).slice(-80),\r\n          null,\r\n          2,\r\n        ));\r\n    }\r\n  }\r\n  function messageLifecycleProofEvent(type, details) {\r\n    messageLifecycleProofEnabled() &&\r\n      ((details = Object.assign({}, details || {})),\r\n      [\"threadId\", \"messageId\", \"recipientId\"].forEach(function (key) {\r\n        details[key] &&\r\n          (details[key] = messageLifecycleProofSuffix(details[key]));\r\n      }),\r\n      Object.keys(details).forEach(function (key) {\r\n        /url/i.test(key) &&\r\n          typeof details[key] == \"string\" &&\r\n          (details[key] = details[key] ? \"[redacted]\" : \"\");\r\n      }),\r\n      state.messageLifecycleProofLog.push({\r\n        event: type,\r\n        at: new Date().toISOString(),\r\n        details: details,\r\n      }),\r\n      (state.messageLifecycleProofLog =\r\n        state.messageLifecycleProofLog.slice(-120)),\r\n      renderMessageLifecycleProofPanel());\r\n  }\r\n  function messageThreadSession(conversationId, create) {\r\n    var cid = String(conversationId || \"\").trim();\r\n    return cid\r\n      ? (!state.messageThreadSessions[cid] &&\r\n          create !== !1 &&\r\n          beginMessageThreadSession(cid, !0),\r\n        state.messageThreadSessions[cid] || null)\r\n      : null;\r\n  }\r\n  function beginMessageThreadSession(conversationId, force) {\r\n    var cid = String(conversationId || \"\").trim();\r\n    if (!cid) return null;\r\n    var existing = state.messageThreadSessions[cid];\r\n    if (existing && !force) return existing;\r\n    var session = {\r\n      threadId: cid,\r\n      token: Date.now() + \"-\" + Math.random().toString(36).slice(2, 7),\r\n      initialLoadStarted: !0,\r\n      initialLoadComplete: !1,\r\n      canonicalInitialLoadComplete: !1,\r\n      initialMessagesRendered: !1,\r\n      initialMediaSettled: !1,\r\n      initialBottomPositionApplied: !1,\r\n      initialPositioning: !1,\r\n      userHasScrolled: !1,\r\n      userScrollRevision: 0,\r\n      nearBottom: !0,\r\n      lastKnownScrollHeight: 0,\r\n      initialScrollWrites: 0,\r\n      realtimeScrollWrites: 0,\r\n      realtimeEvents: 0,\r\n      messageCount: 0,\r\n      renderedMessageCount: 0,\r\n      mediaPendingCount: 0,\r\n    };\r\n    return (\r\n      (state.messageThreadSessions[cid] = session),\r\n      messageLifecycleProofEvent(\"THREAD OPEN EVENT\", {\r\n        threadId: cid,\r\n        messageCount: 0,\r\n        scrollHeight: 0,\r\n        clientHeight: 0,\r\n        scrollTop: 0,\r\n        initialPositionOwner: \"MessagesRouteConversationLifecycle\",\r\n        scrollWrites: 0,\r\n        mediaPendingCount: 0,\r\n        userScrolled: !1,\r\n        realtimeEventCount: 0,\r\n      }),\r\n      session\r\n    );\r\n  }\r\n  function messagePendingMediaCount(messages) {\r\n    return qsa(\"[data-dsd-media-id]\", messages).filter(function (frame) {\r\n      if (\r\n        frame.classList.contains(\"is-unavailable\") ||\r\n        frame.classList.contains(\"is-quarantined\")\r\n      )\r\n        return !1;\r\n      var media = qs(\"img,video\", frame);\r\n      return media\r\n        ? media.tagName === \"IMG\"\r\n          ? !(media.complete && media.naturalWidth > 0)\r\n          : !(\r\n              media.readyState >= 1 &&\r\n              media.videoWidth > 0 &&\r\n              media.videoHeight > 0\r\n            )\r\n        : !0;\r\n    }).length;\r\n  }\r\n  function waitForMessageLayoutStable(messages, session) {\r\n    return new Promise(function (resolve) {\r\n      var settled = !1,\r\n        observer = null,\r\n        resizeObserver = null,\r\n        timeout = null,\r\n        quietTimer = null,\r\n        startedAt = Date.now(),\r\n        lastLayoutChangeAt = startedAt,\r\n        quietWindowMs = 350,\r\n        pendingMediaMinimumMs = 650,\r\n        maximumWaitMs = 1800;\r\n      function finish() {\r\n        settled ||\r\n          ((settled = !0),\r\n          observer && observer.disconnect(),\r\n          resizeObserver && resizeObserver.disconnect(),\r\n          timeout && window.clearTimeout(timeout),\r\n          quietTimer && window.clearTimeout(quietTimer),\r\n          messages.removeEventListener(\"load\", layoutChanged, !0),\r\n          messages.removeEventListener(\"loadedmetadata\", layoutChanged, !0),\r\n          resolve());\r\n      }\r\n      function scheduleQuietCheck() {\r\n        quietTimer && window.clearTimeout(quietTimer);\r\n        var nowMs = Date.now(),\r\n          pending = session.mediaPendingCount > 0,\r\n          minimumAt = startedAt + (pending ? pendingMediaMinimumMs : 160),\r\n          quietAt = lastLayoutChangeAt + quietWindowMs,\r\n          waitMs = Math.max(0, Math.max(minimumAt, quietAt) - nowMs);\r\n        quietTimer = window.setTimeout(\r\n          function () {\r\n            session.mediaPendingCount = messagePendingMediaCount(messages);\r\n            var elapsed = Date.now() - startedAt,\r\n              quietFor = Date.now() - lastLayoutChangeAt;\r\n            if (\r\n              elapsed >= maximumWaitMs ||\r\n              (quietFor >= quietWindowMs &&\r\n                (!session.mediaPendingCount ||\r\n                  elapsed >= pendingMediaMinimumMs))\r\n            ) {\r\n              finish();\r\n              return;\r\n            }\r\n            scheduleQuietCheck();\r\n          },\r\n          Math.max(16, waitMs),\r\n        );\r\n      }\r\n      function layoutChanged() {\r\n        ((lastLayoutChangeAt = Date.now()),\r\n          (session.mediaPendingCount = messagePendingMediaCount(messages)),\r\n          scheduleQuietCheck());\r\n      }\r\n      (window.MutationObserver &&\r\n        ((observer = new MutationObserver(layoutChanged)),\r\n        observer.observe(messages, {\r\n          childList: !0,\r\n          subtree: !0,\r\n          attributes: !0,\r\n          attributeFilter: [\"class\", \"src\", \"data-dsd-media-status\"],\r\n        })),\r\n        window.ResizeObserver &&\r\n          ((resizeObserver = new ResizeObserver(layoutChanged)),\r\n          resizeObserver.observe(messages)),\r\n        messages.addEventListener(\"load\", layoutChanged, !0),\r\n        messages.addEventListener(\"loadedmetadata\", layoutChanged, !0),\r\n        (timeout = window.setTimeout(finish, maximumWaitMs)),\r\n        layoutChanged());\r\n    }).then(function () {\r\n      return new Promise(function (resolve) {\r\n        var previous = -1,\r\n          stableFrames = 0,\r\n          attempts = 0;\r\n        function frame() {\r\n          if (\r\n            !messages.isConnected ||\r\n            session.token !==\r\n              (state.messageThreadSessions[session.threadId] || {}).token\r\n          ) {\r\n            resolve();\r\n            return;\r\n          }\r\n          var height = messages.scrollHeight;\r\n          if (\r\n            ((stableFrames = height === previous ? stableFrames + 1 : 0),\r\n            (previous = height),\r\n            (attempts += 1),\r\n            stableFrames >= 2 || attempts >= 10)\r\n          ) {\r\n            resolve();\r\n            return;\r\n          }\r\n          window.requestAnimationFrame(frame);\r\n        }\r\n        window.requestAnimationFrame(frame);\r\n      });\r\n    });\r\n  }\r\n  function applyInitialMessageBottom(messages, session) {\r\n    !messages ||\r\n      !session ||\r\n      session.initialBottomPositionApplied ||\r\n      session.initialPositioning ||\r\n      !session.initialLoadComplete ||\r\n      !session.canonicalInitialLoadComplete ||\r\n      ((session.initialPositioning = !0),\r\n      (messages.style.visibility = \"hidden\"),\r\n      waitForMessageLayoutStable(messages, session).then(function () {\r\n        var current = state.messageThreadSessions[session.threadId];\r\n        !messages.isConnected ||\r\n          !current ||\r\n          current.token !== session.token ||\r\n          state.activeConversationId !== session.threadId ||\r\n          ((session.initialMediaSettled = !0),\r\n          (messages.scrollTop = Math.max(\r\n            0,\r\n            messages.scrollHeight - messages.clientHeight,\r\n          )),\r\n          (session.initialScrollWrites += 1),\r\n          (session.initialBottomPositionApplied = !0),\r\n          (session.initialPositioning = !1),\r\n          (session.nearBottom = !0),\r\n          (session.lastKnownScrollHeight = messages.scrollHeight),\r\n          messages.setAttribute(\"data-dsd-follow-bottom\", \"true\"),\r\n          messages.setAttribute(\"data-dsd-user-scroll-lock\", \"false\"),\r\n          messages.setAttribute(\r\n            \"data-dsd-initial-bottom-applied\",\r\n            session.token,\r\n          ),\r\n          (messages.style.visibility = \"\"),\r\n          guardInitialMessageBottom(messages, session),\r\n          messageLifecycleProofEvent(\"THREAD OPEN EVENT\", {\r\n            threadId: session.threadId,\r\n            messageCount: session.messageCount,\r\n            scrollHeight: messages.scrollHeight,\r\n            clientHeight: messages.clientHeight,\r\n            scrollTop: messages.scrollTop,\r\n            initialPositionOwner: \"MessagesRouteConversationLifecycle\",\r\n            initialPositionTimestamp: new Date().toISOString(),\r\n            scrollWrites: session.initialScrollWrites,\r\n            mediaPendingCount: session.mediaPendingCount,\r\n            mediaSettledTimestamp: new Date().toISOString(),\r\n            userScrolled: session.userHasScrolled,\r\n            realtimeEventCount: session.realtimeEvents,\r\n          }));\r\n      }));\r\n  }\r\n  function guardInitialMessageBottom(messages, session) {\r\n    if (!messages || !session || session.initialBottomGuardActive) return;\r\n    session.initialBottomGuardActive = !0;\r\n    var token = session.token,\r\n      userScrollRevision = session.userScrollRevision,\r\n      observer = null,\r\n      resizeObserver = null,\r\n      quietTimer = null,\r\n      maximumTimer = null;\r\n    function valid() {\r\n      return (\r\n        messages.isConnected &&\r\n        (state.messageThreadSessions[session.threadId] || {}).token === token &&\r\n        state.activeConversationId === session.threadId &&\r\n        session.userScrollRevision === userScrollRevision\r\n      );\r\n    }\r\n    function stop() {\r\n      (observer && observer.disconnect(),\r\n        resizeObserver && resizeObserver.disconnect(),\r\n        quietTimer && window.clearTimeout(quietTimer),\r\n        maximumTimer && window.clearTimeout(maximumTimer),\r\n        messages.removeEventListener(\"load\", pin, !0),\r\n        messages.removeEventListener(\"loadedmetadata\", pin, !0),\r\n        (session.initialBottomGuardActive = !1));\r\n    }\r\n    function pin() {\r\n      if (!valid()) {\r\n        stop();\r\n        return;\r\n      }\r\n      var bottom = Math.max(0, messages.scrollHeight - messages.clientHeight);\r\n      (Math.abs(messages.scrollTop - bottom) > 1 &&\r\n        ((messages.scrollTop = bottom), (session.initialScrollWrites += 1)),\r\n        (session.nearBottom = !0),\r\n        (session.userHasScrolled = !1),\r\n        (session.lastKnownScrollHeight = messages.scrollHeight),\r\n        messages.setAttribute(\"data-dsd-follow-bottom\", \"true\"),\r\n        messages.setAttribute(\"data-dsd-user-scroll-lock\", \"false\"),\r\n        quietTimer && window.clearTimeout(quietTimer),\r\n        messagePendingMediaCount(messages) === 0 &&\r\n          (quietTimer = window.setTimeout(stop, 1200)));\r\n    }\r\n    (messages.addEventListener(\"load\", pin, !0),\r\n      messages.addEventListener(\"loadedmetadata\", pin, !0),\r\n      window.MutationObserver &&\r\n        ((observer = new MutationObserver(pin)),\r\n        observer.observe(messages, {\r\n          childList: !0,\r\n          subtree: !0,\r\n          attributes: !0,\r\n          attributeFilter: [\"class\", \"src\", \"data-dsd-media-status\"],\r\n        })),\r\n      window.ResizeObserver &&\r\n        ((resizeObserver = new ResizeObserver(pin)),\r\n        resizeObserver.observe(messages)),\r\n      (maximumTimer = window.setTimeout(function () {\r\n        (pin(), stop());\r\n      }, 2e4)),\r\n      pin());\r\n  }\r\n  function followRealtimeMessageAfterLayout(messages, session) {\r\n    if (!(\r\n      !messages ||\r\n      !session ||\r\n      !session.initialBottomPositionApplied ||\r\n      !session.nearBottom ||\r\n      session.userHasScrolled\r\n    )) {\r\n      var token = session.token,\r\n        userScrollRevision = session.userScrollRevision;\r\n      window.requestAnimationFrame(function () {\r\n        window.requestAnimationFrame(function () {\r\n          !messages.isConnected ||\r\n            (state.messageThreadSessions[session.threadId] || {}).token !==\r\n              token ||\r\n            !session.nearBottom ||\r\n            session.userHasScrolled ||\r\n            session.userScrollRevision !== userScrollRevision ||\r\n            ((messages.scrollTop = Math.max(\r\n              0,\r\n              messages.scrollHeight - messages.clientHeight,\r\n            )),\r\n            (session.realtimeScrollWrites += 1),\r\n            (session.lastKnownScrollHeight = messages.scrollHeight));\r\n        });\r\n      });\r\n    }\r\n  }\r\n  function captureMessageViewportAnchor(messages) {\r\n    if (!messages) return null;\r\n    var viewportTop = messages.scrollTop,\r\n      rows = qsa(\"[data-message-id]\", messages),\r\n      row =\r\n        rows.filter(function (item) {\r\n          return item.offsetTop + item.offsetHeight > viewportTop;\r\n        })[0] ||\r\n        rows[0] ||\r\n        null;\r\n    return row\r\n      ? {\r\n          messageId: row.getAttribute(\"data-message-id\") || \"\",\r\n          offset: row.offsetTop - viewportTop,\r\n        }\r\n      : null;\r\n  }\r\n  function preserveMessageViewportAnchorAfterLayout(messages, session, anchor) {\n    if (!(!messages || !session || !anchor || !anchor.messageId)) {\r\n      var token = session.token,\r\n        userScrollRevision = session.userScrollRevision;\r\n      waitForMessageLayoutStable(messages, session).then(function () {\r\n        if (!(\r\n          !messages.isConnected ||\r\n          (state.messageThreadSessions[session.threadId] || {}).token !==\r\n            token ||\r\n          session.userScrollRevision !== userScrollRevision\r\n        )) {\r\n          var row =\r\n            qsa(\"[data-message-id]\", messages).filter(function (item) {\r\n              return item.getAttribute(\"data-message-id\") === anchor.messageId;\r\n            })[0] || null;\r\n          if (row) {\r\n            var nextScrollTop = Math.max(0, row.offsetTop - anchor.offset);\r\n            (Math.abs(messages.scrollTop - nextScrollTop) > 1 &&\r\n              (messages.scrollTop = nextScrollTop),\r\n              (session.lastKnownScrollHeight = messages.scrollHeight));\r\n          }\r\n        }\r\n      });\r\n    }\r\n  }\n  function updateMessageScrollToLatestControl(messages, session) {\n    if (!messages) return;\n    var conversation = messages.closest(\"[data-dsd-msg384-conversation]\"),\n      control = conversation && qs(\"[data-dsd-message-scroll-latest]\", conversation),\n      awayFromBottom = !!(\n        session &&\n        session.initialBottomPositionApplied &&\n        session.userHasScrolled &&\n        !session.nearBottom\n      );\n    if (!conversation) return;\n    if (!control) {\n      control = document.createElement(\"button\");\n      control.type = \"button\";\n      control.className = \"dsd-msg384__scroll-latest\";\n      control.setAttribute(\"data-dsd-message-scroll-latest\", \"\");\n      control.setAttribute(\"aria-label\", \"Scroll to latest messages\");\n      control.innerHTML = '<span aria-hidden=\"true\">\\u2193</span><span>Latest</span>';\n      conversation.appendChild(control);\n    }\n    control.hidden = !awayFromBottom;\n    control.setAttribute(\"aria-hidden\", awayFromBottom ? \"false\" : \"true\");\n  }\n  function scrollMessageThreadToLatest(messages) {\n    if (!messages) return;\n    var session = messageThreadSession(state.activeConversationId, !1);\n    messages.scrollTop = Math.max(0, messages.scrollHeight - messages.clientHeight);\n    if (session) {\n      session.userHasScrolled = !1;\n      session.nearBottom = !0;\n      session.lastKnownScrollHeight = messages.scrollHeight;\n    }\n    messages.setAttribute(\"data-dsd-user-scroll-lock\", \"false\");\n    messages.setAttribute(\"data-dsd-follow-bottom\", \"true\");\n    updateMessageScrollToLatestControl(messages, session);\n  }\n  function reconcileMessageHistory(messages, nextHTML) {\n    var template = document.createElement(\"template\");\r\n    template.innerHTML = nextHTML;\r\n    var nextNodes = Array.prototype.slice.call(template.content.children || []),\r\n      existingById = {};\r\n    Array.prototype.slice\r\n      .call(messages.children || [])\r\n      .forEach(function (node) {\r\n        var id = node.getAttribute && node.getAttribute(\"data-message-id\");\r\n        id && (existingById[id] = node);\r\n      });\r\n    var retained = [];\r\n    (nextNodes.forEach(function (nextNode, index) {\r\n      var id =\r\n          nextNode.getAttribute && nextNode.getAttribute(\"data-message-id\"),\r\n        existing = id ? existingById[id] : null,\r\n        nextSignature =\r\n          nextNode.getAttribute &&\r\n          nextNode.getAttribute(\"data-dsd-message-render-signature\"),\r\n        existingSignature =\r\n          existing &&\r\n          existing.getAttribute(\"data-dsd-message-render-signature\"),\r\n        node =\r\n          existing && nextSignature && nextSignature === existingSignature\r\n            ? existing\r\n            : nextNode;\r\n      retained.push(node);\r\n      var currentAtIndex = messages.children[index] || null;\r\n      currentAtIndex !== node && messages.insertBefore(node, currentAtIndex);\r\n    }),\r\n      Array.prototype.slice\r\n        .call(messages.children || [])\r\n        .forEach(function (node) {\r\n          retained.indexOf(node) === -1 && node.remove();\r\n        }));\r\n  }\r\n  function refreshMessageDrawerHistory(conversationId) {\n    var cid = String(conversationId || \"\").trim(),\n      pendingConversation =\n        state.pendingMessageDraft &&\n        String(\n          state.pendingMessageDraft.conversationId ||\n            state.pendingMessageDraft.id ||\n            \"\",\n        ).trim() === cid\n          ? state.pendingMessageDraft\n          : null,\n      routePendingGroup = routeGroupConversation(),\n      matchingRouteGroup =\n        routePendingGroup &&\n        String(routePendingGroup.conversationId || routePendingGroup.id || \"\") ===\n          cid\n          ? routePendingGroup\n          : null,\n      conversation =\n        pendingConversation || matchingRouteGroup || conversationById(cid) || {},\n      peer = conversationPeer(conversation),\r\n      type = conversationType(conversation),\r\n      recipientUid = type === \"groups\" ? \"\" : peer.uid || \"\",\r\n      recipientKey = type === \"groups\" ? \"\" : peer.key || \"\",\r\n      groupRecipients =\r\n        type === \"groups\"\r\n          ? conversation.groupRecipients ||\r\n            (\r\n              conversation.participantKeys ||\r\n              conversation.participantProfileKeys ||\r\n              []\r\n            )\r\n              .filter(function (key) {\r\n                return key && key !== profileKey();\r\n              })\r\n              .join(\",\")\r\n          : \"\",\r\n      groupName =\r\n        type === \"groups\"\r\n          ? String(\r\n              conversation.groupName ||\r\n                conversation.displayName ||\r\n                conversation.display_name ||\r\n                conversation.name ||\r\n                \"\",\r\n            )\r\n              .trim()\r\n              .slice(0, 64)\r\n          : \"\",\r\n      messages = qs(\"[data-dsd-msg384-message-history]\");\r\n    if (messages) {\r\n      if (!messages.getAttribute(\"data-dsd-scroll-owner-bound\")) {\r\n        var updateMessageScrollState = function () {\r\n            var session2 = messageThreadSession(state.activeConversationId, !1),\r\n              distance =\r\n                messages.scrollHeight -\r\n                messages.scrollTop -\r\n                messages.clientHeight,\r\n              nearBottom = distance <= 48;\r\n            (session2 &&\r\n              ((session2.nearBottom = nearBottom),\r\n              session2.initialBottomPositionApplied &&\r\n                (session2.userHasScrolled = !nearBottom),\r\n              (session2.lastKnownScrollHeight = messages.scrollHeight)),\r\n              messages.setAttribute(\r\n                \"data-dsd-user-scroll-lock\",\r\n                nearBottom ? \"false\" : \"true\",\r\n              ),\r\n              messages.setAttribute(\n                \"data-dsd-follow-bottom\",\n                nearBottom ? \"true\" : \"false\",\n              ),\n              updateMessageScrollToLatestControl(messages, session2));\n          },\r\n          recordUserMessageScroll = function () {\r\n            var session2 = messageThreadSession(state.activeConversationId, !1);\r\n            (session2 &&\r\n              session2.initialBottomPositionApplied &&\r\n              (session2.userScrollRevision += 1),\r\n              messages.setAttribute(\r\n                \"data-dsd-last-user-scroll-at\",\r\n                String(Date.now()),\r\n              ));\r\n          };\r\n        (messages.setAttribute(\"data-dsd-scroll-owner-bound\", \"true\"),\r\n          (messages.style.overflowAnchor = \"none\"),\r\n          messages.addEventListener(\"scroll\", updateMessageScrollState, {\r\n            passive: !0,\r\n          }),\r\n          [\"wheel\", \"touchmove\"].forEach(function (type2) {\r\n            messages.addEventListener(\r\n              type2,\r\n              function () {\r\n                recordUserMessageScroll();\r\n              },\r\n              { passive: !0 },\r\n            );\r\n          }),\r\n          messages.addEventListener(\"keydown\", function () {\r\n            recordUserMessageScroll();\r\n          }),\r\n          messages.addEventListener(\r\n            \"ended\",\r\n            function (event) {\r\n              var mediaRow =\r\n                  event.target &&\r\n                  event.target.closest &&\r\n                  event.target.closest(\r\n                    '[data-message-id] [data-dsd-message-view-once-revealed=\"true\"]',\r\n                  ),\r\n                row = mediaRow && mediaRow.closest(\"[data-message-id]\");\r\n              if (row) {\r\n                var revealKey = messageViewOnceRevealKey(\r\n                  state.activeConversationId,\r\n                  row.getAttribute(\"data-message-id\") || \"\",\r\n                );\r\n                (clearMessageViewOnceRevealKey(revealKey), renderMessages());\r\n              }\r\n            },\r\n            !0,\r\n          ));\r\n      }\r\n      var previousCid =\r\n          messages.getAttribute(\"data-dsd-rendered-conversation-id\") || \"\",\r\n        previousSignature =\r\n          messages.getAttribute(\"data-dsd-message-signature\") || \"\",\r\n        nextSignature =\r\n          (conversationBlocked(conversation) ? \"blocked:\" : \"open:\") +\r\n          messageListSignature(cid),\r\n        distanceFromBottom =\r\n          messages.scrollHeight - messages.scrollTop - messages.clientHeight,\r\n        contentChanged =\r\n          previousCid !== cid || previousSignature !== nextSignature,\r\n        sameConversation = previousCid === cid,\r\n        session = cid ? messageThreadSession(cid, !0) : null,\r\n        nextMessageCount = cid\r\n          ? dedupeConversationMessages(\r\n              (state.messagesByConversation[cid] || []).filter(\r\n                messageDisplayable,\r\n              ),\r\n            ).length\r\n          : 0,\r\n        messageCountIncreased = !!(\r\n          session &&\r\n          session.initialBottomPositionApplied &&\r\n          nextMessageCount > session.renderedMessageCount\r\n        ),\r\n        wasNearBottom = !!(\r\n          session &&\r\n          session.initialBottomPositionApplied &&\r\n          distanceFromBottom <= 48 &&\r\n          !session.userHasScrolled\r\n        ),\r\n        viewportAnchor =\r\n          contentChanged && session && session.initialBottomPositionApplied\r\n            ? captureMessageViewportAnchor(messages)\r\n            : null;\r\n      (contentChanged &&\r\n        (session &&\r\n          !session.initialBottomPositionApplied &&\r\n          (messages.style.visibility = \"hidden\"),\r\n        reconcileMessageHistory(\r\n          messages,\r\n          cid\r\n            ? messageListHTML(cid, conversation)\r\n            : '<article class=\"dsd-msg384__bubble is-system\"><p>Select a conversation.</p><small>Open a thread from the inbox.</small></article>',\r\n        ),\r\n        messages.setAttribute(\"data-dsd-rendered-conversation-id\", cid),\r\n        messages.setAttribute(\"data-dsd-message-signature\", nextSignature),\r\n        session &&\r\n          session.initialBottomPositionApplied &&\r\n          ((session.realtimeEvents += 1),\r\n          (session.nearBottom = wasNearBottom))),\r\n        session && (session.renderedMessageCount = nextMessageCount));\n      messages.setAttribute(\n        \"data-dsd-realtime-status\",\n        (session && session.realtimeStatus) || \"inactive\",\n      );\n      messages.setAttribute(\"aria-label\", \"Conversation messages\");\n      updateMessageScrollToLatestControl(messages, session);\n    }\n    var form = qs(\"[data-dsd-message-drawer-form]\");\n    if (form) {\n      var previousDraftConversationId = String(\n        form.dataset.dsdDraftConversationId || \"\",\n      );\n      if (previousDraftConversationId && previousDraftConversationId !== cid) {\n        persistSocialDraft(form);\n        delete form.dataset.dsdCanonicalRecipientProfileKey;\n        delete form.dataset.dsdCanonicalRecipientConversationId;\n        var previousDraftBody = qs('textarea[name=\"body\"]', form);\n        previousDraftBody && (previousDraftBody.value = \"\");\n        var previousDraftNotice = qs(\"[data-dsd-draft-recovery]\", form);\n        previousDraftNotice && previousDraftNotice.remove();\n      }\n      form.dataset.dsdDraftConversationId = cid;\n      if (\r\n        type !== \"groups\" &&\r\n        recipientKey &&\r\n        (conversation.pendingRouteRecipient === !0 ||\r\n          conversation.source === \"runtime-new-message-draft\")\r\n      ) {\r\n        form.dataset.dsdCanonicalRecipientProfileKey = recipientKey;\r\n        form.dataset.dsdCanonicalRecipientConversationId = cid;\r\n      }\r\n    }\n    form &&\n      (qs('[name=\"recipientUid\"]', form) &&\n        (qs('[name=\"recipientUid\"]', form).value = recipientUid),\r\n      qs('[name=\"recipientProfileKey\"]', form) &&\r\n        (qs('[name=\"recipientProfileKey\"]', form).value = recipientKey),\r\n      qs('[name=\"conversationId\"]', form) &&\r\n        (qs('[name=\"conversationId\"]', form).value = cid),\r\n      qs('[name=\"groupRecipients\"]', form) &&\r\n        (qs('[name=\"groupRecipients\"]', form).value = groupRecipients),\r\n      qs('[name=\"groupName\"]', form) &&\n        !qs('[name=\"groupName\"]', form).matches(\":focus\") &&\n        (qs('[name=\"groupName\"]', form).value = groupName));\n    form && bindSocialDraftRecovery(form);\n    if (\n      state.messageReplyDraft &&\n      String(state.messageReplyDraft.conversationId || \"\") !== String(cid || \"\")\n    )\n      clearMessageReplyDraft();\n    renderMessageReplyDraft();\n    var storedMessageDraft = form ? readSocialDraft(form) : null;\n    var activeStarterDraft = String(\n      (conversation && conversation.starterDraft) ||\n        queryParam(\"starter\") ||\n        \"\",\n    )\n      .trim()\n      .slice(0, 160);\n    if (\n      form &&\n      activeStarterDraft &&\n      !(storedMessageDraft && String(storedMessageDraft.body || \"\").trim())\n    ) {\n      var starterBody = qs('textarea[name=\"body\"]', form);\n      if (starterBody && !String(starterBody.value || \"\").trim()) {\n        starterBody.value = activeStarterDraft;\n        starterBody.dispatchEvent(new Event(\"input\", { bubbles: !0 }));\n      }\n    }\n    if (form) {\n      var formBlocked = !!(cid && conversationBlocked(conversation));\n      ((form.hidden = formBlocked),\n        form.setAttribute(\"aria-hidden\", formBlocked ? \"true\" : \"false\"),\n        qsa(\"input,textarea,select,button\", form).forEach(function (field) {\n          field.disabled = formBlocked;\n        }));\n    }\n    var nameEditorForm = qs(\"[data-dsd-msg384-name-editor-form]\");\n    if (nameEditorForm) {\r\n      var nameEditorConversation = qs(\r\n        '[name=\"conversationId\"]',\r\n        nameEditorForm,\r\n      );\r\n      nameEditorConversation &&\r\n        nameEditorConversation.value &&\r\n        nameEditorConversation.value !== cid &&\r\n        closeMessageNameEditor();\r\n    }\r\n    var participants = qs(\"[data-dsd-msg384-participants]\");\r\n    if (\r\n      (participants &&\r\n        (participants.innerHTML = cid\r\n          ? participantLinksHTML(conversation)\r\n          : '<a href=\"/pages/user-profile\"><span class=\"dsd-msg384__avatar\">DS</span><strong>Select a thread</strong></a>'),\r\n      hydrateAvatarMedia(document),\n      hydrateMediaReads(document),\n      bindPreparedMessageViewOnceConsumption(messages || document),\n      messages && cid)\n    ) {\r\n      var activeSession = messageThreadSession(cid, !0);\r\n      activeSession && !activeSession.initialBottomPositionApplied\r\n        ? applyInitialMessageBottom(messages, activeSession)\r\n        : activeSession &&\r\n            contentChanged &&\r\n            wasNearBottom &&\r\n            activeSession.nearBottom &&\r\n            !activeSession.userHasScrolled\r\n          ? followRealtimeMessageAfterLayout(messages, activeSession)\r\n          : activeSession &&\r\n            contentChanged &&\r\n            viewportAnchor &&\r\n            preserveMessageViewportAnchorAfterLayout(\r\n              messages,\r\n              activeSession,\r\n              viewportAnchor,\r\n            );\r\n    } else messages && (messages.style.visibility = \"\");\r\n  }\r\n  function refreshMessageActionControls(conversation) {\n    var peer = conversation ? conversationPeer(conversation) : null,\n      peerUid = (peer && peer.uid) || \"\",\r\n      blocked = !!(\n        peerUid && relationshipBlockedProfile(peerUid, (peer && peer.key) || \"\")\n      ),\n      actionable = !!(\r\n        conversation &&\r\n        peerUid &&\r\n        !identityMatchesCurrent(peerUid, peer && peer.key) &&\r\n        conversationType(conversation) !== \"groups\"\r\n      ),\r\n      requestState =\r\n        String((conversation && conversation.state) || \"\").toLowerCase() ===\r\n          \"request\" || conversationType(conversation) === \"requests\",\r\n      premiumEntitled = premiumMessagingEntitled(),\r\n      type = conversationType(conversation),\n      pinned = conversationPinnedByCurrent(conversation || {});\n    var actionConversationId = String(\n        (conversation && (conversation.conversationId || conversation.id)) || \"\",\n      ).trim(),\n      existingTools = state.messageConversationTools;\n    if (\n      !conversation ||\n      (existingTools.conversationId &&\n        existingTools.conversationId !== actionConversationId)\n    )\n      renderMessageConversationTools(conversation, \"\", !1);\n    (qsa(\r\n      '[data-dsd-message-action=\"report\"], [data-dsd-message-action=\"mute\"]',\r\n    ).forEach(function (button) {\r\n      ((button.hidden = !conversation),\r\n        (button.disabled = !conversation),\r\n        button.setAttribute(\"aria-hidden\", conversation ? \"false\" : \"true\"));\r\n    }),\r\n      qsa(\r\n        '[data-dsd-message-action=\"block\"], [data-dsd-message-action=\"unblock\"]',\r\n      ).forEach(function (button) {\r\n        var action = button.getAttribute(\"data-dsd-message-action\") || \"\",\r\n          show = actionable && (action === \"unblock\" ? blocked : !blocked);\r\n        ((button.hidden = !show),\r\n          (button.disabled = !show),\r\n          button.setAttribute(\"aria-hidden\", show ? \"false\" : \"true\"));\r\n      }),\r\n      qsa(\r\n        '[data-dsd-message-action=\"accept\"], [data-dsd-message-action=\"decline\"]',\r\n      ).forEach(function (button) {\r\n        var show = !!(conversation && requestState);\r\n        ((button.hidden = !show),\r\n          (button.disabled = !show),\r\n          button.setAttribute(\"aria-hidden\", show ? \"false\" : \"true\"));\r\n      }),\r\n      qsa(\r\n        '[data-dsd-message-action=\"pin\"], [data-dsd-message-action=\"unpin\"]',\r\n      ).forEach(function (button) {\r\n        var action = button.getAttribute(\"data-dsd-message-action\") || \"\",\r\n          show =\r\n            !!conversation &&\r\n            canUseSocialActions() &&\r\n            (action === \"unpin\" ? pinned : !pinned);\r\n        ((button.hidden = !show),\r\n          (button.disabled = !show),\r\n          button.setAttribute(\"aria-hidden\", show ? \"false\" : \"true\"));\r\n      }),\r\n      qsa('[data-dsd-message-action=\"nickname\"]').forEach(function (button) {\r\n        var show = !!conversation && premiumEntitled && type !== \"groups\";\r\n        ((button.hidden = !show),\r\n          (button.disabled = !show),\r\n          button.setAttribute(\"aria-hidden\", show ? \"false\" : \"true\"));\r\n      }),\r\n      qsa('[data-dsd-message-action=\"rename-group\"]').forEach(\r\n        function (button) {\r\n          var show =\r\n            !!conversation &&\r\n            premiumEntitled &&\r\n            canRenameGroupConversation(conversation);\r\n          ((button.hidden = !show),\r\n            (button.disabled = !show),\r\n            button.setAttribute(\"aria-hidden\", show ? \"false\" : \"true\"));\r\n        },\r\n      ),\r\n      qsa('[data-dsd-message-action=\"leave-group\"]').forEach(function (button) {\r\n        var show = !!conversation && type === \"groups\";\r\n        ((button.hidden = !show),\r\n          (button.disabled = !show),\r\n          button.setAttribute(\"aria-hidden\", show ? \"false\" : \"true\"));\r\n      }),\r\n      qsa('[data-dsd-message-action=\"search\"], [data-dsd-message-action=\"info\"]').forEach(\n        function (button) {\n          var show = !!conversation;\r\n          ((button.hidden = !show),\r\n            (button.disabled = !show),\r\n            button.setAttribute(\"aria-hidden\", show ? \"false\" : \"true\"));\r\n        },\r\n      ),\r\n      qsa(\"[data-dsd-msg384-premium-compose]\").forEach(function (row) {\r\n        ((row.hidden = !premiumEntitled),\r\n          row.setAttribute(\"aria-hidden\", premiumEntitled ? \"false\" : \"true\"),\r\n          qsa(\"select,input\", row).forEach(function (field) {\r\n            field.disabled = !premiumEntitled;\r\n          }));\r\n      }),\r\n      qsa(\"[data-dsd-msg384-group-create-name]\").forEach(function (row) {\r\n        var show =\r\n          !!conversation &&\r\n          premiumEntitled &&\r\n          type === \"groups\" &&\r\n          conversation.pendingRouteGroup === !0;\r\n        ((row.hidden = !show),\r\n          row.setAttribute(\"aria-hidden\", show ? \"false\" : \"true\"),\r\n          qsa(\"input\", row).forEach(function (field) {\r\n            field.disabled = !show;\r\n          }));\r\n      }),\r\n      conversation || renderMessageConversationTools(null, \"\", !1));\n  }\n  function recipientPredictionEligibleProfile(profile) {\n    profile = profile || {};\n    var key = profile.profileKey || profile.profile_key || profile.handle || \"\",\n      uid =\n        profile.uid ||\n        profile.userId ||\n        profile.user_id ||\n        \"\";\n    return !!(\n      key &&\n      !identityMatchesCurrent(uid, key) &&\n      publicProfileVisible(profile) &&\n      !relationshipBlockedProfile(uid, key)\n    );\n  }\n  function resetMessageRecipientSearch() {\n    var search = state.messageRecipientSearch;\n    if (!search) return;\n    search.timer && window.clearTimeout(search.timer);\n    search.timer = null;\n    search.generation += 1;\n    search.query = \"\";\n    search.results = [];\n    search.pending = !1;\n    search.error = \"\";\n  }\n  function scheduleMessageRecipientSearch(root) {\n    root = root || qs(\"[data-dsd-msg384]\") || document;\n    var input = qs(\"[data-dsd-msg384-search]\", root),\n      search = state.messageRecipientSearch,\n      query = String((input && input.value) || \"\")\n        .trim()\n        .toLowerCase();\n    if (!search) return;\n    search.timer && window.clearTimeout(search.timer);\n    search.timer = null;\n    search.generation += 1;\n    var generation = search.generation;\n    search.query = query;\n    search.error = \"\";\n    if (query.length < 2) {\n      search.results = [];\n      search.pending = !1;\n      renderMessageStarter(root);\n      return;\n    }\n    search.pending = !0;\n    renderMessageStarter(root);\n    search.timer = window.setTimeout(function () {\n      search.timer = null;\n      requestProfilePickerProfiles(query, {\n        limit: 8,\n        publicRead: !1,\n        surface: \"message-recipient-prediction\",\n        excludeSelf: !0,\n        excludeBlocked: !0,\n      })\n        .then(function (profiles) {\n          if (\n            generation !== search.generation ||\n            query !== search.query\n          )\n            return;\n          search.results = dedupePublicProfiles(profiles || [])\n            .filter(recipientPredictionEligibleProfile)\n            .slice(0, 6);\n          search.pending = !1;\n          search.error = \"\";\n          state.publicProfiles = dedupePublicProfiles(\n            (state.publicProfiles || []).concat(search.results),\n          );\n          publishPublicProfiles(state.publicProfiles);\n          renderMessageStarter(root);\n          claim(\"message-recipient-prediction:loaded\", {\n            queryLength: query.length,\n            rows: search.results.length,\n            maxRows: 6,\n            requests: 1,\n            perProfileReads: 0,\n            canonical: \"dsd_discovery_profile_cards\",\n          });\n        })\n        .catch(function (error) {\n          if (\n            generation !== search.generation ||\n            query !== search.query\n          )\n            return;\n          search.results = [];\n          search.pending = !1;\n          search.error = (error && error.message) || String(error);\n          renderMessageStarter(root);\n          claim(\"message-recipient-prediction:blocked\", {\n            queryLength: query.length,\n            error: search.error,\n            failClosed: !0,\n          });\n        });\n    }, 250);\n  }\n  function renderMessageStarter(root) {\n    root = root || qs(\"[data-dsd-msg384]\") || document;\r\n    var messageRoot =\r\n        root && root.matches && root.matches(\"[data-dsd-msg384]\")\r\n          ? root\r\n          : qs(\"[data-dsd-msg384]\", root) || qs(\"[data-dsd-msg384]\"),\r\n      composeMode = !!(\r\n        messageRoot &&\r\n        messageRoot.getAttribute(\"data-dsd-msg384-compose-mode\") === \"true\"\r\n      ),\r\n      groupMode = !!(\r\n        state.messageGroupComposeActive === !0 ||\r\n        (messageRoot &&\r\n          messageRoot.getAttribute(\"data-dsd-msg384-group-compose-mode\") ===\r\n            \"true\")\r\n      ),\r\n      input = composeMode\r\n        ? qs(\"[data-dsd-msg384-search]\", messageRoot || root)\r\n        : null,\r\n      results = qs(\"[data-dsd-msg384-start-results]\", root);\r\n    if (!(!input || !results)) {\r\n      var query = String(input.value || \"\")\n          .trim()\n          .toLowerCase(),\n        recipientSearch = state.messageRecipientSearch || {},\n        selected = uniqueIdentities(state.pendingMessageGroupRecipients || []);\n      if (!composeMode || (!query && !groupMode)) {\r\n        ((results.innerHTML = \"\"), (results.hidden = !0));\r\n        return;\r\n      }\r\n      var cachedMatches = query\n          ? (state.publicProfiles || [])\n              .filter(function (profile) {\n                var key = profile.profileKey || profile.handle || \"\",\r\n                  resolvedUid =\n                    profile.uid ||\n                    profile.userId ||\n                    profile.user_id ||\n                    \"\";\n                if (\n                  identityMatchesCurrent(\n                    resolvedUid,\r\n                    profile.profileKey || profile.handle || \"\",\r\n                  )\r\n                )\r\n                  return !1;\r\n                var text = [profile.displayName, key, profile.bio]\r\n                  .join(\" \")\r\n                  .toLowerCase();\r\n                return (\r\n                  recipientPredictionEligibleProfile(profile) &&\n                  text.indexOf(query) !== -1\n                );\n              })\n              .slice(0, 6)\n          : [],\n        matches =\n          recipientSearch.query === query && recipientSearch.results.length\n            ? recipientSearch.results\n            : cachedMatches,\n        selectedKeys = {};\n      selected.forEach(function (identity) {\n        selectedKeys[groupRecipientIdentityKey(identity)] = !0;\n      });\r\n      var selectedHTML = groupMode\r\n          ? '<div class=\"dsd-msg384__group-selection\" aria-label=\"Selected group members\">' +\r\n            (selected.length\r\n              ? selected\r\n                  .map(function (identity) {\r\n                    return (\r\n                      \"<span>\" +\r\n                      html(identity.name || identity.key || \"DSD member\") +\r\n                      \"</span>\"\r\n                    );\r\n                  })\r\n                  .join(\"\")\r\n              : \"<span>Select at least two people</span>\") +\r\n            \"</div>\"\r\n          : \"\",\r\n        matchesHTML = matches.length\r\n          ? matches\r\n              .map(function (profile) {\r\n                var key =\n                    profile.profileKey || profile.handle || profile.uid || \"\",\n                  candidateUid =\n                    profile.uid || profile.userId || profile.user_id || \"\",\n                  resolvedUid =\n                    /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(\n                      String(candidateUid || \"\").trim(),\n                    )\n                      ? String(candidateUid || \"\").trim()\n                      : \"\",\n                  name = publicDisplayName(\r\n                    profile.displayName || key || \"DSD member\",\r\n                    \"DSD member\",\r\n                  ),\r\n                  media = canonicalProfileAvatarMediaId(profile),\r\n                  identityKey = clean(key || resolvedUid, \"\"),\n                  isSelected = !!selectedKeys[identityKey],\r\n                  avatar =\r\n                    '<span class=\"dsd-msg384__avatar\"' +\r\n                    (media\r\n                      ? ' data-dsd-avatar-media-id=\"' + html(media) + '\"'\r\n                      : \"\") +\r\n                    \">\" +\r\n                    html(initials(name || key)) +\r\n                    \"</span>\";\r\n                return (\r\n                  '<button type=\"button\" data-dsd-start-message-profile=\"' +\r\n                  html(key) +\r\n                  '\" data-recipient-uid=\"' +\r\n                  html(resolvedUid) +\n                  '\" data-recipient-name=\"' +\n                  html(name) +\n                  '\" data-recipient-avatar-media-id=\"' +\n                  html(media) +\n                  '\" aria-pressed=\"' +\n                  (groupMode && isSelected ? \"true\" : \"false\") +\r\n                  '\">' +\r\n                  avatar +\r\n                  \"<span><strong>\" +\r\n                  html(name) +\r\n                  \"</strong><em>@\" +\r\n                  html(publicHandleText(key, name, \"member\")) +\r\n                  \"</em></span></button>\"\r\n                );\r\n              })\r\n              .join(\"\")\r\n          : query.length < 2\n            ? '<span class=\"dsd-msg384__start-empty\">Type at least two characters</span>'\n            : recipientSearch.query === query && recipientSearch.pending\n              ? '<span class=\"dsd-msg384__start-empty\" role=\"status\">Searching profiles...</span>'\n              : recipientSearch.query === query && recipientSearch.error\n                ? '<span class=\"dsd-msg384__start-empty\">Profile search unavailable. Try again.</span>'\n                : '<span class=\"dsd-msg384__start-empty\">No profile matches</span>',\n        groupStartHTML = groupMode\r\n          ? '<div class=\"dsd-msg384__group-start\"><small>' +\r\n            html(String(selected.length)) +\r\n            ' selected</small><button type=\"button\" data-dsd-start-group-message' +\r\n            (selected.length < 2 ? \" disabled\" : \"\") +\r\n            \">Start group</button></div>\"\r\n          : \"\";\r\n      ((results.hidden = !groupMode && !query),\n        (results.innerHTML = selectedHTML + matchesHTML + groupStartHTML),\r\n        hydrateAvatarMedia(results));\r\n    }\r\n  }\r\n  function messageDrawerShellHTML() {\r\n    return '<main class=\"dsd-msg384__conversation\" aria-label=\"Selected conversation thread\" data-dsd-msg384-summary data-dsd-msg384-conversation data-dsd-owner=\"MessagesRouteConversationInline\" hidden aria-hidden=\"true\"><header class=\"dsd-msg384__conversation-head\"><button type=\"button\" class=\"dsd-msg384__back\" data-dsd-close-message-drawer aria-label=\"Close selected thread\"><span aria-hidden=\"true\">&larr;</span><span class=\"visually-hidden\">Close thread</span></button><a class=\"dsd-msg384__avatar\" data-dsd-msg384-active-avatar data-dsd-msg384-profile-link href=\"/pages/users\">DS</a><div><a data-dsd-msg384-active-name data-dsd-msg384-profile-link href=\"/pages/users\">No active conversation</a><a data-dsd-msg384-active-handle data-dsd-msg384-profile-link href=\"/pages/users\">Select a conversation</a></div><details class=\"dsd-msg384__menu\"><summary aria-label=\"Conversation actions\">...</summary><div class=\"dsd-msg384__actions\" aria-label=\"Conversation actions\"><button type=\"button\" data-dsd-message-action=\"search\">Search</button><button type=\"button\" data-dsd-message-action=\"info\">Info</button><button type=\"button\" data-dsd-message-action=\"report\">Report</button><button type=\"button\" data-dsd-message-action=\"mute\">Mute</button><button type=\"button\" data-dsd-message-action=\"block\">Block</button><button type=\"button\" data-dsd-message-action=\"unblock\">Unblock</button><button type=\"button\" data-dsd-message-action=\"accept\">Accept</button><button type=\"button\" data-dsd-message-action=\"decline\">Decline</button><button type=\"button\" data-dsd-message-action=\"pin\">Pin</button><button type=\"button\" data-dsd-message-action=\"unpin\">Unpin</button><button type=\"button\" data-dsd-message-action=\"nickname\">Nickname</button><button type=\"button\" data-dsd-message-action=\"rename-group\">Rename group</button><button type=\"button\" data-dsd-message-action=\"leave-group\">Leave group</button></div></details></header><section class=\"dsd-msg384__conversation-tools\" data-dsd-msg384-conversation-tools aria-label=\"Conversation tools\" hidden aria-hidden=\"true\"></section><section class=\"dsd-msg384__name-editor\" data-dsd-msg384-name-editor hidden aria-hidden=\"true\"><form data-dsd-msg384-name-editor-form><input type=\"hidden\" name=\"mode\" value=\"\"><input type=\"hidden\" name=\"conversationId\" value=\"\"><label><span data-dsd-msg384-name-editor-label>Conversation name</span><input type=\"text\" name=\"value\" maxlength=\"48\" autocomplete=\"off\"></label><div><button type=\"submit\">Save</button><button type=\"button\" data-dsd-msg384-name-editor-cancel>Cancel</button></div></form></section><section class=\"dsd-msg384__messages\" data-dsd-msg384-message-history data-dsd-msg384-history data-dsd-message-thread-scroll aria-label=\"Conversation messages\"><article class=\"dsd-msg384__bubble is-system\"><p>Select a conversation.</p></article></section><form class=\"dsd-msg384__composer\" aria-label=\"Message composer\" data-dsd-message-form data-dsd-message-drawer-form><input type=\"hidden\" name=\"recipientUid\" value=\"\"><input type=\"hidden\" name=\"recipientProfileKey\" value=\"\"><input type=\"hidden\" name=\"conversationId\" value=\"\"><input type=\"hidden\" name=\"groupRecipients\" value=\"\"><label class=\"dsd-msg384__group-create-name\" data-dsd-msg384-group-create-name hidden aria-hidden=\"true\"><span>Group name</span><input type=\"text\" name=\"groupName\" maxlength=\"64\" autocomplete=\"off\" placeholder=\"Name this group\"></label><textarea name=\"body\" aria-label=\"Message composer\" placeholder=\"Write a message\"></textarea><div class=\"dsd-composer-media-actions dsd-msg384__media-actions\" aria-label=\"Attach message media\"><label class=\"dsd-composer-media-button dsd-composer-media-button--icon\" data-dsd-composer-media-button=\"image\" aria-label=\"Attach message pictures\" title=\"Attach message pictures\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M4 5h16v14H4V5Zm2 2v7.2l3.2-3.2 3.1 3.1 2.2-2.5L18 15.5V7H6Zm3 1.8a1.7 1.7 0 1 1 0 3.4 1.7 1.7 0 0 1 0-3.4Z\"/></svg><span class=\"visually-hidden\">Attach message pictures</span><input name=\"image\" data-dsd-media-input=\"image\" data-dsd-media-policy=\"message-image\" data-dsd-media-max=\"3\" type=\"file\" accept=\"image/*\" multiple aria-label=\"Attach message pictures\"></label><label class=\"dsd-composer-media-button dsd-composer-media-button--icon\" data-dsd-composer-media-button=\"video\" aria-label=\"Attach message videos\" title=\"Attach message videos\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M4 6h10a2 2 0 0 1 2 2v1.2l4-2.2v10l-4-2.2V16a2 2 0 0 1-2 2H4V6Zm3 3v6h6V9H7Z\"/></svg><span class=\"visually-hidden\">Attach message videos</span><input name=\"video\" data-dsd-media-input=\"video\" data-dsd-media-policy=\"message-video\" data-dsd-media-max=\"1\" type=\"file\" accept=\"video/*\" aria-label=\"Attach message videos\"></label></div><div class=\"dsd-msg384__premium-compose\" data-dsd-msg384-premium-compose hidden aria-hidden=\"true\"><label><span>Expires</span><select name=\"expiresPreset\" aria-label=\"Message expiration\"><option value=\"\">No expiry</option><option value=\"1h\">1 hour</option><option value=\"24h\">24 hours</option><option value=\"7d\">7 days</option></select></label><label><input type=\"checkbox\" name=\"viewOnce\"> View once media</label></div><button type=\"submit\">Send</button></form></main>';\r\n  }\r\n  function ensureMessageDrawerShell(root) {\n    if (((root = root || qs(\"[data-dsd-msg384]\")), !root || !hasCustomer()))\n      return null;\n    var existing = qs(\"[data-dsd-msg384-summary]\", root);\r\n    if (existing) return existing;\r\n    var layout = qs(\".dsd-msg384__layout\", root);\r\n    return layout\r\n      ? (layout.insertAdjacentHTML(\"beforeend\", messageDrawerShellHTML()),\n        qs(\"[data-dsd-msg384-summary]\", root))\n      : null;\n  }\n  var messageViewportFrame = 0,\n    messageViewportSettleTimer = 0,\n    messageViewportListenersInstalled = !1;\n  function markMessageViewportAncestors(surface, active) {\n    qsa(\"[data-dsd-message-viewport-ancestor]\").forEach(function (node) {\n      node.removeAttribute(\"data-dsd-message-viewport-ancestor\");\n    });\n    if (!active || !surface) return;\n    var node = surface.parentElement;\n    while (node && node !== document.body && node !== document.documentElement) {\n      node.setAttribute(\"data-dsd-message-viewport-ancestor\", \"true\");\n      node = node.parentElement;\n    }\n  }\n  function syncMessageDrawerViewport(reason) {\n    var root = qs(\"[data-dsd-msg384]\"),\n      drawer = root && qs(\"[data-dsd-msg384-summary]\", root),\n      active = !!(\n        root &&\n        drawer &&\n        root.getAttribute(\"data-dsd-msg384-drawer-open\") === \"true\" &&\n        !drawer.hidden\n      );\n    if (!active) {\n      markMessageViewportAncestors(root, !1);\n      if (root) {\n        [\n          \"--dsd-message-viewport-width\",\n          \"--dsd-message-viewport-height\",\n          \"--dsd-message-viewport-top\",\n          \"--dsd-message-viewport-left\",\n        ].forEach(function (name) {\n          root.style.removeProperty(name);\n        });\n        root.removeAttribute(\"data-dsd-message-viewport\");\n      }\n      return !1;\n    }\n    var viewport = window.visualViewport,\n      width = Math.max(1, Math.round(viewport ? viewport.width : window.innerWidth)),\n      height = Math.max(1, Math.round(viewport ? viewport.height : window.innerHeight)),\n      top = Math.max(0, Math.round(viewport ? viewport.offsetTop : 0)),\n      left = Math.max(0, Math.round(viewport ? viewport.offsetLeft : 0)),\n      signature = [width, height, top, left].join(\"x\");\n    (markMessageViewportAncestors(drawer, !0),\n      root.style.setProperty(\"--dsd-message-viewport-width\", width + \"px\"),\n      root.style.setProperty(\"--dsd-message-viewport-height\", height + \"px\"),\n      root.style.setProperty(\"--dsd-message-viewport-top\", top + \"px\"),\n      root.style.setProperty(\"--dsd-message-viewport-left\", left + \"px\"),\n      root.setAttribute(\"data-dsd-message-viewport\", signature),\n      root.setAttribute(\n        \"data-dsd-message-viewport-reason\",\n        reason || \"viewport\",\n      ));\n    return !0;\n  }\n  function scheduleMessageDrawerViewport(reason) {\n    if (messageViewportFrame) window.cancelAnimationFrame(messageViewportFrame);\n    messageViewportFrame = window.requestAnimationFrame(function () {\n      messageViewportFrame = 0;\n      syncMessageDrawerViewport(reason || \"viewport-change\");\n    });\n    window.clearTimeout(messageViewportSettleTimer);\n    messageViewportSettleTimer = window.setTimeout(function () {\n      messageViewportSettleTimer = 0;\n      syncMessageDrawerViewport((reason || \"viewport-change\") + \"-settled\");\n    }, 180);\n  }\n  function installMessageDrawerViewportOwner() {\n    if (messageViewportListenersInstalled) return;\n    messageViewportListenersInstalled = !0;\n    window.addEventListener(\"resize\", scheduleMessageDrawerViewport, {\n      passive: !0,\n    });\n    window.addEventListener(\"orientationchange\", scheduleMessageDrawerViewport, {\n      passive: !0,\n    });\n    if (window.visualViewport) {\n      window.visualViewport.addEventListener(\n        \"resize\",\n        scheduleMessageDrawerViewport,\n        { passive: !0 },\n      );\n      window.visualViewport.addEventListener(\n        \"scroll\",\n        scheduleMessageDrawerViewport,\n        { passive: !0 },\n      );\n    }\n  }\n  function syncMessageTabUnreadCounts(conversations, root) {\n    var counts = { all: 0, direct: 0, groups: 0, requests: 0, safety: 0 };\n    (conversations || []).forEach(function (conversation) {\n      var unread = Math.max(0, Number(conversationUnreadCount(conversation)) || 0),\n        type = conversationType(conversation);\n      counts.all += unread;\n      Object.prototype.hasOwnProperty.call(counts, type) && (counts[type] += unread);\n    });\n    qsa(\"[data-dsd-msg384-tab]\", root || document).forEach(function (button) {\n      var type = button.getAttribute(\"data-dsd-msg384-tab\") || \"all\",\n        badge = qs(\"[data-dsd-msg384-tab-unread]\", button),\n        count = Math.max(0, Number(counts[type] || 0));\n      if (!badge) {\n        badge = document.createElement(\"span\");\n        badge.setAttribute(\"data-dsd-msg384-tab-unread\", \"\");\n        badge.setAttribute(\"aria-label\", \"unread\");\n        button.appendChild(badge);\n      }\n      badge.textContent = String(count);\n      badge.hidden = count === 0;\n      button.setAttribute(\"data-unread-count\", String(count));\n    });\n  }\n  function ensureMeetingPlannerUI(root) {\n    var conversation = qs(\"[data-dsd-msg384-conversation]\", root || document),\n      actions = conversation && qs(\".dsd-msg384__actions\", conversation),\n      tools = conversation && qs(\"[data-dsd-msg384-conversation-tools]\", conversation);\n    if (!conversation || !actions || !tools) return;\n    if (!qs('[data-dsd-message-action=\"meeting-area\"]', actions)) {\n      var action = document.createElement(\"button\");\n      action.type = \"button\";\n      action.setAttribute(\"data-dsd-message-action\", \"meeting-area\");\n      action.textContent = \"Plan meeting area\";\n      actions.appendChild(action);\n    }\n    if (!qs(\"[data-dsd-msg384-meeting-planner]\", conversation)) {\n      var panel = document.createElement(\"section\");\n      panel.className = \"dsd-msg384__meeting-planner\";\n      panel.setAttribute(\"data-dsd-msg384-meeting-planner\", \"\");\n      panel.setAttribute(\"aria-hidden\", \"true\");\n      panel.hidden = true;\n      panel.innerHTML = '<form data-dsd-msg384-meeting-form data-dsd-meeting-state=\"SHARED\"><strong>Choose a broad area together</strong><p data-dsd-msg384-meeting-copy>Share only a city or broad area you are comfortable sending to this conversation.</p><input type=\"hidden\" name=\"referenceProposalId\"><label>City or area<input name=\"city\" maxlength=\"64\" required></label><label>State or region<input name=\"region\" maxlength=\"64\" required></label><div><button type=\"submit\">Share proposal</button><button type=\"button\" data-dsd-msg384-meeting-cancel>Cancel</button></div><small data-dsd-msg384-meeting-status></small></form>';\n      conversation.insertBefore(panel, tools);\n    }\n  }\n  function setMeetingPlannerOpen(open, options) {\n    var panel = qs(\"[data-dsd-msg384-meeting-planner]\");\n    if (!panel) return;\n    options = options || {};\n    var form = qs(\"[data-dsd-msg384-meeting-form]\", panel),\n      copy = qs(\"[data-dsd-msg384-meeting-copy]\", panel),\n      reference = qs('[name=\"referenceProposalId\"]', panel),\n      submit = qs('button[type=\"submit\"]', panel),\n      responseMode = !!options.referenceProposalId;\n    if (form) form.setAttribute(\"data-dsd-meeting-state\", responseMode ? \"AGREED\" : \"SHARED\");\n    if (reference) reference.value = options.referenceProposalId || \"\";\n    if (copy) copy.textContent = responseMode\n      ? \"The other participant shared \" + String(options.firstCity || \"a broad area\") + \", \" + String(options.firstRegion || \"\") + \". Enter your own broad area to reveal an approximate meeting area to both of you.\"\n      : \"Share only a city or broad area you are comfortable sending to this conversation.\";\n    if (submit) submit.textContent = responseMode ? \"Share and calculate\" : \"Share proposal\";\n    panel.hidden = open !== true;\n    panel.setAttribute(\"aria-hidden\", open === true ? \"false\" : \"true\");\n    if (open === true) {\n      var city = qs('[name=\"city\"]', panel);\n      city && window.setTimeout(function () { city.focus(); }, 0);\n    }\n  }\n  function sendMeetingAreaProposal(conversationId, city, region, proposalState, referenceProposalId) {\n    var conversation = conversationById(conversationId) || {}, peer = conversationPeer(conversation);\n    if (conversationType(conversation) !== \"direct\" || !peer || !(peer.uid || peer.key)) {\n      renderStatus(\"Meeting-area planning currently requires a direct conversation.\");\n      return Promise.resolve(null);\n    }\n    city = String(city || \"\").replace(/[<>]/g, \"\").trim().slice(0, 64);\n    region = String(region || \"\").replace(/[<>]/g, \"\").trim().slice(0, 64);\n    if (!city || !region) { renderStatus(\"Enter a broad city or area and state or region.\"); return Promise.resolve(null); }\n    var stateValue = String(proposalState || \"SHARED\").toUpperCase(), proposalId = clean(\"meeting-\" + Date.now(), \"meeting\"),\n      body = stateValue === \"AGREED\" ? \"Calculate an approximate meeting area from our two broad areas.\" : stateValue === \"CANCELLED\" ? \"Meeting area proposal canceled.\" : \"Meeting area proposal: \" + city + \", \" + region + \".\";\n    return sendMessage(conversationId, body, peer.uid || peer.key, peer.key || \"\", [], {\n      meetingAreaProposal: { proposalId: proposalId, referenceProposalId: referenceProposalId || \"\", state: stateValue, city: city, region: region, expiresAt: futureTimestamp(7 * 24 * 60 * 60 * 1e3) },\n    }).then(function (result) {\n      result && (setMeetingPlannerOpen(false), renderStatus(stateValue === \"AGREED\" ? \"Meeting area agreed.\" : \"Meeting area proposal sent.\"));\n      return result;\n    });\n  }\n  function renderMessages() {\n    var root = qs(\"[data-dsd-msg384]\");\r\n    if (!root) return;\r\n    if (!hasCustomer()) {\r\n      (root.removeAttribute(\"data-dsd-message-profile-pending\"),\r\n        root.setAttribute(\"data-dsd-message-public-fail-closed\", BUILD),\r\n        (root.innerHTML =\r\n          '<section class=\"dsd-msg384__layout dsd-msg384__layout--public dsd-social-private-auth-gate\" data-dsd-auth-gate data-dsd-owner=\"MessagesRouteController\" aria-label=\"Messages access gate\"><article class=\"dsd-launch-auth-required\"><h1>Log in to use messages</h1><p>Messages are available only to active logged-in profiles.</p><a class=\"dsd-launch-action\" href=\"' +\r\n          html(loginReturnUrl()) +\r\n          '\">Log in</a></article></section>'));\r\n      return;\r\n    }\r\n    if (!hasCanonicalPrivateSocialSession()) {\r\n      (root.removeAttribute(\"data-dsd-message-public-fail-closed\"),\r\n        root.setAttribute(\"data-dsd-message-profile-pending\", BUILD),\r\n        claim(\"messages-session:pending-canonical-shell-preserved\", {\r\n          bridgeChecked: !!state.bridgeChecked,\r\n          supabaseCutoverReady: supabaseCutoverReady(),\r\n          canonical: \"supabase-messages-session\",\r\n        }));\r\n      return;\r\n    }\r\n    if (\r\n      (root.removeAttribute(\"data-dsd-message-profile-pending\"),\r\n      !canUseSocialActions())\r\n    ) {\r\n      (root.removeAttribute(\"data-dsd-message-public-fail-closed\"),\r\n        root.setAttribute(\"data-dsd-message-active-profile-pending\", BUILD),\r\n        claim(\r\n          \"messages-session:active-profile-pending-canonical-shell-preserved\",\r\n          {\r\n            bridgeChecked: !!state.bridgeChecked,\r\n            canonical: \"supabase-messages-session\",\r\n          },\r\n        ));\r\n      return;\r\n    }\r\n    (root.removeAttribute(\"data-dsd-message-active-profile-pending\"),\r\n      ensureMessageDrawerShell(root));\r\n    var currentMessageProfile =\r\n        state.profile || publicProfileByKey(profileKey()) || {},\r\n      currentMessageAvatar = qs(\"[data-dsd-current-avatar]\", root),\r\n      currentMessageAvatarId = canonicalProfileAvatarMediaId(\r\n        currentMessageProfile,\r\n      );\r\n    currentMessageAvatar &&\r\n      ((currentMessageAvatar.textContent = initials(\r\n        currentMessageProfile.displayName || displayName() || profileKey() || \"DS\",\r\n      )),\r\n      currentMessageAvatarId\r\n        ? (currentMessageAvatar.setAttribute(\r\n            \"data-dsd-avatar-media-id\",\r\n            currentMessageAvatarId,\r\n          ),\r\n          delete currentMessageAvatar.dataset.dsdAvatarHydrated,\r\n          delete currentMessageAvatar.dataset.dsdAvatarHydratedMediaId)\r\n        : currentMessageAvatar.removeAttribute(\"data-dsd-avatar-media-id\"));\r\n    var requested = routeRequestedConversationId();\n    if (\n      requested &&\n      !state.ownRelationshipSnapshotLoaded\n    ) {\n      loadOwnProfileRelationshipsViaProxy().then(function () {\n        renderMessages();\n      });\n      return;\n    }\n    (root.getAttribute(\"data-dsd-msg384-inbox-initialized\") ||\n      (root.setAttribute(\"data-dsd-msg384-inbox-initialized\", BUILD),\r\n      requested || (state.activeConversationId = \"\")),\r\n      requested &&\r\n        state.activeConversationId !== requested &&\r\n        (stopMessageThreadOwner(\r\n          state.activeConversationId,\r\n          \"conversation-switch\",\r\n        ),\r\n        beginMessageThreadSession(requested, !0),\r\n        (state.activeConversationId = requested)));\r\n    function conversationDisplayable(c) {\r\n      return directConversationHasPeer(c)\r\n        ? isNormalContentRecord(c) &&\r\n            !c.archived_at &&\r\n            !c.deleted_at &&\r\n            String(c.moderation_state || \"\").toLowerCase() !== \"archived\"\r\n        : !1;\r\n    }\r\n    function conversationReachableForUnblock(c) {\r\n      var id = String((c && (c.conversationId || c.id)) || \"\");\r\n      return !!(\r\n        id &&\r\n        id === state.activeConversationId &&\r\n        conversationBlocked(c)\r\n      );\r\n    }\r\n    var routeDraft = routeRecipientConversation(),\r\n      routeGroupDraft = routeGroupConversation(),\r\n      pendingDraft =\r\n        state.pendingMessageDraft && state.pendingMessageDraft.conversationId\r\n          ? state.pendingMessageDraft\r\n          : null,\r\n      conversationRecords = state.conversations.filter(function (c) {\r\n        return (\r\n          conversationDisplayable(c) &&\r\n          conversationParticipantMatch(c) &&\r\n          (!conversationBlocked(c) || conversationReachableForUnblock(c))\r\n        );\r\n      });\r\n    function hasConversationDedupeMatch(candidate) {\r\n      if (!candidate) return !1;\r\n      var candidateType = conversationType(candidate),\r\n        candidateKey = conversationDedupeKey(candidate, candidateType);\r\n      return conversationRecords.some(function (c) {\r\n        return (\r\n          String(c.conversationId || c.id || \"\") ===\r\n            String(candidate.conversationId || candidate.id || \"\") ||\r\n          conversationDedupeKey(c, conversationType(c)) === candidateKey\r\n        );\r\n      });\r\n    }\r\n    function activeConversationCandidate(candidate) {\n      return !!(\n        candidate &&\n        String(candidate.conversationId || candidate.id || \"\") ===\n          String(state.activeConversationId || requested || \"\")\n      );\n    }\n    if (routeDraft && routeDraft.starterDraft) {\n      var routeDraftType = conversationType(routeDraft),\n        routeDraftKey = conversationDedupeKey(routeDraft, routeDraftType);\n      conversationRecords = conversationRecords.map(function (conversation) {\n        var sameConversation =\n          String(conversation.conversationId || conversation.id || \"\") ===\n            String(routeDraft.conversationId || routeDraft.id || \"\") ||\n          conversationDedupeKey(\n            conversation,\n            conversationType(conversation),\n          ) === routeDraftKey;\n        return sameConversation\n          ? Object.assign({}, conversation, {\n              starterDraft: routeDraft.starterDraft,\n            })\n          : conversation;\n      });\n    }\n    (routeDraft &&\n      (!conversationBlocked(routeDraft) ||\n        conversationReachableForUnblock(routeDraft)) &&\n      !hasConversationDedupeMatch(routeDraft) &&\n      (conversationRecords = conversationRecords.concat([routeDraft])),\n      routeGroupDraft &&\r\n        !conversationBlocked(routeGroupDraft) &&\r\n        (activeConversationCandidate(routeGroupDraft) ||\r\n          !hasConversationDedupeMatch(routeGroupDraft)) &&\r\n        (conversationRecords = conversationRecords.concat([routeGroupDraft])),\r\n      pendingDraft &&\r\n        (activeConversationCandidate(pendingDraft) ||\r\n          !hasConversationDedupeMatch(pendingDraft)) &&\r\n        (conversationRecords = conversationRecords.concat([pendingDraft])),\r\n      !state.activeConversationId &&\r\n        requested &&\r\n        conversationRecords[0] &&\r\n        (state.activeConversationId =\r\n          conversationRecords[0].conversationId ||\r\n          conversationRecords[0].id ||\r\n          \"\"));\r\n    var activeConversation =\r\n      conversationRecords.filter(function (c) {\r\n        return (c.conversationId || c.id) === state.activeConversationId;\r\n      })[0] || null;\r\n    (requested &&\r\n      !activeConversation &&\r\n      conversationRecords.length &&\r\n      ((state.activeConversationId = \"\"), writeMessageConversationUrl(\"\", !0)),\r\n      state.activeConversationId &&\r\n        !activeConversation &&\r\n        !requested &&\r\n        ((state.activeConversationId = \"\"), (activeConversation = null)),\r\n      state.activeConversationId &&\r\n        !activeConversation &&\r\n        !conversationRecords.length &&\r\n        !requested &&\r\n        (state.activeConversationId = \"\"));\r\n    var activeTabButton = qs(\r\n        \"[data-dsd-msg384-tab].is-active\",\r\n        root || document,\r\n      ),\r\n      activeTab =\r\n        (activeTabButton &&\r\n          activeTabButton.getAttribute(\"data-dsd-msg384-tab\")) ||\r\n        (root && root.getAttribute(\"data-default-tab\")) ||\r\n        \"all\";\r\n    qsa(\"[data-dsd-msg384-tab]\", root || document).forEach(function (button) {\r\n      button.classList.toggle(\r\n        \"is-active\",\r\n        (button.getAttribute(\"data-dsd-msg384-tab\") || \"all\") === activeTab,\r\n      );\r\n    });\r\n    state.messageGroupComposeActive === !0 &&\r\n      (root.setAttribute(\"data-dsd-msg384-compose-mode\", \"true\"),\r\n      root.setAttribute(\"data-dsd-msg384-group-compose-mode\", \"true\"));\r\n    var composeSearchMode =\r\n        root.getAttribute(\"data-dsd-msg384-compose-mode\") === \"true\",\r\n      groupComposeMode =\r\n        root.getAttribute(\"data-dsd-msg384-group-compose-mode\") === \"true\",\r\n      searchInput = qs(\"[data-dsd-msg384-search]\", root || document);\r\n    searchInput &&\r\n      (searchInput.setAttribute(\r\n        \"placeholder\",\r\n        groupComposeMode\r\n          ? \"Add people to group\"\r\n          : composeSearchMode\r\n            ? \"Type a name\"\r\n            : \"Search messages\",\r\n      ),\r\n      searchInput.setAttribute(\r\n        \"aria-label\",\r\n        groupComposeMode\r\n          ? \"Add people to group\"\r\n          : composeSearchMode\r\n            ? \"Start message with user\"\r\n            : \"Search messages\",\r\n      ));\r\n    var searchValue = composeSearchMode\r\n      ? \"\"\r\n      : String((searchInput || {}).value || \"\")\r\n          .trim()\r\n          .toLowerCase();\r\n    renderMessageStarter(root || document);\r\n    var conversationsByKey = {};\r\n    conversationRecords.forEach(function (c) {\r\n      var type = conversationType(c),\r\n        key = conversationDedupeKey(c, type),\r\n        current = conversationsByKey[key];\r\n      (!current ||\r\n        conversationDedupeScore(c) >= conversationDedupeScore(current)) &&\r\n        (conversationsByKey[key] = c);\r\n    });\r\n    var displayConversations = Object.keys(conversationsByKey)\n      .map(function (key) {\r\n        return conversationsByKey[key];\r\n      })\r\n      .sort(function (a, b) {\r\n        var pinDelta =\r\n          (conversationPinnedByCurrent(b) ? 1 : 0) -\r\n          (conversationPinnedByCurrent(a) ? 1 : 0);\r\n        return (\r\n          pinDelta ||\r\n          conversationActivityMillis(b) - conversationActivityMillis(a)\r\n        );\r\n      });\r\n    if (state.activeConversationId && !requested) {\r\n      var activeRawConversation =\r\n        conversationRecords.filter(function (c) {\r\n          return (\r\n            String(c.conversationId || c.id || \"\") ===\r\n            String(state.activeConversationId || \"\")\r\n          );\r\n        })[0] || null;\r\n      if (activeRawConversation) {\r\n        var activeDedupeKey = conversationDedupeKey(\r\n            activeRawConversation,\r\n            conversationType(activeRawConversation),\r\n          ),\r\n          canonicalActiveConversation =\r\n            conversationsByKey[activeDedupeKey] || activeRawConversation;\r\n        state.activeConversationId =\r\n          canonicalActiveConversation.conversationId ||\r\n          canonicalActiveConversation.id ||\r\n          state.activeConversationId;\r\n      }\r\n    }\r\n    if (\r\n      ((activeConversation =\r\n        displayConversations.filter(function (c) {\r\n          return (\r\n            String(c.conversationId || c.id || \"\") ===\r\n            String(state.activeConversationId || \"\")\r\n          );\r\n        })[0] ||\r\n        activeConversation ||\r\n        null),\r\n      !activeConversation &&\r\n        state.activeConversationId &&\r\n        (state.messagesByConversation[state.activeConversationId] || []).length)\r\n    ) {\r\n      var activeMessageFallback =\r\n          state.messagesByConversation[state.activeConversationId] || [],\r\n        routeKeys = String(state.activeConversationId || \"\")\r\n          .replace(/^conv-/, \"\")\r\n          .split(\"-\")\r\n          .map(function (part) {\r\n            return clean(part || \"\", \"\").toLowerCase();\r\n          })\r\n          .filter(Boolean),\r\n        selfKey = clean(profileKey() || \"\", \"\").toLowerCase(),\r\n        peerKey =\r\n          routeKeys.filter(function (key) {\r\n            return key && key !== selfKey;\r\n          })[0] || \"\",\r\n        lastFallbackMessage =\r\n          activeMessageFallback[activeMessageFallback.length - 1] || {};\r\n      ((activeConversation = {\r\n        conversationId: state.activeConversationId,\r\n        id: state.activeConversationId,\r\n        type: \"direct\",\r\n        conversationType: \"direct\",\r\n        participantIds: [actorRelationshipIdentity()].filter(Boolean),\r\n        participantKeys: routeKeys.length\r\n          ? routeKeys\r\n          : [selfKey, peerKey].filter(Boolean),\r\n        lastMessagePreview:\r\n          stripStoryReferenceEnvelope(lastFallbackMessage.body || \"\") ||\r\n          lastFallbackMessage.lastMessagePreview ||\r\n          \"Message\",\r\n        updatedAt:\r\n          lastFallbackMessage.updatedAt ||\r\n          lastFallbackMessage.createdAt ||\r\n          now(),\r\n        proxyHydratedRouteConversation: !0,\r\n      }),\r\n        (displayConversations = mergeByKey(\r\n          displayConversations,\r\n          [activeConversation],\r\n          [\"conversationId\", \"id\"],\r\n        )));\r\n    }\r\n    if (activeConversation) {\n      (root.setAttribute(\"data-dsd-msg384-drawer-open\", \"true\"),\n        root.setAttribute(\r\n          \"data-dsd-msg384-active-conversation\",\r\n          String(state.activeConversationId || \"\"),\r\n        ));\r\n      try {\r\n        (document.documentElement.classList.add(\"dsd-message-drawer-open\"),\r\n          scheduleGlobalOverlayStateSync());\r\n      } catch (e) {}\r\n      var activeDrawer = qs(\"[data-dsd-msg384-summary]\", root);\r\n      activeDrawer &&\n        ((activeDrawer.hidden = !1),\n        activeDrawer.setAttribute(\"aria-hidden\", \"false\"),\r\n        activeDrawer.setAttribute(\r\n          \"data-conversation-id\",\r\n          String(state.activeConversationId || \"\"),\n        ));\n      (installMessageDrawerViewportOwner(),\n        syncMessageDrawerViewport(\"conversation-open\"),\n        scheduleMessageDrawerViewport(\"conversation-open\"));\n    } else {\n      (root.removeAttribute(\"data-dsd-msg384-drawer-open\"),\r\n        root.removeAttribute(\"data-dsd-msg384-active-conversation\"));\r\n      try {\r\n        (document.documentElement.classList.remove(\"dsd-message-drawer-open\"),\r\n          scheduleGlobalOverlayStateSync());\r\n      } catch (e) {}\r\n      var inactiveDrawer = qs(\"[data-dsd-msg384-summary]\", root);\r\n      inactiveDrawer &&\n        ((inactiveDrawer.hidden = !0),\n          inactiveDrawer.setAttribute(\"aria-hidden\", \"true\"),\n          inactiveDrawer.removeAttribute(\"data-conversation-id\"));\n      syncMessageDrawerViewport(\"conversation-close\");\n    }\n    hydrateMessageParticipantProfiles(\"messages-render\");\r\n    var filteredConversations = displayConversations.filter(function (c) {\r\n      var peer = conversationPeer(c),\r\n        type = conversationType(c),\r\n        tabOk = activeTab === \"all\" || activeTab === type,\r\n        haystack = [\r\n          peer.name,\r\n          peer.handle,\r\n          c.lastMessagePreview,\r\n          c.conversationId || c.id,\r\n          type,\r\n        ]\r\n          .join(\" \")\r\n          .toLowerCase();\r\n      return tabOk && (!searchValue || haystack.indexOf(searchValue) !== -1);\r\n    });\r\n    state.activeConversationId &&\r\n      hydrateConversationMessages(state.activeConversationId);\r\n    var rail = qs(\".dsd-msg384__rail\");\r\n    if (rail) {\r\n      if (\r\n        (qsa(\".dsd-msg384__thread-row\", rail).forEach(function (n) {\n          n.remove();\n        }),\n        qsa(\"[data-dsd-launch-thread], [data-dsd-message-card-pin]\", rail).forEach(function (n) {\n          n.remove();\n        }),\n        filteredConversations.length)\r\n      ) {\r\n        var search = qs(\".dsd-msg384__search\", rail),\r\n          insertionAnchor =\r\n            (composeSearchMode &&\r\n              qs(\"[data-dsd-msg384-start-results]\", rail)) ||\r\n            search,\r\n          htmlThreads = filteredConversations\r\n            .map(function (c) {\r\n              var type = conversationType(c),\r\n                sourceId = c.conversationId || c.id || \"\",\r\n                id =\r\n                  (type === \"direct\" &&\r\n                    canonicalDirectConversationIdFromKeys(\r\n                      directConversationIdentityKeys(c),\r\n                    )) ||\r\n                  sourceId,\r\n                peer = conversationPeer(c),\r\n                unread = conversationUnreadCount(c),\r\n                pinned = conversationPinnedByCurrent(c),\r\n                canonicalMessages = (state.messagesByConversation[id] || [])\r\n                  .filter(messageDisplayable)\r\n                  .filter(messageVisibleAfterViewOnce),\r\n                lastCanonicalMessage =\r\n                  canonicalMessages[canonicalMessages.length - 1] || {},\r\n                latestActivityMillis =\r\n                  stableMessageMillis(lastCanonicalMessage) ||\r\n                  conversationActivityMillis(c),\r\n                stamp = formatDateTime(\r\n                  latestActivityMillis\r\n                    ? new Date(latestActivityMillis)\r\n                    : c.lastMessageAt || c.updatedAt || c.createdAt,\r\n                ),\r\n                preview = publicDisplayText(\r\n                  stripStoryReferenceEnvelope(\r\n                    lastCanonicalMessage.body || \"\",\r\n                  ) ||\r\n                    c.lastMessagePreview ||\r\n                    (c.lastMediaKind\r\n                      ? String(c.lastMediaKind) + \" message\"\r\n                      : \"\"),\r\n                  \"Message\",\r\n                ),\r\n                active =\r\n                  id === state.activeConversationId ||\r\n                  sourceId === state.activeConversationId;\r\n              return (\r\n                '<div class=\"dsd-msg384__thread-row ' +\n                (pinned ? \"is-pinned\" : \"\") +\n                '\"><button type=\"button\" class=\"dsd-msg384__thread ' +\n                (active ? \"is-active\" : \"\") +\r\n                (unread ? \" is-unread\" : \"\") +\r\n                (pinned ? \" is-pinned\" : \"\") +\r\n                '\" data-dsd-launch-thread data-dsd-msg384-thread data-conversation-id=\"' +\r\n                html(id) +\r\n                '\" data-source-conversation-id=\"' +\r\n                html(sourceId) +\r\n                '\" data-type=\"' +\r\n                html(type) +\r\n                '\" data-state=\"' +\r\n                html(c.state || \"active\") +\r\n                '\" data-name=\"' +\r\n                html(peer.name) +\r\n                '\" data-handle=\"' +\r\n                html(peer.handle) +\r\n                '\" data-preview=\"' +\r\n                html(preview) +\r\n                '\" data-pinned=\"' +\r\n                (pinned ? \"true\" : \"false\") +\r\n                '\">' +\r\n                messageAvatar(peer, \"\", \"plain-avatar\") +\r\n                \"<div><strong>\" +\r\n                html(peer.name) +\r\n                \"</strong><span>\" +\r\n                html(peer.handle) +\r\n                \"</span><p>\" +\r\n                html(preview) +\r\n                \"</p></div><small>\" +\r\n                (pinned ? \"<i>Pinned</i>\" : \"\") +\r\n                (unread ? \"<b>\" + html(String(unread)) + \"</b>\" : \"\") +\r\n                html(stamp || \"\") +\n                '</small></button><button type=\"button\" class=\"dsd-msg384__thread-pin\" data-dsd-message-card-pin=\"' +\n                html(id) +\n                '\" data-pinned=\"' +\n                (pinned ? \"true\" : \"false\") +\n                '\" aria-pressed=\"' +\n                (pinned ? \"true\" : \"false\") +\n                '\" aria-label=\"' +\n                (pinned ? \"Unpin conversation\" : \"Pin conversation\") +\n                '\" title=\"' +\n                (pinned ? \"Unpin conversation\" : \"Pin conversation\") +\n                '\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M9 3h6l-1 5 3 3v2h-4v8l-1 1-1-1v-8H7v-2l3-3-1-5Z\"></path></svg></button></div>'\n              );\n            })\r\n            .join(\"\");\r\n        insertionAnchor\r\n          ? insertionAnchor.insertAdjacentHTML(\"afterend\", htmlThreads)\r\n          : rail.insertAdjacentHTML(\"afterbegin\", htmlThreads);\r\n      }\r\n      qsa(\"[data-dsd-msg384-empty]\", rail).forEach(function (empty) {\r\n        var noMatches =\r\n            displayConversations.length > 0 && !filteredConversations.length,\r\n          title = qs(\"strong\", empty),\r\n          body = qs(\"span\", empty);\r\n        ((empty.hidden = displayConversations.length > 0 && !noMatches),\r\n          title &&\r\n            (title.textContent = noMatches\r\n              ? \"No conversations found\"\r\n              : \"No conversations yet\"),\r\n          body &&\r\n            (body.textContent = noMatches\r\n              ? \"Try another tab or search term.\"\r\n              : \"Conversations appear when you send or receive a message.\"));\r\n      });\r\n    }\r\n    if (\r\n      (qsa('[data-dsd-msg384-count=\"all\"]').forEach(function (n) {\r\n        n.textContent = String(displayConversations.length);\r\n      }),\r\n      qsa('[data-dsd-msg384-count=\"direct\"]').forEach(function (n) {\r\n        n.textContent = String(\r\n          displayConversations.filter(function (c) {\r\n            return conversationType(c) === \"direct\";\r\n          }).length,\r\n        );\r\n      }),\r\n      qsa('[data-dsd-msg384-count=\"groups\"]').forEach(function (n) {\r\n        n.textContent = String(\r\n          displayConversations.filter(function (c) {\r\n            return conversationType(c) === \"groups\";\r\n          }).length,\r\n        );\r\n      }),\r\n      qsa('[data-dsd-msg384-count=\"requests\"]').forEach(function (n) {\r\n        n.textContent = String(\r\n          displayConversations.filter(function (c) {\r\n            return conversationType(c) === \"requests\";\r\n          }).length,\r\n        );\r\n      }),\r\n      qsa('[data-dsd-msg384-count=\"safety\"]').forEach(function (n) {\r\n        n.textContent = String(\r\n          displayConversations.filter(function (c) {\r\n            return conversationType(c) === \"safety\";\r\n          }).length,\r\n        );\r\n      }),\r\n      updateMessageDockBadge(displayConversations),\r\n      activeConversation)\r\n    ) {\r\n      var activePeer = conversationPeer(activeConversation),\r\n        activeName = qs(\"[data-dsd-msg384-active-name]\"),\r\n        activeHandle = qs(\"[data-dsd-msg384-active-handle]\"),\r\n        activeAvatar = qs(\"[data-dsd-msg384-active-avatar]\");\r\n      (activeName && (activeName.textContent = activePeer.name),\r\n        activeHandle && (activeHandle.textContent = activePeer.handle),\r\n        activeAvatar &&\r\n          ((activeAvatar.textContent = initials(\r\n            activePeer.name || activePeer.key || \"DS\",\r\n          )),\r\n          activePeer.avatarMediaId\r\n            ? (activeAvatar.setAttribute(\r\n                \"data-dsd-avatar-media-id\",\r\n                activePeer.avatarMediaId,\r\n              ),\r\n              delete activeAvatar.dataset.dsdAvatarHydrated,\r\n              delete activeAvatar.dataset.dsdAvatarHydratedMediaId)\r\n            : (activeAvatar.removeAttribute(\"data-dsd-avatar-media-id\"),\r\n              delete activeAvatar.dataset.dsdAvatarHydrated,\r\n              delete activeAvatar.dataset.dsdAvatarHydratedMediaId)),\r\n        qsa(\"[data-dsd-msg384-profile-link]\").forEach(function (link) {\r\n          activePeer.key &&\r\n            link.setAttribute(\"href\", profileRouteHref(activePeer.key));\r\n        }));\r\n    }\r\n    (ensureMeetingPlannerUI(root),\n      refreshMessageActionControls(activeConversation),\n      hydrateAvatarMedia(document),\n      prefillMessageComposer(),\n      refreshMessageDrawerHistory(state.activeConversationId),\n      scheduleMessageExpiryTimer(state.activeConversationId));\n    syncMessageTabUnreadCounts(displayConversations, root);\n  }\r\n  function visibleStories() {\r\n    var currentTime = Date.now(),\r\n      baseStories = (state.stories || [])\r\n        .map(function (story) {\r\n          return !story || storyExpired(story)\r\n            ? null\r\n            : recordOwnedByCurrentProfile(story) || canModerate()\r\n              ? story\r\n              : publicRenderableStory(story);\r\n        })\r\n        .filter(Boolean);\r\n    return sortByCreatedAtDesc(\r\n      baseStories.filter(function (s) {\r\n        var visibility = normalizeVisibility(\r\n            s.visibility || (s.entity && s.entity.visibility) || \"public\",\r\n          ),\r\n          expiresAt = valueMillis(\r\n            s.expiresAt || s.expires_at || s.expireAt || s.ttl || s.expires,\r\n          );\r\n        if (!expiresAt) {\r\n          var createdAt = valueMillis(\r\n            s.createdAt ||\r\n              s.created_at ||\r\n              s.publishedAt ||\r\n              s.published_at ||\r\n              s.submittedAt ||\r\n              s.submitted_at,\r\n          );\r\n          createdAt && (expiresAt = createdAt + 864e5);\r\n        }\r\n        var active = !expiresAt || expiresAt > currentTime,\r\n          shell = isRestrictedShellRecord(s),\r\n          approved = isApprovedPublicRecord(s),\r\n          ownerVisible = recordOwnedByCurrentProfile(s),\r\n          routeVisible =\r\n            approved &&\r\n            (visibility === \"public\" ||\n              visibility === \"followers\" ||\n              visibility === \"gated\" ||\n              visibility === \"private\" ||\r\n              canonicalFounderProfileRecord(s));\r\n        return (\r\n          active &&\r\n          isNormalContentRecord(s) &&\r\n          publicRecordVisible(s) &&\r\n          (shell || (canViewClassified(s) && canViewPrivateRecord(s))) &&\r\n          (ownerVisible || canModerate() || routeVisible)\r\n        );\r\n      }),\r\n    );\r\n  }\r\n  function surfaceStories() {\r\n    var stories = visibleStories(),\r\n      onProfileRoute = /\\/pages\\/user-profile(?:$|[/?#])/.test(\r\n        window.location.pathname + window.location.search,\r\n      ),\r\n      onStoriesRoute = /\\/pages\\/stories(?:$|[/?#])/.test(\r\n        window.location.pathname + window.location.search,\r\n      ),\r\n      scope = onProfileRoute ? \"profile\" : state.storyScope || \"discovery\";\r\n    if (\r\n      (onStoriesRoute &&\r\n        scope === \"profile\" &&\r\n        !state.storyScopeUserSelected &&\r\n        (scope = \"discovery\"),\r\n      onProfileRoute)\r\n    ) {\r\n      var targetIdentity = profileContentTargetIdentity(),\n        targetUid = targetIdentity.targetUid,\n        targetKey = targetIdentity.targetKey;\n      !canViewProfileContent(targetIdentity.profile)\n        ? (stories = [])\n        : targetIdentity.ready\n        ? (stories = stories.filter(function (story) {\n            return (\n              recordBelongsToProfile(story, targetUid, targetKey, \"ownerUid\") ||\n              recordBelongsToProfile(story, targetUid, targetKey, \"authorUid\")\r\n            );\r\n          }))\r\n        : (stories = []);\r\n    } else\r\n      onStoriesRoute &&\r\n        (scope === \"profile\"\r\n          ? (stories = hasCustomer()\r\n              ? stories.filter(function (story) {\r\n                  return recordOwnedByCurrentProfile(story);\r\n                })\r\n              : [])\r\n          : scope === \"following\"\r\n            ? (stories = stories.filter(function (story) {\r\n                var ownerUid = story.ownerUid || \"\",\r\n                  ownerKey =\r\n                    story.ownerProfileKey || story.authorProfileKey || \"\";\r\n                return (\r\n                  currentViewerFollowsProfile(ownerUid, ownerKey) ||\r\n                  !!state.favoritesByUid[ownerUid]\r\n                );\r\n              }))\r\n            : scope === \"discovery\" &&\r\n              (stories = stories.filter(function (story) {\r\n                return !(story.universeId || story.galaxyId);\r\n              })));\r\n    return stories;\r\n  }\r\n  function storyById(id) {\r\n    var stories = visibleStories();\r\n    return (\r\n      stories.filter(function (s) {\r\n        return (s.storyId || s.id || \"\") === id;\r\n      })[0] || null\r\n    );\r\n  }\r\n  function storyWatchMenuHTML(story) {\n    if (!story || isRestrictedShellRecord(story)) return \"\";\n    return (\n      '<button type=\"button\" data-dsd-story-watch-open=\"' +\n      html(story.storyId || story.id || \"\") +\n      '\">Watched</button>'\n    );\n  }\n  function mergeStoryPatch(storyId, patch) {\r\n    state.stories = (state.stories || []).map(function (story) {\r\n      return (story.storyId || story.id || \"\") === storyId\r\n        ? Object.assign({}, story, patch || {})\r\n        : story;\r\n    });\r\n  }\r\n  function storyGuestSessionToken() {\n    var key = \"dsd.story.guest.session.v1\";\n    try {\n      var existing = window.sessionStorage.getItem(key);\n      if (existing) return existing;\n      var bytes = new Uint8Array(18);\n      window.crypto && window.crypto.getRandomValues\n        ? window.crypto.getRandomValues(bytes)\n        : bytes.forEach(function (_value, index) {\n            bytes[index] = Math.floor(Math.random() * 256);\n          });\n      var token = Array.prototype.map\n        .call(bytes, function (value) {\n          return value.toString(16).padStart(2, \"0\");\n        })\n        .join(\"\");\n      window.sessionStorage.setItem(key, token);\n      return token;\n    } catch (_error) {\n      return \"\";\n    }\n  }\n  function storyAudienceRequest(action, storyId, options) {\n    options = options || {};\n    return fetch(\"/apps/dsd-firebase-custom-token/supabase/story-audience\", {\n      method: \"POST\",\n      credentials: \"include\",\n      headers: { \"Content-Type\": \"application/json\", Accept: \"application/json\" },\n      body: JSON.stringify({\n        action: action,\n        storyId: storyId,\n        limit: options.limit || 0,\n        offset: options.offset || 0,\n        guestSessionToken: options.guestSessionToken || \"\",\n      }),\n    }).then(function (response) {\n      return response.text().then(function (text) {\n        var body = {};\n        try {\n          body = text ? JSON.parse(text) : {};\n        } catch (_error) {}\n        if (!response.ok || body.ok === !1) {\n          var error = new Error(body.error || \"story_audience_request_failed\");\n          error.status = response.status;\n          throw error;\n        }\n        return body;\n      });\n    });\n  }\n  function recordStoryWatch(story, boundary) {\n    if (!story || isRestrictedShellRecord(story)) return Promise.resolve(null);\n    var storyId = story.storyId || story.id || \"\";\n    if (!storyId || state.storyWatchClaims[storyId]) return Promise.resolve(null);\n    state.storyWatchClaims[storyId] = \"pending:\" + String(boundary || \"media-ready\");\n    return storyAudienceRequest(\"record\", storyId, {\n      guestSessionToken: hasCustomer() ? \"\" : storyGuestSessionToken(),\n    })\n      .then(function (result) {\n        state.storyWatchClaims[storyId] = \"recorded:\" + String(boundary || \"media-ready\");\n        mergeStoryPatch(storyId, {\n          viewCount: counterValue(result, [\"viewCount\", \"view_count\"], story.viewCount || 0),\n          watchCount: counterValue(result, [\"watchCount\", \"watch_count\"], story.watchCount || 0),\n          uniqueWatchCount: counterValue(\n            result,\n            [\"uniqueWatchCount\", \"unique_watch_count\"],\n            story.uniqueWatchCount || 0,\n          ),\n        });\n        return result;\n      })\n      .catch(function (error) {\n        delete state.storyWatchClaims[storyId];\n        claim(\"story-view-event:blocked\", {\n          storyId: storyId,\n          boundary: boundary || \"media-ready\",\n          status: error && error.status,\n          error: error && error.message,\n        });\n        return null;\n      });\n  }\n  function hydrateStoryWatchers(story, force) {\n    if (!story || isRestrictedShellRecord(story)) return Promise.resolve(null);\n    var storyId = story.storyId || story.id || \"\";\n    if (!storyId) return Promise.resolve(null);\n    if (!force && state.storyAudienceById[storyId])\n      return Promise.resolve(state.storyAudienceById[storyId]);\n    if (state.storyAudiencePendingById[storyId])\n      return state.storyAudiencePendingById[storyId];\n    var pending = storyAudienceRequest(\"summary\", storyId, { limit: 4, offset: 0 })\n      .then(function (result) {\n        state.storyAudienceById[storyId] = result;\n        delete state.storyAudiencePendingById[storyId];\n        state.activeStoryId === storyId && renderStoryAudienceRibbon(story);\n        return result;\n      })\n      .catch(function (error) {\n        delete state.storyAudiencePendingById[storyId];\n        claim(\"story-audience-summary:blocked\", {\n          storyId: storyId,\n          status: error && error.status,\n          error: error && error.message,\n        });\n        return null;\n      });\n    state.storyAudiencePendingById[storyId] = pending;\n    return pending;\n  }\n  function storyAudienceAvatarHTML(row, className) {\n    row = row || {};\n    var label = publicDisplayName(row.displayName || row.handle || \"DSD member\", \"DSD member\"),\n      mediaId = row.avatarMediaId || row.avatar_media_id || \"\";\n    return (\n      '<span class=\"' +\n      html(className) +\n      '\"' +\n      (mediaId ? ' data-dsd-avatar-media-id=\"' + html(mediaId) + '\"' : \"\") +\n      \">\" +\n      (mediaId ? \"\" : html(initials(label))) +\n      \"</span>\"\n    );\n  }\n  function renderStoryAudienceRibbon(story) {\n    var overlay = qs('[data-dsd-immersive-overlay][data-dsd-immersive-mode=\"story\"]');\n    if (!overlay) return;\n    var existing = qs(\"[data-dsd-story-audience-ribbon]\", overlay);\n    if (!story || isRestrictedShellRecord(story)) {\n      existing && existing.remove();\n      return;\n    }\n    var storyId = story.storyId || story.id || \"\",\n      audience = state.storyAudienceById[storyId] || {},\n      rows = (audience.rows || []).slice(0, 4),\n      identified = Number(audience.identifiedCount || 0),\n      publicCount = Number(audience.publicCount || 0),\n      total = identified + publicCount,\n      ribbon = existing || document.createElement(\"button\");\n    ribbon.type = \"button\";\n    ribbon.className = \"dsd-story-audience-ribbon\";\n    ribbon.setAttribute(\"data-dsd-story-audience-ribbon\", storyId);\n    ribbon.setAttribute(\"data-dsd-story-audience-open\", storyId);\n    ribbon.setAttribute(\"aria-label\", total ? \"Open Story viewers\" : \"No Story viewers yet\");\n    ribbon.innerHTML =\n      '<span class=\"dsd-story-audience-ribbon__avatars\" aria-hidden=\"true\">' +\n      (rows.length\n        ? rows\n            .map(function (row) {\n              return storyAudienceAvatarHTML(row, \"dsd-story-audience-ribbon__avatar\");\n            })\n            .join(\"\")\n        : '<span class=\"dsd-story-audience-ribbon__avatar\">0</span>') +\n      (identified > rows.length\n        ? '<span class=\"dsd-story-audience-ribbon__avatar\">+' +\n          html(String(identified - rows.length)) +\n          \"</span>\"\n        : \"\") +\n      '</span><span class=\"dsd-story-audience-ribbon__copy\"><strong>' +\n      html(total ? String(total) + (total === 1 ? \" view\" : \" views\") : \"No views yet\") +\n      \"</strong><small>\" +\n      html(publicCount ? identified + \" members \u00B7 \" + publicCount + \" public\" : identified + \" members\") +\n      \"</small></span>\";\n    existing || overlay.appendChild(ribbon);\n    hydrateAvatarMedia(ribbon);\n  }\n  function closeStoryAudienceSheet() {\n    var sheet = qs(\"[data-dsd-story-watch-sheet]\"),\n      overlay = sheet && sheet.closest(\"[data-dsd-immersive-overlay]\");\n    if (sheet) sheet.remove();\n    overlay && overlay.classList.remove(\"is-story-audience-open\");\n    setStoryPauseToken(\"story-audience\", !1);\n  }\n  function renderStoryAudienceSheet(story, audience) {\n    var overlay = qs('[data-dsd-immersive-overlay][data-dsd-immersive-mode=\"story\"]');\n    if (!overlay || !story) return;\n    var priorSheet = qs(\"[data-dsd-story-watch-sheet]\");\n    priorSheet && priorSheet.remove();\n    var storyId = story.storyId || story.id || \"\",\n      identified = Number(audience && audience.identifiedCount || 0),\n      publicCount = Number(audience && audience.publicCount || 0),\n      rows = (audience && audience.rows) || [],\n      sheet = document.createElement(\"section\"),\n      list = rows\n        .map(function (row) {\n          var key = publicHandleText(row.profileKey || row.handle || \"member\", row.displayName || \"DSD member\", \"member\"),\n            when = formatDateTime(row.latestViewedAt || row.firstViewedAt || \"\"),\n            identity = row.available === !1\n              ? '<span class=\"dsd-story-audience-sheet__identity\"><strong>Unavailable DSD member</strong><span>Identity hidden</span></span>'\n              : '<a class=\"dsd-story-audience-sheet__identity\" href=\"' +\n                html(profileRouteHref(key)) +\n                '\"><strong>' +\n                html(publicDisplayName(row.displayName || key, \"DSD member\")) +\n                \"</strong><span>@\" +\n                html(key) +\n                \"</span></a>\";\n          return (\n            '<article class=\"dsd-story-audience-sheet__row\">' +\n            storyAudienceAvatarHTML(row, \"dsd-story-audience-sheet__avatar\") +\n            identity +\n            \"<time>\" +\n            html(when || \"Viewed\") +\n            \"</time></article>\"\n          );\n        })\n        .join(\"\");\n    publicCount &&\n      (list +=\n        '<article class=\"dsd-story-audience-sheet__row dsd-story-audience-sheet__public\"><span class=\"dsd-story-audience-sheet__avatar\" aria-hidden=\"true\">P</span><span class=\"dsd-story-audience-sheet__identity\"><strong>Public views</strong><span>Guest identities are not collected</span></span><strong>' +\n        html(String(publicCount)) +\n        \"</strong></article>\");\n    !list &&\n      (list =\n        '<p class=\"dsd-story-audience-sheet__empty\">No one has viewed this Story yet.</p>');\n    sheet.className = \"dsd-story-audience-sheet\";\n    sheet.setAttribute(\"data-dsd-story-watch-sheet\", storyId);\n    sheet.setAttribute(\"role\", \"dialog\");\n    sheet.setAttribute(\"aria-modal\", \"true\");\n    sheet.setAttribute(\"aria-label\", \"Story viewers\");\n    sheet.innerHTML =\n      '<header class=\"dsd-story-audience-sheet__header\"><div><strong>Story viewers</strong><small>' +\n      html(String(identified) + \" members\" + (publicCount ? \" \u00B7 \" + publicCount + \" public views\" : \"\")) +\n      '</small></div><button type=\"button\" class=\"dsd-story-audience-sheet__close\" data-dsd-story-audience-close aria-label=\"Close Story viewers\">&times;</button></header><div class=\"dsd-story-audience-sheet__list\">' +\n      list +\n      \"</div>\" +\n      (audience && audience.hasMore\n        ? '<button type=\"button\" class=\"dsd-story-audience-sheet__more\" data-dsd-story-audience-more data-offset=\"' +\n          html(String((audience.offset || 0) + rows.length)) +\n          '\">Load more viewers</button>'\n        : \"\");\n    overlay.classList.add(\"is-story-audience-open\");\n    overlay.appendChild(sheet);\n    hydrateAvatarMedia(sheet);\n    [\"pointerdown\", \"touchstart\", \"touchmove\"].forEach(function (eventName) {\n      sheet.addEventListener(eventName, function (event) {\n        event.stopPropagation();\n      }, { passive: !0 });\n    });\n    var close = qs(\"[data-dsd-story-audience-close]\", sheet);\n    close && close.focus();\n  }\n  function openStoryAudienceSheet(storyId) {\n    var story = storyById(storyId || state.activeStoryId);\n    if (!story || isRestrictedShellRecord(story)) return;\n    setStoryPauseToken(\"story-audience\", !0);\n    renderStoryAudienceSheet(story, {\n      identifiedCount: 0,\n      publicCount: 0,\n      rows: [],\n      hasMore: !1,\n    });\n    var sheet = qs(\"[data-dsd-story-watch-sheet]\"),\n      list = sheet && qs(\".dsd-story-audience-sheet__list\", sheet);\n    list && (list.innerHTML = '<p role=\"status\">Loading viewers...</p>');\n    storyAudienceRequest(\"list\", story.storyId || story.id || \"\", { limit: 24, offset: 0 })\n      .then(function (result) {\n        state.storyAudienceById[story.storyId || story.id || \"\"] = result;\n        renderStoryAudienceRibbon(story);\n        renderStoryAudienceSheet(story, result);\n      })\n      .catch(function () {\n        list && (list.innerHTML = '<p role=\"alert\">Viewers could not be loaded. Try again.</p>');\n      });\n  }\n  function loadMoreStoryAudience(storyId, offset) {\n    var story = storyById(storyId || state.activeStoryId);\n    if (!story || isRestrictedShellRecord(story)) return;\n    storyAudienceRequest(\"list\", story.storyId || story.id || \"\", {\n      limit: 24,\n      offset: Math.max(0, Number(offset || 0) || 0),\n    })\n      .then(function (result) {\n        var prior = state.storyAudienceById[story.storyId || story.id || \"\"] || {},\n          merged = Object.assign({}, result, {\n            rows: (prior.rows || []).concat(result.rows || []).filter(function (row, index, all) {\n              var key = row.profileKey || row.handle || row.displayName || \"unavailable:\" + index;\n              return all.findIndex(function (candidate, candidateIndex) {\n                var candidateKey = candidate.profileKey || candidate.handle || candidate.displayName || \"unavailable:\" + candidateIndex;\n                return candidateKey === key;\n              }) === index;\n            }),\n          });\n        state.storyAudienceById[story.storyId || story.id || \"\"] = merged;\n        renderStoryAudienceRibbon(story);\n        renderStoryAudienceSheet(story, merged);\n      })\n      .catch(function () {\n        renderStatus(\"More Story viewers could not be loaded.\");\n      });\n  }\n  function storyActionsHTML(story) {\n    var id = story && (story.storyId || story.id || \"\");\r\n    if (!id || !canUseSocialActions()) return \"\";\r\n    story = hydrateRecordIdentity(story || {});\n    var storyProfile = profileForRecordIdentity(story) || {},\n      storyTargetUid = storyProfile.uid || storyProfile.userId || story.authorUid || story.ownerUid || \"\",\n      storyTargetKey = storyProfile.profileKey || storyProfile.handle || story.authorProfileKey || story.ownerProfileKey || \"\",\n      actions =\n        '<button type=\"button\" data-dsd-report-story=\"' +\n        html(id) +\n        '\">Report</button>',\n      status =\r\n        story.status ||\r\n        (story.moderation && story.moderation.state) ||\r\n        \"pending\";\r\n    if (storyTargetKey && !identityMatchesCurrent(storyTargetUid, storyTargetKey) && !relationshipBlocked(storyTargetUid)) {\n      actions = '<button type=\"button\" data-dsd-connection-signal=\"wave\" data-dsd-target-profile=\"' + html(storyTargetKey) + '\">Wave</button><button type=\"button\" data-dsd-connection-signal=\"interested\" data-dsd-target-profile=\"' + html(storyTargetKey) + '\">Interested</button>' + actions;\n    }\n    return (\n      canModerate() &&\r\n        (status !== \"approved\" &&\r\n          (actions +=\r\n            '<button type=\"button\" data-dsd-approve-story=\"' +\r\n            html(id) +\r\n            '\">Approve</button>'),\r\n        status !== \"hidden\" &&\r\n          (actions +=\r\n            '<button type=\"button\" data-dsd-hide-story=\"' +\r\n            html(id) +\r\n            '\">Hide</button>'),\r\n        status !== \"rejected\" &&\r\n          (actions +=\r\n            '<button type=\"button\" data-dsd-reject-story=\"' +\r\n            html(id) +\r\n            '\">Reject</button>'),\r\n        status !== \"approved\" &&\r\n          (actions +=\r\n            '<button type=\"button\" data-dsd-restore-story=\"' +\r\n            html(id) +\r\n            '\">Restore</button>')),\r\n      (canModerate() || recordOwnedByCurrentProfile(story)) &&\r\n        (actions +=\r\n          '<button type=\"button\" data-dsd-delete-story=\"' +\r\n          html(id) +\r\n          '\">Delete</button>'),\r\n      '<details class=\"dsd-story385__actions\" data-dsd-story-actions-panel><summary aria-label=\"Story actions\" title=\"Story actions\">...</summary><div class=\"dsd-story385__actions-menu\">' +\r\n        actions +\r\n        storyWatchMenuHTML(story) +\r\n        \"</div></details>\"\r\n    );\r\n  }\r\n  function storyMatchesRequestedId(story, requestedId) {\n    requestedId = String(requestedId || \"\").trim();\n    if (!story || !requestedId) return !1;\n    return [\n      story.storyId,\n      story.id,\n      story.legacyStoryId,\n      story.legacy_story_id,\n      story.supabaseStoryId,\n      story.supabase_story_id,\n    ].some(function (value) {\n      return String(value || \"\").trim() === requestedId;\n    });\n  }\n  function renderStories() {\n    var trays = qsa(\".dsd-story385__tray\").filter(function (tray) {\r\n      return !tray.closest(\"[data-dsd-mv395]\");\r\n    });\r\n    if (trays.length) {\r\n      ensureStoryViewerShell();\r\n      var scopeLabels = {\r\n          profile: \"Profile\",\r\n          feed: \"Feed\",\r\n          following: \"Following\",\r\n          discovery: \"Discovery\",\r\n        },\r\n        onProfileRoute = /\\/pages\\/user-profile(?:$|[/?#])/.test(\r\n          window.location.pathname + window.location.search,\r\n        ),\r\n        onStoriesRoute = /\\/pages\\/stories(?:$|[/?#])/.test(\r\n          window.location.pathname + window.location.search,\r\n        ),\r\n        scope = onProfileRoute ? \"profile\" : state.storyScope || \"discovery\";\r\n      (onStoriesRoute &&\r\n        scope === \"profile\" &&\r\n        !state.storyScopeUserSelected &&\r\n        (scope = \"discovery\"),\r\n        scopeLabels[scope] || (scope = \"profile\"),\r\n        qsa(\"[data-dsd-story385-scope]\").forEach(function (button) {\r\n          button.classList.toggle(\r\n            \"is-active\",\r\n            (button.getAttribute(\"data-dsd-story385-scope\") || \"\") === scope,\r\n          );\r\n        }));\r\n      var visible = surfaceStories(),\n        profileStoryTarget = onProfileRoute\n          ? profileContentTargetIdentity()\n          : null,\n        profileStoryRestricted = !!(\n          profileStoryTarget &&\n          profileStoryTarget.ready &&\n          profileStoryTarget.profile &&\n          !canViewProfileContent(profileStoryTarget.profile)\n        ),\n        requestedStoryParam = String(queryParam(\"story\") || \"\").trim(),\r\n        requestedStoryId = /^open$/i.test(requestedStoryParam)\r\n          ? \"\"\r\n          : requestedStoryParam,\r\n        openFirstStoryRequested = /^open$/i.test(requestedStoryParam);\r\n      (requestedStoryId &&\n        (state.lastRequestedStoryId !== requestedStoryId ||\r\n          state.activeStoryId !== requestedStoryId) &&\r\n        ((state.activeStoryId = requestedStoryId),\r\n        (state.lastRequestedStoryId = requestedStoryId),\r\n        (state.storySelectionExplicit = !0)),\r\n        state.activeStoryId &&\r\n          !visible.some(function (story) {\n            return storyMatchesRequestedId(story, state.activeStoryId);\n          }) &&\r\n          !requestedStoryId &&\r\n          ((state.activeStoryId = \"\"), (state.storySelectionExplicit = !1)),\r\n        !state.activeStoryId &&\r\n          visible[0] &&\r\n          ((state.activeStoryId = visible[0].storyId || visible[0].id || \"\"),\r\n          openFirstStoryRequested && (state.storySelectionExplicit = !0)));\r\n      var selectedStory =\n          visible.filter(function (s) {\n            return storyMatchesRequestedId(s, state.activeStoryId);\n          })[0] || null,\n        waitingForRequestedStory =\r\n          requestedStoryId &&\r\n          state.storySelectionExplicit &&\r\n          state.activeStoryId === requestedStoryId &&\n          !selectedStory;\n      if (selectedStory && requestedStoryId === state.storyRouteUnavailableId)\n        state.storyRouteUnavailableId = \"\";\n      if (\n        state.storyRouteResolutionTimer &&\n        state.storyRouteResolutionTarget !== requestedStoryId\n      ) {\n        (window.clearTimeout(state.storyRouteResolutionTimer),\n          (state.storyRouteResolutionTimer = null),\n          (state.storyRouteResolutionTarget = \"\"));\n      }\n      if (\n        requestedStoryId &&\n        !selectedStory &&\n        state.storyRouteUnavailableId !== requestedStoryId &&\n        !state.storyRouteResolutionTimer\n      )\n        ((state.storyRouteResolutionTarget = requestedStoryId),\n        (state.storyRouteResolutionTimer = window.setTimeout(function () {\n          var currentRequestedStory = String(queryParam(\"story\") || \"\").trim(),\n            resolvedStory = surfaceStories().some(function (story) {\n              return storyMatchesRequestedId(story, requestedStoryId);\n            });\n          ((state.storyRouteResolutionTimer = null),\n            (state.storyRouteResolutionTarget = \"\"),\n            currentRequestedStory === requestedStoryId &&\n              !resolvedStory &&\n              ((state.storyRouteUnavailableId = requestedStoryId),\n              (state.lastAutoOpenedStoryRoute = \"id:\" + requestedStoryId),\n              renderStories()));\n        }, 4500)));\n      if (!requestedStoryParam) {\n        (state.storyRouteResolutionTimer &&\n          window.clearTimeout(state.storyRouteResolutionTimer),\n          (state.storyRouteResolutionTimer = null),\n          (state.storyRouteResolutionTarget = \"\"),\n          (state.storyRouteUnavailableId = \"\"));\n      }\n      if (\r\n        !waitingForRequestedStory &&\r\n        (!selectedStory ||\r\n          (!state.storySelectionExplicit &&\r\n            isRestrictedShellRecord(selectedStory))) &&\r\n        visible.length\r\n      ) {\r\n        var firstOpenStory =\r\n          visible.filter(function (s) {\r\n            return !isRestrictedShellRecord(s);\r\n          })[0] || visible[0];\r\n        state.activeStoryId = firstOpenStory.storyId || firstOpenStory.id || \"\";\r\n      }\r\n      var storyCards = profileStoryRestricted\n        ? profileRestrictedAccessShellHTML(\n            profileStoryTarget.profile,\n            \"story\",\n          )\n        : visible.length\n          ? visible\n            .map(function (s) {\n              s = hydrateRecordIdentity(s);\r\n              var id = s.storyId || s.id || \"\",\r\n                media2 = safeMediaItemsForRecord(s)[0] || {},\r\n                isShell = isRestrictedShellRecord(s),\r\n                shellCopy = isShell ? restrictedShellText(s, \"story\") : null,\r\n                storyRestriction = classifiedRestrictionType(s),\r\n                storyKey = s.authorProfileKey || s.ownerProfileKey || \"\",\r\n                storyProfile = profileForRecordIdentity(s) || {},\n                avatarId =\r\n                  canonicalProfileAvatarMediaId(storyProfile) ||\r\n                  s.authorAvatarMediaId ||\r\n                  s.ownerAvatarMediaId ||\r\n                  \"\",\r\n                storyAuthor = publicDisplayName(\r\n                  storyProfile.displayName ||\r\n                    s.authorDisplayName ||\r\n                    storyKey ||\r\n                    \"Story\",\r\n                  \"Story\",\r\n                );\r\n              storyKey =\r\n                storyProfile.profileKey || storyProfile.handle || storyKey;\r\n              var storyCaption = publicDisplayText(s.body || \"\", \"\"),\r\n                storyMediaId = readableMediaId(media2),\r\n                mediaChip = storyMediaId\r\n                  ? '<figure class=\"dsd-story385__media\"' +\r\n                    mediaReadAttrs(media2) +\r\n                    ' data-dsd-media-kind=\"' +\r\n                    html(media2.kind || \"image\") +\r\n                    '\"></figure>'\r\n                  : '<span class=\"dsd-story385__media dsd-story385__media--fallback\">' +\r\n                    html(initials(storyAuthor || \"DS\")) +\r\n                    \"</span>\",\r\n                avatar2 = avatarId\r\n                  ? '<a class=\"dsd-story385__poster\" data-dsd-story-profile-link href=\"' +\r\n                    html(profileRouteHref(storyKey)) +\r\n                    '\" data-dsd-avatar-media-id=\"' +\r\n                    html(avatarId) +\r\n                    '\" aria-label=\"' +\r\n                    html(storyAuthor) +\r\n                    '\"></a>'\r\n                  : '<a class=\"dsd-story385__poster dsd-story385__poster--fallback\" data-dsd-story-profile-link href=\"' +\r\n                    html(profileRouteHref(storyKey)) +\r\n                    '\">' +\r\n                    html(initials(storyAuthor || \"DS\")) +\r\n                    \"</a>\";\r\n              return (\r\n                '<article role=\"button\" tabindex=\"0\" class=\"dsd-story385__story dsd-story385__tray-card ' +\r\n                (id === state.activeStoryId ? \"is-active\" : \"\") +\r\n                (storyRestriction\r\n                  ? \" dsd-story385__tray-card--\" + storyRestriction\r\n                  : \"\") +\r\n                '\" data-dsd-restricted-kind=\"' +\r\n                html(storyRestriction || \"\") +\r\n                '\" data-dsd-view-story=\"' +\r\n                html(id) +\r\n                '\">' +\r\n                mediaChip +\r\n                avatar2 +\r\n                \"<strong>\" +\r\n                html(storyAuthor) +\r\n                \"</strong>\" +\r\n                (isShell\r\n                  ? \"<span>\" + html(shellCopy.short) + \"</span>\"\r\n                  : storyCaption\r\n                    ? \"<em>\" + html(String(storyCaption).slice(0, 96)) + \"</em>\"\r\n                    : \"\") +\r\n                \"</article>\"\r\n              );\r\n            })\r\n            .join(\"\")\n          : '<div class=\"dsd-story385__empty\" data-dsd-story385-empty-state><strong>No ' +\n            html(scopeLabels[scope]) +\n            \" stories yet</strong><span>Stories for this view appear here when they are available.</span></div>\";\n      var storyTraySignature =\n        \"story-tray:\" +\n        scope +\n        \":restricted:\" +\n        (profileStoryRestricted\n          ? profileRestrictionType(profileStoryTarget.profile) || \"restricted\"\n          : \"open\") +\n        \":\" +\n        state.activeStoryId +\n        \":\" +\n        (requestedStoryId && state.storyRouteUnavailableId === requestedStoryId\n          ? \"route-unavailable:\" + requestedStoryId\n          : \"route-ready\") +\n        \":\" +\n        visible\n          .map(function (story) {\n            story = hydrateRecordIdentity(story || {});\n            var storyProfile = profileForRecordIdentity(story) || {},\n              storyMedia = safeMediaItemsForRecord(story)[0] || {};\n            return [\n              story.storyId || story.id || \"\",\n              classifiedRestrictionType(story) || \"\",\n              isRestrictedShellRecord(story) ? \"shell\" : \"open\",\n              publicDisplayText(story.body || \"\", \"\").slice(0, 96),\n              mediaSignatureId(storyMedia),\n              storyProfile.profileKey ||\n                storyProfile.handle ||\n                story.authorProfileKey ||\n                story.ownerProfileKey ||\n                \"\",\n              publicDisplayName(\n                storyProfile.displayName ||\n                  story.authorDisplayName ||\n                  story.ownerDisplayName ||\n                  \"\",\n                \"\",\n              ),\n              canonicalProfileAvatarMediaId(storyProfile) ||\n                story.authorAvatarMediaId ||\n                story.ownerAvatarMediaId ||\n                \"\",\n            ].join(\"~\");\n          })\n          .join(\"|\");\n      trays.forEach(function (tray) {\n        var routeStatus = tray.previousElementSibling;\n        routeStatus &&\n          !routeStatus.hasAttribute(\"data-dsd-story-route-status\") &&\n          (routeStatus = null);\n        if (requestedStoryId && state.storyRouteUnavailableId === requestedStoryId) {\n          routeStatus ||\n            ((routeStatus = document.createElement(\"div\")),\n            (routeStatus.className = \"dsd-story385__route-status\"),\n            routeStatus.setAttribute(\"data-dsd-story-route-status\", \"\"),\n            routeStatus.setAttribute(\"role\", \"status\"),\n            routeStatus.setAttribute(\"aria-live\", \"polite\"),\n            tray.parentNode.insertBefore(routeStatus, tray));\n          routeStatus.innerHTML =\n            \"<strong>Story unavailable</strong><span>This Story expired, was removed, or is not available to you.</span>\";\n        } else routeStatus && routeStatus.remove();\n        (replaceHtmlIfChanged(tray, storyTraySignature, storyCards),\n          hydrateAvatarMedia(tray),\n          hydrateMediaReads(tray));\n      });\n      var active =\r\n        visible.filter(function (s) {\n          return storyMatchesRequestedId(s, state.activeStoryId);\n        })[0] ||\r\n        (waitingForRequestedStory ? null : visible[0]) ||\r\n        null;\r\n      var routeStoryAutoOpenId = openFirstStoryRequested\n          ? active && (active.storyId || active.id || state.activeStoryId || \"\")\n          : requestedStoryId && selectedStory\n            ? requestedStoryId\n            : \"\",\n        routeStoryAutoOpenKey = openFirstStoryRequested\n          ? \"open:\" + routeStoryAutoOpenId\n          : requestedStoryId\n            ? \"id:\" + requestedStoryId\n            : \"\";\n      (!requestedStoryParam && (state.lastAutoOpenedStoryRoute = \"\"),\n        routeStoryAutoOpenId &&\n          routeStoryAutoOpenKey &&\n          state.lastAutoOpenedStoryRoute !== routeStoryAutoOpenKey &&\n          !state.immersiveOverlayOpen &&\n          ((state.lastAutoOpenedStoryRoute = routeStoryAutoOpenKey),\n          window.setTimeout(function () {\n            var currentStoryParam = String(queryParam(\"story\") || \"\").trim(),\n              routeStillMatches = openFirstStoryRequested\n                ? /^open$/i.test(currentStoryParam)\n                : currentStoryParam === requestedStoryId;\n            routeStillMatches && openStoryOverlay(routeStoryAutoOpenId);\n          }, 120)));\n      var viewer = activeStoryViewer(),\r\n        overlayStoryViewer =\r\n          viewer &&\r\n          viewer.hasAttribute &&\r\n          viewer.hasAttribute(\"data-dsd-story-overlay-viewer\");\r\n      if (overlayStoryViewer) {\r\n        var overlay = viewer.closest(\"[data-dsd-immersive-overlay]\"),\r\n          progress = qs(\"[data-dsd-story-progress]\", viewer);\r\n        if (\r\n          (progress &&\r\n            (progress.innerHTML = visible\r\n              .map(function (story) {\r\n                var sid = story.storyId || story.id || \"\";\r\n                return (\r\n                  '<span class=\"' +\r\n                  (sid === state.activeStoryId ? \"is-active\" : \"\") +\r\n                  '\"></span>'\r\n                );\r\n              })\r\n              .join(\"\")),\r\n          overlay && active)\r\n        ) {\r\n          var context = qs(\"[data-dsd-story-identity]\", overlay),\r\n            controls = qs(\"[data-dsd-story-top-controls]\", overlay);\r\n          (context &&\r\n            ((context.innerHTML = storyContextHTML(active)),\r\n            hydrateAvatarMedia(context)),\r\n            controls && (controls.innerHTML = storyActionsHTML(active)),\n            renderStoryAudienceRibbon(active),\n            hydrateStoryWatchers(active));\n        }\r\n      }\r\n      var title = qs(\"[data-dsd-story385-title]\", viewer || document),\r\n        handle = qs(\"[data-dsd-story385-handle]\", viewer || document),\r\n        avatar = qs(\"[data-dsd-story385-avatar]\", viewer || document),\r\n        status = qs(\"[data-dsd-story385-status]\", viewer || document),\r\n        canvas = qs(\".dsd-story385__canvas\", viewer || document);\r\n      if (!active) {\r\n        var waitingLabel = waitingForRequestedStory\r\n          ? \"Loading story\"\r\n          : \"No story selected\";\r\n        (title && (title.textContent = waitingLabel),\r\n          handle &&\r\n            (handle.textContent = waitingForRequestedStory\r\n              ? \"@stories\"\r\n              : \"Stories\"),\r\n          avatar &&\r\n            (avatar.textContent = waitingForRequestedStory ? \"DS\" : \"--\"),\r\n          status && (status.textContent = waitingLabel),\r\n          canvas &&\r\n            ((canvas.innerHTML = waitingForRequestedStory\r\n              ? '<div class=\"dsd-story385__loading\" data-dsd-story-loading>Loading story...</div>'\r\n              : '<div class=\"dsd-story385__empty\">Select a story to view it here.</div>'),\r\n            setupStoryAdvance(null, canvas)));\r\n        return;\r\n      }\r\n      var activeIsShell = isRestrictedShellRecord(active),\r\n        activeShellCopy = activeIsShell\r\n          ? restrictedShellText(active, \"story\")\r\n          : null;\r\n      if (\r\n        (title &&\r\n          (title.textContent = activeIsShell\r\n            ? activeShellCopy.title\r\n            : publicDisplayText(active.body || \"Story\", \"Story\")),\r\n        handle &&\r\n          (handle.textContent =\r\n            \"@\" +\r\n            publicHandleText(\r\n              active.authorProfileKey || active.ownerUid || \"story\",\r\n              active.authorDisplayName || \"Story\",\r\n              \"story\",\r\n            )),\r\n        avatar)\r\n      ) {\r\n        var activeStoryKey =\r\n            active.authorProfileKey || active.ownerProfileKey || \"\",\r\n          activeStoryProfile = profileForRecordIdentity(active) || {},\n          activeStoryAvatarId =\r\n            canonicalProfileAvatarMediaId(activeStoryProfile) ||\r\n            active.authorAvatarMediaId ||\r\n            active.ownerAvatarMediaId ||\r\n            \"\";\r\n        ((avatar.textContent = initials(\r\n          publicDisplayName(\r\n            activeStoryProfile.displayName ||\r\n              active.authorDisplayName ||\r\n              activeStoryKey ||\r\n              \"DS\",\r\n            \"DS\",\r\n          ),\r\n        )),\r\n          activeStoryAvatarId\r\n            ? (avatar.setAttribute(\r\n                \"data-dsd-avatar-media-id\",\r\n                activeStoryAvatarId,\r\n              ),\r\n              delete avatar.dataset.dsdAvatarHydrated,\r\n              delete avatar.dataset.dsdAvatarHydratedMediaId)\r\n            : (avatar.removeAttribute(\"data-dsd-avatar-media-id\"),\r\n              delete avatar.dataset.dsdAvatarHydrated,\r\n              delete avatar.dataset.dsdAvatarHydratedMediaId));\r\n      }\r\n      if (canvas) {\r\n        if (activeIsShell) {\r\n          ((canvas.innerHTML =\r\n            '<div class=\"dsd-gated-post-shell dsd-gated-story-shell\" data-dsd-restricted-shell=\"true\" data-dsd-restricted-kind=\"' +\r\n            html(\r\n              active.restrictedKind ||\r\n                classifiedRestrictionType(active) ||\r\n                \"gated\",\r\n            ) +\r\n            '\"><strong>' +\r\n            html(activeShellCopy.title) +\r\n            \"</strong><p>\" +\r\n            html(activeShellCopy.body) +\r\n            \"</p>\" +\r\n            restrictedShellActionHTML(activeShellCopy) +\r\n            \"</div>\"),\r\n            status && (status.textContent = \"\"),\r\n            setupStoryAdvance(null, canvas));\r\n          return;\r\n        }\r\n        hydrateStoryWatchers(active);\n        var media = safeMediaItemsForRecord(active)\r\n            .map(function (m) {\r\n              var kind = m.kind || \"image\";\r\n              return (\r\n                '<figure class=\"dsd-launch-media-chip\"' +\r\n                mediaReadAttrs(m) +\r\n                ' data-dsd-media-kind=\"' +\r\n                html(kind) +\r\n                '\" data-dsd-media-status=\"' +\r\n                html(m.status || \"pending_upload\") +\r\n                '\"></figure>'\r\n              );\r\n            })\r\n            .join(\"\"),\r\n          storyMediaSignature = [\r\n            active.storyId || active.id || \"\",\r\n            safeMediaItemsForRecord(active)\r\n              .map(function (m) {\r\n                return readableMediaId(m) || m.id || m.mediaId || \"\";\r\n              })\r\n              .join(\",\"),\r\n            active.body || \"\",\r\n          ].join(\"|\");\r\n        if (\r\n          canvas.getAttribute(\"data-dsd-story-media-render-signature\") ===\r\n            storyMediaSignature &&\r\n          qs(\".dsd-story385__canvas-media\", canvas)\r\n        ) {\r\n          setupStoryAdvance(active, canvas);\r\n          return;\r\n        }\r\n        (canvas.setAttribute(\r\n          \"data-dsd-story-media-render-signature\",\r\n          storyMediaSignature,\r\n        ),\r\n          (canvas.innerHTML =\r\n            '<div class=\"dsd-story385__canvas-media\">' +\r\n            media +\r\n            '</div><div class=\"dsd-immersive-overlay__bottom\" data-dsd-story-bottom-layer>' +\r\n            (active.body\r\n              ? '<p class=\"dsd-story385__caption\">' +\r\n                linkify(publicDisplayText(active.body || \"\", \"\")) +\r\n                \"</p>\"\r\n              : \"\") +\r\n            storyLinkPreviewHTML(active.body || \"\") +\r\n            storyMessageComposerHTML(active) +\r\n            \"</div>\"),\r\n          hydrateMediaReads(canvas),\n          setupStoryAdvance(active, canvas),\n          !safeMediaItemsForRecord(active).length &&\n            window.requestAnimationFrame(function () {\n              state.activeStoryId === (active.storyId || active.id || \"\") &&\n                recordStoryWatch(active, \"text-visible\");\n            }));\n      } else status && (status.textContent = active.status || \"pending\");\r\n    }\r\n  }\r\n  function clearStoryAdvanceTimer() {\n    storyAdvanceTimer &&\n      (window.clearTimeout(storyAdvanceTimer), (storyAdvanceTimer = null));\n  }\n  function storyPausedByUi() {\n    return Object.keys(state.storyPauseTokens || {}).some(function (token) {\n      return state.storyPauseTokens[token] === !0;\n    });\n  }\n  function setStoryPauseToken(token, active) {\n    if (!token) return;\n    state.storyPauseTokens = state.storyPauseTokens || {};\n    if (active) state.storyPauseTokens[token] = !0;\n    else delete state.storyPauseTokens[token];\n    syncActiveStoryPauseState();\n  }\n  function syncActiveStoryPauseState() {\n    var overlay = qs('[data-dsd-immersive-overlay][data-dsd-immersive-mode=\"story\"]'),\n      video = overlay && qs(\"video\", overlay),\n      paused = storyPausedByUi();\n    if (paused) {\n      clearStoryAdvanceTimer();\n      if (video && !video.paused) {\n        state.storyPausedVideoWasPlaying = !0;\n        pauseVideoProgrammatically(video, \"story-ui-pause\");\n      }\n      return;\n    }\n    if (!overlay || document.hidden || storyReplyComposerActive()) return;\n    if (video && state.storyPausedVideoWasPlaying) {\n      state.storyPausedVideoWasPlaying = !1;\n      if (window.DSDGMOR && typeof window.DSDGMOR.playWhenReady === \"function\")\r\n        window.DSDGMOR.playWhenReady(video, {\r\n          owner: \"LaunchStoryViewer\",\r\n          surface: \"story-viewer\",\r\n        });\r\n      else {\r\n        var playResult = video.play();\r\n        playResult && typeof playResult.catch === \"function\" && playResult.catch(function () {});\r\n      }\r\n    }\n    rescheduleActiveStoryAdvance(250);\n  }\n  function storyReplyComposerActive() {\r\n    var active = document.activeElement;\r\n    return !!(\r\n      active &&\r\n      active.closest &&\r\n      active.closest(\"[data-dsd-story-message-form]\")\r\n    );\r\n  }\r\n  function rescheduleActiveStoryAdvance(delayMs) {\r\n    (clearStoryAdvanceTimer(),\r\n      (storyAdvanceTimer = window.setTimeout(\r\n        function () {\r\n          var canvas = qs(\"[data-dsd-story-fullscreen-canvas]\"),\r\n            active =\r\n              visibleStories().filter(function (item) {\r\n                return (item.storyId || item.id || \"\") === state.activeStoryId;\r\n              })[0] || null;\r\n          active && canvas && setupStoryAdvance(active, canvas);\r\n        },\r\n        Math.max(600, Number(delayMs || 1200) || 1200),\r\n      )));\r\n  }\r\n  function setupStoryAdvance(story, canvas) {\r\n    if ((clearStoryAdvanceTimer(), !(!story || !canvas))) {\r\n      if (storyReplyComposerActive() || storyPausedByUi()) {\n        rescheduleActiveStoryAdvance(1200);\r\n        return;\r\n      }\r\n      var video = qs(\"video\", canvas),\r\n        expectedVideo =\r\n          safeMediaItemsForRecord(story).some(function (item) {\r\n            return (\r\n              String(\r\n                (item &&\r\n                  (item.kind ||\r\n                    item.mediaKind ||\r\n                    item.contentType ||\r\n                    item.content_type ||\r\n                    \"\")) ||\r\n                  \"\",\r\n              )\r\n                .toLowerCase()\r\n                .indexOf(\"video\") !== -1\r\n            );\r\n          }) || !!qs('[data-dsd-media-kind=\"video\"]', canvas);\r\n      if (!video && expectedVideo) {\r\n        var pendingStoryId = story.storyId || story.id || \"\";\r\n        storyAdvanceTimer = window.setTimeout(function () {\r\n          (!pendingStoryId || state.activeStoryId === pendingStoryId) &&\r\n            setupStoryAdvance(story, canvas);\r\n        }, 1200);\r\n        return;\r\n      }\r\n      if (video) {\r\n        var sameActiveStory = function () {\r\n            return (\r\n              (!activeStoryToken || state.activeStoryId === activeStoryToken) &&\r\n              !!(video && document.body.contains(video))\r\n            );\r\n          },\r\n          computedVideoFallbackMs = function () {\r\n            var duration = Number(video.duration || 0);\r\n            return duration && isFinite(duration)\r\n              ? Math.min(24e4, Math.max(12e3, Math.ceil(duration * 1e3) + 2200))\r\n              : fallbackDurationMs;\r\n          },\r\n          scheduleStoryVideoFallback = function (delayMs) {\r\n            (storyAdvanceTimer && window.clearTimeout(storyAdvanceTimer),\r\n              (storyAdvanceTimer = window.setTimeout(\r\n                function () {\r\n                  if (!(storyVideoEnded || !sameActiveStory())) {\r\n                    if (storyReplyComposerActive() || storyPausedByUi())\n                      return scheduleStoryVideoFallback(1200);\r\n                    if (video.readyState < 2)\r\n                      return scheduleStoryVideoFallback(1400);\r\n                    var duration = Number(video.duration || 0);\r\n                    if (\r\n                      duration &&\r\n                      video.currentTime < Math.max(0.75, duration - 0.35)\r\n                    )\r\n                      return scheduleStoryVideoFallback(\r\n                        Math.min(\r\n                          12e3,\r\n                          Math.max(\r\n                            1200,\r\n                            Math.ceil((duration - video.currentTime) * 1e3) +\r\n                              800,\r\n                          ),\r\n                        ),\r\n                      );\r\n                    video.ended ||\r\n                    (duration &&\r\n                      video.currentTime >= Math.max(0.75, duration - 0.35))\r\n                      ? stepStory(1)\r\n                      : scheduleStoryVideoFallback(2500);\r\n                  }\r\n                },\r\n                Math.max(\r\n                  900,\r\n                  Number(delayMs || computedVideoFallbackMs()) ||\r\n                    fallbackDurationMs,\r\n                ),\r\n              )));\r\n          };\r\n        ((video.autoplay = !0),\r\n          (video.muted = currentVideoMutedPreference()),\r\n          (video.playsInline = !0),\r\n          video.muted\r\n            ? video.setAttribute(\"muted\", \"\")\r\n            : video.removeAttribute(\"muted\"),\r\n          video.setAttribute(\"playsinline\", \"\"),\r\n          video.setAttribute(\"data-dsd-media-owner\", \"LaunchStoryViewer\"),\r\n          video.setAttribute(\"data-dsd-media-surface\", \"story-viewer\"));\r\n        var storyVideoStartedAt = 0,\r\n          storyVideoEnded = !1,\r\n          activeStoryToken = story.storyId || story.id || \"\",\r\n          fallbackDurationMs = 45e3;\r\n        if (\r\n          (video.addEventListener(\r\n            \"loadedmetadata\",\r\n            function () {\r\n              ((fallbackDurationMs = computedVideoFallbackMs()),\r\n                scheduleStoryVideoFallback(fallbackDurationMs));\r\n            },\r\n            { once: !0 },\r\n          ),\r\n          video.addEventListener(\n            \"playing\",\n            function () {\n              storyVideoStartedAt = Date.now();\n              sameActiveStory() && recordStoryWatch(story, \"video-playing\");\n            },\n            { once: !0 },\n          ),\r\n          video.addEventListener(\r\n            \"ended\",\r\n            function () {\r\n              if (video.dataset.dsdStoryEndedAdvanceHandled) return;\r\n              ((video.dataset.dsdStoryEndedAdvanceHandled = \"true\"),\r\n                (storyVideoEnded = !0),\r\n                clearStoryAdvanceTimer());\r\n              function advanceWhenStoryUiReady() {\r\n                if (!sameActiveStory()) return;\r\n                if (storyReplyComposerActive() || storyPausedByUi()) {\r\n                  storyAdvanceTimer = window.setTimeout(\r\n                    advanceWhenStoryUiReady,\r\n                    500,\r\n                  );\r\n                  return;\r\n                }\r\n                ((video.dataset.dsdStoryEndedAdvanceHandled = \"complete\"),\r\n                  stepStory(1));\r\n              }\r\n              advanceWhenStoryUiReady();\r\n            },\r\n            { once: !0 },\r\n          ),\r\n          window.DSDGMOR &&\r\n            typeof window.DSDGMOR.register == \"function\" &&\r\n            window.DSDGMOR.register(video, {\r\n              owner: \"LaunchStoryViewer\",\r\n              surface: \"story-viewer\",\r\n            }),\r\n          window.DSDGMOR && typeof window.DSDGMOR.playWhenReady == \"function\")\r\n        )\r\n          window.DSDGMOR.playWhenReady(video, {\r\n            owner: \"LaunchStoryViewer\",\r\n            surface: \"story-viewer\",\r\n          });\r\n        else if (video.autoplay) {\r\n          var attempt = video.play();\r\n          attempt &&\r\n            typeof attempt.catch == \"function\" &&\r\n            attempt.catch(function () {});\r\n        }\r\n        scheduleStoryVideoFallback(\r\n          video.readyState >= 1 ? computedVideoFallbackMs() : 45e3,\r\n        );\r\n        return;\r\n      }\r\n      var image = qs(\"img\", canvas),\n        expectedImage = safeMediaItemsForRecord(story).some(function (item) {\n          var kind = String(\n            (item &&\n              (item.kind ||\n                item.mediaKind ||\n                item.contentType ||\n                item.content_type ||\n                \"\")) ||\n              \"\",\n          ).toLowerCase();\n          return !kind || kind.indexOf(\"image\") !== -1;\n        }),\n        imageStoryToken = story.storyId || story.id || \"\";\n      if (!image && expectedImage) {\n        storyAdvanceTimer = window.setTimeout(function () {\n          (!imageStoryToken || state.activeStoryId === imageStoryToken) &&\n            setupStoryAdvance(story, canvas);\n        }, 700);\n        return;\n      }\n      function scheduleImageAdvance(delayMs) {\n        clearStoryAdvanceTimer();\n        storyAdvanceTimer = window.setTimeout(function () {\n          if (\n            (imageStoryToken && state.activeStoryId !== imageStoryToken) ||\n            !document.body.contains(canvas)\n          )\n            return;\n          if (\n            (document.visibilityState && document.visibilityState !== \"visible\") ||\n            storyReplyComposerActive() || storyPausedByUi()\n          ) {\n            scheduleImageAdvance(1000);\n            return;\n          }\n          stepStory(1);\n        }, Math.max(700, Number(delayMs || 5e3) || 5e3));\n      }\n      if (image && !(image.complete && Number(image.naturalWidth || 0) > 0)) {\n        image.addEventListener(\n          \"load\",\n          function () {\n            if (!imageStoryToken || state.activeStoryId === imageStoryToken) {\n              recordStoryWatch(story, \"image-loaded\");\n              scheduleImageAdvance(5e3);\n            }\n          },\n          { once: !0 },\n        );\n        return;\n      }\n      image && image.complete && Number(image.naturalWidth || 0) > 0 &&\n        recordStoryWatch(story, \"image-ready\");\n      scheduleImageAdvance(5e3);\n    }\r\n  }\r\n  function syncStoryRouteParam(storyId) {\r\n    try {\r\n      if (\r\n        !storyId ||\r\n        !/\\/pages\\/stories(?:$|[/?#])/.test(\r\n          window.location.pathname + window.location.search,\r\n        ) ||\r\n        !window.history ||\r\n        !window.history.replaceState\r\n      )\r\n        return;\r\n      var url = new URL(window.location.href);\r\n      (url.searchParams.set(\"story\", storyId),\r\n        window.history.replaceState(\r\n          {},\r\n          \"\",\r\n          url.pathname + url.search + url.hash,\r\n        ),\r\n        (state.lastRequestedStoryId = storyId));\r\n    } catch (e) {}\r\n  }\r\n  function stepStory(delta) {\r\n    var visible = surfaceStories();\r\n    if ((visible.length || (visible = visibleStories()), !!visible.length)) {\r\n      var current = visible\r\n        .map(function (s) {\r\n          return s.storyId || s.id || \"\";\r\n        })\r\n        .indexOf(state.activeStoryId);\r\n      current < 0 && (current = 0);\r\n      var next = (current + delta + visible.length) % visible.length;\r\n      ((state.storySelectionExplicit = !0),\r\n        (state.activeStoryId = visible[next].storyId || visible[next].id || \"\"),\r\n        syncStoryRouteParam(state.activeStoryId),\r\n        renderStories());\r\n    }\r\n  }\r\n  function ensureStoryComposerModal() {\r\n    var root = canonicalOverlayRoot(),\r\n      layer = qs(\"[data-dsd-story-composer-layer]\", root);\r\n    return (\r\n      layer ||\r\n        ((layer = document.createElement(\"div\")),\r\n        (layer.className =\n          \"dsd-up315__modal-layer dsd-composer-modal-layer dsd-story-composer-layer\"),\n        layer.setAttribute(\"data-dsd-story-composer-layer\", \"true\"),\r\n        layer.setAttribute(\r\n          \"data-dsd-owner\",\r\n          \"LaunchSocialActivation.StoryComposer\",\r\n        ),\r\n        (layer.hidden = !0),\r\n        (layer.innerHTML =\r\n          '<div class=\"dsd-up315__modal dsd-composer-modal-shell\" role=\"dialog\" aria-modal=\"true\" aria-label=\"Create story\" tabindex=\"-1\"><header><strong>Create story</strong><button type=\"button\" data-dsd-story-composer-close aria-label=\"Close story composer\">&times;</button></header><section class=\"dsd-up315__modal-panel is-active\"><div class=\"dsd-up315__modal-card\"><form class=\"dsd-canonical-composer dsd-story-composer\" data-dsd-story-form data-dsd-global-story-composer data-dsd-canonical-compact-composer><div class=\"dsd-up315__composer-head\">' +\n          currentComposerAvatarHTML() +\r\n          \"<div><strong>\" +\r\n          html(composerDisplayName()) +\r\n          \"</strong>\" +\r\n          composerHandleHTML() +\r\n          '</div></div><textarea name=\"body\" rows=\"2\" maxlength=\"' +\r\n          html(MAX.story) +\r\n          '\" aria-label=\"Story text\" placeholder=\"Share a story\"></textarea><div class=\"dsd-composer-media-actions\" aria-label=\"Attach story media\">' +\r\n          composerMixedMediaButton(!1, \"Add story media\", 1) +\n          composerPolicyTools(\"Story\") +\r\n          '</div><div class=\"dsd-up315__composer-foot\">' +\r\n          composerCountHTML(MAX.story) +\r\n          '<button type=\"submit\">Create story</button></div></form></div></section></div>'),\r\n        layer.addEventListener(\"click\", function (ev) {\r\n          (ev.target === layer ||\r\n            ev.target.closest(\"[data-dsd-story-composer-close]\")) &&\r\n            closeStoryComposer();\r\n        }),\r\n        root.appendChild(layer)),\r\n      syncComposerIdentity(layer),\n      hydrateAvatarMedia(layer),\n      bindSocialDraftRecovery(qs(\"[data-dsd-story-form]\", layer)),\n      bindPostMentionAutocomplete(layer),\n      refreshPublicationControls(layer),\r\n      updateComposerCounters(layer),\r\n      updateAllComposerMediaControls(layer),\r\n      syncRestrictedActionControls(layer),\r\n      lockComposerModalLayout(layer),\r\n      layer\r\n    );\r\n  }\r\n  function closeStoryComposer() {\n    var layer = qs(\"[data-dsd-story-composer-layer]\");\n    var form = layer && qs(\"[data-dsd-story-form]\", layer);\n    form && persistSocialDraft(form);\n    (layer && (layer.hidden = !0),\r\n      document.documentElement.classList.remove(\"dsd-story-composer-open\"),\r\n      scheduleGlobalOverlayStateSync());\r\n  }\r\n  function lockComposerModalLayout(layer) {\r\n    !layer ||\r\n      !layer.querySelectorAll ||\r\n      (layer.style.setProperty(\"width\", \"100vw\", \"important\"),\r\n      layer.style.setProperty(\"max-width\", \"100vw\", \"important\"),\r\n      layer.style.setProperty(\"overflow-x\", \"hidden\", \"important\"),\r\n      qsa(\r\n        \".dsd-up315__modal, .dsd-up315__modal-panel, .dsd-up315__modal-card, form\",\r\n        layer,\r\n      ).forEach(function (node) {\r\n        (node.style.setProperty(\"box-sizing\", \"border-box\", \"important\"),\r\n          node.style.setProperty(\"min-width\", \"0\", \"important\"),\r\n          node.style.setProperty(\"max-width\", \"100%\", \"important\"),\r\n          node.style.setProperty(\"overflow-x\", \"hidden\", \"important\"));\r\n      }),\r\n      qsa(\".dsd-up315__modal-card\", layer).forEach(function (node) {\r\n        node.style.setProperty(\"padding\", \"8px\", \"important\");\r\n      }),\r\n      qsa(\".dsd-up315__modal\", layer).forEach(function (node) {\r\n        (node.style.setProperty(\r\n          \"width\",\r\n          \"min(380px, calc(100vw - 28px))\",\r\n          \"important\",\r\n        ),\r\n          node.style.setProperty(\r\n            \"max-width\",\r\n            \"calc(100vw - 28px)\",\r\n            \"important\",\r\n          ),\r\n          node.style.setProperty(\"margin-inline\", \"auto\", \"important\"),\r\n          node.style.setProperty(\n            \"background\",\n            \"rgba(5,4,9,.98)\",\n            \"important\",\n          ));\n      }),\r\n      qsa(\".dsd-up315__composer-head\", layer).forEach(function (node) {\r\n        (node.style.setProperty(\"display\", \"flex\", \"important\"),\r\n          node.style.setProperty(\"align-items\", \"center\", \"important\"),\r\n          node.style.setProperty(\"gap\", \"8px\", \"important\"),\r\n          node.style.setProperty(\"min-height\", \"32px\", \"important\"),\r\n          node.style.setProperty(\"margin\", \"0\", \"important\"));\r\n      }),\r\n      qsa(\".dsd-up315__mini-avatar\", layer).forEach(function (node) {\r\n        (node.style.setProperty(\"width\", \"30px\", \"important\"),\r\n          node.style.setProperty(\"height\", \"30px\", \"important\"),\r\n          node.style.setProperty(\"min-width\", \"30px\", \"important\"));\r\n      }),\r\n      qsa('textarea[name=\"body\"]', layer).forEach(function (node) {\r\n        (node.style.setProperty(\"min-height\", \"42px\", \"important\"),\r\n          node.style.setProperty(\"max-height\", \"120px\", \"important\"),\r\n          node.style.setProperty(\"resize\", \"vertical\", \"important\"));\r\n      }),\r\n      qsa(\".dsd-composer-media-actions\", layer).forEach(function (node) {\r\n        (node.style.setProperty(\"display\", \"grid\", \"important\"),\r\n          node.style.setProperty(\r\n            \"grid-template-columns\",\r\n            \"34px minmax(0, 1fr)\",\n            \"important\",\r\n          ),\r\n          node.style.setProperty(\"align-items\", \"center\", \"important\"),\r\n          node.style.setProperty(\"gap\", \"6px\", \"important\"),\r\n          node.style.setProperty(\"width\", \"100%\", \"important\"),\r\n          node.style.setProperty(\"max-width\", \"100%\", \"important\"));\r\n      }),\r\n      qsa(\".dsd-up315__composer-foot\", layer).forEach(function (node) {\r\n        (node.style.setProperty(\"display\", \"grid\", \"important\"),\r\n          node.style.setProperty(\r\n            \"grid-template-columns\",\r\n            \"minmax(0, 1fr) auto\",\r\n            \"important\",\r\n          ),\r\n          node.style.setProperty(\"align-items\", \"center\", \"important\"),\r\n          node.style.setProperty(\"gap\", \"8px\", \"important\"),\r\n          node.style.setProperty(\"margin\", \"0\", \"important\"));\r\n      }),\r\n      qsa(\".dsd-composer-media-button\", layer).forEach(function (node) {\r\n        (node.style.setProperty(\"width\", \"34px\", \"important\"),\r\n          node.style.setProperty(\"height\", \"34px\", \"important\"),\r\n          node.style.setProperty(\"min-width\", \"34px\", \"important\"),\r\n          node.style.setProperty(\"max-width\", \"34px\", \"important\"));\r\n      }),\r\n      window.matchMedia &&\r\n        window.matchMedia(\"(max-width: 430px)\").matches &&\r\n        qsa(\".dsd-composer-policy-tools\", layer).forEach(function (node) {\r\n          (node.style.setProperty(\"grid-column\", \"1 / -1\", \"important\"),\r\n            node.style.setProperty(\"width\", \"100%\", \"important\"));\r\n        }));\r\n  }\r\n  function ensureGlobalPostComposerModal() {\r\n    var root = canonicalOverlayRoot(),\r\n      layer = qs(\"[data-dsd-global-post-composer-layer]\", root);\r\n    return (\r\n      layer ||\r\n        ((layer = document.createElement(\"div\")),\r\n        (layer.className =\n          \"dsd-up315__modal-layer dsd-composer-modal-layer dsd-global-post-composer-layer\"),\n        layer.setAttribute(\"data-dsd-global-post-composer-layer\", \"true\"),\r\n        layer.setAttribute(\r\n          \"data-dsd-owner\",\r\n          \"LaunchSocialActivation.GlobalPostComposer\",\r\n        ),\r\n        (layer.hidden = !0),\r\n        (layer.innerHTML =\r\n          '<div class=\"dsd-up315__modal dsd-composer-modal-shell\" role=\"dialog\" aria-modal=\"true\" aria-label=\"Create post\" tabindex=\"-1\"><header><strong>Create post</strong><button type=\"button\" data-dsd-global-post-composer-close aria-label=\"Close post composer\">&times;</button></header><section class=\"dsd-up315__modal-panel is-active\"><div class=\"dsd-up315__modal-card\"><form class=\"dsd-post-composer dsd-canonical-composer dsd-global-post-composer\" data-dsd-global-post-composer data-dsd-canonical-composer data-dsd-canonical-compact-composer><div class=\"dsd-up315__composer-head\">' +\n          currentComposerAvatarHTML() +\r\n          \"<div><strong>\" +\r\n          html(composerDisplayName()) +\r\n          \"</strong>\" +\r\n          composerHandleHTML() +\r\n          '</div></div><textarea name=\"body\" rows=\"1\" maxlength=\"' +\r\n          html(MAX.body) +\r\n          '\" aria-label=\"Post text\" placeholder=\"What is happening?\"></textarea>' +\n          postPollComposerHTML() +\n          '<div class=\"dsd-up315__composer-tools dsd-composer-media-actions\" aria-label=\"Attach media\">' +\n          composerMixedMediaButton(!0, \"Add post media\", 4) +\r\n          composerPolicyTools(\"Post\") +\r\n          '</div><div class=\"dsd-up315__composer-foot\">' +\r\n          composerCountHTML(MAX.body) +\r\n          '<button type=\"submit\">Post</button></div></form></div></section></div>'),\r\n        layer.addEventListener(\"click\", function (ev) {\r\n          (ev.target === layer ||\r\n            ev.target.closest(\"[data-dsd-global-post-composer-close]\")) &&\r\n            closeGlobalPostComposer();\r\n        }),\r\n        root.appendChild(layer)),\r\n      syncComposerIdentity(layer),\n      hydrateAvatarMedia(layer),\n      bindSocialDraftRecovery(qs(\"[data-dsd-global-post-composer]\", layer)),\n      refreshPublicationControls(layer),\n      updateComposerCounters(layer),\r\n      updateAllComposerMediaControls(layer),\r\n      lockComposerModalLayout(layer),\r\n      layer\r\n    );\r\n  }\r\n  function closeGlobalPostComposer() {\n    var layer = qs(\"[data-dsd-global-post-composer-layer]\");\n    var form = layer && qs(\"[data-dsd-global-post-composer]\", layer);\n    form && persistSocialDraft(form);\n    (layer && (layer.hidden = !0),\r\n      document.documentElement.classList.remove(\r\n        \"dsd-global-post-composer-open\",\r\n      ),\r\n      scheduleGlobalOverlayStateSync());\r\n  }\r\n  function openGlobalPostComposer() {\n    if (requireActiveProfile(\"create posts\")) {\r\n      closeStoryComposer();\r\n      var layer = ensureGlobalPostComposerModal();\r\n      ((layer.hidden = !1),\r\n        document.documentElement.classList.add(\"dsd-global-post-composer-open\"),\r\n        scheduleGlobalOverlayStateSync());\r\n      var field = qs('textarea[name=\"body\"]', layer);\r\n      window.setTimeout(function () {\r\n        field && field.focus();\r\n      }, 0);\r\n    }\r\n  }\r\n  function markConversationRead(conversationId) {\n    if (!conversationId || !hasCustomer()) return Promise.resolve(null);\n    var conversation = conversationById(conversationId) || {},\n      canonicalUnreadCount = conversationUnreadCount(conversation),\n      conversationIds = [\r\n        conversationId,\r\n        conversation.conversationId,\r\n        conversation.id,\r\n        conversation.supabaseConversationId,\r\n        conversation.legacyConversationId,\r\n        conversation.legacy_conversation_id,\r\n      ]\r\n        .map(function (value) {\r\n          return String(value || \"\").trim();\r\n        })\r\n        .filter(function (value, index, values) {\r\n          return value && values.indexOf(value) === index;\r\n        }),\r\n      unreadNotifications = (state.notifications || []).filter(function (item) {\r\n        return (\r\n          item &&\r\n          !item.read &&\r\n          notificationIsMessageItem(item) &&\r\n          conversationIds.indexOf(\r\n            String(notificationConversationToken(item) || \"\").trim(),\r\n          ) !== -1\r\n        );\r\n      });\r\n    ((state.notifications = (state.notifications || []).map(function (item) {\r\n      return unreadNotifications.indexOf(item) !== -1\r\n        ? Object.assign({}, item, { read: !0 })\r\n        : item;\r\n    })),\r\n      (state.conversations = state.conversations.map(function (item) {\r\n        return conversationIds.indexOf(\r\n          String(item.conversationId || item.id || \"\").trim(),\r\n        ) !== -1\r\n          ? Object.assign({}, item, {\r\n              unreadCount: 0,\r\n              unread: 0,\r\n              unread_count: 0,\r\n            })\r\n          : item;\r\n      })),\r\n      state.inboxCounts.ready && canonicalUnreadCount\n        ? (state.inboxCounts.messageUnread = Math.max(\n            0,\n            state.inboxCounts.messageUnread - canonicalUnreadCount,\n          ))\n        : null,\r\n      updateMessageDockBadge(state.conversations),\n      renderMessages());\n    return premiumMessageActionViaProxy({\n      action: \"mark_conversation_read\",\n      conversationId: conversationId,\n      readReceiptsEnabled: currentProfileAllowsMessageReadReceipts(),\n    })\n      .then(function (result) {\n        if (result && Number(result.receiptCount || 0) > 0) {\n          var receiptMessage = (state.messagesByConversation[conversationId] || [])\n            .filter(function (message) {\n              return !identityMatchesCurrent(\n                message.senderUid || message.sender_user_id,\n                message.senderProfileKey || message.sender_profile_key,\n              );\n            })\n            .slice(-1)[0];\n          receiptMessage &&\n            broadcastMessageChangeToParticipants(\n              conversationId,\n              receiptMessage.messageId || receiptMessage.id || \"\",\n              \"read_receipt\",\n            );\n        }\n        claim(\"message-read:server-authoritative\", {\n          conversationId: conversationId,\n          receiptCount: Number((result && result.receiptCount) || 0),\n          notificationCount: Number((result && result.notificationCount) || 0),\n        });\n        return refreshInboxCounts(\"conversation-read\").then(function () {\n          return result || { conversationId: conversationId };\n        });\n      })\n      .catch(function (error) {\n        return (\n          queueDraft(\n            \"message-read-server-authoritative\",\n            { conversationId: conversationId },\n            error,\n          ),\n          hydrateConversationMessages(conversationId, { force: !0 }),\n          null\n        );\n      });\n  }\r\n  function openStoryOverlay(id) {\r\n    var storyId = String(id || state.activeStoryId || \"\").trim();\r\n    if (!storyId) {\r\n      var candidates = visibleStories(),\r\n        firstStory =\r\n          candidates.filter(function (item) {\r\n            return !isRestrictedShellRecord(item);\r\n          })[0] ||\r\n          candidates[0] ||\r\n          {};\r\n      storyId = String(firstStory.storyId || firstStory.id || \"\").trim();\r\n    }\r\n    (storyId &&\r\n      ((state.activeStoryId = storyId),\r\n      (state.storySelectionExplicit = !0),\r\n      syncStoryRouteParam(storyId)),\r\n      renderStories());\r\n    var viewer = ensureStoryOverlayViewer();\r\n    renderStories();\r\n    try {\r\n      if (\r\n        storyId &&\r\n        /\\/pages\\/stories(?:$|[/?#])/.test(\r\n          window.location.pathname + window.location.search,\r\n        ) &&\r\n        window.history &&\r\n        window.history.replaceState\r\n      ) {\r\n        var url = new URL(window.location.href);\r\n        (url.searchParams.set(\"story\", storyId),\r\n          window.history.replaceState(\r\n            {},\r\n            \"\",\r\n            url.pathname + url.search + url.hash,\r\n          ));\r\n      }\r\n    } catch (e) {}\r\n  }\r\n  function openStoryComposer(forceLayer) {\r\n    closeGlobalPostComposer();\r\n    var layer = ensureStoryComposerModal();\r\n    ((layer.hidden = !1),\r\n      document.documentElement.classList.add(\"dsd-story-composer-open\"),\r\n      scheduleGlobalOverlayStateSync());\r\n    var field = qs(\"textarea, input, select\", layer);\r\n    window.setTimeout(function () {\r\n      field && field.focus();\r\n    }, 0);\r\n  }\r\n  function moderationQueue() {\r\n    var queue = (state.moderationQueueItems || []).slice();\n    if (canModerate()) {\r\n      var derived = [];\r\n      (state.posts.forEach(function (post) {\r\n        var postState =\r\n          (post &&\r\n            (post.status ||\r\n              post.state ||\r\n              (post.moderation && post.moderation.state))) ||\r\n          \"\";\r\n        [\"reported\", \"hidden\", \"rejected\", \"removed\"].indexOf(postState) !==\r\n          -1 &&\r\n          derived.push(\r\n            Object.assign({}, post, {\r\n              queueItemId: post.postId || post.id,\r\n              surface: \"post\",\r\n              sourcePath: \"posts/\" + (post.postId || post.id),\r\n              state: postState,\r\n              preview: post.body || post.caption || \"\",\r\n            }),\r\n          );\r\n      }),\r\n        state.stories.forEach(function (story) {\r\n          var storyState =\r\n            (story &&\r\n              (story.status ||\r\n                story.state ||\r\n                (story.moderation && story.moderation.state))) ||\r\n            \"\";\r\n          [\"reported\", \"hidden\", \"rejected\", \"removed\"].indexOf(storyState) !==\r\n            -1 &&\r\n            derived.push(\r\n              Object.assign({}, story, {\r\n                queueItemId: story.storyId || story.id,\r\n                surface: \"story\",\r\n                sourcePath: \"stories/\" + (story.storyId || story.id),\r\n                state: storyState,\r\n                preview: story.body || story.caption || \"\",\r\n              }),\r\n            );\r\n        }),\r\n        Object.keys(state.commentsByPost || {}).forEach(function (postId) {\r\n          (state.commentsByPost[postId] || []).forEach(function (comment) {\r\n            var commentState =\r\n              (comment &&\r\n                (comment.status ||\r\n                  comment.state ||\r\n                  (comment.moderation && comment.moderation.state))) ||\r\n              \"\";\r\n            if (\r\n              [\"reported\", \"hidden\", \"rejected\", \"removed\"].indexOf(\r\n                commentState,\r\n              ) !== -1\r\n            ) {\r\n              var commentId = commentKey(comment);\r\n              derived.push(\r\n                Object.assign({}, comment, {\r\n                  queueItemId: postId + \":\" + commentId,\r\n                  surface: \"comment\",\r\n                  parentPostId: postId,\r\n                  sourcePath: \"posts/\" + postId + \"/comments/\" + commentId,\r\n                  state: commentState,\r\n                  preview: comment.body || comment.text || \"\",\r\n                }),\r\n              );\r\n            }\r\n          });\r\n        }),\r\n        (queue = mergeByKey(queue, derived, [\r\n          \"queueItemId\",\r\n          \"postId\",\r\n          \"storyId\",\r\n          \"id\",\r\n        ])));\r\n    }\r\n    return queue\r\n      .map(function (item) {\r\n        var id = item.postId || item.queueItemId || item.id || \"\",\r\n          override = id && state.localPostStateOverrides[id];\r\n        return override\r\n          ? Object.assign({}, item, override, {\r\n              state: override.status || override.state || item.state,\r\n              moderation: Object.assign(\r\n                {},\r\n                item.moderation || {},\r\n                override.moderation || {},\r\n              ),\r\n            })\r\n          : item;\r\n      })\r\n      .filter(function (item) {\r\n        var itemState =\r\n          item.state ||\r\n          item.status ||\r\n          (item.moderation && item.moderation.state) ||\r\n          \"pending\";\r\n        return (\r\n          [\"reported\", \"hidden\", \"rejected\", \"removed\"].indexOf(itemState) !==\r\n          -1\r\n        );\r\n      });\r\n  }\r\n  function moderationQueueActions(item, id) {\r\n    var surface = item.surface || \"\",\r\n      primary = \"\",\r\n      source = item.sourcePath || item.firestorePath || \"\",\r\n      commentMatch = String(source || \"\").match(\r\n        /^posts\\/([^/]+)\\/comments\\/([^/]+)$/,\r\n      ),\r\n      commentPostId =\r\n        item.parentPostId || (commentMatch ? commentMatch[1] : \"\"),\r\n      commentTargetId = commentMatch ? commentMatch[2] : id,\r\n      directPost =\r\n        (item.postId && item.postId === id) || source === \"posts/\" + id,\r\n      directStory =\r\n        (item.storyId && item.storyId === id) || source === \"stories/\" + id;\r\n    if (surface === \"comment\" && commentPostId && commentTargetId)\r\n      primary =\r\n        '<button type=\"button\" data-dsd-approve-comment=\"' +\r\n        html(commentTargetId) +\r\n        '\" data-post-id=\"' +\r\n        html(commentPostId) +\r\n        '\">Approve</button><button type=\"button\" data-dsd-hide-comment=\"' +\r\n        html(commentTargetId) +\r\n        '\" data-post-id=\"' +\r\n        html(commentPostId) +\r\n        '\">Hide</button><button type=\"button\" data-dsd-reject-comment=\"' +\r\n        html(commentTargetId) +\r\n        '\" data-post-id=\"' +\r\n        html(commentPostId) +\r\n        '\">Reject</button><button type=\"button\" data-dsd-restore-comment=\"' +\r\n        html(commentTargetId) +\r\n        '\" data-post-id=\"' +\r\n        html(commentPostId) +\r\n        '\">Restore</button>';\r\n    else {\r\n      if (surface === \"safetyReport\")\r\n        return (\r\n          '<button type=\"button\" data-dsd-archive-safety-report=\"' +\r\n          html(id) +\r\n          '\">Resolve report</button><button type=\"button\" data-dsd-hide-queue=\"' +\r\n          html(id) +\r\n          '\">Hide</button><button type=\"button\" data-dsd-reject-queue=\"' +\r\n          html(id) +\r\n          '\">Reject</button>'\r\n        );\r\n      directStory\r\n        ? (primary =\r\n            '<button type=\"button\" data-dsd-approve-story=\"' +\r\n            html(id) +\r\n            '\">Approve</button><button type=\"button\" data-dsd-hide-story=\"' +\r\n            html(id) +\r\n            '\">Hide</button><button type=\"button\" data-dsd-reject-story=\"' +\r\n            html(id) +\r\n            '\">Reject</button><button type=\"button\" data-dsd-restore-story=\"' +\r\n            html(id) +\r\n            '\">Restore</button>')\r\n        : directPost || item.postId\r\n          ? (primary =\r\n              '<button type=\"button\" data-dsd-approve-post=\"' +\r\n              html(id) +\r\n              '\">Approve</button><button type=\"button\" data-dsd-hide-post=\"' +\r\n              html(id) +\r\n              '\">Hide</button><button type=\"button\" data-dsd-reject-post=\"' +\r\n              html(id) +\r\n              '\">Reject</button>')\r\n          : (primary =\r\n              '<button type=\"button\" data-dsd-resolve-queue=\"' +\r\n              html(id) +\r\n              '\">Approve</button><button type=\"button\" data-dsd-hide-queue=\"' +\r\n              html(id) +\r\n              '\">Hide</button><button type=\"button\" data-dsd-reject-queue=\"' +\r\n              html(id) +\r\n              '\">Reject</button>');\r\n    }\r\n    return (\r\n      primary +\r\n      '<button type=\"button\" data-dsd-restore-queue=\"' +\r\n      html(id) +\r\n      '\">Restore</button><button type=\"button\" data-dsd-classify-queue=\"mature\" data-queue-id=\"' +\r\n      html(id) +\r\n      '\">Mature</button><button type=\"button\" data-dsd-classify-queue=\"explicit\" data-queue-id=\"' +\r\n      html(id) +\r\n      '\">Explicit</button><button type=\"button\" data-dsd-classify-queue=\"gated\" data-queue-id=\"' +\r\n      html(id) +\r\n      '\">Gated</button>'\r\n    );\r\n  }\r\n  function moderationSurface(item) {\r\n    var surface = item.surface || (item.postId ? \"post\" : \"\"),\r\n      path = item.sourcePath || item.firestorePath || \"\",\r\n      action = String(item.action || \"\").toLowerCase();\r\n    return (\r\n      item.targetId && action === \"report-post\" && (surface = \"post\"),\r\n      item.targetId && action === \"report-story\" && (surface = \"story\"),\r\n      !surface &&\r\n        /^posts\\/[^/]+\\/comments\\//.test(path) &&\r\n        (surface = \"comment\"),\r\n      !surface && /^posts\\//.test(path) && (surface = \"post\"),\r\n      !surface &&\r\n        /^(profiles|publicProfiles)\\//.test(path) &&\r\n        (surface = \"profile\"),\r\n      !surface && /^safetyReports\\//.test(path) && (surface = \"safetyReport\"),\r\n      surface || \"queue\"\r\n    );\r\n  }\r\n  function moderationSourceRecord(item, queueItemId) {\r\n    var source = queueSourcePath(\r\n        item || {},\r\n        queueItemId ||\r\n          (item && (item.queueItemId || item.postId || item.id)) ||\r\n          \"\",\r\n      ),\r\n      match;\r\n    return (match = String(source || \"\").match(/^posts\\/([^/]+)$/))\r\n      ? localPostById(match[1]) || {}\r\n      : (match = String(source || \"\").match(/^stories\\/([^/]+)$/))\r\n        ? state.stories.filter(function (story) {\r\n            return (story.storyId || story.id) === match[1];\r\n          })[0] || {}\r\n        : (match = String(source || \"\").match(\r\n              /^posts\\/([^/]+)\\/comments\\/([^/]+)$/,\r\n            ))\r\n          ? (state.commentsByPost[match[1]] || []).filter(function (comment) {\r\n              return commentKey(comment) === match[2];\r\n            })[0] || {}\r\n          : scopedModerationSource(source)\r\n            ? item || {}\r\n            : {};\r\n  }\r\n  function moderationContext(item) {\r\n    item = item || {};\r\n    var id = item.postId || item.storyId || item.queueItemId || item.id || \"\",\r\n      target = moderationSourceRecord(item, id) || {},\r\n      source = queueSourcePath(item, id),\r\n      surface = moderationSurface(item),\r\n      merged = Object.assign({}, item, target),\r\n      preview =\r\n        target.body ||\r\n        target.caption ||\r\n        target.title ||\r\n        target.name ||\r\n        item.preview ||\r\n        item.body ||\r\n        item.sourcePath ||\r\n        id,\r\n      mediaCount = (target.media || item.media || []).length,\r\n      author =\r\n        merged.authorDisplayName ||\r\n        merged.authorProfileKey ||\r\n        merged.ownerProfileKey ||\r\n        merged.reporterProfileKey ||\r\n        merged.authorUid ||\r\n        merged.ownerUid ||\r\n        \"\",\r\n      currentState =\r\n        merged.status ||\r\n        item.state ||\r\n        (merged.moderation && merged.moderation.state) ||\r\n        \"pending\",\r\n      context = [];\r\n    return (\r\n      author && context.push(\"Author: \" + author),\r\n      context.push(\"Path: \" + (source || id)),\r\n      context.push(\"State: \" + currentState),\r\n      (merged.visibility || (merged.entity && merged.entity.visibility)) &&\r\n        context.push(\r\n          \"Visibility: \" + (merged.visibility || merged.entity.visibility),\r\n        ),\r\n      (merged.contentRating ||\r\n        (merged.entity && merged.entity.contentRating)) &&\r\n        context.push(\r\n          \"Rating: \" + (merged.contentRating || merged.entity.contentRating),\r\n        ),\r\n      (merged.accessGate || (merged.entity && merged.entity.accessGate)) &&\r\n        context.push(\r\n          \"Gate: \" + (merged.accessGate || merged.entity.accessGate),\r\n        ),\r\n      mediaCount && context.push(\"Media: \" + mediaCount),\r\n      {\r\n        surface: surface,\r\n        sourcePath: source,\r\n        preview: preview,\r\n        context: context,\r\n        mediaCount: mediaCount,\r\n        target: target,\r\n        merged: merged,\r\n      }\r\n    );\r\n  }\r\n  function moderationCanonicalPreview(context) {\r\n    context = context || {};\r\n    var target = context.target || {},\r\n      merged = context.merged || target || {},\r\n      mediaCount = context.mediaCount || (merged.media || []).length,\r\n      title = merged.title || merged.name || context.surface || \"Queue item\",\r\n      text = publicDisplayText(\r\n        context.preview ||\r\n          merged.body ||\r\n          merged.caption ||\r\n          merged.description ||\r\n          \"\",\r\n        \"Review item\",\r\n      ),\r\n      author = publicDisplayName(\r\n        merged.authorDisplayName ||\r\n          merged.authorProfileKey ||\r\n          merged.ownerProfileKey ||\r\n          merged.ownerUid ||\r\n          \"\",\r\n        \"Member\",\r\n      ),\r\n      badges = [\r\n        context.surface || \"queue\",\r\n        merged.visibility || (merged.entity && merged.entity.visibility),\r\n        merged.contentRating || (merged.entity && merged.entity.contentRating),\r\n        merged.accessGate || (merged.entity && merged.entity.accessGate),\r\n      ].filter(Boolean);\r\n    return (\r\n      '<div class=\"dsd-launch-queue-preview\"><div><strong>' +\r\n      html(title) +\r\n      \"</strong><span>\" +\r\n      html(author) +\r\n      \"</span></div><p>\" +\r\n      html(String(text || \"\").slice(0, 180)) +\r\n      \"</p><small>\" +\r\n      badges.map(html).join(\" | \") +\r\n      (mediaCount ? \" | media \" + html(mediaCount) : \"\") +\r\n      \"</small></div>\"\r\n    );\r\n  }\r\n  function moderationQueueCard(item) {\r\n    var id = item.postId || item.queueItemId || item.id || \"\",\r\n      surface = moderationSurface(item),\r\n      itemState =\r\n        item.state ||\r\n        item.status ||\r\n        (item.moderation && item.moderation.state) ||\r\n        \"pending\",\r\n      context = moderationContext(item),\r\n      keywords = [\r\n        surface,\r\n        itemState,\r\n        context.preview || \"\",\r\n        item.preview || \"\",\r\n        item.body || \"\",\r\n        item.sourcePath || \"\",\r\n      ].join(\" \"),\r\n      details =\r\n        context.context && context.context.length\r\n          ? '<dl class=\"dsd-mod386__context\">' +\r\n            context.context\r\n              .map(function (line) {\r\n                var parts = line.split(\": \");\r\n                return (\r\n                  \"<div><dt>\" +\r\n                  html(parts.shift() || \"Context\") +\r\n                  \"</dt><dd>\" +\r\n                  html(parts.join(\": \")) +\r\n                  \"</dd></div>\"\r\n                );\r\n              })\r\n              .join(\"\") +\r\n            \"</dl>\"\r\n          : \"\";\r\n    return (\r\n      '<article class=\"dsd-mod386__card dsd-launch-queue-card\" data-dsd-mod386-item data-dsd-founder390-item data-state=\"' +\r\n      html(itemState) +\r\n      '\" data-surface=\"' +\r\n      html(surface) +\r\n      '\" data-queue-id=\"' +\r\n      html(id) +\r\n      '\" data-keywords=\"' +\r\n      html(keywords) +\r\n      '\"><div class=\"dsd-mod386__card-top\"><span class=\"dsd-mod386__pill\">' +\r\n      html(surface) +\r\n      '</span><span class=\"dsd-mod386__pill dsd-mod386__pill--warn\">' +\r\n      html(itemState) +\r\n      \"</span></div><h3>\" +\r\n      html(surface) +\r\n      \"</h3>\" +\r\n      moderationCanonicalPreview(context) +\r\n      details +\r\n      \"<small>\" +\r\n      html(context.sourcePath || item.sourcePath || id) +\r\n      '</small><div class=\"dsd-launch-actions\">' +\r\n      moderationQueueActions(item, id) +\r\n      \"</div></article>\"\r\n    );\r\n  }\r\n  function founderSearchAlias(value) {\r\n    var raw = String(value || \"\")\r\n        .replace(/^@+/, \"\")\r\n        .trim(),\r\n      emailish = raw.replace(\r\n        /^([a-z0-9._%+-]+)-([a-z0-9._%+-]+\\.(?:com|net|org|co|io))$/i,\r\n        \"$1@$2\",\r\n      );\r\n    return emailish !== raw ? emailish : \"\";\r\n  }\r\n  function founderGovernanceCard(profile) {\r\n    var key = profile.profileKey || profile.handle || \"\",\r\n      targetUid = profile.uid || \"\",\r\n      stateValue =\r\n        profile.accountState ||\r\n        (profile.founderGovernance && profile.founderGovernance.state) ||\r\n        profile.status ||\r\n        \"active\";\r\n    ((profile.isTestAccount ||\r\n      profile.testAccount ||\r\n      (profile.founderGovernance && profile.founderGovernance.testAccount)) &&\r\n      (stateValue = \"test\"),\r\n      profile.profileHidden && (stateValue = \"hidden\"),\r\n      (profile.searchable === !1 || profile.removeFromDiscovery === !0) &&\r\n        (stateValue = \"removed\"));\r\n    var keywords = [\r\n        profile.displayName || \"\",\r\n        key || \"\",\r\n        targetUid || \"\",\r\n        stateValue || \"\",\r\n        profile.status || \"\",\r\n        profile.accountState || \"\",\r\n        profile.handle,\r\n        profile.username,\r\n        profile.publicProfileKey,\r\n        founderSearchAlias(key),\r\n        founderSearchAlias(profile.handle),\r\n        founderSearchAlias(profile.username),\r\n      ]\r\n        .filter(Boolean)\r\n        .join(\" \"),\r\n      avatar = profile.avatarMediaId\r\n        ? '<span class=\"dsd-up315__mini-avatar\" data-dsd-avatar-media-id=\"' +\r\n          html(profile.avatarMediaId) +\r\n          '\">' +\r\n          html(initials(profile.displayName || key)) +\r\n          \"</span>\"\r\n        : '<span class=\"dsd-up315__mini-avatar\">' +\r\n          html(initials(profile.displayName || key)) +\r\n          \"</span>\",\r\n      controls =\n        targetUid && !isFounderGovernanceTarget(targetUid, key)\n          ? '<button type=\"button\" data-dsd-govern-profile=\"suspend\" data-target-uid=\"' +\n            html(targetUid) +\r\n            '\" data-profile-key=\"' +\r\n            html(key) +\r\n            '\">Suspend</button><button type=\"button\" data-dsd-govern-profile=\"disable\" data-target-uid=\"' +\r\n            html(targetUid) +\r\n            '\" data-profile-key=\"' +\r\n            html(key) +\r\n            '\">Disable</button><button type=\"button\" data-dsd-govern-profile=\"hideProfile\" data-target-uid=\"' +\r\n            html(targetUid) +\r\n            '\" data-profile-key=\"' +\r\n            html(key) +\r\n            '\">Hide profile</button><button type=\"button\" data-dsd-govern-profile=\"removeDiscovery\" data-target-uid=\"' +\r\n            html(targetUid) +\r\n            '\" data-profile-key=\"' +\r\n            html(key) +\r\n            '\">Remove discovery</button><button type=\"button\" data-dsd-govern-profile=\"markTest\" data-target-uid=\"' +\r\n            html(targetUid) +\r\n            '\" data-profile-key=\"' +\r\n            html(key) +\r\n            '\">Mark test</button><button type=\"button\" data-dsd-govern-profile=\"restoreProfile\" data-target-uid=\"' +\r\n            html(targetUid) +\r\n            '\" data-profile-key=\"' +\r\n            html(key) +\r\n            '\">Restore profile</button><button type=\"button\" data-dsd-govern-profile=\"restore\" data-target-uid=\"' +\r\n            html(targetUid) +\r\n            '\" data-profile-key=\"' +\r\n            html(key) +\r\n            '\">Restore account</button><button type=\"button\" data-dsd-govern-profile=\"enable\" data-target-uid=\"' +\r\n            html(targetUid) +\r\n            '\" data-profile-key=\"' +\r\n            html(key) +\r\n            '\">Re-enable</button>'\r\n          : '<span class=\"dsd-launch-muted\">Founder self-governance disabled here</span>';\n    return (\r\n      '<article class=\"dsd-founder390__user-card\" data-dsd-founder-user-card data-dsd-founder390-item data-state=\"' +\r\n      html(stateValue) +\r\n      '\" data-keywords=\"' +\r\n      html(keywords) +\r\n      '\" data-uid=\"' +\r\n      html(targetUid) +\r\n      '\" data-profile-key=\"' +\r\n      html(key) +\r\n      '\"><div class=\"dsd-founder390__user-head\">' +\r\n      avatar +\r\n      \"<div><h3>\" +\r\n      html(profile.displayName || key || \"Profile\") +\r\n      \"</h3><p>@\" +\r\n      html(key || targetUid || \"profile\") +\r\n      '</p></div><span class=\"dsd-founder390__pill\">' +\r\n      html(stateValue) +\r\n      '</span></div><dl class=\"dsd-mod386__context\"><div><dt>UID</dt><dd>' +\r\n      html(targetUid || \"unknown\") +\r\n      \"</dd></div><div><dt>Status</dt><dd>\" +\r\n      html(profile.status || \"active\") +\r\n      \"</dd></div><div><dt>Searchable</dt><dd>\" +\r\n      html(profile.searchable === !1 ? \"No\" : \"Yes\") +\r\n      '</dd></div></dl><div class=\"dsd-launch-actions\">' +\r\n      controls +\r\n      \"</div></article>\"\r\n    );\r\n  }\r\n  function renderFounderUserManagement() {\r\n    var root = qs('[data-dsd-founder390-panel=\"users\"]');\r\n    if (root) {\r\n      var status = qs(\"[data-dsd-founder390-status]\", root);\r\n      if (!canModerate()) {\r\n        status && (status.textContent = \"Founder governance access required.\");\r\n        return;\r\n      }\r\n      var cardsRoot = qs(\".dsd-founder390__cards\", root),\r\n        profiles = mergeByKey(\r\n          (state.publicProfiles || []).slice(),\r\n          [state.profile, state.viewProfile].filter(Boolean),\r\n          [\"uid\", \"profileKey\", \"handle\", \"id\"],\r\n        ).sort(function (a, b) {\r\n          return String(a.displayName || a.profileKey || \"\").localeCompare(\r\n            String(b.displayName || b.profileKey || \"\"),\r\n          );\r\n        });\r\n      (status &&\r\n        (status.textContent = profiles.length\r\n          ? \"Loaded \" + profiles.length + \" profile governance records.\"\r\n          : \"No profile records loaded yet.\"),\r\n        cardsRoot &&\r\n          ((cardsRoot.innerHTML = profiles.length\r\n            ? profiles.map(founderGovernanceCard).join(\"\")\r\n            : '<article><span class=\"dsd-founder390__pill\">Empty</span><h3>No user action records yet</h3><p>User profiles appear after profile records load.</p></article>'),\r\n          hydrateAvatarMedia(cardsRoot)));\r\n    }\r\n  }\r\n  function updateProfileGovernance(targetUid, key, action) {\n    if (\r\n      !canModerate() ||\r\n      !targetUid ||\r\n      isFounderGovernanceTarget(targetUid, key)\n    )\r\n      return Promise.resolve(null);\r\n    key = clean(key || \"\", \"\");\n    var accountState = \"\",\r\n      profileStatus = \"\",\r\n      searchable = !0,\r\n      removeFromDiscovery = !1,\r\n      discoveryEligible = !0,\r\n      profileHidden = !1,\r\n      isTestAccount = !1;\r\n    if (action === \"suspend\")\r\n      ((accountState = \"suspended\"),\r\n        (profileStatus = \"active\"),\r\n        (searchable = !0));\r\n    else if (action === \"disable\")\r\n      ((accountState = \"disabled\"),\r\n        (profileStatus = \"disabled\"),\r\n        (searchable = !1));\r\n    else if (action === \"restore\" || action === \"enable\")\r\n      ((accountState = \"active\"),\r\n        (profileStatus = \"active\"),\r\n        (searchable = !0));\r\n    else if (action === \"hideProfile\")\r\n      ((accountState = \"hidden\"),\r\n        (profileStatus = \"hidden\"),\r\n        (searchable = !1),\r\n        (profileHidden = !0));\r\n    else if (action === \"removeDiscovery\")\r\n      ((accountState = \"removed\"),\r\n        (profileStatus = \"active\"),\r\n        (searchable = !1),\r\n        (removeFromDiscovery = !0),\r\n        (discoveryEligible = !1));\r\n    else if (action === \"markTest\")\r\n      ((accountState = \"test\"),\r\n        (profileStatus = \"active\"),\r\n        (searchable = !1),\r\n        (removeFromDiscovery = !0),\r\n        (discoveryEligible = !1),\r\n        (isTestAccount = !0));\r\n    else if (action === \"restoreProfile\")\r\n      ((accountState = \"active\"),\r\n        (profileStatus = \"active\"),\r\n        (searchable = !0));\r\n    else return Promise.resolve(null);\r\n    var governance = {\r\n        state: accountState,\r\n        action: action,\r\n        reviewedBy: uid(),\r\n        reviewedAt: serverTimestamp(),\r\n      },\r\n      profilePatch = {\r\n        accountState: accountState,\r\n        status: profileStatus,\r\n        searchable: searchable,\r\n        removeFromDiscovery: removeFromDiscovery,\r\n        discoveryEligible: discoveryEligible,\r\n        profileHidden: profileHidden,\r\n        isTestAccount: isTestAccount,\r\n        testAccount: isTestAccount,\r\n        founderGovernance: governance,\r\n        moderation: {\r\n          state: profileStatus === \"hidden\" ? \"hidden\" : \"approved\",\r\n          gate: \"founder-governance\",\r\n          lastActionAt: serverTimestamp(),\r\n          reviewedBy: uid(),\r\n        },\r\n        entity: {\r\n          moderationStatus: profileStatus === \"hidden\" ? \"hidden\" : \"approved\",\r\n        },\r\n      },\r\n      publicPatch = {\r\n        accountState: accountState,\r\n        status: profileStatus,\r\n        searchable: searchable,\r\n        removeFromDiscovery: removeFromDiscovery,\r\n        discoveryEligible: discoveryEligible,\r\n        profileHidden: profileHidden,\r\n        isTestAccount: isTestAccount,\r\n        testAccount: isTestAccount,\r\n        founderGovernance: governance,\r\n        entity: {\r\n          moderationStatus: profileStatus === \"hidden\" ? \"hidden\" : \"approved\",\r\n        },\r\n      },\r\n      writes = key\r\n        ? [setDoc(canonicalProfileWritePath(key), profilePatch, !0)]\r\n        : [];\r\n    return (\r\n      key\r\n        ? writes.push(setDoc(\"publicProfiles/\" + key, publicPatch, !0))\r\n        : claim(\"profile-governance:blocked-missing-profile-key\", {\r\n            targetUid: targetUid || \"\",\r\n            action: action || \"\",\r\n          }),\r\n      Promise.all(writes)\r\n        .then(function () {\r\n          return addDoc(\"founderAudit\", {\r\n            action: \"profileGovernance.\" + action,\r\n            actorUid: uid(),\r\n            targetUid: targetUid,\r\n            targetProfileKey: key,\r\n            sourcePath: key ? \"publicProfiles/\" + key : \"profiles/\" + targetUid,\r\n            firestorePath: PATHS.founderAudit,\r\n          }).catch(function () {\r\n            return null;\r\n          });\r\n        })\r\n        .then(function () {\r\n          return (\r\n            (state.publicProfiles = state.publicProfiles.map(\r\n              function (profile) {\r\n                return profile.uid === targetUid ||\r\n                  (key && (profile.profileKey || profile.handle) === key)\r\n                  ? Object.assign({}, profile, publicPatch)\r\n                  : profile;\r\n              },\r\n            )),\r\n            renderFounderUserManagement(),\r\n            renderDiscovery(),\r\n            renderStatus(\"Profile governance updated: \" + action + \".\"),\r\n            publicPatch\r\n          );\r\n        })\r\n        .catch(function (error) {\r\n          return (\r\n            queueDraft(\r\n              \"profile-governance\",\r\n              { targetUid: targetUid, key: key, action: action },\r\n              error,\r\n            ),\r\n            null\r\n          );\r\n        })\r\n    );\r\n  }\r\n  function dedicatedGovernanceRouteActive() {\n    return !!(\r\n      qs(\r\n        '[data-dsd-governance-canonical=\"p11dz684\"], [data-dsd-governance-canonical=\"p11dz674\"]',\r\n      ) ||\r\n      qs(\r\n        '[data-dsd-owner=\"ModerationOperationsCenter\"][data-dsd-governance-route-owner=\"canonical\"]',\r\n      ) ||\r\n      qs(\r\n        '[data-dsd-owner=\"FounderOperationsCenter\"][data-dsd-governance-route-owner=\"canonical\"]',\r\n      ) ||\r\n      qs(\r\n        '[data-dsd-owner=\"SafetyCenter\"][data-dsd-governance-route-owner=\"canonical\"]',\r\n      )\r\n    );\n  }\n  function markAllNotificationsRead() {\n    if (!hasCustomer()) return Promise.resolve(null);\n    renderStatus(\"Marking notifications read...\");\n    return premiumMessageActionViaProxy({\n      action: \"mark_all_notifications_read\",\n    })\n      .then(function (result) {\n        state.notifications = (state.notifications || []).map(function (item) {\n          return Object.assign({}, item, { read: !0 });\n        });\n        return refreshInboxCounts(\"notification-mark-all-read\").then(\n          function () {\n            (renderNotifications(),\n              updateInboxPageUnreadIndicators(),\n              renderStatus(\"Notifications marked read.\"),\n              claim(\"notification-mark-all-read:server-authoritative\", {\n                changedCount: Number((result && result.changedCount) || 0),\n                source: \"recipient-scoped-app-proxy\",\n              }));\n            return result;\n          },\n        );\n      })\n      .catch(function (error) {\n        (renderStatus(\"Notifications could not be marked read.\"),\n          claim(\"notification-mark-all-read:blocked\", {\n            error: (error && error.message) || String(error),\n            fallback: \"none-fail-closed\",\n          }));\n        return null;\n      });\n  }\n  function runtimeDiagnosticsExplicitlyRequested() {\n    try {\n      var params = new URLSearchParams(window.location.search || \"\"),\n        boot = window.__DSD_DEBUG_BOOT__ || {},\n        registryEnabled = !!(\n          window.DSDRegistry &&\n          typeof window.DSDRegistry.isEnabled === \"function\" &&\n          window.DSDRegistry.isEnabled()\n        );\n      return !!(\n        registryEnabled ||\n        boot.enabled === !0 ||\n        params.get(\"dsdDebug\") === \"1\" ||\n        params.get(\"dsdDiagnostics\") === \"1\" ||\n        document.documentElement.getAttribute(\"data-dsd-runtime-debug-active\") === \"true\"\n      );\n    } catch (e) {\n      return !1;\n    }\n  }\n  function closeShareComposer() {\n    var layer = qs(\"[data-dsd-share-composer-layer]\"),\n      form = layer && qs(\"[data-dsd-share-composer]\", layer),\n      restore = state.shareComposerReturnFocus,\n      returnScroll = Number(state.shareComposerReturnScroll || 0);\n    form && persistSocialDraft(form);\n    (layer && (layer.hidden = !0),\n      (state.activeSharePostId = \"\"),\n      (state.shareComposerReturnFocus = null),\n      (state.shareComposerReturnScroll = 0),\n      document.documentElement.classList.remove(\"dsd-share-composer-open\"),\n      scheduleGlobalOverlayStateSync(),\n      restore &&\n        typeof restore.focus === \"function\" &&\n        window.setTimeout(function () {\n          try {\n            restore.focus();\n          } catch (error) {}\n          try {\n            window.scrollTo(0, returnScroll);\n          } catch (error) {}\n        }, 0));\n  }\n  function ensureShareComposerModal(post) {\n    var root = canonicalOverlayRoot(),\n      layer = qs(\"[data-dsd-share-composer-layer]\", root),\n      original = post && (post.originalPost || post),\n      originalId = String((original && original.supabasePostId) || \"\").trim();\n    layer ||\n      ((layer = document.createElement(\"div\")),\n      (layer.className =\n        \"dsd-up315__modal-layer dsd-composer-modal-layer dsd-share-composer-layer\"),\n      layer.setAttribute(\"data-dsd-share-composer-layer\", \"true\"),\n      layer.setAttribute(\"data-dsd-owner\", \"LaunchSocialActivation.ShareComposer\"),\n      (layer.hidden = !0),\n      layer.addEventListener(\"click\", function (ev) {\n        (ev.target === layer || ev.target.closest(\"[data-dsd-share-composer-close]\")) &&\n          closeShareComposer();\n      }),\n      root.appendChild(layer));\n    layer.innerHTML =\n      '<div class=\"dsd-up315__modal dsd-composer-modal-shell\" role=\"dialog\" aria-modal=\"true\" aria-label=\"Share post\" tabindex=\"-1\"><header><strong>Share post</strong><button type=\"button\" data-dsd-share-composer-close aria-label=\"Close share composer\">&times;</button></header><section class=\"dsd-up315__modal-panel is-active\"><div class=\"dsd-up315__modal-card\"><form class=\"dsd-canonical-composer dsd-share-composer\" data-dsd-share-composer data-dsd-canonical-compact-composer data-original-post-id=\"' +\n      html(originalId) +\n      '\"><div class=\"dsd-up315__composer-head\">' +\n      currentComposerAvatarHTML() +\n      '<div><strong>' +\n      html(composerDisplayName()) +\n      \"</strong>\" +\n      composerHandleHTML() +\n      '</div></div><textarea name=\"body\" rows=\"2\" maxlength=\"' +\n      html(MAX.body) +\n      '\" aria-label=\"Share caption\" placeholder=\"Add a caption\"></textarea><label class=\"dsd-share-composer__audience\"><span>Audience</span><select name=\"visibility\" aria-label=\"Share audience\"><option value=\"public\">Public</option><option value=\"followers\">Followers</option><option value=\"private\">Private</option></select></label><div class=\"dsd-share-composer__preview\">' +\n      sharedPostEmbedHTML({\n        postType: \"share\",\n        originalPostId: originalId,\n        originalPost: original,\n      }) +\n      '</div><div class=\"dsd-up315__composer-foot\">' +\n      composerCountHTML(MAX.body) +\n      '<span><button type=\"button\" data-dsd-system-share-link>Share link</button><button type=\"button\" data-dsd-copy-share-link>Copy link</button><button type=\"submit\">Share post</button></span></div></form></div></section></div>';\n    var form = qs(\"[data-dsd-share-composer]\", layer);\n    (syncComposerIdentity(layer),\n      hydrateAvatarMedia(layer),\n      hydrateMediaReads(layer),\n      bindPostMentionAutocomplete(layer),\n      bindSocialDraftRecovery(form),\n      updateComposerCounters(form),\n      lockComposerModalLayout(layer));\n    return layer;\n  }\n  function openShareComposer(postId) {\n    if (!requireActiveProfile(\"share posts\")) return !1;\n    var post = localPostById(postId),\n      original = post && (post.originalPost || post);\n    if (!post || !original || !original.supabasePostId) {\n      renderStatus(\"This post cannot be shared right now.\");\n      return !1;\n    }\n    (closeGlobalPostComposer(), closeStoryComposer());\n    var layer = ensureShareComposerModal(post);\n    ((state.activeSharePostId = postId),\n      (state.shareComposerReturnFocus = document.activeElement || null),\n      (state.shareComposerReturnScroll = window.scrollY || window.pageYOffset || 0),\n      (layer.hidden = !1),\n      document.documentElement.classList.add(\"dsd-share-composer-open\"),\n      scheduleGlobalOverlayStateSync());\n    var field = qs('textarea[name=\"body\"]', layer);\n    window.setTimeout(function () {\n      field && field.focus();\n    }, 0);\n    return !0;\n  }\n  function safetyProfileCardHTML(profile, blocked) {\n    profile = profile || {};\n    var key = nonPlaceholderProfileKey(profile.profileKey || profile.profile_key || profile.handle || \"\"),\n      uid = String(profile.uid || profile.userId || profile.user_id || profileUidForKey(key) || \"\").trim(),\n      name = publicDisplayName(profile.displayName || profile.display_name || key, \"DSD member\"),\n      avatarId = canonicalProfileAvatarMediaId(profile),\n      action = blocked ? \"unblock\" : \"block\";\n    if (!key || identityMatchesCurrent(uid, key)) return \"\";\n    return '<article class=\"dsd-safety389__profile-card\"><span class=\"dsd-safety389__profile-card-avatar\"' +\n      (avatarId ? ' data-dsd-avatar-media-id=\"' + html(avatarId) + '\"' : \"\") +\n      '>' + (avatarId ? \"\" : html(initials(name))) + '</span><div class=\"dsd-safety389__profile-card-copy\"><strong>' +\n      html(name) + '</strong><span>@' + html(key) + '</span></div><button type=\"button\" data-dsd-safety-profile-action=\"' +\n      action + '\" data-target-uid=\"' + html(uid) + '\" data-profile-key=\"' + html(key) + '\">' +\n      (blocked ? \"Unblock\" : \"Block\") + '</button></article>';\n  }\n  function renderSafetyBlockedProfiles() {\n    var list = qs(\"[data-dsd-safety-blocked-list]\"),\n      form = qs(\"[data-dsd-safety-profile-search]\");\n    if (!list || !form) return;\n    var cards = (state.blockedRecords || []).map(function (record) {\n      var endpoint = relationshipEndpoint(record, \"target\"),\n        profile = publicProfileByUid(endpoint.uid || \"\") || publicProfileByKey(endpoint.key || \"\");\n      return safetyProfileCardHTML(profile || {\n        uid: endpoint.uid,\n        profileKey: endpoint.key,\n        displayName: \"Unavailable DSD member\",\n      }, !0);\n    }).filter(Boolean);\n    list.innerHTML = cards.length\n      ? '<strong>Blocked profiles</strong>' + cards.join(\"\")\n      : '<p>No blocked profiles.</p>';\n    hydrateAvatarMedia(list);\n    if (form.dataset.dsdSafetySearchBound === BUILD) return;\n    form.dataset.dsdSafetySearchBound = BUILD;\n    form.addEventListener(\"submit\", function (event) {\n      event.preventDefault();\n      var query = String((new FormData(form).get(\"query\") || \"\")).trim(),\n        results = qs(\"[data-dsd-safety-profile-results]\");\n      if (!results || query.length < 2) {\n        results && (results.innerHTML = \"<p>Enter at least two characters.</p>\");\n        return;\n      }\n      results.innerHTML = '<p role=\"status\">Searching profiles...</p>';\n      waitForSupabaseAdapter(\"publicProfiles\", \"discoveryProfileCards\")\n        .then(function (adapter) {\n          return adapter.discoveryProfileCards(\n            { limit: 12, offset: 0, search: query },\n            { publicRead: !1, viewerAuthenticated: !0, surface: \"safety-profile-search\" },\n          );\n        })\n        .then(function (profiles) {\n          var htmlRows = dedupePublicProfiles(profiles || []).map(function (profile) {\n            return safetyProfileCardHTML(\n              profile,\n              relationshipBlockedProfile(profile.uid || profile.userId || \"\", profile.profileKey || profile.handle || \"\"),\n            );\n          }).filter(Boolean);\n          results.innerHTML = htmlRows.length ? htmlRows.join(\"\") : \"<p>No eligible profiles found.</p>\";\n          hydrateAvatarMedia(results);\n        })\n        .catch(function () {\n          results.innerHTML = '<p role=\"alert\">Profile search is temporarily unavailable.</p>';\n        });\n    });\n  }\n  function renderModeration() {\n    var dedicatedGovernance = dedicatedGovernanceRouteActive(),\n      viewer = resolveViewerState(),\n      runtimeDiagnosticsAllowed = viewer.permissions.canAccessAIC && runtimeDiagnosticsExplicitlyRequested();\n    try {\r\n      (document.documentElement.setAttribute(\r\n        \"data-dsd-viewer-authenticated\",\r\n        viewer.authenticated ? \"true\" : \"false\",\r\n      ),\r\n        document.documentElement.setAttribute(\r\n          \"data-dsd-viewer-roles\",\r\n          (viewer.roles || []).join(\" \"),\r\n        ),\r\n        document.documentElement.setAttribute(\r\n          \"data-dsd-viewer-founder-access\",\r\n          viewer.permissions.canAccessFounderOperations ? \"true\" : \"false\",\r\n        ),\r\n        document.documentElement.setAttribute(\r\n          \"data-dsd-viewer-moderation-access\",\r\n          viewer.permissions.canAccessModeration ? \"true\" : \"false\",\r\n        ),\r\n        document.documentElement.setAttribute(\r\n          \"data-dsd-viewer-bridge-checked\",\r\n          state.bridgeChecked ? \"true\" : \"false\",\r\n        ));\r\n    } catch (e) {}\r\n    (qsa('[data-dsd-surface=\"founder-operations\"]').forEach(function (root) {\r\n      root.hidden = !viewer.permissions.canAccessFounderOperations;\r\n    }),\r\n      qsa('[data-dsd-surface=\"moderation-center\"]').forEach(function (root) {\r\n        root.hidden = !viewer.permissions.canAccessModeration;\r\n      }),\r\n      qsa('[data-dsd-surface=\"safety-center\"]').forEach(function (root) {\r\n        root.hidden = !viewer.permissions.canAccessSafetyCenter;\r\n      }),\r\n      qsa(\"[data-dsd-runtime-founder-required]:not([data-dsd-runtime-debug-control])\").forEach(function (root) {\n        root.hidden = !viewer.permissions.canAccessAIC;\n      }),\n      document.documentElement.setAttribute(\n        \"data-dsd-runtime-debug-active\",\n        runtimeDiagnosticsAllowed ? \"true\" : \"false\",\n      ),\n      qsa(\"[data-dsd-runtime-debug-control]\").forEach(function (root) {\n        root.hidden = !runtimeDiagnosticsAllowed;\n      }),\n      qsa(\"[data-dsd-runtime-auth-required]\").forEach(function (root) {\n        root.hidden = !viewer.authenticated;\r\n      }),\r\n      qsa('[data-dsd-governance-denied=\"true\"]').forEach(function (root) {\r\n        var allow = !1;\r\n        root.classList.contains(\"dsd-safety389\")\r\n          ? (allow = viewer.permissions.canAccessSafetyCenter)\r\n          : root.classList.contains(\"dsd-mod386\")\r\n            ? (allow = viewer.permissions.canAccessModeration)\r\n            : root.classList.contains(\"dsd-founder390\")\r\n              ? (allow = viewer.permissions.canAccessFounderOperations)\r\n              : root.classList.contains(\"aic-unauthorized\") &&\r\n                (allow = viewer.permissions.canAccessAIC);\r\n        var pendingRole =\r\n          viewer.authenticated &&\r\n          !allow &&\r\n          (state.bridgeAttempting || !state.bridgeChecked);\r\n        if (\r\n          ((root.hidden = !!allow),\r\n          root.setAttribute(\r\n            \"data-dsd-governance-gate-state\",\r\n            allow ? \"allowed\" : pendingRole ? \"verifying\" : \"denied\",\r\n          ),\r\n          !allow)\r\n        ) {\r\n          var eyebrow = qs(\r\n              \".dsd-founder390__eyebrow, .dsd-mod386__eyebrow, .dsd-safety389__eyebrow\",\r\n              root,\r\n            ),\r\n            heading = qs(\"h1\", root),\r\n            body = qs(\"p:not(.dsd-safety389__eyebrow)\", root);\r\n          pendingRole\r\n            ? (eyebrow && (eyebrow.textContent = \"Verifying\"),\r\n              heading && (heading.textContent = \"Verifying account access\"),\r\n              body &&\r\n                (body.textContent =\r\n                  \"Canonical role-state is still resolving this signed-in account.\"))\r\n            : (eyebrow && (eyebrow.textContent = \"Restricted\"),\r\n              heading &&\r\n                (heading.textContent = \"Account owner access required\"),\r\n              body &&\r\n                (body.textContent =\r\n                  \"This protected page is available only to authorized account owners.\"));\r\n        }\r\n      }),\r\n      document.documentElement.classList.toggle(\r\n        \"dsd-founder-authorized\",\r\n        viewer.permissions.canAccessModeration,\r\n      ));\r\n    var queue = moderationQueue(),\r\n      cards = viewer.permissions.canAccessModeration\r\n        ? queue.length\r\n          ? queue.map(moderationQueueCard).join(\"\")\r\n          : '<article class=\"dsd-launch-queue-card\"><h3>No moderation items</h3><p>Reports, hidden items, rejected items, and safety review records will appear here.</p></article>'\r\n        : '<article class=\"dsd-launch-queue-card\"><h3>Founder access required</h3><p>Moderation queues are available only after founder authorization is verified.</p></article>',\r\n      queueRoot = dedicatedGovernance && qs('[data-dsd-owner=\"ModerationOperationsCenter\"]')\n        ? null\n        : qs(\"[data-dsd-mod386-panel-root]\");\n    queueRoot &&\n      ((queueRoot.innerHTML = cards),\n      window.DSDModerationOperationsCenter &&\n        typeof window.DSDModerationOperationsCenter.apply == \"function\" &&\n        window.DSDModerationOperationsCenter.apply(\n          window.DSDModerationOperationsCenter.snapshot\n            ? window.DSDModerationOperationsCenter.snapshot().activeTab\n            : \"pending\",\n        ));\n    var founderReview = qs(\r\n      '[data-dsd-founder390-panel=\"review\"] .dsd-founder390__cards',\r\n    );\r\n    founderReview && !dedicatedGovernance && (founderReview.innerHTML = cards);\r\n    var pendingMetric = qs(\r\n      '[data-dsd-founder390-panel=\"overview\"] .dsd-founder390__metric-grid div:first-child strong',\r\n    );\r\n    (pendingMetric &&\r\n      !dedicatedGovernance &&\r\n      (pendingMetric.textContent = String(\r\n        queue.filter(function (item) {\r\n          return (item.state || item.status || \"pending\") === \"pending\";\r\n        }).length,\r\n      )),\r\n      (!dedicatedGovernance || !window.DSDFounderOperationsCenter390) &&\n        renderFounderUserManagement(),\n      viewer.permissions.canAccessSafetyCenter && renderSafetyBlockedProfiles());\n  }\r\n  function discoveryCard(profile) {\n    var key = profile.profileKey || profile.handle || \"\",\r\n      normalizedProfileKey = normalizedProfileKeyValue(key),\r\n      targetUid = String(\n        profile.uid ||\r\n          profile.userId ||\r\n          profile.user_id ||\r\n          profileUidForKey(key) ||\r\n          \"\",\r\n      ).trim(),\n      targetActionUid = profileActionIdentity(targetUid, key),\n      following = currentViewerFollowsProfile(targetUid, key),\n      requested = currentViewerRequestedProfile(targetUid, key),\n      blocked = relationshipBlockedProfile(targetUid, key),\n      href = profileRouteHref(key),\n      messageHref = \"/pages/messages?profile=\" + encodeURIComponent(key),\n      mapHref = \"/pages/users?discovery=map&profile=\" + encodeURIComponent(key),\r\n      actorId = actorUid(),\n      own =\n        (targetUid && actorId && targetUid === actorId) ||\n        (normalizedProfileKey &&\n          normalizedProfileKey === clean(profileKey(), \"\").toLowerCase());\n    var coverId = canonicalProfileBannerMediaId(profile),\n      avatarId = canonicalProfileAvatarMediaId(profile),\r\n      coverMedia = coverId\r\n        ? ' data-dsd-profile-cover-media-id=\"' +\r\n          html(coverId) +\r\n          '\" data-dsd-media-proxy-placeholder=\"pending\"'\r\n        : \"\",\r\n      avatarMedia = avatarId\r\n        ? ' data-dsd-avatar-media-id=\"' + html(avatarId) + '\"'\r\n        : \"\",\r\n      actions = hasCustomer()\r\n        ? !own && targetActionUid\n          ? blocked\r\n            ? '<button type=\"button\" data-dsd-unblock-profile=\"' +\r\n              html(targetActionUid) +\n              '\" data-profile-key=\"' +\r\n              html(key) +\r\n              '\">Unblock</button>'\r\n            : '<a href=\"' +\r\n              messageHref +\r\n              '\">Message</a><button type=\"button\" data-dsd-toggle-follow-profile=\"' +\r\n              html(targetActionUid) +\n              '\" data-profile-key=\"' +\r\n              html(key) +\r\n              '\" aria-pressed=\"' +\r\n              (following || requested) +\r\n              '\">' +\r\n              (following\r\n                ? \"Following\"\r\n                : requested\r\n                  ? \"Requested\"\r\n                  : profileVisibility(profile) === \"private\"\r\n                    ? \"Request follow\"\r\n                    : \"Follow\") +\r\n              '</button>' +\n              connectionSignalButton(\"wave\", profile, key) +\n              connectionSignalButton(\"interested\", profile, key)\n          : \"\"\r\n        : '<a href=\"' + loginReturnUrl() + '\">Log in</a>',\n      mapAction = key\n        ? '<a class=\"dsd-users311__map-link\" href=\"' + mapHref + '\" aria-label=\"Show ' + html(profile.displayName || key || \"profile\") + ' on map\" title=\"Show on map\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"12\" r=\"10\"></circle><path d=\"M2 12h20\"></path><path d=\"M12 2a15.3 15.3 0 0 1 0 20\"></path><path d=\"M12 2a15.3 15.3 0 0 0 0 20\"></path></svg></a>'\n        : \"\",\n      safeName = publicDisplayName(\r\n        profile.displayName || key || \"DSD member\",\r\n        \"DSD member\",\r\n      ),\r\n      safeBio = publicDisplayText(profile.bio || \"\", \"\"),\n      displayBio =\n        safeBio.length > 160\n          ? safeBio.slice(0, 157).trimEnd() + \"...\"\n          : safeBio,\n      safeLocationMeta = profileLocationMetaHTML(profile),\n      visibleHandle = publicHandleText(key, safeName, \"member\"),\n      visibleConnectionIntents = hasCustomer() && Array.isArray(profile.connectionIntents)\n        ? profile.connectionIntents.slice(0, 3).map(connectionIntentLabel).filter(Boolean)\n        : [],\n      connectionMeta = hasCustomer()\n        ? (profile.rightNowStatus\n            ? '<p class=\"dsd-users311__right-now\"><strong>Right Now</strong> ' + html(profile.rightNowStatus) + '</p>'\n            : \"\") +\n          (visibleConnectionIntents.length\n            ? '<div class=\"dsd-users311__connection-intents\">' + visibleConnectionIntents.map(function (intent) { return '<span>' + html(intent) + '</span>'; }).join(\"\") + '</div>'\n            : \"\")\n        : \"\";\n    return (\r\n      '<article class=\"dsd-users311__card\" data-user-card data-profile-key=\"' +\r\n      html(key) +\n      '\">' +\n      (profileVisibility(profile) === \"private\"\n        ? '<span class=\"dsd-users311__private-lock\" aria-label=\"Private profile\" title=\"Private profile\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M7 10V7a5 5 0 0 1 10 0v3h1.5A1.5 1.5 0 0 1 20 11.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 20.5v-9A1.5 1.5 0 0 1 5.5 10H7Zm2 0h6V7a3 3 0 0 0-6 0v3Z\"></path></svg></span>'\n        : \"\") +\n      '<a class=\"dsd-users311__card-link\" href=\"' +\n      href +\r\n      '\" aria-label=\"View profile ' +\r\n      html(safeName) +\r\n      '\"></a><div class=\"dsd-users311__cover\"' +\r\n      coverMedia +\r\n      '></div><div class=\"dsd-users311__avatar\"' +\r\n      avatarMedia +\r\n      \">\" +\r\n      html(initials(safeName || key)) +\r\n      '</div><div class=\"dsd-users311__info\"><div class=\"dsd-users311__badges\">' +\r\n      (profile.verified ? '<span class=\"is-verified\">verified</span>' : \"\") +\r\n      '<span class=\"dsd-users311__presence is-' +\n      (profilePresenceActive(profile) ? \"active\" : \"inactive\") +\n      '\">' +\n      html(profilePresenceLabel(profile)) +\n      \"</span></div><h2>\" +\r\n      html(safeName) +\r\n      \"</h2><p>@\" +\r\n      html(visibleHandle) +\r\n      \"</p>\" +\r\n      (safeLocationMeta\r\n        ? '<p class=\"dsd-users311__location\">' + safeLocationMeta + \"</p>\"\r\n        : \"\") +\r\n      (displayBio\n        ? '<em class=\"dsd-users311__bio\" title=\"' + html(safeBio) + '\">' + html(displayBio) + \"</em>\"\n        : \"\") +\n      connectionMeta +\n      '</div><div class=\"dsd-users311__actions\">' +\n      mapAction + actions +\n      \"</div></article>\"\r\n    );\n  }\n  function renderMapProfilePreview(profile) {\n    var preview = qs(\"[data-dsd-map-profile-preview]\");\n    if (!preview || !profile) return !1;\n    var incoming = Object.assign({}, profile),\n      key = normalizedProfileKeyValue(\n        incoming.profileKey || incoming.profile_key || incoming.handle || \"\",\n      );\n    delete incoming.marker;\n    delete incoming.markerLongitude;\n    delete incoming.markerLatitude;\n    delete incoming.marker_longitude;\n    delete incoming.marker_latitude;\n    var canonical = (state.discoveryProfileRows || [])\n      .concat(state.publicProfiles || [])\n      .find(function (candidate) {\n        return (\n          normalizedProfileKeyValue(\n            candidate &&\n              (candidate.profileKey ||\n                candidate.profile_key ||\n                candidate.handle ||\n                \"\"),\n          ) === key\n        );\n      });\n    var merged = mergePublicProfileProjection(canonical || {}, incoming);\n    preview.hidden = !1;\n    preview.innerHTML = discoveryCard(merged);\n    hydrateProfileCardMedia(preview);\n    hydrateMediaReads(preview);\n    return !0;\n  }\n  function canonicalProfileContentIds(records, surface) {\n    var ids = {};\r\n    return (\r\n      (records || []).forEach(function (record) {\r\n        var values =\r\n          surface === \"story\"\r\n            ? [\r\n                record.id,\r\n                record.storyId,\r\n                record.legacyStoryId,\r\n                record.legacy_story_id,\r\n                record.supabaseStoryId,\r\n                record.supabase_story_id,\r\n              ]\r\n            : [\r\n                record.id,\r\n                record.postId,\r\n                record.legacyPostId,\r\n                record.legacy_post_id,\r\n                record.supabasePostId,\r\n                record.supabase_post_id,\r\n              ];\r\n        values.forEach(function (value) {\r\n          ((value = String(value || \"\").trim()), value && (ids[value] = !0));\r\n        });\r\n      }),\r\n      ids\r\n    );\r\n  }\r\n  function canonicalActiveProfileMedia(rows, posts, stories) {\r\n    var postIds = canonicalProfileContentIds(posts, \"post\"),\r\n      storyIds = canonicalProfileContentIds(stories, \"story\"),\r\n      seen = {};\r\n    return (rows || []).filter(function (row) {\r\n      if (\r\n        !row ||\r\n        row.deletedAt ||\r\n        row.deleted_at ||\r\n        row.hiddenAt ||\r\n        row.hidden_at ||\r\n        row.archivedAt ||\r\n        row.archived_at\r\n      )\r\n        return !1;\r\n      var status = String(row.status || \"\").toLowerCase();\r\n      if (status && status !== \"uploaded\" && status !== \"approved\") return !1;\r\n      var moderation = String(\r\n        row.moderationState || row.moderation_state || \"\",\r\n      ).toLowerCase();\r\n      if (moderation && moderation !== \"approved\") return !1;\r\n      var surface = String(row.surface || \"\").toLowerCase(),\r\n        surfaceId = String(row.surfaceId || row.surface_id || \"\").trim();\r\n      if (\r\n        !surfaceId ||\r\n        (surface === \"post\"\r\n          ? !postIds[surfaceId]\r\n          : surface !== \"story\" || !storyIds[surfaceId])\r\n      )\r\n        return !1;\r\n      var mediaId = String(\r\n        row.supabaseMediaId ||\r\n          row.id ||\r\n          row.mediaId ||\r\n          row.legacyMediaId ||\r\n          row.legacy_media_id ||\r\n          \"\",\r\n      ).trim();\r\n      return !mediaId || seen[mediaId] ? !1 : ((seen[mediaId] = !0), !0);\r\n    });\r\n  }\r\n  function hydrateDiscoveryStatsForProfile(profile) {\r\n    var key = normalizedProfileKeyValue(\r\n        profile &&\r\n          (profile.profileKey || profile.profile_key || profile.handle || \"\"),\r\n      ),\n      cached = key && state.discoveryStatsByKey[key];\n    if (cached) return Promise.resolve(!0);\n    if (!key || !profile || profile.profileStatsHydrated !== !0)\r\n      return Promise.resolve(!1);\r\n    cached = {\r\n      followerCount: Number(profile.followerCount || 0),\r\n      followingCount: Number(profile.followingCount || 0),\r\n      postCount: Number(profile.postCount || 0),\r\n      storyCount: Number(profile.storyCount || 0),\r\n      mediaCount: Number(profile.mediaCount || 0),\r\n      fetchedAt: Date.now(),\r\n      source: \"canonical-profile-card\",\r\n    };\n    state.discoveryStatsByKey[key] = cached;\n    return Promise.resolve(!0);\n  }\n  function renderDiscovery() {\n    (hasCustomer() && state.connectionPresenceStatus === \"idle\" && loadConnectionPresence(!1),\n      renderConnectionSurfaces(),\n      publishPublicProfiles(),\n      qsa(\"[data-dsd-users311-grid]\").forEach(function (grid) {\r\n        var root = grid.closest(\"[data-dsd-users311]\") || document,\r\n          search = qs(\"[data-dsd-users311-search]\", root),\r\n          requestedFilter = canonicalDiscoveryFilter(),\n          query = String((search && search.value) || \"\")\r\n            .trim()\r\n            .toLowerCase(),\r\n          filter =\r\n            [\"all\", \"verified\", \"dsdplus\", \"nearby\"].indexOf(\r\n              requestedFilter,\r\n            ) !== -1\r\n              ? requestedFilter\r\n              : \"all\",\r\n          sourceProfiles = state.discoveryProfileOwnerActive\n            ? state.discoveryProfileRows || []\n            : state.publicProfiles || [];\n        if (hasCustomer() && (state.connectionRadarRows || []).length) {\n          var connectionByKey = {};\n          state.connectionRadarRows.forEach(function (row) {\n            var radarKey = normalizedProfileKeyValue(row && (row.profileKey || row.handle || \"\"));\n            radarKey && (connectionByKey[radarKey] = row);\n          });\n          sourceProfiles = sourceProfiles.map(function (profile) {\n            var sourceKey = normalizedProfileKeyValue(profile && (profile.profileKey || profile.profile_key || profile.handle || \"\"));\n            return connectionByKey[sourceKey]\n              ? mergePublicProfileProjection(profile, connectionByKey[sourceKey])\n              : profile;\n          });\n        }\n        hasCustomer() &&\n          (sourceProfiles = sourceProfiles.map(mergeTargetDistanceProjection));\n        setCanonicalDiscoveryFilter(filter, root);\n        hasCustomer() &&\n          !cachedNearbyDiscoveryRows() &&\n          !state.nearbyDiscoveryPendingKey &&\r\n          fetchNearbyDiscoveryRows(!1);\r\n        if (hasCustomer() && (state.nearbyDiscoveryRows || []).length) {\r\n          var nearbyByKey = {};\r\n          (state.nearbyDiscoveryRows || []).forEach(function (row) {\r\n            var rowKey = normalizedProfileKeyValue(\r\n              row && (row.profileKey || row.profile_key || row.handle || \"\"),\r\n            );\r\n            rowKey && (nearbyByKey[rowKey] = row);\r\n          });\r\n          sourceProfiles = sourceProfiles.map(function (profile) {\r\n            var profileKeyValue = normalizedProfileKeyValue(\r\n                profile &&\r\n                  (profile.profileKey ||\r\n                    profile.profile_key ||\r\n                    profile.handle ||\r\n                    \"\"),\r\n              ),\r\n              nearby = nearbyByKey[profileKeyValue];\r\n            return nearby\r\n              ? Object.assign({}, profile, {\r\n                  appearInNearby: nearby.appearInNearby === !0,\r\n                  appear_in_nearby: nearby.appearInNearby === !0,\r\n                  showDistanceToUsers: nearby.showDistanceToUsers === !0,\r\n                  show_distance_to_users: nearby.showDistanceToUsers === !0,\r\n                  viewerDistanceMiles: nearby.viewerDistanceMiles,\r\n                  viewer_distance_miles: nearby.viewerDistanceMiles,\r\n                  viewerDistanceLabel: nearby.viewerDistanceLabel || \"\",\r\n                  viewer_distance_label: nearby.viewerDistanceLabel || \"\",\r\n                  nearbyQueryEligible: !0,\r\n                })\r\n              : profile;\r\n          });\r\n        }\r\n        if (filter === \"dsdplus\") {\r\n          var dsdPlusRows = cachedDsdPlusDiscoveryRows();\r\n          dsdPlusRows\r\n            ? (sourceProfiles = dsdPlusRows)\r\n            : ((sourceProfiles = []), fetchDsdPlusDiscoveryRows(!1));\r\n        }\n        if (filter === \"nearby\") {\n          var serverRows = cachedNearbyDiscoveryRows(),\n            canonicalNearbyProfilesByKey = {};\n          sourceProfiles\n            .concat(\n              state.discoveryProfileRows || [],\n              state.publicProfiles || [],\n            )\n            .forEach(function (profile) {\n              var canonicalKey = normalizedProfileKeyValue(\n                profile &&\n                  (profile.profileKey ||\n                    profile.profile_key ||\n                    profile.handle ||\n                    \"\"),\n              );\n              canonicalKey &&\n                !canonicalNearbyProfilesByKey[canonicalKey] &&\n                (canonicalNearbyProfilesByKey[canonicalKey] = profile);\n            });\n          serverRows && serverRows.length\n            ? (sourceProfiles = serverRows.map(function (nearbyProfile) {\n                var nearbyKey = normalizedProfileKeyValue(\n                    nearbyProfile &&\n                      (nearbyProfile.profileKey ||\n                        nearbyProfile.profile_key ||\n                        nearbyProfile.handle ||\n                        \"\"),\n                  ),\n                  canonicalProfile = canonicalNearbyProfilesByKey[nearbyKey],\n                  mergedProfile = mergePublicProfileProjection(\n                    canonicalProfile || {},\n                    nearbyProfile,\n                  ),\n                  distanceMiles = serverDistanceMiles(nearbyProfile);\n                if (distanceMiles !== null) {\n                  mergedProfile.viewerDistanceMiles = distanceMiles;\n                  mergedProfile.viewer_distance_miles = distanceMiles;\n                  mergedProfile.viewerDistanceLabel =\n                    bucketDistanceLabel(distanceMiles);\n                  mergedProfile.viewer_distance_label =\n                    mergedProfile.viewerDistanceLabel;\n                }\n                mergedProfile.nearbyQueryEligible = !0;\n                return mergedProfile;\n              }))\n            : fetchNearbyDiscoveryRows(!1);\n        }\n        var visibleProfiles = sourceProfiles.filter(function (profile) {\n          var text = [\r\n              profile.displayName,\r\n              profile.profileKey,\r\n              profile.handle,\r\n              profile.bio,\r\n              profile.location,\r\n              profile.locationCity,\r\n              profile.locationState,\r\n            ]\r\n              .join(\" \")\r\n              .toLowerCase(),\r\n            filterOk =\r\n              filter === \"all\" ||\r\n              (filter === \"verified\" && discoveryProfileVerified(profile)) ||\n              (filter === \"dsdplus\" && profile.dsdPlus) ||\r\n              (filter === \"nearby\" && nearbyDiscoveryMatch(profile));\r\n          return (\r\n            publicProfileVisible(profile) &&\r\n            publicRecordVisible(profile) &&\r\n            (!query || text.indexOf(query) !== -1) &&\r\n            filterOk\n          );\n        });\n        if (\n          (filter === \"nearby\" &&\r\n            (visibleProfiles = visibleProfiles.slice().sort(function (a, b) {\r\n              return nearbySortValue(a) - nearbySortValue(b);\r\n            })),\r\n          filter !== \"nearby\" &&\n            (visibleProfiles = visibleProfiles.slice().sort(function (a, b) {\n              if (hasCustomer()) return compareDiscoveryByProximity(a, b);\n              var aName = String(\n                  a.displayName || a.display_name || a.handle || \"\",\r\n                ).toLowerCase(),\r\n                bName = String(\r\n                  b.displayName || b.display_name || b.handle || \"\",\r\n                ).toLowerCase(),\r\n                nameOrder = aName.localeCompare(bName);\r\n              return (\r\n                nameOrder ||\r\n                normalizedProfileKeyValue(\r\n                  a.profileKey || a.profile_key || a.handle || \"\",\r\n                ).localeCompare(\r\n                  normalizedProfileKeyValue(\r\n                    b.profileKey || b.profile_key || b.handle || \"\",\r\n                  ),\r\n                )\r\n              );\r\n            })),\r\n          (grid.hidden = !1),\r\n          visibleProfiles.length)\r\n        ) {\r\n          var renderLimit =\r\n            filter === \"nearby\" ? NEARBY_DISCOVERY_PAGE_LIMIT : 100;\r\n          ((grid.innerHTML = visibleProfiles\n            .slice(0, renderLimit)\n            .map(discoveryCard)\n            .join(\"\")),\n            hydrateProfileCardMedia(grid),\n            hydrateMediaReads(grid));\n        } else {\r\n          var emptyTitle =\r\n              query || filter !== \"all\"\r\n                ? \"No profiles match this view\"\r\n                : \"No public profiles yet\",\r\n            emptyText =\r\n              query || filter !== \"all\"\r\n                ? \"Try another search or filter. Private or hidden profiles stay out of public discovery.\"\r\n                : \"Public profiles appear here after members finish profile setup.\";\r\n          if (filter === \"nearby\") {\r\n            var nearbyStatus =\r\n              (state.discoveryLocation && state.discoveryLocation.status) ||\r\n                \"idle\",\r\n              persistedNearbyReady = persistedNearbyLocationUsable();\r\n            ((emptyTitle =\r\n              persistedNearbyReady\r\n                ? \"No nearby profiles found\"\r\n                : nearbyStatus === \"locating\"\r\n                ? \"Locating nearby profiles\"\r\n                : nearbyStatus === \"denied\"\r\n                  ? \"Nearby needs location permission\"\r\n                  : \"No nearby profiles found\"),\r\n              (emptyText =\r\n                persistedNearbyReady\r\n                  ? \"Nearby uses your saved approximate location and privacy-safe distance bands.\"\r\n                  : nearbyStatus === \"locating\"\r\n                  ? \"DSD is requesting your approximate browser location. Exact coordinates are not shown publicly.\"\r\n                  : nearbyStatus === \"denied\" || nearbyStatus === \"unavailable\"\r\n                    ? \"Standard Discovery still works. Allow location only when you want distance-aware Nearby.\"\r\n                    : \"Nearby uses recent approximate location and distance-safe profile-card results.\"));\r\n          } else if (state.discoveryProfileLoading && !visibleProfiles.length) {\n            emptyTitle = \"Loading profiles\";\n            emptyText = \"Discovery is loading the next bounded profile page.\";\n          } else if (state.discoveryProfileError && !visibleProfiles.length) {\n            emptyTitle = \"Profiles could not be loaded\";\n            emptyText = \"Try again to reload this Discovery page.\";\n          }\n          grid.innerHTML =\n            '<div class=\"dsd-users311__empty is-visible\" data-dsd-users311-empty data-dsd-users311-empty-state data-dsd-users311-empty-filter=\"' +\r\n            html(filter) +\r\n            '\"><strong>' +\r\n            html(emptyTitle) +\r\n            \"</strong><span>\" +\r\n            html(emptyText) +\r\n            '</span><a href=\"' +\r\n            (hasCustomer() ? \"/pages/user-profile?setup=1\" : loginReturnUrl()) +\r\n            '\">' +\r\n            (hasCustomer() ? \"Complete profile\" : \"Log in to create profile\") +\r\n            \"</a></div>\";\r\n        }\r\n        var pager = qs(\"[data-dsd-discovery-pagination]\", root),\n          pageStatus = qs(\"[data-dsd-discovery-page-status]\", root),\n          pagedFilter = filter === \"all\" || filter === \"verified\";\n        if (pager) {\n          pager.hidden = !pagedFilter;\n          pageStatus &&\n            (pageStatus.textContent = state.discoveryProfileLoading\n              ? \"Loading profiles...\"\n              : state.discoveryProfileRows.length\n                ? \"Showing \" + state.discoveryProfileRows.length + \" profiles\"\n                : \"No profiles loaded\");\n          syncDiscoveryInfiniteScroll(\n            root,\n            pagedFilter && state.discoveryProfileHasMore,\n          );\n        }\n        (grid.setAttribute(\n          \"aria-busy\",\n          state.discoveryProfileLoading ? \"true\" : \"false\",\n        ),\n          grid.setAttribute(\"data-dsd-discovery-hydrated\", \"true\"));\n      }));\r\n  }\r\n  function profileByUid(targetUid, fallbackKey) {\r\n    var uidValue = String(targetUid || \"\").trim(),\r\n      keyValue = cleanEmpty(fallbackKey || \"\")\r\n        .replace(/^@+/, \"\")\r\n        .toLowerCase(),\r\n      publicProfile =\r\n        (state.publicProfiles || []).filter(function (profile) {\r\n          var profileUid = String(\r\n              (profile &&\r\n                (profile.uid || profile.userId || profile.user_id || \"\")) ||\r\n                \"\",\r\n            ).trim(),\r\n            profileKey2 = cleanEmpty(\r\n              (profile &&\r\n                (profile.profileKey ||\r\n                  profile.handle ||\r\n                  profile.profile_key ||\r\n                  \"\")) ||\r\n                \"\",\r\n            )\r\n              .replace(/^@+/, \"\")\r\n              .toLowerCase();\r\n          return (\r\n            (uidValue && profileUid === uidValue) ||\r\n            (keyValue && profileKey2 === keyValue)\r\n          );\r\n        })[0] || null;\r\n    if (publicProfile) return publicProfile;\r\n    var ownProfile = state.profile || {},\r\n      ownUid = String(ownProfile.uid || uid() || \"\").trim(),\r\n      ownKey = cleanEmpty(\r\n        ownProfile.profileKey || ownProfile.handle || profileKey() || \"\",\r\n      )\r\n        .replace(/^@+/, \"\")\r\n        .toLowerCase();\r\n    return (uidValue && ownUid && uidValue === ownUid) ||\r\n      (keyValue && ownKey && keyValue === ownKey)\r\n      ? ownProfile\r\n      : null;\r\n  }\r\n  function relationshipEndpoint(record, side) {\r\n    record = record || {};\r\n    var source = side === \"source\";\r\n    return {\r\n      uid: String(\r\n        source\r\n          ? record.sourceUid ||\r\n              record.source_uid ||\r\n              record.sourceUserId ||\r\n              record.source_user_id ||\r\n              record.followerUid ||\r\n              record.follower_uid ||\r\n              \"\"\r\n          : record.targetUid ||\r\n              record.target_uid ||\r\n              record.targetUserId ||\r\n              record.target_user_id ||\r\n              record.followingUid ||\r\n              record.following_uid ||\r\n              \"\",\r\n      ).trim(),\r\n      key: normalizedProfileKeyValue(\r\n        source\r\n          ? record.sourceProfileKey ||\r\n              record.source_profile_key ||\r\n              record.followerProfileKey ||\r\n              record.follower_profile_key ||\r\n              \"\"\r\n          : record.targetProfileKey ||\r\n              record.target_profile_key ||\r\n              record.followingProfileKey ||\r\n              record.following_profile_key ||\r\n              \"\",\r\n      ),\r\n    };\r\n  }\r\n  function relationshipEndpointsMatch(left, right) {\r\n    return !left || !right\r\n      ? !1\r\n      : left.uid && right.uid\r\n        ? left.uid === right.uid\r\n        : !!(left.key && right.key && left.key === right.key);\r\n  }\r\n  function canonicalRelationshipRecords(records, kind) {\r\n    var seen = {};\r\n    return (records || []).filter(function (record) {\r\n      var recordState = String((record && record.state) || \"\").toLowerCase(),\r\n        acceptedState =\r\n          kind === \"favorites\"\r\n            ? recordState === \"favorite\" || recordState === \"active\"\r\n            : recordState === \"active\";\r\n      if (!record || !acceptedState) return !1;\r\n      var source = relationshipEndpoint(record, \"source\"),\r\n        target = relationshipEndpoint(record, \"target\");\r\n      if (relationshipEndpointsMatch(source, target)) return !1;\r\n      var person = kind === \"followers\" ? source : target,\r\n        identity = person.uid || person.key;\r\n      if (!person.uid && looksLikeRawEmail(person.key)) return !1;\r\n      return !identity || seen[identity] ? !1 : ((seen[identity] = !0), !0);\r\n    });\r\n  }\r\n  function reciprocalRelationshipCount(targetUid, targetKey) {\r\n    var own = isOwnProfileRoute(),\r\n      followers = canonicalRelationshipRecords(\r\n        own ? state.followersRecords : state.viewedFollowersRecords,\r\n        \"followers\",\r\n      ),\r\n      following = canonicalRelationshipRecords(\r\n        own ? state.followingRecords : state.viewedFollowingRecords,\r\n        \"following\",\r\n      );\r\n    function matches(records, kind) {\r\n      return records.some(function (record) {\r\n        var person = relationshipEndpoint(\r\n          record,\r\n          kind === \"followers\" ? \"source\" : \"target\",\r\n        );\r\n        return (\r\n          (targetUid && String(person.uid || \"\") === String(targetUid)) ||\r\n          (targetKey &&\r\n            normalizedProfileKeyValue(person.key || \"\") ===\r\n              normalizedProfileKeyValue(targetKey))\r\n        );\r\n      });\r\n    }\r\n    return matches(followers, \"followers\") && matches(following, \"following\")\r\n      ? 1\r\n      : 0;\r\n  }\r\n  function relationshipCard(record, kind) {\r\n    var targetUid =\r\n        kind === \"followers\"\r\n          ? record.sourceUid ||\r\n            record.followerUid ||\r\n            record.ownerUid ||\r\n            record.targetUid ||\r\n            \"\"\r\n          : record.targetUid ||\r\n            record.followingUid ||\r\n            record.ownerUid ||\r\n            record.sourceUid ||\r\n            \"\",\r\n      key =\r\n        kind === \"followers\"\r\n          ? record.sourceProfileKey ||\r\n            record.followerProfileKey ||\r\n            record.ownerProfileKey ||\r\n            targetUid\r\n          : record.targetProfileKey ||\r\n            record.followingProfileKey ||\r\n            record.ownerProfileKey ||\r\n            targetUid,\r\n      profile = profileByUid(targetUid, key),\n      relationshipDisplayName =\n        kind === \"followers\"\n          ? record.sourceDisplayName || record.source_display_name || \"\"\n          : record.targetDisplayName || record.target_display_name || \"\",\n      relationshipAvatarMediaId =\n        kind === \"followers\"\n          ? record.sourceAvatarMediaId || record.source_avatar_media_id || \"\"\n          : record.targetAvatarMediaId || record.target_avatar_media_id || \"\";\n    if (!profile && (key || targetUid))\n      profile = {\n        uid: targetUid,\n        profileKey: key,\n        handle: key,\n        displayName: relationshipDisplayName || key || \"DSD member\",\n        avatarMediaId: relationshipAvatarMediaId,\n      };\n    if (!profile) return \"\";\n    var routeKey = profile.profileKey || key || profile.handle || targetUid,\r\n      handle = profile.handle || profile.profileKey || key || targetUid,\r\n      href = routeKey\r\n        ? profileRouteHref(routeKey)\r\n        : \"/pages/users\",\n      avatarMedia = canonicalProfileAvatarMediaId(profile),\r\n      safeName = publicDisplayName(\r\n        profile.displayName || handle || \"DSD member\",\r\n        \"DSD member\",\r\n      ),\r\n      storedMutualCount =\r\n        record.mutualCount != null ? record.mutualCount : profile.mutualCount,\r\n      mutualCount =\r\n        storedMutualCount != null\r\n          ? Number(storedMutualCount || 0)\r\n          : reciprocalRelationshipCount(targetUid, handle),\r\n      mutualLabel = mutualCount > 0 ? mutualCount + \" mutual\" : \"0 mutual\",\r\n      resolvedTargetUid = String(\r\n        targetUid ||\r\n          profile.uid ||\r\n          profile.userId ||\r\n          profile.user_id ||\r\n          profileUidForKey(handle) ||\r\n          \"\",\r\n      ).trim(),\r\n      ownTarget = identityMatchesCurrent(resolvedTargetUid, handle),\r\n      relationFollowing = currentViewerFollowsProfile(resolvedTargetUid, handle),\n      relationRequested = currentViewerRequestedProfile(\n        resolvedTargetUid,\n        handle,\n      ),\n      relationLabel = relationFollowing\r\n        ? \"Unfollow\"\r\n        : relationRequested\r\n          ? \"Requested\"\r\n          : profileVisibility(profile) === \"private\"\r\n            ? \"Request follow\"\r\n            : \"Follow\",\r\n      relationButton =\r\n        canUseSocialActions() && (resolvedTargetUid || handle) && !ownTarget\n          ? '<button type=\"button\" class=\"dsd-launch-action\" data-dsd-toggle-follow-profile=\"' +\r\n            html(resolvedTargetUid) +\r\n            '\" data-profile-key=\"' +\r\n            html(handle) +\r\n            '\" aria-pressed=\"' +\r\n            (relationFollowing || relationRequested) +\r\n            '\">' +\r\n            html(relationLabel) +\r\n            \"</button>\"\r\n          : '<a class=\"dsd-launch-action\" href=\"' + href + '\">View</a>';\r\n    return (\r\n      '<div data-dsd-relationship-record=\"' +\r\n      html(kind) +\r\n      '\" data-keywords=\"' +\r\n      html([kind, handle, safeName, resolvedTargetUid].join(\" \")) +\r\n      '\"><a class=\"dsd-up356__relationship-avatar-link\" href=\"' +\r\n      html(href) +\r\n      '\" aria-label=\"View ' +\r\n      html(safeName) +\r\n      ' profile\"><span class=\"dsd-up315__mini-avatar\"' +\r\n      (avatarMedia\n        ? ' data-dsd-avatar-media-id=\"' + html(avatarMedia) + '\"'\r\n        : \"\") +\r\n      \">\" +\r\n      html(initials(safeName || handle)) +\r\n      '</span></a><a class=\"dsd-up356__relationship-identity-link\" href=\"' +\r\n      html(href) +\r\n      '\"><strong>' +\r\n      html(safeName) +\r\n      \"</strong><em>@\" +\r\n      html(handle || \"member\") +\r\n      \"</em><small>\" +\r\n      html(mutualLabel) +\r\n      \"</small></a>\" +\r\n      relationButton +\r\n      \"</div>\"\r\n    );\r\n  }\r\n  function relationshipCards(records, kind) {\r\n    return canonicalRelationshipRecords(records, kind)\r\n      .map(function (record) {\r\n        return relationshipCard(record, kind);\r\n      })\r\n      .filter(Boolean);\r\n  }\r\n  function followRequestCards(records) {\r\n    return (records || [])\r\n      .map(function (record) {\r\n        var sourceUid = record.sourceUid || \"\",\r\n          key = record.sourceProfileKey || sourceUid,\r\n          profile = profileByUid(sourceUid, key) || {},\r\n          safeName = publicDisplayName(\r\n            profile.displayName || key || \"DSD member\",\r\n            \"DSD member\",\r\n          ),\r\n          handle = profile.profileKey || profile.handle || key || \"member\",\r\n          avatarMedia = profile.avatarMediaId || profile.thumbnailMediaId || \"\";\r\n        return (\r\n          '<div data-dsd-relationship-record=\"follow-request\" data-keywords=\"' +\r\n          html([\"request\", handle, safeName, sourceUid].join(\" \")) +\r\n          '\"><span class=\"dsd-up315__mini-avatar\"' +\r\n          (avatarMedia\r\n            ? ' data-dsd-avatar-media-id=\"' + html(avatarMedia) + '\"'\r\n            : \"\") +\r\n          \">\" +\r\n          html(initials(safeName || handle)) +\r\n          \"</span><div><strong>\" +\r\n          html(safeName) +\r\n          \"</strong><em>@\" +\r\n          html(handle) +\r\n          '</em><small>Follow request</small></div><button type=\"button\" class=\"dsd-launch-action\" data-dsd-accept-follow-request=\"' +\r\n          html(sourceUid) +\r\n          '\" data-profile-key=\"' +\r\n          html(key) +\r\n          '\">Accept</button><button type=\"button\" class=\"dsd-launch-action\" data-dsd-decline-follow-request=\"' +\r\n          html(sourceUid) +\r\n          '\" data-profile-key=\"' +\r\n          html(key) +\r\n          '\">Decline</button></div>'\r\n        );\r\n      })\r\n      .filter(Boolean);\r\n  }\r\n  function savedCard(item) {\r\n    var targetId = canonicalSavedPostId(item);\r\n    if (\r\n      !targetId ||\r\n      shouldApplyLocalPostTombstone(targetId, localPostById(targetId))\r\n    )\r\n      return \"\";\r\n    var post =\r\n      state.posts.filter(function (p) {\r\n        return savedItemMatchesPost(item, p);\r\n      })[0] || {};\r\n    if (post && (post.postId || post.id) && !isNormalContentRecord(post))\r\n      return \"\";\r\n    var firstMedia = (post.media || item.previewMedia || [])[0] || {},\r\n      savedMediaId = readableMediaId(firstMedia),\r\n      savedKind = String(firstMedia.kind || \"image\").toLowerCase(),\r\n      preview =\r\n        savedMediaId && savedKind !== \"video\"\r\n          ? '<figure class=\"dsd-saved-tile__preview dsd-launch-media-chip\"' +\r\n            mediaReadAttrs(firstMedia) +\r\n            ' data-dsd-media-kind=\"' +\r\n            html(savedKind) +\r\n            '\"></figure>'\r\n          : '<span class=\"dsd-saved-tile__preview dsd-saved-tile__preview--fallback\" data-dsd-saved-video-paused=\"' +\r\n            (savedKind === \"video\") +\r\n            '\">' +\r\n            (savedKind === \"video\" ? \"Video\" : \"S\") +\r\n            \"</span>\",\r\n      safePreview = publicDisplayText(\n        post.body || item.body || item.targetType || \"Saved item\",\n        \"Saved item\",\r\n      ),\r\n      safeSavedHandle = publicHandleText(\r\n        post.authorProfileKey || item.authorProfileKey || \"\",\n        post.authorDisplayName || item.authorDisplayName || \"\",\n        \"member\",\r\n      );\r\n    return (\r\n      '<article class=\"dsd-saved-tile\" data-dsd-relationship-record=\"saved\" data-keywords=\"' +\r\n      html([targetId, safePreview, item.targetType || \"\"].join(\" \")) +\r\n      '\">' +\r\n      preview +\r\n      \"<div><strong>\" +\r\n      html(safePreview) +\r\n      \"</strong><em>\" +\r\n      html(\n        post.authorProfileKey || item.authorProfileKey\n          ? \"@\" + safeSavedHandle\n          : \"saved item\",\n      ) +\n          \"</em><small>\" +\n      html(\n        postTimestamp(\n          post.postId || post.id\n            ? post\n            : { createdAt: item.postCreatedAt || item.createdAt },\n        ),\n      ) +\n      '</small></div><a class=\"dsd-launch-action\" href=\"' +\r\n      html(postPermalink(targetId)) +\r\n      '\">Open</a></article>'\r\n    );\r\n  }\r\n  function setRelationshipPanel(root, key, htmlContent, emptyText) {\r\n    var panel = qs('[data-dsd-profile-modal-panel=\"' + key + '\"]', root);\r\n    if (panel) {\r\n      var list = qs(\".dsd-up315__modal-list\", panel);\r\n      if (!list) {\r\n        var card = qs(\".dsd-up315__modal-card\", panel) || panel,\r\n          relationshipNav =\r\n            key === \"followers\" || key === \"following\"\r\n              ? '<nav class=\"dsd-profile-relationship-filter\" aria-label=\"Relationship lists\"><button type=\"button\" data-dsd-profile-modal-open=\"followers\" data-dsd-relationship-tab=\"followers\">Followers</button><button type=\"button\" data-dsd-profile-modal-open=\"following\" data-dsd-relationship-tab=\"following\">Following</button></nav><label class=\"dsd-profile-relationship-search\">Filter profiles<input type=\"search\" data-dsd-profile-relationship-search autocomplete=\"off\" placeholder=\"Name or handle\"></label>'\r\n              : \"\";\r\n        ((card.innerHTML =\r\n          relationshipNav + '<div class=\"dsd-up315__modal-list\"></div>'),\r\n          (list = qs(\".dsd-up315__modal-list\", panel)));\r\n      }\r\n      ((list.innerHTML =\r\n        htmlContent ||\r\n        '<div><span class=\"dsd-up315__mini-avatar\">--</span><div><strong>No records yet</strong><em>' +\r\n          html(emptyText || \"Records appear here.\") +\r\n          \"</em></div></div>\"),\r\n        qsa(\"[data-dsd-profile-modal-open]\", panel).forEach(function (control) {\r\n          ((control.disabled = !1),\r\n            control.setAttribute(\"aria-disabled\", \"false\"));\r\n        }),\r\n        panel.classList.contains(\"is-active\") &&\r\n          !panel.closest(\"[data-dsd-profile-modal-layer]\").hidden &&\r\n          hydrateAvatarMedia(list),\r\n        key === \"saved\" &&\r\n          panel.classList.contains(\"is-active\") &&\r\n          !panel.closest(\"[data-dsd-profile-modal-layer]\").hidden &&\r\n          hydrateMediaReads(list));\r\n    }\r\n  }\r\n  function renderRelationships() {\r\n    var root = qs(\"[data-dsd-user-profile]\");\r\n      if (root) {\n      var own = isOwnProfileRoute(),\n        targetIdentity = profileContentTargetIdentity(),\n        profile = targetIdentity.profile || {},\n        targetKey = targetIdentity.targetKey,\r\n        postsForProfile = targetIdentity.ready\r\n          ? state.posts.filter(function (p) {\r\n              return (\r\n                isNormalContentRecord(p) &&\r\n                recordBelongsToProfile(\r\n                  p,\r\n                  targetIdentity.targetUid,\r\n                  targetKey,\r\n                  \"authorUid\",\r\n                )\r\n              );\r\n            })\r\n          : [],\r\n        mediaCount = postsForProfile.filter(function (p) {\r\n          return p.media && p.media.length;\r\n        }).length,\r\n        pendingFollowerCards = own\r\n          ? followRequestCards(state.incomingFollowRequests)\r\n          : [],\r\n        relationshipFollowerRecords = canonicalRelationshipRecords(\r\n          own ? state.followersRecords : state.viewedFollowersRecords,\r\n          \"followers\",\r\n        ),\r\n        relationshipFollowingRecords = canonicalRelationshipRecords(\r\n          own ? state.followingRecords : state.viewedFollowingRecords,\r\n          \"following\",\r\n        ),\r\n        followerCards = relationshipCards(\r\n          relationshipFollowerRecords,\r\n          \"followers\",\r\n        ),\r\n        followingCards = relationshipCards(\r\n          relationshipFollowingRecords,\r\n          \"following\",\r\n        ),\r\n        favoriteCards = relationshipCards(\r\n          own ? state.favoritesRecords : state.viewedFavoritesRecords,\r\n          \"favorites\",\r\n        ),\r\n        savedCards = activeSavedItems(\r\n          own ? state.savedItems : state.viewedSavedItems,\r\n        )\r\n          .map(savedCard)\r\n          .filter(Boolean),\r\n        canonicalRelationshipStats =\n          state.discoveryStatsByKey[normalizedProfileKeyValue(targetKey)] ||\n          null;\n      if (!own && !canViewProfileContent(profile)) {\n        qsa(\"[data-dsd-relationship-layer]\", root).forEach(function (node) {\n          setProfileRestrictedSurfaceState(node, !0);\n        });\n        qsa(\n          '[data-dsd-profile-modal-panel=\"followers\"], [data-dsd-profile-modal-panel=\"following\"], [data-dsd-profile-modal-panel=\"favorites\"], [data-dsd-profile-modal-panel=\"saved\"], [data-dsd-profile-relationship-modal]',\n          root,\n        ).forEach(function (node) {\n          ((node.hidden = !0), (node.innerHTML = \"\"));\n        });\n        return;\n      }\n      if (!own && profile && profile.uid && state.followingByUid[profile.uid]) {\r\n        var viewerFollower = {\r\n            sourceUid: actorRelationshipIdentity(),\r\n            sourceProfileKey: profileKey(),\r\n            targetUid: profile.uid,\r\n            targetProfileKey: targetKey,\r\n            state: \"active\",\r\n          },\r\n          viewerFollowerHtml = relationshipCard(viewerFollower, \"followers\");\r\n        viewerFollowerHtml &&\r\n          followerCards.join(\"\").indexOf('data-keywords=\"followers') === -1 &&\r\n          (followerCards = [viewerFollowerHtml].concat(followerCards));\r\n      }\r\n      var relationshipFollowersLoaded = own\r\n          ? state.followersRecordsLoaded\r\n          : state.viewedFollowersRecordsLoaded,\r\n        relationshipFollowingLoaded = own\r\n          ? state.followingRecordsLoaded\r\n          : state.viewedFollowingRecordsLoaded,\r\n        profileStatsAuthoritative = profile.profileStatsHydrated === !0,\r\n        profileAlbumsLoaded =\r\n          state.profileAlbumsLoadedKey ===\r\n          targetKey + \":\" + (hasCustomer() ? \"signed\" : \"public\") + \":profile\",\r\n        counts = {\r\n          followers:\r\n            canonicalRelationshipStats && canonicalRelationshipStats.fetchedAt\r\n              ? Number(canonicalRelationshipStats.followerCount || 0)\r\n              : relationshipFollowersLoaded\r\n                ? relationshipFollowerRecords.length\r\n                : null,\r\n          following:\r\n            canonicalRelationshipStats && canonicalRelationshipStats.fetchedAt\r\n              ? Number(canonicalRelationshipStats.followingCount || 0)\r\n              : relationshipFollowingLoaded\r\n                ? relationshipFollowingRecords.length\r\n                : null,\r\n          favorites: own\n            ? state.favoritesRecordsLoaded\n              ? canonicalRelationshipRecords(\n                  state.favoritesRecords,\n                  \"favorites\",\n                ).length\n              : null\n            : state.viewedFavoritesRecordsLoaded\n              ? favoriteCards.length\n              : profileStatsAuthoritative\n              ? Number(\n                  profile.favoriteCount != null\n                    ? profile.favoriteCount\n                    : profile.favoritesCount != null\r\n                      ? profile.favoritesCount\r\n                      : 0,\r\n                )\r\n              : favoriteCards.length,\r\n          saved: own\n            ? state.savedItemsLoaded\n              ? activeSavedItems(state.savedItems).length\n              : null\n            : state.viewedSavedItemsLoaded\n              ? savedCards.length\n              : profileStatsAuthoritative\n              ? Number(\n                  profile.savedCount != null\r\n                    ? profile.savedCount\r\n                    : profile.savesCount != null\r\n                      ? profile.savesCount\r\n                      : 0,\r\n                )\r\n              : savedCards.length,\r\n          albums:\r\n            profileAlbumsLoaded && !state.profileAlbumsPending\r\n              ? Number(state.profileAlbumCount || 0)\r\n              : null,\r\n          posts: postsForProfile.length,\r\n          media: mediaCount,\r\n        };\r\n      (qsa(\"[data-dsd-relationship-tab]\", root).forEach(function (btn) {\r\n        var key = btn.getAttribute(\"data-dsd-relationship-tab\"),\r\n          targetReady = targetIdentity && targetIdentity.ready !== !1;\r\n        ((btn.disabled = !targetReady),\r\n          btn.setAttribute(\"aria-disabled\", targetReady ? \"false\" : \"true\"));\r\n        var strong = qs(\"strong\", btn);\r\n        strong &&\r\n          (strong.textContent =\r\n            counts[key] == null ? \"\\u2014\" : String(counts[key]));\r\n      }),\r\n        qsa('[data-dsd-profile-content-tab=\"media\"] strong', root).forEach(\r\n          function (n) {\r\n            n.textContent = String(mediaCount);\r\n          },\r\n        ),\r\n        setRelationshipPanel(\r\n          root,\r\n          \"followers\",\r\n          pendingFollowerCards.concat(followerCards).join(\"\"),\r\n          Number(counts.followers || 0) || pendingFollowerCards.length\r\n            ? \"Public follower details are unavailable.\"\r\n            : \"Followers appear here.\",\r\n        ),\r\n        setRelationshipPanel(\r\n          root,\r\n          \"following\",\r\n          followingCards.join(\"\"),\r\n          Number(counts.following || 0)\r\n            ? \"Public following details are unavailable.\"\r\n            : \"Following appears here.\",\r\n        ),\r\n        setRelationshipPanel(\r\n          root,\r\n          \"favorites\",\r\n          favoriteCards.join(\"\"),\r\n          counts.favorites\r\n            ? \"Public favorite details are unavailable.\"\r\n            : \"Public-safe favorite profiles appear here.\",\r\n        ),\r\n        setRelationshipPanel(\r\n          root,\r\n          \"saved\",\r\n          savedCards.join(\"\"),\r\n          counts.saved\r\n            ? \"Public saved item details are unavailable.\"\r\n            : \"Public-safe saved posts and media appear here.\",\r\n        ),\r\n        targetIdentity.ready &&\r\n          targetKey &&\r\n          !(\r\n            canonicalRelationshipStats && canonicalRelationshipStats.fetchedAt\r\n          ) &&\r\n          hydrateDiscoveryStatsForProfile(profile).then(function () {\r\n            var hydratedStats =\r\n              state.discoveryStatsByKey[normalizedProfileKeyValue(targetKey)] ||\r\n              null;\r\n            hydratedStats && hydratedStats.fetchedAt && renderRelationships();\r\n          }));\r\n    }\r\n  }\r\n  function searchResultCard(type, title, body, href, chips, iconText) {\r\n    var safeTitle = publicDisplayText(title || type, type),\r\n      safeBody = publicDisplayText(body || \"\", \"Community result\"),\r\n      safeChips = (chips || [])\r\n        .map(function (chip) {\r\n          return publicDisplayText(chip, \"\");\r\n        })\r\n        .filter(Boolean);\r\n    return (\r\n      '<article class=\"dsd-search388__card\" data-dsd-search388-item data-type=\"' +\r\n      html(type) +\r\n      '\" data-keywords=\"' +\r\n      html([safeTitle, safeBody].concat(safeChips).join(\" \")) +\r\n      '\"><div class=\"dsd-search388__icon\">' +\r\n      html(iconText || type.charAt(0).toUpperCase()) +\r\n      '</div><div class=\"dsd-search388__body\"><span class=\"dsd-search388__type\">' +\r\n      html(type) +\r\n      \"</span><h2>\" +\r\n      html(safeTitle) +\r\n      \"</h2><p>\" +\r\n      html(safeBody) +\r\n      '</p><div class=\"dsd-search388__chips\">' +\r\n      safeChips\r\n        .slice(0, 4)\r\n        .map(function (chip) {\r\n          return \"<span>\" + html(chip) + \"</span>\";\r\n        })\r\n        .join(\"\") +\r\n      '</div></div><a href=\"' +\r\n      html(href) +\r\n      '\">Open</a></article>'\r\n    );\r\n  }\r\n  function renderSearchIndex() {\r\n    var results = qs(\"[data-dsd-search388-results]\");\r\n    if (results) {\r\n      publishPublicProfiles();\r\n      var searchSignature = JSON.stringify({\r\n        role: canModerate() ? \"founder\" : hasCustomer() ? \"member\" : \"public\",\r\n        profiles: (state.publicProfiles || [])\r\n          .slice(0, 24)\r\n          .map(function (profile) {\r\n            return [\r\n              profile.profileKey || profile.handle || \"\",\r\n              profile.updatedAt || \"\",\r\n              profile.searchable !== !1,\r\n            ];\r\n          }),\r\n        posts: (state.posts || []).slice(0, 24).map(function (post) {\r\n          return [\r\n            postKey(post),\r\n            post.updatedAt || post.createdAt || \"\",\r\n            normalizedRecordState(post),\r\n          ];\r\n        }),\r\n        stories: visibleStories()\r\n          .slice(0, 24)\r\n          .map(function (story) {\r\n            return [\r\n              story.storyId || story.id || \"\",\r\n              story.updatedAt || story.createdAt || \"\",\r\n              normalizedRecordState(story),\r\n            ];\r\n          }),\r\n      });\r\n      if (!(\r\n        results.getAttribute(\"data-dsd-search-index-signature\") ===\r\n          searchSignature && qs(\"[data-dsd-search388-item]\", results)\r\n      )) {\r\n        (results.setAttribute(\r\n          \"data-dsd-search-index-signature\",\r\n          searchSignature,\r\n        ),\r\n          qsa(\r\n            \"[data-dsd-search388-item], [data-dsd-search388-empty-state]\",\r\n            results,\r\n          ).forEach(function (n) {\r\n            n.remove();\r\n          }));\r\n        var cards = [];\r\n        (state.publicProfiles.slice(0, 24).forEach(function (profile) {\r\n          var key = profile.profileKey || profile.handle || \"\";\r\n          cards.push(\r\n            searchResultCard(\r\n              \"users\",\r\n              profile.displayName || key || \"DSD member\",\r\n              profile.bio ||\r\n                \"@\" +\r\n                  publicHandleText(key, profile.displayName || \"\", \"member\"),\r\n              profileRouteHref(key),\r\n              [\r\n                \"profile\",\r\n                publicHandleText(key, profile.displayName || \"\", \"member\"),\r\n              ],\r\n              initials(profile.displayName || key),\r\n            ),\r\n          );\r\n        }),\r\n          state.posts\r\n            .map(publicRenderablePost)\r\n            .filter(function (post) {\r\n              return post && !isRestrictedShellRecord(post);\r\n            })\r\n            .slice(0, 24)\r\n            .forEach(function (post) {\r\n              var postId = post.postId || post.id || \"\";\r\n              cards.push(\r\n                searchResultCard(\r\n                  \"posts\",\r\n                  post.body || \"Post\",\r\n                  post.body || \"\",\r\n                  postId ? postPermalink(postId) : \"/pages/feed\",\r\n                  [\r\n                    \"post\",\r\n                    post.authorProfileKey || \"\",\r\n                    post.contentRating || \"standard\",\r\n                  ],\r\n                  \"P\",\r\n                ),\r\n              );\r\n            }),\r\n          visibleStories()\r\n            .filter(function (s) {\r\n              return (\r\n                publicRecordVisible(s) &&\r\n                canViewClassified(s) &&\r\n                (s.status === \"approved\" ||\r\n                  recordOwnedByCurrentProfile(s) ||\r\n                  canModerate())\r\n              );\r\n            })\r\n            .slice(0, 24)\r\n            .forEach(function (story) {\r\n              var storyId = story.storyId || story.id || \"\";\r\n              cards.push(\r\n                searchResultCard(\r\n                  \"stories\",\r\n                  story.body || \"Story\",\r\n                  story.authorProfileKey || story.ownerUid || \"\",\r\n                  storyId\r\n                    ? \"/pages/feed?story=\" + encodeURIComponent(storyId)\r\n                    : \"/pages/feed?story=open\",\r\n                  [\"story\", story.visibility || \"public\"],\r\n                  \"S\",\r\n                ),\r\n              );\r\n            }),\r\n          cards.length\r\n            ? results.insertAdjacentHTML(\"beforeend\", cards.join(\"\"))\r\n            : qs(\"[data-dsd-search-result]\", results) ||\r\n              (results.innerHTML =\r\n                '<article class=\"dsd-search388__card\" data-dsd-search388-empty-state><div class=\"dsd-search388__icon\">0</div><div class=\"dsd-search388__body\"><span class=\"dsd-search388__type\">Search</span><h2>No results yet</h2><p>Profiles, posts, and stories appear here as DSD grows.</p><div class=\"dsd-search388__chips\"><span>profiles</span><span>posts</span><span>stories</span></div></div><a href=\"/pages/users\">Users</a></article>'));\n        try {\r\n          window.dispatchEvent(\r\n            new CustomEvent(\"dsd:search-index:updated\", {\r\n              detail: { version: VERSION, items: cards.length },\r\n            }),\r\n          );\r\n        } catch (e) {}\r\n      }\r\n    }\r\n  }\r\n  function prefillMessageComposer() {\r\n    var form = qs(\"[data-dsd-message-form]\");\r\n    if (form) {\r\n      var recipient = queryParam(\"recipientUid\") || queryParam(\"recipient\") || queryParam(\"profile\"),\n        profile = queryParam(\"profile\"),\n        resolved = recipientIdentity(recipient, profile);\n      if (recipient) {\r\n        var routeCid = canonicalConversationId(\r\n          resolved.uid || recipient,\r\n          profile || resolved.key || \"\",\r\n        );\r\n        (state.activeConversationId !== routeCid &&\r\n          beginMessageThreadSession(routeCid, !0),\r\n          (state.activeConversationId = routeCid),\r\n          qs('[name=\"recipientUid\"]', form) &&\r\n            (qs('[name=\"recipientUid\"]', form).value =\r\n              resolved.uid || recipient),\r\n          qs('[name=\"recipientProfileKey\"]', form) &&\r\n            (qs('[name=\"recipientProfileKey\"]', form).value =\r\n              resolved.key || profile || recipient),\r\n          qs('[name=\"conversationId\"]', form) &&\r\n            (qs('[name=\"conversationId\"]', form).value = routeCid));\r\n        var routeName = qs(\"[data-dsd-msg384-active-name]\"),\r\n          routeHandle = qs(\"[data-dsd-msg384-active-handle]\");\r\n        (routeName &&\r\n          (routeName.textContent =\r\n            resolved.name || (profile ? \"@\" + profile : \"Direct message\")),\r\n          routeHandle &&\r\n            (routeHandle.textContent =\r\n              \"@\" +\r\n              publicHandleText(\r\n                resolved.key || profile || recipient,\r\n                resolved.name || profile,\r\n                \"member\",\r\n              )),\r\n          hydrateConversationMessages(routeCid));\r\n        return;\r\n      }\r\n      var activeCid =\r\n          queryParam(\"conversationId\") ||\r\n          (recipient ? \"\" : state.activeConversationId || \"\"),\r\n        activeConversation = activeCid\r\n          ? state.conversations.filter(function (c) {\r\n              return (c.conversationId || c.id) === activeCid;\r\n            })[0]\r\n          : null;\r\n      if (!recipient && activeConversation) {\r\n        var peer = conversationPeer(activeConversation);\r\n        ((recipient = peer.uid || \"\"),\r\n          (profile = peer.key || profile),\r\n          (resolved = peer));\r\n      }\r\n      (recipient &&\r\n        qs('[name=\"recipientUid\"]', form) &&\r\n        (qs('[name=\"recipientUid\"]', form).value = resolved.uid || recipient),\r\n        qs('[name=\"conversationId\"]', form) &&\r\n          (qs('[name=\"conversationId\"]', form).value = activeConversation\r\n            ? activeConversation.conversationId ||\r\n              activeConversation.id ||\r\n              activeCid\r\n            : recipient\r\n              ? canonicalConversationId(\r\n                  resolved.uid || recipient,\r\n                  profile || resolved.key || \"\",\r\n                )\r\n              : \"\"));\r\n      var name = qs(\"[data-dsd-msg384-active-name]\"),\r\n        handle = qs(\"[data-dsd-msg384-active-handle]\");\r\n      (recipient &&\r\n        name &&\r\n        (name.textContent =\r\n          resolved.name || (profile ? \"@\" + profile : \"Direct message\")),\r\n        recipient &&\r\n          handle &&\r\n          (handle.textContent =\r\n            \"@\" +\r\n            publicHandleText(\r\n              resolved.key || profile || recipient,\r\n              resolved.name || profile,\r\n              \"member\",\r\n            )));\r\n    }\r\n  }\r\n  function renderComposer() {\r\n    qsa(\"[data-dsd-profile-publisher], #dsd-composer-container\").forEach(\r\n      function (host) {\r\n        if (host) {\r\n          var isProfilePublisher = host.hasAttribute(\r\n              \"data-dsd-profile-publisher\",\r\n            ),\r\n            shell = host.closest(\".dsd-feed368__composer\");\r\n          if (isProfilePublisher && !isOwnProfileRoute()) {\r\n            (shell && (shell.hidden = !0),\r\n              (host.hidden = !0),\r\n              (host.innerHTML = \"\"),\r\n              host.setAttribute(\"aria-hidden\", \"true\"),\r\n              host.setAttribute(\r\n                \"data-dsd-public-view-publisher-deconstructed\",\r\n                BUILD,\r\n              ),\r\n              (host.style.display = \"none\"),\r\n              delete host.dataset.dsdFirebaseComposer,\r\n              delete host.dataset.dsdCanonicalComposerMounted);\r\n            return;\r\n          }\r\n          if (!hasCustomer()) {\r\n            (shell && (shell.hidden = !0),\r\n              (host.hidden = !0),\r\n              isProfilePublisher || (host.innerHTML = \"\"),\r\n              delete host.dataset.dsdFirebaseComposer,\r\n              delete host.dataset.dsdCanonicalComposerMounted);\r\n            return;\r\n          }\r\n          if (!canUseSocialActions()) {\r\n            (shell && (shell.hidden = !state.bridgeChecked),\r\n              (host.hidden = !state.bridgeChecked),\r\n              state.bridgeChecked &&\r\n                !isProfilePublisher &&\r\n                (host.innerHTML =\r\n                  '<section class=\"dsd-social-private-auth-gate\" data-dsd-owner=\"LaunchSocialActivation\" aria-busy=\"true\"><p data-dsd-activation-status></p></section>'),\r\n              delete host.dataset.dsdFirebaseComposer,\r\n              delete host.dataset.dsdCanonicalComposerMounted);\r\n            return;\r\n          }\r\n          if (\r\n            (clearStaleConnectionStatus(),\r\n            host.dataset.dsdCanonicalComposerMounted === \"true\")\r\n          ) {\r\n            (qsa(\"input, textarea, select, button\", host).forEach(\r\n              function (el) {\r\n                el.disabled = !canUseSocialActions();\r\n              },\r\n            ),\r\n              isProfilePublisher &&\r\n                syncProfilePublisherIdentity(\r\n                  host.closest(\"[data-dsd-user-profile]\") || document,\r\n                  displayName(),\r\n                  profileKey(),\r\n                ),\r\n              syncComposerIdentity(host),\n              bindSocialDraftRecovery(qs(\"form\", host)),\n              refreshPublicationControls(host),\n              updateComposerCounters(host),\r\n              updateAllComposerMediaControls(host),\r\n              hydrateAvatarMedia(host),\r\n              bindPostMentionAutocomplete(host),\r\n              shell && (shell.hidden = !canUseSocialActions()),\r\n              (host.hidden = !canUseSocialActions()),\r\n              focusComposerFromRoute());\r\n            return;\r\n          }\r\n          (delete host.dataset.dsdFirebaseComposer,\r\n            (host.dataset.dsdCanonicalComposerMounted = \"true\"),\r\n            (host.innerHTML = isProfilePublisher\r\n              ? '<form class=\"dsd-post-composer dsd-canonical-composer dsd-profile-inline-composer\" data-dsd-canonical-composer data-dsd-canonical-compact-composer data-dsd-profile-inline-post-composer><div class=\"dsd-up315__composer-head\">' +\r\n                currentComposerAvatarHTML() +\r\n                \"<div><strong>\" +\r\n                html(composerDisplayName()) +\r\n                \"</strong>\" +\r\n                composerHandleHTML() +\r\n                '</div></div><textarea name=\"body\" rows=\"1\" maxlength=\"' +\r\n                html(MAX.body) +\r\n                '\" aria-label=\"Post text\" placeholder=\"What is happening?\"></textarea>' +\n                postPollComposerHTML() +\n                '<div class=\"dsd-up315__composer-tools dsd-composer-media-actions\" aria-label=\"Attach media\">' +\n                composerMixedMediaButton(!0, \"Add post media\", 4) +\r\n                composerPolicyTools(\"Post\") +\r\n                '</div><div class=\"dsd-up315__composer-foot\">' +\r\n                composerCountHTML(MAX.body) +\r\n                '<button type=\"submit\">Post</button></div></form>'\r\n              : '<form class=\"dsd-post-composer dsd-canonical-composer dsd-feed-inline-composer\" data-dsd-canonical-composer data-dsd-canonical-compact-composer data-dsd-feed-inline-post-composer><div class=\"dsd-up315__composer-head\">' +\r\n                currentComposerAvatarHTML() +\r\n                \"<div><strong>\" +\r\n                html(composerDisplayName()) +\r\n                \"</strong>\" +\r\n                composerHandleHTML() +\r\n                '</div></div><textarea name=\"body\" rows=\"1\" maxlength=\"' +\r\n                html(MAX.body) +\r\n                '\" aria-label=\"Post text\" placeholder=\"What is happening?\"></textarea>' +\n                postPollComposerHTML() +\n                '<div class=\"dsd-up315__composer-tools dsd-composer-media-actions\" aria-label=\"Attach media\">' +\n                composerMixedMediaButton(!0, \"Add post media\", 4) +\r\n                composerPolicyTools(\"Post\") +\r\n                '</div><div class=\"dsd-up315__composer-foot\">' +\r\n                composerCountHTML(MAX.body) +\r\n                '<button type=\"submit\">Post</button></div></form>'));\r\n          var form = qs(\"form\", host);\r\n          (syncComposerIdentity(host),\n            hydrateAvatarMedia(host),\n            bindSocialDraftRecovery(form),\n            bindPostMentionAutocomplete(host),\n            refreshPublicationControls(host),\r\n            updateComposerCounters(host),\r\n            updateAllComposerMediaControls(host),\r\n            shell && (shell.hidden = !canUseSocialActions()),\r\n            (host.hidden = !canUseSocialActions()),\r\n            qsa(\"input, textarea, select, button\", form).forEach(function (el) {\r\n              canUseSocialActions() || (el.disabled = !0);\r\n            }),\r\n            focusComposerFromRoute(),\r\n            form.addEventListener(\"submit\", function (ev) {\r\n              ev.preventDefault();\r\n              var media = collectFormFiles(form);\r\n              if (\r\n                validatePublicationMediaSelectionIntegrity(\r\n                  form,\r\n                  media,\r\n                  \"post\",\r\n                ) &&\r\n                validatePostMediaFiles(media, form)\r\n              ) {\r\n                var policy = policyFromSelectValue(\n                  (qs('[name=\"visibility\"]', form) || {}).value || \"public\",\n                ),\n                  poll = postPollInput(form);\n                if (poll === !1) return;\n                var recipientKeys =\n                  policy.visibility === \"private\"\n                    ? privatePostRecipientKeys(form, !0)\n                    : [];\n                if (recipientKeys === null) return;\n                var publicationId = canonicalComposerPublicationId(form, \"post\");\r\n                composerBusy(\n                  form,\r\n                  media.length ? \"Saving media and post...\" : \"Saving post...\",\r\n                  function () {\r\n                    return createPost({\r\n                      publicationId: publicationId,\r\n                      body: (qs('[name=\"body\"]', form) || {}).value || \"\",\r\n                      caption: \"\",\r\n                      visibility: policy.visibility,\r\n                      contentRating: policy.contentRating,\r\n                      accessGate: policy.accessGate,\n                      media: media,\n                      poll: poll,\n                      recipientProfileKeys: recipientKeys,\n                    });\n                  },\r\n                ).then(function (result) {\r\n                  result &&\n                    (form.reset(),\n                    clearCanonicalComposerPublicationId(form, \"post\"),\r\n                    clearSocialDraft(form),\n                    resetPostPollComposer(form),\n                    delete form.dataset.dsdMediaSelectionExpected,\n                    removeFilePreviews(form),\r\n                    shell && (shell.hidden = !1),\r\n                    (host.hidden = !1),\r\n                    syncComposerIdentity(host));\r\n                });\r\n              }\r\n            }));\r\n        }\r\n      },\r\n    );\r\n  }\r\n  function profilePatchFromSetupForm(setupForm) {\n    var agePolicy = profileAgePolicy(setupForm),\r\n      setupDisplayName = formControl(setupForm, \"displayName\"),\r\n      setupHandle = formControl(setupForm, \"handle\"),\r\n      setupBio = formControl(setupForm, \"bio\"),\n      setupExternalUrl = formControl(setupForm, \"externalUrl\"),\n      setupConversationStarterPrompt = formControl(\n        setupForm,\n        \"conversationStarterPrompt\",\n      ),\n      setupConversationStarterAnswer = formControl(\n        setupForm,\n        \"conversationStarterAnswer\",\n      ),\n      setupMapStarSignature = qs(\n        'input[name=\"mapStarSignature\"]:checked',\n        setupForm,\n      ),\n      setupCity = formControl(setupForm, \"locationCity\"),\r\n      setupState = formControl(setupForm, \"locationState\"),\r\n      setupCountry = formControl(setupForm, \"locationCountry\"),\r\n      setupAppearInNearby = formControl(setupForm, \"appearInNearby\"),\r\n      setupShowCurrentCity = formControl(setupForm, \"showCurrentCityOnProfile\"),\n      setupInvisibleMode = formControl(setupForm, \"locationInvisibleMode\"),\r\n      setupAllowReadReceipts = formControl(setupForm, \"allowReadReceipts\"),\r\n      setupVisibility = formControl(setupForm, \"visibility\"),\r\n      setupAdultContent = formControl(setupForm, \"adultContentEnabled\"),\r\n      selectedPolicy = policyFromSelectValue(\r\n        (setupVisibility && setupVisibility.value) || \"public\",\r\n      ),\r\n      submittedHandle = nonPlaceholderProfileKey(\r\n        (setupHandle && setupHandle.value) ||\r\n          (state.profile && state.profile.handle) ||\r\n          profileKey(),\r\n      ),\r\n      profilePatch = {\r\n        displayName:\r\n          (setupDisplayName && setupDisplayName.value) || displayName(),\r\n        profileKey:\r\n          nonPlaceholderProfileKey(\r\n            (state.profile &&\r\n              (state.profile.profileKey || state.profile.profile_key)) ||\r\n              profileKey(),\r\n          ) || submittedHandle,\r\n        handle: submittedHandle,\r\n        bio: (setupBio && setupBio.value) || \"\",\n        locationCity: (setupCity && setupCity.value) || \"\",\r\n        locationState: (setupState && setupState.value) || \"\",\r\n        locationCountry: (setupCountry && setupCountry.value) || \"United States\",\r\n        useApproximateLocationForNearby: profileBooleanFlag(\n          state.profile || {},\n          [\"useApproximateLocationForNearby\", \"use_approximate_location_for_nearby\"],\n          !0,\n        ),\n        appearInNearby: !0,\n        showCurrentCityOnProfile: !0,\n        locationPreferencesInitialized: !0,\r\n        locationInvisibleMode:\r\n          hasDsdPlus() && !!(setupInvisibleMode && setupInvisibleMode.checked),\r\n        allowReadReceipts:\r\n          !setupAllowReadReceipts || setupAllowReadReceipts.checked,\r\n        birthdate: agePolicy.birthdate,\r\n        age: agePolicy.age,\r\n        ageVerified: agePolicy.over18,\r\n        visibility: selectedPolicy.visibility,\r\n        contentRating: selectedPolicy.contentRating,\r\n        accessGate: selectedPolicy.accessGate,\r\n        adultContentEnabled: !!(\r\n          agePolicy.over18 &&\r\n          setupAdultContent &&\r\n          setupAdultContent.checked\r\n        ),\r\n      };\n    if (setupExternalUrl) {\n      profilePatch.externalUrl = setupExternalUrl.value || \"\";\n      profilePatch.externalUrlExplicit = !0;\n    }\n    if (setupConversationStarterPrompt || setupConversationStarterAnswer) {\n      profilePatch.conversationStarterPrompt =\n        (setupConversationStarterPrompt && setupConversationStarterPrompt.value) ||\n        \"\";\n      profilePatch.conversationStarterAnswer = String(\n        (setupConversationStarterAnswer && setupConversationStarterAnswer.value) ||\n          \"\",\n      )\n        .trim()\n        .slice(0, 160);\n    }\n    if (setupMapStarSignature) {\n      profilePatch.mapStarSignature = setupMapStarSignature.value || \"none\";\n    }\n    return profilePatch;\n  }\n  function setupConsentMetadata(setupForm) {\r\n    var existing = Object.assign(\r\n        {},\r\n        state.profile &&\r\n          state.profile.metadata &&\r\n          typeof state.profile.metadata === \"object\"\r\n          ? state.profile.metadata\r\n          : {},\r\n      ),\r\n      policies = formControl(setupForm, \"policiesAcknowledged\"),\r\n      locationFeature = formControl(\r\n        setupForm,\r\n        \"useApproximateLocationForNearby\",\r\n      ),\r\n      now = new Date().toISOString();\r\n    if (policies && policies.checked) {\r\n      existing.onboardingLegal = Object.assign(\r\n        {},\r\n        existing.onboardingLegal || {},\r\n        { policiesAcknowledged: !0, policiesAcknowledgedAt: now },\r\n      );\r\n    }\r\n    if (policies && policies.checked)\r\n      existing.locationServicesConsent = Object.assign(\r\n        {},\r\n        existing.locationServicesConsent || {},\r\n        {\r\n          acknowledged: !0,\r\n          enabled: !!(locationFeature && locationFeature.checked),\r\n          source: \"onboarding-submission\",\r\n          updatedAt: now,\r\n        },\r\n      );\r\n    return existing;\r\n  }\r\n  function validateSetupConsent(setupForm) {\n    var policies = formControl(setupForm, \"policiesAcknowledged\");\r\n    if (policies && policies.required && !policies.checked) {\r\n      policies.setCustomValidity(\"Acknowledge the store policies to continue.\");\r\n      policies.reportValidity();\r\n      return !1;\r\n    }\r\n    policies && policies.setCustomValidity(\"\");\r\n    return !0;\n  }\n  function validateSetupRequiredFields(setupForm) {\n    if (\n      !setupForm ||\n      !setupForm.matches(\"[data-dsd-profile-completion-form]\")\n    )\n      return !0;\n    var displayNameField = formControl(setupForm, \"displayName\"),\n      handleField = formControl(setupForm, \"handle\"),\n      cityField = formControl(setupForm, \"locationCity\"),\n      stateField = formControl(setupForm, \"locationState\"),\n      countryField = formControl(setupForm, \"locationCountry\"),\r\n      displayNameValue = String((displayNameField && displayNameField.value) || \"\").trim(),\n      handleValue = String((handleField && handleField.value) || \"\")\n        .trim()\n        .replace(/^@+/, \"\"),\n      requiredFailure = null,\n      birthdate = formControl(setupForm, \"birthdate\"),\n      age = formControl(setupForm, \"age\"),\n      policy = profileAgePolicy(setupForm),\n      valid = policy.age >= 13;\n    [displayNameField, handleField, countryField, cityField, stateField].forEach(function (field) {\r\n      field && field.setCustomValidity(\"\");\n    });\n    if (!displayNameValue || unsafeProvisioningProfileIdentity(displayNameValue))\n      requiredFailure = {\n        field: displayNameField,\n        message: \"Enter the public display name you want to use on DSD.\",\n      };\n    else if (\n      !/^[a-z0-9._-]{2,80}$/i.test(handleValue) ||\n      unsafeProvisioningProfileIdentity(handleValue)\n    )\n      requiredFailure = {\n        field: handleField,\n        message: \"Choose a handle using 2-80 letters, numbers, periods, underscores, or hyphens.\",\n      };\n    else if (\r\n      !String((countryField && countryField.value) || \"\").trim() ||\r\n      String((countryField && countryField.value) || \"\") !== \"United States\"\r\n    )\r\n      requiredFailure = {\r\n        field: countryField,\r\n        message: \"Choose a supported country to finish your profile.\",\r\n      };\r\n    else if (!String((cityField && cityField.value) || \"\").trim())\r\n      requiredFailure = {\n        field: cityField,\n        message: \"Enter your current city to finish your profile.\",\n      };\n    else if (!String((stateField && stateField.value) || \"\").trim())\n      requiredFailure = {\n        field: stateField,\n        message: \"Enter your state to finish your profile.\",\n      };\n    else if (\r\n      !normalizeLocationSuggestion(\r\n        String(cityField.value || \"\") + \", \" + String(stateField.value || \"\"),\r\n      )\r\n    )\r\n      requiredFailure = {\r\n        field: cityField,\r\n        message: \"Choose a city and state from the supported hometown list.\",\r\n      };\r\n    if (requiredFailure && requiredFailure.field) {\n      requiredFailure.field.setCustomValidity(requiredFailure.message);\n      requiredFailure.field.reportValidity();\n      return !1;\n    }\n    birthdate && birthdate.setCustomValidity(\"\");\n    age && age.setCustomValidity(\"\");\n    if (valid) return !0;\n    var target = birthdate || age;\n    if (target) {\n      target.setCustomValidity(\n        \"Enter a valid birthdate or age of at least 13 to continue.\",\n      );\n      target.reportValidity();\n    }\n    return !1;\n  }\n  function refreshProfileSaveSurfaces(savedProfile, root) {\n    if (savedProfile) {\n      var profileRoot =\n        root && root.querySelector\r\n          ? root\r\n          : qs(\"[data-dsd-user-profile]\") || document;\r\n      ((state.sessionSetupRequired = !1),\n        (state.sessionProvisioningReady = !0),\n        (state.sessionProfileKey = nonPlaceholderProfileKey(\n          savedProfile.profileKey || savedProfile.profile_key || savedProfile.handle || \"\",\n        )),\n        cacheOwnerPrivateProfileCapabilities(savedProfile),\n        applyProfileIdentityCascade(savedProfile),\n        (state.profile = profileWithPublicMirror(savedProfile) || savedProfile),\n        (state.profileSetupResolution = {\n          generation: Number(\n            (state.profileSetupResolution &&\n              state.profileSetupResolution.generation) ||\n              0,\n          ),\n          actorKey: profileSetupActorKey(),\n          status: \"COMPLETE\",\n          source: \"profile-save\",\n        }),\n        syncProfileCompletionOverlay(!1, !0),\n        renderProfileIdentity(),\r\n        renderComposer(),\r\n        renderRelationships(),\r\n        renderDiscovery(),\r\n        renderSearchIndex(),\r\n        hydrateAvatarMedia(profileRoot),\r\n        hydrateProfileCardMedia(profileRoot),\r\n        hydrateMediaReads(profileRoot),\r\n        claim(\"profile-save:surfaces-refreshed\", {\r\n          profileKey:\r\n            (state.profile &&\r\n              (state.profile.profileKey || state.profile.handle)) ||\r\n            \"\",\r\n          owner: \"LaunchSocialActivation.ProfileRenderer\",\r\n          build: BUILD,\r\n        }));\r\n    }\r\n  }\r\n  function handleProfileSetupSubmit(form, root) {\n    if (!form) return Promise.resolve(null);\n    if (!validateSetupRequiredFields(form)) return Promise.resolve(null);\n    if (!validateSetupConsent(form)) return Promise.resolve(null);\n    var profileRoot =\r\n        form.closest(\"[data-dsd-user-profile]\") || root || document,\r\n      privateMetadata = setupConsentMetadata(form),\r\n      profilePatch = profilePatchFromSetupForm(form);\r\n    profilePatch.metadata = privateMetadata;\n    return composerBusy(\n      form,\n      \"Saving profile...\",\n      createOrUpdateProfile(profilePatch).then(function (saved) {\n        if (!saved) return saved;\n        saved.metadata = privateMetadata;\n        state.profile && (state.profile.metadata = privateMetadata);\n        return saved;\n      }),\n    ).then(function (saved) {\n      return (\r\n        saved &&\r\n          (qsa(\"input, textarea, select\", form).forEach(function (field) {\r\n            delete field.dataset.dsdUserEdited;\r\n          }),\r\n          refreshProfileSaveSurfaces(saved, profileRoot)),\r\n        saved &&\r\n          profileRoot &&\r\n          profileRoot.querySelector &&\r\n          profileRoot.querySelector(\"[data-dsd-profile-modal-layer]\") &&\r\n          closeProfileModal(profileRoot),\r\n        saved\r\n      );\n    });\n  }\n  function syncProfileSetupForms(root) {\n    function syncTextControl(field, value) {\r\n      field &&\r\n        (field === document.activeElement ||\r\n          field.dataset.dsdUserEdited === \"true\" ||\r\n          (field.value = value || \"\"));\r\n    }\r\n    function syncCheckboxControl(field, checked) {\r\n      field &&\r\n        (field === document.activeElement ||\r\n          field.dataset.dsdUserEdited === \"true\" ||\r\n          (field.checked = !!checked));\r\n    }\r\n    function bindDirtyControl(field) {\r\n      !field ||\r\n        field.dataset.dsdDirtyBound === \"true\" ||\r\n        ((field.dataset.dsdDirtyBound = \"true\"),\r\n        field.addEventListener(\"input\", function () {\r\n          field.dataset.dsdUserEdited = \"true\";\r\n        }),\r\n        field.addEventListener(\"change\", function () {\r\n          field.dataset.dsdUserEdited = \"true\";\r\n        }));\r\n    }\r\n    function syncAdultPreference(form) {\r\n      var adultContentField = formControl(form, \"adultContentEnabled\");\r\n      if (!(!form || !adultContentField)) {\r\n        var policy = profileAgePolicy(form),\r\n          ageStatus = qs(\"[data-dsd-age-verification-status]\", form);\r\n        ((adultContentField.disabled = !policy.over18),\r\n          policy.over18 || (adultContentField.checked = !1));\r\n        if (ageStatus) {\r\n          ageStatus.textContent = policy.over18\r\n            ? \"Age verified for 18+ profile features.\"\r\n            : policy.age >= 13\r\n              ? \"Age saved. 18+ profile features remain unavailable.\"\r\n              : \"Enter a birthdate or age to verify eligibility.\";\r\n          ageStatus.setAttribute(\r\n            \"data-dsd-age-verified\",\r\n            policy.over18 ? \"true\" : \"false\",\r\n          );\r\n        }\r\n        var row = adultContentField.closest(\"[data-dsd-adult-content-row]\");\r\n        (row &&\r\n          row.setAttribute(\r\n            \"data-dsd-adult-eligible\",\r\n            policy.over18 ? \"true\" : \"false\",\r\n          ),\r\n          refreshPublicationControls(\r\n            form.closest(\"[data-dsd-user-profile]\") || document,\r\n          ));\r\n      }\r\n    }\r\n    (qsa(\"[data-dsd-profile-setup-form]\", root || document).forEach(\r\n      function (form) {\r\n        if (form) {\r\n          var ownerPrivateProfile =\r\n              isOwnProfileRoute() && state.profile ? state.profile : null,\r\n            fallbackProfile = currentComposerProfile\r\n              ? currentComposerProfile()\r\n              : null,\r\n            currentProfile =\n              mergeOwnerPrivateCapabilitySnapshot(\n                profileWithPublicMirror(\n                  ownerPrivateProfile || fallbackProfile || state.profile || {},\n                ) ||\n                  ownerPrivateProfile ||\n                  fallbackProfile ||\n                  state.profile ||\n                  {},\n              ) ||\n              ownerPrivateProfile ||\n              fallbackProfile ||\r\n              state.profile ||\r\n              {},\r\n            currentDisplayName = publicDisplayName(\n              currentProfile.displayName ||\n                currentProfile.display_name ||\n                displayName(),\n              displayName() || \"DSD member\",\n            ),\n            currentProfileKey = nonPlaceholderProfileKey(\r\n              currentProfile.handle ||\r\n                currentProfile.profileKey ||\r\n                currentProfile.profile_key ||\r\n                profileKey(),\r\n            ),\r\n            displayNameField = formControl(form, \"displayName\"),\r\n            handleField = formControl(form, \"handle\"),\r\n            bioField = formControl(form, \"bio\"),\n            externalUrlField = formControl(form, \"externalUrl\"),\n            conversationStarterPromptField = formControl(\n              form,\n              \"conversationStarterPrompt\",\n            ),\n            conversationStarterAnswerField = formControl(\n              form,\n              \"conversationStarterAnswer\",\n            ),\n            mapStarSignatureFields = qsa(\n              'input[name=\"mapStarSignature\"]',\n              form,\n            ),\n            locationCityField = formControl(form, \"locationCity\"),\r\n            locationStateField = formControl(form, \"locationState\"),\r\n            locationCountryField = formControl(form, \"locationCountry\"),\r\n            appearInNearbyField = formControl(form, \"appearInNearby\"),\r\n            showCurrentCityField = formControl(\n              form,\r\n              \"showCurrentCityOnProfile\",\r\n            ),\r\n            invisibleModeField = formControl(form, \"locationInvisibleMode\"),\r\n            allowReadReceiptsField = formControl(form, \"allowReadReceipts\"),\r\n            policiesAcknowledgedField = formControl(\r\n              form,\r\n              \"policiesAcknowledged\",\r\n            ),\r\n            birthdateField = formControl(form, \"birthdate\"),\n            ageField = formControl(form, \"age\"),\n            visibilityField = formControl(form, \"visibility\"),\n            adultContentField = formControl(form, \"adultContentEnabled\"),\n            initialCompletionForm =\n              form.hasAttribute(\"data-dsd-profile-completion-form\") &&\n              profileSetupIncompleteConfirmed(currentProfile);\n          if (form.hasAttribute(\"data-dsd-profile-completion-form\")) {\n            unsafeProvisioningProfileIdentity(currentDisplayName) &&\n              (currentDisplayName = \"\");\n            unsafeProvisioningProfileIdentity(currentProfileKey) &&\n              (currentProfileKey = \"\");\n          }\n          ([\n            displayNameField,\r\n            handleField,\r\n            bioField,\n            externalUrlField,\n            conversationStarterPromptField,\n            conversationStarterAnswerField,\n          ].concat(mapStarSignatureFields).concat([\n            locationCityField,\n            locationStateField,\r\n            locationCountryField,\r\n            appearInNearbyField,\r\n            showCurrentCityField,\n            invisibleModeField,\r\n            allowReadReceiptsField,\r\n            policiesAcknowledgedField,\r\n            birthdateField,\r\n            ageField,\r\n            visibilityField,\r\n            adultContentField,\n          ]).forEach(bindDirtyControl),\n            syncTextControl(displayNameField, currentDisplayName),\r\n            syncTextControl(handleField, currentProfileKey));\r\n          var visibleBioNode = qs(\r\n              \"[data-dsd-profile-bio], [data-dsd-profile-about]\",\r\n              root || document,\r\n            ),\r\n            visibleBioText = visibleBioNode\r\n              ? String(visibleBioNode.textContent || \"\").trim()\r\n              : \"\";\r\n          (/complete profile setup|profile connection|profile unavailable|discover profiles/i.test(\r\n            visibleBioText,\r\n          ) && (visibleBioText = \"\"),\r\n            syncTextControl(\n              bioField,\n              currentProfile.bio ||\r\n                currentProfile.about ||\r\n                currentProfile.description ||\r\n                currentProfile.profileBio ||\r\n                visibleBioText ||\r\n                \"\",\n            ),\n            syncTextControl(\n              externalUrlField,\n              currentProfile.externalUrl || currentProfile.external_url || \"\",\n            ),\n            syncTextControl(\n              conversationStarterPromptField,\n              currentProfile.conversationStarterPrompt ||\n                currentProfile.conversation_starter_prompt ||\n                \"\",\n            ),\n            syncTextControl(\n              conversationStarterAnswerField,\n              currentProfile.conversationStarterAnswer ||\n                currentProfile.conversation_starter_answer ||\n                \"\",\n            ),\n            mapStarSignatureFields.forEach(function (field) {\n              field.checked =\n                field.value ===\n                (currentProfile.mapStarSignature ||\n                  currentProfile.map_star_signature ||\n                  \"none\");\n            }),\n            syncTextControl(\r\n              locationStateField,\r\n              currentProfile.locationState ||\r\n                currentProfile.location_state ||\r\n                currentProfile.state ||\r\n                \"\",\r\n            ),\r\n            refreshCanonicalLocationCities(\r\n              form,\r\n              currentProfile.locationCity ||\r\n                currentProfile.location_city ||\r\n                currentProfile.city ||\r\n                \"\",\r\n            ),\r\n            syncTextControl(\r\n              locationCountryField,\r\n              currentProfile.locationCountry ||\r\n                currentProfile.location_country ||\r\n                \"United States\",\r\n            ),\r\n            syncCheckboxControl(\r\n              appearInNearbyField,\r\n              profileBooleanFlag(\r\n                currentProfile,\r\n                [\r\n                  \"appearInNearby\",\r\n                  \"appear_in_nearby\",\r\n                  \"nearbyVisible\",\r\n                  \"nearby_visible\",\r\n                  \"discoveryNearbyEnabled\",\r\n                  \"discovery_nearby_enabled\",\r\n                  \"nearbyOptIn\",\r\n                  \"nearby_opt_in\",\r\n                ],\r\n                !0,\r\n              ),\r\n            ),\r\n            syncCheckboxControl(\r\n              showCurrentCityField,\r\n              profileBooleanFlag(\r\n                currentProfile,\r\n                [\r\n                  \"showCurrentCityOnProfile\",\r\n                  \"show_current_city_on_profile\",\r\n                  \"showCurrentCity\",\r\n                  \"show_current_city\",\r\n                ],\r\n                !0,\r\n              ),\r\n            ),\r\n            syncCheckboxControl(\r\n              invisibleModeField,\r\n              hasDsdPlus() &&\r\n                profileBooleanFlag(\r\n                  currentProfile,\r\n                  [\"locationInvisibleMode\", \"location_invisible_mode\"],\r\n                  !1,\r\n                ),\r\n            ),\r\n            syncCheckboxControl(\r\n              allowReadReceiptsField,\r\n              profileAllowsMessageReadReceipts(currentProfile),\r\n            ),\r\n            syncCheckboxControl(\r\n              policiesAcknowledgedField,\r\n              !!(\r\n                currentProfile.metadata &&\r\n                currentProfile.metadata.onboardingLegal &&\r\n                currentProfile.metadata.onboardingLegal.policiesAcknowledged\r\n              ),\r\n            ),\r\n            syncTextControl(\r\n              birthdateField,\r\n              currentProfile.birthdate ||\r\n                (birthdateField && birthdateField.value) ||\r\n                \"\",\r\n            ),\r\n            syncTextControl(\r\n              ageField,\r\n              currentProfile.age ||\r\n                ageFromBirthdateValue(currentProfile.birthdate || \"\") ||\r\n                (ageField && ageField.value) ||\r\n                \"\",\r\n            ),\r\n            syncTextControl(\n              visibilityField,\n              initialCompletionForm\n                ? \"public\"\n                : currentProfile.visibility === \"private\"\n                  ? \"private\"\n                  : \"public\",\n            ),\n            syncCheckboxControl(\r\n              adultContentField,\r\n              !!(\r\n                isOver18() &&\r\n                currentProfile.adultContentEnabled === !0\r\n              ),\r\n            ),\r\n            syncAdultPreference(form),\n            syncProfilePolicyControls(form),\n            form.dataset.dsdAgePreferenceBound ||\r\n              ((form.dataset.dsdAgePreferenceBound = \"true\"),\r\n              [\"birthdate\", \"age\"].forEach(function (name) {\r\n                var field = formControl(form, name);\r\n                (field &&\r\n                  field.addEventListener(\"input\", function () {\r\n                    syncAdultPreference(form);\r\n                  }),\r\n                  field &&\r\n                    field.addEventListener(\"change\", function () {\r\n                      syncAdultPreference(form);\r\n                    }));\r\n              }),\r\n              adultContentField &&\r\n                adultContentField.addEventListener(\"change\", function () {\r\n                  refreshPublicationControls(\r\n                    form.closest(\"[data-dsd-user-profile]\") || document,\r\n                  );\r\n                })));\r\n        }\r\n      },\r\n    ),\r\n      qsa(\"[data-dsd-banner-form]\", root || document).forEach(function (form) {\r\n        var bannerPositionField = formControl(form, \"bannerPosition\");\r\n        (bannerPositionField &&\r\n          bannerPositionField.dataset.dsdUserEdited !== \"true\" &&\r\n          form.dataset.dsdBannerFocusUserEdited !== \"true\" &&\r\n          (bannerPositionField.value = canonicalBannerPosition(\r\n            state.profile || (viewedProfile && viewedProfile()) || {},\r\n          )),\r\n          form.dataset.dsdBannerFocusUserEdited !== \"true\" &&\r\n            setProfileFocalFormValues(\r\n              form,\r\n              \"banner\",\r\n              profileMediaFocus(\r\n                state.profile || (viewedProfile && viewedProfile()) || {},\r\n                \"banner\",\r\n              ),\r\n              !1,\r\n            ));\r\n      }),\r\n      qsa(\"[data-dsd-avatar-form]\", root || document).forEach(function (form) {\r\n        if (form.dataset.dsdAvatarFocusUserEdited !== \"true\") {\r\n          var currentProfile =\r\n            profileWithPublicMirror(\r\n              state.profile || (viewedProfile && viewedProfile()) || {},\r\n            ) ||\r\n            state.profile ||\r\n            (viewedProfile && viewedProfile()) ||\r\n            {};\r\n          setProfileFocalFormValues(\r\n            form,\r\n            \"avatar\",\r\n            profileMediaFocus(currentProfile, \"avatar\"),\r\n            !1,\r\n          );\r\n        }\r\n      }));\r\n  }\r\n  function ensureProfileAlbumUI(root) {\n    if (!root) return;\n    var strip = qs(\"[data-dsd-relationship-layer]\", root),\n      albumButton = strip && qs('[data-dsd-profile-modal-open=\"albums\"]', strip),\n      layer = qs(\"[data-dsd-profile-modal-layer]\", root),\n      dialog = layer && qs('[role=\"dialog\"]', layer);\n    if (strip && !albumButton) {\n      strip.insertAdjacentHTML(\n        \"beforeend\",\n        '<button type=\"button\" data-dsd-profile-modal-open=\"albums\" data-dsd-relationship-tab=\"albums\"><strong data-dsd-profile-album-count>0</strong><span>Albums</span></button>',\n      );\n    }\n    if (dialog && !qs('[data-dsd-profile-modal-panel=\"albums\"]', dialog)) {\n      dialog.insertAdjacentHTML(\n        \"beforeend\",\n        '<div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"albums\"><div class=\"dsd-up315__modal-card dsd-profile-albums\" data-dsd-profile-albums><div class=\"dsd-profile-albums__state\">Albums load when this panel opens.</div></div></div>',\n      );\n    }\n    loadProfileAlbums(!1);\r\n  }\n  function albumPostId(post) {\n    var id = String((post && (post.id || post.postUuid || post.post_uuid)) || \"\");\n    return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(id)\n      ? id\n      : \"\";\n  }\n  function albumMediaId(media) {\n    var id = String(\n      (media &&\n        (media.id || media.mediaObjectId || media.media_object_id || media.supabaseMediaId)) ||\n        \"\",\n    );\n    return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(id)\n      ? id\n      : \"\";\n  }\n  function albumOwnerPostOptions(posts, query) {\n    query = String(query || \"\").trim().toLowerCase();\n    return (posts || state.profileFeedPosts || [])\n      .filter(function (post) { return albumPostId(post); })\n      .filter(function (post) {\n        return !query || String(post.body || \"Media Post\").toLowerCase().indexOf(query) >= 0;\n      })\n      .slice(0, 50)\n      .map(function (post) {\n        var id = albumPostId(post),\n          text = publicDisplayText(post.body || \"Media Post\", \"Post\").slice(0, 80);\n        return '<button type=\"button\" data-dsd-album-post-choice=\"' + html(id) + '\"><span>' +\r\n          html(text || \"Post\") + '</span><small>' + html(postTimestamp({\r\n            createdAt: post.createdAt || post.created_at || \"\",\r\n          })) + \"</small></button>\";\r\n      })\n      .join(\"\");\n  }\n  function albumSortedItems(items) {\n    items = (items || []).slice();\n    if (state.profileAlbumSort === \"newest\")\n      return items.sort(function (a, b) { return String(b.createdAt || b.created_at || \"\").localeCompare(String(a.createdAt || a.created_at || \"\")); });\n    if (state.profileAlbumSort === \"oldest\")\n      return items.sort(function (a, b) { return String(a.createdAt || a.created_at || \"\").localeCompare(String(b.createdAt || b.created_at || \"\")); });\n    return items.sort(function (a, b) { return Number(a.position || 0) - Number(b.position || 0); });\n  }\n  function albumLibraryItemHTML(item, selectable) {\n    var refs = Array.isArray(item.usedIn) ? item.usedIn : [],\n      label = refs.length ? \"Used in \" + refs.length + (refs.length === 1 ? \" place\" : \" places\") : \"Not used in an Album or Post\";\n    return '<article class=\"dsd-profile-albums__library-item\"><figure class=\"dsd-launch-media-chip\" data-dsd-media-id=\"' +\n      html(item.mediaId || item.id || \"\") + '\" data-dsd-media-kind=\"' + html(item.kind === \"video\" ? \"video\" : \"image\") +\n      '\" data-dsd-media-owner=\"album-library\"></figure><div><strong>' + html(item.kind === \"video\" ? \"Video\" : \"Photo\") +\n      '</strong><small>' + html(label) + '</small><small>' + html(item.processingStatus || \"ready\") + \"</small>\" +\n      (selectable ? '<button type=\"button\" data-dsd-album-add-media=\"' + html(item.id || \"\") + '\">Add to album</button>' : \"\") +\n      \"</div></article>\";\n  }\n  function normalizeAlbumPostRecord(post) {\r\n    post = post || {};\r\n    var policy = visibilityPolicyFromInput(post),\r\n      counts = Object.assign({}, post.counts || {}),\r\n      canonicalId = post.supabasePostId || post.supabase_post_id || post.id || \"\";\r\n    counts.views == null &&\r\n      (counts.views = Number(post.viewCount || post.view_count || 0));\r\n    counts.likes == null &&\r\n      (counts.likes = Number(post.reactionCount || post.reaction_count || 0));\r\n    counts.comments == null &&\r\n      (counts.comments = Number(post.commentCount || post.comment_count || 0));\r\n    counts.shares == null &&\r\n      (counts.shares = Number(post.shareCount || post.share_count || 0));\r\n    return Object.assign({}, post, {\r\n      postId:\r\n        post.postId ||\r\n        post.legacyPostId ||\r\n        post.legacy_post_id ||\r\n        canonicalId,\r\n      supabasePostId: uuidLike(canonicalId) ? canonicalId : \"\",\r\n      legacyPostId:\r\n        post.legacyPostId || post.legacy_post_id || post.postId || \"\",\r\n      originalPostId:\r\n        post.originalPostId || post.original_post_id || \"\",\r\n      authorUid:\r\n        post.authorUid || post.author_user_id || post.ownerUid || \"\",\r\n      authorProfileKey:\r\n        post.authorProfileKey || post.author_profile_key || \"\",\r\n      authorDisplayName:\r\n        post.authorDisplayName || post.author_display_name || \"DSD member\",\r\n      visibility: policy.visibility,\r\n      contentRating: policy.contentRating,\r\n      accessGate: policy.accessGate,\r\n      moderation: Object.assign({}, post.moderation || {}, {\r\n        state:\r\n          post.moderationState ||\r\n          post.moderation_state ||\r\n          (post.moderation && post.moderation.state) ||\r\n          post.status ||\r\n          \"approved\",\r\n      }),\r\n      publicSafe:\r\n        post.publicSafe === !0 || post.public_safe === !0,\r\n      createdAt: post.createdAt || post.created_at || \"\",\r\n      updatedAt: post.updatedAt || post.updated_at || \"\",\r\n      counts: counts,\r\n    });\r\n  }\r\n  function albumItemHTML(item, owner, index, itemCount, coverMediaId) {\n    if (!item) return \"\";\n    var itemMediaId = item.type === \"media\" && item.media ? item.media.id || \"\" : \"\",\n      isCover = !!(itemMediaId && String(itemMediaId) === String(coverMediaId || \"\")),\n      ownerActions = owner\n        ? '<div class=\"dsd-profile-albums__item-actions\" aria-label=\"Album item actions\">' +\n          '<button type=\"button\" data-dsd-album-move-item=\"' + html(item.id || \"\") + '\" data-direction=\"up\"' + (index <= 0 ? \" disabled\" : \"\") + ' aria-label=\"Move item up\">Move up</button>' +\n          '<button type=\"button\" data-dsd-album-move-item=\"' + html(item.id || \"\") + '\" data-direction=\"down\"' + (index >= itemCount - 1 ? \" disabled\" : \"\") + ' aria-label=\"Move item down\">Move down</button>' +\n          (itemMediaId\n            ? '<button type=\"button\" data-dsd-album-set-cover=\"' + html(itemMediaId) + '\"' + (isCover ? \" disabled\" : \"\") + '>' + (isCover ? \"Album cover\" : \"Use as cover\") + \"</button>\"\n            : \"\") +\n          '<button type=\"button\" data-dsd-album-remove-item=\"' + html(item.id || \"\") + '\">Remove</button></div>'\n        : \"\";\n    if (item.type === \"post\" && item.post) {\n      return '<article class=\"dsd-profile-albums__item dsd-profile-albums__item--post\">' +\n        postCard(normalizeAlbumPostRecord(item.post)) + ownerActions + \"</article>\";\r\n    }\n    if (item.type === \"media\" && item.media) {\n      var mediaId = item.media.mediaId || item.media.id || \"\",\n        kind = item.media.kind === \"video\" ? \"video\" : \"image\";\n      return '<article class=\"dsd-profile-albums__item\"><figure class=\"dsd-launch-media-chip\" data-dsd-media-id=\"' +\n        html(mediaId) + '\" data-dsd-media-kind=\"' + html(kind) +\n        '\" data-dsd-media-owner=\"album\"></figure>' + ownerActions + \"</article>\";\n    }\n    return \"\";\n  }\n  function albumGrantHTML(grant) {\n    var avatar = grant.avatarMediaId\n      ? '<span class=\"dsd-up315__mini-avatar\" data-dsd-avatar-media-id=\"' + html(grant.avatarMediaId) + '\"></span>'\n      : '<span class=\"dsd-up315__mini-avatar\">' + html(initials(grant.displayName || grant.profileKey)) + \"</span>\";\n    return '<div class=\"dsd-profile-albums__grant\" data-active=\"' + (grant.active === !0) + '\">' +\n      avatar + '<span><strong>' + html(grant.displayName || \"DSD member\") +\n      '</strong><small>@' + html(grant.profileKey || \"member\") + '</small></span>' +\n      (grant.active === !0\n        ? '<button type=\"button\" data-dsd-album-revoke=\"' + html(grant.profileKey || \"\") + '\">Revoke</button>'\n        : '<button type=\"button\" data-dsd-album-grant=\"' + html(grant.profileKey || \"\") + '\">Share again</button>') +\n      \"</div>\";\n  }\n  function bindAlbumGrantProfilePicker(root) {\n    var form = root && qs(\"[data-dsd-album-grant-form]\", root),\n      input = form && qs('input[name=\"recipientProfileKey\"]', form);\n    if (!form || !input || form.dataset.dsdProfilePickerBound === BUILD) return;\n    form.dataset.dsdProfilePickerBound = BUILD;\n    var results = document.createElement(\"div\"),\n      timer = null,\n      generation = 0;\n    results.className = \"dsd-post-mention-suggestions dsd-profile-albums__recipient-results\";\n    results.setAttribute(\"data-dsd-profile-picker-results\", \"album-grant\");\n    results.setAttribute(\"role\", \"listbox\");\n    results.hidden = !0;\n    input.insertAdjacentElement(\"afterend\", results);\n    function close() {\n      results.hidden = !0;\n      results.innerHTML = \"\";\n    }\n    function render(items) {\n      items = (items || []).filter(function (profile) {\n        return profilePickerEligible(profile, {\n          excludeSelf: !0,\n          excludeBlocked: !0,\n        });\n      });\n      results.innerHTML = items\n        .slice(0, 6)\n        .map(function (profile) {\n          var key = normalizedProfileKeyValue(\n            profile.profileKey || profile.profile_key || profile.handle,\n          );\n          return profilePickerOptionHTML(\n            profile,\n            \"data-dsd-album-recipient-key\",\n            key,\n          );\n        })\n        .join(\"\");\n      results.hidden = !items.length;\n      hydrateAvatarMedia(results);\n    }\n    input.addEventListener(\"input\", function () {\n      var query = normalizedMentionProfileKey(input.value),\n        current = ++generation;\n      timer && window.clearTimeout(timer);\n      timer = null;\n      if (query.length < 2) return close();\n      render(profilePickerProfiles(query, {\n        limit: 6,\n        excludeSelf: !0,\n        excludeBlocked: !0,\n      }));\n      timer = window.setTimeout(function () {\n        timer = null;\n        requestProfilePickerProfiles(query, {\n          limit: 6,\n          publicRead: !1,\n          surface: \"album-grant-recipient\",\n          excludeSelf: !0,\n          excludeBlocked: !0,\n        }).then(function (items) {\n          if (current === generation && normalizedMentionProfileKey(input.value) === query)\n            render(items);\n        });\n      }, 250);\n    });\n    results.addEventListener(\"click\", function (event) {\n      var option = event.target.closest && event.target.closest(\"[data-dsd-album-recipient-key]\");\n      if (!option) return;\n      event.preventDefault();\n      input.value = option.getAttribute(\"data-dsd-album-recipient-key\") || \"\";\n      close();\n      input.focus();\n    });\n    input.addEventListener(\"blur\", function () {\n      window.setTimeout(close, 120);\n    });\n  }\n  function bindAlbumPostPicker(root, posts) {\n    var form = root && qs(\"[data-dsd-album-add-post]\", root),\n      input = form && qs(\"[data-dsd-album-post-search]\", form),\n      results = form && qs(\"[data-dsd-album-post-results]\", form),\n      selected = form && qs('input[name=\"postId\"]', form);\n    if (!form || !input || !results || !selected || form.dataset.dsdAlbumPostPickerBound === BUILD) return;\n    form.dataset.dsdAlbumPostPickerBound = BUILD;\n    function render() {\n      results.innerHTML = albumOwnerPostOptions(posts, input.value) || '<p class=\"dsd-profile-albums__state\">No matching owned Posts.</p>';\n    }\n    input.addEventListener(\"input\", render);\n    results.addEventListener(\"click\", function (event) {\n      var choice = event.target.closest && event.target.closest(\"[data-dsd-album-post-choice]\");\n      if (!choice) return;\n      event.preventDefault();\n      selected.value = choice.getAttribute(\"data-dsd-album-post-choice\") || \"\";\n      qsa(\"[data-dsd-album-post-choice]\", results).forEach(function (button) {\n        button.setAttribute(\"aria-pressed\", button === choice ? \"true\" : \"false\");\n      });\n    });\n    render();\n  }\n  function renderProfileAlbums() {\n    var root = qs(\"[data-dsd-user-profile]\"),\n      panel = root && qs(\"[data-dsd-profile-albums]\", root);\n    if (!panel) return;\n    var owner = isOwnProfileRoute(),\n      detail = state.activeAlbumDetail,\n      count = state.profileAlbumCount;\n    qsa(\"[data-dsd-profile-album-count]\", root).forEach(function (node) {\n      node.textContent = state.profileAlbumsPending ? \"\\u2014\" : String(count);\n    });\n    if (state.profileAlbumsPending) {\n      panel.innerHTML = '<div class=\"dsd-profile-albums__state\" aria-live=\"polite\">Loading albums...</div>';\n      return;\n    }\n    if (detail && detail.album) {\n      var album = detail.album,\n        albumItems = albumSortedItems(detail.items || []),\n        items = albumItems.map(function (item, index) { return albumItemHTML(item, detail.owner === !0, index, albumItems.length, album.coverMediaId); }).join(\"\"),\n        grants = (detail.grants || []).map(albumGrantHTML).join(\"\"),\n        ownerTools = detail.owner === !0\n          ? '<details class=\"dsd-profile-albums__manage\"><summary>Manage album</summary><form data-dsd-album-edit-form><label>Name<input name=\"name\" maxlength=\"80\" required value=\"' + html(album.name || \"\") + '\"></label><label>Description<textarea name=\"description\" maxlength=\"500\">' + html(album.description || \"\") + '</textarea></label><label>Visibility<select name=\"visibility\"><option value=\"private\"' + (album.visibility === \"private\" ? \" selected\" : \"\") + '>Private</option><option value=\"public\"' + (album.visibility === \"public\" ? \" selected\" : \"\") + '>Public</option></select></label><button type=\"submit\">Save album</button>' + (album.coverMediaId ? '<button type=\"button\" data-dsd-album-set-cover=\"\">Clear cover</button>' : \"\") + '<button type=\"button\" data-dsd-album-delete>Delete album</button></form>' +\n            '<form data-dsd-album-add-post><label>Add one of your Posts<input type=\"search\" data-dsd-album-post-search placeholder=\"Search your Posts\" autocomplete=\"off\"></label><input type=\"hidden\" name=\"postId\" required><div class=\"dsd-profile-albums__post-results\" data-dsd-album-post-results></div><button type=\"submit\">Add selected Post</button></form>' +\n            '<form data-dsd-album-upload><label>Add owned media<input name=\"albumMedia\" type=\"file\" accept=\"image/*,video/*\" required></label><small>Uses the existing Wasabi upload pipeline and current media limits.</small><button type=\"submit\">Upload media</button></form>' +\n            '<button type=\"button\" data-dsd-album-library-open>' + (state.albumLibraryOpen ? \"Hide Your media\" : \"Add from Your media\") + '</button>' +\n            (state.albumLibraryOpen ? '<section class=\"dsd-profile-albums__library\" data-dsd-album-library-picker>' + ((state.profileMediaLibrary || []).map(function (item) { return albumLibraryItemHTML(item, !0); }).join(\"\") || '<div class=\"dsd-profile-albums__state\">No reusable owned media yet.</div>') + \"</section>\" : \"\") +\n            '<form data-dsd-album-grant-form><label>Share privately with a profile<input name=\"recipientProfileKey\" type=\"search\" autocomplete=\"off\" placeholder=\"Search profiles\" aria-label=\"Search for a profile to share this album with\" required></label><button type=\"submit\">Share</button></form>' +\n            '<section class=\"dsd-profile-albums__grants\"><h3>Private access</h3>' + (grants || '<p>No explicit recipients.</p>') + \"</section></details>\"\n          : \"\";\n      panel.innerHTML = '<header class=\"dsd-profile-albums__head\"><button type=\"button\" data-dsd-album-back>Albums</button><div><strong>' +\n        html(album.name || \"Album\") + '</strong><small>' + html(album.visibility === \"public\" ? \"Public\" : \"Private\") +\n        '</small></div></header>' + (album.description ? '<p class=\"dsd-profile-albums__description\">' + html(album.description) + \"</p>\" : \"\") +\n        (detail.owner === !0 ? \"\" : '<button type=\"button\" data-dsd-report-album=\"' + html(album.id) + '\">Report album</button>') +\n        '<label class=\"dsd-profile-albums__sort\">Order<select data-dsd-album-sort><option value=\"custom\"' + (state.profileAlbumSort === \"custom\" ? \" selected\" : \"\") + '>Custom</option><option value=\"newest\"' + (state.profileAlbumSort === \"newest\" ? \" selected\" : \"\") + '>Newest</option><option value=\"oldest\"' + (state.profileAlbumSort === \"oldest\" ? \" selected\" : \"\") + '>Oldest</option></select></label><section class=\"dsd-profile-albums__items\">' +\n        (items || '<div class=\"dsd-profile-albums__state\">This album is empty.</div>') + \"</section>\" + ownerTools;\n      hydrateAvatarMedia(panel);\n      hydrateMediaReads(panel);\n      bindAlbumGrantProfilePicker(panel);\n      bindAlbumPostPicker(panel, detail.ownerPosts || []);\n      return;\n    }\n    if (state.profileAlbumsView === \"library\") {\n      panel.innerHTML = '<nav class=\"dsd-profile-albums__views\" aria-label=\"Album views\"><button type=\"button\" data-dsd-album-view=\"profile\">My albums</button><button type=\"button\" data-dsd-album-view=\"shared\">Shared with me</button><button type=\"button\" class=\"is-active\" data-dsd-album-view=\"library\">Your media</button></nav><section class=\"dsd-profile-albums__library\">' +\n        ((state.profileMediaLibrary || []).map(function (item) { return albumLibraryItemHTML(item, !1); }).join(\"\") || '<div class=\"dsd-profile-albums__state\">No reusable owned media yet.</div>') + \"</section>\";\n      hydrateMediaReads(panel);\n      return;\n    }\n    var create = owner && state.profileAlbumsView === \"profile\"\n      ? '<form class=\"dsd-profile-albums__create\" data-dsd-album-create-form><h3>Create album</h3><label>Name<input name=\"name\" maxlength=\"80\" required></label><label>Description<textarea name=\"description\" maxlength=\"500\"></textarea></label><label>Visibility<select name=\"visibility\"><option value=\"private\" selected>Private</option><option value=\"public\">Public</option></select></label><button type=\"submit\">Create album</button></form>'\n      : \"\";\n    var cards = state.profileAlbums.map(function (album) {\n      return '<button type=\"button\" class=\"dsd-profile-albums__card\" data-dsd-album-open=\"' + html(album.id) + '\"><span class=\"dsd-profile-albums__cover\"' +\n        (album.coverMediaId ? ' data-dsd-media-id=\"' + html(album.coverMediaId) + '\" data-dsd-media-kind=\"' + html(album.coverMediaKind === \"video\" ? \"video\" : \"image\") + '\"' : \"\") +\n        '></span><span><strong>' + html(album.name || \"Album\") + '</strong><small>' +\n        html((album.visibility === \"public\" ? \"Public\" : \"Private\") + (album.itemCount == null ? \" \\u00b7 Open album\" : \" \\u00b7 \" + Number(album.itemCount || 0) + \" items\")) +\n        \"</small></span></button>\";\n    }).join(\"\");\n    panel.innerHTML = (owner ? '<nav class=\"dsd-profile-albums__views\" aria-label=\"Album views\"><button type=\"button\" class=\"' + (state.profileAlbumsView === \"profile\" ? \"is-active\" : \"\") + '\" data-dsd-album-view=\"profile\">My albums</button><button type=\"button\" class=\"' + (state.profileAlbumsView === \"shared\" ? \"is-active\" : \"\") + '\" data-dsd-album-view=\"shared\">Shared with me</button><button type=\"button\" data-dsd-album-view=\"library\">Your media</button></nav>' : \"\") + create + '<section class=\"dsd-profile-albums__grid\">' +\n      (cards || '<div class=\"dsd-profile-albums__state\">No visible albums yet.</div>') + \"</section>\";\n    hydrateMediaReads(panel);\n  }\n  function loadProfileAlbums(force, requestedView) {\n    var profile = viewedProfile() || {},\n      target = nonPlaceholderProfileKey(\r\n        normalizedProfileKeyValue(\r\n          routeProfileKey() ||\r\n            profile.profileKey ||\r\n            profile.profile_key ||\r\n            profile.handle ||\r\n            activeProfileKeyValue() ||\r\n            profileKey(),\r\n        ),\r\n      ),\r\n      view = requestedView || state.profileAlbumsView || \"profile\",\n      cacheKey = target + \":\" + (hasCustomer() ? \"signed\" : \"public\") + \":\" + view;\n    if (!target || state.profileAlbumsPending) return Promise.resolve(null);\n    if (!force && state.profileAlbumsLoadedKey === cacheKey) {\r\n      renderProfileAlbums();\r\n      return Promise.resolve(state.profileAlbums);\r\n    }\r\n    state.profileAlbumsPending = !0;\n    renderProfileAlbums();\n    state.profileAlbumsView = view;\n    return albumProxyRequest(\"GET\", null, view === \"profile\" ? { profile: target, limit: 24 } : { view: view, limit: 24 })\n      .then(function (body) {\n        if (view === \"library\") state.profileMediaLibrary = Array.isArray(body.media) ? body.media : [];\n        else state.profileAlbums = Array.isArray(body.albums) ? body.albums : [];\n        if (view === \"profile\") state.profileAlbumCount = body.totalCount == null ? state.profileAlbums.length : Number(body.totalCount || 0);\n        state.profileAlbumsLoadedKey = cacheKey;\n        return state.profileAlbums;\n      })\n      .catch(function (error) {\n        renderStatus((error && error.message) || \"Albums could not load.\");\n        state.profileAlbums = [];\n        return [];\n      })\n      .finally(function () {\n        state.profileAlbumsPending = !1;\n        renderProfileAlbums();\n      });\n  }\n  function loadAlbumMediaLibrary() {\n    return albumProxyRequest(\"GET\", null, { view: \"library\", limit: 24 })\n      .then(function (body) {\n        state.profileMediaLibrary = Array.isArray(body.media) ? body.media : [];\n        return state.profileMediaLibrary;\n      })\n      .catch(function (error) {\n        renderStatus((error && error.message) || \"Your media could not load.\");\n        return [];\n      });\n  }\n  function loadAlbumDetail(albumId) {\n    if (!albumId || state.profileAlbumsPending) return Promise.resolve(null);\n    state.profileAlbumsPending = !0;\n    renderProfileAlbums();\n    return albumProxyRequest(\"GET\", null, { albumId: albumId })\n      .then(function (body) {\n        state.activeAlbumId = albumId;\n        state.activeAlbumDetail = body;\n        return body;\n      })\n      .catch(function (error) {\n        state.activeAlbumId = \"\";\n        state.activeAlbumDetail = null;\n        renderStatus((error && error.message) || \"Album could not load.\");\n        return null;\n      })\n      .finally(function () {\n        state.profileAlbumsPending = !1;\n        renderProfileAlbums();\n      });\n  }\n  function mutateAlbum(payload, successText) {\n    if (state.albumMutationPending) return Promise.resolve(null);\n    state.albumMutationPending = !0;\n    return albumProxyRequest(\"POST\", payload)\n      .then(function (body) {\n        successText && renderStatus(successText);\n        if (payload.action === \"delete\") {\n          state.activeAlbumId = \"\";\n          state.activeAlbumDetail = null;\n          state.profileAlbumsLoadedKey = \"\";\n          return loadProfileAlbums(!0);\n        }\n        if (payload.action === \"create\") {\n          state.profileAlbumsLoadedKey = \"\";\n          return loadProfileAlbums(!0).then(function () {\n            return body.album && loadAlbumDetail(body.album.id);\n          });\n        }\n        return loadAlbumDetail(payload.albumId || state.activeAlbumId);\n      })\n      .catch(function (error) {\n        renderStatus((error && error.message) || \"Album could not be updated.\");\n        return null;\n      })\n      .finally(function () { state.albumMutationPending = !1; });\n  }\n  function closeProfileModal(root) {\n    root = root || qs(\"[data-dsd-user-profile]\");\r\n    var layer = qs(\"[data-dsd-profile-modal-layer]\", root || document),\r\n      returnFocus = root && root._dsdProfileModalReturnFocus;\r\n    (layer &&\n      ((layer.hidden = !0),\n      layer.removeAttribute(\"data-dsd-active-profile-panel\")),\n      root && (root._dsdProfileModalReturnFocus = null),\r\n      resumeReleaseBOnboardingAfterProfileEditor(),\n      scheduleGlobalOverlayStateSync());\n    returnFocus &&\r\n      typeof returnFocus.focus === \"function\" &&\r\n      document.body.contains(returnFocus) &&\r\n      window.setTimeout(function () {\r\n        try {\r\n          returnFocus.focus({ preventScroll: !0 });\r\n        } catch (error) {}\r\n      }, 0);\r\n  }\n  function profilePanelTitle(key) {\r\n    return (\r\n      {\r\n        banner: \"Edit Banner\",\r\n        avatar: \"Edit Photo\",\r\n        edit: \"Edit Profile\",\r\n        followers: \"Followers\",\r\n        following: \"Following\",\r\n        favorites: \"Favorites\",\r\n        saved: \"Saved\",\r\n        likes: \"Likes\",\r\n        media: \"Media\",\r\n        tagged: \"Tagged\",\n        story: \"Create Story\",\n        glances: \"Glances\",\n        albums: \"Albums\",\n      }[key] || \"Profile\"\r\n    );\r\n  }\r\n  function ensureProfileModalFooter(root, activeKey) {\r\n    root = root || qs(\"[data-dsd-user-profile]\");\r\n    var layer = root && qs(\"[data-dsd-profile-modal-layer]\", root),\r\n      dialog = layer && (qs('[role=\"dialog\"]', layer) || layer.lastElementChild);\r\n    if (!layer || !dialog) return null;\r\n    var footer = qs(\"[data-dsd-profile-modal-footer]\", dialog);\r\n    if (!footer) {\r\n      footer = document.createElement(\"div\");\r\n      footer.className = \"dsd-profile-modal-footer\";\r\n      footer.setAttribute(\"data-dsd-profile-modal-footer\", \"\");\r\n      dialog.appendChild(footer);\r\n    }\r\n    [\r\n      [\"banner\", \"[data-dsd-banner-form]\", \"dsd-profile-banner-form\"],\r\n      [\"avatar\", \"[data-dsd-avatar-form]\", \"dsd-profile-avatar-form\"],\r\n      [\"edit\", \"[data-dsd-profile-setup-form]\", \"dsd-profile-edit-form\"],\r\n    ].forEach(function (entry) {\r\n      var key = entry[0],\r\n        form = qs(entry[1], root),\r\n        actions = form && qs(\"[data-dsd-profile-panel-actions]\", form);\r\n      if (!form || !actions) return;\r\n      form.id = form.id || entry[2];\r\n      qsa('[data-dsd-profile-footer-action=\"' + key + '\"]', footer).forEach(\r\n        function (existing) {\r\n          existing !== actions && existing.remove();\r\n        },\r\n      );\r\n      actions.setAttribute(\"data-dsd-profile-footer-action\", key);\r\n      qsa('button[type=\"submit\"]', actions).forEach(function (button) {\r\n        button.setAttribute(\"form\", form.id);\r\n      });\r\n      footer.appendChild(actions);\r\n    });\r\n    activeKey =\r\n      activeKey || layer.getAttribute(\"data-dsd-active-profile-panel\") || \"\";\r\n    var visibleAction = !1;\r\n    qsa(\"[data-dsd-profile-footer-action]\", footer).forEach(function (actions) {\r\n      var visible =\r\n        actions.getAttribute(\"data-dsd-profile-footer-action\") === activeKey;\r\n      actions.hidden = !visible;\r\n      visibleAction = visibleAction || visible;\r\n    });\r\n    footer.hidden = !visibleAction;\r\n    return footer;\r\n  }\r\n  function openProfilePanel(key, root) {\r\n    if (((root = root || qs(\"[data-dsd-user-profile]\")), !root)) return !1;\r\n    var layer = qs(\"[data-dsd-profile-modal-layer]\", root);\r\n    if (!layer) return !1;\r\n    var requestedPanel = qs(\r\n      '[data-dsd-profile-modal-panel=\"' + key + '\"]',\r\n      root,\r\n    );\r\n    if (!requestedPanel) return !1;\r\n    layer.hidden &&\r\n      document.activeElement &&\r\n      !layer.contains(document.activeElement) &&\r\n      (root._dsdProfileModalReturnFocus = document.activeElement);\r\n    if (key === \"edit\" && isOwnProfileRoute()) {\n      var ownerProfileKey =\r\n        activeOwnerProfileKey() || customerProfileKeyValue() || profileKey();\r\n      ownerProfileKey &&\r\n        readSupabasePrivateProfileByKey(ownerProfileKey).then(\n          function (privateProfile) {\r\n            if (!privateProfile) return;\r\n            state.profile =\r\n              profileWithPublicMirror(\r\n                mergePrivateProfileCapabilities(\r\n                  state.profile || {},\r\n                  privateProfile,\r\n                ),\r\n              ) || privateProfile;\r\n            syncProfileSetupForms(root);\n          },\n        );\n      loadProfilePolicyState(!0).then(function () {\n        syncProfileSetupForms(root);\r\n        syncProfilePolicyControls(root);\n      });\n    }\n    if (key === \"glances\" && isOwnProfileRoute())\n      hydrateProfileGlances(!0, !1);\n    if (key === \"albums\") {\n      state.activeAlbumId = \"\";\n      state.activeAlbumDetail = null;\n      loadProfileAlbums(!1);\n    }\n    if (\r\n      ((key === \"followers\" || key === \"following\") && renderRelationships(),\r\n      (key === \"edit\" || key === \"banner\" || key === \"avatar\") &&\r\n        syncProfileSetupForms(root),\r\n      key === \"banner\")\r\n    ) {\r\n      var bannerForm = qs(\"[data-dsd-banner-form]\", root);\r\n      bannerForm &&\r\n        (syncBannerFocusForm(\r\n          bannerForm,\r\n          profileMediaFocus(\r\n            state.profile || (viewedProfile && viewedProfile()) || {},\r\n            \"banner\",\r\n          ),\r\n        ),\r\n        syncBannerEditPreview(bannerForm),\r\n        reconcileCurrentPublicProfileMirror(\"profile-banner-panel-open\", {\r\n          force: !0,\r\n          noRender: !0,\r\n        }).then(function () {\r\n          (syncBannerFocusForm(\r\n            bannerForm,\r\n            profileMediaFocus(\r\n              state.profile || (viewedProfile && viewedProfile()) || {},\r\n              \"banner\",\r\n            ),\r\n          ),\r\n            syncBannerEditPreview(bannerForm));\r\n        }));\r\n    }\r\n    (qsa(\"[data-dsd-profile-modal-panel]\", root).forEach(function (panel) {\r\n      var active = panel.getAttribute(\"data-dsd-profile-modal-panel\") === key;\r\n      (panel.classList.toggle(\"is-active\", active),\r\n        (panel.hidden = !active),\r\n        panel.setAttribute(\"aria-hidden\", String(!active)));\r\n    }),\r\n      qsa(\"[data-dsd-relationship-tab]\", root).forEach(function (btn) {\r\n        var active = btn.getAttribute(\"data-dsd-relationship-tab\") === key;\r\n        (btn.classList.toggle(\"is-active\", active),\r\n          btn.setAttribute(\"aria-pressed\", String(active)));\r\n      }));\r\n    var title = qs(\"[data-dsd-profile-modal-title]\", root);\n    (title && (title.textContent = profilePanelTitle(key)),\r\n      layer.setAttribute(\"data-dsd-active-profile-panel\", key),\n      ensureProfileModalFooter(root, key),\r\n      (layer.hidden = !1),\n      hydrateAvatarMedia(requestedPanel),\r\n      key === \"saved\" && hydrateMediaReads(requestedPanel),\r\n      scheduleGlobalOverlayStateSync());\r\n    var dialog = qs('[role=\"dialog\"]', layer);\r\n    return (\r\n      dialog && dialog.focus(),\r\n      claim(\"profile-panel:p11dz684-open\", {\r\n        panel: key,\r\n        owner: \"LaunchSocialActivation.ProfileRenderer\",\r\n      }),\r\n      !0\r\n    );\r\n  }\r\n  function activateProfileContentTab(key, root) {\n    if (((root = root || qs(\"[data-dsd-user-profile]\")), !root)) return !1;\r\n    var titles = { posts: \"Posts\", media: \"Media\", tagged: \"Tagged\" };\r\n    (titles[key] || (key = \"posts\"),\r\n      qsa(\"[data-dsd-profile-content-tab]\", root).forEach(function (btn) {\r\n        var active = btn.getAttribute(\"data-dsd-profile-content-tab\") === key;\r\n        (btn.classList.toggle(\"is-active\", active),\r\n          btn.setAttribute(\"aria-pressed\", String(active)),\r\n          active\r\n            ? btn.setAttribute(\"aria-current\", \"page\")\r\n            : btn.removeAttribute(\"aria-current\"));\r\n      }),\r\n      qsa(\"[data-dsd-profile-content-panel]\", root).forEach(function (panel) {\r\n        var active = panel.getAttribute(\"data-dsd-profile-content-panel\") === key;\r\n        (panel.classList.toggle(\"is-active\", active),\r\n          (panel.hidden = !active),\r\n          panel.setAttribute(\"aria-hidden\", String(!active)));\r\n      }));\r\n    var postFilters = qs(\"[data-dsd-profile-media-filters]\", root),\r\n      contentSearch = qs(\"[data-dsd-profile-content-search]\", root),\r\n      contentSearchLabel =\r\n        contentSearch && contentSearch.closest(\".dsd-profile-content-search\");\r\n    postFilters &&\r\n      ((postFilters.hidden = key !== \"posts\"),\r\n      (postFilters.style.display = key === \"posts\" ? \"\" : \"none\"),\r\n      postFilters.setAttribute(\"aria-hidden\", String(key !== \"posts\")));\r\n    contentSearchLabel &&\r\n      ((contentSearchLabel.hidden = key === \"tagged\"),\r\n      (contentSearchLabel.style.display = key === \"tagged\" ? \"none\" : \"\"),\r\n      contentSearchLabel.setAttribute(\"aria-hidden\", String(key === \"tagged\")));\r\n    var heading = qs(\"[data-dsd-profile-content-title]\", root);\r\n    return (\n      heading && (heading.textContent = titles[key]),\n      key === \"media\" && renderProfileMediaProjection(root),\n      claim(\"profile-content-controller:p11dz684-tab-change\", {\r\n        tab: key,\r\n        owner: \"LaunchSocialActivation.ProfileRenderer\",\r\n      }),\r\n      !0\r\n    );\r\n  }\r\n  function renderProfileModals() {\r\n    var root = qs(\"[data-dsd-user-profile]\");\r\n    if (root) {\r\n      var own = isOwnProfileRoute(),\r\n        layer = qs(\"[data-dsd-profile-modal-layer]\", root);\r\n      if (\r\n        (layer &&\r\n          !qs(\"[data-dsd-profile-modal-panel]\", layer) &&\r\n          ((layer.innerHTML =\r\n            '<div class=\"dsd-up315__modal-backdrop\" data-dsd-profile-modal-close></div><div class=\"dsd-up315__modal-dialog\" role=\"dialog\" aria-modal=\"true\" tabindex=\"-1\"><div class=\"dsd-up315__modal-head\"><strong data-dsd-profile-modal-title>Profile</strong><button type=\"button\" data-dsd-profile-modal-close aria-label=\"Close profile panel\">&times;</button></div><div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"banner\"><div class=\"dsd-up315__modal-card\"></div></div><div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"avatar\"><div class=\"dsd-up315__modal-card\"></div></div><div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"edit\"><div class=\"dsd-up315__modal-card\"></div></div><div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"followers\"><div class=\"dsd-up315__modal-card\" data-dsd-relationship-list=\"followers\"></div></div><div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"following\"><div class=\"dsd-up315__modal-card\" data-dsd-relationship-list=\"following\"></div></div><div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"favorites\"><div class=\"dsd-up315__modal-card\" data-dsd-relationship-list=\"favorites\"></div></div><div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"saved\"><div class=\"dsd-up315__modal-card\" data-dsd-relationship-list=\"saved\"></div></div><div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"likes\"><div class=\"dsd-up315__modal-card\"><strong>Likes</strong><p>Your active reactions appear here.</p></div></div><div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"media\"><div class=\"dsd-up315__modal-card\"><strong>Media</strong><p>Photos and videos you save or share appear here.</p></div></div><div class=\"dsd-up315__modal-panel\" data-dsd-profile-modal-panel=\"tagged\"><div class=\"dsd-up315__modal-card\"><strong>Tagged</strong><p>Tagged content appears here.</p></div></div></div>'),\r\n          layer.setAttribute(\"data-dsd-profile-modal-reconstructed\", BUILD)),\n        ensureProfileAlbumUI(root),\n        ensureProfileGlanceUI(root, own),\n        !!own)\n      ) {\r\n        var existingBannerForm = qs(\"[data-dsd-banner-form]\", root),\r\n          existingAvatarForm = qs(\"[data-dsd-avatar-form]\", root),\r\n          existingSetupForm = qs(\"[data-dsd-profile-setup-form]\", root),\r\n          formsAlreadyBound =\r\n            root.dataset.dsdProfileModalOwner === BUILD &&\r\n            existingSetupForm &&\r\n            existingBannerForm &&\r\n            existingBannerForm.dataset.dsdBannerSubmitBound === BUILD &&\r\n            existingAvatarForm &&\r\n            existingAvatarForm.dataset.dsdAvatarSubmitBound === BUILD;\r\n        if (formsAlreadyBound) {\r\n          ensureProfileModalFooter(root);\r\n          syncProfileSetupForms(root);\r\n          return;\r\n        }\r\n        ((root.dataset.dsdProfileModalOwner = BUILD),\r\n          delete root.dataset.dsdFirebaseModals);\r\n        var banner = qs(\r\n          '[data-dsd-profile-modal-panel=\"banner\"] .dsd-up315__modal-card',\r\n          root,\r\n        );\r\n        banner &&\r\n          (banner.innerHTML =\r\n            '<strong>Edit Banner</strong><form data-dsd-banner-form><label>Replace image<input name=\"banner\" type=\"file\" accept=\"image/*\"></label>' +\r\n            bannerPreviewHTML() +\r\n            '<div class=\"dsd-profile-panel-actions\" data-dsd-profile-panel-actions role=\"group\" aria-label=\"Banner actions\"><button type=\"submit\">Save banner</button></div></form>');\r\n        var edit = qs(\r\n            '[data-dsd-profile-modal-panel=\"edit\"] .dsd-up315__modal-card',\r\n            root,\r\n          ),\r\n          adultPreference =\r\n            '<label class=\"dsd-adult-content-setting\" data-dsd-adult-content-row><input name=\"adultContentEnabled\" type=\"checkbox\"> Adult Content Enabled <small>Requires a saved or entered age of 18+.</small></label>';\r\n        edit &&\n          (edit.innerHTML =\n            '<strong>Edit Profile</strong><form data-dsd-profile-setup-form><label>Display name<input name=\"displayName\" required></label><label>Handle<input name=\"handle\" required></label>' +\r\n            locationFieldsHTML() +\n            activityPrivacySettingsHTML() +\n            connectionSettingsHTML() +\n            onboardingLegalConsentHTML(!1) +\n            '<label>Birthdate<input name=\"birthdate\" type=\"date\" autocomplete=\"bday\"></label><label>Age<input name=\"age\" type=\"number\" min=\"13\" max=\"120\" inputmode=\"numeric\"></label>' + ageVerificationStatusHTML() + '<label>Bio<textarea name=\"bio\" rows=\"4\"></textarea></label><label>Profile link<input name=\"externalUrl\" type=\"text\" inputmode=\"url\" autocapitalize=\"none\" spellcheck=\"false\" maxlength=\"2048\" placeholder=\"example.com\"></label>' +\n            conversationStarterSettingsHTML() +\n            mapStarSignatureSettingsHTML() +\n            publicationOptions(\"Profile\") +\n            adultPreference +\n            '<div class=\"dsd-profile-panel-actions\" data-dsd-profile-panel-actions role=\"group\" aria-label=\"Profile actions\"><button type=\"submit\">Save profile</button></div></form>');\r\n        var avatar = qs(\r\n          '[data-dsd-profile-modal-panel=\"avatar\"] .dsd-up315__modal-card',\r\n          root,\r\n        );\r\n        (avatar &&\r\n          (avatar.innerHTML =\r\n            '<strong>Edit Photo</strong><form data-dsd-avatar-form><div class=\"dsd-profile-panel-actions\" data-dsd-profile-panel-actions><button type=\"submit\">Save photo</button></div><label>Replace image<input name=\"avatar\" type=\"file\" accept=\"image/*\"></label>' +\r\n            profileFocalEditorHTML(\"avatar\") +\r\n            \"</form>\"),\r\n          refreshPublicationControls(root));\r\n        ensureProfileModalFooter(root);\r\n        var setupForm = qs(\"[data-dsd-profile-setup-form]\", root);\n        if (setupForm) {\n          syncProfileSetupForms(root);\n          loadProfilePolicyState(!1).then(function () {\n            syncProfileSetupForms(root);\r\n            syncProfilePolicyControls(root);\n          });\n        }\n        (renderConnectionSurfaces(), hasCustomer() && loadConnectionPresence(!1));\n        var bannerForm = qs(\"[data-dsd-banner-form]\", root);\r\n        if (\r\n          (bannerForm &&\r\n            bannerForm.dataset.dsdBannerSubmitBound !== BUILD &&\r\n            ((bannerForm.dataset.dsdBannerSubmitBound = BUILD),\r\n            bannerForm.addEventListener(\"submit\", function (ev) {\r\n              ev.preventDefault();\r\n              var bannerFileField = formControl(bannerForm, \"banner\"),\r\n                bannerPositionField = formControl(bannerForm, \"bannerPosition\"),\r\n                file =\r\n                  bannerFileField &&\r\n                  bannerFileField.files &&\r\n                  bannerFileField.files[0],\r\n                focus = readProfileFocalInputs(bannerForm, \"banner\"),\r\n                position =\r\n                  (bannerPositionField && bannerPositionField.value) ||\r\n                  bannerPositionFromFocus(focus);\r\n              if (!file) {\r\n                composerBusy(\r\n                  bannerForm,\r\n                  \"Saving banner focus...\",\r\n                  saveProfileMediaPatch({\r\n                    bannerPosition: position,\r\n                    bannerFocusX: focus.x,\r\n                    bannerFocusY: focus.y,\r\n                  }),\r\n                ).then(function (saved) {\n                  saved && closeProfileModal(root);\n                });\r\n                return;\r\n              }\r\n              composerBusy(\r\n                bannerForm,\r\n                \"Saving banner media...\",\r\n                createMediaManifest(\r\n                  file,\r\n                  \"profile\",\r\n                  activeOwnerProfileKey() ||\r\n                    actorRelationshipIdentity() ||\r\n                    actorUid() ||\r\n                    uid(),\r\n                  \"banner\",\r\n                ).then(function (manifest) {\r\n                  return !manifest || manifest.status !== \"uploaded\"\r\n                    ? (renderStatus(\r\n                        \"Banner upload did not complete. Existing banner was kept.\",\r\n                      ),\r\n                      null)\r\n                    : resolveProfileMediaManifestUuid(manifest).then(\r\n                        function (mediaId) {\r\n                          return (\r\n                            (mediaId =\r\n                              mediaId || profileManifestMediaId(manifest)),\r\n                            mediaId\r\n                              ? saveProfileMediaPatch({\r\n                                  bannerMediaId: mediaId,\r\n                                  banner_media_id: mediaId,\r\n                                  headerMediaId: mediaId,\r\n                                  header_media_id: mediaId,\r\n                                  coverMediaId: mediaId,\r\n                                  cover_media_id: mediaId,\r\n                                  backgroundMediaId: mediaId,\r\n                                  background_media_id: mediaId,\r\n                                  bannerPosition: position,\r\n                                  bannerFocusX: focus.x,\r\n                                  bannerFocusY: focus.y,\r\n                                })\r\n                              : (renderStatus(\r\n                                  \"Banner uploaded, but its media reference is still unavailable. Existing banner was kept.\",\r\n                                ),\r\n                                claim(\r\n                                  \"profile-banner-save:canonical-media-id-missing\",\r\n                                  {\r\n                                    mediaId: manifest.mediaId || \"\",\r\n                                    objectKey:\r\n                                      manifest.wasabiObjectKey ||\r\n                                      manifest.path ||\r\n                                      \"\",\r\n                                  },\r\n                                ),\r\n                                null)\r\n                          );\r\n                        },\r\n                      );\r\n                }),\r\n              ).then(function (saved) {\n                saved && closeProfileModal(root);\n              });\r\n            })),\r\n          bannerForm && formControl(bannerForm, \"bannerPosition\"))\r\n        ) {\r\n          (syncProfileSetupForms(root),\r\n            syncBannerFocusForm(\r\n              bannerForm,\r\n              profileMediaFocus(\r\n                state.profile || (viewedProfile && viewedProfile()) || {},\r\n                \"banner\",\r\n              ),\r\n            ),\r\n            syncBannerEditPreview(bannerForm),\r\n            bindProfileFocalEditor(bannerForm, \"banner\"));\r\n          var bannerFileInput = formControl(bannerForm, \"banner\");\r\n          bannerFileInput &&\r\n            !bannerFileInput.dataset.dsdBannerPreviewBound &&\r\n            ((bannerFileInput.dataset.dsdBannerPreviewBound = \"true\"),\r\n            bannerFileInput.addEventListener(\"change\", function () {\r\n              (setProfileFocalFormValues(\r\n                bannerForm,\r\n                \"banner\",\r\n                { x: 0.5, y: 0.5 },\r\n                !0,\r\n              ),\r\n                syncBannerEditPreview(bannerForm));\r\n            }));\r\n        }\r\n        var avatarForm = qs(\"[data-dsd-avatar-form]\", root);\r\n        if (\r\n          (avatarForm &&\r\n            avatarForm.dataset.dsdAvatarSubmitBound !== BUILD &&\r\n            ((avatarForm.dataset.dsdAvatarSubmitBound = BUILD),\r\n            avatarForm.addEventListener(\"submit\", function (ev) {\r\n              ev.preventDefault();\r\n              var avatarFileField = formControl(avatarForm, \"avatar\"),\r\n                file =\r\n                  avatarFileField &&\r\n                  avatarFileField.files &&\r\n                  avatarFileField.files[0],\r\n                focus = readProfileFocalInputs(avatarForm, \"avatar\");\r\n              if (!file) {\r\n                composerBusy(\r\n                  avatarForm,\r\n                  \"Saving profile photo focus...\",\r\n                  saveProfileMediaPatch({\n                    avatarFocusX: focus.x,\n                    avatarFocusY: focus.y,\n                  }),\n                ).then(function (saved) {\n                  saved &&\n                    (syncReleaseBProfilePreview(!0), closeProfileModal(root));\n                });\r\n                return;\r\n              }\r\n              composerBusy(\r\n                avatarForm,\r\n                \"Saving profile photo...\",\r\n                createMediaManifest(\r\n                  file,\r\n                  \"profile\",\r\n                  activeOwnerProfileKey() ||\r\n                    actorRelationshipIdentity() ||\r\n                    actorUid() ||\r\n                    uid(),\r\n                  \"avatar\",\r\n                ).then(function (manifest) {\r\n                  return !manifest || manifest.status !== \"uploaded\"\r\n                    ? (renderStatus(\r\n                        \"Profile photo upload did not complete. Existing profile photo was kept.\",\r\n                      ),\r\n                      null)\r\n                    : resolveProfileMediaManifestUuid(manifest).then(\r\n                        function (mediaId) {\r\n                          return (\r\n                            (mediaId =\r\n                              mediaId || profileManifestMediaId(manifest)),\r\n                            mediaId\r\n                              ? saveProfileMediaPatch({\r\n                                  avatarMediaId: mediaId,\r\n                                  avatar_media_id: mediaId,\r\n                                  profileImageMediaId: mediaId,\r\n                                  profile_image_media_id: mediaId,\r\n                                  photoMediaId: mediaId,\r\n                                  photo_media_id: mediaId,\r\n                                  avatarFocusX: focus.x,\r\n                                  avatarFocusY: focus.y,\r\n                                })\r\n                              : (renderStatus(\r\n                                  \"Profile photo uploaded, but its media reference is still unavailable. Existing photo was kept.\",\r\n                                ),\r\n                                claim(\r\n                                  \"profile-avatar-save:canonical-media-id-missing\",\r\n                                  {\r\n                                    mediaId: manifest.mediaId || \"\",\r\n                                    objectKey:\r\n                                      manifest.wasabiObjectKey ||\r\n                                      manifest.path ||\r\n                                      \"\",\r\n                                  },\r\n                                ),\r\n                                null)\r\n                          );\r\n                        },\r\n                      );\r\n                }),\r\n              ).then(function (saved) {\n                saved &&\n                  (syncReleaseBProfilePreview(!0), closeProfileModal(root));\n              });\n            })),\r\n          avatarForm)\r\n        ) {\r\n          (setProfileFocalFormValues(\r\n            avatarForm,\r\n            \"avatar\",\r\n            profileMediaFocus(\r\n              state.profile || (viewedProfile && viewedProfile()) || {},\r\n              \"avatar\",\r\n            ),\r\n            !1,\r\n          ),\r\n            syncProfileFocalEditorPreview(avatarForm, \"avatar\"),\r\n            bindProfileFocalEditor(avatarForm, \"avatar\"));\r\n          var avatarFileInput = formControl(avatarForm, \"avatar\");\r\n          avatarFileInput &&\r\n            !avatarFileInput.dataset.dsdAvatarPreviewBound &&\r\n            ((avatarFileInput.dataset.dsdAvatarPreviewBound = \"true\"),\r\n            avatarFileInput.addEventListener(\"change\", function () {\r\n              (setProfileFocalFormValues(\r\n                avatarForm,\r\n                \"avatar\",\r\n                { x: 0.5, y: 0.5 },\r\n                !0,\r\n              ),\r\n                syncProfileFocalEditorPreview(avatarForm, \"avatar\"));\r\n            }));\r\n        }\r\n      }\r\n    }\r\n  }\r\n  function activateComposerMediaControl(target, ev) {\r\n    var control =\r\n      target &&\r\n      target.closest &&\r\n      target.closest(\"[data-dsd-composer-media-button]\");\r\n    if (!control || target.matches('input[type=\"file\"]')) return !1;\r\n    var input = qs('input[type=\"file\"]', control);\r\n    if (!input || input.disabled) return !1;\r\n    ev && (ev.preventDefault(), ev.stopPropagation());\r\n    var form = input.closest(\"form\"),\r\n      session = {\r\n        input: input,\r\n        form: form,\r\n        descriptor: composerMediaFormDescriptor(form),\r\n        openedAt: Date.now(),\r\n        fileEventReceived: !1,\r\n        noFileWarningShown: !1,\r\n        returnTimer: null,\r\n      },\r\n      picker = ensureCanonicalComposerMediaPickerInput();\r\n    activeComposerMediaPickerSession = session;\r\n    picker.__dsdPickerSession = session;\r\n    form && form.setAttribute(\"data-dsd-media-picker-active\", \"true\");\r\n    form && (form.dataset.dsdMediaSelectionPending = \"true\");\r\n    form && clearUploadStatus(form);\r\n    picker.accept = input.accept || \"image/*,video/*\";\r\n    picker.multiple = !!input.multiple;\r\n    try {\r\n      picker.value = \"\";\r\n    } catch (error) {}\r\n    picker.click();\r\n    return !0;\r\n  }\r\n  function bindActions() {\r\n    if (document.documentElement.dataset.dsdFirebaseActivationBound === BUILD)\r\n      return;\r\n    ((document.documentElement.dataset.dsdFirebaseActivationBound = BUILD),\r\n      document.addEventListener(\n        \"click\",\n        function (ev) {\n          var nearbyLocationRefresh = ev.target.closest(\n            \"[data-dsd-nearby-location-refresh]\",\n          );\n          if (nearbyLocationRefresh) {\n            ev.preventDefault();\n            requestNearbyBrowserLocation({ allowPrompt: !0, explicit: !0 });\n            return;\n          }\n          if (!ev.target.closest(\"[data-dsd-post-reaction-owner]\"))\n            closePostReactionTrays();\n          if (!ev.target.closest(\"[data-dsd-comment-reactions]\"))\n            closeCommentReactionTrays();\n          var capturedPostReaction = ev.target.closest(\n            \"[data-dsd-post-reaction]\",\n          );\n          if (capturedPostReaction) {\n            ev.preventDefault();\n            ev.stopPropagation();\n            closePostReactionTrays(\n              capturedPostReaction.closest(\"[data-dsd-post-reaction-owner]\"),\n            );\n            toggleReaction(\n              capturedPostReaction.getAttribute(\"data-post-id\") || \"\",\n              capturedPostReaction.getAttribute(\"data-dsd-post-reaction\") ||\n                \"like\",\n              capturedPostReaction.getAttribute(\"aria-pressed\") === \"true\",\n            );\n            return;\n          }\n          var globalCreate = ev.target.closest(\n            '[data-dsd-create-post-modal], [data-dsd-dock-icon=\"create\"]',\n          );\n          if (\r\n            globalCreate &&\r\n            globalCreate.getAttribute(\"data-dsd-create-post-modal\") === \"true\"\r\n          ) {\r\n            (ev.preventDefault(), openGlobalPostComposer());\r\n            return;\r\n          }\r\n          if (ev.target.closest(\"[data-dsd-global-post-composer-close]\")) {\r\n            (ev.preventDefault(), closeGlobalPostComposer());\r\n            return;\r\n          }\r\n          var profileContentTab = ev.target.closest(\r\n            \"[data-dsd-profile-content-tab]\",\r\n          );\r\n          if (profileContentTab) {\n            (ev.preventDefault(),\r\n              activateProfileContentTab(\r\n                profileContentTab.getAttribute(\"data-dsd-profile-content-tab\"),\r\n                profileContentTab.closest(\"[data-dsd-user-profile]\"),\r\n              ));\r\n            return;\n          }\n          var glanceFilter = ev.target.closest(\n              \"[data-dsd-profile-glance-filter]\",\n            ),\n            glanceMore = ev.target.closest(\"[data-dsd-profile-glance-more]\"),\n            glanceRetry = ev.target.closest(\"[data-dsd-profile-glance-retry]\");\n          if (glanceFilter) {\n            (ev.preventDefault(),\n              (state.profileGlanceFilter =\n                glanceFilter.getAttribute(\"data-dsd-profile-glance-filter\") ||\n                \"all\"),\n              (state.profileGlanceSummary = null),\n              hydrateProfileGlances(!0, !1));\n            return;\n          }\n          if (glanceMore) {\n            (ev.preventDefault(), hydrateProfileGlances(!0, !0));\n            return;\n          }\n          if (glanceRetry) {\n            (ev.preventDefault(), hydrateProfileGlances(!0, !1));\n            return;\n          }\n          var postAudienceOpen = ev.target.closest(\n              \"[data-dsd-post-audience-open]\",\n            ),\n            postAudienceClose = ev.target.closest(\n              \"[data-dsd-post-audience-close]\",\n            ),\n            postAudienceMore = ev.target.closest(\n              \"[data-dsd-post-audience-more]\",\n            );\n          if (postAudienceClose) {\n            (ev.preventDefault(), closePostAudienceSheet());\n            return;\n          }\n          if (postAudienceMore) {\n            ev.preventDefault();\n            postAudienceMore.disabled = !0;\n            postAudienceRequest(\n              state.activePostAudienceId,\n              postAudienceMore.getAttribute(\"data-offset\") || 0,\n            )\n              .then(function (summary) {\n                renderPostAudienceSheet(summary, !0);\n              })\n              .finally(function () {\n                postAudienceMore.disabled = !1;\n              });\n            return;\n          }\n          if (postAudienceOpen) {\n            (ev.preventDefault(),\n              openPostAudienceSheet(\n                postAudienceOpen.getAttribute(\"data-dsd-post-audience-open\") ||\n                  \"\",\n              ));\n            return;\n          }\n          var albumView = ev.target.closest(\"[data-dsd-album-view]\");\n          if (albumView) {\n            ev.preventDefault();\n            state.activeAlbumId = \"\";\n            state.activeAlbumDetail = null;\n            state.profileAlbumsLoadedKey = \"\";\n            loadProfileAlbums(!0, albumView.getAttribute(\"data-dsd-album-view\") || \"profile\");\n            return;\n          }\n          var albumOpen = ev.target.closest(\"[data-dsd-album-open]\");\n          if (albumOpen) {\n            ev.preventDefault();\n            state.albumLibraryOpen = !1;\n            loadAlbumDetail(albumOpen.getAttribute(\"data-dsd-album-open\") || \"\");\n            return;\n          }\n          var albumLibraryOpen = ev.target.closest(\"[data-dsd-album-library-open]\");\n          if (albumLibraryOpen) {\n            ev.preventDefault();\n            state.albumLibraryOpen = !state.albumLibraryOpen;\n            if (!state.albumLibraryOpen) renderProfileAlbums();\n            else loadAlbumMediaLibrary().then(renderProfileAlbums);\n            return;\n          }\n          var albumAddMedia = ev.target.closest(\"[data-dsd-album-add-media]\");\n          if (albumAddMedia) {\n            ev.preventDefault();\n            mutateAlbum({\n              action: \"add_media\",\n              albumId: state.activeAlbumId,\n              mediaId: albumAddMedia.getAttribute(\"data-dsd-album-add-media\") || \"\",\n            }, \"Media added to album.\").then(function () {\n              return state.albumLibraryOpen && loadAlbumMediaLibrary().then(renderProfileAlbums);\n            });\n            return;\n          }\n          var reportAlbum = ev.target.closest(\"[data-dsd-report-album]\");\n          if (reportAlbum) {\n            ev.preventDefault();\n            var reportAlbumId = reportAlbum.getAttribute(\"data-dsd-report-album\") || \"\";\n            openReportModal(\"album\", reportAlbumId, \"albums/\" + reportAlbumId, \"User reported album\");\n            return;\n          }\n          var reportProfile = ev.target.closest(\"[data-dsd-report-profile]\");\n          if (reportProfile) {\n            ev.preventDefault();\n            var reportProfileKey = reportProfile.getAttribute(\"data-dsd-report-profile\") || \"\";\n            openReportModal(\"profile\", reportProfileKey, \"profiles/\" + reportProfileKey, \"User reported profile\");\n            return;\n          }\n          var reportMedia = ev.target.closest(\"[data-dsd-report-media]\");\n          if (reportMedia) {\n            ev.preventDefault();\n            var reportMediaId = reportMedia.getAttribute(\"data-dsd-report-media\") || \"\",\n              reportMediaPostId = reportMedia.getAttribute(\"data-dsd-report-media-post\") || \"\";\n            closeImmersiveOverlay();\n            openReportModal(\"media\", reportMediaId, \"posts/\" + reportMediaPostId + \"/media/\" + reportMediaId, \"User reported media\");\n            return;\n          }\n          if (ev.target.closest(\"[data-dsd-album-back]\")) {\n            ev.preventDefault();\n            state.activeAlbumId = \"\";\n            state.activeAlbumDetail = null;\n            state.albumLibraryOpen = !1;\n            renderProfileAlbums();\n            return;\n          }\n          var albumRemove = ev.target.closest(\"[data-dsd-album-remove-item]\");\n          if (albumRemove) {\n            ev.preventDefault();\n            mutateAlbum({\n              action: \"remove_item\",\n              albumId: state.activeAlbumId,\n              itemId: albumRemove.getAttribute(\"data-dsd-album-remove-item\") || \"\",\n            }, \"Removed from album. The source was kept.\");\n            return;\n          }\n          var albumMove = ev.target.closest(\"[data-dsd-album-move-item]\");\n          if (albumMove) {\n            ev.preventDefault();\n            mutateAlbum({\n              action: \"move_item\",\n              albumId: state.activeAlbumId,\n              itemId: albumMove.getAttribute(\"data-dsd-album-move-item\") || \"\",\n              direction: albumMove.getAttribute(\"data-direction\") || \"\",\n            }, \"Album order updated.\");\n            return;\n          }\n          var albumCover = ev.target.closest(\"[data-dsd-album-set-cover]\");\n          if (albumCover) {\n            ev.preventDefault();\n            mutateAlbum({\n              action: \"set_cover\",\n              albumId: state.activeAlbumId,\n              mediaId: albumCover.getAttribute(\"data-dsd-album-set-cover\") || \"\",\n            }, albumCover.getAttribute(\"data-dsd-album-set-cover\") ? \"Album cover updated.\" : \"Album cover cleared.\");\n            return;\n          }\n          var albumGrant = ev.target.closest(\"[data-dsd-album-grant]\");\n          if (albumGrant) {\n            ev.preventDefault();\n            mutateAlbum({ action: \"grant\", albumId: state.activeAlbumId, recipientProfileKey: albumGrant.getAttribute(\"data-dsd-album-grant\") || \"\" }, \"Album access granted.\");\n            return;\n          }\n          var albumRevoke = ev.target.closest(\"[data-dsd-album-revoke]\");\n          if (albumRevoke) {\n            ev.preventDefault();\n            mutateAlbum({ action: \"revoke\", albumId: state.activeAlbumId, recipientProfileKey: albumRevoke.getAttribute(\"data-dsd-album-revoke\") || \"\" }, \"Album access revoked.\");\n            return;\n          }\n          if (ev.target.closest(\"[data-dsd-album-delete]\")) {\n            ev.preventDefault();\n            if (window.confirm(\"Delete this album? Its Posts and media will not be deleted.\"))\n              mutateAlbum({ action: \"delete\", albumId: state.activeAlbumId }, \"Album deleted. Source content was kept.\");\n            return;\n          }\n          var profilePanelOpener = ev.target.closest(\n            \"[data-dsd-profile-modal-open]\",\r\n          );\r\n          if (profilePanelOpener) {\r\n            ev.preventDefault();\r\n            var profilePanelKey = profilePanelOpener.getAttribute(\r\n              \"data-dsd-profile-modal-open\",\r\n            );\r\n            if (profilePanelKey === \"story\") {\r\n              (ev.stopPropagation(), openStoryComposer(!0));\r\n              return;\r\n            }\r\n            openProfilePanel(\r\n              profilePanelKey,\r\n              profilePanelOpener.closest(\"[data-dsd-user-profile]\"),\r\n            );\r\n            return;\r\n          }\r\n          var profilePanelCloser = ev.target.closest(\r\n            \"[data-dsd-profile-modal-close]\",\r\n          );\r\n          if (profilePanelCloser) {\n            (ev.preventDefault(),\n              closeProfileModal(\n                profilePanelCloser.closest(\"[data-dsd-user-profile]\"),\n              ));\n            return;\n          }\n          var profilePrivacyToggle = ev.target.closest(\n            \"[data-dsd-profile-privacy-toggle]\",\n          );\n          if (profilePrivacyToggle) {\n            ev.preventDefault();\n            ev.stopPropagation();\n            if (profilePrivacyToggle.disabled) return;\n            var nextProfileVisibility =\n              profilePrivacyToggle.getAttribute(\"data-dsd-profile-privacy-toggle\") ===\n              \"private\"\n                ? \"private\"\n                : \"public\";\n            if (\n              nextProfileVisibility === \"public\" &&\n              !window.confirm(\n                \"Make this profile public? Existing valid pending follow requests will be approved.\",\n              )\n            )\n              return;\n            profilePrivacyToggle.disabled = !0;\n            profilePrivacyToggle.setAttribute(\"aria-busy\", \"true\");\n            transitionProfileVisibilityViaProxy(nextProfileVisibility)\n              .then(function (result) {\n                var savedProfile = result && result.profile;\n                savedProfile && refreshProfileSaveSurfaces(normalizeSupabaseProfileRecord(savedProfile), document);\n                renderStatus(\n                  nextProfileVisibility === \"private\"\n                    ? \"Profile is private. Follow requests require your approval.\"\n                    : \"Profile is public.\" +\n                      (Number(result && result.approvedFollowCount || 0)\n                        ? \" \" + Number(result.approvedFollowCount) + \" pending follow request\" +\n                          (Number(result.approvedFollowCount) === 1 ? \" was\" : \"s were\") + \" approved.\"\n                        : \"\"),\n                );\n              })\n              .catch(function (error) {\n                renderStatus(\n                  (error && error.message) ||\n                    \"Profile privacy could not be updated.\",\n                );\n              })\n              .finally(function () {\n                profilePrivacyToggle.removeAttribute(\"aria-busy\");\n                profilePrivacyToggle.disabled = !1;\n              });\n            return;\n          }\n          var storyScope = ev.target.closest(\"[data-dsd-story385-scope]\");\n          if (storyScope) {\n            (ev.preventDefault(),\r\n              ev.stopPropagation(),\r\n              (state.storyScope =\r\n                storyScope.getAttribute(\"data-dsd-story385-scope\") ||\r\n                \"profile\"),\r\n              (state.storyScopeUserSelected = !0),\r\n              (state.activeStoryId = \"\"),\r\n              (state.storySelectionExplicit = !1),\r\n              renderStories());\r\n            return;\n          }\n          var storyAudienceOpen = ev.target.closest(\n              \"[data-dsd-story-audience-open], [data-dsd-story-watch-open]\",\n            ),\n            storyAudienceClose = ev.target.closest(\n              \"[data-dsd-story-audience-close]\",\n            ),\n            storyAudienceMore = ev.target.closest(\n              \"[data-dsd-story-audience-more]\",\n            );\n          var storyActionsSummary = ev.target.closest(\n            \"[data-dsd-story-actions-panel] > summary\",\n          );\n          if (storyActionsSummary) {\n            window.setTimeout(function () {\n              var panel = storyActionsSummary.closest(\"[data-dsd-story-actions-panel]\");\n              setStoryPauseToken(\"story-menu\", !!(panel && panel.open));\n            }, 0);\n          } else if (!ev.target.closest(\"[data-dsd-story-actions-panel]\")) {\n            var openStoryMenus = qsa(\"[data-dsd-story-actions-panel][open]\");\n            openStoryMenus.forEach(function (panel) {\n              panel.removeAttribute(\"open\");\n            });\n            (openStoryMenus.length || (state.storyPauseTokens || {})[\"story-menu\"]) &&\n              setStoryPauseToken(\"story-menu\", !1);\n          }\n          if (storyAudienceClose) {\n            (ev.preventDefault(), ev.stopPropagation(), closeStoryAudienceSheet());\n            return;\n          }\n          if (storyAudienceMore) {\n            var storyAudienceSheet = storyAudienceMore.closest(\n              \"[data-dsd-story-watch-sheet]\",\n            );\n            (ev.preventDefault(),\n              ev.stopPropagation(),\n              loadMoreStoryAudience(\n                (storyAudienceSheet &&\n                  storyAudienceSheet.getAttribute(\n                    \"data-dsd-story-watch-sheet\",\n                  )) || state.activeStoryId,\n                storyAudienceMore.getAttribute(\"data-offset\") || 0,\n              ));\n            return;\n          }\n          if (storyAudienceOpen) {\n            (ev.preventDefault(),\n              ev.stopPropagation(),\n              openStoryAudienceSheet(\n                storyAudienceOpen.getAttribute(\"data-dsd-story-audience-open\") ||\n                  storyAudienceOpen.getAttribute(\"data-dsd-story-watch-open\") ||\n                  state.activeStoryId,\n              ));\n            var storyMenu = storyAudienceOpen.closest(\"details\");\n            storyMenu && storyMenu.removeAttribute(\"open\");\n            setStoryPauseToken(\"story-menu\", !1);\n            return;\n          }\n          var trayStory = ev.target.closest(\"[data-dsd-view-story]\"),\n            storyProfileLink = ev.target.closest(\r\n              \"[data-dsd-story-profile-link]\",\r\n            );\r\n          if (!(storyProfileLink && !trayStory)) {\r\n            if (trayStory) {\r\n              (ev.preventDefault(),\r\n                ev.stopPropagation(),\r\n                (state.storySelectionExplicit = !0),\r\n                (state.activeStoryId =\r\n                  trayStory.getAttribute(\"data-dsd-view-story\") || \"\"),\r\n                renderStories(),\r\n                openStoryOverlay(state.activeStoryId));\r\n              return;\r\n            }\r\n            var storyMedia = ev.target.closest(\r\n              \".dsd-story385__media, .dsd-story385__canvas .dsd-launch-media-chip\",\r\n            );\r\n            if (storyMedia) {\r\n              var mediaStory = storyMedia.closest(\"[data-dsd-view-story]\");\r\n              (mediaStory &&\r\n                (state.activeStoryId =\r\n                  mediaStory.getAttribute(\"data-dsd-view-story\") ||\r\n                  state.activeStoryId),\r\n                (state.storySelectionExplicit = !0),\r\n                ev.preventDefault(),\r\n                ev.stopPropagation(),\r\n                openStoryOverlay(state.activeStoryId));\r\n              return;\r\n            }\r\n            var story = ev.target.closest(\"[data-dsd-view-story]\");\r\n            if (story && story.closest(\"[data-dsd-story385]\")) {\r\n              (ev.preventDefault(),\r\n                ev.stopPropagation(),\r\n                (state.storySelectionExplicit = !0),\r\n                (state.activeStoryId =\r\n                  story.getAttribute(\"data-dsd-view-story\") || \"\"),\r\n                openStoryOverlay(state.activeStoryId));\r\n              return;\r\n            }\r\n            story &&\r\n              (ev.preventDefault(),\r\n              ev.stopPropagation(),\r\n              (state.storySelectionExplicit = !0),\r\n              (state.activeStoryId =\r\n                story.getAttribute(\"data-dsd-view-story\") || \"\"),\r\n              renderStories(),\r\n              openStoryOverlay(state.activeStoryId));\r\n          }\r\n        },\r\n        !0,\r\n      ),\r\n      document.addEventListener(\r\n        \"click\",\r\n        function (ev) {\r\n          var profileMediaOpen =\r\n            ev.target &&\r\n            ev.target.closest &&\r\n            ev.target.closest(\"[data-dsd-profile-media-open]\");\r\n          if (\r\n            profileMediaOpen &&\r\n            !ev.target.closest(\"[data-dsd-owner-control], button, a, input, label\")\r\n          ) {\r\n            ev.preventDefault();\r\n            ev.stopImmediatePropagation();\r\n            openProfileMedia(\r\n              viewedProfile(),\r\n              profileMediaOpen.getAttribute(\"data-dsd-profile-media-open\"),\r\n            );\r\n            return;\r\n          }\r\n          var inlinePostMedia =\r\n            ev.target &&\r\n            ev.target.closest &&\r\n            ev.target.closest(\r\n              '.dsd-post-card [data-dsd-post-media-inline-only=\"true\"], .dsd-post-card .dsd-launch-media-chip[data-dsd-inline-media=\"true\"], .dsd-post-drawer [data-dsd-comment-media-open=\"true\"]',\r\n            );\r\n          if (\r\n            !(\r\n              !inlinePostMedia ||\r\n              inlinePostMedia.closest(\r\n                \"[data-dsd-story-overlay-viewer], [data-dsd-story-fullscreen-canvas]\",\r\n              )\r\n            ) &&\r\n            (inlinePostMedia.setAttribute(\r\n              \"data-dsd-post-media-modal-deconstructed\",\r\n              BUILD,\r\n            ),\r\n            !(\r\n              ev.target &&\r\n              ev.target.closest &&\r\n              ev.target.closest(\r\n                \"video, audio, button, a, input, textarea, select, label\",\r\n              )\r\n            ))\r\n          ) {\r\n            (ev.preventDefault(), ev.stopImmediatePropagation());\r\n            var card = inlinePostMedia.closest(\".dsd-post-card\"),\r\n              sharedOriginal = inlinePostMedia.closest(\n                \"[data-dsd-shared-original-id]\",\n              ),\n              mediaIndex = Number(\n                inlinePostMedia.getAttribute(\"data-dsd-media-index\") || 0,\r\n              );\r\n            if (inlinePostMedia.matches('[data-dsd-comment-media-open=\"true\"]')) {\r\n              openCommentMedia(\r\n                inlinePostMedia.getAttribute(\"data-post-id\") || \"\",\r\n                inlinePostMedia.getAttribute(\"data-dsd-comment-id\") || \"\",\r\n                inlinePostMedia.getAttribute(\"data-dsd-media-id\") || \"\",\r\n                isFinite(mediaIndex) ? mediaIndex : 0,\r\n              );\r\n              return;\r\n            }\r\n            openPostMedia(\r\n              (sharedOriginal &&\n                sharedOriginal.getAttribute(\"data-dsd-shared-original-id\")) ||\n                (card && card.getAttribute(\"data-post-id\")) ||\n                \"\",\n              inlinePostMedia.getAttribute(\"data-dsd-media-id\") || \"\",\n              isFinite(mediaIndex) ? mediaIndex : 0,\n              inlinePostMedia.closest(\"[data-dsd-profile-feed-list]\")\n                ? \"profile\"\n                : \"feed\",\n            );\n          }\r\n        },\r\n        !0,\r\n      ),\n      document.addEventListener(\"keydown\", function (ev) {\r\n        if (ev.key !== \"Enter\" && ev.key !== \" \") return;\r\n        var commentMediaOpen =\r\n          ev.target &&\r\n          ev.target.closest &&\r\n          ev.target.closest('[data-dsd-comment-media-open=\"true\"]');\r\n        if (commentMediaOpen) {\r\n          ev.preventDefault();\r\n          openCommentMedia(\r\n            commentMediaOpen.getAttribute(\"data-post-id\") || \"\",\r\n            commentMediaOpen.getAttribute(\"data-dsd-comment-id\") || \"\",\r\n            commentMediaOpen.getAttribute(\"data-dsd-media-id\") || \"\",\r\n            Number(commentMediaOpen.getAttribute(\"data-dsd-media-index\") || 0),\r\n          );\r\n          return;\r\n        }\r\n        var profileMediaOpen =\r\n          ev.target &&\r\n          ev.target.closest &&\r\n          ev.target.closest(\"[data-dsd-profile-media-open]\");\r\n        if (!profileMediaOpen) return;\r\n        ev.preventDefault();\r\n        openProfileMedia(\r\n          viewedProfile(),\r\n          profileMediaOpen.getAttribute(\"data-dsd-profile-media-open\"),\r\n        );\r\n      }),\r\n      document.addEventListener(\r\n        \"click\",\r\n        function (ev) {\r\n          var messageMediaOpen =\r\n            ev.target &&\r\n            ev.target.closest &&\r\n            ev.target.closest(\r\n              '[data-dsd-message-media-open][data-dsd-message-view-once=\"false\"]',\r\n            );\r\n          if (!messageMediaOpen) return;\r\n          messageMediaOpen.setAttribute(\r\n            \"data-dsd-message-overlay-dispatched\",\r\n            BUILD,\r\n          );\r\n          var openMessageId =\r\n              messageMediaOpen.getAttribute(\"data-message-id\") ||\r\n              (messageMediaOpen.closest(\"[data-message-id]\") &&\r\n                messageMediaOpen\r\n                  .closest(\"[data-message-id]\")\r\n                  .getAttribute(\"data-message-id\")) ||\r\n              \"\",\r\n            openMessageForm = qs(\r\n              \"[data-dsd-message-drawer-form]\",\r\n              messageMediaOpen.closest(\"[data-dsd-msg384]\") || document,\r\n            ),\r\n            openMessageCid =\r\n              state.activeConversationId ||\r\n              (\r\n                qs('[name=\"conversationId\"]', openMessageForm || document) ||\r\n                {}\r\n              ).value ||\r\n              \"\";\r\n          if (!openMessageId || !openMessageCid) return;\r\n          (ev.preventDefault(),\r\n            ev.stopImmediatePropagation(),\r\n            openMessageMedia(\r\n              openMessageCid,\r\n              openMessageId,\r\n              messageMediaOpen.getAttribute(\"data-dsd-media-id\") || \"\",\r\n              Number(\r\n                messageMediaOpen.getAttribute(\"data-dsd-media-index\") || 0,\r\n              ),\r\n            ),\r\n            messageMediaOpen.setAttribute(\r\n              \"data-dsd-message-overlay-opened\",\r\n              BUILD,\r\n            ));\r\n        },\r\n        !0,\r\n      ),\r\n      document.addEventListener(\"click\", function (ev) {\n        var setupIssue = ev.target.closest(\"[data-dsd-report-setup-issue]\");\n        if (setupIssue) {\n          ev.preventDefault();\n          openSetupIssueModal(setupIssue);\n          return;\n        }\n        if (!activateComposerMediaControl(ev.target, ev)) {\n          var transientDetails = ev.target.closest(\n            \"details.dsd-post-more-menu, details.dsd-comment-action-menu, details.dsd-composer-help, details.dsd-connection-secondary-menu\",\n          );\n          qsa(\n            \"details.dsd-post-more-menu[open], details.dsd-comment-action-menu[open], details.dsd-composer-help[open], details.dsd-connection-secondary-menu[open]\",\n          ).forEach(function (details) {\n            if (details !== transientDetails && !details.contains(ev.target))\n              details.removeAttribute(\"open\");\n          });\n          var pollToggle = ev.target.closest(\"[data-dsd-poll-toggle]\");\n          if (pollToggle) {\n            ev.preventDefault();\n            var pollForm = pollToggle.closest(\"form\"),\n              pollFields = pollForm && qs(\"[data-dsd-poll-fields]\", pollForm),\n              opening = !!(pollFields && pollFields.hidden);\n            if (pollFields) pollFields.hidden = !opening;\n            pollToggle.setAttribute(\"aria-expanded\", opening ? \"true\" : \"false\");\n            pollToggle.textContent = opening ? \"Remove poll\" : \"Add poll\";\n            var firstPollOption = opening && qs('input[name=\"pollOption\"]', pollFields);\n            firstPollOption && firstPollOption.focus();\n            return;\n          }\n          var pollAdd = ev.target.closest(\"[data-dsd-poll-add-option]\");\n          if (pollAdd) {\n            ev.preventDefault();\n            var pollOptions = qs(\"[data-dsd-poll-options]\", pollAdd.closest(\"form\")),\n              pollOptionCount = pollOptions ? qsa('input[name=\"pollOption\"]', pollOptions).length : 0;\n            if (pollOptions && pollOptionCount < 4) {\n              pollOptions.insertAdjacentHTML(\n                \"beforeend\",\n                '<label><span>Choice ' + (pollOptionCount + 1) + '</span><span class=\"dsd-poll-composer__option-row\"><input name=\"pollOption\" maxlength=\"120\" autocomplete=\"off\"><button type=\"button\" data-dsd-poll-remove-option aria-label=\"Remove choice ' + (pollOptionCount + 1) + '\">&times;</button></span></label>',\n              );\n              var addedPollOption = qsa('input[name=\"pollOption\"]', pollOptions).pop();\n              addedPollOption && addedPollOption.focus();\n            }\n            pollAdd.disabled = pollOptionCount + 1 >= 4;\n            return;\n          }\n          var pollRemove = ev.target.closest(\"[data-dsd-poll-remove-option]\");\n          if (pollRemove) {\n            ev.preventDefault();\n            var removeOptions = qs(\"[data-dsd-poll-options]\", pollRemove.closest(\"form\"));\n            pollRemove.closest(\"label\").remove();\n            qsa(\"label\", removeOptions).forEach(function (label, index) {\n              var text = qs(\"span\", label);\n              text && (text.textContent = \"Choice \" + (index + 1));\n            });\n            var addOptionButton = qs(\"[data-dsd-poll-add-option]\", pollRemove.closest(\"form\"));\n            addOptionButton && (addOptionButton.disabled = !1);\n            return;\n          }\n          var pollVote = ev.target.closest(\"[data-dsd-poll-vote]\");\n          if (pollVote) {\n            ev.preventDefault();\n            votePostPoll(\n              pollVote.getAttribute(\"data-post-id\"),\n              pollVote.getAttribute(\"data-option-id\"),\n            ).catch(function () {});\n            return;\n          }\n          var restoreDraft = ev.target.closest(\"[data-dsd-restore-draft]\");\n          if (restoreDraft) {\n            ev.preventDefault();\n            var restoreForm = restoreDraft.closest(\"form\"),\n              savedDraft = readSocialDraft(restoreForm),\n              restoreBody = restoreForm && qs('[name=\"body\"]', restoreForm),\n              restoreVisibility =\n                restoreForm && qs('[name=\"visibility\"]', restoreForm);\n            if (savedDraft && restoreBody) {\n              restoreBody.value = String(savedDraft.body || \"\");\n              savedDraft.visibility &&\n                restoreVisibility &&\n                (restoreVisibility.value = savedDraft.visibility);\n              restoreDraft.closest(\"[data-dsd-draft-recovery]\").remove();\n              updateComposerCounters(restoreForm);\n              restoreBody.focus();\n            }\n            return;\n          }\n          var discardDraft = ev.target.closest(\"[data-dsd-discard-draft]\");\n          if (discardDraft) {\n            ev.preventDefault();\n            clearSocialDraft(discardDraft.closest(\"form\"));\n            return;\n          }\n          var copyShareLink = ev.target.closest(\"[data-dsd-copy-share-link]\");\n          if (copyShareLink) {\n            ev.preventDefault();\n            var copyForm = copyShareLink.closest(\"[data-dsd-share-composer]\"),\n              copyOriginalId =\n                copyForm && copyForm.getAttribute(\"data-original-post-id\");\n            copyStablePostLink(copyOriginalId);\n            return;\n          }\n          var systemShareLink = ev.target.closest(\"[data-dsd-system-share-link]\");\n          if (systemShareLink) {\n            ev.preventDefault();\n            var systemShareForm = systemShareLink.closest(\n                \"[data-dsd-share-composer]\",\n              ),\n              systemShareOriginalId =\n                systemShareForm &&\n                systemShareForm.getAttribute(\"data-original-post-id\");\n            systemShareStablePostLink(systemShareOriginalId);\n            return;\n          }\n          var audienceBadge = ev.target.closest(\n            \"[data-dsd-post-audience]\",\r\n          );\r\n          qsa(\"[data-dsd-post-audience]\").forEach(function (badge) {\r\n            var tooltip = qs(\"[role=tooltip]\", badge),\r\n              active = badge === audienceBadge &&\r\n                badge.getAttribute(\"aria-expanded\") !== \"true\";\r\n            (badge.setAttribute(\"aria-expanded\", active ? \"true\" : \"false\"),\r\n              badge.closest(\".dsd-post-card\") &&\r\n                badge\r\n                  .closest(\".dsd-post-card\")\r\n                  .classList.toggle(\"dsd-post-tooltip-open\", active),\r\n              tooltip && (tooltip.hidden = !active));\r\n          });\r\n          if (audienceBadge) {\n            ev.preventDefault();\r\n            ev.stopPropagation();\r\n            return;\n          }\n          var saveConnections = ev.target.closest(\"[data-dsd-save-connection-settings]\");\n          if (saveConnections) {\n            ev.preventDefault();\n            ev.stopPropagation();\n            saveConnectionSettings(saveConnections.closest(\"[data-dsd-connection-settings]\"));\n            return;\n          }\n          var retryRadar = ev.target.closest(\"[data-dsd-connection-radar-retry]\");\n          if (retryRadar) {\n            ev.preventDefault();\n            loadConnectionPresence(!0, state.connectionDiscoveryMode);\n            return;\n          }\n          var retryPulse = ev.target.closest(\"[data-dsd-local-pulse-retry]\");\n          if (retryPulse) {\n            ev.preventDefault();\n            state.localPulseStatus = \"idle\";\n            loadConnectionPresence(!0, \"pulse\");\n            return;\n          }\n          var eventPresence = ev.target.closest(\"[data-dsd-event-presence]\");\n          if (eventPresence) {\n            ev.preventDefault();\n            ev.stopPropagation();\n            mutateEventPresence(eventPresence);\n            return;\n          }\n          var connectionMode = ev.target.closest(\"[data-dsd-connection-mode]\");\n          if (connectionMode) {\n            ev.preventDefault();\n            var requestedConnectionMode =\n              connectionMode.getAttribute(\"data-dsd-connection-mode\");\n            state.connectionShuffleOpen = requestedConnectionMode === \"shuffle\";\n            state.connectionShuffleComplete = !1;\n            state.connectionShuffleIndex = 0;\n            state.connectionDiscoveryMode = requestedConnectionMode;\n            renderConnectionSurfaces();\n            loadConnectionPresence(!0, requestedConnectionMode);\n            return;\n          }\n          var saveDiscovery = ev.target.closest(\"[data-dsd-save-discovery-settings]\");\n          if (saveDiscovery) {\n            ev.preventDefault();\n            saveConnectionDiscoverySettings(saveDiscovery.closest(\"[data-dsd-connection-radar]\"));\n            return;\n          }\n          if (ev.target.closest(\"[data-dsd-open-shuffle]\")) {\n            ev.preventDefault();\n            state.connectionShuffleOpen = !0;\n            state.connectionShuffleIndex = Math.min(state.connectionShuffleIndex, Math.max(connectionRowsForCanonicalFilter(state.connectionShuffleRows || []).length - 1, 0));\n            renderConnectionSurfaces();\n            return;\n          }\n          if (ev.target.closest(\"[data-dsd-close-shuffle]\")) {\n            ev.preventDefault();\n            closeConnectionShuffle();\n            return;\n          }\n          if (ev.target.closest(\"[data-dsd-shuffle-next]\")) {\n            ev.preventDefault();\n            moveConnectionShuffle(1);\n            return;\n          }\n          if (ev.target.closest(\"[data-dsd-shuffle-connections]\")) {\n            ev.preventDefault();\n            state.connectionShuffleOpen = !1;\n            state.connectionShuffleComplete = !1;\n            state.connectionShuffleIndex = 0;\n            loadConnectionPresence(!0, \"connections\");\n            return;\n          }\n          if (ev.target.closest(\"[data-dsd-shuffle-back]\")) {\n            ev.preventDefault();\n            moveConnectionShuffle(-1);\n            return;\n          }\n          var connectionStory = ev.target.closest(\"[data-dsd-connection-story]\");\n          if (connectionStory) {\n            ev.preventDefault();\n            ev.stopPropagation();\n            openConnectionStoryForProfile(connectionStory.getAttribute(\"data-dsd-connection-story\") || \"\");\n            return;\n          }\n          var connectionSignal = ev.target.closest(\"[data-dsd-connection-signal]\");\n          if (connectionSignal) {\n            ev.preventDefault();\n            ev.stopPropagation();\n            mutateConnectionSignal(connectionSignal);\n            return;\n          }\n          var safetyProfileAction = ev.target.closest(\"[data-dsd-safety-profile-action]\");\n          if (safetyProfileAction) {\n            ev.preventDefault();\n            ev.stopPropagation();\n            var safetyAction = safetyProfileAction.getAttribute(\"data-dsd-safety-profile-action\"),\n              safetyUid = safetyProfileAction.getAttribute(\"data-target-uid\") || \"\",\n              safetyKey = safetyProfileAction.getAttribute(\"data-profile-key\") || \"\";\n            safetyProfileAction.disabled = !0;\n            (safetyAction === \"unblock\"\n              ? unblockProfile(safetyUid, safetyKey)\n              : blockProfile(safetyUid, safetyKey)\n            ).then(function () {\n              renderModeration();\n            }).finally(function () {\n              safetyProfileAction.isConnected && (safetyProfileAction.disabled = !1);\n            });\n            return;\n          }\n          var profileAnchor =\n            ev.target.closest &&\n            ev.target.closest('a[href*=\"/pages/user-profile?profile=\"]');\n          if (\r\n            profileAnchor &&\r\n            !profileAnchor.closest(\"[data-notification-card]\") &&\r\n            !ev.defaultPrevented &&\r\n            !ev.metaKey &&\r\n            !ev.ctrlKey &&\r\n            !ev.shiftKey &&\r\n            !ev.altKey &&\r\n            profileAnchor.target !== \"_blank\"\r\n          ) {\r\n            var bridgedProfileHref = profileNavigationBridgeHref(\r\n              profileAnchor.getAttribute(\"href\") || \"\",\r\n            );\r\n            if (bridgedProfileHref) {\r\n              (ev.preventDefault(),\r\n                navigateProfileHref(\r\n                  profileAnchor.getAttribute(\"href\") || bridgedProfileHref,\r\n                ));\r\n              return;\r\n            }\r\n          }\r\n          var closePostDrawerButton = ev.target.closest(\r\n            \"[data-dsd-close-post-drawer]\",\r\n          );\r\n          if (closePostDrawerButton) {\r\n            ev.preventDefault();\r\n            var closeForm = closePostDrawerButton.closest(\"form\");\r\n            (closeForm &&\r\n              (closeForm.reset(), clearFormAttachments(closeForm, !0)),\r\n              closePostDrawer());\r\n            return;\r\n          }\r\n          var nearbyClear = ev.target.closest(\n            \"[data-dsd-nearby-location-clear]\",\r\n          );\r\n          if (nearbyClear) {\r\n            (ev.preventDefault(),\r\n              saveNearbyLocationState({\r\n                status: \"idle\",\r\n                source: \"\",\r\n                latitude: null,\r\n                longitude: null,\r\n                updatedAt: 0,\r\n                error: \"\",\r\n              }),\r\n              (state.nearbyDiscoveryRows = []),\r\n              (state.nearbyDiscoveryCacheKey = \"\"),\r\n              (state.nearbyDiscoveryCacheAt = 0),\r\n              (state.nearbyDiscoveryPendingKey = \"\"),\r\n              persistNearbyLocationPreference(!1, null, !0).then(function (saved) {\r\n                (renderStatus(\r\n                  saved\r\n                    ? \"Stored Nearby location cleared. Current city remains unchanged.\"\r\n                    : \"Nearby location could not be cleared. Try again.\",\r\n                ),\r\n                  renderDiscovery(),\r\n                  syncProfileSetupForms(document));\r\n              }));\r\n            return;\r\n          }\r\n          var discoveryFilter = ev.target.closest(\"[data-dsd-users311-filter]\");\n          if (discoveryFilter) {\n            ev.preventDefault();\r\n            var discoveryRoot = discoveryFilter.closest(\"[data-dsd-users311]\"),\r\n              selectedDiscoveryFilter =\r\n                discoveryFilter.getAttribute(\"data-dsd-users311-filter\") ||\r\n                \"all\";\r\n            (setCanonicalDiscoveryFilter(selectedDiscoveryFilter, discoveryRoot || document),\n              selectedDiscoveryFilter === \"nearby\" &&\n                nearbyLocationStale() &&\r\n                requestNearbyBrowserLocation({\r\n                  allowPrompt: !0,\r\n                  explicit: !1,\r\n                }),\r\n              renderDiscovery());\r\n            return;\n          }\n          var discoveryCard2 =\n            ev.target.closest &&\r\n            ev.target.closest(\".dsd-users311__card[data-profile-key]\");\r\n          if (\r\n            discoveryCard2 &&\r\n            !ev.target.closest(\"a,button,input,textarea,select,label\")\r\n          ) {\r\n            var profileLink = qs(\r\n                'a.dsd-users311__card-link[href], .dsd-users311__actions a[href*=\"/pages/user-profile\"]',\r\n                discoveryCard2,\r\n              ),\r\n              profileHref = profileLink && profileLink.getAttribute(\"href\");\r\n            if (profileHref) {\r\n              (ev.preventDefault(), navigateProfileHref(profileHref));\r\n              return;\r\n              }\n          }\n          var retryMedia = ev.target.closest(\"[data-dsd-media-retry]\");\n          if (retryMedia) {\n            ev.preventDefault();\n            var retryFrame = retryMedia.closest(\"[data-dsd-media-id]\"),\n              retryMediaId =\n                retryFrame && retryFrame.getAttribute(\"data-dsd-media-id\");\n            if (retryFrame && retryMediaId) {\n              delete state.mediaReadCache[retryMediaId];\n              delete state.mediaReadCache[retryMediaId + \"::card\"];\n              delete state.mediaReadCache[retryMediaId + \"::original\"];\n              delete retryFrame.dataset.dsdReadHydrated;\n              retryFrame.classList.remove(\"is-ready\", \"is-unavailable\");\n              retryFrame.classList.add(\"is-loading\");\n              retryFrame.textContent = \"\";\n              hydrateMediaReads(retryFrame);\n            }\n            return;\n          }\n          var replyComment = ev.target.closest(\"[data-dsd-reply-comment]\");\n          if (replyComment) {\n            ev.preventDefault();\n            var replyPostId = replyComment.getAttribute(\"data-post-id\") || \"\",\n              replyCommentId =\n                replyComment.getAttribute(\"data-dsd-reply-comment\") || \"\";\n            state.commentReplyParentByPost[replyPostId] = replyCommentId;\n            state.expandedCommentThreads[replyCommentId] = !0;\n            renderPostDrawer();\n            var replyForm = qs(\"[data-dsd-comment-form]\", ensurePostDrawerRoot()),\n              replyField = replyForm && qs('textarea[name=\"body\"]', replyForm);\n            replyField && replyField.focus();\n            return;\n          }\n          if (ev.target.closest(\"[data-dsd-cancel-comment-reply]\")) {\n            ev.preventDefault();\n            delete state.commentReplyParentByPost[\n              (state.postDrawer && state.postDrawer.postId) || \"\"\n            ];\n            renderPostDrawer();\n            return;\n          }\n          var toggleReplies = ev.target.closest(\n            \"[data-dsd-toggle-comment-replies]\",\n          );\n          if (toggleReplies) {\n            ev.preventDefault();\n            var threadId =\n              toggleReplies.getAttribute(\"data-dsd-toggle-comment-replies\") || \"\";\n            state.expandedCommentThreads[threadId] =\n              !state.expandedCommentThreads[threadId];\n            renderPostDrawer();\n            return;\n          }\n          var toggleCommentReactions = ev.target.closest(\n            \"[data-dsd-toggle-comment-reactions]\",\n          );\n          if (toggleCommentReactions) {\n            ev.preventDefault();\n            closePostReactionTrays();\n            var reactionContainer = toggleCommentReactions.closest(\n                \"[data-dsd-comment-reactions]\",\n              ),\n              reactionTray = reactionContainer &&\n                qs(\".dsd-comment-reactions__tray\", reactionContainer),\n              opening = !!(reactionTray && reactionTray.hidden);\n            qsa(\".dsd-comment-reactions__tray\", document).forEach(function (tray) {\n              tray.hidden = !0;\n            });\n            reactionTray && (reactionTray.hidden = !opening);\n            toggleCommentReactions.setAttribute(\n              \"aria-expanded\",\n              opening ? \"true\" : \"false\",\n            );\n            opening && positionReactionTray(toggleCommentReactions, reactionTray);\n            return;\n          }\n          var commentReaction = ev.target.closest(\n            \"[data-dsd-comment-reaction]\",\n          );\n          if (commentReaction) {\n            ev.preventDefault();\n            closeCommentReactionTrays(\n              commentReaction.closest(\"[data-dsd-comment-reactions]\"),\n            );\n            setCommentReaction(\n              commentReaction.getAttribute(\"data-post-id\") || \"\",\n              commentReaction.getAttribute(\"data-comment-id\") || \"\",\n              commentReaction.getAttribute(\"data-dsd-comment-reaction\") || \"\",\n            );\n            return;\n          }\n          var saveAction = ev.target.closest('[data-dsd-action=\"save\"]');\n          if (saveAction) {\n            ev.preventDefault();\r\n            var actionSavePostId =\r\n              saveAction.getAttribute(\"data-post-id\") ||\r\n              saveAction.getAttribute(\"data-dsd-save-post\");\r\n            actionSavePostId && toggleSaveItem(\"post\", actionSavePostId);\r\n            return;\n          }\n          var togglePostReactions = ev.target.closest(\n            \"[data-dsd-toggle-post-reactions]\",\n          );\n          if (togglePostReactions) {\n            ev.preventDefault();\n            closeCommentReactionTrays();\n            var postReactionRoot = togglePostReactions.closest(\n                \"[data-dsd-post-reaction-owner]\",\n              ),\n              postReactionTray = postReactionRoot &&\n                qs(\".dsd-post-reaction__tray\", postReactionRoot),\n              postReactionOpening = !!(\n                postReactionTray && postReactionTray.hidden\n              );\n            qsa(\".dsd-post-reaction__tray\", document).forEach(function (tray) {\n              tray.hidden = !0;\n            });\n            qsa(\"[data-dsd-toggle-post-reactions]\", document).forEach(\n              function (button) {\n                button.setAttribute(\"aria-expanded\", \"false\");\n              },\n            );\n            postReactionTray && (postReactionTray.hidden = !postReactionOpening);\n            togglePostReactions.setAttribute(\n              \"aria-expanded\",\n              postReactionOpening ? \"true\" : \"false\",\n            );\n            postReactionOpening && positionReactionTray(togglePostReactions, postReactionTray);\n            return;\n          }\n          var like = ev.target.closest('[data-dsd-action=\"like\"]');\n          if (like) {\r\n            (ev.preventDefault(),\r\n              toggleReaction(like.getAttribute(\"data-post-id\")));\r\n            return;\r\n          }\r\n          var clearAttachments = ev.target.closest(\r\n            \"[data-dsd-clear-attachments]\",\r\n          );\r\n          if (clearAttachments) {\r\n            (ev.preventDefault(),\r\n              clearFormAttachments(clearAttachments.closest(\"form\"), !1));\r\n            return;\r\n          }\r\n          var cancelComposer = ev.target.closest(\"[data-dsd-cancel-composer]\");\r\n          if (cancelComposer) {\r\n            ev.preventDefault();\r\n            var cancelForm = cancelComposer.closest(\"form\");\r\n            (cancelForm &&\r\n              (cancelForm.reset(), clearFormAttachments(cancelForm, !0)),\r\n              cancelForm &&\r\n                cancelForm.closest(\"[data-dsd-story-form]\") &&\r\n                closeStoryComposer());\r\n            return;\r\n          }\r\n          var comment = ev.target.closest('[data-dsd-action=\"comment\"]');\r\n          if (comment) {\r\n            ev.preventDefault();\r\n            var commentPostId = comment.getAttribute(\"data-post-id\") || \"\";\r\n            commentPostId &&\r\n              ((state.openCommentPostIds[commentPostId] = !0),\r\n              delete state.commentOneShotLoads[commentPostId],\r\n              hydratePostComments([\r\n                localPostById(commentPostId) || { postId: commentPostId },\r\n              ]),\r\n              openPostDrawer(\"comments\", commentPostId, comment));\r\n            return;\r\n          }\r\n          var share = ev.target.closest('[data-dsd-action=\"share\"]');\r\n          if (share) {\r\n            (ev.preventDefault(),\r\n              sharePost(share.getAttribute(\"data-post-id\")));\r\n            return;\r\n          }\r\n          var save = ev.target.closest(\"[data-dsd-save-post]\");\r\n          if (save) {\r\n            ev.preventDefault();\r\n            var savePostId = save.getAttribute(\"data-dsd-save-post\");\r\n            toggleSaveItem(\"post\", savePostId);\r\n            return;\r\n          }\r\n          var reportPost = ev.target.closest(\"[data-dsd-report-post]\");\r\n          if (reportPost) {\r\n            (ev.preventDefault(),\r\n              openReportModal(\r\n                \"post\",\r\n                reportPost.getAttribute(\"data-dsd-report-post\") || \"\",\r\n                \"posts/\" +\r\n                  (reportPost.getAttribute(\"data-dsd-report-post\") || \"\"),\r\n                \"User reported post\",\r\n              ));\r\n            return;\r\n          }\r\n          var reportTechnicalIssue = ev.target.closest(\r\n            \"[data-dsd-report-technical-issue]\",\r\n          );\r\n          if (reportTechnicalIssue) {\r\n            (ev.preventDefault(),\r\n              openTechnicalIssueModal(\r\n                reportTechnicalIssue.getAttribute(\r\n                  \"data-dsd-report-technical-issue\",\r\n                ) || \"\",\r\n              ));\r\n            return;\r\n          }\r\n          var reportComment = ev.target.closest(\"[data-dsd-report-comment]\");\r\n          if (reportComment) {\r\n            ev.preventDefault();\r\n            var reportCommentId =\r\n                reportComment.getAttribute(\"data-dsd-report-comment\") || \"\",\r\n              reportCommentPostId =\r\n                reportComment.getAttribute(\"data-post-id\") || \"\";\r\n            openReportModal(\r\n              \"comment\",\r\n              reportCommentId,\r\n              \"posts/\" +\r\n                reportCommentPostId +\r\n                \"/comments/\" +\r\n                reportCommentId,\r\n              \"User reported comment\",\r\n            );\r\n            return;\r\n          }\r\n          var commentEdit = ev.target.closest(\"[data-dsd-edit-comment]\");\r\n          if (commentEdit) {\r\n            ev.preventDefault();\r\n            var editPostId = commentEdit.getAttribute(\"data-post-id\") || \"\",\r\n              editCommentId =\r\n                commentEdit.getAttribute(\"data-dsd-edit-comment\") || \"\",\r\n              existingComment =\r\n                (state.commentsByPost[editPostId] || []).filter(\r\n                  function (item) {\r\n                    return commentKey(item) === editCommentId;\r\n                  },\r\n                )[0] || {},\r\n              commentBody = window.prompt(\r\n                \"Edit comment\",\r\n                existingComment.body || \"\",\r\n              );\r\n            commentBody != null &&\r\n              editComment(editPostId, editCommentId, { body: commentBody });\r\n            return;\r\n          }\r\n          var commentDelete = ev.target.closest(\"[data-dsd-delete-comment]\");\r\n          if (commentDelete) {\r\n            if (\r\n              (ev.preventDefault(),\r\n              commentDelete.getAttribute(\"data-dsd-confirm-delete\") !== \"true\")\r\n            ) {\r\n              (commentDelete.setAttribute(\"data-dsd-confirm-delete\", \"true\"),\r\n                (commentDelete.textContent = \"Confirm delete\"),\r\n                window.setTimeout(function () {\r\n                  commentDelete &&\r\n                    commentDelete.isConnected &&\r\n                    commentDelete.getAttribute(\"data-dsd-confirm-delete\") ===\r\n                      \"true\" &&\r\n                    (commentDelete.removeAttribute(\"data-dsd-confirm-delete\"),\r\n                    (commentDelete.textContent = \"Delete\"));\r\n                }, 5e3));\r\n              return;\r\n            }\r\n            deleteComment(\r\n              commentDelete.getAttribute(\"data-post-id\") || \"\",\r\n              commentDelete.getAttribute(\"data-dsd-delete-comment\") || \"\",\r\n            ).then(\r\n              function () {\r\n                renderPostDrawer();\r\n              },\r\n              function () {\r\n                renderPostDrawer();\r\n              },\r\n            );\r\n            return;\r\n          }\r\n          var commentApprove = ev.target.closest(\"[data-dsd-approve-comment]\");\r\n          if (commentApprove) {\r\n            (ev.preventDefault(),\r\n              updateCommentState(\r\n                commentApprove.getAttribute(\"data-post-id\") || \"\",\r\n                commentApprove.getAttribute(\"data-dsd-approve-comment\") || \"\",\r\n                \"approved\",\r\n              ).then(\r\n                function () {\r\n                  renderPostDrawer();\r\n                },\r\n                function () {\r\n                  renderPostDrawer();\r\n                },\r\n              ));\r\n            return;\r\n          }\r\n          var commentHide = ev.target.closest(\"[data-dsd-hide-comment]\");\r\n          if (commentHide) {\r\n            (ev.preventDefault(),\r\n              updateCommentState(\r\n                commentHide.getAttribute(\"data-post-id\") || \"\",\r\n                commentHide.getAttribute(\"data-dsd-hide-comment\") || \"\",\r\n                \"hidden\",\r\n              ).then(\r\n                function () {\r\n                  renderPostDrawer();\r\n                },\r\n                function () {\r\n                  renderPostDrawer();\r\n                },\r\n              ));\r\n            return;\r\n          }\r\n          var commentReject = ev.target.closest(\"[data-dsd-reject-comment]\");\r\n          if (commentReject) {\r\n            (ev.preventDefault(),\r\n              updateCommentState(\r\n                commentReject.getAttribute(\"data-post-id\") || \"\",\r\n                commentReject.getAttribute(\"data-dsd-reject-comment\") || \"\",\r\n                \"rejected\",\r\n              ).then(\r\n                function () {\r\n                  renderPostDrawer();\r\n                },\r\n                function () {\r\n                  renderPostDrawer();\r\n                },\r\n              ));\r\n            return;\r\n          }\r\n          var commentRestore = ev.target.closest(\"[data-dsd-restore-comment]\");\r\n          if (commentRestore) {\r\n            (ev.preventDefault(),\r\n              updateCommentState(\r\n                commentRestore.getAttribute(\"data-post-id\") || \"\",\r\n                commentRestore.getAttribute(\"data-dsd-restore-comment\") || \"\",\r\n                \"approved\",\r\n              ).then(\r\n                function () {\r\n                  renderPostDrawer();\r\n                },\r\n                function () {\r\n                  renderPostDrawer();\r\n                },\r\n              ));\r\n            return;\r\n          }\r\n          var edit = ev.target.closest(\"[data-dsd-edit-post]\");\n          if (edit) {\n            ev.preventDefault();\r\n            var postId = edit.getAttribute(\"data-dsd-edit-post\"),\r\n              existing =\r\n                state.posts.filter(function (item) {\r\n                  return (item.postId || item.id) === postId;\r\n                })[0] || {},\r\n              body = window.prompt(\"Edit post text\", existing.body || \"\");\r\n            body != null && editPost(postId, { body: body, caption: \"\" });\n            return;\n          }\n          var audienceEditor = ev.target.closest(\"[data-dsd-change-post-audience]\");\n          if (audienceEditor) {\n            ev.preventDefault();\n            openPostAudienceEditor(audienceEditor.getAttribute(\"data-dsd-change-post-audience\") || \"\");\n            return;\n          }\n          if (ev.target.closest(\"[data-dsd-post-audience-editor-close]\")) {\n            ev.preventDefault();\n            closePostAudienceEditor();\n            return;\n          }\n          var del = ev.target.closest(\"[data-dsd-delete-post]\");\n          if (del) {\r\n            ev.preventDefault();\r\n            var deletePostId = del.getAttribute(\"data-dsd-delete-post\") || \"\";\r\n            if (del.getAttribute(\"data-dsd-confirm-delete\") === \"true\") {\r\n              (del.removeAttribute(\"data-dsd-confirm-delete\"),\r\n                (del.textContent = \"Delete\"),\r\n                deletePost(deletePostId));\r\n              return;\r\n            }\r\n            (del.setAttribute(\"data-dsd-confirm-delete\", \"true\"),\r\n              (del.textContent = \"Confirm delete\"),\r\n              renderStatus(\"Select Confirm delete to remove this post.\"),\r\n              window.setTimeout(function () {\r\n                del.getAttribute(\"data-dsd-confirm-delete\") === \"true\" &&\r\n                  (del.removeAttribute(\"data-dsd-confirm-delete\"),\r\n                  (del.textContent = \"Delete\"));\r\n              }, 5e3));\r\n            return;\r\n          }\r\n          var follow = ev.target.closest(\"[data-dsd-follow-profile]\");\r\n          if (follow) {\r\n            (ev.preventDefault(),\r\n              followProfile(\r\n                follow.getAttribute(\"data-dsd-follow-profile\"),\r\n                follow.getAttribute(\"data-profile-key\") || \"\",\r\n              ));\r\n            return;\r\n          }\r\n          var toggleFollow = ev.target.closest(\r\n            \"[data-dsd-toggle-follow-profile]\",\r\n          );\r\n          if (toggleFollow) {\r\n            (ev.preventDefault(),\r\n              toggleFollowProfile(\r\n                toggleFollow.getAttribute(\"data-dsd-toggle-follow-profile\"),\r\n                toggleFollow.getAttribute(\"data-profile-key\") || \"\",\r\n              ));\r\n            return;\r\n          }\r\n          var unfollow = ev.target.closest(\"[data-dsd-unfollow-profile]\");\r\n          if (unfollow) {\r\n            (ev.preventDefault(),\r\n              unfollowProfile(\r\n                unfollow.getAttribute(\"data-dsd-unfollow-profile\"),\r\n              ));\r\n            return;\r\n          }\r\n          var unblock = ev.target.closest(\"[data-dsd-unblock-profile]\");\n          if (unblock) {\n            (ev.preventDefault(),\r\n              unblockProfile(\r\n                unblock.getAttribute(\"data-dsd-unblock-profile\"),\r\n                unblock.getAttribute(\"data-profile-key\") || \"\",\r\n              ));\r\n            return;\r\n          }\r\n          var acceptFollow = ev.target.closest(\r\n            \"[data-dsd-accept-follow-request]\",\r\n          );\r\n          if (acceptFollow) {\r\n            (ev.preventDefault(),\r\n              resolveFollowRequest(\r\n                acceptFollow.getAttribute(\"data-dsd-accept-follow-request\"),\r\n                acceptFollow.getAttribute(\"data-profile-key\") || \"\",\r\n                \"active\",\r\n              ));\r\n            return;\r\n          }\r\n          var declineFollow = ev.target.closest(\r\n            \"[data-dsd-decline-follow-request]\",\r\n          );\r\n          if (declineFollow) {\r\n            (ev.preventDefault(),\r\n              resolveFollowRequest(\r\n                declineFollow.getAttribute(\"data-dsd-decline-follow-request\"),\r\n                declineFollow.getAttribute(\"data-profile-key\") || \"\",\r\n                \"declined\",\r\n              ));\r\n            return;\r\n          }\r\n          var favorite = ev.target.closest(\"[data-dsd-favorite-user]\");\r\n          if (favorite) {\r\n            (ev.preventDefault(),\r\n              toggleFavoriteUser(\r\n                favorite.getAttribute(\"data-dsd-favorite-user\"),\r\n                favorite.getAttribute(\"data-profile-key\") || \"\",\r\n              ));\r\n            return;\r\n          }\r\n          var enableAdultContent = ev.target.closest(\r\n            \"[data-dsd-enable-adult-content]\",\r\n          );\r\n          if (enableAdultContent) {\r\n            (ev.preventDefault(), enableAdultContentFromShell(enableAdultContent));\r\n            return;\r\n          }\r\n          var mediaLimitsHelp = ev.target.closest(\r\n            \"[data-dsd-media-limits-help]\",\r\n          );\r\n          if (mediaLimitsHelp) {\r\n            ev.preventDefault();\r\n            var mediaLimitsForm = mediaLimitsHelp.closest(\"form\"),\r\n              mediaLimitsTooltip = qs(\r\n                \"[data-dsd-media-limits-tooltip]\",\r\n                mediaLimitsForm,\r\n              ),\r\n              mediaLimitsOpen = !!(\r\n                mediaLimitsTooltip && mediaLimitsTooltip.hidden\r\n              );\r\n            if (mediaLimitsTooltip) mediaLimitsTooltip.hidden = !mediaLimitsOpen;\r\n            mediaLimitsHelp.setAttribute(\r\n              \"aria-expanded\",\r\n              mediaLimitsOpen ? \"true\" : \"false\",\r\n            );\r\n            return;\r\n          }\r\n          var profileMediaFilter = ev.target.closest(\n            \"[data-dsd-profile-media-filter]\",\n          );\n          if (profileMediaFilter) {\n            ev.preventDefault();\n            var nextProfileMediaFilter =\n              profileMediaFilter.getAttribute(\n                \"data-dsd-profile-media-filter\",\n              ) || \"all\";\n            if (nextProfileMediaFilter === profileFeedFilterFromRoute()) return;\n            writeProfileFeedFilterRoute(nextProfileMediaFilter, !1);\n            state.profileFeedFilter = profileFeedFilterFromRoute();\n            state.profileFeedSyncControls && state.profileFeedSyncControls();\n            state.profileFeedReload && state.profileFeedReload();\n            return;\n          }\n          var feedFilter = ev.target.closest(\"[data-dsd-feed-filter]\");\n          if (feedFilter) {\r\n            (ev.preventDefault(),\r\n              (state.feedFilter =\r\n                feedFilter.getAttribute(\"data-dsd-feed-filter\") || \"all\"),\r\n              renderPosts(\"feed-filter\"));\r\n            return;\r\n          }\r\n          var messageTab = ev.target.closest(\"[data-dsd-msg384-tab]\");\r\n          if (messageTab) {\r\n            (ev.preventDefault(),\r\n              qsa(\r\n                \"[data-dsd-msg384-tab]\",\r\n                messageTab.closest(\"[data-dsd-msg384]\") || document,\r\n              ).forEach(function (button) {\r\n                button.classList.toggle(\"is-active\", button === messageTab);\r\n              }),\r\n              renderMessages());\r\n            return;\r\n          }\r\n          var newMessageToggle = ev.target.closest(\r\n            \"[data-dsd-msg384-new-message]\",\r\n          );\r\n          var newGroupToggle = ev.target.closest(\r\n            \"[data-dsd-msg384-new-group]\",\r\n          );\r\n          if (newGroupToggle) {\r\n            ev.preventDefault();\r\n            var newGroupRoot =\r\n              newGroupToggle.closest(\"[data-dsd-msg384]\") ||\r\n              qs(\"[data-dsd-msg384]\");\r\n            if (newGroupRoot) {\r\n              newGroupRoot.setAttribute(\"data-dsd-msg384-compose-mode\", \"true\");\r\n              newGroupRoot.setAttribute(\r\n                \"data-dsd-msg384-group-compose-mode\",\r\n                \"true\",\r\n              );\r\n            }\n            resetMessageRecipientSearch();\n            state.pendingMessageGroupRecipients = [];\n            state.messageGroupComposeActive = !0;\r\n            var groupSearch = qs(\r\n              \"[data-dsd-msg384-search]\",\r\n              newGroupRoot || document,\r\n            );\r\n            if (groupSearch) {\r\n              groupSearch.value = \"\";\r\n              groupSearch.setAttribute(\"placeholder\", \"Add people to group\");\r\n              groupSearch.setAttribute(\"aria-label\", \"Add people to group\");\r\n              window.setTimeout(function () {\r\n                groupSearch.focus();\r\n              }, 0);\r\n            }\r\n            renderMessageStarter(newGroupRoot || document);\r\n            return;\r\n          }\r\n          if (newMessageToggle) {\r\n            ev.preventDefault();\r\n            var newMessageRoot =\r\n                newMessageToggle.closest(\"[data-dsd-msg384]\") ||\r\n                qs(\"[data-dsd-msg384]\"),\r\n              nextComposeMode = !(\r\n                newMessageRoot &&\r\n                newMessageRoot.getAttribute(\"data-dsd-msg384-compose-mode\") ===\r\n                  \"true\"\r\n              );\r\n            (newMessageRoot &&\r\n              (nextComposeMode\r\n                ? newMessageRoot.setAttribute(\r\n                    \"data-dsd-msg384-compose-mode\",\r\n                    \"true\",\r\n                  )\r\n                : newMessageRoot.removeAttribute(\r\n                    \"data-dsd-msg384-compose-mode\",\r\n                  )),\r\n              newMessageRoot &&\r\n                newMessageRoot.removeAttribute(\r\n                  \"data-dsd-msg384-group-compose-mode\",\r\n                ),\r\n              (state.pendingMessageGroupRecipients = []),\n              (state.messageGroupComposeActive = !1),\n              resetMessageRecipientSearch(),\n              newMessageToggle.setAttribute(\n                \"aria-expanded\",\r\n                nextComposeMode ? \"true\" : \"false\",\r\n              ));\r\n            var unifiedSearchInput = qs(\r\n                \"[data-dsd-msg384-search]\",\r\n                newMessageRoot || document,\r\n              ),\r\n              startResults = qs(\r\n                \"[data-dsd-msg384-start-results]\",\r\n                newMessageRoot || document,\r\n              );\r\n            (unifiedSearchInput &&\r\n              ((unifiedSearchInput.value = \"\"),\r\n              unifiedSearchInput.setAttribute(\r\n                \"placeholder\",\r\n                nextComposeMode ? \"Type a name\" : \"Search messages\",\r\n              ),\r\n              unifiedSearchInput.setAttribute(\r\n                \"aria-label\",\r\n                nextComposeMode ? \"Start message with user\" : \"Search messages\",\r\n              ),\r\n              window.setTimeout(function () {\r\n                nextComposeMode &&\r\n                  unifiedSearchInput &&\r\n                  unifiedSearchInput.focus();\r\n              }, 0)),\r\n              startResults &&\r\n                ((startResults.innerHTML = \"\"), (startResults.hidden = !0)),\r\n              renderMessages());\r\n            return;\r\n          }\r\n          var closeMessageDrawer = ev.target.closest(\r\n            \"[data-dsd-close-message-drawer]\",\r\n          );\r\n          if (closeMessageDrawer) {\r\n            (ev.preventDefault(), closeMessageDrawerState());\r\n            return;\r\n          }\r\n          var loadOlderMessages = ev.target.closest(\r\n            \"[data-dsd-message-load-older]\",\r\n          );\r\n          if (loadOlderMessages) {\n            (ev.preventDefault(),\n              hydrateConversationMessages(state.activeConversationId, {\n                older: !0,\n              }));\n            return;\n          }\n          var scrollLatestMessages = ev.target.closest(\n            \"[data-dsd-message-scroll-latest]\",\n          );\n          if (scrollLatestMessages) {\n            (ev.preventDefault(),\n              scrollMessageThreadToLatest(\n                qs(\"[data-dsd-msg384-message-history]\"),\n              ));\n            return;\n          }\n          var relationshipSearch = ev.target.closest(\r\n            \"[data-dsd-profile-relationship-search]\",\r\n          );\r\n          if (!relationshipSearch) {\r\n            var storyClose = ev.target.closest(\r\n              \"[data-dsd-story-composer-close]\",\r\n            );\r\n            if (storyClose) {\r\n              (ev.preventDefault(), closeStoryComposer());\r\n              return;\r\n            }\r\n            var immersiveClose = ev.target.closest(\r\n              \"[data-dsd-immersive-close]\",\r\n            );\r\n            if (immersiveClose) {\r\n              (ev.preventDefault(), closeImmersiveOverlay());\r\n              return;\r\n            }\r\n            var storyActions = ev.target.closest(\"[data-dsd-story-actions]\");\r\n            if (storyActions) {\r\n              (ev.preventDefault(), openStoryOverlay(state.activeStoryId));\r\n              return;\r\n            }\r\n            var storyProfileAction = ev.target.closest(\r\n              \"[data-dsd-story385-profile-action]\",\r\n            );\r\n            if (storyProfileAction) {\r\n              var storyAction =\r\n                storyProfileAction.getAttribute(\r\n                  \"data-dsd-story385-profile-action\",\r\n                ) || \"\";\r\n              if (storyAction === \"create\") {\r\n                (ev.preventDefault(),\r\n                  ev.stopPropagation(),\r\n                  openStoryComposer(!0));\r\n                return;\r\n              }\r\n              if (storyAction.indexOf(\"view\") === 0) {\r\n                (ev.preventDefault(),\r\n                  ev.stopPropagation(),\r\n                  openStoryOverlay(state.activeStoryId));\r\n                return;\r\n              }\r\n            }\r\n            var thread = ev.target.closest(\"[data-dsd-launch-thread]\");\r\n            if (thread) {\r\n              (ev.preventDefault(),\r\n                openMessageConversationState(\r\n                  thread.getAttribute(\"data-conversation-id\") ||\r\n                    thread.getAttribute(\"data-handle\") ||\r\n                    \"\",\r\n                  { pinToBottom: !0 },\r\n                ));\r\n              return;\r\n            }\r\n            var meetingRespond = ev.target.closest(\"[data-dsd-meeting-respond]\");\n            if (meetingRespond) {\n              ev.preventDefault();\n              setMeetingPlannerOpen(true, {\n                referenceProposalId: meetingRespond.getAttribute(\"data-dsd-meeting-respond\") || \"\",\n                firstCity: meetingRespond.getAttribute(\"data-dsd-meeting-city\") || \"\",\n                firstRegion: meetingRespond.getAttribute(\"data-dsd-meeting-region\") || \"\"\n              });\n              return;\n            }\n            var meetingCancelProposal = ev.target.closest(\"[data-dsd-meeting-cancel-proposal]\");\n            if (meetingCancelProposal) {\n              ev.preventDefault();\n              sendMeetingAreaProposal(\n                state.activeConversationId || \"\",\n                meetingCancelProposal.getAttribute(\"data-dsd-meeting-city\") || \"\",\n                meetingCancelProposal.getAttribute(\"data-dsd-meeting-region\") || \"\",\n                \"CANCELLED\",\n                meetingCancelProposal.getAttribute(\"data-dsd-meeting-cancel-proposal\") || \"\"\n              );\n              return;\n            }\n            if (ev.target.closest(\"[data-dsd-msg384-meeting-cancel]\")) {\n              ev.preventDefault();\n              setMeetingPlannerOpen(false);\n              return;\n            }\n            if (ev.target.closest(\"[data-dsd-message-reply-cancel]\")) {\n              ev.preventDefault();\n              clearMessageReplyDraft();\n              return;\n            }\n            if (ev.target.closest(\"[data-dsd-message-tools-close]\")) {\n              ev.preventDefault();\n              renderMessageConversationTools(\n                conversationById(state.activeConversationId || \"\"),\n                \"\",\n                !1,\n              );\n              return;\n            }\n            var messageSearchStep = ev.target.closest(\n              \"[data-dsd-message-search-step]\",\n            );\n            if (messageSearchStep) {\n              ev.preventDefault();\n              stepConversationSearch(\n                messageSearchStep.getAttribute(\"data-dsd-message-search-step\") ||\n                  \"next\",\n              );\n              return;\n            }\n            var messageGalleryItem = ev.target.closest(\n              \"[data-dsd-message-gallery-item]\",\n            );\n            if (messageGalleryItem) {\n              ev.preventDefault();\n              jumpToMessageSource(\n                state.activeConversationId || \"\",\n                messageGalleryItem.getAttribute(\"data-dsd-message-id\") || \"\",\n                0,\n              );\n              return;\n            }\n            var messageJump = ev.target.closest(\"[data-dsd-message-jump]\");\n            if (messageJump) {\n              ev.preventDefault();\n              jumpToMessageSource(\n                state.activeConversationId || \"\",\n                messageJump.getAttribute(\"data-dsd-message-jump\") || \"\",\n                0,\n              );\n              return;\n            }\n            var messageReaction = ev.target.closest(\"[data-dsd-message-reaction]\");\n            if (messageReaction) {\n              ev.preventDefault();\n              var reactionDetails = messageReaction.closest(\"details\"),\n                reactionMessageId = messageReaction.getAttribute(\"data-message-id\") || \"\";\n              reactionDetails && (reactionDetails.open = !1);\n              reactToMessage(\n                state.activeConversationId || \"\",\n                reactionMessageId,\n                messageReaction.getAttribute(\"data-dsd-message-reaction\") || \"\",\n              );\n              return;\n            }\n            var messageRowAction = ev.target.closest(\n              \"[data-dsd-message-row-action]\",\n            );\n            if (messageRowAction) {\r\n              ev.preventDefault();\r\n              var rowAction =\r\n                  messageRowAction.getAttribute(\r\n                    \"data-dsd-message-row-action\",\r\n                  ) || \"\",\r\n                rowMessageId =\r\n                  messageRowAction.getAttribute(\"data-message-id\") ||\r\n                  (messageRowAction.closest(\"[data-message-id]\") &&\r\n                    messageRowAction\r\n                      .closest(\"[data-message-id]\")\r\n                      .getAttribute(\"data-message-id\")) ||\r\n                  \"\",\r\n                rowCid =\r\n                  state.activeConversationId ||\r\n                  (qs('[name=\"conversationId\"]') || {}).value ||\r\n                  \"\";\r\n              if (!rowCid || !rowMessageId) {\n                renderStatus(\"Select a message first.\");\n                return;\n              }\n              if (rowAction === \"reply\") {\n                beginMessageReplyDraft(\n                  rowCid,\n                  rowMessageId,\n                  messageRowAction.getAttribute(\"data-supabase-message-id\") || \"\",\n                );\n                return;\n              }\n              if (rowAction === \"copy\") {\n                var copiedMessage =\n                    conversationMessageById(rowCid, rowMessageId) || {},\n                  copiedState = messagePremiumDisplayState(\n                    copiedMessage,\n                    conversationById(rowCid) || {},\n                    identityMatchesCurrent(\n                      copiedMessage.senderUid,\n                      copiedMessage.senderProfileKey,\n                    ),\n                  ),\n                  copiedText = String(copiedState.body || \"\").trim();\n                if (!copiedState.allowReference || !copiedText) {\n                  renderStatus(\"This message cannot be copied.\");\n                  return;\n                }\n                if (!navigator.clipboard || !navigator.clipboard.writeText) {\n                  renderStatus(\"Copy is not available in this browser.\");\n                  return;\n                }\n                navigator.clipboard.writeText(copiedText).then(\n                  function () {\n                    renderStatus(\"Message copied.\");\n                  },\n                  function () {\n                    renderStatus(\"Message could not be copied.\");\n                  },\n                );\n                return;\n              }\n              if (rowAction === \"report\") {\n                var reportSupabaseMessageId =\n                  messageRowAction.getAttribute(\"data-supabase-message-id\") ||\n                  rowMessageId;\n                openReportModal(\n                  \"message\",\n                  reportSupabaseMessageId,\n                  \"messages/\" + reportSupabaseMessageId,\n                  \"Message safety report\",\n                );\n                return;\n              }\n              if (rowAction === \"edit\") {\n                var currentMessage =\r\n                    conversationMessageById(rowCid, rowMessageId) || {},\r\n                  currentText = stripStoryReferenceEnvelope(\r\n                    currentMessage.body || \"\",\r\n                  );\r\n                beginMessageEditDraft(rowCid, rowMessageId, currentText);\r\n                return;\r\n              }\r\n              if (rowAction === \"unsend\") {\r\n                if (\r\n                  messageRowAction.getAttribute(\"data-dsd-confirm-unsend\") !==\r\n                  \"true\"\r\n                ) {\r\n                  (messageRowAction.setAttribute(\r\n                    \"data-dsd-confirm-unsend\",\r\n                    \"true\",\r\n                  ),\r\n                    (messageRowAction.textContent = \"Confirm unsend\"),\r\n                    renderStatus(\r\n                      \"Select Confirm unsend to leave the unsent placeholder.\",\r\n                    ),\r\n                    window.setTimeout(function () {\r\n                      messageRowAction &&\r\n                        messageRowAction.isConnected &&\r\n                        messageRowAction.getAttribute(\r\n                          \"data-dsd-confirm-unsend\",\r\n                        ) === \"true\" &&\r\n                        (messageRowAction.removeAttribute(\r\n                          \"data-dsd-confirm-unsend\",\r\n                        ),\r\n                        (messageRowAction.textContent = \"Unsend\"));\r\n                    }, 5e3));\r\n                  return;\r\n                }\r\n                (messageRowAction.removeAttribute(\"data-dsd-confirm-unsend\"),\r\n                  (messageRowAction.textContent = \"Unsend\"),\r\n                  unsendMessage(rowCid, rowMessageId));\r\n                return;\r\n              }\r\n            }\r\n            var messageMediaOpen = ev.target.closest(\r\n              \"[data-dsd-message-media-open]\",\r\n            );\r\n            if (messageMediaOpen) {\r\n              var openMessageId =\r\n                  messageMediaOpen.getAttribute(\"data-message-id\") ||\r\n                  (messageMediaOpen.closest(\"[data-message-id]\") &&\r\n                    messageMediaOpen\r\n                      .closest(\"[data-message-id]\")\r\n                      .getAttribute(\"data-message-id\")) ||\r\n                  \"\",\r\n                openMessageForm = qs(\r\n                  \"[data-dsd-message-drawer-form]\",\r\n                  messageMediaOpen.closest(\"[data-dsd-msg384]\") || document,\r\n                ),\r\n                openMessageCid =\r\n                  state.activeConversationId ||\r\n                  (\r\n                    qs(\r\n                      '[name=\"conversationId\"]',\r\n                      openMessageForm || document,\r\n                    ) || {}\r\n                  ).value ||\r\n                  \"\";\r\n              if (\r\n                openMessageId &&\r\n                openMessageCid &&\r\n                messageMediaOpen.getAttribute(\"data-dsd-message-view-once\") ===\r\n                  \"true\"\r\n              ) {\r\n                (ev.preventDefault(),\r\n                  ev.stopPropagation(),\r\n                  markMessageViewOnceOpened(openMessageCid, openMessageId));\r\n                return;\r\n              }\r\n            }\r\n            var startGroupMessage = ev.target.closest(\r\n              \"[data-dsd-start-group-message]\",\r\n            );\r\n            if (startGroupMessage) {\r\n              ev.preventDefault();\r\n              var groupIdentities = uniqueIdentities(\r\n                  state.pendingMessageGroupRecipients || [],\r\n                ),\r\n                groupDraft = groupConversationDraftFromIdentities(\r\n                  groupIdentities,\r\n                  \"\",\r\n                );\r\n              if (!groupDraft) {\r\n                renderStatus(\"Select at least two people for a group message.\");\r\n                return;\r\n              }\r\n              var groupCid = groupDraft.conversationId;\n              (beginMessageThreadSession(groupCid, !0),\n                (state.activeConversationId = groupCid),\n                (state.pendingMessageDraft = groupDraft),\n                (state.conversations = mergeByKey(\n                  state.conversations,\n                  [groupDraft],\n                  [\"conversationId\", \"id\"],\n                )));\n              var groupRoot = startGroupMessage.closest(\"[data-dsd-msg384]\");\n              groupRoot &&\r\n                (groupRoot.removeAttribute(\"data-dsd-msg384-compose-mode\"),\r\n                groupRoot.removeAttribute(\r\n                  \"data-dsd-msg384-group-compose-mode\",\r\n                ));\r\n              state.pendingMessageGroupRecipients = [];\n              state.messageGroupComposeActive = !1;\n              writeMessageConversationUrl(groupCid, !1, {\n                groupRecipients: groupDraft.groupRecipients,\n                groupName: groupDraft.groupName,\n              });\n              openMessageConversationState(groupCid, {\n                hydrate: !1,\n                markRead: !1,\n                pinToBottom: !0,\n                updateUrl: !1,\n              });\n              var groupForm = qs(\"[data-dsd-message-drawer-form]\");\n              if (groupForm) {\n                var groupRecipientField = qs(\n                    '[name=\"groupRecipients\"]',\n                    groupForm,\n                  ),\n                  groupDirectRecipientField = qs(\n                    '[name=\"recipientUid\"]',\n                    groupForm,\n                  ),\n                  groupDirectProfileField = qs(\n                    '[name=\"recipientProfileKey\"]',\n                    groupForm,\n                  ),\n                  groupConversationField = qs(\n                    '[name=\"conversationId\"]',\n                    groupForm,\n                  );\n                groupRecipientField &&\n                  (groupRecipientField.value = groupDraft.groupRecipients || \"\");\n                groupDirectRecipientField &&\n                  (groupDirectRecipientField.value = \"\");\n                groupDirectProfileField &&\n                  (groupDirectProfileField.value = \"\");\n                groupConversationField &&\n                  (groupConversationField.value = groupCid);\n              }\n              return;\n            }\r\n            var startMessageProfile = ev.target.closest(\r\n              \"[data-dsd-start-message-profile]\",\r\n            );\r\n            if (startMessageProfile) {\r\n              ev.preventDefault();\r\n              var startUid =\n                  startMessageProfile.getAttribute(\"data-recipient-uid\") || \"\",\n                startKey =\n                  startMessageProfile.getAttribute(\n                    \"data-dsd-start-message-profile\",\n                  ) || \"\",\n                startName =\n                  startMessageProfile.getAttribute(\"data-recipient-name\") ||\n                  startKey ||\n                  \"DSD member\",\n                startAvatarMediaId =\n                  startMessageProfile.getAttribute(\n                    \"data-recipient-avatar-media-id\",\n                  ) || \"\",\n                groupSelectionRoot =\r\n                  startMessageProfile.closest(\"[data-dsd-msg384]\") ||\r\n                  qs(\"[data-dsd-msg384]\"),\r\n                selectingGroup = !!(\r\n                  state.messageGroupComposeActive === !0 ||\r\n                  (groupSelectionRoot &&\r\n                    groupSelectionRoot.getAttribute(\r\n                      \"data-dsd-msg384-group-compose-mode\",\r\n                    ) === \"true\")\r\n                ),\r\n                startCid = canonicalConversationId(\r\n                  startUid || startKey,\r\n                  startKey,\r\n                );\r\n              if (selectingGroup) {\n                var selectedIdentity = {\n                    uid: startUid,\n                    key: startKey,\n                    name: startName,\n                  },\n                  selectedIdentityKey = groupRecipientIdentityKey(selectedIdentity),\n                  currentGroupRecipients = uniqueIdentities(\r\n                    state.pendingMessageGroupRecipients || [],\r\n                  ),\r\n                  alreadySelected = currentGroupRecipients.some(\r\n                    function (identity) {\r\n                      return (\r\n                        groupRecipientIdentityKey(identity) === selectedIdentityKey\n                      );\r\n                    },\r\n                  );\r\n                state.pendingMessageGroupRecipients = alreadySelected\r\n                  ? currentGroupRecipients.filter(function (identity) {\r\n                      return (\r\n                        groupRecipientIdentityKey(identity) !== selectedIdentityKey\n                      );\r\n                    })\r\n                  : currentGroupRecipients.concat([selectedIdentity]);\r\n                renderMessageStarter(groupSelectionRoot || document);\r\n                return;\r\n              }\r\n              (beginMessageThreadSession(startCid, !0),\r\n                (state.messageGroupComposeActive = !1),\r\n                (state.activeConversationId = startCid),\r\n                (state.pendingMessageDraft = {\r\n                  conversationId: startCid,\r\n                  id: startCid,\r\n                  type: \"direct\",\r\n                  conversationType: \"direct\",\r\n                  state: \"active\",\r\n                  recipientUid: startUid || \"\",\r\n                  recipientProfileKey: startKey || \"\",\r\n                  participantIds: mergeUniqueSorted(\n                    [actorRelationshipIdentity(), startUid].filter(Boolean),\n                  ),\n                  participantKeys: mergeUniqueSorted([profileKey(), startKey]),\n                  displayName: startName,\n                  name: startName,\n                  recipientAvatarMediaId: startAvatarMediaId,\n                  lastMessagePreview: \"\",\r\n                  createdAt: now(),\r\n                  updatedAt: now(),\r\n                  source: \"runtime-new-message-draft\",\r\n                }));\r\n              var startForm = qs(\"[data-dsd-message-drawer-form]\");\n              startForm &&\n                ((startForm.dataset.dsdCanonicalRecipientProfileKey =\n                  startKey),\n                (startForm.dataset.dsdCanonicalRecipientConversationId =\n                  startCid),\n                qs('[name=\"recipientUid\"]', startForm) &&\n                  (qs('[name=\"recipientUid\"]', startForm).value =\n                    startUid),\n                qs('[name=\"recipientProfileKey\"]', startForm) &&\r\n                  (qs('[name=\"recipientProfileKey\"]', startForm).value =\r\n                    startKey),\r\n                qs('[name=\"conversationId\"]', startForm) &&\r\n                  (qs('[name=\"conversationId\"]', startForm).value = startCid),\r\n                qs('[name=\"groupRecipients\"]', startForm) &&\r\n                  (qs('[name=\"groupRecipients\"]', startForm).value = \"\"));\r\n              var startRootActive =\r\n                startMessageProfile.closest(\"[data-dsd-msg384]\");\r\n              startRootActive &&\r\n                startRootActive.removeAttribute(\"data-dsd-msg384-compose-mode\");\r\n              var startResultsActive = startMessageProfile.closest(\r\n                \"[data-dsd-msg384-start-results]\",\r\n              );\r\n              (startResultsActive &&\r\n                ((startResultsActive.hidden = !0),\r\n                (startResultsActive.innerHTML = \"\")),\r\n                openMessageConversationState(startCid, {\r\n                  markRead: !1,\r\n                  pinToBottom: !0,\r\n                }));\r\n              var startBody = qs(\r\n                '[data-dsd-message-drawer-form] textarea[name=\"body\"]',\r\n              );\r\n              startBody &&\r\n                window.setTimeout(function () {\r\n                  startBody.focus();\r\n                }, 0);\r\n              return;\r\n            }\r\n            var messageNameEditorCancel = ev.target.closest(\r\n              \"[data-dsd-msg384-name-editor-cancel]\",\r\n            );\r\n            if (messageNameEditorCancel) {\r\n              (ev.preventDefault(),\r\n                closeMessageNameEditor(),\r\n                renderStatus(\"Conversation name change canceled.\"));\r\n              return;\r\n            }\r\n            var messageAction = ev.target.closest(\"[data-dsd-message-action]\");\n            var messageCardPin = ev.target.closest(\"[data-dsd-message-card-pin]\");\n            if (messageCardPin) {\n              ev.preventDefault();\n              ev.stopPropagation();\n              var cardPinConversationId =\n                  messageCardPin.getAttribute(\"data-dsd-message-card-pin\") || \"\",\n                cardIsPinned =\n                  messageCardPin.getAttribute(\"data-pinned\") === \"true\";\n              if (!cardPinConversationId) return;\n              messageCardPin.disabled = !0;\n              pinConversation(cardPinConversationId, !cardIsPinned).finally(\n                function () {\n                  messageCardPin.disabled = !1;\n                },\n              );\n              return;\n            }\n            if (messageAction) {\n              ev.preventDefault();\r\n              var messageActionName =\r\n                  messageAction.getAttribute(\"data-dsd-message-action\") || \"\",\r\n                messageCid =\r\n                  state.activeConversationId ||\r\n                  (qs('[name=\"conversationId\"]') || {}).value ||\r\n                  \"\";\r\n              if (!messageCid) {\n                renderStatus(\"Select a conversation first.\");\n                return;\n              }\n              if (messageActionName === \"meeting-area\") {\n                var planningConversation = conversationById(messageCid) || {};\n                if (conversationType(planningConversation) !== \"direct\") {\n                  renderStatus(\"Meeting-area planning currently requires a direct conversation.\");\n                  return;\n                }\n                setMeetingPlannerOpen(true);\n                var actionMenu = messageAction.closest(\"details\");\n                if (actionMenu) actionMenu.open = false;\n                return;\n              }\n              if (messageActionName === \"pin\") {\n                pinConversation(messageCid, !0);\r\n                return;\r\n              }\r\n              if (messageActionName === \"unpin\") {\r\n                pinConversation(messageCid, !1);\r\n                return;\r\n              }\r\n              if (messageActionName === \"nickname\") {\r\n                var currentConversation = conversationById(messageCid) || {};\r\n                openMessageNameEditor(\r\n                  \"direct\",\r\n                  messageCid,\r\n                  currentPrivateConversationNickname(currentConversation),\r\n                );\r\n                return;\r\n              }\r\n              if (messageActionName === \"rename-group\") {\r\n                var groupConversation = conversationById(messageCid) || {};\r\n                openMessageNameEditor(\r\n                  \"group\",\r\n                  messageCid,\r\n                  groupConversation.displayName ||\r\n                    groupConversation.display_name ||\r\n                    groupConversation.name ||\r\n                    \"\",\r\n                );\r\n                return;\r\n              }\r\n              if (\n                messageActionName === \"search\" ||\n                messageActionName === \"info\"\n              ) {\n                var toolsPanel = qs(\"[data-dsd-msg384-conversation-tools]\"),\n                  toolsConversation = conversationById(messageCid) || {\n                    conversationId: messageCid,\n                  };\n                renderMessageConversationTools(\n                  toolsConversation,\n                  messageActionName,\n                  toolsPanel && !toolsPanel.hidden\n                    ? conversationToolsState(messageCid).mode !== messageActionName\n                    : !0,\n                );\n                var toolsMenu = messageAction.closest(\"details\");\n                if (toolsMenu) toolsMenu.open = !1;\n                return;\n              }\n              if (messageActionName === \"report\") {\r\n                openReportModal(\r\n                  \"message\",\r\n                  messageCid,\r\n                  \"conversations/\" + messageCid,\r\n                  \"Messaging safety thread\",\r\n                );\r\n                return;\r\n              }\r\n              if (\r\n                messageActionName === \"block\" ||\r\n                messageActionName === \"unblock\"\r\n              ) {\r\n                var actionConversation = conversationById(messageCid) || {},\r\n                  actionPeer = conversationPeer(actionConversation);\r\n                if (\r\n                  !actionPeer ||\r\n                  !actionPeer.uid ||\r\n                  identityMatchesCurrent(actionPeer.uid, actionPeer.key || \"\")\r\n                ) {\r\n                  renderStatus(\r\n                    \"Select a direct conversation participant first.\",\r\n                  );\r\n                  return;\r\n                }\r\n                messageActionName === \"block\"\r\n                  ? blockProfile(actionPeer.uid, actionPeer.key || \"\")\r\n                  : unblockProfile(actionPeer.uid, actionPeer.key || \"\");\r\n                return;\r\n              }\r\n              var serverAction =\n                  messageActionName === \"accept\"\n                    ? \"accept_conversation\"\n                    : messageActionName === \"decline\"\n                      ? \"decline_conversation\"\n                      : messageActionName === \"leave-group\"\r\n                        ? \"leave_conversation\"\r\n                      : messageActionName === \"mute\"\n                        ? \"mute_conversation\"\n                        : messageActionName === \"unmute\"\n                          ? \"unmute_conversation\"\n                          : \"\",\n                actionPatch =\n                  messageActionName === \"accept\"\n                    ? { state: \"active\" }\n                    : messageActionName === \"decline\"\n                      ? { state: \"declined\" }\n                      : messageActionName === \"leave-group\"\r\n                        ? { state: \"left\" }\r\n                      : messageActionName === \"mute\"\n                        ? { muted: !0 }\n                        : messageActionName === \"unmute\"\n                          ? { muted: !1 }\n                          : null;\n              if (!serverAction || !actionPatch) return;\n              premiumMessageActionViaProxy({\n                action: serverAction,\n                conversationId: messageCid,\n              })\n                .then(function () {\n                  return (\n                    (state.conversations = state.conversations.map(\n                      function (item) {\n                        return (item.conversationId || item.id) === messageCid\n                          ? Object.assign({}, item, actionPatch)\n                          : item;\n                      },\n                    )),\n                    renderMessages()\n                  );\n                })\n                .catch(function (error) {\n                  return (\n                    queueDraft(\n                      \"message-action-server-authoritative\",\n                      { conversationId: messageCid, action: serverAction },\n                      error,\n                    ),\n                    renderStatus(\"Conversation action could not be saved.\"),\n                    null\n                  );\n                });\n              return;\r\n            }\r\n            var messageSendButton = ev.target.closest('button[type=\"submit\"]');\r\n            if (messageSendButton) {\n              var messageSendForm = messageSendButton.closest(\r\n                \"[data-dsd-message-form]\",\r\n              );\r\n              if (messageSendForm) {\r\n                (ev.preventDefault(),\r\n                  handleMessageComposerSubmit(messageSendForm));\r\n                return;\n              }\n            }\n            var story = ev.target.closest(\"[data-dsd-view-story]\");\n            if (!ev.target.closest(\"[data-dsd-story-profile-link]\")) {\r\n              if (story) {\r\n                (ev.preventDefault(),\r\n                  ev.stopPropagation(),\r\n                  (state.storySelectionExplicit = !0),\r\n                  (state.activeStoryId =\r\n                    story.getAttribute(\"data-dsd-view-story\") || \"\"),\r\n                  openStoryOverlay(state.activeStoryId));\r\n                return;\r\n              }\r\n              var reportStory = ev.target.closest(\"[data-dsd-report-story]\");\r\n              if (reportStory) {\r\n                (ev.preventDefault(),\r\n                  openReportModal(\r\n                    \"story\",\r\n                    reportStory.getAttribute(\"data-dsd-report-story\") || \"\",\r\n                    \"stories/\" +\r\n                      (reportStory.getAttribute(\"data-dsd-report-story\") || \"\"),\r\n                    \"User reported story\",\r\n                  ));\r\n                return;\r\n              }\r\n              var approveStory = ev.target.closest(\"[data-dsd-approve-story]\");\r\n              if (approveStory) {\r\n                (ev.preventDefault(),\r\n                  updateStoryState(\r\n                    approveStory.getAttribute(\"data-dsd-approve-story\"),\r\n                    \"approved\",\r\n                  ));\r\n                return;\r\n              }\r\n              var hideStory = ev.target.closest(\"[data-dsd-hide-story]\");\r\n              if (hideStory) {\r\n                (ev.preventDefault(),\r\n                  updateStoryState(\r\n                    hideStory.getAttribute(\"data-dsd-hide-story\"),\r\n                    \"hidden\",\r\n                  ));\r\n                return;\r\n              }\r\n              var rejectStory = ev.target.closest(\"[data-dsd-reject-story]\");\r\n              if (rejectStory) {\r\n                (ev.preventDefault(),\r\n                  updateStoryState(\r\n                    rejectStory.getAttribute(\"data-dsd-reject-story\"),\r\n                    \"rejected\",\r\n                  ));\r\n                return;\r\n              }\r\n              var restoreStory = ev.target.closest(\"[data-dsd-restore-story]\");\r\n              if (restoreStory) {\r\n                (ev.preventDefault(),\r\n                  updateStoryState(\r\n                    restoreStory.getAttribute(\"data-dsd-restore-story\"),\r\n                    \"approved\",\r\n                  ));\r\n                return;\r\n              }\r\n              var deleteStoryButton = ev.target.closest(\r\n                \"[data-dsd-delete-story]\",\r\n              );\r\n              if (deleteStoryButton) {\r\n                (ev.preventDefault(),\r\n                  deleteStory(\r\n                    deleteStoryButton.getAttribute(\"data-dsd-delete-story\") ||\r\n                      \"\",\r\n                  ));\r\n                return;\r\n              }\r\n              var archiveSafety = ev.target.closest(\r\n                \"[data-dsd-archive-safety-report]\",\r\n              );\r\n              if (archiveSafety) {\r\n                (ev.preventDefault(),\r\n                  archiveSafetyReport(\r\n                    archiveSafety.getAttribute(\r\n                      \"data-dsd-archive-safety-report\",\r\n                    ) || \"\",\r\n                  ));\r\n                return;\r\n              }\r\n              var notificationCard = ev.target.closest(\r\n                \"[data-notification-card]\",\r\n              );\r\n              if (\r\n                notificationCard &&\r\n                ev.target.closest(\"a[data-notification-card]\")\r\n              ) {\r\n                var linkedNotificationId =\r\n                    notificationCard.getAttribute(\"data-notification-id\") || \"\",\r\n                  linkedNotificationHref =\r\n                    notificationCard.getAttribute(\"data-dsd-target-href\") ||\r\n                    notificationCard.getAttribute(\"href\") ||\r\n                    \"\";\r\n                linkedNotificationId &&\r\n                  linkedNotificationHref &&\r\n                  (ev.preventDefault(),\r\n                  markNotificationReadById(linkedNotificationId).then(\r\n                    function () {\r\n                      window.location.assign(linkedNotificationHref);\r\n                    },\r\n                  ));\r\n                return;\r\n              }\r\n              if (\r\n                notificationCard &&\r\n                !ev.target.closest(\r\n                  \"a, button, input, textarea, select, label, summary\",\r\n                )\r\n              ) {\r\n                var notificationHref =\r\n                  notificationCard.getAttribute(\"data-dsd-target-href\") || \"\";\r\n                if (notificationHref) {\r\n                  ev.preventDefault();\r\n                  var clickedNotificationId =\r\n                    notificationCard.getAttribute(\"data-notification-id\") || \"\";\r\n                  markNotificationReadById(clickedNotificationId).then(\r\n                    function () {\r\n                      window.location.assign(notificationHref);\r\n                    },\r\n                  );\r\n                  return;\r\n                }\r\n              }\r\n              var notificationInboxRetry = ev.target.closest(\n                \"[data-dsd-notification-inbox-retry]\",\n              );\n              if (notificationInboxRetry) {\n                ev.preventDefault();\n                hydrateNotificationInbox(\"recipient-retry\", !0);\n                return;\n              }\n              var markAll = ev.target.closest(\n                \"[data-dsd-mark-all-notifications-read]\",\r\n              );\r\n              if (markAll) {\n                ev.preventDefault();\n                markAllNotificationsRead();\n                return;\n              }\n              var loadOlderNotificationsButton = ev.target.closest(\n                \"[data-dsd-load-older-notifications]\",\n              );\n              if (loadOlderNotificationsButton) {\n                ev.preventDefault();\n                loadOlderInboxPage(\"notifications\");\n                return;\n              }\n              if (ev.target.closest('[data-dsd-owner=\"ModerationOperationsCenter\"]')) return;\n              var approve = ev.target.closest(\"[data-dsd-approve-post]\");\n              if (approve) {\r\n                (ev.preventDefault(),\r\n                  updatePostState(\r\n                    approve.getAttribute(\"data-dsd-approve-post\"),\r\n                    \"approved\",\r\n                  ));\r\n                return;\r\n              }\r\n              var hide = ev.target.closest(\"[data-dsd-hide-post]\");\r\n              if (hide) {\r\n                (ev.preventDefault(),\r\n                  updatePostState(\r\n                    hide.getAttribute(\"data-dsd-hide-post\"),\r\n                    \"hidden\",\r\n                  ));\r\n                return;\r\n              }\r\n              var reject = ev.target.closest(\"[data-dsd-reject-post]\");\r\n              if (reject) {\r\n                (ev.preventDefault(),\r\n                  updatePostState(\r\n                    reject.getAttribute(\"data-dsd-reject-post\"),\r\n                    \"rejected\",\r\n                  ));\r\n                return;\r\n              }\r\n              var resolveQueue = ev.target.closest(\"[data-dsd-resolve-queue]\");\r\n              if (resolveQueue) {\r\n                (ev.preventDefault(),\r\n                  updateQueueItemState(\r\n                    resolveQueue.getAttribute(\"data-dsd-resolve-queue\"),\r\n                    \"approved\",\r\n                  ));\r\n                return;\r\n              }\r\n              var hideQueue = ev.target.closest(\"[data-dsd-hide-queue]\");\r\n              if (hideQueue) {\r\n                (ev.preventDefault(),\r\n                  updateQueueItemState(\r\n                    hideQueue.getAttribute(\"data-dsd-hide-queue\"),\r\n                    \"hidden\",\r\n                  ));\r\n                return;\r\n              }\r\n              var rejectQueue = ev.target.closest(\"[data-dsd-reject-queue]\");\r\n              if (rejectQueue) {\r\n                (ev.preventDefault(),\r\n                  updateQueueItemState(\r\n                    rejectQueue.getAttribute(\"data-dsd-reject-queue\"),\r\n                    \"rejected\",\r\n                  ));\r\n                return;\r\n              }\r\n              var restoreQueue = ev.target.closest(\"[data-dsd-restore-queue]\");\r\n              if (restoreQueue) {\r\n                (ev.preventDefault(),\r\n                  updateQueueItemState(\r\n                    restoreQueue.getAttribute(\"data-dsd-restore-queue\"),\r\n                    \"approved\",\r\n                  ));\r\n                return;\r\n              }\r\n              var classifyQueue = ev.target.closest(\r\n                \"[data-dsd-classify-queue]\",\r\n              );\r\n              if (classifyQueue) {\r\n                (ev.preventDefault(),\r\n                  updateQueueClassification(\r\n                    classifyQueue.getAttribute(\"data-queue-id\"),\r\n                    classifyQueue.getAttribute(\"data-dsd-classify-queue\"),\r\n                  ));\r\n                return;\r\n              }\r\n              var governProfile = ev.target.closest(\r\n                \"[data-dsd-govern-profile]\",\r\n              );\r\n              if (governProfile) {\r\n                (ev.preventDefault(),\r\n                  updateProfileGovernance(\r\n                    governProfile.getAttribute(\"data-target-uid\") || \"\",\r\n                    governProfile.getAttribute(\"data-profile-key\") || \"\",\r\n                    governProfile.getAttribute(\"data-dsd-govern-profile\") || \"\",\r\n                  ));\r\n                return;\r\n              }\r\n              var safety = ev.target.closest(\"[data-dsd-safety-action]\");\r\n              if (safety) {\r\n                (ev.preventDefault(),\r\n                  createSafetyReport(\r\n                    safety.getAttribute(\"data-dsd-safety-action\"),\r\n                    (qs('[name=\"conversationId\"]') || {}).value || \"\",\r\n                    \"Messaging safety thread\",\r\n                  ));\r\n                return;\r\n              }\r\n            }\r\n          }\r\n        }\r\n      }),\r\n      document.addEventListener(\"input\", function (ev) {\n        (ev.target &&\n          ev.target.matches &&\n          ev.target.matches(\"[data-dsd-users311-search]\") &&\n          scheduleDiscoveryProfileSearch(\n            ev.target.closest(\"[data-dsd-users311]\") || document,\n          ),\n          ev.target &&\n            ev.target.matches &&\n            ev.target.matches(\"[data-dsd-location-city-input]\") &&\n            applyLocationSuggestion(ev.target));\n        if (\n          ev.target &&\n          ev.target.matches &&\n          ev.target.matches(\"[data-dsd-msg384-search]\")\n        ) {\n          scheduleMessageRecipientSearch(\n            ev.target.closest(\"[data-dsd-msg384]\") || document,\n          );\n          renderMessages();\n        }\n        if (\n          ev.target &&\n          ev.target.matches &&\n          ev.target.matches(\"[data-dsd-message-conversation-search]\")\n        ) {\n          var conversationSearchState = conversationToolsState(\n            state.activeConversationId || \"\",\n          );\n          conversationSearchState.query = String(ev.target.value || \"\").slice(\n            0,\n            96,\n          );\n          conversationSearchState.index = -1;\n          renderMessageConversationTools(\n            conversationById(state.activeConversationId || \"\"),\n            \"search\",\n            !0,\n          );\n          var refreshedConversationSearch = qs(\n            \"[data-dsd-message-conversation-search]\",\n          );\n          refreshedConversationSearch && refreshedConversationSearch.focus();\n        }\n        var birthdateInput =\r\n          ev.target &&\r\n          ev.target.closest &&\r\n          ev.target.closest('[name=\"birthdate\"]');\r\n        birthdateInput && syncBirthdateAgeField(birthdateInput);\r\n      }));\r\n    function beginMessageEditDraft(conversationId, messageId, currentText) {\r\n      var form = qs(\"[data-dsd-message-drawer-form]\"),\r\n        bodyField = form && qs('[name=\"body\"]', form);\r\n      if (!form || !bodyField) {\r\n        renderStatus(\r\n          \"Message composer unavailable. Reopen the thread and try again.\",\r\n        );\r\n        return;\r\n      }\r\n      ((form.dataset.dsdEditingMessageId = String(messageId || \"\")),\r\n        (form.dataset.dsdEditingConversationId = String(conversationId || \"\")),\r\n        (bodyField.value = currentText || \"\"),\r\n        bodyField.focus());\r\n      var submit = qs('button[type=\"submit\"]', form);\r\n      (submit && (submit.textContent = \"Save\"),\r\n        renderStatus(\"Editing message. Save to update the thread.\"));\r\n    }\r\n    function clearMessageEditDraft(messageForm) {\r\n      if (messageForm) {\r\n        (delete messageForm.dataset.dsdEditingMessageId,\r\n          delete messageForm.dataset.dsdEditingConversationId);\r\n        var submit = qs('button[type=\"submit\"]', messageForm);\r\n        submit && (submit.textContent = \"Send\");\r\n      }\r\n    }\r\n    function handleMessageComposerSubmit(messageForm) {\r\n      if (\r\n        messageForm &&\r\n        messageForm.dataset.dsdComposerBusy !== \"true\" &&\r\n        requireActiveProfile(\"message\")\r\n      ) {\r\n        var recipientInput = qs('[name=\"recipientUid\"]', messageForm),\r\n          recipientKeyInput = qs('[name=\"recipientProfileKey\"]', messageForm),\r\n          conversationInput = qs('[name=\"conversationId\"]', messageForm),\r\n          groupInput = qs('[name=\"groupRecipients\"]', messageForm),\r\n          groupNameInput = qs('[name=\"groupName\"]', messageForm),\r\n          inlineContext = messageForm.closest(\r\n            \"[data-dsd-msg384-conversation], [data-dsd-msg384-summary]\",\r\n          ),\r\n          recipientValue = (recipientInput && recipientInput.value) || \"\",\r\n          recipientKeyValue =\r\n            (recipientKeyInput && recipientKeyInput.value) || \"\",\r\n          conversationValue =\r\n            (conversationInput && conversationInput.value) ||\r\n            (inlineContext &&\r\n              inlineContext.getAttribute(\"data-conversation-id\")) ||\r\n            \"\",\r\n          groupValue =\n            (groupInput && groupInput.value) || queryParam(\"groupRecipients\") || \"\",\n          lockedRecipientKey = clean(\n            messageForm.dataset.dsdCanonicalRecipientProfileKey || \"\",\n            \"\",\n          ),\n          directConversationContext = !!(\n            conversationValue &&\n            !/^group-/i.test(String(conversationValue || \"\"))\n          );\n        if (lockedRecipientKey) {\n          recipientValue = \"\";\n          recipientKeyValue = lockedRecipientKey;\n          recipientInput && (recipientInput.value = \"\");\n          recipientKeyInput && (recipientKeyInput.value = lockedRecipientKey);\n        }\n        if (\n          (String(groupValue || \"\").trim()\n            ? ((recipientValue = \"\"),\n              (recipientKeyValue = \"\"),\n              recipientInput && (recipientInput.value = \"\"),\n              recipientKeyInput && (recipientKeyInput.value = \"\"))\n            : (directConversationContext || recipientValue || recipientKeyValue) &&\n              ((groupValue = \"\"), groupInput && (groupInput.value = \"\")),\n          conversationValue &&\n            (!recipientValue || !recipientKeyValue) &&\n            (directConversationContext || !String(groupValue || \"\").trim()))\n        ) {\r\n          var activeSendConversation =\r\n              conversationById(conversationValue) || {},\r\n            activeSendPeer = conversationPeer(activeSendConversation);\r\n          activeSendPeer &&\r\n            !identityMatchesCurrent(\r\n              activeSendPeer.uid,\r\n              activeSendPeer.key || \"\",\r\n            ) &&\r\n            ((recipientValue = recipientValue || activeSendPeer.uid || \"\"),\r\n            (recipientKeyValue = recipientKeyValue || activeSendPeer.key || \"\"),\r\n            recipientInput && (recipientInput.value = recipientValue),\r\n            recipientKeyInput && (recipientKeyInput.value = recipientKeyValue),\r\n            (groupValue = \"\"),\r\n            groupInput && (groupInput.value = \"\"));\r\n        }\r\n        var bodyInput = qs('[name=\"body\"]', messageForm),\r\n          media = collectFormFiles(messageForm);\r\n        if (\r\n          !validatePublicationMediaSelectionIntegrity(\r\n            messageForm,\r\n            media,\r\n            \"message\",\r\n          )\r\n        )\r\n          return;\r\n        if (validateMessageMediaFiles(media, messageForm)) {\r\n          var editingMessageId = messageForm.dataset.dsdEditingMessageId || \"\",\r\n            editingConversationId =\r\n              messageForm.dataset.dsdEditingConversationId ||\r\n              conversationValue ||\r\n              \"\";\r\n          if (editingMessageId) {\r\n            if (media.length) {\r\n              setComposerValidationMessage(\r\n                messageForm,\r\n                \"Message edits support text only.\",\r\n              );\r\n              return;\r\n            }\r\n            composerBusy(\r\n              messageForm,\r\n              \"Saving edit...\",\r\n              editMessage(\r\n                editingConversationId,\r\n                editingMessageId,\r\n                (bodyInput && bodyInput.value) || \"\",\r\n              ),\r\n            ).then(function (result) {\r\n              result &&\n                (messageForm.reset(),\n                clearSocialDraft(messageForm),\n                clearMessageEditDraft(messageForm),\n                removeFilePreviews(messageForm),\r\n                conversationInput &&\r\n                  (conversationInput.value = conversationValue));\r\n            });\r\n            return;\r\n          }\r\n          var expiresPresetInput = qs('[name=\"expiresPreset\"]', messageForm),\r\n            viewOnceInput = qs('[name=\"viewOnce\"]', messageForm),\r\n            storyReference = messageForm.hasAttribute(\r\n              \"data-dsd-story-message-form\",\r\n            )\r\n              ? sanitizeStoryReference({\r\n                  storyId:\r\n                    (qs('[name=\"storyId\"]', messageForm) || {}).value || \"\",\r\n                  authorProfileKey:\r\n                    (qs('[name=\"storyAuthorProfileKey\"]', messageForm) || {})\r\n                      .value || \"\",\r\n                  authorDisplayName:\r\n                    (qs('[name=\"storyAuthorDisplayName\"]', messageForm) || {})\r\n                      .value || \"\",\r\n                  captionExcerpt:\r\n                    (qs('[name=\"storyCaptionExcerpt\"]', messageForm) || {})\r\n                      .value || \"\",\r\n                  mediaKind:\r\n                    (qs('[name=\"storyMediaKind\"]', messageForm) || {}).value ||\r\n                    \"\",\r\n                  expiresAt:\r\n                    (qs('[name=\"storyExpiresAt\"]', messageForm) || {}).value ||\r\n                    \"\",\r\n                })\r\n              : null,\r\n            activeReplyDraft =\n              state.messageReplyDraft &&\n              String(state.messageReplyDraft.conversationId || \"\") ===\n                String(conversationValue || state.activeConversationId || \"\")\n                ? state.messageReplyDraft\n                : null,\n            messageOptions = {\n              messageId: canonicalComposerPublicationId(\r\n                messageForm,\r\n                \"message\",\r\n              ),\r\n              storyReference: storyReference,\n              replyToMessageId:\n                (activeReplyDraft && activeReplyDraft.messageId) || \"\",\n              replyTo: activeReplyDraft\n                ? {\n                    messageId:\n                      activeReplyDraft.legacyMessageId ||\n                      activeReplyDraft.messageId,\n                    supabaseMessageId: activeReplyDraft.messageId,\n                    senderProfileKey: String(activeReplyDraft.senderLabel || \"\").replace(/^@/, \"\"),\n                    excerpt: activeReplyDraft.excerpt || \"\",\n                    available: !0,\n                  }\n                : null,\n            },\n            messageExpiresAt = messageExpiryFromPreset(\r\n              (expiresPresetInput && expiresPresetInput.value) || \"\",\r\n            );\r\n          (messageExpiresAt && (messageOptions.expiresAt = messageExpiresAt),\r\n            viewOnceInput &&\r\n              viewOnceInput.checked &&\r\n              (messageOptions.viewOnce = !0));\r\n          var groupNameValue =\r\n            groupNameInput && !groupNameInput.disabled\r\n              ? String(groupNameInput.value || \"\")\r\n                  .trim()\r\n                  .slice(0, 64)\r\n              : \"\";\r\n          groupNameValue && (messageOptions.groupName = groupNameValue);\r\n          var sendPromise = String(groupValue || \"\").trim()\r\n            ? sendGroupMessage(\r\n                conversationValue,\r\n                (bodyInput && bodyInput.value) || \"\",\r\n                parseGroupRecipients(groupValue),\r\n                media,\r\n                messageOptions,\r\n              )\r\n            : sendMessage(\r\n                conversationValue,\r\n                (bodyInput && bodyInput.value) || \"\",\r\n                recipientValue,\r\n                recipientKeyValue || queryParam(\"profile\"),\r\n                media,\r\n                messageOptions,\r\n              );\r\n          composerBusy(\r\n            messageForm,\r\n            media.length ? \"Saving media and message...\" : \"Sending message...\",\r\n            sendPromise,\r\n          ).then(function (result) {\r\n            (result &&\n              (messageForm.reset(),\n              clearCanonicalComposerPublicationId(messageForm, \"message\"),\r\n              clearSocialDraft(messageForm),\n              removeFilePreviews(messageForm),\n              clearMessageReplyDraft(),\n              (state.pendingMessageDraft = null),\n              delete messageForm.dataset.dsdCanonicalRecipientProfileKey,\n              delete messageForm.dataset.dsdCanonicalRecipientConversationId),\n              recipientInput && (recipientInput.value = recipientValue),\r\n              recipientKeyInput &&\r\n                (recipientKeyInput.value =\r\n                  recipientKeyValue ||\r\n                  (storyReference && storyReference.authorProfileKey) ||\r\n                  \"\"),\r\n              groupInput && (groupInput.value = groupValue),\r\n              conversationInput &&\r\n                (conversationInput.value =\r\n                  conversationValue ||\r\n                  (String(groupValue || \"\").trim()\r\n                    ? canonicalGroupConversationId(\r\n                        uniqueIdentities(parseGroupRecipients(groupValue)),\r\n                      )\r\n                    : recipientValue\r\n                      ? canonicalConversationId(\r\n                          recipientValue,\r\n                          queryParam(\"profile\"),\r\n                        )\r\n                      : \"\")));\r\n          });\r\n        }\r\n      }\r\n    }\r\n    (document.addEventListener(\"submit\", function (ev) {\n      var audienceForm = ev.target.closest(\"[data-dsd-post-audience-editor-form]\");\n      if (audienceForm) {\n        ev.preventDefault();\n        var audienceValue =\n            (qs('select[name=\"visibility\"]', audienceForm) || {}).value || \"public\",\n          audiencePolicy = policyFromSelectValue(audienceValue),\n          audienceRecipientKeys = privatePostRecipientKeys(\n            audienceForm,\n            audiencePolicy.visibility === \"private\",\n          );\n        if (audienceRecipientKeys === null) return;\n        changePostAudience(\n          audienceForm.getAttribute(\"data-post-id\") || \"\",\n          audienceValue,\n          audienceForm,\n          audienceRecipientKeys,\n        );\n        return;\n      }\n      var albumCreateForm = ev.target.closest(\"[data-dsd-album-create-form]\");\n      if (albumCreateForm) {\n        ev.preventDefault();\n        composerBusy(albumCreateForm, \"Creating album...\", function () {\n          return mutateAlbum({\n            action: \"create\",\n            name: (qs('[name=\"name\"]', albumCreateForm) || {}).value || \"\",\n            description: (qs('[name=\"description\"]', albumCreateForm) || {}).value || \"\",\n            visibility: (qs('[name=\"visibility\"]', albumCreateForm) || {}).value || \"private\",\n          }, \"Album created.\");\n        });\n        return;\n      }\n      var albumEditForm = ev.target.closest(\"[data-dsd-album-edit-form]\");\n      if (albumEditForm) {\n        ev.preventDefault();\n        composerBusy(albumEditForm, \"Saving album...\", function () {\n          return mutateAlbum({\n            action: \"update\",\n            albumId: state.activeAlbumId,\n            name: (qs('[name=\"name\"]', albumEditForm) || {}).value || \"\",\n            description: (qs('[name=\"description\"]', albumEditForm) || {}).value || \"\",\n            visibility: (qs('[name=\"visibility\"]', albumEditForm) || {}).value || \"private\",\n          }, \"Album updated.\");\n        });\n        return;\n      }\n      var albumPostForm = ev.target.closest(\"[data-dsd-album-add-post]\");\n      if (albumPostForm) {\n        ev.preventDefault();\n        composerBusy(albumPostForm, \"Adding Post...\", function () {\n          return mutateAlbum({ action: \"add_post\", albumId: state.activeAlbumId, postId: (qs('[name=\"postId\"]', albumPostForm) || {}).value || \"\" }, \"Post added to album.\");\n        });\n        return;\n      }\n      var albumGrantForm = ev.target.closest(\"[data-dsd-album-grant-form]\");\n      if (albumGrantForm) {\n        ev.preventDefault();\n        composerBusy(albumGrantForm, \"Sharing album...\", function () {\n          return mutateAlbum({ action: \"grant\", albumId: state.activeAlbumId, recipientProfileKey: (qs('[name=\"recipientProfileKey\"]', albumGrantForm) || {}).value || \"\" }, \"Album access granted.\");\n        });\n        return;\n      }\n      var albumUploadForm = ev.target.closest(\"[data-dsd-album-upload]\");\n      if (albumUploadForm) {\n        ev.preventDefault();\n        var albumFileInput = qs('[name=\"albumMedia\"]', albumUploadForm),\n          albumFile = albumFileInput && albumFileInput.files && albumFileInput.files[0];\n        if (!albumFile || !state.activeAlbumId) return;\n        composerBusy(albumUploadForm, \"Uploading album media...\", function () {\n          return createMediaManifest(albumFile, \"album\", state.activeAlbumId, \"album-native\", \"private\", \"standard\")\n            .then(function (manifest) {\n              if (!manifest || manifest.status !== \"uploaded\") throw new Error(\"Album media upload did not complete.\");\n              return resolveProfileMediaManifestUuid(manifest).then(function (mediaId) {\n                mediaId = mediaId || profileManifestMediaId(manifest);\n                if (!mediaId) throw new Error(\"Album media record is unavailable.\");\n                return albumProxyRequest(\"POST\", { action: \"add_media\", albumId: state.activeAlbumId, mediaId: mediaId });\n              });\n            });\n        }).then(function (result) {\n          if (!result) return;\n          albumUploadForm.reset();\n          renderStatus(\"Media added to album.\");\n          loadAlbumDetail(state.activeAlbumId);\n        });\n        return;\n      }\n      var profileSetupForm = ev.target.closest(\"[data-dsd-profile-setup-form]\");\n      if (profileSetupForm) {\r\n        (ev.preventDefault(),\r\n          handleProfileSetupSubmit(\r\n            profileSetupForm,\r\n            qs(\"[data-dsd-user-profile]\") || document,\r\n          ));\r\n        return;\n      }\n      var shareForm = ev.target.closest(\"[data-dsd-share-composer]\");\n      if (shareForm) {\n        ev.preventDefault();\n        var originalPostId = shareForm.getAttribute(\"data-original-post-id\") || \"\",\n          shareSourcePost = localPostById(state.activeSharePostId),\n          originalPost = shareSourcePost && (shareSourcePost.originalPost || shareSourcePost);\n        if (\n          !originalPost ||\n          String(originalPost.supabasePostId || \"\") !== String(originalPostId)\n        ) {\n          renderStatus(\"The original post is no longer available.\");\n          return;\n        }\n        composerBusy(shareForm, \"Sharing post...\", function () {\n          return createPost({\n            body: (qs('[name=\"body\"]', shareForm) || {}).value || \"\",\n            visibility: (qs('[name=\"visibility\"]', shareForm) || {}).value || \"public\",\n            contentRating: \"standard\",\n            accessGate: \"none\",\n            media: [],\n            postType: \"share\",\n            originalPostId: originalPostId,\n            originalPost: originalPost,\n          });\n        }).then(function (result) {\n          if (!result) return;\n          (state.posts = state.posts.map(function (item) {\n            if (String(item.supabasePostId || \"\") !== String(originalPostId))\n              return item;\n            var counts = Object.assign({}, item.counts || {});\n            counts.shares = Number(counts.shares || 0) + 1;\n            return Object.assign({}, item, { counts: counts });\n          }));\n          (shareForm.reset(), clearSocialDraft(shareForm), closeShareComposer(), renderPosts());\n        });\n        return;\n      }\n      var globalPostForm = ev.target.closest(\"[data-dsd-global-post-composer]\");\n      if (globalPostForm) {\r\n        if ((ev.preventDefault(), !requireActiveProfile(\"create posts\")))\r\n          return;\r\n        var postMedia = collectFormFiles(globalPostForm);\r\n        if (\r\n          !validatePublicationMediaSelectionIntegrity(\r\n            globalPostForm,\r\n            postMedia,\r\n            \"post\",\r\n          )\r\n        )\r\n          return;\r\n        if (!validatePostMediaFiles(postMedia, globalPostForm)) return;\r\n        var postPolicy = policyFromSelectValue(\n          (qs('[name=\"visibility\"]', globalPostForm) || {}).value || \"public\",\n        ),\n          globalPoll = postPollInput(globalPostForm);\n        if (globalPoll === !1) return;\n        var originalsReference = null;\r\n        if (globalPostForm.dataset.originalsReference) {\r\n          try { originalsReference = JSON.parse(globalPostForm.dataset.originalsReference); }\r\n          catch (error) { renderStatus(\"The Originals reference is invalid. Remove it and try again.\"); return; }\r\n          if (postMedia.length || globalPoll) { renderStatus(\"Share the Originals reference without an additional poll or media upload.\"); return; }\r\n        }\r\n        var globalRecipientKeys =\n          postPolicy.visibility === \"private\"\n            ? privatePostRecipientKeys(globalPostForm, !0)\n            : [];\n        if (globalRecipientKeys === null) return;\n        var globalPublicationId = canonicalComposerPublicationId(\r\n          globalPostForm,\r\n          \"post\",\r\n        );\r\n        composerBusy(\r\n          globalPostForm,\r\n          postMedia.length ? \"Saving media and post...\" : \"Saving post...\",\r\n          function () {\r\n            return createPost({\r\n              publicationId: globalPublicationId,\r\n              body: (qs('[name=\"body\"]', globalPostForm) || {}).value || \"\",\r\n              caption: \"\",\r\n              visibility: postPolicy.visibility,\r\n              contentRating: postPolicy.contentRating,\r\n              accessGate: postPolicy.accessGate,\n              media: postMedia,\n              poll: globalPoll,\n              originalsReference: originalsReference,\r\n              recipientProfileKeys: globalRecipientKeys,\n            });\n          },\r\n        ).then(function (result) {\r\n          result &&\n            (globalPostForm.reset(),\n            clearCanonicalComposerPublicationId(globalPostForm, \"post\"),\r\n            clearSocialDraft(globalPostForm),\n            resetPostPollComposer(globalPostForm),\n            delete globalPostForm.dataset.originalsReference,\r\n            (qs('[data-originals-composer-attachment]', globalPostForm) || { remove: function () {} }).remove(),\r\n            delete globalPostForm.dataset.dsdMediaSelectionExpected,\n            removeFilePreviews(globalPostForm),\r\n            updateComposerCounters(globalPostForm),\r\n            closeGlobalPostComposer());\r\n        });\r\n        return;\r\n      }\r\n      var commentForm = ev.target.closest(\"[data-dsd-comment-form]\");\n      if (commentForm) {\r\n        (ev.preventDefault(), submitCommentForm(commentForm));\r\n        return;\n      }\n      var meetingForm = ev.target.closest(\"[data-dsd-msg384-meeting-form]\");\n      if (meetingForm) {\n        ev.preventDefault();\n        var meetingSubmit = qs('button[type=\"submit\"]', meetingForm);\n        meetingSubmit && (meetingSubmit.disabled = !0);\n        sendMeetingAreaProposal(\n          state.activeConversationId || \"\",\n          (qs('[name=\"city\"]', meetingForm) || {}).value || \"\",\n          (qs('[name=\"region\"]', meetingForm) || {}).value || \"\",\n          meetingForm.getAttribute(\"data-dsd-meeting-state\") || \"SHARED\",\n          (qs('[name=\"referenceProposalId\"]', meetingForm) || {}).value || \"\",\n        ).finally(function () { meetingSubmit && (meetingSubmit.disabled = !1); });\n        return;\n      }\n      var messageNameEditorForm = ev.target.closest(\n        \"[data-dsd-msg384-name-editor-form]\",\r\n      );\r\n      if (messageNameEditorForm) {\r\n        (ev.preventDefault(),\r\n          handleMessageNameEditorSubmit(messageNameEditorForm));\r\n        return;\r\n      }\r\n      var messageForm = ev.target.closest(\"[data-dsd-message-form]\");\r\n      if (messageForm) {\r\n        (ev.preventDefault(), handleMessageComposerSubmit(messageForm));\r\n        return;\r\n      }\r\n      var storyForm = ev.target.closest(\"[data-dsd-story-form]\");\r\n      if (storyForm) {\r\n        if ((ev.preventDefault(), !requireActiveProfile(\"create stories\")))\r\n          return;\r\n        var media = collectFormFiles(storyForm);\r\n        if (\r\n          !validatePublicationMediaSelectionIntegrity(\r\n            storyForm,\r\n            media,\r\n            \"story\",\r\n          )\r\n        )\r\n          return;\r\n        if (!validateStoryMediaFiles(media, storyForm)) return;\r\n        var policy = policyFromSelectValue(\r\n          (qs('[name=\"visibility\"]', storyForm) || {}).value || \"public\",\r\n        ),\r\n          storyPublicationId = canonicalComposerPublicationId(\r\n            storyForm,\r\n            \"story\",\r\n          );\r\n        composerBusy(\r\n          storyForm,\r\n          media.length ? \"Saving media and story...\" : \"Saving story...\",\r\n          function () {\r\n            return createStory({\r\n              publicationId: storyPublicationId,\r\n              body: (qs('[name=\"body\"]', storyForm) || {}).value || \"\",\r\n              visibility: policy.visibility,\r\n              contentRating: policy.contentRating,\r\n              accessGate: policy.accessGate,\r\n              media: media,\r\n            });\r\n          },\r\n        ).then(function (result) {\r\n          if (result) {\r\n            (storyForm.reset(),\n              clearCanonicalComposerPublicationId(storyForm, \"story\"),\r\n              clearSocialDraft(storyForm),\n              delete storyForm.dataset.dsdMediaSelectionExpected,\n              removeFilePreviews(storyForm));\r\n            var storyProfileRoot = storyForm.closest(\"[data-dsd-user-profile]\");\r\n            (storyProfileRoot && closeProfileModal(storyProfileRoot),\r\n              storyForm.closest(\"[data-dsd-story-composer-layer]\") &&\r\n                closeStoryComposer());\r\n          }\r\n        });\r\n      }\r\n    }),\r\n      document.addEventListener(\"focusin\", function (ev) {\r\n        ev.target &&\r\n          ev.target.closest &&\r\n          ev.target.closest(\"[data-dsd-story-message-form]\") &&\r\n          clearStoryAdvanceTimer();\r\n      }),\r\n      document.addEventListener(\"focusout\", function (ev) {\r\n        ev.target &&\r\n          ev.target.closest &&\r\n          ev.target.closest(\"[data-dsd-story-message-form]\") &&\r\n          rescheduleActiveStoryAdvance(900);\r\n      }),\n      document.addEventListener(\"keydown\", function (ev) {\n        if (ev.key === \"Escape\") {\n          if (qs(\"[data-dsd-post-audience-sheet]\")) {\n            ev.preventDefault();\n            closePostAudienceSheet();\n            return;\n          }\n          if (qs(\"[data-dsd-post-audience-editor-layer]\")) {\n            ev.preventDefault();\n            closePostAudienceEditor();\n            return;\n          }\n          var openReactionTray = qsa(\n            \".dsd-post-reaction__tray:not([hidden]), .dsd-comment-reactions__tray:not([hidden])\",\n          );\n          if (openReactionTray.length) {\n            ev.preventDefault();\n            var reactionRoot = openReactionTray[0].closest(\n              \"[data-dsd-post-reaction-owner], [data-dsd-comment-reactions]\",\n            );\n            closePostReactionTrays(reactionRoot);\n            closeCommentReactionTrays(reactionRoot);\n            return;\n          }\n          var openTransient = qsa(\n            \"details.dsd-post-more-menu[open], details.dsd-comment-action-menu[open], details.dsd-composer-help[open], details.dsd-connection-secondary-menu[open]\",\n          );\n          if (openTransient.length) {\n            ev.preventDefault();\n            openTransient.forEach(function (details) {\n              details.removeAttribute(\"open\");\n            });\n            var transientSummary = qs(\"summary\", openTransient[0]);\n            transientSummary && transientSummary.focus({ preventScroll: !0 });\n            return;\n          }\n        }\n        if (ev.key === \"Tab\") {\n          var focusLayer = qsa(\n              \"[data-dsd-immersive-overlay], [data-dsd-post-audience-sheet], [data-dsd-post-audience-editor-layer]:not([hidden]), [data-dsd-share-composer-layer]:not([hidden]), [data-dsd-report-modal-layer]:not([hidden]), [data-dsd-global-post-composer-layer]:not([hidden]), [data-dsd-story-composer-layer]:not([hidden]), [data-dsd-profile-modal-layer]:not([hidden])\",\n            )[0],\n            focusable = focusLayer\n              ? qsa(\n                  'a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex=\"-1\"])',\n                  focusLayer,\n                ).filter(function (node) {\n                  return node.offsetParent !== null;\n                })\n              : [];\n          if (focusable.length) {\n            var first = focusable[0],\n              last = focusable[focusable.length - 1];\n            if (ev.shiftKey && document.activeElement === first) {\n              (ev.preventDefault(), last.focus());\n              return;\n            }\n            if (!ev.shiftKey && document.activeElement === last) {\n              (ev.preventDefault(), first.focus());\n              return;\n            }\n          }\n        }\n        if (state.connectionShuffleOpen && ev.key === \"Escape\") {\n          (ev.preventDefault(), closeConnectionShuffle());\n          return;\n        }\n        if (ev.key === \"Escape\") {\n          var messageRoot = qs(\n            \"[data-dsd-msg384][data-dsd-msg384-active-conversation]\",\n          );\n          if (messageRoot) {\n            var openMessageTools = qs(\n              \"[data-dsd-msg384-conversation-tools]:not([hidden])\",\n              messageRoot,\n            );\n            if (openMessageTools) {\n              ev.preventDefault();\n              renderMessageConversationTools(\n                conversationById(state.activeConversationId || \"\"),\n                \"\",\n                !1,\n              );\n              var messageMenuSummary = qs(\n                \".dsd-msg384__menu summary\",\n                messageRoot,\n              );\n              messageMenuSummary &&\n                messageMenuSummary.focus({ preventScroll: !0 });\n              return;\n            }\n            (ev.preventDefault(), closeMessageDrawerState());\n            return;\n          }\n        }\r\n        var overlay = qs(\"[data-dsd-immersive-overlay]\");\r\n        if (overlay) {\r\n          if (ev.key === \"Escape\") {\r\n            (ev.preventDefault(), closeImmersiveOverlay());\r\n            return;\r\n          }\r\n          if (ev.key === \"ArrowLeft\") {\r\n            (ev.preventDefault(),\r\n              overlay.getAttribute(\"data-dsd-immersive-mode\") === \"story\"\r\n                ? stepStory(-1)\r\n                : overlay.getAttribute(\"data-dsd-immersive-mode\") ===\r\n                    \"post-media\" && stepPostMedia(-1));\r\n            return;\r\n          }\r\n          if (ev.key === \"ArrowRight\") {\r\n            (ev.preventDefault(),\r\n              overlay.getAttribute(\"data-dsd-immersive-mode\") === \"story\"\r\n                ? stepStory(1)\r\n                : overlay.getAttribute(\"data-dsd-immersive-mode\") ===\r\n                    \"post-media\" && stepPostMedia(1));\r\n            return;\r\n          }\r\n        }\r\n        var focusedNotification =\r\n          ev.target &&\r\n          ev.target.closest &&\r\n          ev.target.closest(\"[data-notification-card]\");\r\n        if (focusedNotification && (ev.key === \"Enter\" || ev.key === \" \")) {\r\n          var focusedHref =\r\n            focusedNotification.getAttribute(\"data-dsd-target-href\") || \"\";\r\n          if (\r\n            focusedHref &&\r\n            !ev.target.closest(\r\n              \"a, button, input, textarea, select, label, summary\",\r\n            )\r\n          ) {\r\n            ev.preventDefault();\r\n            var focusedNotificationId =\r\n              focusedNotification.getAttribute(\"data-notification-id\") || \"\";\r\n            markNotificationReadById(focusedNotificationId).then(function () {\r\n              window.location.assign(focusedHref);\r\n            });\r\n            return;\r\n          }\r\n        }\r\n        if (ev.key === \"Escape\") {\r\n          if (state.postDrawer && state.postDrawer.open) {\r\n            (ev.preventDefault(), closePostDrawer());\r\n            return;\r\n          }\r\n          var globalPostLayer = qs(\n            \"[data-dsd-global-post-composer-layer]:not([hidden])\",\r\n          );\r\n          if (globalPostLayer) {\r\n            (ev.preventDefault(), closeGlobalPostComposer());\r\n            return;\n          }\n          var shareLayer = qs(\"[data-dsd-share-composer-layer]:not([hidden])\");\n          if (shareLayer) {\n            (ev.preventDefault(), closeShareComposer());\n            return;\n          }\n          var profileLayer = qs(\"[data-dsd-profile-modal-layer]:not([hidden])\");\r\n          if (profileLayer) {\r\n            (ev.preventDefault(),\r\n              closeProfileModal(\r\n                profileLayer.closest(\"[data-dsd-user-profile]\"),\r\n              ));\r\n            return;\r\n          }\r\n        }\r\n        (ev.key === \"Enter\" || ev.key === \" \") &&\r\n          ev.target &&\r\n          ev.target.closest &&\r\n          ev.target.closest(\"[data-dsd-composer-media-button]\") &&\r\n          activateComposerMediaControl(ev.target, ev);\r\n      }),\r\n      document.addEventListener(\"change\", function (ev) {\n        if (\n          ev.target &&\n          ev.target.matches &&\n          ev.target.matches(\"[data-dsd-message-conversation-filter]\")\n        ) {\n          var conversationFilterState = conversationToolsState(\n            state.activeConversationId || \"\",\n          );\n          conversationFilterState.filter = [\"all\", \"media\", \"links\"].indexOf(\n            ev.target.value,\n          ) !== -1\n            ? ev.target.value\n            : \"all\";\n          conversationFilterState.index = -1;\n          renderMessageConversationTools(\n            conversationById(state.activeConversationId || \"\"),\n            \"search\",\n            !0,\n          );\n          return;\n        }\n        var albumSort =\n          ev.target &&\n          ev.target.closest &&\n          ev.target.closest(\"[data-dsd-album-sort]\");\n        if (albumSort) {\n          state.profileAlbumSort = /^(?:custom|newest|oldest)$/.test(albumSort.value)\n            ? albumSort.value\n            : \"custom\";\n          renderProfileAlbums();\n          return;\n        }\n        var discoveryFilters =\n          ev.target &&\n          ev.target.closest &&\n          ev.target.closest(\".dsd-connection-discovery__filters\");\n        discoveryFilters && updateDiscoveryFilterSummaries(discoveryFilters);\n        if (ev.target && ev.target.matches && ev.target.matches('[name=\"discoveryProfileFilter\"]')) {\n          setCanonicalDiscoveryFilter(ev.target.value, document);\n          renderDiscovery();\n          renderConnectionSurfaces();\n        }\n        var birthdateInput =\n          ev.target &&\r\n          ev.target.closest &&\r\n          ev.target.closest('[name=\"birthdate\"]');\r\n        birthdateInput && syncBirthdateAgeField(birthdateInput);\n        var pollDurationInput =\n          ev.target &&\n          ev.target.closest &&\n          ev.target.closest('select[name=\"pollDuration\"]');\n        if (pollDurationInput) {\n          var pollCustomEnd = qs(\n            \"[data-dsd-poll-custom-end]\",\n            pollDurationInput.closest(\"form\"),\n          );\n          if (pollCustomEnd)\n            pollCustomEnd.hidden = pollDurationInput.value !== \"custom\";\n        }\n        var locationCityInput =\r\n          ev.target &&\r\n          ev.target.closest &&\r\n          ev.target.closest(\"[data-dsd-location-city-input]\");\r\n        locationCityInput && applyLocationSuggestion(locationCityInput);\r\n        var fileInput = ev.target.closest('input[type=\"file\"]');\r\n        fileInput &&\r\n          !fileInput.hasAttribute(\"data-dsd-canonical-media-picker\") &&\r\n          processComposerMediaSelection(fileInput);\r\n      }),\r\n      document.addEventListener(\"change\", function (ev) {\r\n        var stateSelect =\r\n          ev.target &&\r\n          ev.target.closest &&\r\n          ev.target.closest(\"[data-dsd-location-state-input]\");\r\n        if (stateSelect) {\r\n          refreshCanonicalLocationCities(stateSelect.closest(\"form\"), \"\");\r\n          stateSelect.setAttribute(\"data-dsd-location-normalized\", \"canonical-select\");\r\n        }\r\n      }),\r\n      document.addEventListener(\"input\", function (ev) {\n        var profileContentSearch =\n          ev.target &&\n          ev.target.closest &&\n          ev.target.closest(\"[data-dsd-profile-content-search]\");\n        if (profileContentSearch) {\n          state.profileContentSearch = String(profileContentSearch.value || \"\");\r\n          renderPosts(\"profile-content-search\");\r\n        }\n        var discoveryFilters =\n          ev.target &&\n          ev.target.closest &&\n          ev.target.closest(\".dsd-connection-discovery__filters\");\n        discoveryFilters && updateDiscoveryFilterSummaries(discoveryFilters);\n        ev.target &&\n          ev.target.matches &&\r\n          ev.target.matches('textarea[name=\"body\"]') &&\r\n          updateComposerCounters(ev.target.closest(\"form\") || document);\r\n        var search = ev.target.closest(\r\n          \"[data-dsd-profile-relationship-search]\",\r\n        );\r\n        if (search) {\r\n          var panel = search.closest(\"[data-dsd-profile-modal-panel]\"),\r\n            q = String(search.value || \"\").toLowerCase();\r\n          qsa(\"[data-dsd-relationship-record]\", panel).forEach(function (row) {\r\n            var text = String(\r\n              row.getAttribute(\"data-keywords\") || row.textContent || \"\",\r\n            ).toLowerCase();\r\n            row.hidden = !!q && text.indexOf(q) === -1;\r\n          });\n        }\n      }),\n      window.addEventListener(\"beforeunload\", function (event) {\r\n        qsa(\n          \"[data-dsd-canonical-composer], [data-dsd-global-post-composer], [data-dsd-story-form], [data-dsd-comment-form], [data-dsd-share-composer], [data-dsd-message-drawer-form]\",\n        ).forEach(persistSocialDraft);\r\n        if (activeCanonicalMediaUploadCount > 0) {\r\n          event.preventDefault();\r\n          event.returnValue = \"\";\r\n        }\r\n      }));\n  }\r\n  function renderAll() {\r\n    var route = String(location.pathname || \"\"),\r\n      isProfileRoute = /\\/pages\\/user-profile(?:$|\\/)/.test(route),\r\n      isFeedRoute = /\\/pages\\/(?:feed|social)(?:$|\\/)/.test(route),\r\n      isMessagesRoute = /\\/pages\\/messages(?:$|\\/)/.test(route),\r\n      isNotificationsRoute = /\\/pages\\/notifications(?:$|\\/)/.test(route),\r\n      isStoriesRoute = /\\/pages\\/stories(?:$|\\/)/.test(route),\r\n      isDiscoveryRoute = /\\/pages\\/users(?:$|\\/)/.test(route),\r\n      isModerationRoute =\r\n        /\\/pages\\/(?:moderation-center|safety-center|founder-operations)(?:$|\\/)/.test(\r\n          route,\r\n        ),\r\n      isSearchRoute =\r\n        /\\/pages\\/search-center(?:$|\\/)/.test(route) || route === \"/search\",\r\n      isSavedRoute = /\\/pages\\/(?:saved|favorites)(?:$|\\/)/.test(route);\r\n    (ensureLocationSuggestionDatalist(),\r\n      ensureSocialMediaSaveDeterrence(),\r\n      renderRouteAccessGates(),\r\n      renderPublicGuard(),\r\n      isProfileRoute && renderProfileIdentity(),\r\n      (isProfileRoute || isFeedRoute) && renderComposer(),\r\n      isProfileRoute && renderProfileModals(),\r\n      refreshPublicationControls(document),\r\n      (isProfileRoute || isFeedRoute || isSavedRoute) &&\r\n        (renderPosts(), renderPostDrawer()),\r\n      isNotificationsRoute && renderNotifications(),\r\n      isMessagesRoute && renderMessages(),\r\n      (isProfileRoute || isFeedRoute || isStoriesRoute) && renderStories(),\r\n      isModerationRoute && renderModeration(),\r\n      isDiscoveryRoute && renderDiscovery(),\r\n      (isProfileRoute || isDiscoveryRoute) && renderRelationships(),\r\n      isSearchRoute && renderSearchIndex(),\r\n      syncAuthenticatedMenuIdentity(),\r\n      updateAllComposerMediaControls(document),\r\n      applyCurrentProfileMediaFocus(document),\r\n      syncRestrictedActionControls(),\r\n      clearStaleConnectionStatus(),\r\n      claim(\"launch-social:metadata-cutover-render\", {\r\n        authenticated: hasCustomer(),\r\n        supabaseCutoverReady: supabaseCutoverReady(),\r\n        profileExists: state.profileExists,\r\n        paths: PATHS,\r\n        draftQueueLength: draftQueue().length,\r\n      }));\r\n  }\r\n  function installReleaseEStyles() {\n    if (document.getElementById(\"dsd-release-e-polls-hashtags\")) return;\n    var style = document.createElement(\"style\");\n    style.id = \"dsd-release-e-polls-hashtags\";\n    style.textContent =\n      '.dsd-post-hashtag-link{color:#f1c86f;font-weight:800;text-decoration:none;overflow-wrap:anywhere}.dsd-post-hashtag-link:hover,.dsd-post-hashtag-link:focus-visible{text-decoration:underline}.dsd-hashtag-feed-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid rgba(240,196,108,.28);border-radius:8px;background:rgba(0,0,0,.18)}.dsd-hashtag-feed-header div{display:grid;gap:2px;min-width:0}.dsd-hashtag-feed-header span{font-size:10px;color:rgba(255,248,231,.62);text-transform:uppercase}.dsd-hashtag-feed-header strong{font-size:18px;color:#fff8da;overflow-wrap:anywhere}.dsd-hashtag-feed-header a{color:#f1c86f;font-size:12px;font-weight:900;text-decoration:none}.dsd-poll-composer{display:grid;gap:6px;min-width:0;max-width:100%}.dsd-poll-composer__toggle,.dsd-poll-composer__controls button{justify-self:start;min-height:32px;padding:6px 10px;border:1px solid rgba(240,196,108,.32);border-radius:999px;background:rgba(240,196,108,.08);color:#fff8da;font-weight:800}.dsd-poll-composer fieldset{display:grid;gap:8px;min-width:0;max-width:100%;margin:0;padding:9px;border:1px solid rgba(255,255,255,.13);border-radius:8px}.dsd-poll-composer fieldset[hidden]{display:none!important}.dsd-poll-composer legend{padding:0 5px;color:#fff8da;font-size:12px;font-weight:900}.dsd-poll-composer [data-dsd-poll-options]{display:grid;gap:7px}.dsd-poll-composer label{display:grid;gap:4px;min-width:0;font-size:11px;color:rgba(255,248,231,.72)}.dsd-poll-composer input,.dsd-poll-composer select{display:block;width:100%;max-width:100%;min-width:0;min-height:38px;box-sizing:border-box}.dsd-poll-composer__option-row{display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:6px;min-width:0}.dsd-poll-composer__option-row button{width:34px;height:38px;padding:0;border:1px solid rgba(255,255,255,.14);border-radius:7px;background:rgba(255,255,255,.06);color:#fff}.dsd-poll-composer__controls{display:grid;grid-template-columns:auto minmax(120px,1fr);align-items:end;gap:8px}.dsd-poll-composer__help{margin:0;color:rgba(255,248,231,.62);font-size:11px;line-height:1.35}.dsd-post-poll{box-sizing:border-box;display:grid;gap:8px;width:100%;max-width:100%;min-width:0;margin:10px 0;padding:10px;border:1px solid rgba(240,196,108,.26);border-radius:8px;background:rgba(0,0,0,.13)}.dsd-post-poll__options{box-sizing:border-box;display:grid;gap:7px;width:100%;max-width:100%;min-width:0}.dsd-post-poll__option{box-sizing:border-box;position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;max-width:100%;min-width:0;min-height:42px;padding:8px 10px;overflow:hidden;border:1px solid rgba(255,255,255,.14);border-radius:7px;background:rgba(255,255,255,.04);color:#fff;text-align:left}.dsd-post-poll__option:not(:disabled){cursor:pointer}.dsd-post-poll__option.is-selected{border-color:rgba(240,196,108,.72);box-shadow:0 0 0 1px rgba(240,196,108,.28)}.dsd-post-poll__fill{position:absolute;z-index:-1;inset:0 auto 0 0;width:var(--dsd-poll-result,0%);background:rgba(139,78,255,.22);pointer-events:none}.dsd-post-poll__label{min-width:0;overflow-wrap:anywhere;font-weight:800}.dsd-post-poll__result{font-size:11px;font-weight:900;color:#f1c86f}.dsd-post-poll__meta{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;color:rgba(255,248,231,.65);font-size:11px}.dsd-post-poll>a{color:#f1c86f;font-size:12px;font-weight:900}.dsd-post-poll--embedded{margin:8px 0;padding:8px}.dsd-post-poll--embedded .dsd-post-poll__option{min-height:38px;padding:7px 8px}@media(max-width:430px){.dsd-poll-composer__controls{grid-template-columns:1fr}.dsd-poll-composer__controls button{width:100%}.dsd-post-poll__option{min-height:44px}.dsd-hashtag-feed-header{align-items:flex-start}}';\n    style.textContent += '.dsd-poll-composer__map-area{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;align-items:end;padding:8px;border:1px solid rgba(155,108,255,.24);border-radius:8px;background:rgba(111,54,217,.08)}.dsd-poll-composer__map-area>strong,.dsd-poll-composer__map-area>small{grid-column:1/-1}.dsd-poll-composer__map-area>strong{color:#fff8da;font-size:11px}.dsd-poll-composer__map-area>strong small,.dsd-poll-composer__map-area>small{color:rgba(255,248,231,.62);font-weight:700}@media(max-width:430px){.dsd-poll-composer__map-area{grid-template-columns:minmax(0,1fr)}}';\n    document.head.appendChild(style);\n  }\n  function installModalContainmentStyles() {\n    if (!document.getElementById(\"dsd-modal-containment-p11dz643\")) {\r\n      var style = document.createElement(\"style\");\r\n      ((style.id = \"dsd-modal-containment-p11dz643\"),\r\n        (style.textContent =\r\n          '.dsd-modal,.dsd-up315__modal-layer,.dsd-immersive-overlay,[data-dsd-profile-modal-layer]{box-sizing:border-box;max-width:100vw;overflow-x:hidden}.dsd-modal *, .dsd-up315__modal-layer *, .dsd-immersive-overlay *, [data-dsd-profile-modal-layer] *{box-sizing:border-box;min-width:0}.dsd-modal__inner,.dsd-modal__content,.dsd-founder390__modal,.dsd-safety-modal{width:min(100% - 24px,720px);max-width:calc(100vw - 24px);overflow-x:hidden}.dsd-up315__modal-panel,.dsd-up315__modal-card form,.dsd-modal form,.dsd-launch-comments form,.dsd-composer-media-actions,.dsd-launch-actions,.dsd-story385__actions{max-width:100%;overflow-wrap:anywhere}.dsd-modal input,.dsd-modal textarea,.dsd-modal select,.dsd-up315__modal-card input,.dsd-up315__modal-card textarea,.dsd-up315__modal-card select{width:100%;max-width:100%}.dsd-modal img,.dsd-modal video,.dsd-up315__modal-card img,.dsd-up315__modal-card video{max-width:100%;height:auto}.dsd-launch-actions,.dsd-story385__actions,.dsd-users311__actions{display:flex;flex-wrap:wrap;gap:8px}.dsd-launch-actions>* , .dsd-story385__actions>* , .dsd-users311__actions>*{max-width:100%;white-space:normal}.dsd-post-card,.dsd-up315__post,.dsd-feed368__list,.dsd-feed368__stories,.dsd-feed368__composer{background:rgba(255,255,255,.012)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.dsd-post-card:before,.dsd-post-card:after,.dsd-up315__post:before,.dsd-up315__post:after{filter:none!important;box-shadow:none!important}.dsd-noti321__card[data-dsd-target-href]{cursor:pointer}.dsd-saved-tile video,.dsd-saved-tile [data-dsd-media-kind=\"video\"] video{display:none!important}@media(max-width:430px){.dsd-modal__inner,.dsd-modal__content,.dsd-founder390__modal,.dsd-safety-modal{width:calc(100vw - 20px);max-width:calc(100vw - 20px)}.dsd-launch-actions>button,.dsd-launch-actions>a,.dsd-story385__actions>button,.dsd-users311__actions>a,.dsd-users311__actions>button{flex:1 1 140px}}'),\n        (style.textContent +=\r\n          \".dsd-feed368__stories{background:rgba(5,3,13,.42)!important;background-color:rgba(5,3,13,.42)!important;border:1px solid rgba(214,178,94,.22)!important;border-radius:14px!important;box-shadow:inset 0 0 22px rgba(139,78,255,.08)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.dsd-feed368__composer{background:rgba(255,255,255,.01)!important;background-color:rgba(255,255,255,.01)!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:18px!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.dsd-feed368__list{background:rgba(255,255,255,.055)!important;background-color:rgba(255,255,255,.055)!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:20px!important;box-shadow:0 0 0 1px rgba(255,255,255,.06)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.dsd-post-card,.dsd-up315__post{background:transparent!important;background-color:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}html body .dsd-post-card,html body .dsd-up315__post,html body [data-dsd-feed-root] .dsd-post-card,html body [data-dsd-profile-feed-list] .dsd-post-card{background:transparent!important;background-color:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.dsd-post-card:before,.dsd-post-card:after,.dsd-up315__post:before,.dsd-up315__post:after,.dsd-feed368__list:before,.dsd-feed368__list:after{content:none!important;display:none!important;background:transparent!important;box-shadow:none!important;filter:none!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-up315__mini-avatar,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-up315__mini-avatar,.dsd-feed368__composer .dsd-up315__mini-avatar,.dsd-up315__composer-head .dsd-up315__mini-avatar[data-dsd-profile-composer-avatar]{width:30px!important;height:30px!important;min-width:30px!important;max-width:30px!important;aspect-ratio:1/1!important;flex:0 0 30px!important;border-radius:50%!important;overflow:hidden!important;display:grid!important;place-items:center!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-up315__mini-avatar img,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-up315__mini-avatar img,.dsd-feed368__composer .dsd-up315__mini-avatar img,.dsd-up315__composer-head .dsd-up315__mini-avatar[data-dsd-profile-composer-avatar] img{width:30px!important;height:30px!important;min-width:30px!important;max-width:30px!important;min-height:30px!important;max-height:30px!important;object-fit:cover!important;border-radius:50%!important;display:block!important}\"),\r\n        (style.textContent +=\r\n          \".dsd-up315__cover{display:block!important;min-height:clamp(168px,32vw,330px)!important;background-image:var(--dsd-up315-cover)!important;background-size:var(--dsd-up315-cover-size,cover)!important;background-position:var(--dsd-up315-cover-position,center 38%)!important;background-color:rgba(255,255,255,.07)!important;position:relative!important;z-index:1!important}.dsd-up315__hero{position:relative!important;z-index:2!important;display:grid!important;gap:12px!important}.dsd-up315__actions{position:relative!important;z-index:5!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-top:8px!important;clear:both!important}.dsd-up315__bio{position:relative!important;z-index:1!important;margin-bottom:8px!important}.dsd-composer-media-actions{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important}.dsd-composer-policy-tools{display:inline-flex!important;align-items:center!important;gap:6px!important}.dsd-publication-control{display:inline-flex!important;align-items:center!important;gap:6px!important}.dsd-content-rating-help{display:none!important}.dsd-noti321__card{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:10px!important;align-items:start!important}.dsd-noti321__thumb{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;min-width:42px!important;border-radius:50%!important;overflow:hidden!important;background:rgba(255,255,255,.10)!important}.dsd-noti321__thumb img,.dsd-noti321__thumb .dsd-media-element{width:100%!important;height:100%!important;object-fit:cover!important}.dsd-up315__modal-list [data-dsd-relationship-record]{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important}@media(max-width:520px){.dsd-noti321__card{grid-template-columns:auto minmax(0,1fr)!important}.dsd-up315__actions{width:100%!important}.dsd-up315__actions>*{flex:1 1 130px!important}}\"),\r\n        (style.textContent +=\r\n          \"html body [data-dsd-user-profile][data-dsd-profile-loading] .dsd-up315__identity-copy,html body [data-dsd-user-profile][data-dsd-profile-loading] .dsd-up353__identity-copy,html body [data-dsd-user-profile][data-dsd-profile-loading] .dsd-up315__actions,html body [data-dsd-user-profile][data-dsd-profile-loading] .dsd-up353__actions,html body [data-dsd-user-profile][data-dsd-profile-loading] .dsd-up353__relationship-strip,html body [data-dsd-user-profile][data-dsd-profile-loading] .dsd-story385__profile-slot,html body [data-dsd-user-profile][data-dsd-profile-loading] .dsd-up356__content-shell,html body [data-dsd-user-profile][data-dsd-profile-loading] [data-dsd-profile-publisher]{display:none!important;visibility:hidden!important;opacity:0!important}html body [data-dsd-user-profile][data-dsd-profile-loading] .dsd-up315__avatar,html body [data-dsd-user-profile][data-dsd-profile-loading] .dsd-up353__avatar{color:inherit!important}\"),\r\n        (style.textContent +=\r\n          'html body [data-dsd-user-profile][data-dsd-profile-loading] [data-dsd-profile-static-shell=\"true\"]{visibility:hidden!important;opacity:0!important}html body [data-dsd-user-profile]:not([data-dsd-profile-loading]) [data-dsd-profile-static-shell=\"true\"]{visibility:visible!important;opacity:1!important}'),\r\n        (style.textContent +=\r\n          \"html.dsd-post-drawer-open .dsd-post-drawer__backdrop,html body.dsd-social-page .dsd-post-drawer__backdrop,html body .dsd-post-drawer__backdrop{background:rgba(0,0,0,.30)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}html.dsd-post-drawer-open .dsd-post-drawer__panel,html body.dsd-social-page .dsd-post-drawer__panel,html body .dsd-post-drawer__panel{background:rgba(0,0,0,.30)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.dsd-post-drawer__panel,.dsd-post-drawer__body,.dsd-post-drawer__comments{border-radius:0!important}.dsd-post-drawer .dsd-launch-comment-card,.dsd-post-drawer .dsd-launch-comment{background:transparent!important;border-left:0!important;border-right:0!important;box-shadow:none!important}.dsd-up315__identity{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:end!important;gap:12px!important}.dsd-up315__identity-copy{min-width:0!important;display:grid!important;gap:5px!important}.dsd-up315__bio{max-width:100%!important;overflow-wrap:anywhere!important}.dsd-up315__actions{grid-column:1/-1!important;align-self:start!important}.dsd-up315__cover{overflow:visible!important}.dsd-noti321__thumb{grid-row:1/span 2!important}.dsd-noti321__preview{display:flex!important;flex-wrap:wrap!important;gap:6px!important}.dsd-noti321__preview-media{display:block!important;width:54px!important;height:54px!important;border-radius:10px!important;overflow:hidden!important;background:rgba(255,255,255,.08)!important}.dsd-noti321__preview-media .dsd-media-element{width:100%!important;height:100%!important;object-fit:cover!important}@media(max-width:520px){.dsd-up315__identity{grid-template-columns:1fr!important}.dsd-up315__avatar-wrap{justify-self:start!important}.dsd-up315__actions{position:relative!important;z-index:8!important;margin-top:10px!important}.dsd-noti321__thumb{width:46px!important;height:46px!important;min-width:46px!important}}\"),\r\n        (style.textContent +=\r\n          \".dsd-post-drawer__panel,html.dsd-post-drawer-open .dsd-post-drawer__panel,html body.dsd-social-page .dsd-post-drawer__panel,html body .dsd-post-drawer__panel{background:rgba(0,0,0,.30)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}.dsd-post-drawer__body,.dsd-post-drawer__comments,.dsd-post-drawer .dsd-launch-comment{background:transparent!important;box-shadow:none!important;border-radius:0!important}\"),\r\n        (style.textContent +=\r\n          '.dsd-publication-control[data-dsd-composer-policy-inline=\"true\"] .dsd-publication-help~.dsd-publication-help{display:none!important}.dsd-canonical-composer .dsd-composer-media-actions,.dsd-story-composer-layer .dsd-composer-media-actions,.dsd-post-drawer .dsd-composer-media-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}.dsd-canonical-composer textarea,.dsd-story-composer-layer textarea,.dsd-post-drawer textarea{min-height:42px!important;resize:vertical}.dsd-up315__cover,.dsd-up353__cover{display:block!important;visibility:visible!important;opacity:1!important;min-height:clamp(190px,34vw,350px)!important;background-repeat:no-repeat!important;background-size:var(--dsd-up315-cover-size,cover)!important;background-position:var(--dsd-up315-cover-position,center 38%)!important}.dsd-profile-focal-editor{display:grid!important;gap:8px!important;width:100%!important;max-width:100%!important}.dsd-profile-focal-editor__viewport{position:relative!important;width:100%!important;border-radius:8px!important;border:1px solid rgba(255,255,255,.18)!important;background:linear-gradient(135deg,rgba(20,24,42,.92),rgba(118,83,178,.38))!important;overflow:hidden!important;touch-action:none!important;cursor:crosshair!important;display:block!important}.dsd-profile-focal-editor__viewport--banner{aspect-ratio:16/7!important}.dsd-profile-focal-editor__viewport--avatar{aspect-ratio:1/1!important;max-width:min(280px,100%)!important;border-radius:50%!important;justify-self:center!important}.dsd-profile-focal-editor__viewport img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:50% 50%;display:block!important;user-select:none!important;-webkit-user-drag:none!important}.dsd-profile-focal-editor__viewport em{position:absolute!important;left:8px!important;bottom:8px!important;padding:6px 8px!important;border-radius:999px!important;background:rgba(0,0,0,.48)!important;color:#fff!important;font-size:11px!important;line-height:1!important;font-style:normal!important}.dsd-profile-focal-editor__viewport [data-dsd-profile-focal-dot]{position:absolute!important;width:16px!important;height:16px!important;border-radius:50%!important;border:2px solid #fff!important;background:#ffe09a!important;box-shadow:0 0 0 4px rgba(0,0,0,.32)!important;transform:translate(-50%,-50%)!important;left:50%;top:50%;pointer-events:none!important}.dsd-profile-focal-editor__help{color:rgba(255,248,231,.7)!important}.dsd-banner-edit-preview{width:100%!important;aspect-ratio:16/7!important;border-radius:8px!important;background:linear-gradient(135deg,rgba(20,24,42,.92),rgba(118,83,178,.38))!important;background-repeat:no-repeat!important;background-size:cover!important;background-position:center!important;border:1px solid rgba(255,255,255,.18)!important;display:grid!important;place-items:end start!important;overflow:hidden!important}.dsd-banner-edit-preview span{padding:8px 10px!important;background:rgba(0,0,0,.42)!important;color:#fff!important;border-top-right-radius:8px!important;font-size:12px!important}[data-dsd-avatar-media-id] img{object-fit:cover!important;object-position:var(--dsd-avatar-focus-position,50% 50%)!important}.dsd-up315__body{position:relative!important;z-index:3!important}.dsd-up315__actions,.dsd-up353__actions{position:relative!important;z-index:12!important;margin-block:10px 0!important}.dsd-up315__actions .dsd-up315__action,.dsd-up353__actions .dsd-up315__action,.dsd-up315__actions button,.dsd-up353__actions button{position:relative!important;z-index:13!important}.dsd-up315__bio,.dsd-up353__bio{position:relative!important;z-index:2!important;margin-block-end:10px!important}.dsd-noti321__card .dsd-noti321__thumb{display:grid!important;visibility:visible!important;opacity:1!important}.dsd-post-card__body a:not(.dsd-profile-mention-link),.dsd-story385__caption a,.dsd-launch-comment a{color:#ffe09a!important;text-decoration:underline!important;text-underline-offset:2px}.dsd-immersive-overlay .dsd-story385__actions,[data-dsd-immersive-overlay] .dsd-story385__actions{position:fixed!important;right:calc(14px + env(safe-area-inset-right))!important;top:calc(14px + env(safe-area-inset-top))!important;z-index:2147483647!important;display:flex!important;gap:8px!important;align-items:center!important;justify-content:flex-end!important;max-width:min(360px,calc(100vw - 28px))!important;visibility:visible!important;pointer-events:auto!important}.dsd-immersive-overlay .dsd-story385__actions button,[data-dsd-immersive-overlay] .dsd-story385__actions button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:36px!important;border-radius:999px!important;border:1px solid rgba(255,255,255,.22)!important;background:rgba(0,0,0,.48)!important;color:#fff!important;padding:8px 12px!important;font-size:12px!important;line-height:1!important;backdrop-filter:blur(10px)!important;-webkit-backdrop-filter:blur(10px)!important;visibility:visible!important;pointer-events:auto!important}@media(max-width:520px){.dsd-up315__cover,.dsd-up353__cover{min-height:clamp(176px,48vw,240px)!important}.dsd-canonical-composer .dsd-composer-media-actions,.dsd-story-composer-layer .dsd-composer-media-actions{gap:6px!important}.dsd-publication-control select{max-width:118px!important}.dsd-immersive-overlay .dsd-story385__actions,[data-dsd-immersive-overlay] .dsd-story385__actions{right:calc(10px + env(safe-area-inset-right))!important;top:calc(10px + env(safe-area-inset-top))!important;max-width:calc(100vw - 20px)!important}.dsd-immersive-overlay .dsd-story385__actions button,[data-dsd-immersive-overlay] .dsd-story385__actions button{min-height:34px!important;padding:7px 10px!important;font-size:11px!important}}'),\r\n        (style.textContent +=\r\n          \".dsd-immersive-overlay [data-dsd-story-top-controls],.dsd-immersive-overlay [data-dsd-story-top-controls] .dsd-story385__actions,[data-dsd-immersive-overlay] [data-dsd-story-top-controls],[data-dsd-immersive-overlay] [data-dsd-story-top-controls] .dsd-story385__actions{width:38px!important;min-width:38px!important;max-width:38px!important}.dsd-immersive-overlay [data-dsd-story-top-controls] .dsd-story385__actions,[data-dsd-immersive-overlay] [data-dsd-story-top-controls] .dsd-story385__actions{position:relative!important;right:auto!important;top:auto!important;display:block!important;gap:0!important;align-items:stretch!important;justify-content:stretch!important;background:transparent!important;box-shadow:none!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.dsd-immersive-overlay .dsd-story385__canvas .dsd-story385__actions,[data-dsd-immersive-overlay] .dsd-story385__canvas .dsd-story385__actions,.dsd-immersive-overlay__bottom .dsd-story385__actions{display:none!important;visibility:hidden!important;pointer-events:none!important}.dsd-immersive-overlay [data-dsd-story-control-row]{display:grid!important;grid-auto-flow:column!important;grid-auto-columns:max-content!important;align-items:flex-start!important;gap:8px!important;justify-content:flex-end!important}.dsd-immersive-overlay [data-dsd-story-control-row] [data-dsd-immersive-close]{width:38px!important;height:38px!important;min-width:38px!important;max-width:38px!important;min-height:38px!important;padding:0!important;position:relative!important}.dsd-immersive-overlay [data-dsd-story-bottom-layer]{position:fixed!important;left:max(14px,env(safe-area-inset-left))!important;right:max(14px,env(safe-area-inset-right))!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;display:grid!important;gap:8px!important;max-width:min(680px,calc(100vw - 28px))!important;margin-inline:auto!important;z-index:2147483647!important}.dsd-immersive-overlay [data-dsd-story-bottom-layer] .dsd-story385__caption,.dsd-immersive-overlay [data-dsd-story-bottom-layer] .dsd-story385__link-preview,.dsd-immersive-overlay [data-dsd-story-bottom-layer] .dsd-immersive-overlay__message{position:static!important;left:auto!important;right:auto!important;bottom:auto!important;margin:0!important;width:100%!important;max-width:100%!important}\"),\r\n        (style.textContent +=\r\n          '.dsd-canonical-composer[data-dsd-canonical-compact-composer],.dsd-post-composer[data-dsd-canonical-compact-composer]{display:grid!important;gap:7px!important;padding:8px 10px!important;margin:0!important;border-radius:14px!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;background:rgba(255,255,255,.035)!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-up315__composer-head,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-up315__composer-head{display:flex!important;align-items:center!important;gap:7px!important;min-height:28px!important;margin:0!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-up315__composer-head strong,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-up315__composer-head strong{font-size:13px!important;line-height:1.1!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-up315__composer-head em,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-up315__composer-head em{display:block!important;font-size:11px!important;line-height:1.1!important;color:rgba(255,248,231,.62)!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-up315__mini-avatar,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-up315__mini-avatar{width:30px!important;height:30px!important;min-width:30px!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] textarea,.dsd-post-composer[data-dsd-canonical-compact-composer] textarea{min-height:38px!important;max-height:116px!important;padding:8px 9px!important;line-height:1.25!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-composer-media-actions,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-composer-media-actions{display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:wrap!important;min-height:32px!important;margin:0!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-composer-media-button,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-composer-media-button{width:34px!important;height:34px!important;min-width:34px!important;max-width:34px!important;padding:0!important;display:inline-grid!important;place-items:center!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-composer-media-button svg,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-composer-media-button svg{width:17px!important;height:17px!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-up315__composer-foot,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-up315__composer-foot{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-height:32px!important;margin:0!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-up315__composer-foot button,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-up315__composer-foot button{min-height:32px!important;padding:6px 12px!important;border-radius:999px!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] [data-dsd-composer-count],.dsd-post-composer[data-dsd-canonical-compact-composer] [data-dsd-composer-count]{font-size:10px!important;line-height:1!important;color:rgba(255,248,231,.56)!important}.dsd-post-drawer form[data-dsd-comment-form]{display:grid!important;gap:6px!important;padding:8px 0!important;margin:0!important;min-width:0!important;max-width:100%!important}.dsd-post-drawer form[data-dsd-comment-form] textarea{min-height:34px!important;max-height:96px!important;padding:8px 9px!important}.dsd-post-drawer form[data-dsd-comment-form] .dsd-composer-media-actions{gap:5px!important;min-height:30px!important}.dsd-post-drawer form[data-dsd-comment-form] .dsd-composer-media-button{width:32px!important;height:32px!important;min-width:32px!important;max-width:32px!important}.dsd-post-drawer__form-actions{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;min-width:0!important}.dsd-msg384__composer[data-dsd-message-form]{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important;align-items:end!important;padding:7px!important;margin:0!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}.dsd-msg384__composer[data-dsd-message-form] textarea{grid-column:1/-1!important;min-height:34px!important;max-height:92px!important;padding:8px 9px!important}.dsd-msg384__composer[data-dsd-message-form] .dsd-msg384__media-actions{grid-column:1!important;display:flex!important;gap:5px!important;min-height:30px!important}.dsd-msg384__composer[data-dsd-message-form] .dsd-composer-media-button{width:32px!important;height:32px!important;min-width:32px!important;max-width:32px!important}.dsd-msg384__composer[data-dsd-message-form]>button[type=\"submit\"]{grid-column:2!important;min-height:32px!important;padding:6px 12px!important;border-radius:999px!important}.dsd-story385__message-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important;align-items:center!important;padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;background:rgba(0,0,0,.24)!important}.dsd-story385__message-form textarea,.dsd-story385__message-form input[type=\"text\"]{min-height:34px!important;max-height:82px!important;padding:8px 9px!important}.dsd-story385__message-form button{min-height:32px!important;padding:6px 10px!important;border-radius:999px!important}@media(max-width:430px){.dsd-canonical-composer[data-dsd-canonical-compact-composer],.dsd-post-composer[data-dsd-canonical-compact-composer]{padding:7px 8px!important;gap:6px!important}.dsd-canonical-composer[data-dsd-canonical-compact-composer] .dsd-publication-control select,.dsd-post-composer[data-dsd-canonical-compact-composer] .dsd-publication-control select{max-width:112px!important}.dsd-post-drawer__form-actions button{min-height:30px!important;padding:5px 9px!important}.dsd-msg384__composer[data-dsd-message-form]{grid-template-columns:minmax(0,1fr) auto!important}}'),\r\n        (style.textContent +=\r\n          '.dsd-global-post-composer-layer:not([hidden]),.dsd-story-composer-layer:not([hidden]){position:fixed!important;inset:0!important;z-index:2147483340!important;display:grid!important;place-items:start center!important;width:100vw!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;margin:0!important;padding:calc(16px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) calc(92px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;box-sizing:border-box!important;contain:layout style!important;background:rgba(0,0,0,.28)!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-up315__modal,.dsd-story-composer-layer:not([hidden]) .dsd-up315__modal{inline-size:min(380px,calc(100vw - 28px))!important;max-inline-size:calc(100vw - 28px)!important;min-inline-size:0!important;max-block-size:calc(100dvh - 108px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;margin:0 auto!important;padding:0!important;overflow:hidden auto!important;box-sizing:border-box!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-up315__modal header,.dsd-story-composer-layer:not([hidden]) .dsd-up315__modal header{position:sticky!important;top:0!important;z-index:4!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-width:0!important;background:rgba(0,0,0,.76)!important;padding:9px 11px!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-up315__modal header strong,.dsd-story-composer-layer:not([hidden]) .dsd-up315__modal header strong{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-up315__modal-panel,.dsd-story-composer-layer:not([hidden]) .dsd-up315__modal-panel,.dsd-global-post-composer-layer:not([hidden]) .dsd-up315__modal-card,.dsd-story-composer-layer:not([hidden]) .dsd-up315__modal-card,.dsd-global-post-composer-layer:not([hidden]) form,.dsd-story-composer-layer:not([hidden]) form{inline-size:100%!important;max-inline-size:100%!important;min-inline-size:0!important;overflow-x:hidden!important;box-sizing:border-box!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-up315__modal-card,.dsd-story-composer-layer:not([hidden]) .dsd-up315__modal-card{padding:8px!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-post-composer,.dsd-global-post-composer-layer:not([hidden]) .dsd-canonical-composer,.dsd-story-composer-layer:not([hidden]) [data-dsd-story-form]{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;inline-size:100%!important;max-inline-size:100%!important;min-inline-size:0!important;overflow:visible!important}.dsd-global-post-composer-layer:not([hidden]) textarea,.dsd-story-composer-layer:not([hidden]) textarea{display:block!important;inline-size:100%!important;max-inline-size:100%!important;min-inline-size:0!important;min-height:38px!important;max-height:112px!important;box-sizing:border-box!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-composer-media-actions,.dsd-story-composer-layer:not([hidden]) .dsd-composer-media-actions{display:grid!important;grid-template-columns:34px 34px minmax(0,1fr)!important;align-items:center!important;gap:6px!important;inline-size:100%!important;max-inline-size:100%!important;min-inline-size:0!important;overflow:visible!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-composer-media-button,.dsd-story-composer-layer:not([hidden]) .dsd-composer-media-button{width:34px!important;height:34px!important;min-width:34px!important;max-width:34px!important;padding:0!important;display:inline-grid!important;place-items:center!important;overflow:hidden!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-composer-media-button svg,.dsd-story-composer-layer:not([hidden]) .dsd-composer-media-button svg{width:17px!important;height:17px!important;display:block!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-composer-policy-tools,.dsd-story-composer-layer:not([hidden]) .dsd-composer-policy-tools{display:flex!important;flex-wrap:wrap!important;min-inline-size:0!important;max-inline-size:100%!important;overflow:visible!important;align-items:center!important;gap:6px!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-publication-control,.dsd-story-composer-layer:not([hidden]) .dsd-publication-control{display:grid!important;grid-template-columns:minmax(0,1fr) 28px!important;gap:5px!important;align-items:center!important;min-inline-size:0!important;max-inline-size:100%!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-publication-control select,.dsd-story-composer-layer:not([hidden]) .dsd-publication-control select{inline-size:100%!important;max-inline-size:100%!important;min-inline-size:0!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-publication-help,.dsd-story-composer-layer:not([hidden]) .dsd-publication-help{width:28px!important;height:28px!important;min-width:28px!important;display:inline-grid!important;place-items:center!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-up315__composer-foot,.dsd-story-composer-layer:not([hidden]) .dsd-up315__composer-foot{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;max-width:100%!important;min-width:0!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-up315__composer-foot button,.dsd-story-composer-layer:not([hidden]) .dsd-up315__composer-foot button{max-width:100%!important;white-space:nowrap!important}.dsd-up315__composer-foot [data-dsd-composer-count]{font-size:10px!important;color:rgba(255,248,231,.68)!important}.dsd-noti321__card[data-notification-compact=\"true\"]{display:grid!important;grid-template-columns:42px minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;padding:8px 2px!important;border-radius:0!important}.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__content{display:grid!important;gap:2px!important;min-width:0!important}.dsd-noti321__card[data-notification-compact=\"true\"] strong{font-size:14px!important;line-height:1.2!important;white-space:normal!important}.dsd-noti321__card[data-notification-compact=\"true\"] p{margin:1px 0 0!important;font-size:12px!important;line-height:1.25!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}.dsd-noti321__card[data-notification-compact=\"true\"] small,.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__actor{font-size:11px!important;line-height:1.15!important;color:rgba(255,248,231,.62)!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__badge{align-self:start!important;font-size:10px!important;padding:3px 6px!important;border-radius:999px!important;max-width:86px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}@media(max-width:430px){.dsd-global-post-composer-layer:not([hidden]) .dsd-up315__modal,.dsd-story-composer-layer:not([hidden]) .dsd-up315__modal{inline-size:calc(100vw - 28px)!important;max-inline-size:calc(100vw - 28px)!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-composer-media-actions,.dsd-story-composer-layer:not([hidden]) .dsd-composer-media-actions{grid-template-columns:34px 34px!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-composer-policy-tools,.dsd-story-composer-layer:not([hidden]) .dsd-composer-policy-tools{grid-column:1/-1!important;inline-size:100%!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-up315__composer-foot,.dsd-story-composer-layer:not([hidden]) .dsd-up315__composer-foot{grid-template-columns:1fr!important;gap:7px!important}.dsd-global-post-composer-layer:not([hidden]) .dsd-up315__composer-foot button,.dsd-story-composer-layer:not([hidden]) .dsd-up315__composer-foot button{width:100%!important}.dsd-noti321__card[data-notification-compact=\"true\"]{grid-template-columns:38px minmax(0,1fr)!important}.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__badge{grid-column:2!important;justify-self:start!important}}'),\r\n        (style.textContent +=\r\n          '.dsd-post-card__author-row{display:flex!important;align-items:center!important;gap:7px!important;min-width:0!important;max-width:100%!important}.dsd-post-card__author-row strong{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.dsd-post-card__author-row .dsd-post-author-follow-action{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;min-height:24px!important;padding:4px 8px!important;border:1px solid rgba(240,196,108,.42)!important;border-radius:999px!important;background:rgba(240,196,108,.12)!important;color:#ffe09a!important;font:900 10px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif!important;white-space:nowrap!important}.dsd-post-card__author-row .dsd-post-author-follow-label{display:inline!important;position:static!important;width:auto!important;height:auto!important;clip:auto!important;clip-path:none!important;overflow:visible!important;visibility:visible!important;opacity:1!important;white-space:nowrap!important;margin:0!important}@media(max-width:430px){.dsd-post-card__author-row{gap:5px!important}.dsd-post-card__author-row .dsd-post-author-follow-action{min-height:22px!important;padding:3px 7px!important;font-size:9px!important}}'),\r\n        (style.textContent +=\r\n          '.dsd-noti321__card[data-notification-compact=\"true\"]{grid-template-columns:42px minmax(0,1fr) auto!important;column-gap:9px!important;row-gap:3px!important}.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__thumb{grid-row:1!important;align-self:start!important;display:grid!important;place-items:center!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;max-width:42px!important;max-height:42px!important;aspect-ratio:1/1!important;border-radius:50%!important;overflow:hidden!important}.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__thumb img,.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__thumb .dsd-media-element{display:block!important;width:100%!important;height:100%!important;min-width:100%!important;min-height:100%!important;max-width:100%!important;max-height:100%!important;aspect-ratio:1/1!important;border-radius:50%!important;object-fit:cover!important}.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__content{align-self:start!important;align-content:start!important;row-gap:1px!important}.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__content>strong,.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__actor{display:block!important;margin:0!important;padding:0!important}.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__actor{margin-top:1px!important}@media(max-width:430px){.dsd-noti321__card[data-notification-compact=\"true\"]{grid-template-columns:42px minmax(0,1fr)!important}.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__badge{grid-column:2!important}}'),\r\n        (style.textContent +=\r\n          '.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__thumb{position:relative!important}.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__thumb img,.dsd-noti321__card[data-notification-compact=\"true\"] .dsd-noti321__thumb .dsd-media-element{position:absolute!important;inset:0!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;max-width:42px!important;max-height:42px!important}'),\r\n        (style.textContent +=\r\n          '.dsd-story385__tray-card[data-dsd-view-story] .dsd-story385__avatar,.dsd-story385__tray-card[data-dsd-view-story] .dsd-story385__poster{border:0!important;outline:0!important;box-shadow:none!important}.dsd-story385__tray-card[data-dsd-view-story]:not(.is-viewed):not([data-dsd-story-viewed=\"true\"]) .dsd-story385__avatar:after,.dsd-story385__tray-card[data-dsd-view-story]:not(.is-viewed):not([data-dsd-story-viewed=\"true\"]) .dsd-story385__poster:after{content:none!important;display:none!important}.dsd-post-drawer__comments{grid-auto-rows:max-content!important;align-content:start!important}.dsd-post-drawer .dsd-launch-comment{grid-template-rows:max-content!important;height:max-content!important;min-height:max-content!important;align-items:start!important;overflow:visible!important}.dsd-post-drawer .dsd-launch-comment__body{display:grid!important;grid-template-rows:max-content!important;align-content:start!important;gap:6px!important;min-width:0!important;min-height:max-content!important;height:max-content!important;overflow:visible!important}.dsd-launch-comment-media-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))!important;grid-auto-rows:max-content!important;align-items:start!important;gap:8px!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:max-content!important;overflow:visible!important}.dsd-post-drawer .dsd-launch-comment-media{display:grid!important;place-items:center!important;width:100%!important;max-width:100%!important;min-width:0!important;aspect-ratio:var(--dsd-media-aspect,4/3)!important;height:auto!important;min-height:120px!important;max-height:420px!important;margin:0!important;overflow:hidden!important;border-radius:10px!important;background:rgba(0,0,0,.18)!important}.dsd-post-drawer .dsd-launch-comment-media .dsd-media-frame,.dsd-post-drawer .dsd-launch-comment-media img,.dsd-post-drawer .dsd-launch-comment-media video{display:block!important;width:100%!important;max-width:100%!important;height:100%!important;max-height:420px!important;object-fit:contain!important;margin:0 auto!important}.dsd-post-card__badges{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:5px!important}.dsd-post-audience-badge{display:inline-grid!important;place-items:center!important;flex:0 0 auto!important;min-width:24px!important;height:24px!important;padding:0 6px!important;border:1px solid rgba(240,196,108,.28)!important;border-radius:999px!important;background:rgba(255,255,255,.06)!important;color:#ffe09a!important;font:900 9px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif!important}.dsd-post-audience-badge--private{color:#d7c6ff!important}.dsd-post-audience-badge--mature,.dsd-post-audience-badge--explicit{color:#ffcf9d!important}.dsd-post-audience-badge--gated{color:#f7d889!important}@media(max-width:430px){.dsd-launch-comment-media-grid{grid-template-columns:minmax(0,1fr)!important}.dsd-post-drawer .dsd-launch-comment-media{min-height:96px!important;max-height:340px!important}.dsd-post-drawer .dsd-launch-comment-media .dsd-media-frame,.dsd-post-drawer .dsd-launch-comment-media img,.dsd-post-drawer .dsd-launch-comment-media video{max-height:340px!important}}'),\r\n        (style.textContent +=\r\n          '.dsd-launch-comment-media-grid[data-dsd-media-count]:not([data-dsd-media-count=\"1\"]){grid-auto-flow:row!important;gap:2px!important;align-items:start!important;overflow-x:hidden!important;overflow-y:hidden!important;scroll-snap-type:none!important}.dsd-launch-comment-media-grid[data-dsd-media-count=\"2\"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}.dsd-launch-comment-media-grid[data-dsd-media-count=\"3\"]{grid-template-columns:repeat(3,minmax(0,1fr))!important}.dsd-launch-comment-media-grid[data-dsd-media-count=\"4\"]{grid-template-columns:repeat(4,minmax(0,1fr))!important}.dsd-launch-comment-media-grid[data-dsd-media-count]:not([data-dsd-media-count=\"1\"])>.dsd-launch-comment-media{grid-row:auto!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:var(--dsd-media-aspect,4/3)!important;margin-top:0!important;padding:0!important;background:transparent!important;cursor:zoom-in!important}.dsd-launch-comment-media-grid[data-dsd-media-count]:not([data-dsd-media-count=\"1\"])>.dsd-launch-comment-media img,.dsd-launch-comment-media-grid[data-dsd-media-count]:not([data-dsd-media-count=\"1\"])>.dsd-launch-comment-media video{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:none!important;margin:0!important;object-fit:contain!important}@media(max-width:760px){.dsd-launch-comment-media-grid[data-dsd-media-count]:not([data-dsd-media-count=\"1\"]){grid-template-columns:none!important;grid-template-rows:none!important;grid-auto-flow:column!important;grid-auto-columns:calc(66.6667% - 1px)!important;gap:2px!important;overflow-x:auto!important;overscroll-behavior-x:contain!important;scroll-snap-type:x mandatory!important;scroll-behavior:smooth!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important}.dsd-launch-comment-media-grid[data-dsd-media-count]:not([data-dsd-media-count=\"1\"])::-webkit-scrollbar{display:none!important}.dsd-launch-comment-media-grid[data-dsd-media-count]:not([data-dsd-media-count=\"1\"])>.dsd-launch-comment-media{min-width:100%!important;scroll-snap-align:start!important;scroll-snap-stop:always!important}}'),\r\n        (style.textContent +=\r\n          'html.dsd-social-route body .dsd-post-card>.dsd-launch-actions,body.dsd-social-page .dsd-post-card>.dsd-launch-actions{display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;overflow:visible!important}html.dsd-social-route body .dsd-post-card>.dsd-launch-actions>button,html.dsd-social-route body .dsd-post-card>.dsd-launch-actions>.dsd-launch-action,html.dsd-social-route body .dsd-post-card>.dsd-launch-actions>details,body.dsd-social-page .dsd-post-card>.dsd-launch-actions>button,body.dsd-social-page .dsd-post-card>.dsd-launch-actions>.dsd-launch-action,body.dsd-social-page .dsd-post-card>.dsd-launch-actions>details{visibility:visible!important;opacity:1!important;pointer-events:auto!important}html.dsd-social-route body .dsd-post-card>.dsd-launch-actions [data-dsd-action=\"comment\"],body.dsd-social-page .dsd-post-card>.dsd-launch-actions [data-dsd-action=\"comment\"]{display:inline-flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}'),\r\n        (style.textContent +=\r\n          \"[data-dsd-profile-modal-layer]:not([hidden]){position:fixed!important;inset:0!important;display:grid!important;place-items:center!important;padding:20px!important}.dsd-up315__modal-dialog{position:relative!important;z-index:1!important;width:min(560px,calc(100vw - 40px))!important;max-width:calc(100vw - 40px)!important;max-height:calc(100dvh - 40px)!important;box-sizing:border-box!important}.dsd-up315__modal-dialog .dsd-up315__modal-panel,.dsd-up315__modal-dialog form{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important}@media(max-width:760px){[data-dsd-profile-modal-layer]:not([hidden]){place-items:start center!important;padding:calc(10px + env(safe-area-inset-top)) 10px calc(94px + env(safe-area-inset-bottom))!important}.dsd-up315__modal-dialog{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 104px)!important;padding:16px!important;border-radius:20px!important}}\"),\r\n        (style.textContent +=\r\n          '.dsd-composer-media-button{position:relative!important;overflow:hidden!important}.dsd-composer-media-button input[type=\"file\"]{position:absolute!important;inline-size:1px!important;block-size:1px!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;pointer-events:none!important}.dsd-composer-media-button.is-disabled,.dsd-composer-media-button[aria-disabled=\"true\"]{opacity:.46!important;filter:saturate(.65)!important;cursor:not-allowed!important}.dsd-composer-media-button.is-disabled svg,.dsd-composer-media-button[aria-disabled=\"true\"] svg{opacity:.72!important}.dsd-composer-media-policy-status{display:block!important;box-sizing:border-box!important;max-width:100%!important;margin:2px 0 0!important;color:rgba(255,248,231,.68)!important;font:800 11px/1.25 system-ui,-apple-system,\"Segoe UI\",sans-serif!important;letter-spacing:0!important;overflow-wrap:anywhere!important}.dsd-composer-media-actions+.dsd-composer-media-policy-status{flex-basis:100%!important;width:100%!important;max-width:100%!important}'),\r\n        (style.textContent +=\r\n          'html.dsd-post-drawer-open footer,html.dsd-post-drawer-open main#MainContent~.shopify-section,html.dsd-post-drawer-open main#MainContent~[id^=\"shopify-section\"],html.dsd-post-drawer-open .shopify-section-footer,html.dsd-post-drawer-open [id*=\"shopify-section-footer\"],html.dsd-post-drawer-open .newsletter,html.dsd-post-drawer-open [class*=\"newsletter\"]{display:none!important;visibility:hidden!important;pointer-events:none!important}html.dsd-post-drawer-open .dsd-post-drawer{position:fixed!important;inset:0!important;display:grid!important;place-items:stretch!important;overflow:hidden!important}html.dsd-post-drawer-open .dsd-post-drawer__panel,html.dsd-post-drawer-open body.dsd-social-page .dsd-post-drawer__panel{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;border:0!important;background:rgba(0,0,0,.62)!important;box-shadow:none!important}html.dsd-post-drawer-open .dsd-post-drawer__body{max-height:none!important;min-height:0!important;overflow-y:auto!important}.dsd-composer-media-policy-status[data-dsd-media-policy-compact=\"sr-only\"]{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;background:transparent!important}'),\n        (style.textContent +=\r\n          'html.dsd-post-drawer-open .dsd-compact-dock,html.dsd-post-drawer-open nav.dsd-compact-dock,html.dsd-post-drawer-open .dsd-dock,html.dsd-post-drawer-open [class*=\"dsd\"][class*=\"dock\"],html.dsd-post-drawer-open [data-dsd-dock-icon],html.dsd-post-drawer-open [data-dsd-owner=\"CompactCommerceNavigation\"],html.dsd-post-drawer-open [data-dsd-floating-menu-toggle],html.dsd-post-drawer-open [data-dsd-menu-toggle],html.dsd-post-drawer-open [data-dsd-menu-layer],html.dsd-post-drawer-open [data-dsd-floating-menu-root]{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;z-index:1!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"]{position:fixed!important;inset:0!important;display:grid!important;grid-template-rows:minmax(0,1fr)!important;background:rgba(0,0,0,.72)!important;overflow:hidden!important;isolation:isolate!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__backdrop{background:rgba(0,0,0,.72)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__panel{position:relative!important;z-index:1!important;display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important;border:0!important;border-radius:0!important;background:rgba(0,0,0,.74)!important;box-shadow:none!important;overflow:hidden!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__panel>header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-height:42px!important;padding:calc(8px + env(safe-area-inset-top)) 12px 8px!important;border-bottom:1px solid rgba(255,255,255,.10)!important;background:rgba(0,0,0,.84)!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__panel>header strong{display:flex!important;align-items:center!important;gap:7px!important;font-size:14px!important;line-height:1.1!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__panel>header span{font-size:11px!important;line-height:1!important;color:rgba(255,248,231,.66)!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__body{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;gap:0!important;min-height:0!important;max-height:none!important;height:100%!important;overflow:hidden!important;background:transparent!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__post-summary{display:grid!important;grid-template-columns:34px minmax(0,1fr) minmax(56px,88px)!important;align-items:start!important;gap:8px!important;min-height:0!important;max-height:132px!important;overflow:hidden!important;padding:8px 10px!important;border-bottom:1px solid rgba(255,255,255,.08)!important;background:rgba(255,255,255,.035)!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__post-summary>div{min-width:0!important;display:grid!important;gap:2px!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__post-summary p{margin:1px 0 0!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;font-size:12px!important;line-height:1.25!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__post-media{width:100%!important;height:64px!important;max-height:64px!important;align-self:start!important;overflow:hidden!important;border-radius:8px!important;background:rgba(255,255,255,.06)!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__comments{min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important;padding:4px 10px 8px!important;background:transparent!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-launch-comment{display:grid!important;grid-template-columns:30px minmax(0,1fr) auto!important;gap:7px!important;align-items:start!important;padding:7px 0!important;border:0!important;border-bottom:1px solid rgba(255,255,255,.08)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-launch-comment__meta{display:flex!important;align-items:center!important;gap:5px!important;flex-wrap:wrap!important;font-size:11px!important;line-height:1.15!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-launch-comment p{margin:2px 0 0!important;font-size:13px!important;line-height:1.28!important}.dsd-post-drawer .dsd-comment-action-menu{position:relative!important;align-self:start!important}.dsd-post-drawer .dsd-comment-action-menu summary{display:grid!important;place-items:center!important;width:28px!important;height:28px!important;border-radius:50%!important;border:1px solid rgba(255,255,255,.14)!important;background:rgba(255,255,255,.07)!important;color:#fff!important;list-style:none!important}.dsd-post-drawer .dsd-comment-action-menu summary::-webkit-details-marker{display:none!important}.dsd-post-drawer .dsd-comment-action-menu__panel{position:absolute!important;right:0!important;top:calc(100% + 5px)!important;z-index:4!important;display:grid!important;gap:4px!important;min-width:118px!important;padding:6px!important;border:1px solid rgba(255,255,255,.14)!important;border-radius:10px!important;background:rgba(0,0,0,.86)!important}.dsd-post-drawer .dsd-comment-action-menu:not([open]) .dsd-comment-action-menu__panel{display:none!important}.dsd-post-drawer .dsd-comment-action-menu__panel button{display:flex!important;justify-content:flex-start!important;width:100%!important;min-height:30px!important;padding:6px 8px!important;border-radius:8px!important;background:rgba(255,255,255,.07)!important;color:#fff!important;border:1px solid rgba(255,255,255,.10)!important;font-size:11px!important}html.dsd-post-drawer-open form[data-dsd-comment-composer-contract=\"compact-sticky\"]{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important;align-items:end!important;position:sticky!important;bottom:0!important;z-index:3!important;padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;margin:0!important;min-width:0!important;max-width:100%!important;border-top:1px solid rgba(255,255,255,.10)!important;background:rgba(0,0,0,.88)!important;box-shadow:none!important}html.dsd-post-drawer-open form[data-dsd-comment-composer-contract=\"compact-sticky\"] textarea{grid-column:1/-1!important;min-height:32px!important;max-height:86px!important;padding:7px 9px!important;resize:none!important;border-radius:12px!important}html.dsd-post-drawer-open form[data-dsd-comment-composer-contract=\"compact-sticky\"] .dsd-composer-media-actions{grid-column:1!important;display:flex!important;gap:5px!important;min-height:30px!important;max-width:100%!important;overflow:hidden!important}html.dsd-post-drawer-open form[data-dsd-comment-composer-contract=\"compact-sticky\"] .dsd-composer-media-button{width:30px!important;height:30px!important;min-width:30px!important;max-width:30px!important;padding:0!important}html.dsd-post-drawer-open form[data-dsd-comment-composer-contract=\"compact-sticky\"] .dsd-post-drawer__form-actions{grid-column:2!important;display:flex!important;align-items:center!important;gap:6px!important;justify-content:flex-end!important}html.dsd-post-drawer-open form[data-dsd-comment-composer-contract=\"compact-sticky\"] [data-dsd-composer-count]{font-size:10px!important;color:rgba(255,248,231,.58)!important;white-space:nowrap!important}html.dsd-post-drawer-open form[data-dsd-comment-composer-contract=\"compact-sticky\"] button[type=\"submit\"]{min-height:30px!important;padding:5px 10px!important;border-radius:999px!important}@media(max-width:430px){html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__post-summary{grid-template-columns:30px minmax(0,1fr) 64px!important;max-height:118px!important;padding:7px 8px!important}html.dsd-post-drawer-open form[data-dsd-comment-composer-contract=\"compact-sticky\"]{grid-template-columns:minmax(0,1fr) auto!important;padding-inline:7px!important}html.dsd-post-drawer-open form[data-dsd-comment-composer-contract=\"compact-sticky\"] [data-dsd-composer-count]{display:none!important}}'),\r\n        (style.textContent +=\r\n          'html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__post-summary{grid-template-columns:34px minmax(0,1fr)!important;grid-template-rows:auto auto!important;max-height:min(34dvh,260px)!important;overflow:auto!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__post-media{grid-column:1/-1!important;width:100%!important;height:auto!important;min-height:96px!important;max-height:min(24dvh,210px)!important;aspect-ratio:16/9!important;overflow:hidden!important}html.dsd-post-drawer-open .dsd-post-drawer__post-media .dsd-media-frame,html.dsd-post-drawer-open .dsd-post-drawer__post-media img,html.dsd-post-drawer-open .dsd-post-drawer__post-media video{display:block!important;width:100%!important;height:100%!important;max-height:min(24dvh,210px)!important;object-fit:contain!important}@media(max-width:430px){html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__post-summary{grid-template-columns:30px minmax(0,1fr)!important;max-height:min(32dvh,235px)!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__post-media{min-height:88px!important;max-height:min(21dvh,180px)!important}html.dsd-post-drawer-open .dsd-post-drawer__post-media .dsd-media-frame,html.dsd-post-drawer-open .dsd-post-drawer__post-media img,html.dsd-post-drawer-open .dsd-post-drawer__post-media video{max-height:min(21dvh,180px)!important}}'),\r\n        document.head.appendChild(style));\r\n    }\r\n  }\n  function installGlobalOverlayLayerContractStyles() {\n    var style = document.getElementById(\r\n        \"dsd-global-overlay-layer-contract-p11dz686\",\r\n      ),\r\n      css = [\r\n        \":root{--dsd-layer-page:0;--dsd-layer-sticky:1000;--dsd-layer-dock:2147482900;--dsd-layer-menu-button:2147482910;--dsd-layer-backdrop:2147483300;--dsd-layer-drawer:2147483400;--dsd-layer-modal:2147483500;--dsd-layer-critical-overlay:2147483600}\",\r\n        \"html[data-dsd-overlay-open],html[data-dsd-overlay-open] body{overflow:hidden!important;overscroll-behavior:none!important}\",\r\n        'html[data-dsd-overlay-open] footer,html[data-dsd-overlay-open] main#MainContent~.shopify-section,html[data-dsd-overlay-open] main#MainContent~[id^=\"shopify-section\"],html[data-dsd-overlay-open] .shopify-section-footer,html[data-dsd-overlay-open] [id*=\"shopify-section-footer\"],html[data-dsd-overlay-open] .newsletter,html[data-dsd-overlay-open] [class*=\"newsletter\"]{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;z-index:var(--dsd-layer-page)!important}',\r\n        'html[data-dsd-overlay-open] .dsd-floating-menu-toggle,html[data-dsd-overlay-open] [data-dsd-floating-menu-toggle],html[data-dsd-overlay-open] [data-dsd-menu-toggle],html[data-dsd-overlay-open] .dsd-compact-dock,html[data-dsd-overlay-open] nav.dsd-compact-dock,html[data-dsd-overlay-open] [data-dsd-owner=\"CompactCommerceNavigation\"],html[data-dsd-overlay-open] [data-dsd-dock-icon]{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;z-index:var(--dsd-layer-page)!important}',\r\n        \".dsd-overlay-root{position:fixed!important;inset:0!important;z-index:var(--dsd-layer-modal)!important;display:none!important;pointer-events:none!important;isolation:isolate!important}\",\r\n        \"html[data-dsd-overlay-open] .dsd-overlay-root,html.dsd-immersive-overlay-open .dsd-overlay-root{display:flex!important}\",\r\n        \".dsd-overlay-root .dsd-overlay,.dsd-overlay-root>[data-dsd-connection-shuffle-layer]{pointer-events:auto!important;z-index:var(--dsd-layer-critical-overlay)!important}\",\n        \"@media(max-width:760px){html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__conversation,html.dsd-message-drawer-open .dsd-msg384__conversation,html.dsd-message-drawer-open [data-dsd-msg384-summary]{position:fixed!important;z-index:var(--dsd-layer-drawer)!important;isolation:isolate!important;pointer-events:auto!important}}\",\r\n        \"html.dsd-post-drawer-open .dsd-post-drawer,html.dsd-post-drawer-open [data-dsd-post-drawer-root]{position:fixed!important;inset:0!important;z-index:var(--dsd-layer-drawer)!important;isolation:isolate!important;pointer-events:auto!important}\",\r\n        \"[data-dsd-profile-modal-layer]:not([hidden]),[data-dsd-story-composer-layer]:not([hidden]),[data-dsd-global-post-composer-layer]:not([hidden]),[data-dsd-share-composer-layer]:not([hidden]),[data-dsd-universal-search-layer]:not([hidden]),[data-dsd-report-modal-layer]:not([hidden]){position:fixed!important;inset:0!important;z-index:var(--dsd-layer-modal)!important;isolation:isolate!important;pointer-events:auto!important}\",\n        '[data-dsd-report-modal-layer]{font-family:Georgia,\"Times New Roman\",serif;color:#fff8da}[data-dsd-report-modal-layer]:not([hidden]){display:grid!important;place-items:center!important;padding:12px!important;box-sizing:border-box!important}[data-dsd-report-modal-layer][hidden]{display:none!important}.dsd-report-modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.78)}.dsd-report-modal__panel{position:relative;z-index:1;width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px);margin:0;overflow:auto;border:1px solid rgba(240,196,108,.38);border-radius:8px;background:#080b14;box-shadow:0 18px 70px rgba(0,0,0,.62);padding:18px}.dsd-report-modal__panel header,.dsd-report-modal__actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.dsd-report-modal__panel header span{display:block;color:#f0c46c;font-size:11px;font-weight:700}.dsd-report-modal__panel h2{margin:2px 0 0;font-size:22px}.dsd-report-modal__panel header>button{width:36px;height:36px;border-radius:50%;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.07);color:#fff8da;font-size:24px}.dsd-report-modal__target{display:grid;gap:3px;margin:14px 0;padding:10px;border:1px solid rgba(255,255,255,.1);border-radius:6px;background:rgba(255,255,255,.04)}.dsd-report-modal__target strong{color:#f0c46c;text-transform:capitalize}.dsd-report-modal__target span{font-size:13px;overflow-wrap:anywhere}.dsd-report-modal__panel form,.dsd-report-modal__panel label{display:grid;gap:7px}.dsd-report-modal__panel form{gap:13px}.dsd-report-modal__panel label>span{font-size:12px;font-weight:700}.dsd-report-modal__panel select,.dsd-report-modal__panel textarea,.dsd-report-modal__panel input{box-sizing:border-box;width:100%;max-width:100%;border:1px solid rgba(255,255,255,.16);border-radius:6px;background:#111827;color:#fff8da;padding:10px;font:16px/1.35 Georgia,\"Times New Roman\",serif}.dsd-report-modal__panel textarea{resize:vertical}[data-dsd-report-attachment-preview]{display:grid;gap:8px;margin-top:8px}[data-dsd-report-attachment-preview] img,[data-dsd-report-attachment-preview] video{display:block;width:100%;max-height:220px;object-fit:contain;border-radius:6px;background:#03050a}[data-dsd-report-attachment-preview] button{justify-self:start;min-height:36px;border:1px solid rgba(240,196,108,.3);border-radius:999px;background:rgba(255,255,255,.06);color:#fff8da;padding:7px 12px}.dsd-report-modal__panel [data-dsd-report-modal-status]{min-height:18px;margin:0;color:#f0c46c;font-size:12px}.dsd-report-modal__actions{justify-content:flex-end}.dsd-report-modal__actions button{min-height:38px;border:1px solid rgba(240,196,108,.3);border-radius:999px;background:rgba(255,255,255,.06);color:#fff8da;padding:8px 14px;font-weight:700}.dsd-report-modal__actions button[type=\"submit\"]{background:#f0c46c;color:#111827}@media(max-width:600px){[data-dsd-report-modal-layer]:not([hidden]){place-items:end center!important;padding:0!important}.dsd-report-modal__panel{width:100vw;max-height:calc(100dvh - env(safe-area-inset-top));border-radius:8px 8px 0 0;padding:16px 14px calc(16px + env(safe-area-inset-bottom))}}',\n        \".dsd-overlay-root:empty,html[data-dsd-overlay-open] .dsd-overlay-root:empty{pointer-events:none!important}\",\r\n        'html.dsd-immersive-overlay-open .dsd-overlay-root,html.dsd-immersive-overlay-open [data-dsd-immersive-overlay-root],html.dsd-immersive-overlay-open [data-dsd-immersive-overlay],.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"]{position:fixed!important;inset:0!important;z-index:var(--dsd-layer-critical-overlay)!important;isolation:isolate!important;pointer-events:auto!important}',\r\n        \"html[data-dsd-overlay-open] #MainContent{pointer-events:none!important}\",\r\n        \"html[data-dsd-overlay-open] .dsd-overlay-root,html[data-dsd-overlay-open] [data-dsd-post-drawer-root],html[data-dsd-overlay-open] [data-dsd-profile-modal-layer],html[data-dsd-overlay-open] [data-dsd-story-composer-layer],html[data-dsd-overlay-open] [data-dsd-global-post-composer-layer],html[data-dsd-overlay-open] [data-dsd-share-composer-layer],html[data-dsd-overlay-open] [data-dsd-universal-search-layer],html[data-dsd-overlay-open] [data-dsd-report-modal-layer],html[data-dsd-overlay-open] [data-dsd-immersive-overlay]{pointer-events:auto!important}\",\n      ].join(\"\");\r\n    (style ||\r\n      ((style = document.createElement(\"style\")),\r\n      (style.id = \"dsd-global-overlay-layer-contract-p11dz686\"),\r\n      document.head.appendChild(style)),\r\n      style.textContent !== css && (style.textContent = css),\r\n      scheduleGlobalOverlayStateSync());\r\n  }\r\n  function installMessageLayoutSprintStyles() {\r\n    var legacy = document.getElementById(\"dsd-message-layout-sprint-p11dz686\");\r\n    legacy && legacy.parentNode && legacy.parentNode.removeChild(legacy);\r\n  }\r\n  function installMessageViewportProofBadge() {\r\n    var params;\r\n    try {\r\n      params = new URLSearchParams(window.location.search || \"\");\r\n    } catch (e) {\r\n      return;\r\n    }\r\n    if (params.get(\"messageViewportProof\") === \"1\") {\r\n      var badge = document.getElementById(\r\n        \"dsd-message-viewport-proof-p11dz686\",\r\n      );\r\n      badge ||\r\n        ((badge = document.createElement(\"output\")),\r\n        (badge.id = \"dsd-message-viewport-proof-p11dz686\"),\r\n        badge.setAttribute(\"aria-live\", \"polite\"),\r\n        (badge.style.cssText =\r\n          \"position:fixed;left:max(6px,env(safe-area-inset-left));top:calc(4px + env(safe-area-inset-top));z-index:2147483647;max-width:calc(100vw - 12px);padding:4px 6px;border:1px solid rgba(255,223,157,.42);border-radius:6px;background:rgba(0,0,0,.82);color:#fff8da;font:700 9px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre;pointer-events:none;\"),\r\n        (document.body || document.documentElement).appendChild(badge));\r\n      var readWidth = function (selector) {\r\n          var node = document.querySelector(selector);\r\n          return node ? Math.round(node.getBoundingClientRect().width) : 0;\r\n        },\r\n        update = function () {\r\n          var viewportWidth = window.visualViewport\r\n            ? Math.round(window.visualViewport.width)\r\n            : Math.round(window.innerWidth || 0);\r\n          badge.textContent = [\r\n            \"innerWidth: \" + Math.round(window.innerWidth || 0),\r\n            \"clientWidth: \" +\r\n              Math.round(document.documentElement.clientWidth || 0),\r\n            \"visualViewport: \" + viewportWidth,\r\n            \"shell width: \" + readWidth(\".dsd-msg384__shell\"),\r\n            \"layout width: \" + readWidth(\".dsd-msg384__layout\"),\r\n            \"conversation width: \" + readWidth(\".dsd-msg384__conversation\"),\r\n            \"composer width: \" + readWidth(\".dsd-msg384__composer\"),\r\n            \"active breakpoint: \" +\r\n              (window.matchMedia &&\r\n              window.matchMedia(\"(max-width:760px)\").matches\r\n                ? \"mobile <=760\"\r\n                : \"desktop >760\"),\r\n          ].join(\"\\n\");\r\n        };\r\n      if (\r\n        (update(),\r\n        window.addEventListener(\"resize\", update, { passive: !0 }),\r\n        window.visualViewport &&\r\n          (window.visualViewport.addEventListener(\"resize\", update, {\r\n            passive: !0,\r\n          }),\r\n          window.visualViewport.addEventListener(\"scroll\", update, {\r\n            passive: !0,\r\n          })),\r\n        window.MutationObserver)\r\n      ) {\r\n        var root = document.querySelector(\"[data-dsd-msg384]\");\r\n        root &&\r\n          new MutationObserver(update).observe(root, {\r\n            attributes: !0,\r\n            attributeFilter: [\"data-dsd-msg384-drawer-open\"],\r\n          });\r\n      }\r\n      (window.setTimeout(update, 500), window.setTimeout(update, 1800));\r\n    }\r\n  }\r\n  function installCurrentGateClosureStyles() {\r\n    var css = [\r\n        \"[data-dsd-user-profile],.dsd-up315,.dsd-up353,.dsd-up315__shell,.dsd-up353__shell{margin-top:0!important;padding-top:0!important}\",\r\n        '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"][data-dsd-immersive-mode=\"post-media\"] [data-dsd-immersive-close]{display:grid!important;visibility:visible!important;pointer-events:auto!important}',\r\n        \".shopify-section:has([data-dsd-user-profile]){margin-top:0!important;padding-top:0!important}\",\r\n        \".dsd-immersive-overlay__top{position:fixed!important;left:0!important;right:0!important;top:0!important;bottom:auto!important;z-index:2147483647!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;justify-content:stretch!important;gap:8px!important;padding:calc(18px + env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 38px max(10px,env(safe-area-inset-left))!important;background:linear-gradient(180deg,rgba(0,0,0,.42),rgba(0,0,0,.10) 66%,rgba(0,0,0,0))!important;pointer-events:none!important}.dsd-immersive-overlay__context{max-width:min(420px,calc(100vw - 86px))!important}\",\r\n        '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"]{background:#000!important;overflow:hidden!important}html.dsd-immersive-overlay-open body .dsd-compact-dock,html.dsd-immersive-overlay-open body nav.dsd-compact-dock,html.dsd-immersive-overlay-open body [data-dsd-owner=\"CompactCommerceNavigation\"],html.dsd-immersive-overlay-open body [data-dsd-dock-icon],body:has([data-dsd-immersive-overlay]) .dsd-compact-dock,body:has([data-dsd-immersive-overlay]) nav.dsd-compact-dock,body:has([data-dsd-immersive-overlay]) .dsd-floating-menu-toggle,body:has([data-dsd-immersive-overlay]) .dsd-floating-menu-layer,body:has([data-dsd-immersive-overlay]) [data-dsd-owner=\"CompactCommerceNavigation\"],body:has([data-dsd-immersive-overlay]) [data-dsd-dock-icon]{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] [data-dsd-immersive-close]{z-index:2147483647!important;pointer-events:auto!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__controls{justify-self:end!important;display:flex!important;align-items:flex-start!important;pointer-events:auto!important;position:relative!important;z-index:2147483647!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions{position:relative!important;right:auto!important;top:auto!important;display:block!important;max-width:min(240px,calc(100vw - 28px))!important;background:transparent!important;box-shadow:none!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions summary{display:grid!important;place-items:center!important;width:38px!important;height:38px!important;border-radius:50%!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions:not([open]) .dsd-story385__actions-menu{display:none!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions-menu{display:grid!important;position:absolute!important;right:0!important;top:calc(100% + 8px)!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions button{display:flex!important;width:100%!important;justify-content:flex-start!important;border-radius:10px!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}',\n        \"html.dsd-message-drawer-open .dsd-floating-menu-toggle,html.dsd-message-drawer-open [data-dsd-menu-toggle],html.dsd-message-drawer-open [data-dsd-floating-menu-toggle],html.dsd-message-drawer-open .dsd-floating-menu-layer,html.dsd-message-drawer-open [data-dsd-menu-layer],html.dsd-message-drawer-open [data-dsd-floating-menu-root]{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important}\",\n        'html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__body{padding:0 0 calc(18px + env(safe-area-inset-bottom))!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__panel>header button{min-width:34px!important;min-height:34px!important;border-radius:999px!important;padding:0!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__post-summary strong{display:block!important;font-size:13px!important;line-height:1.15!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-post-drawer__post-summary span{display:block!important;font-size:11px!important;line-height:1.2!important;color:rgba(255,248,231,.58)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-launch-comment__avatar .dsd-post-card__avatar,html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-launch-comment__avatar .dsd-up315__mini-avatar{width:34px!important;height:34px!important;min-width:34px!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-launch-comment__meta{display:flex!important;align-items:center!important;gap:5px!important;min-width:0!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-launch-comment__meta strong{font-size:13px!important;line-height:1.15!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-launch-comment__meta span,html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-launch-comment__meta time{font-size:11px!important;line-height:1.1!important;color:rgba(255,248,231,.55)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}html.dsd-post-drawer-open .dsd-post-drawer[data-dsd-comment-drawer-contract=\"compact-full-height\"] .dsd-comment-action-menu__panel button{white-space:nowrap!important}',\n        '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__top{position:relative!important;z-index:2147483647!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__stage,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__story-frame{position:relative!important;z-index:1!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__top,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__controls,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] [data-dsd-story-top-controls],.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions summary,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions-menu{pointer-events:auto!important;isolation:isolate!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__canvas,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__canvas-media,.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__canvas-media *{pointer-events:none!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions[open]{z-index:2147483647!important}.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-story385__actions-menu{min-width:158px!important;background:rgba(0,0,0,.86)!important;border:1px solid rgba(255,255,255,.18)!important}',\r\n        'body.dsd-social-page,.dsd-launch-social,.dsd-feed368,.dsd-users311,.dsd-up315,.dsd-up353,.dsd-msg384,.dsd-noti321,.dsd-story385,.dsd-post-card,.dsd-launch-actions,.dsd-canonical-composer,.dsd-post-composer,.dsd-post-drawer{font-family:Inter,ui-sans-serif,system-ui,-apple-system,\"Segoe UI\",Roboto,Arial,sans-serif!important;letter-spacing:0!important}.dsd-launch-social h1,.dsd-feed368 h1,.dsd-users311 h1,.dsd-up315 h1,.dsd-up353 h1,.dsd-noti321 h1{font-family:Georgia,\"Times New Roman\",serif!important;font-weight:800!important;letter-spacing:0!important}.dsd-launch-social h2,.dsd-launch-social h3,.dsd-feed368 h2,.dsd-users311 h2,.dsd-up315 h2,.dsd-up353 h2,.dsd-msg384 h2,.dsd-noti321 h2{font-family:Inter,ui-sans-serif,system-ui,-apple-system,\"Segoe UI\",Roboto,Arial,sans-serif!important;font-weight:900!important;letter-spacing:0!important}.dsd-launch-social button,.dsd-launch-social input,.dsd-launch-social textarea,.dsd-launch-social select,.dsd-launch-actions button,.dsd-msg384 button,.dsd-noti321 button,.dsd-users311 button{font-family:Inter,ui-sans-serif,system-ui,-apple-system,\"Segoe UI\",Roboto,Arial,sans-serif!important;letter-spacing:0!important}.dsd-launch-muted,.dsd-post-card small,.dsd-story385 small,.dsd-msg384 small,.dsd-noti321 small{font-family:Inter,ui-sans-serif,system-ui,-apple-system,\"Segoe UI\",Roboto,Arial,sans-serif!important;letter-spacing:0!important}',\n        '.dsd-story385__tray-card[data-dsd-view-story]{position:relative!important;isolation:isolate!important}.dsd-story385__tray-card[data-dsd-view-story] .dsd-story385__avatar,.dsd-story385__tray-card[data-dsd-view-story] .dsd-story385__poster{position:relative!important;z-index:1!important}.dsd-story385__tray-card[data-dsd-view-story]:not(.is-viewed):not([data-dsd-story-viewed=\"true\"]) .dsd-story385__avatar:before,.dsd-story385__tray-card[data-dsd-view-story]:not(.is-viewed):not([data-dsd-story-viewed=\"true\"]) .dsd-story385__poster:before{content:\"\"!important;position:absolute!important;inset:-3px!important;border:2px solid rgba(240,196,108,.88)!important;border-radius:50%!important;background:none!important;z-index:-1!important;animation:none!important;transform:none!important;will-change:auto!important}',\r\n        '.dsd-msg384,.dsd-msg384__shell,.dsd-msg384__rail,.dsd-msg384__conversation,.dsd-msg384__conversation-head,.dsd-msg384__messages,.dsd-msg384__composer{max-width:100%!important;min-width:0!important;box-sizing:border-box!important}.dsd-msg384{overflow-x:hidden!important}.dsd-msg384__conversation{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;min-height:0!important;overflow:hidden!important}.dsd-msg384__conversation-head{grid-row:1!important}.dsd-msg384__messages{grid-row:2!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;position:relative!important;z-index:0!important}.dsd-msg384__composer{grid-row:3!important;position:relative!important;z-index:1!important;isolation:isolate!important}.dsd-msg384__bubble,.dsd-msg384__thread{max-width:100%!important;min-width:0!important;overflow-wrap:anywhere!important}.dsd-msg384__bubble p,.dsd-msg384__thread p{max-width:100%!important;overflow-wrap:anywhere!important}.dsd-msg384__premium-actions{display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin-top:6px!important}.dsd-msg384__premium-actions button,.dsd-msg384__actions [data-dsd-message-action],.dsd-msg384__gallery-grid button,.dsd-msg384__name-editor button{border:1px solid rgba(255,223,157,.2)!important;border-radius:999px!important;background:rgba(255,255,255,.07)!important;color:#fff8da!important;padding:5px 8px!important;font:900 10px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif!important}.dsd-msg384__premium-compose{grid-column:1/-1!important;display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:wrap!important;min-width:0!important}.dsd-msg384__premium-compose[hidden],.dsd-msg384__group-create-name[hidden]{display:none!important}.dsd-msg384__premium-compose label{display:inline-flex!important;align-items:center!important;gap:5px!important;min-width:0!important;font:800 10px/1.1 system-ui,-apple-system,\"Segoe UI\",sans-serif!important;color:rgba(255,248,218,.74)!important}.dsd-msg384__premium-compose select{max-width:116px!important;min-height:28px!important;border-radius:999px!important;background:rgba(0,0,0,.28)!important;color:#fff8da!important;border:1px solid rgba(255,223,157,.22)!important;font:800 10px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif!important}.dsd-msg384__group-create-name{grid-column:1/-1!important;display:grid!important;gap:4px!important;color:rgba(255,248,218,.74)!important;font:850 10px/1.1 system-ui,-apple-system,\"Segoe UI\",sans-serif!important}.dsd-msg384__group-create-name input{width:100%!important;min-width:0!important;box-sizing:border-box!important;min-height:32px!important;border-radius:10px!important;border:1px solid rgba(255,223,157,.2)!important;background:rgba(0,0,0,.22)!important;color:#fff8da!important;padding:7px 9px!important}.dsd-msg384__name-editor{margin:0 8px 8px!important;padding:8px!important;border:1px solid rgba(255,223,157,.18)!important;border-radius:12px!important;background:rgba(0,0,0,.2)!important}.dsd-msg384__name-editor[hidden]{display:none!important}.dsd-msg384__name-editor form{display:grid!important;gap:7px!important;margin:0!important}.dsd-msg384__name-editor label{display:grid!important;gap:4px!important;color:rgba(255,248,218,.74)!important;font:850 10px/1.1 system-ui,-apple-system,\"Segoe UI\",sans-serif!important}.dsd-msg384__name-editor input[type=\"text\"]{width:100%!important;min-width:0!important;box-sizing:border-box!important;min-height:34px!important;border-radius:10px!important;border:1px solid rgba(255,223,157,.2)!important;background:rgba(0,0,0,.24)!important;color:#fff8da!important;padding:8px 10px!important}.dsd-msg384__name-editor form>div{display:flex!important;gap:6px!important;justify-content:flex-end!important}.dsd-msg384__media-gallery{margin:0 8px 8px!important;padding:8px!important;border:1px solid rgba(255,223,157,.16)!important;border-radius:12px!important;background:rgba(0,0,0,.18)!important}.dsd-msg384__gallery-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin-bottom:6px!important}.dsd-msg384__gallery-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}.dsd-msg384__gallery-grid button{border-radius:10px!important;text-align:left!important;display:grid!important;gap:2px!important;min-width:0!important}.dsd-msg384__gallery-grid button span{font:700 9px/1.2 system-ui,-apple-system,\"Segoe UI\",sans-serif!important;color:rgba(255,248,218,.62)!important}.dsd-msg384__view-once-open{display:grid!important;gap:3px!important;text-align:left!important;width:100%!important;min-height:54px!important;border:1px solid rgba(255,223,157,.24)!important;border-radius:12px!important;background:rgba(255,255,255,.07)!important;color:#fff8da!important;padding:9px 11px!important}.dsd-msg384__view-once-open strong{font:950 12px/1.1 system-ui,-apple-system,\"Segoe UI\",sans-serif!important}.dsd-msg384__view-once-open span{font:750 10px/1.25 system-ui,-apple-system,\"Segoe UI\",sans-serif!important;color:rgba(255,248,218,.64)!important}@media(max-width:430px){.dsd-msg384__premium-compose{gap:4px!important}.dsd-msg384__premium-compose select{max-width:104px!important}.dsd-msg384__gallery-grid{grid-template-columns:minmax(0,1fr)!important}.dsd-msg384__conversation:not([data-dsd-msg384-summary]){max-height:calc(100dvh - 88px)!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__conversation[data-dsd-msg384-summary]{height:var(--dsd-message-viewport-height,100dvh)!important;min-height:0!important;max-height:var(--dsd-message-viewport-height,100dvh)!important;grid-template-rows:auto minmax(0,1fr) auto!important;overflow:hidden!important;padding-bottom:max(10px,env(safe-area-inset-bottom))!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__messages[data-dsd-message-thread-scroll]{grid-row:2!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain!important;scroll-padding-bottom:calc(96px + env(safe-area-inset-bottom))!important;position:relative!important;z-index:0!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form]{grid-row:3!important;grid-template-columns:36px 36px minmax(0,1fr) auto!important;width:100%!important;max-width:100%!important;min-width:0!important;align-self:end!important;flex-shrink:0!important;padding:7px 0 max(0px,env(safe-area-inset-bottom))!important;overflow:visible!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form]{position:relative!important;z-index:1!important;isolation:isolate!important;background:rgba(0,0,0,.92)!important;color:#fff8da!important;-webkit-transform:translateZ(0)!important;transform:translateZ(0)!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__media-actions{display:flex!important;grid-column:1/3!important;grid-row:auto!important;align-items:center!important;gap:5px!important;min-width:0!important;position:relative!important;z-index:2!important;opacity:1!important;visibility:visible!important;overflow:visible!important;pointer-events:auto!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__media-actions .dsd-composer-media-button,html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form]>button[type=\"submit\"],html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] textarea{position:relative!important;z-index:2!important;opacity:1!important;visibility:visible!important;color:#fff8da!important;pointer-events:auto!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__media-actions .dsd-composer-media-button{display:grid!important;place-items:center!important;flex:0 0 36px!important;width:36px!important;height:36px!important;min-width:36px!important;max-width:36px!important;background:rgba(255,255,255,.10)!important;border:1px solid rgba(255,223,157,.28)!important;color:#fff8da!important;-webkit-transform:translateZ(0)!important;transform:translateZ(0)!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__media-actions .dsd-composer-media-button svg{display:block!important;width:18px!important;height:18px!important;opacity:1!important;visibility:visible!important;fill:currentColor!important;color:#fff8da!important;pointer-events:none!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__media-actions .dsd-composer-media-button svg path{fill:currentColor!important;stroke:currentColor!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form]>button[type=\"submit\"]{grid-column:4!important;justify-self:end!important;min-width:52px!important;background:rgba(240,196,108,.18)!important;border:1px solid rgba(240,196,108,.36)!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form]{--dsd-message-trigger-color:#fff8da;--dsd-message-trigger-bg:rgba(255,255,255,.12);--dsd-message-trigger-border:rgba(255,223,157,.38)}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-composer-media-button,html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-msg384__premium-compose label,html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form]>button[type=\"submit\"]{display:inline-flex!important;align-items:center!important;justify-content:center!important;inline-size:42px!important;block-size:42px!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;max-width:42px!important;max-height:42px!important;flex:0 0 42px!important;box-sizing:border-box!important;position:relative!important;z-index:3!important;opacity:1!important;visibility:visible!important;color:var(--dsd-message-trigger-color)!important;background:var(--dsd-message-trigger-bg)!important;border:1px solid var(--dsd-message-trigger-border)!important;border-radius:999px!important;padding:0!important;margin:0!important;overflow:visible!important;-webkit-appearance:none!important;appearance:none!important;-webkit-transform:translateZ(0)!important;transform:translateZ(0)!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-msg384__premium-compose{display:flex!important;grid-column:3!important;grid-row:auto!important;align-items:center!important;justify-content:flex-start!important;gap:5px!important;min-width:0!important;max-width:100%!important;position:relative!important;z-index:3!important;opacity:1!important;visibility:visible!important;overflow:visible!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-msg384__premium-compose[hidden],html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-msg384__premium-compose[aria-hidden=\"true\"]{display:none!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-msg384__premium-compose label span{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-msg384__premium-compose select{display:block!important;position:absolute!important;inset:0!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;opacity:.01!important;color:transparent!important;background:transparent!important;border:0!important;border-radius:999px!important;z-index:4!important;-webkit-appearance:none!important;appearance:none!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-msg384__premium-compose label:first-child:after{content:\"\\\\23F1 \"!important;display:block!important;font:900 20px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif!important;color:var(--dsd-message-trigger-color)!important;opacity:1!important;visibility:visible!important;z-index:3!important;pointer-events:none!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-msg384__premium-compose label:has(input[name=\"viewOnce\"]){inline-size:auto!important;width:auto!important;max-width:none!important;padding:0 10px!important;font:900 10px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif!important;gap:5px!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-msg384__premium-compose input[type=\"checkbox\"]{inline-size:16px!important;block-size:16px!important;opacity:1!important;visibility:visible!important;position:relative!important;clip:auto!important;clip-path:none!important;pointer-events:auto!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-composer-media-button svg{display:block!important;inline-size:20px!important;block-size:20px!important;width:20px!important;height:20px!important;opacity:1!important;visibility:visible!important;color:var(--dsd-message-trigger-color)!important;fill:currentColor!important;stroke:currentColor!important;stroke-width:0!important;position:relative!important;z-index:3!important;pointer-events:none!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form] .dsd-composer-media-button svg path{fill:currentColor!important;stroke:currentColor!important;opacity:1!important;visibility:visible!important}html.dsd-message-drawer-open .dsd-msg384[data-dsd-msg384-drawer-open] .dsd-msg384__composer[data-dsd-message-form]>button[type=\"submit\"]{grid-column:4!important;font:900 12px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif!important;color:var(--dsd-message-trigger-color)!important;text-indent:0!important;white-space:nowrap!important}.dsd-msg384__actions{max-width:100%!important;overflow-x:auto!important}.dsd-msg384__bubble{width:fit-content!important;max-width:min(100%,calc(100vw - 44px))!important}}',\r\n        '.dsd-immersive-overlay[data-dsd-owner=\"ImmersiveOverlayController\"] .dsd-immersive-overlay__top{position:fixed!important;left:0!important;right:0!important;top:0!important;bottom:auto!important}',\r\n      ].join(\"\"),\r\n      style = document.getElementById(\r\n        \"dsd-current-gate-closure-styles-p11dz686\",\r\n      );\r\n    (style ||\r\n      ((style = document.createElement(\"style\")),\r\n      (style.id = \"dsd-current-gate-closure-styles-p11dz686\"),\r\n      (document.head || document.documentElement).appendChild(style)),\r\n      style.textContent !== css && (style.textContent = css));\r\n  }\r\n  function installUniversalSearchStoryNavigationGuard() {\r\n    if (window.__DSDUniversalSearchStoryNavigationGuard686) return;\r\n    ((window.__DSDUniversalSearchStoryNavigationGuard686 = !0),\r\n      (window.__DSDCompactDockSearchOverlayOwner686 = \"g27\"));\r\n    var searchRecentsKey = \"dsd.universalSearch.recents.v1\",\r\n      productTimer = null,\r\n      productAbort = null;\r\n    function normalizeLinks() {\r\n      qsa('[data-dsd-menu-link=\"search\"]').forEach(function (link) {\r\n        (link.setAttribute(\"href\", \"#dsd-search\"),\r\n          link.setAttribute(\"data-dsd-search-overlay-open\", \"true\"));\r\n      });\r\n    }\r\n    function ensureOverlay() {\r\n      var layer = qs(\"[data-dsd-universal-search-layer]\");\r\n      return (\r\n        layer ||\r\n        ((layer = document.createElement(\"div\")),\r\n        (layer.className = \"dsd-universal-search-layer\"),\r\n        layer.setAttribute(\"data-dsd-universal-search-layer\", \"true\"),\r\n        (layer.hidden = !0),\r\n        (layer.innerHTML =\r\n          '<button type=\"button\" class=\"dsd-universal-search-backdrop\" aria-label=\"Close search\" data-dsd-search-overlay-close></button><section class=\"dsd-universal-search-panel\" role=\"dialog\" aria-modal=\"true\" aria-label=\"Universal search\"><header><button type=\"button\" aria-label=\"Close search\" data-dsd-search-overlay-close>x</button><strong>Search</strong><button type=\"button\" aria-label=\"Run search\" data-dsd-universal-search-run>Go</button></header><label class=\"dsd-universal-search-input\"><span aria-hidden=\"true\">Search</span><input type=\"search\" data-dsd-universal-search-input autocomplete=\"off\" placeholder=\"Search people, posts, stories, messages, products\" aria-label=\"Search DSD\"></label><nav class=\"dsd-universal-search-tabs\" aria-label=\"Search categories\"><button type=\"button\" data-dsd-universal-search-tab=\"all\" class=\"is-active\">All</button><button type=\"button\" data-dsd-universal-search-tab=\"users\">People</button><button type=\"button\" data-dsd-universal-search-tab=\"posts\">Posts</button><button type=\"button\" data-dsd-universal-search-tab=\"stories\">Stories</button><button type=\"button\" data-dsd-universal-search-tab=\"messages\">Messages</button><button type=\"button\" data-dsd-universal-search-tab=\"products\">Products</button></nav><section class=\"dsd-universal-search-recents\" data-dsd-universal-search-recents aria-label=\"Recent searches\"><strong>Recent searches</strong><div data-dsd-universal-search-recent-list><button type=\"button\" data-dsd-universal-search-recent-empty>No recent searches</button></div></section><div class=\"dsd-universal-search-results\" data-dsd-universal-search-results data-dsd-search388-results aria-live=\"polite\"><article data-dsd-search-result=\"recent\" data-dsd-search-type=\"users\" data-type=\"users\" data-keywords=\"people profiles discovery recent\"><span>People</span><strong>Discover profiles</strong><a href=\"/pages/users\">Open Discovery</a></article><article data-dsd-search-result=\"recent\" data-dsd-search-type=\"posts\" data-type=\"posts\" data-keywords=\"posts feed trending recent\"><span>Posts</span><strong>Browse the feed</strong><a href=\"/pages/feed\">Open Feed</a></article><article data-dsd-search-result=\"recent\" data-dsd-search-type=\"products\" data-type=\"products\" data-keywords=\"products shop collection membership dsd plus\"><span>Products</span><strong>Search the shop</strong><a href=\"/collections/all\" data-dsd-universal-product-link>Open Shop</a></article></div><p class=\"dsd-universal-search-empty\" data-dsd-universal-search-empty hidden>No matching local suggestions.</p></section>'),\r\n        document.body.appendChild(layer),\r\n        layer)\r\n      );\r\n    }\r\n    function ensureStyle() {\r\n      if (\r\n        !document.getElementById(\r\n          \"dsd-universal-search-story-nav-guard-p11dz686\",\r\n        )\r\n      ) {\r\n        var style = document.createElement(\"style\");\r\n        ((style.id = \"dsd-universal-search-story-nav-guard-p11dz686\"),\r\n          (style.textContent =\r\n            '.dsd-universal-search-layer{position:fixed;inset:0;z-index:2147483342;display:grid;place-items:stretch;background:rgba(0,0,0,.62)}.dsd-universal-search-layer[hidden]{display:none!important}html.dsd-universal-search-open,html.dsd-universal-search-open body{overflow:hidden!important}.dsd-universal-search-backdrop{position:absolute;inset:0;border:0;background:transparent}.dsd-universal-search-panel{position:relative;z-index:1;display:grid;grid-template-rows:auto auto auto auto minmax(0,1fr) auto;gap:10px;width:100vw;height:100dvh;box-sizing:border-box;padding:calc(12px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:linear-gradient(180deg,rgba(8,9,17,.98),rgba(5,6,12,.98));color:#fff}.dsd-universal-search-panel header{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:8px}.dsd-universal-search-panel header button,.dsd-universal-search-panel header a{display:grid;place-items:center;min-height:38px;border:1px solid rgba(255,255,255,.14);border-radius:12px;background:rgba(255,255,255,.07);color:#fff;text-decoration:none;font:900 12px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif}.dsd-universal-search-input{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:8px;border:1px solid rgba(255,223,157,.28);border-radius:16px;background:rgba(255,255,255,.08);padding:10px 12px}.dsd-universal-search-input input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#fff;font:900 16px/1.25 system-ui,-apple-system,\"Segoe UI\",sans-serif}.dsd-universal-search-tabs{display:flex;gap:6px;overflow:auto;padding-bottom:2px}.dsd-universal-search-tabs button{flex:0 0 auto;border:1px solid rgba(255,255,255,.12);border-radius:999px;background:rgba(255,255,255,.06);color:#fff;padding:7px 10px;font:900 11px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif}.dsd-universal-search-tabs button.is-active{border-color:rgba(255,223,157,.52);background:rgba(255,223,157,.16);color:#fff8da}.dsd-universal-search-recents{display:grid;gap:6px;min-width:0}.dsd-universal-search-recents strong{font:950 11px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.58)}.dsd-universal-search-recents div{display:flex;gap:6px;overflow:auto;min-width:0}.dsd-universal-search-recents button{flex:0 0 auto;max-width:min(220px,70vw);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid rgba(255,255,255,.11);border-radius:999px;background:rgba(255,255,255,.06);color:#fff;padding:6px 9px;font:850 11px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif}.dsd-universal-search-results{display:grid;align-content:start;gap:8px;overflow:auto;min-height:0}.dsd-universal-search-results article{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;align-items:center;padding:10px 12px;border:1px solid rgba(255,255,255,.1);border-radius:11px;background:rgba(255,255,255,.05)}.dsd-universal-search-results span{grid-column:1/-1;color:rgba(255,255,255,.58);font:950 10px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif;letter-spacing:.12em;text-transform:uppercase}.dsd-universal-search-results strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:950 13px/1.2 system-ui,-apple-system,\"Segoe UI\",sans-serif}.dsd-universal-search-results a,.dsd-universal-search-results button{border:1px solid rgba(255,223,157,.22);border-radius:999px;background:rgba(255,223,157,.11);color:#fff8da;text-decoration:none;padding:7px 10px;font:900 11px/1 system-ui,-apple-system,\"Segoe UI\",sans-serif}.dsd-universal-search-empty{margin:0;color:rgba(255,255,255,.66);font:800 12px/1.35 system-ui,-apple-system,\"Segoe UI\",sans-serif}'),\r\n          (document.head || document.documentElement).appendChild(style));\r\n      }\r\n    }\r\n    function productSearchUrl(query) {\r\n      var q = String(query || \"\").trim();\r\n      return \"/collections/all\" + (q ? \"?q=\" + encodeURIComponent(q) : \"\");\r\n    }\r\n    function escapeSearchHtml(value) {\r\n      return String(value == null ? \"\" : value).replace(\r\n        /[&<>\"']/g,\r\n        function (ch) {\r\n          return {\r\n            \"&\": \"&amp;\",\r\n            \"<\": \"&lt;\",\r\n            \">\": \"&gt;\",\r\n            '\"': \"&quot;\",\r\n            \"'\": \"&#39;\",\r\n          }[ch];\r\n        },\r\n      );\r\n    }\r\n    function clearProductSuggest(layer) {\r\n      qsa(\"[data-dsd-universal-product-suggest]\", layer || document).forEach(\r\n        function (node) {\r\n          node.remove();\r\n        },\r\n      );\r\n    }\r\n    function productSuggestCard(product, query) {\r\n      var title = (product && (product.title || product.name)) || \"Product\",\r\n        url =\r\n          (product &&\r\n            (product.url ||\r\n              (product.handle ? \"/products/\" + product.handle : \"\"))) ||\r\n          \"/collections/all\",\r\n        imageUrl = (product && product.image) || \"\",\r\n        imageHtml = imageUrl\r\n          ? '<img src=\"' + escapeSearchHtml(imageUrl) + '\" alt=\"\">'\r\n          : \"S\";\r\n      return (\r\n        '<article data-dsd-universal-product-suggest data-dsd-search-result=\"suggestion\" data-dsd-search388-item data-dsd-search-type=\"products\" data-type=\"products\" data-keywords=\"' +\r\n        escapeSearchHtml(\r\n          (\r\n            title +\r\n            \" \" +\r\n            (query || \"\") +\r\n            \" product shop membership dsd plus\"\r\n          ).toLowerCase(),\r\n        ) +\r\n        '\"><div class=\"dsd-search388__avatar\">' +\r\n        imageHtml +\r\n        '</div><div class=\"dsd-search388__body\"><span class=\"dsd-search388__type\">Product</span><h2>' +\r\n        escapeSearchHtml(title) +\r\n        '</h2><p>Shop product</p></div><a href=\"' +\r\n        escapeSearchHtml(url) +\r\n        '\">Open</a></article>'\r\n      );\r\n    }\r\n    function fetchProductSuggest(layer) {\r\n      var input = qs(\"[data-dsd-universal-search-input]\", layer),\r\n        query = String((input && input.value) || \"\").trim();\r\n      if ((clearProductSuggest(layer), !query)) {\r\n        filterOverlay();\r\n        return;\r\n      }\r\n      if (productAbort)\r\n        try {\r\n          productAbort.abort();\r\n        } catch (e) {}\r\n      ((productAbort = window.AbortController ? new AbortController() : null),\r\n        fetch(\r\n          \"/search/suggest.json?q=\" +\r\n            encodeURIComponent(query) +\r\n            \"&resources[type]=product&resources[limit]=6&resources[options][unavailable_products]=hide\",\r\n          productAbort ? { signal: productAbort.signal } : {},\r\n        )\r\n          .then(function (response) {\r\n            if (!response.ok)\r\n              throw new Error(\"product suggest \" + response.status);\r\n            return response.json();\r\n          })\r\n          .then(function (payload) {\r\n            var products =\r\n                (payload &&\r\n                  payload.resources &&\r\n                  payload.resources.results &&\r\n                  payload.resources.results.products) ||\r\n                [],\r\n              results = qs(\"[data-dsd-universal-search-results]\", layer);\r\n            (products.slice(0, 6).forEach(function (product) {\r\n              results &&\r\n                results.insertAdjacentHTML(\r\n                  \"beforeend\",\r\n                  productSuggestCard(product, query),\r\n                );\r\n            }),\r\n              filterOverlay());\r\n          })\r\n          .catch(function () {\r\n            filterOverlay();\r\n          }));\r\n    }\r\n    function scheduleProductSuggest(layer) {\r\n      (productTimer && window.clearTimeout(productTimer),\r\n        (productTimer = window.setTimeout(function () {\r\n          fetchProductSuggest(layer);\r\n        }, 260)));\r\n    }\r\n    function readSearchRecents() {\r\n      try {\r\n        var parsed = JSON.parse(\r\n          window.localStorage.getItem(searchRecentsKey) || \"[]\",\r\n        );\r\n        return Array.isArray(parsed) ? parsed.filter(Boolean).slice(0, 6) : [];\r\n      } catch (e) {\r\n        return [];\r\n      }\r\n    }\r\n    function renderSearchRecents(layer) {\r\n      var list = qs(\"[data-dsd-universal-search-recent-list]\", layer);\r\n      if (list) {\r\n        var recents = readSearchRecents();\r\n        if (!recents.length) {\r\n          list.innerHTML =\r\n            '<button type=\"button\" data-dsd-universal-search-recent-empty>No recent searches</button>';\r\n          return;\r\n        }\r\n        list.innerHTML = recents\r\n          .map(function (term) {\r\n            return (\r\n              '<button type=\"button\" data-dsd-universal-search-recent=\"' +\r\n              escapeSearchHtml(term) +\r\n              '\">' +\r\n              escapeSearchHtml(term) +\r\n              \"</button>\"\r\n            );\r\n          })\r\n          .join(\"\");\r\n      }\r\n    }\r\n    function saveSearchRecent(layer) {\r\n      var input = qs(\"[data-dsd-universal-search-input]\", layer),\r\n        q = String((input && input.value) || \"\")\r\n          .trim()\r\n          .replace(/\\s+/g, \" \");\r\n      if (!(q.length < 2)) {\r\n        var recents = readSearchRecents().filter(function (term) {\r\n          return term.toLowerCase() !== q.toLowerCase();\r\n        });\r\n        recents.unshift(q);\r\n        try {\r\n          window.localStorage.setItem(\r\n            searchRecentsKey,\r\n            JSON.stringify(recents.slice(0, 6)),\r\n          );\r\n        } catch (e) {}\r\n        renderSearchRecents(layer);\r\n      }\r\n    }\r\n    function filterOverlay() {\r\n      var layer = qs(\"[data-dsd-universal-search-layer]\");\r\n      if (layer) {\r\n        var input = qs(\"[data-dsd-universal-search-input]\", layer),\r\n          q = String((input && input.value) || \"\")\r\n            .toLowerCase()\r\n            .trim(),\r\n          tab = qs(\"[data-dsd-universal-search-tab].is-active\", layer),\r\n          active =\r\n            (tab && tab.getAttribute(\"data-dsd-universal-search-tab\")) || \"all\",\r\n          visible = 0;\r\n        qsa(\r\n          \"[data-dsd-search-result], [data-dsd-search388-item]\",\r\n          layer,\r\n        ).forEach(function (row) {\r\n          var type =\r\n              row.getAttribute(\"data-dsd-search-type\") ||\r\n              row.getAttribute(\"data-type\") ||\r\n              \"\",\r\n            searchable = (\r\n              (row.getAttribute(\"data-keywords\") || \"\") +\r\n              \" \" +\r\n              (row.textContent || \"\")\r\n            ).toLowerCase(),\r\n            show =\r\n              (active === \"all\" || active === type) &&\r\n              (!q || searchable.indexOf(q) !== -1);\r\n          ((row.hidden = !show), show && (visible += 1));\r\n        });\r\n        var product = qs(\"[data-dsd-universal-product-link]\", layer);\r\n        product && product.setAttribute(\"href\", productSearchUrl(q));\r\n        var empty = qs(\"[data-dsd-universal-search-empty]\", layer);\r\n        empty && (empty.hidden = visible !== 0);\r\n      }\r\n    }\r\n    function openOverlay() {\r\n      ensureStyle();\r\n      var layer = ensureOverlay(),\r\n        menuLayer = qs(\"[data-dsd-menu-layer]\"),\r\n        menuToggle = qs(\"[data-dsd-menu-toggle]\");\r\n      (menuLayer && (menuLayer.hidden = !0),\r\n        menuToggle && menuToggle.setAttribute(\"aria-expanded\", \"false\"),\r\n        document.documentElement.classList.remove(\"dsd-floating-menu-open\"),\r\n        (layer.hidden = !1),\r\n        document.documentElement.classList.add(\"dsd-universal-search-open\"),\r\n        scheduleGlobalOverlayStateSync(),\r\n        renderSearchRecents(layer),\r\n        filterOverlay(),\r\n        window.setTimeout(function () {\r\n          var input = qs(\"[data-dsd-universal-search-input]\", layer);\r\n          input && input.focus && input.focus({ preventScroll: !0 });\r\n        }, 0));\r\n    }\r\n    function closeOverlay() {\r\n      var layer = qs(\"[data-dsd-universal-search-layer]\");\r\n      (layer && (layer.hidden = !0),\r\n        document.documentElement.classList.remove(\"dsd-universal-search-open\"),\r\n        scheduleGlobalOverlayStateSync());\r\n    }\r\n    (normalizeLinks(),\r\n      ensureStyle(),\r\n      document.readyState === \"loading\"\r\n        ? document.addEventListener(\r\n            \"DOMContentLoaded\",\r\n            function () {\r\n              (normalizeLinks(), ensureOverlay());\r\n            },\r\n            { once: !0 },\r\n          )\r\n        : ensureOverlay(),\r\n      document.addEventListener(\r\n        \"click\",\r\n        function (event) {\r\n          var search =\r\n            event.target &&\r\n            event.target.closest &&\r\n            event.target.closest(\"[data-dsd-search-overlay-open]\");\r\n          if (search) {\r\n            (event.preventDefault(), openOverlay());\r\n            return;\r\n          }\r\n          var close =\r\n            event.target &&\r\n            event.target.closest &&\r\n            event.target.closest(\"[data-dsd-search-overlay-close]\");\r\n          if (close) {\r\n            (event.preventDefault(), closeOverlay());\r\n            return;\r\n          }\r\n          var run =\r\n            event.target &&\r\n            event.target.closest &&\r\n            event.target.closest(\"[data-dsd-universal-search-run]\");\r\n          if (run) {\r\n            event.preventDefault();\r\n            var runLayer = run.closest(\"[data-dsd-universal-search-layer]\");\r\n            saveSearchRecent(runLayer);\r\n            var runTab = qs(\r\n              \"[data-dsd-universal-search-tab].is-active\",\r\n              runLayer,\r\n            );\r\n            runTab &&\r\n            runTab.getAttribute(\"data-dsd-universal-search-tab\") === \"products\"\r\n              ? fetchProductSuggest(runLayer)\r\n              : filterOverlay();\r\n            return;\r\n          }\r\n          var recent =\r\n            event.target &&\r\n            event.target.closest &&\r\n            event.target.closest(\"[data-dsd-universal-search-recent]\");\r\n          if (recent) {\r\n            event.preventDefault();\r\n            var recentLayer = recent.closest(\r\n                \"[data-dsd-universal-search-layer]\",\r\n              ),\r\n              input = qs(\"[data-dsd-universal-search-input]\", recentLayer);\r\n            (input &&\r\n              (input.value =\r\n                recent.getAttribute(\"data-dsd-universal-search-recent\") ||\r\n                recent.textContent ||\r\n                \"\"),\r\n              filterOverlay(),\r\n              input && input.focus && input.focus({ preventScroll: !0 }));\r\n            return;\r\n          }\r\n          var story =\r\n            event.target &&\r\n            event.target.closest &&\r\n            event.target.closest(\"[data-dsd-open-story-viewer]\");\r\n          if (story) {\n            var storyReferenceId = story.getAttribute(\"data-dsd-message-story-reference\") || \"\";\n            if (storyReferenceId && storyById(storyReferenceId)) {\n              (event.preventDefault(), closeOverlay(), openStoryOverlay(storyReferenceId));\n            }\n            return;\n          }\r\n          var tab =\r\n            event.target &&\r\n            event.target.closest &&\r\n            event.target.closest(\"[data-dsd-universal-search-tab]\");\r\n          if (tab) {\r\n            event.preventDefault();\r\n            var layer = tab.closest(\"[data-dsd-universal-search-layer]\");\r\n            (qsa(\"[data-dsd-universal-search-tab]\", layer).forEach(\r\n              function (btn) {\r\n                btn.classList.toggle(\"is-active\", btn === tab);\r\n              },\r\n            ),\r\n              tab.getAttribute(\"data-dsd-universal-search-tab\") ===\r\n                \"products\" && scheduleProductSuggest(layer),\r\n              filterOverlay());\r\n          }\r\n        },\r\n        !0,\r\n      ),\r\n      document.addEventListener(\r\n        \"input\",\r\n        function (event) {\r\n          if (!(\r\n            !event.target ||\r\n            !event.target.matches ||\r\n            !event.target.matches(\"[data-dsd-universal-search-input]\")\r\n          )) {\r\n            var layer = event.target.closest(\r\n                \"[data-dsd-universal-search-layer]\",\r\n              ),\r\n              tab = qs(\"[data-dsd-universal-search-tab].is-active\", layer);\r\n            (tab &&\r\n              tab.getAttribute(\"data-dsd-universal-search-tab\") ===\r\n                \"products\" &&\r\n              scheduleProductSuggest(layer),\r\n              filterOverlay());\r\n          }\r\n        },\r\n        !0,\r\n      ),\r\n      document.addEventListener(\r\n        \"keydown\",\r\n        function (event) {\r\n          var tag =\r\n              event.target && event.target.tagName\r\n                ? event.target.tagName.toLowerCase()\r\n                : \"\",\r\n            typing =\r\n              tag === \"input\" ||\r\n              tag === \"textarea\" ||\r\n              tag === \"select\" ||\r\n              (event.target && event.target.isContentEditable);\r\n          if (\r\n            !typing &&\r\n            (event.ctrlKey || event.metaKey) &&\r\n            String(event.key || \"\").toLowerCase() === \"k\"\r\n          ) {\r\n            (event.preventDefault(), openOverlay());\r\n            return;\r\n          }\r\n          if (\r\n            document.documentElement.classList.contains(\r\n              \"dsd-universal-search-open\",\r\n            )\r\n          ) {\r\n            if (event.key === \"Escape\") {\r\n              (event.preventDefault(), closeOverlay());\r\n              return;\r\n            }\r\n            if (\r\n              event.key === \"Enter\" &&\r\n              event.target &&\r\n              event.target.matches &&\r\n              event.target.matches(\"[data-dsd-universal-search-input]\")\r\n            ) {\r\n              saveSearchRecent(qs(\"[data-dsd-universal-search-layer]\"));\r\n              var tab = qs(\"[data-dsd-universal-search-tab].is-active\");\r\n              tab &&\r\n                tab.getAttribute(\"data-dsd-universal-search-tab\") ===\r\n                  \"products\" &&\r\n                (event.preventDefault(),\r\n                fetchProductSuggest(qs(\"[data-dsd-universal-search-layer]\")));\r\n            }\r\n          }\r\n        },\r\n        !0,\r\n      ),\r\n      window.setTimeout(normalizeLinks, 400),\r\n      window.setTimeout(normalizeLinks, 1600),\r\n      window.location.pathname === \"/search\" &&\r\n        window.setTimeout(openOverlay, 0));\r\n  }\r\n  function installRelativeTimeTicker() {\n    state.relativeTimeTicker ||\n      (state.relativeTimeTicker = window.setInterval(function () {\n        qsa(\"[data-dsd-relative-time]\").forEach(function (node) {\n          var value = node.getAttribute(\"data-dsd-relative-time\") || \"\",\n            label = formatDateTime(value);\n          label && node.textContent !== label && (node.textContent = label);\n        });\n        qsa(\"[data-dsd-poll-closes-at]\").forEach(function (node) {\n          var closesAt = node.getAttribute(\"data-dsd-poll-closes-at\") || \"\",\n            poll = { closesAt: closesAt },\n            label = pollTimeLabel(poll),\n            closed = label === \"Poll closed\",\n            root = node.closest(\"[data-dsd-post-poll]\");\n          node.textContent !== label && (node.textContent = label);\n          closed &&\n            qsa(\"[data-dsd-poll-vote]\", root).forEach(function (button) {\n              button.disabled = !0;\n            });\n        });\n      }, 6e4));\n  }\n  function installMessageHistoryNavigation() {\r\n    window.__DSDMessageHistoryNavigation686 ||\r\n      ((window.__DSDMessageHistoryNavigation686 = !0),\r\n      window.addEventListener(\"popstate\", function () {\r\n        if (messagesRouteActive()) {\r\n          var requested = routeRequestedConversationId();\r\n          (requested\r\n            ? (state.activeConversationId !== requested &&\r\n                (stopMessageThreadOwner(\r\n                  state.activeConversationId,\r\n                  \"history-switch\",\r\n                ),\r\n                beginMessageThreadSession(requested, !0)),\r\n              (state.activeConversationId = requested),\r\n              hydrateConversationMessages(requested))\r\n            : (stopMessageThreadOwner(\r\n                state.activeConversationId,\r\n                \"history-close\",\r\n              ),\r\n              (state.activeConversationId = \"\"),\r\n              (state.pendingMessageDraft = null)),\r\n            renderMessages());\r\n        }\r\n      }));\r\n  }\r\n  function stopLifecycleRegistry(registry) {\r\n    Object.keys(registry || {}).forEach(function (key) {\r\n      var owner = registry[key];\r\n      try {\r\n        typeof owner == \"function\"\r\n          ? owner()\r\n          : owner && typeof owner.stop == \"function\"\r\n            ? owner.stop()\r\n            : owner && typeof owner.unsubscribe == \"function\" &&\r\n              owner.unsubscribe();\r\n      } catch (error) {}\r\n    });\r\n  }\r\n  function teardownCanonicalSessionIdentity(event) {\n    var detail = (event && event.detail) || {},\n      previousActorKey = String(\n        state.sessionProfileKey || activeOwnerProfileKey() || profileKey() || \"\",\n      ).trim(),\n      clearedDrafts = clearSocialDraftsForActor(previousActorKey);\n    (state.listeners || []).forEach(function (off) {\r\n      try {\r\n        typeof off == \"function\" && off();\r\n      } catch (error) {}\r\n    });\r\n    stopLifecycleRegistry(state.messageListeners);\r\n    stopLifecycleRegistry(state.commentListeners);\r\n    stopPostDetailRealtimeOwner(\"session-identity-teardown\");\r\n    stopStorySignalOwner(\"session-identity-teardown\");\r\n    (state.viewedRelationshipListeners || []).forEach(function (off) {\r\n      try {\r\n        typeof off == \"function\" && off();\r\n      } catch (error) {}\r\n    });\r\n    ((state.listeners = []),\r\n      (state.inboxListOwners = { conversations: null, notifications: null }),\r\n      (state.inboxRealtimeOwner = null),\r\n      (state.inboxRealtimeUserId = \"\"),\r\n      (state.inboxCounts = {\r\n        ready: !1,\r\n        notificationUnread: 0,\r\n        messageUnread: 0,\r\n        founderUnread: 0,\r\n        cursor: \"\",\r\n      }),\r\n      (state.messageListeners = {}),\r\n      (state.commentListeners = {}),\r\n      (state.postDetailRealtimeOwner = null),\r\n      (state.postDetailRealtimePostId = \"\"),\r\n      (state.storyListOwners = []),\r\n      (state.storySignalOwner = null),\r\n      (state.storySignalPending = !1),\r\n      (state.storyAudienceById = {}),\n      (state.storyAudiencePendingById = {}),\n      (state.storyWatchClaims = {}),\n      (state.viewedRelationshipListeners = []),\r\n      (state.messageThreadSessions = {}),\r\n      (state.messagesByConversation = {}),\r\n      (state.activeConversationId = \"\"),\r\n      (state.pendingMessageDraft = null),\r\n      (state.profile = null),\r\n      (state.viewProfile = null),\r\n      (state.profileExists = !1),\r\n      (state.sessionActorId = \"\"),\r\n      (state.sessionClaims = {}),\n      (state.sessionProfileKey = \"\"),\n      (state.sessionSetupRequired = !1),\n      (state.sessionProvisioningReady = !1),\n      (state.profileSetupResolution = {\n        generation:\n          Number(\n            (state.profileSetupResolution &&\n              state.profileSetupResolution.generation) ||\n              0,\n          ) + 1,\n        actorKey: \"\",\n        status: \"UNKNOWN\",\n        source: \"session-teardown\",\n      }),\n      (state.supabaseEntitlement = null),\n      (state.listenerSignature = \"\"),\r\n      (state.hydratedRuntimePromise = null),\r\n      (state.supabaseEntitlementPrimePromise = null),\r\n      claim(\"canonical-session:identity-torn-down\", {\n        reason: detail.reason || \"session-invalidated\",\n        generation: detail.generation || 0,\n        previousActorRequestsPrevented: !0,\n        accountScopedDraftsCleared: clearedDrafts,\n      }));\n  }\r\n  function installCanonicalSessionLifecycle() {\r\n    if (window.__DSDCanonicalSessionLifecycleGoal2B1) return;\r\n    window.__DSDCanonicalSessionLifecycleGoal2B1 = !0;\r\n    window.addEventListener(\r\n      \"dsd:supabase-session:invalidated\",\r\n      teardownCanonicalSessionIdentity,\r\n    );\r\n    window.addEventListener(\"pagehide\", function () {\r\n      stopLifecycleRegistry(state.commentListeners);\r\n      stopPostDetailRealtimeOwner(\"pagehide\");\r\n      stopStorySignalOwner(\"pagehide\");\r\n    });\r\n  }\r\n  function boot() {\n    var globalBoot = window.__DSDLaunchSocialRuntimeBoot686 || null;\r\n    if (globalBoot && globalBoot.build === BUILD && globalBoot.started === !0) {\r\n      (installUniversalSearchStoryNavigationGuard(),\r\n        claim(\"launch-social:duplicate-boot-deconstructed\", {\r\n          build: BUILD,\r\n          existingStartedAt: globalBoot.startedAt || 0,\r\n          owner: OWNER,\r\n        }));\r\n      return;\r\n    }\r\n    function setRuntimeLifecycle(status, source, error) {\n      var lifecycle = state.runtimeLifecycle,\n        safeStatus = String(status || \"idle\"),\n        safeSource = String(source || \"runtime\"),\n        safeError = error\n          ? String((error && error.message) || error).slice(0, 160)\n          : \"\";\n      ((lifecycle.status = safeStatus),\n        (lifecycle.source = safeSource),\n        (lifecycle.errorCode = safeError ? \"runtime-startup-failed\" : \"\"),\n        document.documentElement.setAttribute(\n          \"data-dsd-social-runtime-state\",\n          safeStatus,\n        ));\n      if (safeStatus === \"ready\") {\n        ((lifecycle.retryCount = 0),\n          lifecycle.retryTimer && window.clearTimeout(lifecycle.retryTimer),\n          (lifecycle.retryTimer = null));\n        renderStatus(\"\");\n      } else if (safeStatus === \"error\") {\n        renderStatus(\"Social content could not load. Please retry.\");\n      }\n      emit(\"runtime-lifecycle\", {\n        status: safeStatus,\n        source: safeSource,\n        errorCode: lifecycle.errorCode,\n      });\n    }\n    function runRuntimeWithBoundedRetry(source, starter) {\n      var lifecycle = state.runtimeLifecycle;\n      return Promise.resolve()\n        .then(starter)\n        .catch(function (error) {\n          ((state.ready = !1), setRuntimeLifecycle(\"error\", source, error));\n          claim(\"launch-social:runtime-startup-failed\", {\n            source: source,\n            error: (error && error.message) || String(error),\n            retryCount: lifecycle.retryCount,\n          });\n          if (lifecycle.retryCount < 1 && !lifecycle.retryTimer) {\n            ((lifecycle.retryCount += 1),\n              (lifecycle.retryTimer = window.setTimeout(function () {\n                ((lifecycle.retryTimer = null),\n                  setRuntimeLifecycle(\"loading\", source + \":retry\"),\n                  runRuntimeWithBoundedRetry(source + \":retry\", starter));\n              }, 3000)));\n          }\n          return !1;\n        });\n    }\n    if (\n      ((window.__DSDLaunchSocialRuntimeBoot686 = {\r\n        build: BUILD,\r\n        started: !0,\r\n        startedAt: Date.now(),\r\n        owner: OWNER,\r\n      }),\r\n      purgeRetiredPublicSocialCaches(),\r\n      installReleaseEStyles(),\n      installModalContainmentStyles(),\n      installMessageLayoutSprintStyles(),\r\n      installMessageViewportProofBadge(),\r\n      installCurrentGateClosureStyles(),\n      installGlobalOverlayLayerContractStyles(),\r\n      window.addEventListener(\"dsd:call-overlay-state\", scheduleGlobalOverlayStateSync),\r\n      installUniversalSearchStoryNavigationGuard(),\n      installRelativeTimeTicker(),\r\n      installMessageHistoryNavigation(),\r\n      installCanonicalSessionLifecycle(),\r\n      bindRemovedMediaSourceCleanup(),\r\n      requestSupabaseAdapterScript(\"boot-route-preload\", \"listenPath\"),\r\n      startPublicProfilePreloadForRoute(),\r\n      rememberLastVisitedPage(),\r\n      (state.localDeletedPostIds = deletedPostTombstones()),\r\n      (state.localPostStateOverrides = postStateOverrides()),\r\n      pruneExpiredLocalPostOverrides(),\r\n      (state.localCommentStateOverrides = commentStateOverrides()),\r\n      (state.localSavedStateOverrides = savedStateOverrides()),\r\n      loadNearbyLocationState(),\r\n      bindActiveLocationLifecycle(),\r\n      bindProfilePresenceLifecycle(),\r\n      purgeRetiredSideEffectDraftQueue(),\r\n      clearRecoveredUploadDraftStatus(),\r\n      bindActions(),\r\n      renderAll(),\r\n      window.setTimeout(openCallReportFromRoute, 0),\r\n      scheduleLateProfileHydrationReconcile(),\r\n      hasCustomer() &&\r\n        /\\/pages\\/user-profile(?:$|\\/)/.test(String(location.pathname || \"\")))\r\n    ) {\r\n      (claim(\"launch-social:profile-async-startup-contained\", {\r\n        build: BUILD,\r\n        owner: OWNER,\r\n      }),\r\n        setRuntimeLifecycle(\"loading\", \"authenticated-profile\"),\n        runRuntimeWithBoundedRetry(\"authenticated-profile\", function () {\n          return primeSupabaseEntitlementSession()\n          .then(function () {\n            return ensureProfile();\n          })\r\n          .then(function () {\r\n            return (\r\n              (state.listenerSignature = \"\"),\r\n              startListeners(),\r\n              Promise.all([\r\n                loadViewedPublicProfile(),\r\n                loadProfilePolicyState(!1),\r\n              ])\r\n            );\r\n          })\r\n          .then(function () {\r\n            (ensureViewedAuthorContentListeners(),\r\n              renderAll(),\n              scheduleLateProfileHydrationReconcile(),\n              window.setTimeout(function () {\n                showPostProfilePushOnboarding({\n                  force: queryParam(\"release_b_onboarding\") === \"1\",\n                });\n                scheduleStandalonePushPrompt(\"authenticated-profile-ready\");\r\n              }, 250),\n              (state.ready = !0),\n              setRuntimeLifecycle(\"ready\", \"authenticated-profile\"),\n              claim(\"profile-authenticated-listeners:reconciled\", {\n                build: BUILD,\r\n                profileKey: profileKey() || \"\",\r\n                reason:\r\n                  \"profile fast paint remains contained while canonical profile and relationship owners reconcile\",\r\n              }));\r\n          });\n        }));\n      return;\n    }\r\n    function startHydratedRuntime() {\r\n      return (\r\n        state.hydratedRuntimePromise ||\r\n          (state.hydratedRuntimePromise = primeSupabaseEntitlementSession()\r\n            .then(function () {\r\n              return (startCanonicalSocialListenersEarly(), null);\r\n            })\r\n            .then(function () {\r\n              return ensureProfile();\r\n            })\r\n            .then(function () {\r\n              return (\r\n                startListeners(),\r\n                repairOwnedOrphanMediaParents()\r\n                  .then(loadViewedPublicProfile)\r\n                  .then(function () {\r\n                    ensureViewedAuthorContentListeners();\r\n                  })\r\n              );\r\n            })\r\n            .then(function () {\r\n              return (\r\n                maybeRouteProfile(),\n                renderAll(),\n                scheduleLateProfileHydrationReconcile(),\n                window.setTimeout(function () {\n                  showPostProfilePushOnboarding({\n                    force: queryParam(\"release_b_onboarding\") === \"1\",\n                  });\n                  scheduleStandalonePushPrompt(\"hydrated-runtime-ready\");\r\n                }, 250),\n                (state.ready = !0),\n                setRuntimeLifecycle(\"ready\", \"hydrated-runtime\"),\n                messagesRouteActive() &&\n                  state.activeConversationId &&\r\n                  markConversationRead(state.activeConversationId),\r\n                emit(\"ready\", snapshot()),\r\n                !0\r\n              );\r\n            })\n            .catch(function (error) {\n              ((state.hydratedRuntimePromise = null));\n              return Promise.reject(error);\n            })),\n        state.hydratedRuntimePromise\n      );\n    }\r\n    var initialBridgeWait = supabaseCutoverConfigured()\r\n      ? 120\r\n      : hasCustomer()\r\n        ? 900\r\n        : 1800;\r\n    (setRuntimeLifecycle(\"loading\", \"initial-bridge\"),\n      runRuntimeWithBoundedRetry(\"initial-bridge\", function () {\n        return waitForBridgeReady(initialBridgeWait).then(startHydratedRuntime);\n      }),\n      window.addEventListener(\"dsd:supabase-social-adapter:ready\", function () {\n        state.ready ||\n          runRuntimeWithBoundedRetry(\"adapter-ready\", function () {\n            return waitForBridgeReady(120).then(startHydratedRuntime);\n          });\n      }));\n  }\r\n  function duplicateProfileCount() {\r\n    var seen = {},\r\n      duplicates = 0;\r\n    return (\r\n      (state.publicProfiles || []).forEach(function (profile) {\r\n        var key = clean(\r\n          profile && (profile.profileKey || profile.handle || \"\"),\r\n          \"\",\r\n        ).toLowerCase();\r\n        key && (seen[key] && (duplicates += 1), (seen[key] = !0));\r\n      }),\r\n      duplicates\r\n    );\r\n  }\r\n  function publicProfileOwnerMismatchCount() {\r\n    return (state.publicProfiles || []).filter(\r\n      canonicalLaunchProfileOwnerMismatch,\r\n    ).length;\r\n  }\r\n  function canonicalGuardrails() {\r\n    return {\r\n      currentSocialSource: \"Supabase\",\r\n      currentMediaSource: \"Wasabi\",\r\n      socialRuntimeMode: \"supabase-canonical-cloud-run-app-proxy\",\r\n      activeProfileRenderer: \"LaunchSocialActivation.ProfileRenderer\",\r\n      activeDiscoveryRenderer: \"LaunchSocialActivation.DiscoveryRenderer\",\r\n      activeProfileShellContract: \"one-profile-shell-role-based-controls\",\r\n      activeMessageThreadKey: \"canonicalConversationId\",\r\n      activeVisibilityResolver: \"LaunchSocialActivation.profileVisibility\",\r\n      activeProfileMediaResolver:\r\n        \"Supabase profiles/public_profiles media_objects to Wasabi signer\",\r\n      activeConversationHydrationOwner:\r\n        \"LaunchSocialActivation.listenPathPolling\",\r\n      moderationLockActive: !0,\r\n      privateFollowRequests: \"follows.state=requested\",\r\n      governanceSource:\r\n        \"Supabase moderation_queue safety_reports moderation_audit\",\r\n      gatedShellRenderer: \"LaunchSocialActivation.publicGatedShellRecord\",\r\n      duplicateProfileCount: duplicateProfileCount(),\r\n      publicProfileOwnerMismatchCount: publicProfileOwnerMismatchCount(),\r\n      retiredPublicContentHydrationDisabled: !0,\r\n      noSupabaseStorageProductionMedia: !0,\r\n      wasabiMediaCanonical: !0,\r\n    };\r\n  }\r\n  function snapshot() {\r\n    var activeGovernanceShells = qsa(\r\n        '[data-dsd-governance-canonical=\"p11dz684\"], [data-dsd-governance-canonical=\"p11dz674\"]',\r\n      ).filter(function (node) {\r\n        return !node.hidden;\r\n      }),\r\n      queuedDrafts = draftQueue(),\r\n      socialAuthenticated = canUseSocialActions();\r\n    return {\r\n      version: VERSION,\r\n      build: BUILD,\r\n      owner: OWNER,\r\n      authenticated: socialAuthenticated,\r\n      socialAuthenticated: socialAuthenticated,\r\n      shopifyAuthenticated: hasCustomer(),\r\n      bridgeChecked: state.bridgeChecked,\r\n      profile: state.profile,\r\n      viewedProfile: viewedProfile(),\r\n      membership: deriveMembership(),\r\n      paths: PATHS,\r\n      notificationCounts: state.notificationCounts,\r\n      inboxCounts: Object.assign({}, state.inboxCounts),\r\n      inboxRealtime:\r\n        state.inboxRealtimeOwner &&\r\n        typeof state.inboxRealtimeOwner.snapshot == \"function\"\r\n          ? state.inboxRealtimeOwner.snapshot()\r\n          : null,\r\n      inboxPageState: Object.assign({}, state.inboxPageState),\r\n      publicProfiles: state.publicProfiles.length,\r\n      posts: state.posts.length,\r\n      stories: state.stories.length,\r\n      following: Object.keys(state.followingByUid).filter(function (key) {\r\n        return state.followingByUid[key];\r\n      }).length,\r\n      favorites: Object.keys(state.favoritesByUid).filter(function (key) {\r\n        return state.favoritesByUid[key];\r\n      }).length,\r\n      feedFilter: state.feedFilter,\r\n      storyScope: state.storyScope,\r\n      draftQueue: publicDraftQueueSummary(queuedDrafts),\r\n      draftQueueLength: queuedDrafts.length,\r\n      supabaseMetadataCanonical: supabaseCutoverReady(),\r\n      supabaseSocialCanonical: supabaseCutoverReady(),\r\n      retiredPublicContentHydration: !0,\r\n      supabaseDiscoveryCanonical: !0,\r\n      supabaseProfileCanonical: !0,\r\n      publicGatedShellsForLoggedOut: !0,\r\n      wasabiMediaCanonical: !0,\r\n      localStorageCanonical: !1,\r\n      retiredSocialCachePurge: GHOST_PURGE_VERSION,\r\n      canonicalGuardrails: canonicalGuardrails(),\r\n      currentSocialSource: \"Supabase\",\r\n      currentMediaSource: \"Wasabi\",\r\n      socialRuntimeMode: \"supabase-canonical-cloud-run-app-proxy\",\r\n      activeProfileRenderer: \"LaunchSocialActivation.ProfileRenderer\",\r\n      activeMessageThreadKey: \"canonicalConversationId\",\r\n      governanceSource:\r\n        \"Supabase moderation_queue safety_reports moderation_audit\",\r\n      activeGovernanceRenderer: dedicatedGovernanceRouteActive()\r\n        ? \"DedicatedGovernanceRouteController\"\r\n        : \"LaunchSocialActivation.LegacyEmbeddedGovernance\",\r\n      activeGovernanceShellCount: activeGovernanceShells.length,\r\n      activeGovernanceQueueCount: moderationQueue().length,\r\n      activeGovernanceFilter: \"route-scoped\",\r\n      duplicateGovernanceShellDetected: activeGovernanceShells.length > 1,\r\n      duplicateGovernanceListenerCount: 0,\r\n      staleGovernanceHydrationDetected: !1,\r\n      governanceRuntimeMode: \"supabase-canonical\",\r\n      duplicateProfileCount: duplicateProfileCount(),\r\n      publicProfileOwnerMismatchCount: publicProfileOwnerMismatchCount(),\r\n      over18: isOver18(),\r\n      adultContentEnabled: adultContentEnabled(),\r\n      dsdPlus: hasDsdPlus(),\r\n      adultAllowed: isAdultAllowed(),\r\n      canModerate: canModerate(),\r\n      feedDiagnostics: Object.assign({}, state.feedDiagnostics, {\r\n        activeListeners: state.listeners.length,\r\n        commentListeners: Object.keys(state.commentListeners || {}).length,\r\n        mediaCacheSize: Object.keys(state.mediaReadCache || {}).length,\r\n      }),\r\n    };\r\n  }\r\n  var api = {\r\n    version: VERSION,\r\n    build: BUILD,\r\n    owner: OWNER,\r\n    supabaseResources: PATHS,\r\n    snapshot: snapshot,\r\n    currentUser: function () {\r\n      var socialAuthenticated = canUseSocialActions();\r\n      return {\r\n        uid: uid(),\r\n        profileKey: profileKey(),\r\n        displayName: displayName(),\r\n        roles: roles(),\r\n        authenticated: socialAuthenticated,\r\n        socialAuthenticated: socialAuthenticated,\r\n        shopifyAuthenticated: hasCustomer(),\r\n        bridgeChecked: state.bridgeChecked,\r\n        membership: deriveMembership(),\r\n        over18: isOver18(),\r\n        adultContentEnabled: adultContentEnabled(),\r\n        dsdPlus: hasDsdPlus(),\r\n        adultAllowed: isAdultAllowed(),\r\n        avatarMediaId: canonicalProfileAvatarMediaId(currentComposerProfile()),\r\n        accountRestriction: accountRestrictionState(),\r\n        canModerate: canModerate(),\r\n      };\r\n    },\r\n    resolveViewerState: resolveViewerState,\r\n    canViewContent: canViewContent,\r\n    canViewMedia: canViewMedia,\r\n    canCreatePost: canCreatePost,\r\n    canCreateStory: canCreateStory,\r\n    canSendMessage: canSendMessage,\r\n    canAccessAIC: canAccessAIC,\r\n    createOrUpdateProfile: createOrUpdateProfile,\n    refreshActiveLocation: function () {\n      return requestNearbyBrowserLocation({ explicit: !0, allowPrompt: !0 });\n    },\n    createPost: createPost,\n    renderPostCard: postCard,\n    renderMapProfilePreview: renderMapProfilePreview,\n    mapConversationShortcuts: mapConversationShortcuts,\n    openConnectionShuffle: openConnectionShuffle,\n    openStoryForProfile: openConnectionStoryForProfile,\n    reportMapProfile: function (targetProfileKey) {\n      targetProfileKey = normalizedProfileKeyValue(targetProfileKey || \"\");\n      if (!targetProfileKey) return false;\n      openReportModal(\"profile\", targetProfileKey, location.pathname + location.search, {\n        profileKey: targetProfileKey,\n        surface: \"map-discovery\"\n      });\n      return true;\n    },\n    blockMapProfile: function (targetProfileKey) {\n      targetProfileKey = normalizedProfileKeyValue(targetProfileKey || \"\");\n      return targetProfileKey ? blockProfile(\"\", targetProfileKey) : Promise.resolve(null);\n    },\n    blockProfile: function (targetUid, targetProfileKey) {\r\n      return blockProfile(targetUid || \"\", targetProfileKey || \"\");\r\n    },\r\n    openPostDrawer: openPostDrawer,\r\n    closePostDrawer: closePostDrawer,\r\n    isNormalContentRecord: isNormalContentRecord,\r\n    visibleStories: visibleStories,\r\n    addComment: addComment,\r\n    editComment: editComment,\r\n    deleteComment: deleteComment,\r\n    setCommentState: updateCommentState,\r\n    toggleReaction: toggleReaction,\r\n    followProfile: followProfile,\r\n    unfollowProfile: unfollowProfile,\r\n    toggleFollowProfile: toggleFollowProfile,\r\n    saveItem: saveItem,\r\n    unsaveItem: unsaveItem,\r\n    toggleSaveItem: toggleSaveItem,\r\n    sharePost: sharePost,\r\n    editPost: editPost,\r\n    deletePost: deletePost,\r\n    favoriteUser: favoriteUser,\r\n    unfavoriteUser: unfavoriteUser,\r\n    toggleFavoriteUser: toggleFavoriteUser,\r\n    notify: notify,\r\n    notificationDeliveryContract: notificationDeliveryContract,\r\n    sendMessage: sendMessage,\r\n    sendGroupMessage: sendGroupMessage,\r\n    editMessage: editMessage,\r\n    unsendMessage: unsendMessage,\r\n    markMessageViewOnceOpened: markMessageViewOnceOpened,\r\n    markConversationRead: markConversationRead,\r\n    loadOlderConversations: function () {\r\n      return loadOlderInboxPage(\"conversations\");\r\n    },\r\n    loadOlderNotifications: function () {\r\n      return loadOlderInboxPage(\"notifications\");\r\n    },\r\n    reconcileInbox: reloadInboxLists,\r\n    loadOlderConversationMessages: function (conversationId) {\r\n      return hydrateConversationMessages(\r\n        conversationId || state.activeConversationId,\r\n        { older: !0 },\r\n      );\r\n    },\r\n    messageReadReceiptsAllowed: currentProfileAllowsMessageReadReceipts,\r\n    conversationMediaGallery: conversationMediaGallery,\r\n    premiumMessagePolicy: premiumMessagePolicy,\r\n    premiumMessageAttachmentLimits: premiumMessageAttachmentLimits,\r\n    pinConversation: pinConversation,\r\n    currentPinnedConversationCount: currentPinnedConversationCount,\r\n    setDirectConversationNickname: setDirectConversationNickname,\r\n    renameGroupConversation: renameGroupConversation,\r\n    createStory: createStory,\r\n    openStory: openStoryOverlay,\r\n    openPostMedia: openPostMedia,\r\n    closeImmersiveOverlay: closeImmersiveOverlay,\r\n    createSafetyReport: createSafetyReport,\r\n    readModerationAudit: readModerationAuditViaProxy,\r\n    moderationContext: moderationContext,\r\n    createMediaManifest: createMediaManifest,\r\n    hydrateMediaReads: hydrateMediaReads,\r\n    signReadMedia: signReadMedia,\r\n    resolveMediaDisplayUrl: resolveMediaDisplayUrl,\r\n    canModerate: canModerate,\r\n    isAdultAllowed: isAdultAllowed,\r\n    isOver18: isOver18,\r\n    adultContentEnabled: adultContentEnabled,\r\n    membership: deriveMembership,\r\n    hasDsdPlus: hasDsdPlus,\r\n    canViewClassified: canViewClassified,\r\n    setPostState: updatePostState,\r\n    setQueueItemState: updateQueueItemState,\r\n    setQueueClassification: updateQueueClassification,\r\n    render: renderAll,\n    showReleaseBOnboarding: function () {\n      return showPostProfilePushOnboarding({ force: !0 });\n    },\n    releaseBOnboardingState: postProfileOnboardingState,\n  };\n  ((window.DSDViewerPolicy = {\r\n    version: VERSION,\r\n    source: BUILD,\r\n    resolveViewerState: resolveViewerState,\r\n    canViewContent: canViewContent,\r\n    canViewMedia: canViewMedia,\r\n    canCreatePost: canCreatePost,\r\n    canCreateStory: canCreateStory,\r\n    canSendMessage: canSendMessage,\r\n    canModerate: canModerate,\r\n    canAccessAIC: canAccessAIC,\r\n  }),\r\n    (window.DSDImmersiveOverlayController = {\r\n      version: VERSION,\r\n      source: BUILD,\r\n      owner: \"ImmersiveOverlayController\",\r\n      modes: [\"story\", \"post-media\"],\r\n      rootSelector: \"[data-dsd-immersive-overlay-root]\",\r\n      openStory: openStoryOverlay,\r\n      openPostMedia: openPostMedia,\r\n      close: closeImmersiveOverlay,\r\n      snapshot: function () {\r\n        return {\r\n          version: VERSION,\r\n          owner: \"ImmersiveOverlayController\",\r\n          roots: qsa(\"[data-dsd-immersive-overlay-root]\").length,\r\n          overlays: qsa(\"[data-dsd-immersive-overlay]\").length,\r\n          mode:\r\n            ((qs(\"[data-dsd-immersive-overlay]\") || {}).getAttribute &&\r\n              qs(\"[data-dsd-immersive-overlay]\").getAttribute(\r\n                \"data-dsd-immersive-mode\",\r\n              )) ||\r\n            \"\",\r\n          scrollLocked: document.documentElement.classList.contains(\r\n            \"dsd-immersive-overlay-open\",\r\n          ),\r\n        };\r\n      },\r\n    }));\r\n  try {\r\n    Object.defineProperty(window, \"DSDLaunchSocial\", {\r\n      value: api,\r\n      writable: !1,\r\n      configurable: !0,\r\n    });\r\n  } catch (e) {\r\n    try {\r\n      window.DSDLaunchSocial = api;\r\n    } catch (assignError) {}\r\n  }\r\n  try {\r\n    var ownershipChecks = 0,\r\n      ownershipTimer = window.setInterval(function () {\r\n        if (\r\n          ((ownershipChecks += 1),\r\n          !window.DSDLaunchSocial || window.DSDLaunchSocial.build !== BUILD)\r\n        ) {\r\n          try {\r\n            delete window.DSDLaunchSocial;\r\n          } catch (e) {}\r\n          try {\r\n            Object.defineProperty(window, \"DSDLaunchSocial\", {\r\n              value: api,\r\n              writable: !1,\r\n              configurable: !0,\r\n            });\r\n          } catch (e) {\r\n            try {\r\n              window.DSDLaunchSocial = api;\r\n            } catch (assignError) {}\r\n          }\r\n        }\r\n        ownershipChecks >= 30 && window.clearInterval(ownershipTimer);\r\n      }, 500);\r\n  } catch (e) {}\r\n  document.readyState === \"loading\"\r\n    ? document.addEventListener(\"DOMContentLoaded\", boot, { once: !0 })\r\n    : boot();\r\n})();\r\n//# sourceMappingURL=/cdn/shop/t/21/assets/dsd-launch-social-activation-p11dz686-g27.js.map?verify=178644\r\n\r\n"],
  "mappings": "yxBAAC,UAAY,CACX,aACA,IAAI,QAAU,2CACZ,MAAQ,6CACR,mBAAqB,CACnB,8CACA,gDACA,0DACA,6CACA,2CACA,6DACA,uDACA,0DACA,gEACA,+DACA,+DACA,wDACA,wDACA,wDACA,2DACA,2DACA,2DACA,2DACA,2DACA,qDACA,gDACA,gDACA,gDACA,gDACA,yCACA,yCACA,yCACA,iDACA,gDACA,gDACA,mDACA,mDACA,0DACA,oDACA,oDACA,oDACA,oDACA,oDACA,8CACA,8CACA,8CACA,+CACA,+CACA,+CACA,oDACA,uDACA,iDACA,yCACA,iDACA,iCACA,6CACA,6CACA,6CACA,6CACA,4CACA,gDACA,2CACA,2CACA,kDACA,6CACA,wCACA,0CACA,2CACA,0CACA,kCACA,wDACA,uDACA,iDACA,wDACA,iDACA,gDACA,kDACA,qDACA,oDACA,iDACA,gDACA,6DACA,mDACA,2DACA,iDACA,gDACA,qDACA,iDACF,EACF,SAAS,mBAAmB,MAAO,CACjC,OACG,MAAQ,OAAO,OAAS,EAAE,EAC3B,mBAAmB,KAAK,SAAU,MAAO,CACvC,OAAO,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EAAI,WAAW,EAAE,QAAQ,GACzD,QACJ,EACA,EACN,YACE,OAAO,cAAgB,IACvB,OAAO,eAAiB,IACxB,OAAO,SAAW,IAClB,OAAO,UAAY,IACnB,WAAa,IACb,cAAgB,GAClB,SACE,OAAO,eACP,OAAO,iBACP,OAAO,qBACP,OAAO,wBACP,OAAO,cACP,OAAO,gBACP,OAAO,cACP,OAAO,gBACP,OAAO,eACP,OAAO,iBACP,OAAO,uBACP,OAAO,0BACP,OAAO,sBACP,OAAO,yBACP,OAAO,iBACP,OAAO,mBACP,GACF,SACE,OAAO,eACP,OAAO,iBACP,OAAO,eACP,OAAO,iBACP,OAAO,cACP,OAAO,gBACP,OAAO,mBACP,OAAO,qBACP,OAAO,eACP,OAAO,iBACP,OAAO,eACP,OAAO,iBACP,OAAO,cACP,OAAO,gBACP,OAAO,uBACP,OAAO,0BACP,OAAO,uBACP,OAAO,0BACP,OAAO,sBACP,OAAO,yBACP,OAAO,iBACP,OAAO,mBACP,OAAO,iBACP,OAAO,mBACP,OAAO,gBACP,OAAO,kBACP,GACF,qBAAuB,CACrB,gBACA,iBACA,iBACA,kBACA,iBACA,eACA,kBACA,gBACA,YACA,aACA,aACA,cACA,aACA,cACA,aACA,eACA,cACA,gBACA,gBACA,iBACA,iBACA,kBACA,aACA,aACA,cACA,cACA,YACA,mBACA,aACA,oBACF,EAAE,KAAK,SAAU,MAAO,CACtB,OAAO,OAAO,UAAU,eAAe,KAAK,OAAQ,KAAK,CAC3D,CAAC,EACD,cACE,OACE,OAAO,eAAiB,KACpB,OAAO,cACP,OAAO,gBAAkB,KACvB,OAAO,eACP,OAAO,gBAAkB,KACvB,OAAO,eACP,OAAO,eACjB,GAAK,EACP,eACE,OACE,OAAO,gBAAkB,KACrB,OAAO,eACP,OAAO,cAAgB,KACrB,OAAO,aACP,OAAO,iBAAmB,KACxB,OAAO,gBACP,OAAO,aACjB,GAAK,EACP,UACE,OACE,OAAO,WAAa,KAChB,OAAO,UACP,OAAO,YAAc,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QAAU,CAAC,CACpB,CACF,CAAC,CACH,CACA,SAAS,gCAAgC,YAAa,eAAgB,CACpE,IAAI,KAAO,YAAc,OAAO,OAAO,CAAC,EAAG,WAAW,EAAI,CAAC,EACzD,cAAgB,+BACd,eACA,KAAK,YAAc,KAAK,QAAU,EACpC,EACA,wBACE,eAAiB,cAAc,0BAA4B,GAC7D,sBAAwB,CACtB,gCAAiC,GACjC,oCAAqC,GACrC,eAAgB,GAChB,iBAAkB,GAClB,oBAAqB,GACrB,uBAAwB,GACxB,yBAA0B,GAC1B,6BAA8B,GAC9B,+BAAgC,GAChC,iCAAkC,GAClC,sBAAuB,GACvB,wBAAyB,GACzB,wBAAyB,GACzB,4BAA6B,GAC7B,2BAA4B,GAC5B,6BAA8B,GAC9B,gCAAiC,EACnC,EACF,GAAI,CAAC,cAAe,OAAO,KAC3B,IAAI,QAAU,0BACV,KAAK,YAAc,KAAK,QAAU,EACpC,EACA,WAAa,0BACX,cAAc,YAAc,cAAc,QAAU,EACtD,EACF,OACG,SAAW,YAAc,UAAY,aACnC,CACC,YACA,MACA,cACA,sBACA,SACA,cACA,eACA,4BACA,8BACA,4BACA,8BACA,mBACA,qBACA,WACA,eACA,gBACA,gBACA,iBACA,WACA,0BACA,kCACA,sCACA,iBACA,mBACA,sBACA,yBACA,2BACA,+BACA,iCACA,mCACA,wBACA,0BACA,0BACA,8BACA,6BACA,+BACA,kCACA,QACA,gBACA,cACA,mBACA,YACA,UACA,cACA,gBACA,kBACA,sBACA,yBACA,eACA,iBACA,mBACA,gBACA,kBACA,gBACA,kBACA,eACA,iBACA,oBACA,sBACA,wBACA,2BACA,uBACA,0BACA,wBACA,2BACA,wBACA,2BACA,uBACA,0BACA,iBACA,kBACA,iBACA,kBACA,gBACA,iBACA,eACA,eACA,iBACA,iBACA,eACA,eACA,iBACA,iBACA,WACA,+BACA,iCACA,8BACA,gCACA,kCACA,qCACF,EAAE,QAAQ,SAAU,IAAK,CACvB,cAAc,GAAG,IAAM,QACrB,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BACA,mBACA,gBACA,iBACA,yBACA,2BACA,cACA,eACF,EACA,mBACE,eACA,CACE,iBACA,mBACA,gBACA,iBACA,yBACA,2BACA,cACA,eACF,EACA,EACF,CACF,EACA,oBAAqB,mBACnB,EACA,CACE,sBACA,yBACA,yBACA,4BACA,wBACA,yBACF,EACA,mBACE,eACA,CACE,sBACA,yBACA,yBACA,4BACA,wBACA,yBACF,EACA,EACF,CACF,EACA,yBAA0B,mBACxB,EACA,CACE,2BACA,+BACA,kBACA,mBACF,EACA,mBACE,eACA,CACE,2BACA,+BACA,kBACA,mBACF,EACA,EACF,CACF,EACA,kBAAmB,mBACjB,EACA,CACE,oBACA,sBACA,mBACA,qBACA,6BACA,gCACA,sBACA,uBACF,EACA,mBACE,eACA,CACE,oBACA,sBACA,mBACA,qBACA,6BACA,gCACA,sBACA,uBACF,EACA,EACF,CACF,EACA,cAAe,cACf,cAAe,cACf,mBAAoB,EAAE,qBAAuB,GAC7C,mBAAoB,EAAE,qBAAuB,GAC7C,eAAgB,qBAChB,gBAAiB,qBACjB,aAAc,kBAAkB,EAAG,SAAU,cAAc,EAAE,EAC7D,aAAc,kBAAkB,EAAG,SAAU,cAAc,EAAE,EAC7D,eAAgB,kBAAkB,EAAG,SAAU,cAAc,EAAE,EAC/D,eAAgB,kBAAkB,EAAG,SAAU,cAAc,EAAE,EAC/D,aAAc,kBAAkB,EAAG,SAAU,cAAc,EAAE,EAC7D,aAAc,kBAAkB,EAAG,SAAU,cAAc,EAAE,EAC7D,eAAgB,kBAAkB,EAAG,SAAU,cAAc,EAAE,EAC/D,eAAgB,kBAAkB,EAAG,SAAU,cAAc,EAAE,EAC/D,UAAW,KAAK,IACd,OAAO,EAAE,WAAa,CAAC,EACvB,OAAO,eAAe,WAAa,CAAC,CACtC,EACA,WAAY,KAAK,IACf,OAAO,EAAE,YAAc,CAAC,EACxB,OAAO,eAAe,YAAc,CAAC,CACvC,EACA,WAAY,KAAK,IACf,OAAO,EAAE,YAAc,CAAC,EACx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,QAAQ,aACR,OAAO,eACf,eACE,QAAQ,iBAAmB,OACvB,QAAQ,eACR,QAAQ,eAAiB,OACvB,QAAQ,aACR,OAAO,cACjB,CAAC,CACH,CACA,SAAS,eAAe,MAAO,KAAM,CACnC,IAAI,KAAO,YAAY,EAAI,WAAa,eAAe,EACrD,MAAQ,YAAY,EAAI,UAAY,SACtC,MACE,6FACA,KAAK,KAAK,EACV,sCACA,KAAK,IAAI,EACT,0CACA,KACA,KACA,MACA,gBAEJ,CACA,SAAS,8BAA+B,CACtC,GAAI,CAAC,SAAS,eAAe,sCAAsC,EAAG,CACpE,IAAI,MAAQ,SAAS,cAAc,OAAO,EACxC,MAAM,GAAK,uCACV,MAAM,YAAc,CACnB,2HACA,4FACA,w7CACA,sLACA,wLACA,8DACA,0eACA,2jBACA,qSACA,6SACA,qQACA,8EACA,mOACA,mGACA,oGACA,4GACA,gHACA,kHACA,2cACA,kHACA,qGACA,4KACA,mIACA,0QACA,+GACA,yEACA,qaACA,yQACA,8GACA,wEACA,ygBACA,gkBACA,ipBACA,yWACA,sdACA,6oBACA,kJACA,qTACA,ykBACA,0iDACA,4SACA,uFACA,g/DACA,k2BACA,ghBACA,omJACA,8yBACA,gMACA,2xDACA,67BACA,mLACA,8aACA,gKACA,mrDACA,qIACA,6RACA,0OACA,uoBACA,kIACA,mcACA,6OACA,+jEACF,EAAE,KAAK,EAAE,EACR,MAAM,aACL,imCACD,MAAM,aACL,g4CACD,MAAM,aACL,+mBACD,MAAM,aACL,04GACF,SAAS,KAAK,YAAY,KAAK,CACnC,CACF,CACA,SAAS,iCAAkC,CACzC,GAAI,CAAC,SAAS,eAAe,2CAA2C,EAAG,CACzE,IAAI,MAAQ,SAAS,cAAc,OAAO,EACxC,MAAM,GAAK,4CACV,MAAM,YACL,0pCAEF,SAAS,KAAK,YAAY,KAAK,CACnC,CACA,GAAI,SAAS,gBAAgB,QAAQ,8BAAgC,OACnE,OACF,SAAS,gBAAgB,QAAQ,4BAA8B,OAC/D,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AiB,EAChD,IAAI,eAAiB,GACjB,mDACA,MAAQ,QACV,EACA,eAAiB,eACb,OAAO,eAAe,aAAe,EAAE,EAAE,KAAK,EAC9C,GACL,mFAAmF,KAClF,cACF,IAAM,eAAiB,IACrB,gBACE,SACA,eAAe,KACb,eAAe,OACf,eAAe,aACf,eAAe,YACf,gBACA,EACJ,EACA,gBACE,iBACA,eAAe,aAAe,eAAe,cAAgB,EAC/D,EACA,gBACE,+BACA,eAAe,2BACb,eAAe,6BACf,EACJ,EACA,gBACE,+BACA,eAAe,2BACb,eAAe,6BACf,EACJ,EACA,uBAAuB,QAAQ,SAAU,MAAO,CAC9C,MAAM,QACJ,MAAM,SACL,eAAe,kBACd,eAAe,oBACf,OACN,CAAC,EACD,gBACE,mBACA,eAAe,eACb,eAAe,gBACf,eAAe,OACf,EACJ,EACA,+BACE,KACA,eAAe,cACb,eAAe,eACf,eAAe,MACf,EACJ,EACA,gBACE,qBACA,eAAe,iBACb,eAAe,kBACf,eACJ,EACA,oBACE,oBACA,mBACE,eACA,CACE,iBACA,mBACA,gBACA,iBACA,yBACA,2BACA,cACA,eACF,EACA,EACF,CACF,EACA,oBACE,qBACA,mBACE,eACA,CACE,2BACA,+BACA,kBACA,mBACF,EACA,EACF,CACF,EACA,oBACE,mBACA,WAAW,GACT,mBACE,eACA,CAAC,wBAAyB,yBAAyB,EACnD,EACF,CACJ,EACA,oBACE,uBACA,iCAAiC,cAAc,CACjD,EACA,oBACE,0BACA,CAAC,EACC,eAAe,UACf,eAAe,SAAS,iBACxB,eAAe,SAAS,gBAAgB,qBAE5C,EACA,gBACE,eACA,eAAe,WACZ,gBAAkB,eAAe,OAClC,EACJ,EACA,gBACE,SACA,eAAe,KACb,sBAAsB,eAAe,WAAa,EAAE,GACnD,UAAY,SAAS,OACtB,EACJ,EACA,gBACE,gBACA,sBACI,SACA,eAAe,aAAe,UAC5B,UACA,QACR,EACA,oBACE,kBACA,CAAC,EACC,SAAS,GACT,eAAe,sBAAwB,GAE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actionLabel", "now", "uid", "recipientProfileKeys", "claim", "key", "snapshot", "parentCommentId", "location", "profileIdentity", "history", "node", "boot", "recordState", "album"]
}
