hive-react-kit 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,16 +1,16 @@
1
1
  var mr = Object.defineProperty;
2
2
  var ur = (t, s, r) => s in t ? mr(t, s, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[s] = r;
3
- var $e = (t, s, r) => ur(t, typeof s != "symbol" ? s + "" : s, r);
4
- import * as Ae from "react";
5
- import le, { useState as p, useEffect as H, useMemo as gr, useCallback as je, useRef as Le } from "react";
6
- import { Clock as Ft, Play as et, ThumbsUp as tt, MessageCircle as rt, Eye as Lt, Info as Rt, Share2 as st, Heart as hr, Users as De, RefreshCw as se, Loader2 as ae, X as xr, Send as fr, FileText as pr, ArrowLeft as Ce, BookmarkCheck as br, Bookmark as yr, Search as Ye, Calendar as Pt, Rss as Vt, MoreVertical as at, Upload as vr, Video as kt, Hourglass as jr, Ban as _t } from "lucide-react";
7
- import { formatDistanceToNow as nt } from "date-fns";
3
+ var De = (t, s, r) => ur(t, typeof s != "symbol" ? s + "" : s, r);
4
+ import * as Be from "react";
5
+ import xe, { useState as y, useEffect as B, useMemo as gr, useCallback as Ce, useRef as Ie } from "react";
6
+ import { Clock as Pt, Play as ot, ThumbsUp as it, MessageCircle as lt, Eye as Vt, Info as At, Share2 as ct, Heart as hr, Users as ze, RefreshCw as ce, Loader2 as de, X as xr, Send as fr, FileText as pr, ArrowLeft as Le, BookmarkCheck as br, Bookmark as yr, Search as Ze, Calendar as Dt, Rss as Mt, MoreVertical as dt, Upload as vr, Video as Ct, Hourglass as jr, Ban as St } from "lucide-react";
7
+ import { formatDistanceToNow as mt } from "date-fns";
8
8
  import * as wr from "@hiveio/dhive";
9
9
  import { Client as Nr } from "@hiveio/dhive";
10
- import { useParams as kr, useNavigate as Ie } from "react-router-dom";
11
- import ve from "hls.js";
12
- import { create as _r } from "zustand";
13
- var Ze = { exports: {} }, ke = {};
10
+ import Ee from "hls.js";
11
+ import { create as kr } from "zustand";
12
+ import { useNavigate as It } from "react-router-dom";
13
+ var nt = { exports: {} }, Oe = {};
14
14
  /**
15
15
  * @license React
16
16
  * react-jsx-runtime.production.min.js
@@ -20,21 +20,21 @@ var Ze = { exports: {} }, ke = {};
20
20
  * This source code is licensed under the MIT license found in the
21
21
  * LICENSE file in the root directory of this source tree.
22
22
  */
23
- var Et;
24
- function Er() {
25
- if (Et) return ke;
26
- Et = 1;
27
- var t = le, s = Symbol.for("react.element"), r = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
23
+ var Tt;
24
+ function _r() {
25
+ if (Tt) return Oe;
26
+ Tt = 1;
27
+ var t = xe, s = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
28
28
  function i(u, c, m) {
29
- var l, x = {}, v = null, w = null;
30
- m !== void 0 && (v = "" + m), c.key !== void 0 && (v = "" + c.key), c.ref !== void 0 && (w = c.ref);
31
- for (l in c) a.call(c, l) && !d.hasOwnProperty(l) && (x[l] = c[l]);
32
- if (u && u.defaultProps) for (l in c = u.defaultProps, c) x[l] === void 0 && (x[l] = c[l]);
33
- return { $$typeof: s, type: u, key: v, ref: w, props: x, _owner: o.current };
29
+ var l, f = {}, b = null, p = null;
30
+ m !== void 0 && (b = "" + m), c.key !== void 0 && (b = "" + c.key), c.ref !== void 0 && (p = c.ref);
31
+ for (l in c) n.call(c, l) && !d.hasOwnProperty(l) && (f[l] = c[l]);
32
+ if (u && u.defaultProps) for (l in c = u.defaultProps, c) f[l] === void 0 && (f[l] = c[l]);
33
+ return { $$typeof: s, type: u, key: b, ref: p, props: f, _owner: o.current };
34
34
  }
35
- return ke.Fragment = r, ke.jsx = i, ke.jsxs = i, ke;
35
+ return Oe.Fragment = r, Oe.jsx = i, Oe.jsxs = i, Oe;
36
36
  }
37
- var _e = {};
37
+ var $e = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -44,62 +44,62 @@ var _e = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var Ct;
48
- function Cr() {
49
- return Ct || (Ct = 1, process.env.NODE_ENV !== "production" && function() {
50
- var t = le, s = Symbol.for("react.element"), r = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), u = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), k = Symbol.iterator, T = "@@iterator";
51
- function f(n) {
52
- if (n === null || typeof n != "object")
47
+ var Ot;
48
+ function Er() {
49
+ return Ot || (Ot = 1, process.env.NODE_ENV !== "production" && function() {
50
+ var t = xe, s = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), u = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), h = Symbol.iterator, T = "@@iterator";
51
+ function w(a) {
52
+ if (a === null || typeof a != "object")
53
53
  return null;
54
- var g = k && n[k] || n[T];
55
- return typeof g == "function" ? g : null;
54
+ var x = h && a[h] || a[T];
55
+ return typeof x == "function" ? x : null;
56
56
  }
57
- var j = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58
- function b(n) {
57
+ var k = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58
+ function v(a) {
59
59
  {
60
- for (var g = arguments.length, y = new Array(g > 1 ? g - 1 : 0), S = 1; S < g; S++)
61
- y[S - 1] = arguments[S];
62
- M("error", n, y);
60
+ for (var x = arguments.length, j = new Array(x > 1 ? x - 1 : 0), E = 1; E < x; E++)
61
+ j[E - 1] = arguments[E];
62
+ D("error", a, j);
63
63
  }
64
64
  }
65
- function M(n, g, y) {
65
+ function D(a, x, j) {
66
66
  {
67
- var S = j.ReactDebugCurrentFrame, A = S.getStackAddendum();
68
- A !== "" && (g += "%s", y = y.concat([A]));
69
- var D = y.map(function(P) {
67
+ var E = k.ReactDebugCurrentFrame, V = E.getStackAddendum();
68
+ V !== "" && (x += "%s", j = j.concat([V]));
69
+ var M = j.map(function(P) {
70
70
  return String(P);
71
71
  });
72
- D.unshift("Warning: " + g), Function.prototype.apply.call(console[n], console, D);
72
+ M.unshift("Warning: " + x), Function.prototype.apply.call(console[a], console, M);
73
73
  }
74
74
  }
75
- var _ = !1, E = !1, C = !1, Y = !1, h = !1, $;
76
- $ = Symbol.for("react.module.reference");
77
- function O(n) {
78
- return !!(typeof n == "string" || typeof n == "function" || n === a || n === d || h || n === o || n === m || n === l || Y || n === w || _ || E || C || typeof n == "object" && n !== null && (n.$$typeof === v || n.$$typeof === x || n.$$typeof === i || n.$$typeof === u || n.$$typeof === c || // This needs to include all possible module reference object
75
+ var N = !1, R = !1, A = !1, $ = !1, g = !1, C;
76
+ C = Symbol.for("react.module.reference");
77
+ function S(a) {
78
+ return !!(typeof a == "string" || typeof a == "function" || a === n || a === d || g || a === o || a === m || a === l || $ || a === p || N || R || A || typeof a == "object" && a !== null && (a.$$typeof === b || a.$$typeof === f || a.$$typeof === i || a.$$typeof === u || a.$$typeof === c || // This needs to include all possible module reference object
79
79
  // types supported by any Flight configuration anywhere since
80
80
  // we don't know which Flight build this will end up being used
81
81
  // with.
82
- n.$$typeof === $ || n.getModuleId !== void 0));
82
+ a.$$typeof === C || a.getModuleId !== void 0));
83
83
  }
84
- function F(n, g, y) {
85
- var S = n.displayName;
86
- if (S)
87
- return S;
88
- var A = g.displayName || g.name || "";
89
- return A !== "" ? y + "(" + A + ")" : y;
84
+ function F(a, x, j) {
85
+ var E = a.displayName;
86
+ if (E)
87
+ return E;
88
+ var V = x.displayName || x.name || "";
89
+ return V !== "" ? j + "(" + V + ")" : j;
90
90
  }
91
- function G(n) {
92
- return n.displayName || "Context";
91
+ function O(a) {
92
+ return a.displayName || "Context";
93
93
  }
94
- function N(n) {
95
- if (n == null)
94
+ function _(a) {
95
+ if (a == null)
96
96
  return null;
97
- if (typeof n.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
98
- return n.displayName || n.name || null;
99
- if (typeof n == "string")
100
- return n;
101
- switch (n) {
102
- case a:
97
+ if (typeof a.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
98
+ return a.displayName || a.name || null;
99
+ if (typeof a == "string")
100
+ return a;
101
+ switch (a) {
102
+ case n:
103
103
  return "Fragment";
104
104
  case r:
105
105
  return "Portal";
@@ -112,23 +112,23 @@ function Cr() {
112
112
  case l:
113
113
  return "SuspenseList";
114
114
  }
115
- if (typeof n == "object")
116
- switch (n.$$typeof) {
115
+ if (typeof a == "object")
116
+ switch (a.$$typeof) {
117
117
  case u:
118
- var g = n;
119
- return G(g) + ".Consumer";
118
+ var x = a;
119
+ return O(x) + ".Consumer";
120
120
  case i:
121
- var y = n;
122
- return G(y._context) + ".Provider";
121
+ var j = a;
122
+ return O(j._context) + ".Provider";
123
123
  case c:
124
- return F(n, n.render, "ForwardRef");
125
- case x:
126
- var S = n.displayName || null;
127
- return S !== null ? S : N(n.type) || "Memo";
128
- case v: {
129
- var A = n, D = A._payload, P = A._init;
124
+ return F(a, a.render, "ForwardRef");
125
+ case f:
126
+ var E = a.displayName || null;
127
+ return E !== null ? E : _(a.type) || "Memo";
128
+ case b: {
129
+ var V = a, M = V._payload, P = V._init;
130
130
  try {
131
- return N(P(D));
131
+ return _(P(M));
132
132
  } catch {
133
133
  return null;
134
134
  }
@@ -136,103 +136,103 @@ function Cr() {
136
136
  }
137
137
  return null;
138
138
  }
139
- var L = Object.assign, V = 0, U, I, q, J, ne, K, ue;
140
- function ge() {
139
+ var Y = Object.assign, Q = 0, U, H, re, X, ue, Z, we;
140
+ function Ne() {
141
141
  }
142
- ge.__reactDisabledLog = !0;
143
- function B() {
142
+ Ne.__reactDisabledLog = !0;
143
+ function I() {
144
144
  {
145
- if (V === 0) {
146
- U = console.log, I = console.info, q = console.warn, J = console.error, ne = console.group, K = console.groupCollapsed, ue = console.groupEnd;
147
- var n = {
145
+ if (Q === 0) {
146
+ U = console.log, H = console.info, re = console.warn, X = console.error, ue = console.group, Z = console.groupCollapsed, we = console.groupEnd;
147
+ var a = {
148
148
  configurable: !0,
149
149
  enumerable: !0,
150
- value: ge,
150
+ value: Ne,
151
151
  writable: !0
152
152
  };
153
153
  Object.defineProperties(console, {
154
- info: n,
155
- log: n,
156
- warn: n,
157
- error: n,
158
- group: n,
159
- groupCollapsed: n,
160
- groupEnd: n
154
+ info: a,
155
+ log: a,
156
+ warn: a,
157
+ error: a,
158
+ group: a,
159
+ groupCollapsed: a,
160
+ groupEnd: a
161
161
  });
162
162
  }
163
- V++;
163
+ Q++;
164
164
  }
165
165
  }
166
- function oe() {
166
+ function G() {
167
167
  {
168
- if (V--, V === 0) {
169
- var n = {
168
+ if (Q--, Q === 0) {
169
+ var a = {
170
170
  configurable: !0,
171
171
  enumerable: !0,
172
172
  writable: !0
173
173
  };
174
174
  Object.defineProperties(console, {
175
- log: L({}, n, {
175
+ log: Y({}, a, {
176
176
  value: U
177
177
  }),
178
- info: L({}, n, {
179
- value: I
178
+ info: Y({}, a, {
179
+ value: H
180
180
  }),
181
- warn: L({}, n, {
182
- value: q
181
+ warn: Y({}, a, {
182
+ value: re
183
183
  }),
184
- error: L({}, n, {
185
- value: J
184
+ error: Y({}, a, {
185
+ value: X
186
186
  }),
187
- group: L({}, n, {
188
- value: ne
187
+ group: Y({}, a, {
188
+ value: ue
189
189
  }),
190
- groupCollapsed: L({}, n, {
191
- value: K
190
+ groupCollapsed: Y({}, a, {
191
+ value: Z
192
192
  }),
193
- groupEnd: L({}, n, {
194
- value: ue
193
+ groupEnd: Y({}, a, {
194
+ value: we
195
195
  })
196
196
  });
197
197
  }
198
- V < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
198
+ Q < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
199
199
  }
200
200
  }
201
- var te = j.ReactCurrentDispatcher, de;
202
- function he(n, g, y) {
201
+ var W = k.ReactCurrentDispatcher, me;
202
+ function se(a, x, j) {
203
203
  {
204
- if (de === void 0)
204
+ if (me === void 0)
205
205
  try {
206
206
  throw Error();
207
- } catch (A) {
208
- var S = A.stack.trim().match(/\n( *(at )?)/);
209
- de = S && S[1] || "";
207
+ } catch (V) {
208
+ var E = V.stack.trim().match(/\n( *(at )?)/);
209
+ me = E && E[1] || "";
210
210
  }
211
211
  return `
212
- ` + de + n;
212
+ ` + me + a;
213
213
  }
214
214
  }
215
- var pe = !1, Se;
215
+ var oe = !1, ge;
216
216
  {
217
- var Ut = typeof WeakMap == "function" ? WeakMap : Map;
218
- Se = new Ut();
217
+ var Re = typeof WeakMap == "function" ? WeakMap : Map;
218
+ ge = new Re();
219
219
  }
220
- function ct(n, g) {
221
- if (!n || pe)
220
+ function Te(a, x) {
221
+ if (!a || oe)
222
222
  return "";
223
223
  {
224
- var y = Se.get(n);
225
- if (y !== void 0)
226
- return y;
224
+ var j = ge.get(a);
225
+ if (j !== void 0)
226
+ return j;
227
227
  }
228
- var S;
229
- pe = !0;
230
- var A = Error.prepareStackTrace;
228
+ var E;
229
+ oe = !0;
230
+ var V = Error.prepareStackTrace;
231
231
  Error.prepareStackTrace = void 0;
232
- var D;
233
- D = te.current, te.current = null, B();
232
+ var M;
233
+ M = W.current, W.current = null, I();
234
234
  try {
235
- if (g) {
235
+ if (x) {
236
236
  var P = function() {
237
237
  throw Error();
238
238
  };
@@ -243,413 +243,413 @@ function Cr() {
243
243
  }), typeof Reflect == "object" && Reflect.construct) {
244
244
  try {
245
245
  Reflect.construct(P, []);
246
- } catch (ee) {
247
- S = ee;
246
+ } catch (ae) {
247
+ E = ae;
248
248
  }
249
- Reflect.construct(n, [], P);
249
+ Reflect.construct(a, [], P);
250
250
  } else {
251
251
  try {
252
252
  P.call();
253
- } catch (ee) {
254
- S = ee;
253
+ } catch (ae) {
254
+ E = ae;
255
255
  }
256
- n.call(P.prototype);
256
+ a.call(P.prototype);
257
257
  }
258
258
  } else {
259
259
  try {
260
260
  throw Error();
261
- } catch (ee) {
262
- S = ee;
261
+ } catch (ae) {
262
+ E = ae;
263
263
  }
264
- n();
264
+ a();
265
265
  }
266
- } catch (ee) {
267
- if (ee && S && typeof ee.stack == "string") {
268
- for (var R = ee.stack.split(`
269
- `), X = S.stack.split(`
270
- `), W = R.length - 1, z = X.length - 1; W >= 1 && z >= 0 && R[W] !== X[z]; )
271
- z--;
272
- for (; W >= 1 && z >= 0; W--, z--)
273
- if (R[W] !== X[z]) {
274
- if (W !== 1 || z !== 1)
266
+ } catch (ae) {
267
+ if (ae && E && typeof ae.stack == "string") {
268
+ for (var L = ae.stack.split(`
269
+ `), ee = E.stack.split(`
270
+ `), q = L.length - 1, J = ee.length - 1; q >= 1 && J >= 0 && L[q] !== ee[J]; )
271
+ J--;
272
+ for (; q >= 1 && J >= 0; q--, J--)
273
+ if (L[q] !== ee[J]) {
274
+ if (q !== 1 || J !== 1)
275
275
  do
276
- if (W--, z--, z < 0 || R[W] !== X[z]) {
277
- var re = `
278
- ` + R[W].replace(" at new ", " at ");
279
- return n.displayName && re.includes("<anonymous>") && (re = re.replace("<anonymous>", n.displayName)), typeof n == "function" && Se.set(n, re), re;
276
+ if (q--, J--, J < 0 || L[q] !== ee[J]) {
277
+ var le = `
278
+ ` + L[q].replace(" at new ", " at ");
279
+ return a.displayName && le.includes("<anonymous>") && (le = le.replace("<anonymous>", a.displayName)), typeof a == "function" && ge.set(a, le), le;
280
280
  }
281
- while (W >= 1 && z >= 0);
281
+ while (q >= 1 && J >= 0);
282
282
  break;
283
283
  }
284
284
  }
285
285
  } finally {
286
- pe = !1, te.current = D, oe(), Error.prepareStackTrace = A;
286
+ oe = !1, W.current = M, G(), Error.prepareStackTrace = V;
287
287
  }
288
- var ye = n ? n.displayName || n.name : "", xe = ye ? he(ye) : "";
289
- return typeof n == "function" && Se.set(n, xe), xe;
288
+ var _e = a ? a.displayName || a.name : "", ve = _e ? se(_e) : "";
289
+ return typeof a == "function" && ge.set(a, ve), ve;
290
290
  }
291
- function It(n, g, y) {
292
- return ct(n, !1);
291
+ function Pe(a, x, j) {
292
+ return Te(a, !1);
293
293
  }
294
- function Ht(n) {
295
- var g = n.prototype;
296
- return !!(g && g.isReactComponent);
294
+ function Ve(a) {
295
+ var x = a.prototype;
296
+ return !!(x && x.isReactComponent);
297
297
  }
298
- function Te(n, g, y) {
299
- if (n == null)
298
+ function z(a, x, j) {
299
+ if (a == null)
300
300
  return "";
301
- if (typeof n == "function")
302
- return ct(n, Ht(n));
303
- if (typeof n == "string")
304
- return he(n);
305
- switch (n) {
301
+ if (typeof a == "function")
302
+ return Te(a, Ve(a));
303
+ if (typeof a == "string")
304
+ return se(a);
305
+ switch (a) {
306
306
  case m:
307
- return he("Suspense");
307
+ return se("Suspense");
308
308
  case l:
309
- return he("SuspenseList");
309
+ return se("SuspenseList");
310
310
  }
311
- if (typeof n == "object")
312
- switch (n.$$typeof) {
311
+ if (typeof a == "object")
312
+ switch (a.$$typeof) {
313
313
  case c:
314
- return It(n.render);
315
- case x:
316
- return Te(n.type, g, y);
317
- case v: {
318
- var S = n, A = S._payload, D = S._init;
314
+ return Pe(a.render);
315
+ case f:
316
+ return z(a.type, x, j);
317
+ case b: {
318
+ var E = a, V = E._payload, M = E._init;
319
319
  try {
320
- return Te(D(A), g, y);
320
+ return z(M(V), x, j);
321
321
  } catch {
322
322
  }
323
323
  }
324
324
  }
325
325
  return "";
326
326
  }
327
- var Ne = Object.prototype.hasOwnProperty, dt = {}, mt = j.ReactDebugCurrentFrame;
328
- function Oe(n) {
329
- if (n) {
330
- var g = n._owner, y = Te(n.type, n._source, g ? g.type : null);
331
- mt.setExtraStackFrame(y);
327
+ var ne = Object.prototype.hasOwnProperty, ie = {}, be = k.ReactDebugCurrentFrame;
328
+ function ye(a) {
329
+ if (a) {
330
+ var x = a._owner, j = z(a.type, a._source, x ? x.type : null);
331
+ be.setExtraStackFrame(j);
332
332
  } else
333
- mt.setExtraStackFrame(null);
333
+ be.setExtraStackFrame(null);
334
334
  }
335
- function Wt(n, g, y, S, A) {
335
+ function Ae(a, x, j, E, V) {
336
336
  {
337
- var D = Function.call.bind(Ne);
338
- for (var P in n)
339
- if (D(n, P)) {
340
- var R = void 0;
337
+ var M = Function.call.bind(ne);
338
+ for (var P in a)
339
+ if (M(a, P)) {
340
+ var L = void 0;
341
341
  try {
342
- if (typeof n[P] != "function") {
343
- var X = Error((S || "React class") + ": " + y + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
344
- throw X.name = "Invariant Violation", X;
342
+ if (typeof a[P] != "function") {
343
+ var ee = Error((E || "React class") + ": " + j + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
344
+ throw ee.name = "Invariant Violation", ee;
345
345
  }
346
- R = n[P](g, P, S, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
347
- } catch (W) {
348
- R = W;
346
+ L = a[P](x, P, E, j, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
347
+ } catch (q) {
348
+ L = q;
349
349
  }
350
- R && !(R instanceof Error) && (Oe(A), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", S || "React class", y, P, typeof R), Oe(null)), R instanceof Error && !(R.message in dt) && (dt[R.message] = !0, Oe(A), b("Failed %s type: %s", y, R.message), Oe(null));
350
+ L && !(L instanceof Error) && (ye(V), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", E || "React class", j, P, typeof L), ye(null)), L instanceof Error && !(L.message in ie) && (ie[L.message] = !0, ye(V), v("Failed %s type: %s", j, L.message), ye(null));
351
351
  }
352
352
  }
353
353
  }
354
354
  var Bt = Array.isArray;
355
- function He(n) {
356
- return Bt(n);
355
+ function Je(a) {
356
+ return Bt(a);
357
357
  }
358
- function zt(n) {
358
+ function zt(a) {
359
359
  {
360
- var g = typeof Symbol == "function" && Symbol.toStringTag, y = g && n[Symbol.toStringTag] || n.constructor.name || "Object";
361
- return y;
360
+ var x = typeof Symbol == "function" && Symbol.toStringTag, j = x && a[Symbol.toStringTag] || a.constructor.name || "Object";
361
+ return j;
362
362
  }
363
363
  }
364
- function qt(n) {
364
+ function qt(a) {
365
365
  try {
366
- return ut(n), !1;
366
+ return xt(a), !1;
367
367
  } catch {
368
368
  return !0;
369
369
  }
370
370
  }
371
- function ut(n) {
372
- return "" + n;
371
+ function xt(a) {
372
+ return "" + a;
373
373
  }
374
- function gt(n) {
375
- if (qt(n))
376
- return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", zt(n)), ut(n);
374
+ function ft(a) {
375
+ if (qt(a))
376
+ return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", zt(a)), xt(a);
377
377
  }
378
- var ht = j.ReactCurrentOwner, Yt = {
378
+ var pt = k.ReactCurrentOwner, Yt = {
379
379
  key: !0,
380
380
  ref: !0,
381
381
  __self: !0,
382
382
  __source: !0
383
- }, xt, ft;
384
- function Jt(n) {
385
- if (Ne.call(n, "ref")) {
386
- var g = Object.getOwnPropertyDescriptor(n, "ref").get;
387
- if (g && g.isReactWarning)
383
+ }, bt, yt;
384
+ function Jt(a) {
385
+ if (ne.call(a, "ref")) {
386
+ var x = Object.getOwnPropertyDescriptor(a, "ref").get;
387
+ if (x && x.isReactWarning)
388
388
  return !1;
389
389
  }
390
- return n.ref !== void 0;
390
+ return a.ref !== void 0;
391
391
  }
392
- function Gt(n) {
393
- if (Ne.call(n, "key")) {
394
- var g = Object.getOwnPropertyDescriptor(n, "key").get;
395
- if (g && g.isReactWarning)
392
+ function Gt(a) {
393
+ if (ne.call(a, "key")) {
394
+ var x = Object.getOwnPropertyDescriptor(a, "key").get;
395
+ if (x && x.isReactWarning)
396
396
  return !1;
397
397
  }
398
- return n.key !== void 0;
398
+ return a.key !== void 0;
399
399
  }
400
- function Kt(n, g) {
401
- typeof n.ref == "string" && ht.current;
400
+ function Kt(a, x) {
401
+ typeof a.ref == "string" && pt.current;
402
402
  }
403
- function Qt(n, g) {
403
+ function Qt(a, x) {
404
404
  {
405
- var y = function() {
406
- xt || (xt = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", g));
405
+ var j = function() {
406
+ bt || (bt = !0, v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
407
407
  };
408
- y.isReactWarning = !0, Object.defineProperty(n, "key", {
409
- get: y,
408
+ j.isReactWarning = !0, Object.defineProperty(a, "key", {
409
+ get: j,
410
410
  configurable: !0
411
411
  });
412
412
  }
413
413
  }
414
- function Xt(n, g) {
414
+ function Xt(a, x) {
415
415
  {
416
- var y = function() {
417
- ft || (ft = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", g));
416
+ var j = function() {
417
+ yt || (yt = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
418
418
  };
419
- y.isReactWarning = !0, Object.defineProperty(n, "ref", {
420
- get: y,
419
+ j.isReactWarning = !0, Object.defineProperty(a, "ref", {
420
+ get: j,
421
421
  configurable: !0
422
422
  });
423
423
  }
424
424
  }
425
- var Zt = function(n, g, y, S, A, D, P) {
426
- var R = {
425
+ var Zt = function(a, x, j, E, V, M, P) {
426
+ var L = {
427
427
  // This tag allows us to uniquely identify this as a React Element
428
428
  $$typeof: s,
429
429
  // Built-in properties that belong on the element
430
- type: n,
431
- key: g,
432
- ref: y,
430
+ type: a,
431
+ key: x,
432
+ ref: j,
433
433
  props: P,
434
434
  // Record the component responsible for creating this element.
435
- _owner: D
435
+ _owner: M
436
436
  };
437
- return R._store = {}, Object.defineProperty(R._store, "validated", {
437
+ return L._store = {}, Object.defineProperty(L._store, "validated", {
438
438
  configurable: !1,
439
439
  enumerable: !1,
440
440
  writable: !0,
441
441
  value: !1
442
- }), Object.defineProperty(R, "_self", {
442
+ }), Object.defineProperty(L, "_self", {
443
443
  configurable: !1,
444
444
  enumerable: !1,
445
445
  writable: !1,
446
- value: S
447
- }), Object.defineProperty(R, "_source", {
446
+ value: E
447
+ }), Object.defineProperty(L, "_source", {
448
448
  configurable: !1,
449
449
  enumerable: !1,
450
450
  writable: !1,
451
- value: A
452
- }), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
451
+ value: V
452
+ }), Object.freeze && (Object.freeze(L.props), Object.freeze(L)), L;
453
453
  };
454
- function er(n, g, y, S, A) {
454
+ function er(a, x, j, E, V) {
455
455
  {
456
- var D, P = {}, R = null, X = null;
457
- y !== void 0 && (gt(y), R = "" + y), Gt(g) && (gt(g.key), R = "" + g.key), Jt(g) && (X = g.ref, Kt(g, A));
458
- for (D in g)
459
- Ne.call(g, D) && !Yt.hasOwnProperty(D) && (P[D] = g[D]);
460
- if (n && n.defaultProps) {
461
- var W = n.defaultProps;
462
- for (D in W)
463
- P[D] === void 0 && (P[D] = W[D]);
456
+ var M, P = {}, L = null, ee = null;
457
+ j !== void 0 && (ft(j), L = "" + j), Gt(x) && (ft(x.key), L = "" + x.key), Jt(x) && (ee = x.ref, Kt(x, V));
458
+ for (M in x)
459
+ ne.call(x, M) && !Yt.hasOwnProperty(M) && (P[M] = x[M]);
460
+ if (a && a.defaultProps) {
461
+ var q = a.defaultProps;
462
+ for (M in q)
463
+ P[M] === void 0 && (P[M] = q[M]);
464
464
  }
465
- if (R || X) {
466
- var z = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
467
- R && Qt(P, z), X && Xt(P, z);
465
+ if (L || ee) {
466
+ var J = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
467
+ L && Qt(P, J), ee && Xt(P, J);
468
468
  }
469
- return Zt(n, R, X, A, S, ht.current, P);
469
+ return Zt(a, L, ee, V, E, pt.current, P);
470
470
  }
471
471
  }
472
- var We = j.ReactCurrentOwner, pt = j.ReactDebugCurrentFrame;
473
- function be(n) {
474
- if (n) {
475
- var g = n._owner, y = Te(n.type, n._source, g ? g.type : null);
476
- pt.setExtraStackFrame(y);
472
+ var Ge = k.ReactCurrentOwner, vt = k.ReactDebugCurrentFrame;
473
+ function ke(a) {
474
+ if (a) {
475
+ var x = a._owner, j = z(a.type, a._source, x ? x.type : null);
476
+ vt.setExtraStackFrame(j);
477
477
  } else
478
- pt.setExtraStackFrame(null);
478
+ vt.setExtraStackFrame(null);
479
479
  }
480
- var Be;
481
- Be = !1;
482
- function ze(n) {
483
- return typeof n == "object" && n !== null && n.$$typeof === s;
480
+ var Ke;
481
+ Ke = !1;
482
+ function Qe(a) {
483
+ return typeof a == "object" && a !== null && a.$$typeof === s;
484
484
  }
485
- function bt() {
485
+ function jt() {
486
486
  {
487
- if (We.current) {
488
- var n = N(We.current.type);
489
- if (n)
487
+ if (Ge.current) {
488
+ var a = _(Ge.current.type);
489
+ if (a)
490
490
  return `
491
491
 
492
- Check the render method of \`` + n + "`.";
492
+ Check the render method of \`` + a + "`.";
493
493
  }
494
494
  return "";
495
495
  }
496
496
  }
497
- function tr(n) {
497
+ function tr(a) {
498
498
  return "";
499
499
  }
500
- var yt = {};
501
- function rr(n) {
500
+ var wt = {};
501
+ function rr(a) {
502
502
  {
503
- var g = bt();
504
- if (!g) {
505
- var y = typeof n == "string" ? n : n.displayName || n.name;
506
- y && (g = `
503
+ var x = jt();
504
+ if (!x) {
505
+ var j = typeof a == "string" ? a : a.displayName || a.name;
506
+ j && (x = `
507
507
 
508
- Check the top-level render call using <` + y + ">.");
508
+ Check the top-level render call using <` + j + ">.");
509
509
  }
510
- return g;
510
+ return x;
511
511
  }
512
512
  }
513
- function vt(n, g) {
513
+ function Nt(a, x) {
514
514
  {
515
- if (!n._store || n._store.validated || n.key != null)
515
+ if (!a._store || a._store.validated || a.key != null)
516
516
  return;
517
- n._store.validated = !0;
518
- var y = rr(g);
519
- if (yt[y])
517
+ a._store.validated = !0;
518
+ var j = rr(x);
519
+ if (wt[j])
520
520
  return;
521
- yt[y] = !0;
522
- var S = "";
523
- n && n._owner && n._owner !== We.current && (S = " It was passed a child from " + N(n._owner.type) + "."), be(n), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, S), be(null);
521
+ wt[j] = !0;
522
+ var E = "";
523
+ a && a._owner && a._owner !== Ge.current && (E = " It was passed a child from " + _(a._owner.type) + "."), ke(a), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', j, E), ke(null);
524
524
  }
525
525
  }
526
- function jt(n, g) {
526
+ function kt(a, x) {
527
527
  {
528
- if (typeof n != "object")
528
+ if (typeof a != "object")
529
529
  return;
530
- if (He(n))
531
- for (var y = 0; y < n.length; y++) {
532
- var S = n[y];
533
- ze(S) && vt(S, g);
530
+ if (Je(a))
531
+ for (var j = 0; j < a.length; j++) {
532
+ var E = a[j];
533
+ Qe(E) && Nt(E, x);
534
534
  }
535
- else if (ze(n))
536
- n._store && (n._store.validated = !0);
537
- else if (n) {
538
- var A = f(n);
539
- if (typeof A == "function" && A !== n.entries)
540
- for (var D = A.call(n), P; !(P = D.next()).done; )
541
- ze(P.value) && vt(P.value, g);
535
+ else if (Qe(a))
536
+ a._store && (a._store.validated = !0);
537
+ else if (a) {
538
+ var V = w(a);
539
+ if (typeof V == "function" && V !== a.entries)
540
+ for (var M = V.call(a), P; !(P = M.next()).done; )
541
+ Qe(P.value) && Nt(P.value, x);
542
542
  }
543
543
  }
544
544
  }
545
- function sr(n) {
545
+ function sr(a) {
546
546
  {
547
- var g = n.type;
548
- if (g == null || typeof g == "string")
547
+ var x = a.type;
548
+ if (x == null || typeof x == "string")
549
549
  return;
550
- var y;
551
- if (typeof g == "function")
552
- y = g.propTypes;
553
- else if (typeof g == "object" && (g.$$typeof === c || // Note: Memo only checks outer props here.
550
+ var j;
551
+ if (typeof x == "function")
552
+ j = x.propTypes;
553
+ else if (typeof x == "object" && (x.$$typeof === c || // Note: Memo only checks outer props here.
554
554
  // Inner props are checked in the reconciler.
555
- g.$$typeof === x))
556
- y = g.propTypes;
555
+ x.$$typeof === f))
556
+ j = x.propTypes;
557
557
  else
558
558
  return;
559
- if (y) {
560
- var S = N(g);
561
- Wt(y, n.props, "prop", S, n);
562
- } else if (g.PropTypes !== void 0 && !Be) {
563
- Be = !0;
564
- var A = N(g);
565
- b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", A || "Unknown");
559
+ if (j) {
560
+ var E = _(x);
561
+ Ae(j, a.props, "prop", E, a);
562
+ } else if (x.PropTypes !== void 0 && !Ke) {
563
+ Ke = !0;
564
+ var V = _(x);
565
+ v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", V || "Unknown");
566
566
  }
567
- typeof g.getDefaultProps == "function" && !g.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
567
+ typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
568
568
  }
569
569
  }
570
- function ar(n) {
570
+ function ar(a) {
571
571
  {
572
- for (var g = Object.keys(n.props), y = 0; y < g.length; y++) {
573
- var S = g[y];
574
- if (S !== "children" && S !== "key") {
575
- be(n), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), be(null);
572
+ for (var x = Object.keys(a.props), j = 0; j < x.length; j++) {
573
+ var E = x[j];
574
+ if (E !== "children" && E !== "key") {
575
+ ke(a), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", E), ke(null);
576
576
  break;
577
577
  }
578
578
  }
579
- n.ref !== null && (be(n), b("Invalid attribute `ref` supplied to `React.Fragment`."), be(null));
579
+ a.ref !== null && (ke(a), v("Invalid attribute `ref` supplied to `React.Fragment`."), ke(null));
580
580
  }
581
581
  }
582
- var wt = {};
583
- function Nt(n, g, y, S, A, D) {
582
+ var _t = {};
583
+ function Et(a, x, j, E, V, M) {
584
584
  {
585
- var P = O(n);
585
+ var P = S(a);
586
586
  if (!P) {
587
- var R = "";
588
- (n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
589
- var X = tr();
590
- X ? R += X : R += bt();
591
- var W;
592
- n === null ? W = "null" : He(n) ? W = "array" : n !== void 0 && n.$$typeof === s ? (W = "<" + (N(n.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : W = typeof n, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, R);
587
+ var L = "";
588
+ (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (L += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
589
+ var ee = tr();
590
+ ee ? L += ee : L += jt();
591
+ var q;
592
+ a === null ? q = "null" : Je(a) ? q = "array" : a !== void 0 && a.$$typeof === s ? (q = "<" + (_(a.type) || "Unknown") + " />", L = " Did you accidentally export a JSX literal instead of a component?") : q = typeof a, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, L);
593
593
  }
594
- var z = er(n, g, y, A, D);
595
- if (z == null)
596
- return z;
594
+ var J = er(a, x, j, V, M);
595
+ if (J == null)
596
+ return J;
597
597
  if (P) {
598
- var re = g.children;
599
- if (re !== void 0)
600
- if (S)
601
- if (He(re)) {
602
- for (var ye = 0; ye < re.length; ye++)
603
- jt(re[ye], n);
604
- Object.freeze && Object.freeze(re);
598
+ var le = x.children;
599
+ if (le !== void 0)
600
+ if (E)
601
+ if (Je(le)) {
602
+ for (var _e = 0; _e < le.length; _e++)
603
+ kt(le[_e], a);
604
+ Object.freeze && Object.freeze(le);
605
605
  } else
606
- b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
606
+ v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
607
607
  else
608
- jt(re, n);
608
+ kt(le, a);
609
609
  }
610
- if (Ne.call(g, "key")) {
611
- var xe = N(n), ee = Object.keys(g).filter(function(dr) {
610
+ if (ne.call(x, "key")) {
611
+ var ve = _(a), ae = Object.keys(x).filter(function(dr) {
612
612
  return dr !== "key";
613
- }), qe = ee.length > 0 ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}";
614
- if (!wt[xe + qe]) {
615
- var cr = ee.length > 0 ? "{" + ee.join(": ..., ") + ": ...}" : "{}";
616
- b(`A props object containing a "key" prop is being spread into JSX:
613
+ }), Xe = ae.length > 0 ? "{key: someKey, " + ae.join(": ..., ") + ": ...}" : "{key: someKey}";
614
+ if (!_t[ve + Xe]) {
615
+ var cr = ae.length > 0 ? "{" + ae.join(": ..., ") + ": ...}" : "{}";
616
+ v(`A props object containing a "key" prop is being spread into JSX:
617
617
  let props = %s;
618
618
  <%s {...props} />
619
619
  React keys must be passed directly to JSX without using spread:
620
620
  let props = %s;
621
- <%s key={someKey} {...props} />`, qe, xe, cr, xe), wt[xe + qe] = !0;
621
+ <%s key={someKey} {...props} />`, Xe, ve, cr, ve), _t[ve + Xe] = !0;
622
622
  }
623
623
  }
624
- return n === a ? ar(z) : sr(z), z;
624
+ return a === n ? ar(J) : sr(J), J;
625
625
  }
626
626
  }
627
- function nr(n, g, y) {
628
- return Nt(n, g, y, !0);
627
+ function nr(a, x, j) {
628
+ return Et(a, x, j, !0);
629
629
  }
630
- function or(n, g, y) {
631
- return Nt(n, g, y, !1);
630
+ function or(a, x, j) {
631
+ return Et(a, x, j, !1);
632
632
  }
633
633
  var ir = or, lr = nr;
634
- _e.Fragment = a, _e.jsx = ir, _e.jsxs = lr;
635
- }()), _e;
634
+ $e.Fragment = n, $e.jsx = ir, $e.jsxs = lr;
635
+ }()), $e;
636
636
  }
637
- process.env.NODE_ENV === "production" ? Ze.exports = Er() : Ze.exports = Cr();
638
- var e = Ze.exports;
639
- const me = {
637
+ process.env.NODE_ENV === "production" ? nt.exports = _r() : nt.exports = Er();
638
+ var e = nt.exports;
639
+ const pe = {
640
640
  domain: "https://studio.3speak.tv",
641
641
  kThreeSpeakApiUrl: "https://studio.3speak.tv/mobile/api",
642
642
  userOwnerThumb: (t) => `https://images.hive.blog/u/${t}/avatar`,
643
643
  graphQLServerUrl: "https://union.us-02.infra.3speak.tv"
644
- }, Je = new Nr([
644
+ }, et = new Nr([
645
645
  "https://api.hive.blog",
646
646
  "https://api.syncad.com",
647
647
  "https://api.deathwing.me"
648
648
  ]);
649
- class Sr {
649
+ class Cr {
650
650
  constructor() {
651
651
  // Common data fields fragment (for reuse)
652
- $e(this, "commonFields", `
652
+ De(this, "commonFields", `
653
653
  items {
654
654
  created_at
655
655
  title
@@ -682,9 +682,9 @@ class Sr {
682
682
  // Generic GraphQL feed fetcher
683
683
  async getGQLFeed(s, r) {
684
684
  var o, d, i;
685
- const a = `${me.graphQLServerUrl}/api/v2/graphql`;
685
+ const n = `${pe.graphQLServerUrl}/api/v2/graphql`;
686
686
  try {
687
- const u = await fetch(a, {
687
+ const u = await fetch(n, {
688
688
  method: "POST",
689
689
  headers: {
690
690
  "Content-Type": "application/json"
@@ -708,7 +708,7 @@ class Sr {
708
708
  }
709
709
  }
710
710
  async handleLogin(s) {
711
- const r = `${me.domain}/mobile/login`, a = await fetch(r, {
711
+ const r = `${pe.domain}/mobile/login`, n = await fetch(r, {
712
712
  method: "POST",
713
713
  headers: { "Content-Type": "application/json" },
714
714
  body: JSON.stringify({
@@ -718,17 +718,17 @@ class Sr {
718
718
  username: s.username
719
719
  })
720
720
  });
721
- if (a.ok)
722
- return await a.json();
723
- throw new Error(`Login API error: ${await a.text()}`);
721
+ if (n.ok)
722
+ return await n.json();
723
+ throw new Error(`Login API error: ${await n.text()}`);
724
724
  }
725
725
  async handleUpvote({
726
726
  author: s,
727
727
  permlink: r,
728
- weight: a,
728
+ weight: n,
729
729
  authToken: o
730
730
  }) {
731
- const d = `${me.domain}/mobile/vote`, i = await fetch(d, {
731
+ const d = `${pe.domain}/mobile/vote`, i = await fetch(d, {
732
732
  method: "POST",
733
733
  headers: {
734
734
  "Content-Type": "application/json",
@@ -737,7 +737,7 @@ class Sr {
737
737
  body: JSON.stringify({
738
738
  author: s,
739
739
  permlink: r,
740
- weight: a
740
+ weight: n
741
741
  })
742
742
  });
743
743
  if (i.ok)
@@ -750,10 +750,10 @@ class Sr {
750
750
  async handleComment({
751
751
  author: s,
752
752
  permlink: r,
753
- body: a,
753
+ body: n,
754
754
  authToken: o
755
755
  }) {
756
- const d = `${me.domain}/mobile/comment`, i = await fetch(d, {
756
+ const d = `${pe.domain}/mobile/comment`, i = await fetch(d, {
757
757
  method: "POST",
758
758
  headers: {
759
759
  "Content-Type": "application/json",
@@ -762,7 +762,7 @@ class Sr {
762
762
  body: JSON.stringify({
763
763
  author: s,
764
764
  permlink: r,
765
- comment: a
765
+ comment: n
766
766
  })
767
767
  });
768
768
  if (i.ok)
@@ -773,17 +773,17 @@ class Sr {
773
773
  }
774
774
  }
775
775
  async getVideoDetails(s, r) {
776
- const a = `${me.kThreeSpeakApiUrl}/video/@${s}/${r}`, o = await fetch(a);
776
+ const n = `${pe.kThreeSpeakApiUrl}/video/@${s}/${r}`, o = await fetch(n);
777
777
  if (o.ok)
778
778
  return await o.json();
779
779
  console.error("Failed to fetch video details:", o.statusText);
780
780
  }
781
781
  // Common feed fetching method to reduce code duplication
782
- async fetchFeed(s, r, a, o, d = { limit: 50, skip: 0 }) {
782
+ async fetchFeed(s, r, n, o, d = { limit: 50, skip: 0 }) {
783
783
  const { limit: i = 50, skip: u = 0 } = d, c = `
784
784
  query ${s} {
785
785
  ${r}(
786
- spkvideo: { ${a} }
786
+ spkvideo: { ${n} }
787
787
  feedOptions: ${o}
788
788
  pagination: { limit: ${i}, skip: ${u} }
789
789
  ) {
@@ -803,12 +803,12 @@ class Sr {
803
803
  );
804
804
  }
805
805
  async getHomeVideos(s = 0) {
806
- const r = `${me.kThreeSpeakApiUrl}/feed/home?skip=${s}`, a = await fetch(r);
807
- if (a.ok) {
808
- const o = await a.json();
806
+ const r = `${pe.kThreeSpeakApiUrl}/feed/home?skip=${s}`, n = await fetch(r);
807
+ if (n.ok) {
808
+ const o = await n.json();
809
809
  return Array.isArray(o) ? o : [];
810
810
  } else
811
- return console.error("Failed to fetch home videos:", a.statusText), [];
811
+ return console.error("Failed to fetch home videos:", n.statusText), [];
812
812
  }
813
813
  async getTrendingVideos(s = 0) {
814
814
  return await this.fetchFeed(
@@ -864,8 +864,8 @@ class Sr {
864
864
  { skip: r }
865
865
  );
866
866
  }
867
- async getSearchFeed(s, r = 0, a) {
868
- const o = a ? `{ byLang: { _eq: "${a}" } }` : "{}", d = `
867
+ async getSearchFeed(s, r = 0, n) {
868
+ const o = n ? `{ byLang: { _eq: "${n}" } }` : "{}", d = `
869
869
  query SearchFeed {
870
870
  searchFeed(
871
871
  searchTerm: "${s}"
@@ -880,8 +880,8 @@ class Sr {
880
880
  return this.convertGQLItemsToThreeSpeakVideos(i);
881
881
  }
882
882
  async getTrendingTags() {
883
- var a, o;
884
- const s = `${me.graphQLServerUrl}/api/v2/graphql`, r = `
883
+ var n, o;
884
+ const s = `${pe.graphQLServerUrl}/api/v2/graphql`, r = `
885
885
  query TrendingTags {
886
886
  trendingTags(limit: 50) {
887
887
  tags {
@@ -909,7 +909,7 @@ class Sr {
909
909
  throw new Error(
910
910
  `GraphQL error: ${i.errors.map((u) => u.message).join(", ")}`
911
911
  );
912
- return ((o = (a = i.data) == null ? void 0 : a.trendingTags) == null ? void 0 : o.tags) || [];
912
+ return ((o = (n = i.data) == null ? void 0 : n.trendingTags) == null ? void 0 : o.tags) || [];
913
913
  } catch (d) {
914
914
  throw console.error("Failed to fetch trending tags:", d), d;
915
915
  }
@@ -917,12 +917,12 @@ class Sr {
917
917
  // Convert GQL items to ThreeSpeakVideo format
918
918
  convertGQLItemsToThreeSpeakVideos(s) {
919
919
  return s.map((r) => {
920
- var o, d, i, u, c, m, l, x, v, w, k, T, f, j;
921
- let a = null;
920
+ var o, d, i, u, c, m, l, f, b, p, h, T, w, k;
921
+ let n = null;
922
922
  try {
923
- typeof r.spkvideo == "string" ? a = JSON.parse(r.spkvideo) : a = r.spkvideo;
924
- } catch (b) {
925
- console.error("Error parsing spkvideo JSON", b);
923
+ typeof r.spkvideo == "string" ? n = JSON.parse(r.spkvideo) : n = r.spkvideo;
924
+ } catch (v) {
925
+ console.error("Error parsing spkvideo JSON", v);
926
926
  }
927
927
  return {
928
928
  title: r.title || "Untitled",
@@ -930,33 +930,33 @@ class Sr {
930
930
  permlink: r.permlink || "",
931
931
  created: new Date(r.created_at),
932
932
  category: r.tags && r.tags.length > 0 ? r.tags[0] : "general",
933
- duration: (a == null ? void 0 : a.duration) || ((c = (u = (i = (d = r.json_metadata) == null ? void 0 : d.raw) == null ? void 0 : i.video) == null ? void 0 : u.info) == null ? void 0 : c.duration) || 0,
934
- thumbnail: (a == null ? void 0 : a.thumbnail_url) || ((v = (x = (l = (m = r.json_metadata) == null ? void 0 : m.raw) == null ? void 0 : l.video) == null ? void 0 : x.info) == null ? void 0 : v.thumbnail),
933
+ duration: (n == null ? void 0 : n.duration) || ((c = (u = (i = (d = r.json_metadata) == null ? void 0 : d.raw) == null ? void 0 : i.video) == null ? void 0 : u.info) == null ? void 0 : c.duration) || 0,
934
+ thumbnail: (n == null ? void 0 : n.thumbnail_url) || ((b = (f = (l = (m = r.json_metadata) == null ? void 0 : m.raw) == null ? void 0 : l.video) == null ? void 0 : f.info) == null ? void 0 : b.thumbnail),
935
935
  // Include stats from GraphQL response
936
- numOfUpvotes: (w = r.stats) == null ? void 0 : w.num_votes,
937
- numOfComments: (k = r.stats) == null ? void 0 : k.num_comments,
936
+ numOfUpvotes: (p = r.stats) == null ? void 0 : p.num_votes,
937
+ numOfComments: (h = r.stats) == null ? void 0 : h.num_comments,
938
938
  hiveValue: (T = r.stats) == null ? void 0 : T.total_hive_reward,
939
939
  // Store active_voters for later use
940
- active_votes: ((j = (f = r.stats) == null ? void 0 : f.active_voters) == null ? void 0 : j.map((b) => ({
941
- voter: b.voter,
942
- percent: b.percent,
943
- rshares: b.rshares,
944
- weight: b.weight
940
+ active_votes: ((k = (w = r.stats) == null ? void 0 : w.active_voters) == null ? void 0 : k.map((v) => ({
941
+ voter: v.voter,
942
+ percent: v.percent,
943
+ rshares: v.rshares,
944
+ weight: v.weight
945
945
  }))) || []
946
946
  };
947
947
  });
948
948
  }
949
949
  async getContentStats(s, r) {
950
950
  try {
951
- const a = await Je.call(
951
+ const n = await et.call(
952
952
  "condenser_api",
953
953
  "get_content",
954
954
  [s, r]
955
955
  );
956
956
  return {
957
- numOfUpvotes: (a == null ? void 0 : a.net_votes) ?? 0,
958
- numOfComments: (a == null ? void 0 : a.children) ?? 0,
959
- hiveValue: a != null && a.pending_payout_value ? parseFloat(a.pending_payout_value) : 0
957
+ numOfUpvotes: (n == null ? void 0 : n.net_votes) ?? 0,
958
+ numOfComments: (n == null ? void 0 : n.children) ?? 0,
959
+ hiveValue: n != null && n.pending_payout_value ? parseFloat(n.pending_payout_value) : 0
960
960
  };
961
961
  } catch {
962
962
  return {
@@ -968,23 +968,23 @@ class Sr {
968
968
  }
969
969
  async getActiveVotes(s, r) {
970
970
  try {
971
- return await Je.call(
971
+ return await et.call(
972
972
  "condenser_api",
973
973
  "get_active_votes",
974
974
  [s, r]
975
975
  );
976
- } catch (a) {
977
- return console.error("Error calling get_active_votes:", a), [];
976
+ } catch (n) {
977
+ return console.error("Error calling get_active_votes:", n), [];
978
978
  }
979
979
  }
980
980
  async getCommentsList(s, r) {
981
981
  try {
982
- const a = await Je.call(
982
+ const n = await et.call(
983
983
  "bridge",
984
984
  "get_discussion",
985
985
  [s, r]
986
986
  );
987
- return (Array.isArray(a) ? a : a && typeof a == "object" ? Object.values(a) : []).map((d) => {
987
+ return (Array.isArray(n) ? n : n && typeof n == "object" ? Object.values(n) : []).map((d) => {
988
988
  const i = d.depth;
989
989
  if (typeof i == "string") {
990
990
  const c = parseInt(i, 10);
@@ -1003,42 +1003,42 @@ class Sr {
1003
1003
  }
1004
1004
  return d;
1005
1005
  });
1006
- } catch (a) {
1007
- return console.error("Error fetching comments list:", a), [];
1006
+ } catch (n) {
1007
+ return console.error("Error fetching comments list:", n), [];
1008
1008
  }
1009
1009
  }
1010
1010
  async getMyVideos(s) {
1011
- const r = `${me.domain}/mobile/api/my-videos`, a = await fetch(r, {
1011
+ const r = `${pe.domain}/mobile/api/my-videos`, n = await fetch(r, {
1012
1012
  method: "GET",
1013
1013
  headers: {
1014
1014
  "Content-Type": "application/json",
1015
1015
  Authorization: s
1016
1016
  }
1017
1017
  });
1018
- if (a.ok) {
1019
- const o = await a.json();
1018
+ if (n.ok) {
1019
+ const o = await n.json();
1020
1020
  return Array.isArray(o) ? o : [];
1021
1021
  } else
1022
- throw console.error("Failed to fetch my videos:", a.statusText), new Error(`Failed to fetch my videos: ${a.status}`);
1022
+ throw console.error("Failed to fetch my videos:", n.statusText), new Error(`Failed to fetch my videos: ${n.status}`);
1023
1023
  }
1024
1024
  }
1025
- const Z = new Sr(), fe = (t) => t ? t.startsWith("Qm") || t.startsWith("baf") ? `https://ipfs-3speak.b-cdn.net/ipfs/${t}` : t.startsWith("http") ? t : t.startsWith("/") ? `https://3speak.tv${t}` : t : "/placeholder.svg", Tr = ({
1025
+ const te = new Cr(), je = (t) => t ? t.startsWith("Qm") || t.startsWith("baf") ? `https://ipfs-3speak.b-cdn.net/ipfs/${t}` : t.startsWith("http") ? t : t.startsWith("/") ? `https://3speak.tv${t}` : t : "/placeholder.svg", Sr = ({
1026
1026
  video: t,
1027
1027
  onVideoClick: s,
1028
1028
  onAuthorClick: r,
1029
- isGrid: a = !1
1029
+ isGrid: n = !1
1030
1030
  }) => {
1031
- const [o, d] = p({
1031
+ const [o, d] = y({
1032
1032
  numOfUpvotes: t.numOfUpvotes,
1033
1033
  numOfComments: t.numOfComments,
1034
1034
  hiveValue: t.hiveValue
1035
1035
  });
1036
- H(() => {
1036
+ B(() => {
1037
1037
  if (o.numOfUpvotes === void 0 && t.numOfUpvotes === void 0) {
1038
1038
  let c = !0;
1039
1039
  return (async () => {
1040
1040
  try {
1041
- const m = await Z.getContentStats(
1041
+ const m = await te.getContentStats(
1042
1042
  t.author || "",
1043
1043
  t.permlink || ""
1044
1044
  );
@@ -1057,8 +1057,8 @@ const Z = new Sr(), fe = (t) => t ? t.startsWith("Qm") || t.startsWith("baf") ?
1057
1057
  }, [t.author, t.permlink, o.numOfUpvotes, t.numOfUpvotes, t.numOfComments, t.hiveValue]);
1058
1058
  const i = (c) => {
1059
1059
  if (!c) return "00:00";
1060
- const m = Math.floor(c), l = Math.floor(m / 3600), x = Math.floor(m % 3600 / 60), v = m % 60, w = (k) => k.toString().padStart(2, "0");
1061
- return m < 60 ? `00:${w(v)}` : l === 0 ? `${w(x)}:${w(v)}` : `${w(l)}:${w(x)}:${w(v)}`;
1060
+ const m = Math.floor(c), l = Math.floor(m / 3600), f = Math.floor(m % 3600 / 60), b = m % 60, p = (h) => h.toString().padStart(2, "0");
1061
+ return m < 60 ? `00:${p(b)}` : l === 0 ? `${p(f)}:${p(b)}` : `${p(l)}:${p(f)}:${p(b)}`;
1062
1062
  }, u = (c) => c == null ? "" : c >= 1e6 ? `${(c / 1e6).toFixed(1)}M` : c >= 1e3 ? `${(c / 1e3).toFixed(1)}K` : c.toString();
1063
1063
  return /* @__PURE__ */ e.jsxs("div", { className: "group bg-card border border-border rounded-xl overflow-hidden shadow-card hover:shadow-card-hover transition-all duration-200 hover:-translate-y-1 cursor-pointer", children: [
1064
1064
  /* @__PURE__ */ e.jsxs(
@@ -1070,7 +1070,7 @@ const Z = new Sr(), fe = (t) => t ? t.startsWith("Qm") || t.startsWith("baf") ?
1070
1070
  /* @__PURE__ */ e.jsx(
1071
1071
  "img",
1072
1072
  {
1073
- src: fe(t.thumbnail),
1073
+ src: je(t.thumbnail),
1074
1074
  alt: t.title,
1075
1075
  onError: (c) => {
1076
1076
  c.target.src = `https://images.hive.blog/u/${t.author}/avatar`;
@@ -1079,10 +1079,10 @@ const Z = new Sr(), fe = (t) => t ? t.startsWith("Qm") || t.startsWith("baf") ?
1079
1079
  }
1080
1080
  ),
1081
1081
  t.duration && /* @__PURE__ */ e.jsxs("div", { className: "absolute bottom-3 right-3 bg-black/80 text-white text-xs px-2 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm", children: [
1082
- /* @__PURE__ */ e.jsx(Ft, { className: "w-3 h-3" }),
1082
+ /* @__PURE__ */ e.jsx(Pt, { className: "w-3 h-3" }),
1083
1083
  i(t.duration)
1084
1084
  ] }),
1085
- /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all duration-300 bg-black/20", children: /* @__PURE__ */ e.jsx("div", { className: "bg-primary hover:bg-primary-hover rounded-full p-4 transform scale-75 group-hover:scale-100 transition-all duration-300 shadow-lg", children: /* @__PURE__ */ e.jsx(et, { className: "w-6 h-6 text-primary-foreground ml-0.5", fill: "currentColor" }) }) }),
1085
+ /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all duration-300 bg-black/20", children: /* @__PURE__ */ e.jsx("div", { className: "bg-primary hover:bg-primary-hover rounded-full p-4 transform scale-75 group-hover:scale-100 transition-all duration-300 shadow-lg", children: /* @__PURE__ */ e.jsx(ot, { className: "w-6 h-6 text-primary-foreground ml-0.5", fill: "currentColor" }) }) }),
1086
1086
  /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 bg-gradient-overlay opacity-0 group-hover:opacity-30 transition-opacity duration-300" })
1087
1087
  ]
1088
1088
  }
@@ -1121,16 +1121,16 @@ const Z = new Sr(), fe = (t) => t ? t.startsWith("Qm") || t.startsWith("baf") ?
1121
1121
  ]
1122
1122
  }
1123
1123
  ),
1124
- /* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: nt(t.created, { addSuffix: !0 }) })
1124
+ /* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: mt(t.created, { addSuffix: !0 }) })
1125
1125
  ] }),
1126
1126
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between text-sm", children: [
1127
1127
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-4", children: [
1128
1128
  o.numOfUpvotes != null && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer", children: [
1129
- /* @__PURE__ */ e.jsx(tt, { className: "w-4 h-4" }),
1129
+ /* @__PURE__ */ e.jsx(it, { className: "w-4 h-4" }),
1130
1130
  /* @__PURE__ */ e.jsx("span", { children: u(o.numOfUpvotes) })
1131
1131
  ] }),
1132
1132
  o.numOfComments != null && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer", children: [
1133
- /* @__PURE__ */ e.jsx(rt, { className: "w-4 h-4" }),
1133
+ /* @__PURE__ */ e.jsx(lt, { className: "w-4 h-4" }),
1134
1134
  /* @__PURE__ */ e.jsx("span", { children: u(o.numOfComments) })
1135
1135
  ] })
1136
1136
  ] }),
@@ -1143,12 +1143,12 @@ const Z = new Sr(), fe = (t) => t ? t.startsWith("Qm") || t.startsWith("baf") ?
1143
1143
  ] })
1144
1144
  ] });
1145
1145
  };
1146
- var Q = /* @__PURE__ */ ((t) => (t.HOME = "home", t.TRENDING = "trending", t.NEW_VIDEOS = "newVideos", t.FIRST_UPLOADS = "firstUploads", t.USER = "user", t.COMMUNITY = "community", t.RELATED = "related", t.TAG_FEED = "tag_feed", t.SEARCH = "search", t))(Q || {});
1147
- const St = /* @__PURE__ */ new Map(), Or = ({
1146
+ var K = /* @__PURE__ */ ((t) => (t.HOME = "home", t.TRENDING = "trending", t.NEW_VIDEOS = "newVideos", t.FIRST_UPLOADS = "firstUploads", t.USER = "user", t.COMMUNITY = "community", t.RELATED = "related", t.TAG_FEED = "tag_feed", t.SEARCH = "search", t))(K || {});
1147
+ const $t = /* @__PURE__ */ new Map(), Tr = ({
1148
1148
  title: t,
1149
1149
  author: s,
1150
1150
  permlink: r,
1151
- createdAt: a,
1151
+ createdAt: n,
1152
1152
  video: o,
1153
1153
  currentUser: d,
1154
1154
  isContentVoted: i = !1,
@@ -1156,40 +1156,40 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1156
1156
  onTapComment: c,
1157
1157
  onTapUpvote: m,
1158
1158
  onTapShare: l,
1159
- onTapBookmark: x,
1160
- onTapAuthor: v,
1161
- onTapInfo: w
1159
+ onTapBookmark: f,
1160
+ onTapAuthor: b,
1161
+ onTapInfo: p
1162
1162
  }) => {
1163
- const [k, T] = p(o.numOfComments || 0), [f, j] = p(o.numOfUpvotes || 0), [b, M] = p(!1), [_, E] = p(!1), [C, Y] = p(""), h = (U) => {
1164
- Y(U), E(!0), setTimeout(() => E(!1), 3e3);
1165
- }, $ = (U, I) => `${U}:${I}`;
1166
- H(() => {
1167
- const U = $(s, r), I = St.get(U);
1168
- I ? (T(I.comments), j(I.upvotes)) : (async () => {
1169
- const J = await Z.getContentStats(s, r);
1170
- j(J.numOfUpvotes), T(J.numOfComments), St.set($(s, r), {
1171
- comments: J.numOfComments,
1172
- upvotes: J.numOfUpvotes
1163
+ const [h, T] = y(o.numOfComments || 0), [w, k] = y(o.numOfUpvotes || 0), [v, D] = y(!1), [N, R] = y(!1), [A, $] = y(""), g = (U) => {
1164
+ $(U), R(!0), setTimeout(() => R(!1), 3e3);
1165
+ }, C = (U, H) => `${U}:${H}`;
1166
+ B(() => {
1167
+ const U = C(s, r), H = $t.get(U);
1168
+ H ? (T(H.comments), k(H.upvotes)) : (async () => {
1169
+ const X = await te.getContentStats(s, r);
1170
+ k(X.numOfUpvotes), T(X.numOfComments), $t.set(C(s, r), {
1171
+ comments: X.numOfComments,
1172
+ upvotes: X.numOfUpvotes
1173
1173
  });
1174
1174
  })();
1175
1175
  }, [s, r]);
1176
- const O = () => {
1177
- c ? c(s, r) : h("Comments feature coming soon!");
1176
+ const S = () => {
1177
+ c ? c(s, r) : g("Comments feature coming soon!");
1178
1178
  }, F = () => {
1179
- m ? m(s, r) : h("Upvote feature requires authentication!");
1180
- }, G = () => {
1179
+ m ? m(s, r) : g("Upvote feature requires authentication!");
1180
+ }, O = () => {
1181
1181
  if (l)
1182
1182
  l(s, r);
1183
1183
  else {
1184
1184
  const U = `https://3speak.tv/user/${s}/${r}`;
1185
- navigator.share ? navigator.share({ title: t, url: U }) : (navigator.clipboard.writeText(U), h("Link copied to clipboard!"));
1185
+ navigator.share ? navigator.share({ title: t, url: U }) : (navigator.clipboard.writeText(U), g("Link copied to clipboard!"));
1186
1186
  }
1187
- }, N = () => {
1188
- x ? x(s, r) : (M(!b), h(
1189
- b ? "Removed from bookmarks" : "Added to bookmarks"
1187
+ }, _ = () => {
1188
+ f ? f(s, r) : (D(!v), g(
1189
+ v ? "Removed from bookmarks" : "Added to bookmarks"
1190
1190
  ));
1191
- }, L = () => v == null ? void 0 : v(s, r), V = () => {
1192
- w ? w(s, r) : h("Video details coming soon!");
1191
+ }, Y = () => b == null ? void 0 : b(s, r), Q = () => {
1192
+ p ? p(s, r) : g("Video details coming soon!");
1193
1193
  };
1194
1194
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1195
1195
  /* @__PURE__ */ e.jsxs("div", { className: "p-6 bg-card border-b border-border", children: [
@@ -1198,7 +1198,7 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1198
1198
  /* @__PURE__ */ e.jsx(
1199
1199
  "button",
1200
1200
  {
1201
- onClick: L,
1201
+ onClick: Y,
1202
1202
  className: "flex-shrink-0 group",
1203
1203
  children: /* @__PURE__ */ e.jsx(
1204
1204
  "img",
@@ -1218,7 +1218,7 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1218
1218
  /* @__PURE__ */ e.jsxs(
1219
1219
  "button",
1220
1220
  {
1221
- onClick: L,
1221
+ onClick: Y,
1222
1222
  className: "font-semibold text-card-foreground hover:text-primary transition-colors text-base",
1223
1223
  children: [
1224
1224
  "@",
@@ -1228,13 +1228,13 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1228
1228
  ),
1229
1229
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-4 mt-1 text-sm text-muted-foreground", children: [
1230
1230
  o.views && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
1231
- /* @__PURE__ */ e.jsx(Lt, { className: "w-4 h-4" }),
1231
+ /* @__PURE__ */ e.jsx(Vt, { className: "w-4 h-4" }),
1232
1232
  /* @__PURE__ */ e.jsxs("span", { children: [
1233
1233
  o.views.toLocaleString(),
1234
1234
  " views"
1235
1235
  ] })
1236
1236
  ] }),
1237
- a && /* @__PURE__ */ e.jsx("span", { children: nt(a, { addSuffix: !0 }) })
1237
+ n && /* @__PURE__ */ e.jsx("span", { children: mt(n, { addSuffix: !0 }) })
1238
1238
  ] })
1239
1239
  ] }) }),
1240
1240
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
@@ -1242,11 +1242,11 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1242
1242
  "button",
1243
1243
  {
1244
1244
  type: "button",
1245
- onClick: V,
1245
+ onClick: Q,
1246
1246
  className: "inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200",
1247
1247
  "aria-label": "Show description",
1248
1248
  children: [
1249
- /* @__PURE__ */ e.jsx(Rt, { className: "w-4 h-4" }),
1249
+ /* @__PURE__ */ e.jsx(At, { className: "w-4 h-4" }),
1250
1250
  /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: "Info" })
1251
1251
  ]
1252
1252
  }
@@ -1255,12 +1255,12 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1255
1255
  "button",
1256
1256
  {
1257
1257
  type: "button",
1258
- onClick: O,
1258
+ onClick: S,
1259
1259
  className: "inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200",
1260
1260
  "aria-label": "Show comments",
1261
1261
  children: [
1262
- /* @__PURE__ */ e.jsx(rt, { className: "w-4 h-4" }),
1263
- /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: k })
1262
+ /* @__PURE__ */ e.jsx(lt, { className: "w-4 h-4" }),
1263
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: h })
1264
1264
  ]
1265
1265
  }
1266
1266
  ),
@@ -1273,12 +1273,12 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1273
1273
  "aria-label": "Show upvotes",
1274
1274
  children: [
1275
1275
  /* @__PURE__ */ e.jsx(
1276
- tt,
1276
+ it,
1277
1277
  {
1278
1278
  className: `w-4 h-4 ${i ? "fill-current" : ""}`
1279
1279
  }
1280
1280
  ),
1281
- /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: f })
1281
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: w })
1282
1282
  ]
1283
1283
  }
1284
1284
  ),
@@ -1286,11 +1286,11 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1286
1286
  "button",
1287
1287
  {
1288
1288
  type: "button",
1289
- onClick: G,
1289
+ onClick: O,
1290
1290
  className: "inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-secondary/10 hover:text-secondary transition-all duration-200",
1291
1291
  "aria-label": "Share video",
1292
1292
  children: [
1293
- /* @__PURE__ */ e.jsx(st, { className: "w-4 h-4" }),
1293
+ /* @__PURE__ */ e.jsx(ct, { className: "w-4 h-4" }),
1294
1294
  /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: "Share" })
1295
1295
  ]
1296
1296
  }
@@ -1299,17 +1299,17 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1299
1299
  "button",
1300
1300
  {
1301
1301
  type: "button",
1302
- onClick: N,
1303
- className: `inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${b ? "bg-error/10 text-error" : "bg-muted text-muted-foreground hover:bg-error/10 hover:text-error"}`,
1302
+ onClick: _,
1303
+ className: `inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${v ? "bg-error/10 text-error" : "bg-muted text-muted-foreground hover:bg-error/10 hover:text-error"}`,
1304
1304
  "aria-label": "Bookmark video",
1305
1305
  children: [
1306
1306
  /* @__PURE__ */ e.jsx(
1307
1307
  hr,
1308
1308
  {
1309
- className: `w-4 h-4 ${b ? "fill-current" : ""}`
1309
+ className: `w-4 h-4 ${v ? "fill-current" : ""}`
1310
1310
  }
1311
1311
  ),
1312
- /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: b ? "Saved" : "Save" })
1312
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: v ? "Saved" : "Save" })
1313
1313
  ]
1314
1314
  }
1315
1315
  )
@@ -1321,147 +1321,149 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1321
1321
  " earned"
1322
1322
  ] }) }),
1323
1323
  o.category && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
1324
- /* @__PURE__ */ e.jsx(De, { className: "w-4 h-4 text-muted-foreground" }),
1324
+ /* @__PURE__ */ e.jsx(ze, { className: "w-4 h-4 text-muted-foreground" }),
1325
1325
  /* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground capitalize", children: o.category })
1326
1326
  ] })
1327
1327
  ] })
1328
1328
  ] })
1329
1329
  ] })
1330
1330
  ] }),
1331
- _ && /* @__PURE__ */ e.jsx("div", { className: "fixed bottom-4 right-4 z-50 animate-slide-up", children: /* @__PURE__ */ e.jsx("div", { className: "bg-card border border-border text-card-foreground rounded-lg px-4 py-3 shadow-lg max-w-sm", children: /* @__PURE__ */ e.jsx("div", { className: "font-medium", children: C }) }) })
1331
+ N && /* @__PURE__ */ e.jsx("div", { className: "fixed bottom-4 right-4 z-50 animate-slide-up", children: /* @__PURE__ */ e.jsx("div", { className: "bg-card border border-border text-card-foreground rounded-lg px-4 py-3 shadow-lg max-w-sm", children: /* @__PURE__ */ e.jsx("div", { className: "font-medium", children: A }) }) })
1332
1332
  ] });
1333
- }, Fe = /* @__PURE__ */ new Map(), ot = ({
1333
+ }, Me = /* @__PURE__ */ new Map(), ut = ({
1334
1334
  feedType: t,
1335
1335
  username: s,
1336
1336
  communityId: r,
1337
- tag: a,
1337
+ tag: n,
1338
1338
  onVideoClick: o,
1339
1339
  onAuthorClick: d
1340
1340
  }) => {
1341
- const [i, u] = p([]), [c, m] = p(!0), [l, x] = p(!1), [v, w] = p(null), [k, T] = p(!0), [f, j] = p(0), b = gr(() => {
1341
+ const [i, u] = y([]), [c, m] = y(!0), [l, f] = y(!1), [b, p] = y(null), [h, T] = y(!0), [w, k] = y(0), v = gr(() => {
1342
1342
  switch (t) {
1343
- case Q.USER:
1343
+ case K.USER:
1344
1344
  return `user:${s || ""}`;
1345
- case Q.COMMUNITY:
1345
+ case K.COMMUNITY:
1346
1346
  return `community:${r || ""}`;
1347
- case Q.TAG_FEED:
1348
- return `tag:${a || ""}`;
1347
+ case K.TAG_FEED:
1348
+ return `tag:${n || ""}`;
1349
+ case K.SEARCH:
1350
+ return `search:${n || ""}`;
1349
1351
  default:
1350
1352
  return t;
1351
1353
  }
1352
- }, [t, s, r, a]), M = je(
1353
- async (h) => {
1354
- var $, O, F, G, N, L, V, U, I, q, J, ne;
1355
- if (($ = h.author) != null && $.username) {
1356
- if (!h.permlink) return null;
1357
- let K = null;
1354
+ }, [t, s, r, n]), D = Ce(
1355
+ async (g) => {
1356
+ var C, S, F, O, _, Y, Q, U, H, re, X, ue;
1357
+ if ((C = g.author) != null && C.username) {
1358
+ if (!g.permlink) return null;
1359
+ let Z = null;
1358
1360
  try {
1359
- typeof h.spkvideo == "string" ? K = JSON.parse(h.spkvideo) : K = h.spkvideo;
1360
- } catch (B) {
1361
- console.error("Error parsing spkvideo JSON", B);
1361
+ typeof g.spkvideo == "string" ? Z = JSON.parse(g.spkvideo) : Z = g.spkvideo;
1362
+ } catch (I) {
1363
+ console.error("Error parsing spkvideo JSON", I);
1362
1364
  }
1363
- const ue = fe(K == null ? void 0 : K.thumbnail_url) || fe((N = (G = (F = (O = h.json_metadata) == null ? void 0 : O.raw) == null ? void 0 : F.video) == null ? void 0 : G.info) == null ? void 0 : N.thumbnail), ge = (K == null ? void 0 : K.duration) || ((I = (U = (V = (L = h.json_metadata) == null ? void 0 : L.raw) == null ? void 0 : V.video) == null ? void 0 : U.info) == null ? void 0 : I.duration) || 0;
1365
+ const we = je(Z == null ? void 0 : Z.thumbnail_url) || je((_ = (O = (F = (S = g.json_metadata) == null ? void 0 : S.raw) == null ? void 0 : F.video) == null ? void 0 : O.info) == null ? void 0 : _.thumbnail), Ne = (Z == null ? void 0 : Z.duration) || ((H = (U = (Q = (Y = g.json_metadata) == null ? void 0 : Y.raw) == null ? void 0 : Q.video) == null ? void 0 : U.info) == null ? void 0 : H.duration) || 0;
1364
1366
  return {
1365
- title: h.title || "Untitled",
1366
- author: h.author.username,
1367
- permlink: h.permlink,
1368
- created: new Date(h.created_at),
1369
- category: h.tags && h.tags.length > 0 ? h.tags[0] : "general",
1370
- duration: ge,
1371
- thumbnail: ue,
1372
- numOfUpvotes: ((q = h.stats) == null ? void 0 : q.num_votes) || h.numOfUpvotes,
1373
- numOfComments: ((J = h.stats) == null ? void 0 : J.num_comments) || h.numOfComments,
1374
- hiveValue: ((ne = h.stats) == null ? void 0 : ne.total_hive_reward) || h.hiveValue
1367
+ title: g.title || "Untitled",
1368
+ author: g.author.username,
1369
+ permlink: g.permlink,
1370
+ created: new Date(g.created_at),
1371
+ category: g.tags && g.tags.length > 0 ? g.tags[0] : "general",
1372
+ duration: Ne,
1373
+ thumbnail: we,
1374
+ numOfUpvotes: ((re = g.stats) == null ? void 0 : re.num_votes) || g.numOfUpvotes,
1375
+ numOfComments: ((X = g.stats) == null ? void 0 : X.num_comments) || g.numOfComments,
1376
+ hiveValue: ((ue = g.stats) == null ? void 0 : ue.total_hive_reward) || g.hiveValue
1375
1377
  };
1376
1378
  }
1377
- return h.owner ? {
1378
- title: h.title || "Untitled",
1379
- author: h.owner,
1380
- permlink: h.permlink || "",
1381
- created: new Date(h.created || Date.now()),
1382
- category: h.category || "general",
1383
- duration: h.duration,
1384
- thumbnail: fe(h.thumbnail),
1379
+ return g.owner ? {
1380
+ title: g.title || "Untitled",
1381
+ author: g.owner,
1382
+ permlink: g.permlink || "",
1383
+ created: new Date(g.created || Date.now()),
1384
+ category: g.category || "general",
1385
+ duration: g.duration,
1386
+ thumbnail: je(g.thumbnail),
1385
1387
  // Use stats from GraphQL if available
1386
- numOfUpvotes: h.numOfUpvotes,
1387
- numOfComments: h.numOfComments,
1388
- hiveValue: h.hiveValue
1388
+ numOfUpvotes: g.numOfUpvotes,
1389
+ numOfComments: g.numOfComments,
1390
+ hiveValue: g.hiveValue
1389
1391
  } : null;
1390
1392
  },
1391
1393
  []
1392
- ), _ = je(
1393
- async (h, $ = !1) => {
1394
+ ), N = Ce(
1395
+ async (g, C = !1) => {
1394
1396
  try {
1395
- let O = [];
1397
+ let S = [];
1396
1398
  switch (t) {
1397
- case Q.SEARCH:
1398
- a && (O = await Z.getSearchFeed(a, h));
1399
+ case K.SEARCH:
1400
+ n && (S = await te.getSearchFeed(n, g));
1399
1401
  break;
1400
- case Q.TAG_FEED:
1401
- a && (O = await Z.getTaggedVideos(a, h));
1402
+ case K.TAG_FEED:
1403
+ n && (S = await te.getTaggedVideos(n, g));
1402
1404
  break;
1403
- case Q.HOME:
1404
- O = await Z.getHomeVideos(h);
1405
+ case K.HOME:
1406
+ S = await te.getHomeVideos(g);
1405
1407
  break;
1406
- case Q.TRENDING:
1407
- O = await Z.getTrendingVideos(h);
1408
+ case K.TRENDING:
1409
+ S = await te.getTrendingVideos(g);
1408
1410
  break;
1409
- case Q.NEW_VIDEOS:
1410
- O = await Z.getNewVideos(h);
1411
+ case K.NEW_VIDEOS:
1412
+ S = await te.getNewVideos(g);
1411
1413
  break;
1412
- case Q.FIRST_UPLOADS:
1413
- O = await Z.getFirstUploadsVideos(h);
1414
+ case K.FIRST_UPLOADS:
1415
+ S = await te.getFirstUploadsVideos(g);
1414
1416
  break;
1415
- case Q.USER:
1416
- s && (O = await Z.getUserVideos(s, h));
1417
+ case K.USER:
1418
+ s && (S = await te.getUserVideos(s, g));
1417
1419
  break;
1418
- case Q.COMMUNITY:
1419
- r && (O = await Z.getCommunityVideos(
1420
+ case K.COMMUNITY:
1421
+ r && (S = await te.getCommunityVideos(
1420
1422
  r,
1421
- h
1423
+ g
1422
1424
  ));
1423
1425
  break;
1424
- case Q.RELATED:
1425
- s && (O = await Z.getRelatedVideos(
1426
+ case K.RELATED:
1427
+ s && (S = await te.getRelatedVideos(
1426
1428
  s,
1427
- h
1429
+ g
1428
1430
  ));
1429
1431
  break;
1430
1432
  }
1431
- const G = (await Promise.all(
1432
- O.map(M)
1433
+ const O = (await Promise.all(
1434
+ S.map(D)
1433
1435
  )).filter(
1434
- (N) => N !== null
1436
+ (_) => _ !== null
1435
1437
  );
1436
- $ ? (u(G), Fe.set(b, G)) : u((N) => {
1437
- const L = [...N, ...G];
1438
- return Fe.set(b, L), L;
1439
- }), T(O.length >= 20), j(h + O.length), w(null);
1440
- } catch (O) {
1441
- w(O instanceof Error ? O.message : "Failed to load videos");
1438
+ C ? (u(O), Me.set(v, O)) : u((_) => {
1439
+ const Y = [..._, ...O];
1440
+ return Me.set(v, Y), Y;
1441
+ }), T(S.length >= 20), k(g + S.length), p(null);
1442
+ } catch (S) {
1443
+ p(S instanceof Error ? S.message : "Failed to load videos");
1442
1444
  }
1443
1445
  },
1444
- [t, s, r, a, b, M]
1446
+ [t, s, r, n, v, D]
1445
1447
  );
1446
- H(() => {
1448
+ B(() => {
1447
1449
  (async () => {
1448
- m(!0), u([]), j(0);
1449
- const $ = Fe.get(b);
1450
- $ != null && $.length && (u($), m(!1)), await _(0, !0), m(!1);
1450
+ m(!0), u([]), k(0);
1451
+ const C = Me.get(v);
1452
+ C != null && C.length && (u(C), m(!1)), await N(0, !0), m(!1);
1451
1453
  })();
1452
- }, [b, _]);
1453
- const E = je(async () => {
1454
- l || !k || (x(!0), await _(f), x(!1));
1455
- }, [l, k, f, _]), C = je(async () => {
1456
- Fe.delete(b), m(!0), j(0), await _(0, !0), m(!1);
1457
- }, [b, _]);
1458
- H(() => {
1459
- const h = () => {
1460
- window.innerHeight + document.documentElement.scrollTop >= document.documentElement.offsetHeight - 1e3 && E();
1454
+ }, [v, N]);
1455
+ const R = Ce(async () => {
1456
+ l || !h || (f(!0), await N(w), f(!1));
1457
+ }, [l, h, w, N]), A = Ce(async () => {
1458
+ Me.delete(v), m(!0), k(0), await N(0, !0), m(!1);
1459
+ }, [v, N]);
1460
+ B(() => {
1461
+ const g = () => {
1462
+ window.innerHeight + document.documentElement.scrollTop >= document.documentElement.offsetHeight - 1e3 && R();
1461
1463
  };
1462
- return window.addEventListener("scroll", h), () => window.removeEventListener("scroll", h);
1463
- }, [E]);
1464
- const Y = () => /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6", children: Array.from({ length: 8 }).map((h, $) => /* @__PURE__ */ e.jsxs(
1464
+ return window.addEventListener("scroll", g), () => window.removeEventListener("scroll", g);
1465
+ }, [R]);
1466
+ const $ = () => /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6", children: Array.from({ length: 8 }).map((g, C) => /* @__PURE__ */ e.jsxs(
1465
1467
  "div",
1466
1468
  {
1467
1469
  className: "bg-card border border-border rounded-xl overflow-hidden animate-pulse",
@@ -1480,18 +1482,18 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1480
1482
  ] })
1481
1483
  ]
1482
1484
  },
1483
- $
1485
+ C
1484
1486
  )) });
1485
- return c && i.length === 0 ? /* @__PURE__ */ e.jsx(Y, {}) : v && i.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center min-h-[400px] space-y-4", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
1487
+ return c && i.length === 0 ? /* @__PURE__ */ e.jsx($, {}) : b && i.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center min-h-[400px] space-y-4", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
1486
1488
  /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-card-foreground mb-2", children: "Failed to load videos" }),
1487
- /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground mb-4", children: v }),
1489
+ /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground mb-4", children: b }),
1488
1490
  /* @__PURE__ */ e.jsxs(
1489
1491
  "button",
1490
1492
  {
1491
- onClick: C,
1493
+ onClick: A,
1492
1494
  className: "inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",
1493
1495
  children: [
1494
- /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4 mr-2" }),
1496
+ /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4 mr-2" }),
1495
1497
  "Try Again"
1496
1498
  ]
1497
1499
  }
@@ -1502,10 +1504,10 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1502
1504
  /* @__PURE__ */ e.jsxs(
1503
1505
  "button",
1504
1506
  {
1505
- onClick: C,
1507
+ onClick: A,
1506
1508
  className: "inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",
1507
1509
  children: [
1508
- /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4 mr-2" }),
1510
+ /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4 mr-2" }),
1509
1511
  "Refresh"
1510
1512
  ]
1511
1513
  }
@@ -1519,38 +1521,38 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1519
1521
  /* @__PURE__ */ e.jsxs(
1520
1522
  "button",
1521
1523
  {
1522
- onClick: C,
1524
+ onClick: A,
1523
1525
  className: "inline-flex items-center justify-center rounded-md border border-border bg-card px-3 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",
1524
1526
  children: [
1525
- /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4 mr-2" }),
1527
+ /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4 mr-2" }),
1526
1528
  "Refresh"
1527
1529
  ]
1528
1530
  }
1529
1531
  )
1530
1532
  ] }),
1531
- /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6", children: i.map((h, $) => /* @__PURE__ */ e.jsx(
1532
- Tr,
1533
+ /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6", children: i.map((g, C) => /* @__PURE__ */ e.jsx(
1534
+ Sr,
1533
1535
  {
1534
- video: h,
1536
+ video: g,
1535
1537
  onVideoClick: o,
1536
1538
  onAuthorClick: d,
1537
1539
  isGrid: !0
1538
1540
  },
1539
- `${h.author}-${h.permlink}-${$}`
1541
+ `${g.author}-${g.permlink}-${C}`
1540
1542
  )) }),
1541
- k && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center pt-8", children: l ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
1542
- /* @__PURE__ */ e.jsx(ae, { className: "w-4 h-4 animate-spin" }),
1543
+ h && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center pt-8", children: l ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
1544
+ /* @__PURE__ */ e.jsx(de, { className: "w-4 h-4 animate-spin" }),
1543
1545
  "Loading more videos..."
1544
1546
  ] }) : /* @__PURE__ */ e.jsx(
1545
1547
  "button",
1546
1548
  {
1547
- onClick: E,
1549
+ onClick: R,
1548
1550
  className: "inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",
1549
1551
  children: "Load More Videos"
1550
1552
  }
1551
1553
  ) })
1552
1554
  ] });
1553
- }, it = ({ isOpen: t, onClose: s, title: r, children: a, maxWidth: o = "max-w-2xl" }) => t ? /* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [
1555
+ }, gt = ({ isOpen: t, onClose: s, title: r, children: n, maxWidth: o = "max-w-2xl" }) => t ? /* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [
1554
1556
  /* @__PURE__ */ e.jsx(
1555
1557
  "div",
1556
1558
  {
@@ -1570,72 +1572,72 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1570
1572
  }
1571
1573
  )
1572
1574
  ] }),
1573
- /* @__PURE__ */ e.jsx("div", { className: "overflow-y-auto max-h-[calc(90vh-80px)] custom-scrollbar", children: a })
1575
+ /* @__PURE__ */ e.jsx("div", { className: "overflow-y-auto max-h-[calc(90vh-80px)] custom-scrollbar", children: n })
1574
1576
  ] })
1575
- ] }) : null, $r = ({ author: t, permlink: s, currentUser: r, onClose: a }) => {
1576
- const [o, d] = p([]), [i, u] = p(!0), [c, m] = p(null), [l, x] = p(""), [v, w] = p(!1);
1577
- H(() => {
1577
+ ] }) : null, Or = ({ author: t, permlink: s, currentUser: r, onClose: n }) => {
1578
+ const [o, d] = y([]), [i, u] = y(!0), [c, m] = y(null), [l, f] = y(""), [b, p] = y(!1);
1579
+ B(() => {
1578
1580
  (async () => {
1579
1581
  try {
1580
1582
  u(!0);
1581
- const b = (await Z.getCommentsList(t, s)).filter((M) => M.depth && M.depth > 0).sort((M, _) => new Date(_.created || 0).getTime() - new Date(M.created || 0).getTime());
1582
- d(b);
1583
- } catch (j) {
1584
- m(j instanceof Error ? j.message : "Failed to load comments");
1583
+ const v = (await te.getCommentsList(t, s)).filter((D) => D.depth && D.depth > 0).sort((D, N) => new Date(N.created || 0).getTime() - new Date(D.created || 0).getTime());
1584
+ d(v);
1585
+ } catch (k) {
1586
+ m(k instanceof Error ? k.message : "Failed to load comments");
1585
1587
  } finally {
1586
1588
  u(!1);
1587
1589
  }
1588
1590
  })();
1589
1591
  }, [t, s]);
1590
- const k = async () => {
1592
+ const h = async () => {
1591
1593
  if (!(!l.trim() || !r))
1592
1594
  try {
1593
- w(!0), console.log("Would submit comment:", l), x("");
1594
- } catch (f) {
1595
- console.error("Failed to submit comment:", f);
1595
+ p(!0), console.log("Would submit comment:", l), f("");
1596
+ } catch (w) {
1597
+ console.error("Failed to submit comment:", w);
1596
1598
  } finally {
1597
- w(!1);
1599
+ p(!1);
1598
1600
  }
1599
- }, T = (f) => {
1600
- const j = Math.min(f.depth || 0, 5);
1601
+ }, T = (w) => {
1602
+ const k = Math.min(w.depth || 0, 5);
1601
1603
  return /* @__PURE__ */ e.jsx(
1602
1604
  "div",
1603
1605
  {
1604
- className: `border-l-2 border-border ${j > 0 ? `ml-${j * 4}` : ""}`,
1606
+ className: `border-l-2 border-border ${k > 0 ? `ml-${k * 4}` : ""}`,
1605
1607
  children: /* @__PURE__ */ e.jsxs("div", { className: "p-4 bg-muted/30 rounded-r-lg", children: [
1606
1608
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
1607
1609
  /* @__PURE__ */ e.jsx(
1608
1610
  "img",
1609
1611
  {
1610
- src: `https://images.hive.blog/u/${f.author}/avatar`,
1611
- alt: f.author,
1612
+ src: `https://images.hive.blog/u/${w.author}/avatar`,
1613
+ alt: w.author,
1612
1614
  className: "w-6 h-6 rounded-full object-cover border border-border",
1613
- onError: (b) => {
1614
- b.target.src = `https://ui-avatars.com/api/?name=${f.author}&background=random`;
1615
+ onError: (v) => {
1616
+ v.target.src = `https://ui-avatars.com/api/?name=${w.author}&background=random`;
1615
1617
  }
1616
1618
  }
1617
1619
  ),
1618
1620
  /* @__PURE__ */ e.jsxs("span", { className: "font-medium text-card-foreground text-sm", children: [
1619
1621
  "@",
1620
- f.author
1622
+ w.author
1621
1623
  ] }),
1622
- f.created && /* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: nt(new Date(f.created), { addSuffix: !0 }) })
1624
+ w.created && /* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: mt(new Date(w.created), { addSuffix: !0 }) })
1623
1625
  ] }),
1624
- /* @__PURE__ */ e.jsx("div", { className: "text-sm text-card-foreground leading-relaxed", children: f.body || "No content" }),
1625
- f.net_votes && f.net_votes > 0 && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 mt-2", children: /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
1626
- f.net_votes,
1626
+ /* @__PURE__ */ e.jsx("div", { className: "text-sm text-card-foreground leading-relaxed", children: w.body || "No content" }),
1627
+ w.net_votes && w.net_votes > 0 && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 mt-2", children: /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
1628
+ w.net_votes,
1627
1629
  " votes"
1628
1630
  ] }) })
1629
1631
  ] })
1630
1632
  },
1631
- `${f.author}-${f.permlink}`
1633
+ `${w.author}-${w.permlink}`
1632
1634
  );
1633
1635
  };
1634
1636
  return /* @__PURE__ */ e.jsx(
1635
- it,
1637
+ gt,
1636
1638
  {
1637
1639
  isOpen: !0,
1638
- onClose: a,
1640
+ onClose: n,
1639
1641
  title: `Comments (${o.length})`,
1640
1642
  maxWidth: "max-w-2xl",
1641
1643
  children: /* @__PURE__ */ e.jsxs("div", { className: "p-6", children: [
@@ -1653,7 +1655,7 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1653
1655
  "textarea",
1654
1656
  {
1655
1657
  value: l,
1656
- onChange: (f) => x(f.target.value),
1658
+ onChange: (w) => f(w.target.value),
1657
1659
  placeholder: "Write a comment...",
1658
1660
  className: "w-full p-3 bg-background border border-border rounded-lg resize-none focus:outline-none focus:ring-2 focus:ring-primary",
1659
1661
  rows: 3
@@ -1662,38 +1664,38 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1662
1664
  /* @__PURE__ */ e.jsx("div", { className: "flex justify-end mt-2", children: /* @__PURE__ */ e.jsxs(
1663
1665
  "button",
1664
1666
  {
1665
- onClick: k,
1666
- disabled: !l.trim() || v,
1667
+ onClick: h,
1668
+ disabled: !l.trim() || b,
1667
1669
  className: "inline-flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
1668
1670
  children: [
1669
- v ? /* @__PURE__ */ e.jsx(ae, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ e.jsx(fr, { className: "w-4 h-4" }),
1670
- /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: v ? "Posting..." : "Post Comment" })
1671
+ b ? /* @__PURE__ */ e.jsx(de, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ e.jsx(fr, { className: "w-4 h-4" }),
1672
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: b ? "Posting..." : "Post Comment" })
1671
1673
  ]
1672
1674
  }
1673
1675
  ) })
1674
1676
  ] })
1675
1677
  ] }) }),
1676
1678
  i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center py-8", children: [
1677
- /* @__PURE__ */ e.jsx(ae, { className: "w-6 h-6 animate-spin text-primary" }),
1679
+ /* @__PURE__ */ e.jsx(de, { className: "w-6 h-6 animate-spin text-primary" }),
1678
1680
  /* @__PURE__ */ e.jsx("span", { className: "ml-2 text-muted-foreground", children: "Loading comments..." })
1679
1681
  ] }) : c ? /* @__PURE__ */ e.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ e.jsx("p", { className: "text-error", children: c }) }) : o.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "text-center py-8", children: [
1680
- /* @__PURE__ */ e.jsx(rt, { className: "w-12 h-12 text-muted-foreground mx-auto mb-2" }),
1682
+ /* @__PURE__ */ e.jsx(lt, { className: "w-12 h-12 text-muted-foreground mx-auto mb-2" }),
1681
1683
  /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground", children: "No comments yet" }),
1682
1684
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "Be the first to share your thoughts!" })
1683
1685
  ] }) : /* @__PURE__ */ e.jsx("div", { className: "space-y-4", children: o.map(T) })
1684
1686
  ] })
1685
1687
  }
1686
1688
  );
1687
- }, Fr = ({ author: t, permlink: s, onClose: r }) => {
1688
- const [a, o] = p([]), [d, i] = p(!0), [u, c] = p(null);
1689
- H(() => {
1689
+ }, $r = ({ author: t, permlink: s, onClose: r }) => {
1690
+ const [n, o] = y([]), [d, i] = y(!0), [u, c] = y(null);
1691
+ B(() => {
1690
1692
  (async () => {
1691
1693
  try {
1692
1694
  i(!0);
1693
- const v = (await Z.getActiveVotes(t, s)).sort((w, k) => k.rshares - w.rshares);
1694
- o(v);
1695
- } catch (x) {
1696
- c(x instanceof Error ? x.message : "Failed to load votes");
1695
+ const b = (await te.getActiveVotes(t, s)).sort((p, h) => h.rshares - p.rshares);
1696
+ o(b);
1697
+ } catch (f) {
1698
+ c(f instanceof Error ? f.message : "Failed to load votes");
1697
1699
  } finally {
1698
1700
  i(!1);
1699
1701
  }
@@ -1701,19 +1703,19 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1701
1703
  }, [t, s]);
1702
1704
  const m = (l) => l >= 1e9 ? `${(l / 1e9).toFixed(1)}B` : l >= 1e6 ? `${(l / 1e6).toFixed(1)}M` : l >= 1e3 ? `${(l / 1e3).toFixed(1)}K` : l.toString();
1703
1705
  return /* @__PURE__ */ e.jsx(
1704
- it,
1706
+ gt,
1705
1707
  {
1706
1708
  isOpen: !0,
1707
1709
  onClose: r,
1708
- title: `Votes (${a.length})`,
1710
+ title: `Votes (${n.length})`,
1709
1711
  maxWidth: "max-w-md",
1710
1712
  children: /* @__PURE__ */ e.jsx("div", { className: "p-6", children: d ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center py-8", children: [
1711
- /* @__PURE__ */ e.jsx(ae, { className: "w-6 h-6 animate-spin text-primary" }),
1713
+ /* @__PURE__ */ e.jsx(de, { className: "w-6 h-6 animate-spin text-primary" }),
1712
1714
  /* @__PURE__ */ e.jsx("span", { className: "ml-2 text-muted-foreground", children: "Loading votes..." })
1713
- ] }) : u ? /* @__PURE__ */ e.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ e.jsx("p", { className: "text-error", children: u }) }) : a.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "text-center py-8", children: [
1714
- /* @__PURE__ */ e.jsx(tt, { className: "w-12 h-12 text-muted-foreground mx-auto mb-2" }),
1715
+ ] }) : u ? /* @__PURE__ */ e.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ e.jsx("p", { className: "text-error", children: u }) }) : n.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "text-center py-8", children: [
1716
+ /* @__PURE__ */ e.jsx(it, { className: "w-12 h-12 text-muted-foreground mx-auto mb-2" }),
1715
1717
  /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground", children: "No votes yet" })
1716
- ] }) : /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: a.map((l, x) => /* @__PURE__ */ e.jsxs(
1718
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: n.map((l, f) => /* @__PURE__ */ e.jsxs(
1717
1719
  "div",
1718
1720
  {
1719
1721
  className: "flex items-center justify-between p-3 rounded-lg bg-muted/50 hover:bg-muted transition-colors",
@@ -1725,8 +1727,8 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1725
1727
  src: `https://images.hive.blog/u/${l.voter}/avatar`,
1726
1728
  alt: l.voter,
1727
1729
  className: "w-8 h-8 rounded-full object-cover border border-border",
1728
- onError: (v) => {
1729
- v.target.src = `https://ui-avatars.com/api/?name=${l.voter}&background=random`;
1730
+ onError: (b) => {
1731
+ b.target.src = `https://ui-avatars.com/api/?name=${l.voter}&background=random`;
1730
1732
  }
1731
1733
  }
1732
1734
  ),
@@ -1750,15 +1752,15 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1750
1752
  ] })
1751
1753
  ]
1752
1754
  },
1753
- `${l.voter}-${x}`
1755
+ `${l.voter}-${f}`
1754
1756
  )) }) })
1755
1757
  }
1756
1758
  );
1757
- }, Lr = ({ author: t, permlink: s, content: r, onClose: a }) => /* @__PURE__ */ e.jsx(
1758
- it,
1759
+ }, Fr = ({ author: t, permlink: s, content: r, onClose: n }) => /* @__PURE__ */ e.jsx(
1760
+ gt,
1759
1761
  {
1760
1762
  isOpen: !0,
1761
- onClose: a,
1763
+ onClose: n,
1762
1764
  title: "Video Description",
1763
1765
  maxWidth: "max-w-2xl",
1764
1766
  children: /* @__PURE__ */ e.jsxs("div", { className: "p-6", children: [
@@ -1780,35 +1782,35 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1780
1782
  ] }) })
1781
1783
  ] })
1782
1784
  }
1783
- ), bs = () => {
1784
- const { author: t, permlink: s } = kr(), r = Ie(), [a, o] = p(null), [d, i] = p(!0), [u, c] = p(null), [m, l] = p(!1), [x, v] = p(null), [w, k] = p(!1), [T, f] = p(!1), [j, b] = p(!1), [M, _] = p(!1), E = Le(null), C = Le(null), Y = Le(null);
1785
- H(() => {
1785
+ ), ps = ({ username: t, permlink: s, onAuthorClick: r, onVideoClick: n, onTagClick: o, onBack: d, onCommentsModal: i, onUpvotesModal: u, onDescriptionModal: c, onVideoInfo: m, onShare: l, onBookmark: f } = {}) => {
1786
+ const b = t, p = s, [h, T] = y(null), [w, k] = y(!0), [v, D] = y(null), [N, R] = y(!1), [A, $] = y(null), [g, C] = y(!1), [S, F] = y(!1), [O, _] = y(!1), [Y, Q] = y(!1), U = Ie(null), H = Ie(null), re = Ie(null);
1787
+ B(() => {
1786
1788
  (async () => {
1787
- if (!(!t || !s))
1789
+ if (!(!b || !p))
1788
1790
  try {
1789
- i(!0), c(null);
1790
- const L = await Z.getVideoDetails(t, s);
1791
- o(L), l(!1), v(null);
1792
- } catch (L) {
1793
- c(L instanceof Error ? L.message : "Failed to load video");
1791
+ k(!0), D(null);
1792
+ const G = await te.getVideoDetails(b, p);
1793
+ T(G), R(!1), $(null);
1794
+ } catch (G) {
1795
+ D(G instanceof Error ? G.message : "Failed to load video");
1794
1796
  } finally {
1795
- i(!1);
1797
+ k(!1);
1796
1798
  }
1797
1799
  })();
1798
- }, [t, s]);
1799
- const h = (N) => N ? N.startsWith("ipfs://") ? `https://ipfs-3speak.b-cdn.net/ipfs/${N.replace("ipfs://", "").split("/")[0]}/manifest.m3u8` : N : "";
1800
- H(() => ((async () => {
1801
- const L = a == null ? void 0 : a.video_v2;
1802
- if (!m || !L || !E.current) return;
1803
- const V = E.current, U = h(L);
1804
- C.current && (C.current.destroy(), C.current = null), V.src = "", V.load();
1800
+ }, [b, p]);
1801
+ const X = (I) => I ? I.startsWith("ipfs://") ? `https://ipfs-3speak.b-cdn.net/ipfs/${I.replace("ipfs://", "").split("/")[0]}/manifest.m3u8` : I : "";
1802
+ B(() => ((async () => {
1803
+ const G = h == null ? void 0 : h.video_v2;
1804
+ if (!N || !G || !U.current) return;
1805
+ const W = U.current, me = X(G);
1806
+ H.current && (H.current.destroy(), H.current = null), W.src = "", W.load();
1805
1807
  try {
1806
- let I = !1;
1807
- const q = () => {
1808
- I || (I = !0, V.play().then(() => v(null)).catch((B) => v(`Playback failed: ${B.message}`)));
1808
+ let se = !1;
1809
+ const oe = () => {
1810
+ se || (se = !0, W.play().then(() => $(null)).catch((z) => $(`Playback failed: ${z.message}`)));
1809
1811
  };
1810
- if (ve.isSupported()) {
1811
- const B = new ve({
1812
+ if (Ee.isSupported()) {
1813
+ const z = new Ee({
1812
1814
  debug: !1,
1813
1815
  enableWorker: !1,
1814
1816
  lowLatencyMode: !1,
@@ -1818,77 +1820,77 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1818
1820
  maxMaxBufferLength: 600,
1819
1821
  startLevel: -1
1820
1822
  });
1821
- C.current = B, B.on(ve.Events.MANIFEST_PARSED, () => {
1822
- }), B.on(ve.Events.ERROR, (oe, te) => {
1823
- if (te.fatal)
1824
- switch (te.type) {
1825
- case ve.ErrorTypes.NETWORK_ERROR:
1826
- v("Network error, retrying..."), setTimeout(() => B.startLoad(), 1e3);
1823
+ H.current = z, z.on(Ee.Events.MANIFEST_PARSED, () => {
1824
+ }), z.on(Ee.Events.ERROR, (ne, ie) => {
1825
+ if (ie.fatal)
1826
+ switch (ie.type) {
1827
+ case Ee.ErrorTypes.NETWORK_ERROR:
1828
+ $("Network error, retrying..."), setTimeout(() => z.startLoad(), 1e3);
1827
1829
  break;
1828
- case ve.ErrorTypes.MEDIA_ERROR:
1829
- v("Media error, retrying..."), setTimeout(() => B.recoverMediaError(), 1e3);
1830
+ case Ee.ErrorTypes.MEDIA_ERROR:
1831
+ $("Media error, retrying..."), setTimeout(() => z.recoverMediaError(), 1e3);
1830
1832
  break;
1831
1833
  default:
1832
- v(`Fatal error: ${te.details}`), B.destroy(), C.current = null;
1834
+ $(`Fatal error: ${ie.details}`), z.destroy(), H.current = null;
1833
1835
  break;
1834
1836
  }
1835
- }), B.attachMedia(V), B.loadSource(U);
1836
- } else if (V.canPlayType("application/vnd.apple.mpegurl"))
1837
- V.src = U;
1837
+ }), z.attachMedia(W), z.loadSource(me);
1838
+ } else if (W.canPlayType("application/vnd.apple.mpegurl"))
1839
+ W.src = me;
1838
1840
  else {
1839
- const B = U.replace(
1841
+ const z = me.replace(
1840
1842
  "/manifest.m3u8",
1841
1843
  "/480p/index.m3u8"
1842
1844
  );
1843
- V.src = B;
1844
- }
1845
- const J = () => k(!0), ne = () => {
1846
- k(!1), q();
1847
- }, K = (B) => {
1848
- var te;
1849
- const oe = B.target;
1850
- v(
1851
- `Video error: ${((te = oe.error) == null ? void 0 : te.message) || "Unknown error"}`
1852
- ), k(!1);
1853
- }, ue = () => k(!1);
1854
- V.addEventListener("loadstart", J), V.addEventListener("canplay", ne), V.addEventListener("error", K), V.addEventListener("loadeddata", ue);
1855
- const ge = async () => {
1856
- var oe, te, de, he;
1857
- const B = !!document.fullscreenElement;
1845
+ W.src = z;
1846
+ }
1847
+ const ge = () => C(!0), Re = () => {
1848
+ C(!1), oe();
1849
+ }, Te = (z) => {
1850
+ var ie;
1851
+ const ne = z.target;
1852
+ $(
1853
+ `Video error: ${((ie = ne.error) == null ? void 0 : ie.message) || "Unknown error"}`
1854
+ ), C(!1);
1855
+ }, Pe = () => C(!1);
1856
+ W.addEventListener("loadstart", ge), W.addEventListener("canplay", Re), W.addEventListener("error", Te), W.addEventListener("loadeddata", Pe);
1857
+ const Ve = async () => {
1858
+ var ne, ie, be, ye;
1859
+ const z = !!document.fullscreenElement;
1858
1860
  try {
1859
- B ? "orientation" in screen && await (((te = (oe = screen.orientation) == null ? void 0 : oe.lock) == null ? void 0 : te.call(oe, "landscape")) ?? Promise.resolve()) : "orientation" in screen && ((he = (de = screen.orientation) == null ? void 0 : de.unlock) == null || he.call(de));
1861
+ z ? "orientation" in screen && await (((ie = (ne = screen.orientation) == null ? void 0 : ne.lock) == null ? void 0 : ie.call(ne, "landscape")) ?? Promise.resolve()) : "orientation" in screen && ((ye = (be = screen.orientation) == null ? void 0 : be.unlock) == null || ye.call(be));
1860
1862
  } catch {
1861
1863
  }
1862
1864
  };
1863
- return document.addEventListener("fullscreenchange", ge), Y.current = () => {
1864
- document.removeEventListener("fullscreenchange", ge);
1865
+ return document.addEventListener("fullscreenchange", Ve), re.current = () => {
1866
+ document.removeEventListener("fullscreenchange", Ve);
1865
1867
  }, () => {
1866
- V.removeEventListener("loadstart", J), V.removeEventListener("canplay", ne), V.removeEventListener("error", K), V.removeEventListener("loadeddata", ue), Y.current && Y.current();
1868
+ W.removeEventListener("loadstart", ge), W.removeEventListener("canplay", Re), W.removeEventListener("error", Te), W.removeEventListener("loadeddata", Pe), re.current && re.current();
1867
1869
  };
1868
- } catch (I) {
1869
- v(
1870
- `Setup error: ${I instanceof Error ? I.message : "Unknown"}`
1870
+ } catch (se) {
1871
+ $(
1872
+ `Setup error: ${se instanceof Error ? se.message : "Unknown"}`
1871
1873
  );
1872
1874
  }
1873
1875
  })(), () => {
1874
- C.current && (C.current.destroy(), C.current = null);
1875
- }), [m, a == null ? void 0 : a.video_v2]);
1876
- const $ = () => {
1877
- if (!(a == null ? void 0 : a.video_v2)) {
1878
- v("No video source available");
1876
+ H.current && (H.current.destroy(), H.current = null);
1877
+ }), [N, h == null ? void 0 : h.video_v2]);
1878
+ const ue = () => {
1879
+ if (!(h == null ? void 0 : h.video_v2)) {
1880
+ $("No video source available");
1879
1881
  return;
1880
1882
  }
1881
- l(!0), v(null), k(!0);
1882
- }, O = (N) => {
1883
- r(`/video/${N.author}/${N.permlink}`);
1884
- }, F = (N) => {
1885
- r(`/user/${N}`);
1886
- }, G = (N) => {
1887
- if (!N) return "00:00";
1888
- const L = Math.floor(N), V = Math.floor(L / 3600), U = Math.floor(L % 3600 / 60), I = L % 60, q = (J) => J.toString().padStart(2, "0");
1889
- return L < 60 ? `00:${q(I)}` : V === 0 ? `${q(U)}:${q(I)}` : `${q(V)}:${q(U)}:${q(I)}`;
1883
+ R(!0), $(null), C(!0);
1884
+ }, Z = (I) => {
1885
+ n && n(I);
1886
+ }, we = (I) => {
1887
+ r && r(I);
1888
+ }, Ne = (I) => {
1889
+ if (!I) return "00:00";
1890
+ const G = Math.floor(I), W = Math.floor(G / 3600), me = Math.floor(G % 3600 / 60), se = G % 60, oe = (ge) => ge.toString().padStart(2, "0");
1891
+ return G < 60 ? `00:${oe(se)}` : W === 0 ? `${oe(me)}:${oe(se)}` : `${oe(W)}:${oe(me)}:${oe(se)}`;
1890
1892
  };
1891
- return d ? /* @__PURE__ */ e.jsxs("div", { className: "min-h-screen bg-background", children: [
1893
+ return w ? /* @__PURE__ */ e.jsxs("div", { className: "min-h-screen bg-background", children: [
1892
1894
  /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 z-50 w-full bg-background border-b border-border", children: /* @__PURE__ */ e.jsx("div", { className: "container mx-auto px-4 py-3", children: /* @__PURE__ */ e.jsx("div", { className: "h-8 w-24 bg-muted rounded-full animate-pulse" }) }) }),
1893
1895
  /* @__PURE__ */ e.jsx("div", { className: "container mx-auto px-4 py-8 max-w-6xl", children: /* @__PURE__ */ e.jsxs("div", { className: "animate-pulse space-y-6", children: [
1894
1896
  /* @__PURE__ */ e.jsx("div", { className: "aspect-video bg-muted rounded-xl" }),
@@ -1897,16 +1899,18 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1897
1899
  /* @__PURE__ */ e.jsx("div", { className: "h-4 bg-muted rounded w-1/2" })
1898
1900
  ] })
1899
1901
  ] }) })
1900
- ] }) : u || !a ? /* @__PURE__ */ e.jsx("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center max-w-md mx-auto px-4", children: [
1902
+ ] }) : v || !h ? /* @__PURE__ */ e.jsx("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center max-w-md mx-auto px-4", children: [
1901
1903
  /* @__PURE__ */ e.jsx("h2", { className: "text-xl font-semibold text-card-foreground mb-2", children: "Failed to Load Video" }),
1902
- /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground mb-4", children: u || "Video not found" }),
1904
+ /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground mb-4", children: v || "Video not found" }),
1903
1905
  /* @__PURE__ */ e.jsxs(
1904
1906
  "button",
1905
1907
  {
1906
- onClick: () => r(-1),
1908
+ onClick: () => {
1909
+ d && d();
1910
+ },
1907
1911
  className: "inline-flex items-center gap-2 px-4 py-2 bg-card border border-border text-card-foreground rounded-lg hover:bg-card-hover transition-colors",
1908
1912
  children: [
1909
- /* @__PURE__ */ e.jsx(Ce, { className: "w-4 h-4" }),
1913
+ /* @__PURE__ */ e.jsx(Le, { className: "w-4 h-4" }),
1910
1914
  "Go Back"
1911
1915
  ]
1912
1916
  }
@@ -1915,41 +1919,43 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1915
1919
  /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 z-50 w-full bg-background/95 backdrop-blur-sm border-b border-border", children: /* @__PURE__ */ e.jsx("div", { className: "container mx-auto px-4 py-3", children: /* @__PURE__ */ e.jsxs(
1916
1920
  "button",
1917
1921
  {
1918
- onClick: () => r(-1),
1922
+ onClick: () => {
1923
+ d && d();
1924
+ },
1919
1925
  className: "inline-flex items-center gap-2 text-muted-foreground hover:text-card-foreground transition-colors",
1920
1926
  children: [
1921
- /* @__PURE__ */ e.jsx(Ce, { className: "w-4 h-4" }),
1927
+ /* @__PURE__ */ e.jsx(Le, { className: "w-4 h-4" }),
1922
1928
  "Back"
1923
1929
  ]
1924
1930
  }
1925
1931
  ) }) }),
1926
1932
  /* @__PURE__ */ e.jsx("div", { className: "container mx-auto px-4 py-8 max-w-6xl", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-8", children: [
1927
1933
  /* @__PURE__ */ e.jsxs("div", { className: "lg:col-span-2 space-y-6", children: [
1928
- /* @__PURE__ */ e.jsx("div", { className: "w-full aspect-video bg-black rounded-xl overflow-hidden relative shadow-card", children: m ? /* @__PURE__ */ e.jsxs("div", { className: "relative w-full h-full", children: [
1934
+ /* @__PURE__ */ e.jsx("div", { className: "w-full aspect-video bg-black rounded-xl overflow-hidden relative shadow-card", children: N ? /* @__PURE__ */ e.jsxs("div", { className: "relative w-full h-full", children: [
1929
1935
  /* @__PURE__ */ e.jsx(
1930
1936
  "video",
1931
1937
  {
1932
- ref: E,
1938
+ ref: U,
1933
1939
  controls: !0,
1934
- poster: fe(a.thumbnail),
1940
+ poster: je(h.thumbnail),
1935
1941
  className: "w-full h-full object-contain bg-black",
1936
- onDoubleClick: async (N) => {
1937
- const L = N.currentTarget;
1942
+ onDoubleClick: async (I) => {
1943
+ const G = I.currentTarget;
1938
1944
  try {
1939
- document.fullscreenElement ? await document.exitFullscreen() : await L.requestFullscreen();
1945
+ document.fullscreenElement ? await document.exitFullscreen() : await G.requestFullscreen();
1940
1946
  } catch {
1941
1947
  }
1942
1948
  }
1943
1949
  }
1944
1950
  ),
1945
- w && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ e.jsx("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-primary" }) }),
1946
- x && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/80", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center text-white", children: [
1947
- /* @__PURE__ */ e.jsx("p", { className: "mb-4", children: x }),
1951
+ g && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ e.jsx("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-primary" }) }),
1952
+ A && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/80", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center text-white", children: [
1953
+ /* @__PURE__ */ e.jsx("p", { className: "mb-4", children: A }),
1948
1954
  /* @__PURE__ */ e.jsx(
1949
1955
  "button",
1950
1956
  {
1951
1957
  onClick: () => {
1952
- l(!1), v(null);
1958
+ R(!1), $(null);
1953
1959
  },
1954
1960
  className: "px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover transition-colors",
1955
1961
  children: "Try Again"
@@ -1960,11 +1966,11 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1960
1966
  /* @__PURE__ */ e.jsx(
1961
1967
  "img",
1962
1968
  {
1963
- src: fe(a.thumbnail) || `https://images.hive.blog/u/${a.owner}/avatar`,
1964
- alt: a.title,
1969
+ src: je(h.thumbnail) || `https://images.hive.blog/u/${h.owner}/avatar`,
1970
+ alt: h.title,
1965
1971
  className: "w-full h-full object-cover",
1966
- onError: (N) => {
1967
- N.target.src = `https://images.hive.blog/u/${a.owner}/avatar`;
1972
+ onError: (I) => {
1973
+ I.target.src = `https://images.hive.blog/u/${h.owner}/avatar`;
1968
1974
  }
1969
1975
  }
1970
1976
  ),
@@ -1972,255 +1978,271 @@ const St = /* @__PURE__ */ new Map(), Or = ({
1972
1978
  /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1973
1979
  "button",
1974
1980
  {
1975
- onClick: $,
1981
+ onClick: ue,
1976
1982
  className: "bg-primary hover:bg-primary-hover rounded-full p-6 transform hover:scale-110 transition-all duration-300 shadow-lg",
1977
- children: /* @__PURE__ */ e.jsx(et, { className: "w-8 h-8 text-primary-foreground ml-1", fill: "currentColor" })
1983
+ children: /* @__PURE__ */ e.jsx(ot, { className: "w-8 h-8 text-primary-foreground ml-1", fill: "currentColor" })
1978
1984
  }
1979
1985
  ) }),
1980
- a.duration && /* @__PURE__ */ e.jsxs("div", { className: "absolute bottom-4 right-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm", children: [
1981
- /* @__PURE__ */ e.jsx(Ft, { className: "w-3 h-3" }),
1982
- G(a.duration)
1986
+ h.duration && /* @__PURE__ */ e.jsxs("div", { className: "absolute bottom-4 right-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm", children: [
1987
+ /* @__PURE__ */ e.jsx(Pt, { className: "w-3 h-3" }),
1988
+ Ne(h.duration)
1983
1989
  ] }),
1984
- a.views && /* @__PURE__ */ e.jsxs("div", { className: "absolute bottom-4 left-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm", children: [
1985
- /* @__PURE__ */ e.jsx(Lt, { className: "w-3 h-3" }),
1986
- a.views.toLocaleString(),
1990
+ h.views && /* @__PURE__ */ e.jsxs("div", { className: "absolute bottom-4 left-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm", children: [
1991
+ /* @__PURE__ */ e.jsx(Vt, { className: "w-3 h-3" }),
1992
+ h.views.toLocaleString(),
1987
1993
  " views"
1988
1994
  ] })
1989
1995
  ] }) }),
1990
1996
  /* @__PURE__ */ e.jsx(
1991
- Or,
1997
+ Tr,
1992
1998
  {
1993
- title: a.title || "",
1994
- author: a.owner || "",
1995
- permlink: a.permlink || "",
1996
- createdAt: a.created,
1997
- description: a.description || "",
1999
+ title: h.title || "",
2000
+ author: h.owner || "",
2001
+ permlink: h.permlink || "",
2002
+ createdAt: h.created,
2003
+ description: h.description || "",
1998
2004
  video: {
1999
- title: a.title || "",
2000
- author: a.owner || "",
2001
- permlink: a.permlink || "",
2002
- created: a.created || /* @__PURE__ */ new Date(),
2003
- category: a.category || "",
2005
+ title: h.title || "",
2006
+ author: h.owner || "",
2007
+ permlink: h.permlink || "",
2008
+ created: h.created || /* @__PURE__ */ new Date(),
2009
+ category: h.category || "",
2004
2010
  numOfUpvotes: void 0,
2005
2011
  numOfComments: void 0,
2006
2012
  hiveValue: void 0,
2007
- duration: a.duration,
2008
- thumbnail: a.thumbnail,
2009
- views: a.views
2013
+ duration: h.duration,
2014
+ thumbnail: h.thumbnail,
2015
+ views: h.views
2016
+ },
2017
+ onTapComment: () => {
2018
+ i ? i(b, p) : F(!0);
2019
+ },
2020
+ onTapUpvote: () => {
2021
+ u ? u(b, p) : _(!0);
2010
2022
  },
2011
- onTapComment: () => f(!0),
2012
- onTapUpvote: () => b(!0),
2013
- onTapInfo: () => _(!0),
2014
- onTapAuthor: () => r(`/user/${a.owner}`)
2023
+ onTapInfo: () => {
2024
+ c ? c(b, p, h.description || "") : Q(!0);
2025
+ },
2026
+ onTapAuthor: () => {
2027
+ r && r(h.owner);
2028
+ },
2029
+ onTapShare: () => {
2030
+ l && l(b, p);
2031
+ },
2032
+ onTapBookmark: () => {
2033
+ f && f(b, p);
2034
+ }
2015
2035
  }
2016
2036
  ),
2017
- a.tags && /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: a.tags.split(",").map((N, L) => /* @__PURE__ */ e.jsxs(
2037
+ h.tags && /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: h.tags.split(",").map((I, G) => /* @__PURE__ */ e.jsxs(
2018
2038
  "span",
2019
2039
  {
2020
2040
  className: "bg-primary/10 text-primary px-3 py-1 rounded-full text-sm font-medium hover:bg-primary/20 transition-colors cursor-pointer",
2021
- onClick: () => r(`/tag/${N.trim()}`),
2041
+ onClick: () => {
2042
+ o && o(I.trim());
2043
+ },
2022
2044
  children: [
2023
2045
  "#",
2024
- N.trim()
2046
+ I.trim()
2025
2047
  ]
2026
2048
  },
2027
- L
2049
+ G
2028
2050
  )) })
2029
2051
  ] }),
2030
2052
  /* @__PURE__ */ e.jsxs("div", { className: "bg-card border border-border rounded-xl p-6 sticky top-24", children: [
2031
2053
  /* @__PURE__ */ e.jsx("h3", { className: "font-semibold text-card-foreground mb-4 text-lg", children: "Related Videos" }),
2032
2054
  /* @__PURE__ */ e.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ e.jsx(
2033
- ot,
2055
+ ut,
2034
2056
  {
2035
- feedType: Q.RELATED,
2036
- username: a.owner,
2037
- onVideoClick: O,
2038
- onAuthorClick: F
2057
+ feedType: K.RELATED,
2058
+ username: h.owner,
2059
+ onVideoClick: Z,
2060
+ onAuthorClick: we
2039
2061
  }
2040
2062
  ) })
2041
2063
  ] })
2042
2064
  ] }) }),
2043
- T && t && s && /* @__PURE__ */ e.jsx(
2044
- $r,
2065
+ S && b && p && /* @__PURE__ */ e.jsx(
2066
+ Or,
2045
2067
  {
2046
- author: t,
2047
- permlink: s,
2048
- onClose: () => f(!1)
2068
+ author: b,
2069
+ permlink: p,
2070
+ onClose: () => F(!1)
2049
2071
  }
2050
2072
  ),
2051
- j && t && s && /* @__PURE__ */ e.jsx(
2052
- Fr,
2073
+ O && b && p && /* @__PURE__ */ e.jsx(
2074
+ $r,
2053
2075
  {
2054
- author: t,
2055
- permlink: s,
2056
- onClose: () => b(!1)
2076
+ author: b,
2077
+ permlink: p,
2078
+ onClose: () => _(!1)
2057
2079
  }
2058
2080
  ),
2059
- M && t && s && /* @__PURE__ */ e.jsx(
2060
- Lr,
2081
+ Y && b && p && /* @__PURE__ */ e.jsx(
2082
+ Fr,
2061
2083
  {
2062
- author: t,
2063
- permlink: s,
2064
- content: a.description || "",
2065
- onClose: () => _(!1)
2084
+ author: b,
2085
+ permlink: p,
2086
+ content: h.description || "",
2087
+ onClose: () => Q(!1)
2066
2088
  }
2067
2089
  )
2068
2090
  ] });
2069
2091
  };
2070
- var At = {
2092
+ var Ut = {
2071
2093
  color: void 0,
2072
2094
  size: void 0,
2073
2095
  className: void 0,
2074
2096
  style: void 0,
2075
2097
  attr: void 0
2076
- }, Tt = le.createContext && /* @__PURE__ */ le.createContext(At), Rr = ["attr", "size", "title"];
2077
- function Pr(t, s) {
2098
+ }, Ft = xe.createContext && /* @__PURE__ */ xe.createContext(Ut), Lr = ["attr", "size", "title"];
2099
+ function Rr(t, s) {
2078
2100
  if (t == null) return {};
2079
- var r = Vr(t, s), a, o;
2101
+ var r = Pr(t, s), n, o;
2080
2102
  if (Object.getOwnPropertySymbols) {
2081
2103
  var d = Object.getOwnPropertySymbols(t);
2082
2104
  for (o = 0; o < d.length; o++)
2083
- a = d[o], !(s.indexOf(a) >= 0) && Object.prototype.propertyIsEnumerable.call(t, a) && (r[a] = t[a]);
2105
+ n = d[o], !(s.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(t, n) && (r[n] = t[n]);
2084
2106
  }
2085
2107
  return r;
2086
2108
  }
2087
- function Vr(t, s) {
2109
+ function Pr(t, s) {
2088
2110
  if (t == null) return {};
2089
2111
  var r = {};
2090
- for (var a in t)
2091
- if (Object.prototype.hasOwnProperty.call(t, a)) {
2092
- if (s.indexOf(a) >= 0) continue;
2093
- r[a] = t[a];
2112
+ for (var n in t)
2113
+ if (Object.prototype.hasOwnProperty.call(t, n)) {
2114
+ if (s.indexOf(n) >= 0) continue;
2115
+ r[n] = t[n];
2094
2116
  }
2095
2117
  return r;
2096
2118
  }
2097
- function Me() {
2098
- return Me = Object.assign ? Object.assign.bind() : function(t) {
2119
+ function qe() {
2120
+ return qe = Object.assign ? Object.assign.bind() : function(t) {
2099
2121
  for (var s = 1; s < arguments.length; s++) {
2100
2122
  var r = arguments[s];
2101
- for (var a in r)
2102
- Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
2123
+ for (var n in r)
2124
+ Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
2103
2125
  }
2104
2126
  return t;
2105
- }, Me.apply(this, arguments);
2127
+ }, qe.apply(this, arguments);
2106
2128
  }
2107
- function Ot(t, s) {
2129
+ function Lt(t, s) {
2108
2130
  var r = Object.keys(t);
2109
2131
  if (Object.getOwnPropertySymbols) {
2110
- var a = Object.getOwnPropertySymbols(t);
2111
- s && (a = a.filter(function(o) {
2132
+ var n = Object.getOwnPropertySymbols(t);
2133
+ s && (n = n.filter(function(o) {
2112
2134
  return Object.getOwnPropertyDescriptor(t, o).enumerable;
2113
- })), r.push.apply(r, a);
2135
+ })), r.push.apply(r, n);
2114
2136
  }
2115
2137
  return r;
2116
2138
  }
2117
- function Ue(t) {
2139
+ function Ye(t) {
2118
2140
  for (var s = 1; s < arguments.length; s++) {
2119
2141
  var r = arguments[s] != null ? arguments[s] : {};
2120
- s % 2 ? Ot(Object(r), !0).forEach(function(a) {
2121
- Ar(t, a, r[a]);
2122
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Ot(Object(r)).forEach(function(a) {
2123
- Object.defineProperty(t, a, Object.getOwnPropertyDescriptor(r, a));
2142
+ s % 2 ? Lt(Object(r), !0).forEach(function(n) {
2143
+ Vr(t, n, r[n]);
2144
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Lt(Object(r)).forEach(function(n) {
2145
+ Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
2124
2146
  });
2125
2147
  }
2126
2148
  return t;
2127
2149
  }
2128
- function Ar(t, s, r) {
2129
- return s = Dr(s), s in t ? Object.defineProperty(t, s, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[s] = r, t;
2150
+ function Vr(t, s, r) {
2151
+ return s = Ar(s), s in t ? Object.defineProperty(t, s, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[s] = r, t;
2130
2152
  }
2131
- function Dr(t) {
2132
- var s = Mr(t, "string");
2153
+ function Ar(t) {
2154
+ var s = Dr(t, "string");
2133
2155
  return typeof s == "symbol" ? s : s + "";
2134
2156
  }
2135
- function Mr(t, s) {
2157
+ function Dr(t, s) {
2136
2158
  if (typeof t != "object" || !t) return t;
2137
2159
  var r = t[Symbol.toPrimitive];
2138
2160
  if (r !== void 0) {
2139
- var a = r.call(t, s);
2140
- if (typeof a != "object") return a;
2161
+ var n = r.call(t, s);
2162
+ if (typeof n != "object") return n;
2141
2163
  throw new TypeError("@@toPrimitive must return a primitive value.");
2142
2164
  }
2143
2165
  return (s === "string" ? String : Number)(t);
2144
2166
  }
2145
- function Dt(t) {
2146
- return t && t.map((s, r) => /* @__PURE__ */ le.createElement(s.tag, Ue({
2167
+ function Ht(t) {
2168
+ return t && t.map((s, r) => /* @__PURE__ */ xe.createElement(s.tag, Ye({
2147
2169
  key: r
2148
- }, s.attr), Dt(s.child)));
2170
+ }, s.attr), Ht(s.child)));
2149
2171
  }
2150
- function we(t) {
2151
- return (s) => /* @__PURE__ */ le.createElement(Ur, Me({
2152
- attr: Ue({}, t.attr)
2153
- }, s), Dt(t.child));
2172
+ function Se(t) {
2173
+ return (s) => /* @__PURE__ */ xe.createElement(Mr, qe({
2174
+ attr: Ye({}, t.attr)
2175
+ }, s), Ht(t.child));
2154
2176
  }
2155
- function Ur(t) {
2177
+ function Mr(t) {
2156
2178
  var s = (r) => {
2157
2179
  var {
2158
- attr: a,
2180
+ attr: n,
2159
2181
  size: o,
2160
2182
  title: d
2161
- } = t, i = Pr(t, Rr), u = o || r.size || "1em", c;
2162
- return r.className && (c = r.className), t.className && (c = (c ? c + " " : "") + t.className), /* @__PURE__ */ le.createElement("svg", Me({
2183
+ } = t, i = Rr(t, Lr), u = o || r.size || "1em", c;
2184
+ return r.className && (c = r.className), t.className && (c = (c ? c + " " : "") + t.className), /* @__PURE__ */ xe.createElement("svg", qe({
2163
2185
  stroke: "currentColor",
2164
2186
  fill: "currentColor",
2165
2187
  strokeWidth: "0"
2166
- }, r.attr, a, i, {
2188
+ }, r.attr, n, i, {
2167
2189
  className: c,
2168
- style: Ue(Ue({
2190
+ style: Ye(Ye({
2169
2191
  color: t.color || r.color
2170
2192
  }, r.style), t.style),
2171
2193
  height: u,
2172
2194
  width: u,
2173
2195
  xmlns: "http://www.w3.org/2000/svg"
2174
- }), d && /* @__PURE__ */ le.createElement("title", null, d), t.children);
2196
+ }), d && /* @__PURE__ */ xe.createElement("title", null, d), t.children);
2175
2197
  };
2176
- return Tt !== void 0 ? /* @__PURE__ */ le.createElement(Tt.Consumer, null, (r) => s(r)) : s(At);
2198
+ return Ft !== void 0 ? /* @__PURE__ */ xe.createElement(Ft.Consumer, null, (r) => s(r)) : s(Ut);
2177
2199
  }
2178
2200
  function Ir(t) {
2179
- return we({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z" }, child: [] }] })(t);
2201
+ return Se({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z" }, child: [] }] })(t);
2202
+ }
2203
+ function Ur(t) {
2204
+ return Se({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 405.3V448c0 35.3 86 64 192 64s192-28.7 192-64v-42.7C342.7 434.4 267.2 448 192 448S41.3 434.4 0 405.3zM320 128c106 0 192-28.7 192-64S426 0 320 0 128 28.7 128 64s86 64 192 64zM0 300.4V352c0 35.3 86 64 192 64s192-28.7 192-64v-51.6c-41.3 34-116.9 51.6-192 51.6S41.3 334.4 0 300.4zm416 11c57.3-11.1 96-31.7 96-55.4v-42.7c-23.2 16.4-57.3 27.6-96 34.5v63.6zM192 160C86 160 0 195.8 0 240s86 80 192 80 192-35.8 192-80-86-80-192-80zm219.3 56.3c60-10.8 100.7-32 100.7-56.3v-42.7c-35.5 25.1-96.5 38.6-160.7 41.8 29.5 14.3 51.2 33.5 60 57.2z" }, child: [] }] })(t);
2180
2205
  }
2181
2206
  function Hr(t) {
2182
- return we({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 405.3V448c0 35.3 86 64 192 64s192-28.7 192-64v-42.7C342.7 434.4 267.2 448 192 448S41.3 434.4 0 405.3zM320 128c106 0 192-28.7 192-64S426 0 320 0 128 28.7 128 64s86 64 192 64zM0 300.4V352c0 35.3 86 64 192 64s192-28.7 192-64v-51.6c-41.3 34-116.9 51.6-192 51.6S41.3 334.4 0 300.4zm416 11c57.3-11.1 96-31.7 96-55.4v-42.7c-23.2 16.4-57.3 27.6-96 34.5v63.6zM192 160C86 160 0 195.8 0 240s86 80 192 80 192-35.8 192-80-86-80-192-80zm219.3 56.3c60-10.8 100.7-32 100.7-56.3v-42.7c-35.5 25.1-96.5 38.6-160.7 41.8 29.5 14.3 51.2 33.5 60 57.2z" }, child: [] }] })(t);
2207
+ return Se({ attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z" }, child: [] }] })(t);
2183
2208
  }
2184
2209
  function Wr(t) {
2185
- return we({ attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z" }, child: [] }] })(t);
2210
+ return Se({ attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 176c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 48h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z" }, child: [] }] })(t);
2186
2211
  }
2187
2212
  function Br(t) {
2188
- return we({ attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 176c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 48h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z" }, child: [] }] })(t);
2213
+ return Se({ attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M560 224h-29.5c-8.8-20-21.6-37.7-37.4-52.5L512 96h-32c-29.4 0-55.4 13.5-73 34.3-7.6-1.1-15.1-2.3-23-2.3H256c-77.4 0-141.9 55-156.8 128H56c-14.8 0-26.5-13.5-23.5-28.8C34.7 215.8 45.4 208 57 208h1c3.3 0 6-2.7 6-6v-20c0-3.3-2.7-6-6-6-28.5 0-53.9 20.4-57.5 48.6C-3.9 258.8 22.7 288 56 288h40c0 52.2 25.4 98.1 64 127.3V496c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-48h128v48c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-80.7c11.8-8.9 22.3-19.4 31.3-31.3H560c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16zm-128 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM256 96h128c5.4 0 10.7.4 15.9.8 0-.3.1-.5.1-.8 0-53-43-96-96-96s-96 43-96 96c0 2.1.5 4.1.6 6.2 15.2-3.9 31-6.2 47.4-6.2z" }, child: [] }] })(t);
2189
2214
  }
2190
2215
  function zr(t) {
2191
- return we({ attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M560 224h-29.5c-8.8-20-21.6-37.7-37.4-52.5L512 96h-32c-29.4 0-55.4 13.5-73 34.3-7.6-1.1-15.1-2.3-23-2.3H256c-77.4 0-141.9 55-156.8 128H56c-14.8 0-26.5-13.5-23.5-28.8C34.7 215.8 45.4 208 57 208h1c3.3 0 6-2.7 6-6v-20c0-3.3-2.7-6-6-6-28.5 0-53.9 20.4-57.5 48.6C-3.9 258.8 22.7 288 56 288h40c0 52.2 25.4 98.1 64 127.3V496c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-48h128v48c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-80.7c11.8-8.9 22.3-19.4 31.3-31.3H560c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16zm-128 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM256 96h128c5.4 0 10.7.4 15.9.8 0-.3.1-.5.1-.8 0-53-43-96-96-96s-96 43-96 96c0 2.1.5 4.1.6 6.2 15.2-3.9 31-6.2 47.4-6.2z" }, child: [] }] })(t);
2192
- }
2193
- function qr(t) {
2194
- return we({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z" }, child: [] }] })(t);
2216
+ return Se({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z" }, child: [] }] })(t);
2195
2217
  }
2196
- const lt = new wr.Client(["https://api.hive.blog"]), Yr = async (t) => {
2218
+ const ht = new wr.Client(["https://api.hive.blog"]), qr = async (t) => {
2197
2219
  try {
2198
- const s = await lt.database.getAccounts([t]);
2220
+ const s = await ht.database.getAccounts([t]);
2199
2221
  if (!s || s.length === 0)
2200
2222
  throw new Error("Account not found");
2201
2223
  return s[0];
2202
2224
  } catch (s) {
2203
2225
  return console.error("Error in getWalletDataDetail:", s), { error: s instanceof Error ? s.message : "Unknown error" };
2204
2226
  }
2205
- }, Jr = async (t) => {
2227
+ }, Yr = async (t) => {
2206
2228
  try {
2207
- const s = await lt.database.getDynamicGlobalProperties(), r = parseFloat(t.split(" ")[0]), a = parseFloat(
2229
+ const s = await ht.database.getDynamicGlobalProperties(), r = parseFloat(t.split(" ")[0]), n = parseFloat(
2208
2230
  String(s.total_vesting_shares).split(" ")[0]
2209
2231
  ), o = parseFloat(
2210
2232
  String(s.total_vesting_fund_hive).split(" ")[0]
2211
2233
  );
2212
- return (r * o / a).toFixed(3);
2234
+ return (r * o / n).toFixed(3);
2213
2235
  } catch (s) {
2214
2236
  return console.error("Error in convertVestingSharesToHiveData:", s), "0";
2215
2237
  }
2216
- }, Gr = async (t) => {
2238
+ }, Jr = async (t) => {
2217
2239
  try {
2218
- const r = (await lt.database.call("get_feed_history", [])).current_median_history, a = parseFloat(r.base.split(" ")[0]), o = typeof t == "string" ? parseFloat(t) : t;
2219
- return (a * o).toFixed(2);
2240
+ const r = (await ht.database.call("get_feed_history", [])).current_median_history, n = parseFloat(r.base.split(" ")[0]), o = typeof t == "string" ? parseFloat(t) : t;
2241
+ return (n * o).toFixed(2);
2220
2242
  } catch (s) {
2221
2243
  return console.error("Error in convertHivetoUSDData:", s), "0";
2222
2244
  }
2223
- }, Kr = _r((t) => ({
2245
+ }, Gr = kr((t) => ({
2224
2246
  walletData: null,
2225
2247
  isLoading: !1,
2226
2248
  error: null,
@@ -2229,21 +2251,21 @@ const lt = new wr.Client(["https://api.hive.blog"]), Yr = async (t) => {
2229
2251
  fetchWalletData: async (s) => {
2230
2252
  t({ isLoading: !0, error: null });
2231
2253
  try {
2232
- const r = await Yr(s), a = (T) => "error" in T;
2233
- if (!r || a(r))
2234
- throw new Error(a(r) ? r.error : "Account not found");
2235
- const o = typeof r.vesting_shares == "string" ? r.vesting_shares : "0.000000 VESTS", d = typeof r.balance == "string" ? r.balance : r.balance.toString(), i = typeof r.hbd_balance == "string" ? r.hbd_balance : r.hbd_balance.toString(), u = typeof r.savings_balance == "string" ? r.savings_balance : r.savings_balance.toString(), c = typeof r.savings_hbd_balance == "string" ? r.savings_hbd_balance : r.savings_hbd_balance.toString(), m = await Jr(o), l = parseFloat(d.split(" ")[0] || "0"), x = parseFloat(m), v = (l + x).toFixed(3), w = await Gr(v), k = {
2254
+ const r = await qr(s), n = (T) => "error" in T;
2255
+ if (!r || n(r))
2256
+ throw new Error(n(r) ? r.error : "Account not found");
2257
+ const o = typeof r.vesting_shares == "string" ? r.vesting_shares : "0.000000 VESTS", d = typeof r.balance == "string" ? r.balance : r.balance.toString(), i = typeof r.hbd_balance == "string" ? r.hbd_balance : r.hbd_balance.toString(), u = typeof r.savings_balance == "string" ? r.savings_balance : r.savings_balance.toString(), c = typeof r.savings_hbd_balance == "string" ? r.savings_hbd_balance : r.savings_hbd_balance.toString(), m = await Yr(o), l = parseFloat(d.split(" ")[0] || "0"), f = parseFloat(m), b = (l + f).toFixed(3), p = await Jr(b), h = {
2236
2258
  balance: d,
2237
2259
  hbd_balance: i,
2238
2260
  savings_balance: u,
2239
2261
  savings_hbd_balance: c,
2240
2262
  hive_power: `${m} HP`,
2241
- estimated_value: `$${w}`
2263
+ estimated_value: `$${p}`
2242
2264
  };
2243
- return t({ walletData: k }), k;
2265
+ return t({ walletData: h }), h;
2244
2266
  } catch (r) {
2245
- const a = r instanceof Error ? r.message : "Failed to fetch wallet data";
2246
- console.error("Wallet fetch error:", a);
2267
+ const n = r instanceof Error ? r.message : "Failed to fetch wallet data";
2268
+ console.error("Wallet fetch error:", n);
2247
2269
  const o = {
2248
2270
  balance: "0.000 HIVE",
2249
2271
  hbd_balance: "0.000 HBD",
@@ -2251,18 +2273,18 @@ const lt = new wr.Client(["https://api.hive.blog"]), Yr = async (t) => {
2251
2273
  savings_hbd_balance: "0.000 HBD",
2252
2274
  hive_power: "0 HP",
2253
2275
  estimated_value: "$0.00",
2254
- error: a
2276
+ error: n
2255
2277
  };
2256
- return t({ walletData: o, error: a }), o;
2278
+ return t({ walletData: o, error: n }), o;
2257
2279
  } finally {
2258
2280
  t({ isLoading: !1 });
2259
2281
  }
2260
2282
  }
2261
- })), ys = ({ username: t, className: s = "" }) => {
2262
- const { walletData: r, fetchWalletData: a, isLoading: o, error: d } = Kr();
2263
- H(() => {
2264
- t && a(t);
2265
- }, [t, a]);
2283
+ })), bs = ({ username: t, className: s = "" }) => {
2284
+ const { walletData: r, fetchWalletData: n, isLoading: o, error: d } = Gr();
2285
+ B(() => {
2286
+ t && n(t);
2287
+ }, [t, n]);
2266
2288
  const i = ({ label: u, value: c, icon: m, colorClass: l = "bg-primary/10" }) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between p-4 rounded-lg bg-card border border-border shadow-sm mb-3 transition-all duration-200 hover:shadow-md", children: [
2267
2289
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
2268
2290
  m && /* @__PURE__ */ e.jsx("div", { className: `p-2 rounded-full flex items-center justify-center ${l} text-primary`, children: m }),
@@ -2294,7 +2316,7 @@ const lt = new wr.Client(["https://api.hive.blog"]), Yr = async (t) => {
2294
2316
  ] }) : (r == null ? void 0 : r.estimated_value) ?? "-" })
2295
2317
  ] }),
2296
2318
  d && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center p-3 rounded-lg bg-destructive/10 border border-destructive/20 text-destructive mb-4", children: [
2297
- /* @__PURE__ */ e.jsx(Wr, { className: "mr-2" }),
2319
+ /* @__PURE__ */ e.jsx(Hr, { className: "mr-2" }),
2298
2320
  /* @__PURE__ */ e.jsx("span", { children: d })
2299
2321
  ] }),
2300
2322
  /* @__PURE__ */ e.jsx(
@@ -2302,7 +2324,7 @@ const lt = new wr.Client(["https://api.hive.blog"]), Yr = async (t) => {
2302
2324
  {
2303
2325
  label: "Balance",
2304
2326
  value: r == null ? void 0 : r.balance,
2305
- icon: /* @__PURE__ */ e.jsx(qr, {}),
2327
+ icon: /* @__PURE__ */ e.jsx(zr, {}),
2306
2328
  colorClass: "bg-blue-500/10"
2307
2329
  }
2308
2330
  ),
@@ -2311,7 +2333,7 @@ const lt = new wr.Client(["https://api.hive.blog"]), Yr = async (t) => {
2311
2333
  {
2312
2334
  label: "HBD Balance",
2313
2335
  value: r == null ? void 0 : r.hbd_balance,
2314
- icon: /* @__PURE__ */ e.jsx(Br, {}),
2336
+ icon: /* @__PURE__ */ e.jsx(Wr, {}),
2315
2337
  colorClass: "bg-green-500/10"
2316
2338
  }
2317
2339
  ),
@@ -2320,7 +2342,7 @@ const lt = new wr.Client(["https://api.hive.blog"]), Yr = async (t) => {
2320
2342
  {
2321
2343
  label: "Savings Balance",
2322
2344
  value: r == null ? void 0 : r.savings_balance,
2323
- icon: /* @__PURE__ */ e.jsx(zr, {}),
2345
+ icon: /* @__PURE__ */ e.jsx(Br, {}),
2324
2346
  colorClass: "bg-yellow-500/10"
2325
2347
  }
2326
2348
  ),
@@ -2329,7 +2351,7 @@ const lt = new wr.Client(["https://api.hive.blog"]), Yr = async (t) => {
2329
2351
  {
2330
2352
  label: "Savings HBD Balance",
2331
2353
  value: r == null ? void 0 : r.savings_hbd_balance,
2332
- icon: /* @__PURE__ */ e.jsx(Hr, {}),
2354
+ icon: /* @__PURE__ */ e.jsx(Ur, {}),
2333
2355
  colorClass: "bg-purple-500/10"
2334
2356
  }
2335
2357
  ),
@@ -2343,38 +2365,38 @@ const lt = new wr.Client(["https://api.hive.blog"]), Yr = async (t) => {
2343
2365
  }
2344
2366
  )
2345
2367
  ] }) });
2346
- }, Ge = "_communityLocalKey", Re = {
2368
+ }, tt = "_communityLocalKey", Ue = {
2347
2369
  getBookmarkedCommunities: () => {
2348
- const t = localStorage.getItem(Ge);
2370
+ const t = localStorage.getItem(tt);
2349
2371
  return t ? JSON.parse(t) : [];
2350
2372
  },
2351
2373
  isUserPresentLocally: (t) => {
2352
- const s = localStorage.getItem(Ge);
2374
+ const s = localStorage.getItem(tt);
2353
2375
  return s ? JSON.parse(s).includes(t) : !1;
2354
2376
  },
2355
2377
  storeLikedCommunityLocally: (t, s = !1) => {
2356
- let r = Re.getBookmarkedCommunities();
2357
- return r.includes(t) ? r = r.filter((a) => a !== t) : s || r.push(t), localStorage.setItem(Ge, JSON.stringify(r)), r;
2378
+ let r = Ue.getBookmarkedCommunities();
2379
+ return r.includes(t) ? r = r.filter((n) => n !== t) : s || r.push(t), localStorage.setItem(tt, JSON.stringify(r)), r;
2358
2380
  }
2359
- }, Mt = ({
2381
+ }, Wt = ({
2360
2382
  id: t,
2361
2383
  toastType: s,
2362
2384
  isLiked: r,
2363
- onAdd: a,
2385
+ onAdd: n,
2364
2386
  onRemove: o,
2365
2387
  onFavourite: d
2366
2388
  }) => {
2367
- const [i, u] = p(
2368
- r ?? Re.isUserPresentLocally(t)
2389
+ const [i, u] = y(
2390
+ r ?? Ue.isUserPresentLocally(t)
2369
2391
  );
2370
- H(() => {
2392
+ B(() => {
2371
2393
  r !== void 0 && u(r);
2372
2394
  }, [r]);
2373
2395
  const c = () => {
2374
- d && d(), i ? (o ? o(t, "remove_bookmark") : Re.storeLikedCommunityLocally(
2396
+ d && d(), i ? (o ? o(t, "remove_bookmark") : Ue.storeLikedCommunityLocally(
2375
2397
  t,
2376
2398
  !0
2377
- ), m(!1)) : (a ? a(t, "add_bookmark") : Re.storeLikedCommunityLocally(t), m(!0)), u(!i);
2399
+ ), m(!1)) : (n ? n(t, "add_bookmark") : Ue.storeLikedCommunityLocally(t), m(!0)), u(!i);
2378
2400
  }, m = (l) => {
2379
2401
  alert(`The ${s} is ${l ? "added to" : "removed from"} your bookmarks`);
2380
2402
  };
@@ -2387,13 +2409,13 @@ const lt = new wr.Client(["https://api.hive.blog"]), Yr = async (t) => {
2387
2409
  }
2388
2410
  );
2389
2411
  };
2390
- class Qr {
2412
+ class Kr {
2391
2413
  constructor() {
2392
- $e(this, "HIVE_API_URL", "https://api.hive.blog");
2414
+ De(this, "HIVE_API_URL", "https://api.hive.blog");
2393
2415
  }
2394
- async getListOfCommunities(s, r = 20, a) {
2416
+ async getListOfCommunities(s, r = 20, n) {
2395
2417
  const o = { limit: r };
2396
- a && a.trim() !== "" && (o.last = a), s && s.trim() !== "" && (o.query = s);
2418
+ n && n.trim() !== "" && (o.last = n), s && s.trim() !== "" && (o.query = s);
2397
2419
  const d = {
2398
2420
  jsonrpc: "2.0",
2399
2421
  method: "bridge.list_communities",
@@ -2423,23 +2445,23 @@ class Qr {
2423
2445
  id: 1
2424
2446
  };
2425
2447
  try {
2426
- const a = await fetch(this.HIVE_API_URL, {
2448
+ const n = await fetch(this.HIVE_API_URL, {
2427
2449
  method: "POST",
2428
2450
  headers: {
2429
2451
  "Content-Type": "application/json"
2430
2452
  },
2431
2453
  body: JSON.stringify(r)
2432
2454
  });
2433
- if (!a.ok)
2434
- throw new Error(`HTTP error! status: ${a.status}`);
2435
- return await a.json();
2436
- } catch (a) {
2437
- throw console.error("Error fetching community details:", a), a;
2455
+ if (!n.ok)
2456
+ throw new Error(`HTTP error! status: ${n.status}`);
2457
+ return await n.json();
2458
+ } catch (n) {
2459
+ throw console.error("Error fetching community details:", n), n;
2438
2460
  }
2439
2461
  }
2440
- async getCommunitySubscribers(s, r = 100, a) {
2462
+ async getCommunitySubscribers(s, r = 100, n) {
2441
2463
  const o = { community: s, limit: r };
2442
- a && a.trim() !== "" && (o.last = a);
2464
+ n && n.trim() !== "" && (o.last = n);
2443
2465
  const d = {
2444
2466
  jsonrpc: "2.0",
2445
2467
  method: "bridge.list_community_roles",
@@ -2473,50 +2495,50 @@ class Qr {
2473
2495
  return `https://images.hive.blog/u/${s}/avatar`;
2474
2496
  }
2475
2497
  }
2476
- const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2477
- const [s, r] = p([]), [a, o] = p(""), [d, i] = p(!0), [u, c] = p(!1), [m, l] = p(!0), [x, v] = p(
2498
+ const fe = new Kr(), ys = ({ onSelectCommunity: t }) => {
2499
+ const [s, r] = y([]), [n, o] = y(""), [d, i] = y(!0), [u, c] = y(!1), [m, l] = y(!0), [f, b] = y(
2478
2500
  null
2479
- ), [w, k] = p(null), T = 20, f = Le(null), j = je(
2480
- async (_ = !1) => {
2481
- if (!(!_ && (u || !m)))
2501
+ ), [p, h] = y(null), T = 20, w = Ie(null), k = Ce(
2502
+ async (N = !1) => {
2503
+ if (!(!N && (u || !m)))
2482
2504
  try {
2483
- _ ? (i(!0), k(null), r([]), v(null), l(!0)) : c(!0);
2484
- const E = a.trim(), C = await ce.getListOfCommunities(
2485
- E.length >= 3 ? E : void 0,
2505
+ N ? (i(!0), h(null), r([]), b(null), l(!0)) : c(!0);
2506
+ const R = n.trim(), A = await fe.getListOfCommunities(
2507
+ R.length >= 3 ? R : void 0,
2486
2508
  T,
2487
- _ ? void 0 : x || void 0
2509
+ N ? void 0 : f || void 0
2488
2510
  );
2489
- r((Y) => _ ? C : [...Y, ...C]), C.length < T || C.length > 0 && C[C.length - 1].name === x ? l(!1) : C.length > 0 && v(C[C.length - 1].name || null);
2490
- } catch (E) {
2491
- k(
2492
- E instanceof Error ? E.message : "Failed to load communities"
2511
+ r(($) => N ? A : [...$, ...A]), A.length < T || A.length > 0 && A[A.length - 1].name === f ? l(!1) : A.length > 0 && b(A[A.length - 1].name || null);
2512
+ } catch (R) {
2513
+ h(
2514
+ R instanceof Error ? R.message : "Failed to load communities"
2493
2515
  ), l(!1);
2494
2516
  } finally {
2495
2517
  i(!1), c(!1);
2496
2518
  }
2497
2519
  },
2498
- [a, u, m, x]
2520
+ [n, u, m, f]
2499
2521
  );
2500
- H(() => {
2501
- const _ = setTimeout(
2522
+ B(() => {
2523
+ const N = setTimeout(
2502
2524
  () => {
2503
- j(!0);
2525
+ k(!0);
2504
2526
  },
2505
- a.length >= 3 || a.length === 0 ? 0 : 500
2527
+ n.length >= 3 || n.length === 0 ? 0 : 500
2506
2528
  );
2507
- return () => clearTimeout(_);
2508
- }, [a]), H(() => {
2509
- var _;
2510
- (_ = f.current) == null || _.focus();
2511
- }, [a, d, w]), H(() => {
2512
- const _ = () => {
2513
- window.innerHeight + document.documentElement.scrollTop >= document.documentElement.offsetHeight - 200 && !u && !d && m && j();
2529
+ return () => clearTimeout(N);
2530
+ }, [n]), B(() => {
2531
+ var N;
2532
+ (N = w.current) == null || N.focus();
2533
+ }, [n, d, p]), B(() => {
2534
+ const N = () => {
2535
+ window.innerHeight + document.documentElement.scrollTop >= document.documentElement.offsetHeight - 200 && !u && !d && m && k();
2514
2536
  };
2515
- return window.addEventListener("scroll", _), () => window.removeEventListener("scroll", _);
2516
- }, [j, u, d, m]);
2517
- const b = () => {
2518
- j(!0);
2519
- }, M = () => /* @__PURE__ */ e.jsx("div", { className: "space-y-4", children: Array.from({ length: 6 }).map((_, E) => /* @__PURE__ */ e.jsx(
2537
+ return window.addEventListener("scroll", N), () => window.removeEventListener("scroll", N);
2538
+ }, [k, u, d, m]);
2539
+ const v = () => {
2540
+ k(!0);
2541
+ }, D = () => /* @__PURE__ */ e.jsx("div", { className: "space-y-4", children: Array.from({ length: 6 }).map((N, R) => /* @__PURE__ */ e.jsx(
2520
2542
  "div",
2521
2543
  {
2522
2544
  className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 animate-pulse",
@@ -2529,19 +2551,19 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2529
2551
  /* @__PURE__ */ e.jsx("div", { className: "h-3 bg-gray-200 dark:bg-gray-700 rounded w-16" })
2530
2552
  ] })
2531
2553
  },
2532
- E
2554
+ R
2533
2555
  )) });
2534
2556
  return d && s.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "space-y-6", children: [
2535
2557
  /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
2536
- /* @__PURE__ */ e.jsx(Ye, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5" }),
2558
+ /* @__PURE__ */ e.jsx(Ze, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5" }),
2537
2559
  /* @__PURE__ */ e.jsx(
2538
2560
  "input",
2539
2561
  {
2540
2562
  type: "text",
2541
2563
  placeholder: "Search communities...",
2542
- value: a,
2543
- onChange: (_) => o(_.target.value),
2544
- ref: f,
2564
+ value: n,
2565
+ onChange: (N) => o(N.target.value),
2566
+ ref: w,
2545
2567
  autoFocus: !0,
2546
2568
  className: `w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
2547
2569
  rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400
@@ -2549,18 +2571,18 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2549
2571
  }
2550
2572
  )
2551
2573
  ] }),
2552
- /* @__PURE__ */ e.jsx(M, {})
2553
- ] }) : w && s.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "space-y-6", children: [
2574
+ /* @__PURE__ */ e.jsx(D, {})
2575
+ ] }) : p && s.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "space-y-6", children: [
2554
2576
  /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
2555
- /* @__PURE__ */ e.jsx(Ye, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5" }),
2577
+ /* @__PURE__ */ e.jsx(Ze, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5" }),
2556
2578
  /* @__PURE__ */ e.jsx(
2557
2579
  "input",
2558
2580
  {
2559
2581
  type: "text",
2560
2582
  placeholder: "Search communities...",
2561
- value: a,
2562
- onChange: (_) => o(_.target.value),
2563
- ref: f,
2583
+ value: n,
2584
+ onChange: (N) => o(N.target.value),
2585
+ ref: w,
2564
2586
  autoFocus: !0,
2565
2587
  className: `w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
2566
2588
  rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400
@@ -2570,14 +2592,14 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2570
2592
  ] }),
2571
2593
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center min-h-[400px] space-y-4", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
2572
2594
  /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Failed to load communities" }),
2573
- /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 dark:text-gray-400 mb-4", children: w }),
2595
+ /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 dark:text-gray-400 mb-4", children: p }),
2574
2596
  /* @__PURE__ */ e.jsxs(
2575
2597
  "button",
2576
2598
  {
2577
- onClick: b,
2599
+ onClick: v,
2578
2600
  className: "m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",
2579
2601
  children: [
2580
- /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4 mr-2" }),
2602
+ /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4 mr-2" }),
2581
2603
  "Try Again"
2582
2604
  ]
2583
2605
  }
@@ -2586,15 +2608,15 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2586
2608
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-6", children: [
2587
2609
  /* @__PURE__ */ e.jsx("div", { className: "", children: /* @__PURE__ */ e.jsx("h2", { className: "text-xl font-semibold text-gray-900 dark:text-white", children: "Communities" }) }),
2588
2610
  /* @__PURE__ */ e.jsxs("div", { className: "relative flex justify-between items-center", children: [
2589
- /* @__PURE__ */ e.jsx(Ye, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5" }),
2611
+ /* @__PURE__ */ e.jsx(Ze, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5" }),
2590
2612
  /* @__PURE__ */ e.jsx(
2591
2613
  "input",
2592
2614
  {
2593
2615
  type: "text",
2594
2616
  placeholder: "Search communities...",
2595
- value: a,
2596
- onChange: (_) => o(_.target.value),
2597
- ref: f,
2617
+ value: n,
2618
+ onChange: (N) => o(N.target.value),
2619
+ ref: w,
2598
2620
  autoFocus: !0,
2599
2621
  className: `w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
2600
2622
  rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400
@@ -2604,92 +2626,92 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2604
2626
  /* @__PURE__ */ e.jsx(
2605
2627
  "button",
2606
2628
  {
2607
- onClick: b,
2629
+ onClick: v,
2608
2630
  className: "m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",
2609
- children: /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4" })
2631
+ children: /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4" })
2610
2632
  }
2611
2633
  )
2612
2634
  ] }),
2613
2635
  s.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center min-h-[400px] space-y-4", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
2614
2636
  /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "No communities found" }),
2615
- /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 dark:text-gray-400", children: a ? "Try adjusting your search terms" : "Check back later for new communities" })
2637
+ /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 dark:text-gray-400", children: n ? "Try adjusting your search terms" : "Check back later for new communities" })
2616
2638
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
2617
- s.map((_) => /* @__PURE__ */ e.jsx(
2639
+ s.map((N) => /* @__PURE__ */ e.jsx(
2618
2640
  "div",
2619
2641
  {
2620
2642
  className: `bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
2621
2643
  rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
2622
2644
  transition-colors cursor-pointer`,
2623
- onClick: () => t(_.name || ""),
2645
+ onClick: () => t(N.name || ""),
2624
2646
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-4", children: [
2625
2647
  /* @__PURE__ */ e.jsx(
2626
2648
  "img",
2627
2649
  {
2628
- src: ce.communityIcon(_.name || ""),
2629
- alt: _.title,
2650
+ src: fe.communityIcon(N.name || ""),
2651
+ alt: N.title,
2630
2652
  className: "w-12 h-12 rounded-full object-cover",
2631
- onError: (E) => {
2632
- E.target.src = `https://ui-avatars.com/api/?name=${_.title}&background=random`;
2653
+ onError: (R) => {
2654
+ R.target.src = `https://ui-avatars.com/api/?name=${N.title}&background=random`;
2633
2655
  }
2634
2656
  }
2635
2657
  ),
2636
2658
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2637
- /* @__PURE__ */ e.jsx("h3", { className: "font-semibold text-gray-900 dark:text-white truncate", children: _.title }),
2638
- /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 line-clamp-2", children: _.about })
2659
+ /* @__PURE__ */ e.jsx("h3", { className: "font-semibold text-gray-900 dark:text-white truncate", children: N.title }),
2660
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 line-clamp-2", children: N.about })
2639
2661
  ] }),
2640
2662
  /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
2641
- (_.subscribers || 0).toLocaleString(),
2663
+ (N.subscribers || 0).toLocaleString(),
2642
2664
  " members"
2643
2665
  ] }) })
2644
2666
  ] })
2645
2667
  },
2646
- _.id
2668
+ N.id
2647
2669
  )),
2648
2670
  m && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center pt-4", children: u ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
2649
- /* @__PURE__ */ e.jsx(ae, { className: "w-4 h-4 animate-spin" }),
2671
+ /* @__PURE__ */ e.jsx(de, { className: "w-4 h-4 animate-spin" }),
2650
2672
  "Loading more communities..."
2651
2673
  ] }) : /* @__PURE__ */ e.jsx(
2652
2674
  "button",
2653
2675
  {
2654
- onClick: () => j(),
2676
+ onClick: () => k(),
2655
2677
  className: "m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",
2656
2678
  children: "Load More Communities"
2657
2679
  }
2658
2680
  ) })
2659
2681
  ] })
2660
2682
  ] });
2661
- }, Xr = ({ communityId: t }) => {
2662
- var x, v, w;
2663
- const [s, r] = p(null), [a, o] = p(!0), [d, i] = p(null), u = async () => {
2683
+ }, Qr = ({ communityId: t }) => {
2684
+ var f, b, p;
2685
+ const [s, r] = y(null), [n, o] = y(!0), [d, i] = y(null), u = async () => {
2664
2686
  try {
2665
2687
  o(!0), i(null);
2666
- const k = await ce.getCommunityDetails(t);
2667
- r(k);
2668
- } catch (k) {
2688
+ const h = await fe.getCommunityDetails(t);
2689
+ r(h);
2690
+ } catch (h) {
2669
2691
  i(
2670
- k instanceof Error ? k.message : "Failed to load community details"
2692
+ h instanceof Error ? h.message : "Failed to load community details"
2671
2693
  );
2672
2694
  } finally {
2673
2695
  o(!1);
2674
2696
  }
2675
2697
  };
2676
- H(() => {
2698
+ B(() => {
2677
2699
  u();
2678
2700
  }, [t]);
2679
- const c = (k) => {
2701
+ const c = (h) => {
2680
2702
  try {
2681
- return new Date(k).toLocaleDateString("en-US", {
2703
+ return new Date(h).toLocaleDateString("en-US", {
2682
2704
  year: "numeric",
2683
2705
  month: "long",
2684
2706
  day: "numeric"
2685
2707
  });
2686
2708
  } catch {
2687
- return k;
2709
+ return h;
2688
2710
  }
2689
- }, m = (k) => k.replace(/<[^>]*>/g, "");
2690
- if (a)
2711
+ }, m = (h) => h.replace(/<[^>]*>/g, "");
2712
+ if (n)
2691
2713
  return /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
2692
- /* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 animate-spin" }),
2714
+ /* @__PURE__ */ e.jsx(de, { className: "w-5 h-5 animate-spin" }),
2693
2715
  "Loading community details..."
2694
2716
  ] }) });
2695
2717
  if (d)
@@ -2702,7 +2724,7 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2702
2724
  onClick: u,
2703
2725
  className: "m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",
2704
2726
  children: [
2705
- /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4" }),
2727
+ /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4" }),
2706
2728
  "Try Again"
2707
2729
  ]
2708
2730
  }
@@ -2727,11 +2749,11 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2727
2749
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: [
2728
2750
  /* @__PURE__ */ e.jsxs("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded-lg", children: [
2729
2751
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium text-gray-500 dark:text-gray-400 mb-1", children: "Total Authors" }),
2730
- /* @__PURE__ */ e.jsx("p", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: ((x = l.num_authors) == null ? void 0 : x.toLocaleString()) || "0" })
2752
+ /* @__PURE__ */ e.jsx("p", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: ((f = l.num_authors) == null ? void 0 : f.toLocaleString()) || "0" })
2731
2753
  ] }),
2732
2754
  /* @__PURE__ */ e.jsxs("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded-lg", children: [
2733
2755
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium text-gray-500 dark:text-gray-400 mb-1", children: "Subscribers" }),
2734
- /* @__PURE__ */ e.jsx("p", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: ((v = l.subscribers) == null ? void 0 : v.toLocaleString()) || "0" })
2756
+ /* @__PURE__ */ e.jsx("p", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: ((b = l.subscribers) == null ? void 0 : b.toLocaleString()) || "0" })
2735
2757
  ] }),
2736
2758
  /* @__PURE__ */ e.jsxs("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded-lg", children: [
2737
2759
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium text-gray-500 dark:text-gray-400 mb-1", children: "Created" }),
@@ -2743,7 +2765,7 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2743
2765
  ] }),
2744
2766
  /* @__PURE__ */ e.jsxs("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded-lg", children: [
2745
2767
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium text-gray-500 dark:text-gray-400 mb-1", children: "Pending Posts" }),
2746
- /* @__PURE__ */ e.jsx("p", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: ((w = l.num_pending) == null ? void 0 : w.toLocaleString()) || "0" })
2768
+ /* @__PURE__ */ e.jsx("p", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: ((p = l.num_pending) == null ? void 0 : p.toLocaleString()) || "0" })
2747
2769
  ] }),
2748
2770
  /* @__PURE__ */ e.jsxs("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded-lg", children: [
2749
2771
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium text-gray-500 dark:text-gray-400 mb-1", children: "Type" }),
@@ -2751,30 +2773,30 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2751
2773
  ] })
2752
2774
  ] })
2753
2775
  ] }) });
2754
- }, Zr = ({
2776
+ }, Xr = ({
2755
2777
  communityId: t,
2756
2778
  onSelectTeamMember: s
2757
2779
  }) => {
2758
2780
  var l;
2759
- const [r, a] = p(null), [o, d] = p(!0), [i, u] = p(null), c = async () => {
2781
+ const [r, n] = y(null), [o, d] = y(!0), [i, u] = y(null), c = async () => {
2760
2782
  try {
2761
2783
  d(!0), u(null);
2762
- const x = await ce.getCommunityDetails(t);
2763
- a(x);
2764
- } catch (x) {
2784
+ const f = await fe.getCommunityDetails(t);
2785
+ n(f);
2786
+ } catch (f) {
2765
2787
  u(
2766
- x instanceof Error ? x.message : "Failed to load team details"
2788
+ f instanceof Error ? f.message : "Failed to load team details"
2767
2789
  );
2768
2790
  } finally {
2769
2791
  d(!1);
2770
2792
  }
2771
2793
  };
2772
- H(() => {
2794
+ B(() => {
2773
2795
  c();
2774
2796
  }, [t]);
2775
2797
  const m = ((l = r == null ? void 0 : r.result) == null ? void 0 : l.team) || [];
2776
2798
  return o ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
2777
- /* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 animate-spin" }),
2799
+ /* @__PURE__ */ e.jsx(de, { className: "w-5 h-5 animate-spin" }),
2778
2800
  "Loading team members..."
2779
2801
  ] }) }) : i ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center min-h-[400px] space-y-4", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
2780
2802
  /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Failed to load team details" }),
@@ -2785,17 +2807,17 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2785
2807
  onClick: c,
2786
2808
  className: "m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",
2787
2809
  children: [
2788
- /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4 mr-2" }),
2810
+ /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4 mr-2" }),
2789
2811
  "Try Again"
2790
2812
  ]
2791
2813
  }
2792
2814
  )
2793
- ] }) }) : m.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 dark:text-gray-400", children: "No team members found" }) }) : /* @__PURE__ */ e.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4", children: m.map((x, v) => {
2794
- const w = x[0], k = x.length > 1 ? x[1] : "";
2815
+ ] }) }) : m.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 dark:text-gray-400", children: "No team members found" }) }) : /* @__PURE__ */ e.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4", children: m.map((f, b) => {
2816
+ const p = f[0], h = f.length > 1 ? f[1] : "";
2795
2817
  return /* @__PURE__ */ e.jsx(
2796
2818
  "div",
2797
2819
  {
2798
- onClick: () => s && s(w),
2820
+ onClick: () => s && s(p),
2799
2821
  className: `bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
2800
2822
  rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
2801
2823
  transition-colors cursor-pointer`,
@@ -2803,107 +2825,107 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2803
2825
  /* @__PURE__ */ e.jsx(
2804
2826
  "img",
2805
2827
  {
2806
- src: ce.userOwnerThumb(w),
2807
- alt: w,
2828
+ src: fe.userOwnerThumb(p),
2829
+ alt: p,
2808
2830
  className: "w-12 h-12 rounded-full object-cover",
2809
2831
  onError: (T) => {
2810
- T.target.src = `https://ui-avatars.com/api/?name=${w}&background=random`;
2832
+ T.target.src = `https://ui-avatars.com/api/?name=${p}&background=random`;
2811
2833
  }
2812
2834
  }
2813
2835
  ),
2814
2836
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2815
2837
  /* @__PURE__ */ e.jsxs("h3", { className: "font-semibold text-gray-900 dark:text-white truncate", children: [
2816
2838
  "@",
2817
- w
2839
+ p
2818
2840
  ] }),
2819
- k && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 capitalize truncate", children: k })
2841
+ h && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 capitalize truncate", children: h })
2820
2842
  ] })
2821
2843
  ] })
2822
2844
  },
2823
- `${w}-${v}`
2845
+ `${p}-${b}`
2824
2846
  );
2825
2847
  }) }) });
2826
- }, es = ({ communityId: t, onSelectCommunityMember: s }) => {
2827
- const [r, a] = p([]), [o, d] = p(!0), [i, u] = p(!1), [c, m] = p(!0), [l, x] = p(null), [v, w] = p(null), k = 100, T = je(
2828
- async (f = !1) => {
2829
- if (!(i && !f))
2848
+ }, Zr = ({ communityId: t, onSelectCommunityMember: s }) => {
2849
+ const [r, n] = y([]), [o, d] = y(!0), [i, u] = y(!1), [c, m] = y(!0), [l, f] = y(null), [b, p] = y(null), h = 100, T = Ce(
2850
+ async (w = !1) => {
2851
+ if (!(i && !w))
2830
2852
  try {
2831
- f ? (d(!0), w(null), a([]), x(null), m(!0)) : u(!0);
2832
- const j = await ce.getCommunitySubscribers(
2853
+ w ? (d(!0), p(null), n([]), f(null), m(!0)) : u(!0);
2854
+ const k = await fe.getCommunitySubscribers(
2833
2855
  t,
2834
- k,
2835
- f ? void 0 : l || void 0
2856
+ h,
2857
+ w ? void 0 : l || void 0
2836
2858
  );
2837
- j.length === 0 ? m(!1) : (a((b) => {
2838
- if (f) return j;
2839
- const M = new Set(b.map((E) => E.username)), _ = j.filter(
2840
- (E) => !M.has(E.username)
2859
+ k.length === 0 ? m(!1) : (n((v) => {
2860
+ if (w) return k;
2861
+ const D = new Set(v.map((R) => R.username)), N = k.filter(
2862
+ (R) => !D.has(R.username)
2841
2863
  );
2842
- return [...b, ..._];
2843
- }), j.length > 0 && x(j[j.length - 1].username), m(j.length === k));
2844
- } catch (j) {
2845
- w(j instanceof Error ? j.message : "Failed to load members");
2864
+ return [...v, ...N];
2865
+ }), k.length > 0 && f(k[k.length - 1].username), m(k.length === h));
2866
+ } catch (k) {
2867
+ p(k instanceof Error ? k.message : "Failed to load members");
2846
2868
  } finally {
2847
2869
  d(!1), u(!1);
2848
2870
  }
2849
2871
  },
2850
2872
  [t, i, l]
2851
2873
  );
2852
- return H(() => {
2874
+ return B(() => {
2853
2875
  T(!0);
2854
- }, [t]), H(() => {
2855
- const f = () => {
2876
+ }, [t]), B(() => {
2877
+ const w = () => {
2856
2878
  window.innerHeight + document.documentElement.scrollTop >= document.documentElement.offsetHeight - 200 && !i && !o && c && T();
2857
2879
  };
2858
- return window.addEventListener("scroll", f), () => window.removeEventListener("scroll", f);
2880
+ return window.addEventListener("scroll", w), () => window.removeEventListener("scroll", w);
2859
2881
  }, [T, i, o, c]), o && r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
2860
- /* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 animate-spin" }),
2882
+ /* @__PURE__ */ e.jsx(de, { className: "w-5 h-5 animate-spin" }),
2861
2883
  "Loading members..."
2862
- ] }) }) : v && r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center min-h-[400px] space-y-4", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
2884
+ ] }) }) : b && r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center min-h-[400px] space-y-4", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
2863
2885
  /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Failed to load members" }),
2864
- /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 dark:text-gray-400 mb-4", children: v }),
2886
+ /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 dark:text-gray-400 mb-4", children: b }),
2865
2887
  /* @__PURE__ */ e.jsxs(
2866
2888
  "button",
2867
2889
  {
2868
2890
  onClick: () => T(!0),
2869
2891
  className: "m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",
2870
2892
  children: [
2871
- /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4 mr-2" }),
2893
+ /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4 mr-2" }),
2872
2894
  "Try Again"
2873
2895
  ]
2874
2896
  }
2875
2897
  )
2876
2898
  ] }) }) : r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 dark:text-gray-400", children: "No community members found" }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-6", children: [
2877
- /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4", children: r.map((f, j) => /* @__PURE__ */ e.jsx(
2899
+ /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4", children: r.map((w, k) => /* @__PURE__ */ e.jsx(
2878
2900
  "div",
2879
2901
  {
2880
2902
  className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors cursor-pointer",
2881
- onClick: () => s == null ? void 0 : s(f.username),
2903
+ onClick: () => s == null ? void 0 : s(w.username),
2882
2904
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
2883
2905
  /* @__PURE__ */ e.jsx(
2884
2906
  "img",
2885
2907
  {
2886
- src: ce.userOwnerThumb(f.username),
2887
- alt: f.username,
2908
+ src: fe.userOwnerThumb(w.username),
2909
+ alt: w.username,
2888
2910
  className: "w-12 h-12 rounded-full object-cover",
2889
- onError: (b) => {
2890
- b.target.src = `https://ui-avatars.com/api/?name=${f.username}&background=random`;
2911
+ onError: (v) => {
2912
+ v.target.src = `https://ui-avatars.com/api/?name=${w.username}&background=random`;
2891
2913
  }
2892
2914
  }
2893
2915
  ),
2894
2916
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2895
2917
  /* @__PURE__ */ e.jsxs("h3", { className: "font-semibold text-gray-900 dark:text-white truncate", children: [
2896
2918
  "@",
2897
- f.username
2919
+ w.username
2898
2920
  ] }),
2899
- f.role && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 capitalize truncate", children: f.role })
2921
+ w.role && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 capitalize truncate", children: w.role })
2900
2922
  ] })
2901
2923
  ] })
2902
2924
  },
2903
- `${f.username}-${j}`
2925
+ `${w.username}-${k}`
2904
2926
  )) }),
2905
2927
  c && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center pt-4", children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
2906
- /* @__PURE__ */ e.jsx(ae, { className: "w-4 h-4 animate-spin" }),
2928
+ /* @__PURE__ */ e.jsx(de, { className: "w-4 h-4 animate-spin" }),
2907
2929
  "Loading more members..."
2908
2930
  ] }) : /* @__PURE__ */ e.jsx(
2909
2931
  "button",
@@ -2914,11 +2936,11 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2914
2936
  }
2915
2937
  ) })
2916
2938
  ] });
2917
- }, js = ({
2939
+ }, vs = ({
2918
2940
  communityId: t,
2919
2941
  onVideoClick: s,
2920
2942
  onAuthorClick: r,
2921
- onBack: a,
2943
+ onBack: n,
2922
2944
  onclickAboutTab: o,
2923
2945
  onclickTeamTab: d,
2924
2946
  onclickMemberTab: i,
@@ -2926,35 +2948,35 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2926
2948
  onFavourite: c,
2927
2949
  onRss: m,
2928
2950
  onMoreVertical: l,
2929
- showMoreVertical: x = !0
2951
+ showMoreVertical: f = !0
2930
2952
  }) => {
2931
- const v = Ie(), [w, k] = p("videos"), [T, f] = p(null), [j, b] = p(!1), [M, _] = p(!0);
2932
- H(() => {
2953
+ const b = It(), [p, h] = y("videos"), [T, w] = y(null), [k, v] = y(!1), [D, N] = y(!0);
2954
+ B(() => {
2933
2955
  (async () => {
2934
2956
  try {
2935
- _(!0);
2936
- const O = await ce.getCommunityDetails(t);
2937
- f(O);
2938
- } catch (O) {
2939
- console.error("Failed to fetch community details:", O);
2957
+ N(!0);
2958
+ const S = await fe.getCommunityDetails(t);
2959
+ w(S);
2960
+ } catch (S) {
2961
+ console.error("Failed to fetch community details:", S);
2940
2962
  } finally {
2941
- _(!1);
2963
+ N(!1);
2942
2964
  }
2943
2965
  })();
2944
2966
  }, [t]);
2945
- const E = () => {
2946
- var O;
2947
- const $ = `https://3speak.tv/user/${t}`;
2967
+ const R = () => {
2968
+ var S;
2969
+ const C = `https://3speak.tv/user/${t}`;
2948
2970
  navigator.share ? navigator.share({
2949
- title: ((O = T == null ? void 0 : T.result) == null ? void 0 : O.title) || t,
2950
- url: $
2951
- }) : navigator.clipboard.writeText($);
2952
- }, C = () => {
2971
+ title: ((S = T == null ? void 0 : T.result) == null ? void 0 : S.title) || t,
2972
+ url: C
2973
+ }) : navigator.clipboard.writeText(C);
2974
+ }, A = () => {
2953
2975
  window.open(`https://3speak.tv/rss/${t}.xml`, "_blank");
2954
- }, Y = ($) => {
2955
- v(`/user/${$}`);
2976
+ }, $ = (C) => {
2977
+ b(`/user/${C}`);
2956
2978
  };
2957
- if (M)
2979
+ if (D)
2958
2980
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ e.jsxs("div", { className: "animate-pulse", children: [
2959
2981
  /* @__PURE__ */ e.jsx("div", { className: "h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6" }),
2960
2982
  /* @__PURE__ */ e.jsxs("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6", children: [
@@ -2965,24 +2987,24 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2965
2987
  /* @__PURE__ */ e.jsx("div", { className: "h-4 bg-gray-200 dark:bg-gray-700 rounded w-32" })
2966
2988
  ] })
2967
2989
  ] }),
2968
- /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: Array.from({ length: 4 }).map(($, O) => /* @__PURE__ */ e.jsx(
2990
+ /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: Array.from({ length: 4 }).map((C, S) => /* @__PURE__ */ e.jsx(
2969
2991
  "div",
2970
2992
  {
2971
2993
  className: "h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"
2972
2994
  },
2973
- O
2995
+ S
2974
2996
  )) })
2975
2997
  ] })
2976
2998
  ] }) });
2977
- const h = T == null ? void 0 : T.result;
2999
+ const g = T == null ? void 0 : T.result;
2978
3000
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6", children: [
2979
3001
  /* @__PURE__ */ e.jsxs(
2980
3002
  "button",
2981
3003
  {
2982
- onClick: a,
3004
+ onClick: n,
2983
3005
  className: "flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",
2984
3006
  children: [
2985
- /* @__PURE__ */ e.jsx(Ce, { className: "w-4 h-4 mr-2" }),
3007
+ /* @__PURE__ */ e.jsx(Le, { className: "w-4 h-4 mr-2" }),
2986
3008
  "Back"
2987
3009
  ]
2988
3010
  }
@@ -2991,69 +3013,69 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
2991
3013
  /* @__PURE__ */ e.jsx(
2992
3014
  "img",
2993
3015
  {
2994
- src: ce.userOwnerThumb(t),
2995
- alt: (h == null ? void 0 : h.title) || t,
3016
+ src: fe.userOwnerThumb(t),
3017
+ alt: (g == null ? void 0 : g.title) || t,
2996
3018
  className: "w-16 h-16 rounded-full object-cover",
2997
- onError: ($) => {
2998
- $.target.src = `https://images.hive.blog/u/${(h == null ? void 0 : h.title) || t}/avatar`;
3019
+ onError: (C) => {
3020
+ C.target.src = `https://images.hive.blog/u/${(g == null ? void 0 : g.title) || t}/avatar`;
2999
3021
  }
3000
3022
  }
3001
3023
  ),
3002
3024
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
3003
- /* @__PURE__ */ e.jsx("h1", { className: "text-2xl font-bold text-gray-900 dark:text-white mb-2", children: (h == null ? void 0 : h.title) || t }),
3004
- /* @__PURE__ */ e.jsx("p", { className: "text-gray-600 dark:text-gray-400 mb-4", children: (h == null ? void 0 : h.about) || "Community description" }),
3025
+ /* @__PURE__ */ e.jsx("h1", { className: "text-2xl font-bold text-gray-900 dark:text-white mb-2", children: (g == null ? void 0 : g.title) || t }),
3026
+ /* @__PURE__ */ e.jsx("p", { className: "text-gray-600 dark:text-gray-400 mb-4", children: (g == null ? void 0 : g.about) || "Community description" }),
3005
3027
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap gap-6 text-sm", children: [
3006
3028
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
3007
- /* @__PURE__ */ e.jsx(De, { className: "w-4 h-4" }),
3029
+ /* @__PURE__ */ e.jsx(ze, { className: "w-4 h-4" }),
3008
3030
  /* @__PURE__ */ e.jsxs("span", { children: [
3009
- ((h == null ? void 0 : h.subscribers) || 0).toLocaleString(),
3031
+ ((g == null ? void 0 : g.subscribers) || 0).toLocaleString(),
3010
3032
  " members"
3011
3033
  ] })
3012
3034
  ] }),
3013
3035
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
3014
- /* @__PURE__ */ e.jsx(Pt, { className: "w-4 h-4" }),
3036
+ /* @__PURE__ */ e.jsx(Dt, { className: "w-4 h-4" }),
3015
3037
  /* @__PURE__ */ e.jsxs("span", { children: [
3016
3038
  "Created",
3017
3039
  " ",
3018
- h != null && h.created_at ? new Date(h.created_at).getFullYear() : "Unknown"
3040
+ g != null && g.created_at ? new Date(g.created_at).getFullYear() : "Unknown"
3019
3041
  ] })
3020
3042
  ] })
3021
3043
  ] })
3022
3044
  ] }),
3023
3045
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
3024
3046
  /* @__PURE__ */ e.jsx(
3025
- Mt,
3047
+ Wt,
3026
3048
  {
3027
3049
  id: t,
3028
3050
  toastType: "community",
3029
- onAdd: ($, O) => console.log("Added:", $, O),
3030
- onRemove: ($, O) => console.log("Removed:", $, O),
3051
+ onAdd: (C, S) => console.log("Added:", C, S),
3052
+ onRemove: (C, S) => console.log("Removed:", C, S),
3031
3053
  onFavourite: c
3032
3054
  }
3033
3055
  ),
3034
3056
  /* @__PURE__ */ e.jsx(
3035
3057
  "button",
3036
3058
  {
3037
- onClick: m || C,
3059
+ onClick: m || A,
3038
3060
  className: "p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",
3039
- children: /* @__PURE__ */ e.jsx(Vt, { className: "w-4 h-4" })
3061
+ children: /* @__PURE__ */ e.jsx(Mt, { className: "w-4 h-4" })
3040
3062
  }
3041
3063
  ),
3042
3064
  /* @__PURE__ */ e.jsx(
3043
3065
  "button",
3044
3066
  {
3045
- onClick: u || E,
3067
+ onClick: u || R,
3046
3068
  className: "p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",
3047
- children: /* @__PURE__ */ e.jsx(st, { className: "w-4 h-4" })
3069
+ children: /* @__PURE__ */ e.jsx(ct, { className: "w-4 h-4" })
3048
3070
  }
3049
3071
  ),
3050
- x && /* @__PURE__ */ e.jsx(
3072
+ f && /* @__PURE__ */ e.jsx(
3051
3073
  "button",
3052
3074
  {
3053
3075
  onClick: l || (() => {
3054
3076
  }),
3055
3077
  className: "p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",
3056
- children: /* @__PURE__ */ e.jsx(at, { className: "w-4 h-4" })
3078
+ children: /* @__PURE__ */ e.jsx(dt, { className: "w-4 h-4" })
3057
3079
  }
3058
3080
  )
3059
3081
  ] })
@@ -3063,76 +3085,76 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
3063
3085
  /* @__PURE__ */ e.jsx(
3064
3086
  "button",
3065
3087
  {
3066
- onClick: () => k("videos"),
3067
- className: `px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${w === "videos" ? "bg-blue-600 dark:bg-blue-500 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,
3088
+ onClick: () => h("videos"),
3089
+ className: `px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p === "videos" ? "bg-blue-600 dark:bg-blue-500 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,
3068
3090
  children: "Videos"
3069
3091
  }
3070
3092
  ),
3071
3093
  /* @__PURE__ */ e.jsx(
3072
3094
  "button",
3073
3095
  {
3074
- onClick: () => o ? o() : k("about"),
3075
- className: `px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${w === "about" ? "bg-blue-600 dark:bg-blue-500 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,
3096
+ onClick: () => o ? o() : h("about"),
3097
+ className: `px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p === "about" ? "bg-blue-600 dark:bg-blue-500 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,
3076
3098
  children: "About"
3077
3099
  }
3078
3100
  ),
3079
3101
  /* @__PURE__ */ e.jsx(
3080
3102
  "button",
3081
3103
  {
3082
- onClick: () => d ? d() : k("team"),
3083
- className: `px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${w === "team" ? "bg-blue-600 dark:bg-blue-500 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,
3104
+ onClick: () => d ? d() : h("team"),
3105
+ className: `px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p === "team" ? "bg-blue-600 dark:bg-blue-500 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,
3084
3106
  children: "Team"
3085
3107
  }
3086
3108
  ),
3087
3109
  /* @__PURE__ */ e.jsx(
3088
3110
  "button",
3089
3111
  {
3090
- onClick: () => i ? i() : k("members"),
3091
- className: `px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${w === "members" ? "bg-blue-600 dark:bg-blue-500 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,
3112
+ onClick: () => i ? i() : h("members"),
3113
+ className: `px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p === "members" ? "bg-blue-600 dark:bg-blue-500 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,
3092
3114
  children: "Members"
3093
3115
  }
3094
3116
  )
3095
3117
  ] }),
3096
3118
  /* @__PURE__ */ e.jsxs("div", { className: "mt-6", children: [
3097
- w === "videos" && /* @__PURE__ */ e.jsx(
3098
- ot,
3119
+ p === "videos" && /* @__PURE__ */ e.jsx(
3120
+ ut,
3099
3121
  {
3100
- feedType: Q.COMMUNITY,
3122
+ feedType: K.COMMUNITY,
3101
3123
  communityId: t,
3102
3124
  onVideoClick: s,
3103
3125
  onAuthorClick: r
3104
3126
  }
3105
3127
  ),
3106
- w === "about" && !o && /* @__PURE__ */ e.jsx(Xr, { communityId: t }),
3107
- w === "team" && !d && /* @__PURE__ */ e.jsx(
3108
- Zr,
3128
+ p === "about" && !o && /* @__PURE__ */ e.jsx(Qr, { communityId: t }),
3129
+ p === "team" && !d && /* @__PURE__ */ e.jsx(
3130
+ Xr,
3109
3131
  {
3110
3132
  communityId: t,
3111
- onSelectTeamMember: Y
3133
+ onSelectTeamMember: $
3112
3134
  }
3113
3135
  ),
3114
- w === "members" && !i && /* @__PURE__ */ e.jsx(
3115
- es,
3136
+ p === "members" && !i && /* @__PURE__ */ e.jsx(
3137
+ Zr,
3116
3138
  {
3117
3139
  communityId: t,
3118
- onSelectCommunityMember: Y
3140
+ onSelectCommunityMember: $
3119
3141
  }
3120
3142
  )
3121
3143
  ] })
3122
3144
  ] })
3123
3145
  ] });
3124
- }, ws = ({
3146
+ }, js = ({
3125
3147
  currentUser: t,
3126
3148
  onTabChanged: s,
3127
3149
  onPublish: r,
3128
- onViewMyVideo: a,
3150
+ onViewMyVideo: n,
3129
3151
  onMoreOptions: o,
3130
3152
  onTapBackButton: d,
3131
3153
  shouldShowBackButton: i = !0,
3132
3154
  shouldShowPublishButton: u = !1,
3133
3155
  shouldShowMoreOptionsButton: c = !1
3134
3156
  }) => {
3135
- const m = Ie(), [l, x] = p(0), [v, w] = p([]), [k, T] = p(!0), [f, j] = p(null), b = v.filter(
3157
+ const m = It(), [l, f] = y(0), [b, p] = y([]), [h, T] = y(!0), [w, k] = y(null), v = b.filter(
3136
3158
  (F) => [
3137
3159
  "encoding",
3138
3160
  "uploaded",
@@ -3143,31 +3165,31 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
3143
3165
  "encoding_failed",
3144
3166
  "encoding_ipfs"
3145
3167
  ].includes(F.status || "")
3146
- ), M = v.filter((F) => F.status === "publish_manual"), _ = v.filter((F) => F.status === "published");
3147
- H(() => {
3148
- t != null && t.token && E();
3168
+ ), D = b.filter((F) => F.status === "publish_manual"), N = b.filter((F) => F.status === "published");
3169
+ B(() => {
3170
+ t != null && t.token && R();
3149
3171
  }, [t]);
3150
- const E = async () => {
3172
+ const R = async () => {
3151
3173
  if (!(t != null && t.token)) {
3152
- j("No authentication token provided"), T(!1);
3174
+ k("No authentication token provided"), T(!1);
3153
3175
  return;
3154
3176
  }
3155
- T(!0), j(null);
3177
+ T(!0), k(null);
3156
3178
  try {
3157
- const F = await Z.getMyVideos(t.token);
3158
- w(F);
3179
+ const F = await te.getMyVideos(t.token);
3180
+ p(F);
3159
3181
  } catch (F) {
3160
- console.error("Error fetching videos:", F), j(
3182
+ console.error("Error fetching videos:", F), k(
3161
3183
  `Failed to load videos: ${F instanceof Error ? F.message : "Unknown error"}`
3162
3184
  );
3163
3185
  } finally {
3164
3186
  T(!1);
3165
3187
  }
3166
- }, C = (F) => {
3167
- x(F), s == null || s(F);
3168
- }, Y = (F) => {
3188
+ }, A = (F) => {
3189
+ f(F), s == null || s(F);
3190
+ }, $ = (F) => {
3169
3191
  F.owner && F.permlink && m(`/video/${F.owner}/${F.permlink}`);
3170
- }, h = (F) => {
3192
+ }, g = (F) => {
3171
3193
  switch (F.toLowerCase()) {
3172
3194
  case "published":
3173
3195
  return "bg-green-500";
@@ -3181,33 +3203,33 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
3181
3203
  default:
3182
3204
  return "bg-gray-500";
3183
3205
  }
3184
- }, $ = [
3206
+ }, C = [
3185
3207
  "ipfs_pinning",
3186
3208
  "ipfs_pinning_failed",
3187
3209
  "encoding",
3188
3210
  "encoding_failed",
3189
3211
  "encoding_ipfs"
3190
- ], O = (F, G) => {
3212
+ ], S = (F, O) => {
3191
3213
  if (F.length === 0) {
3192
- let N = "";
3193
- switch (G) {
3214
+ let _ = "";
3215
+ switch (O) {
3194
3216
  case "publishNow":
3195
- N = "No videos ready to publish.";
3217
+ _ = "No videos ready to publish.";
3196
3218
  break;
3197
3219
  case "myVideos":
3198
- N = "No published videos found.";
3220
+ _ = "No published videos found.";
3199
3221
  break;
3200
3222
  case "encoding":
3201
- N = "No videos currently encoding.";
3223
+ _ = "No videos currently encoding.";
3202
3224
  break;
3203
3225
  }
3204
3226
  return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center py-16", children: [
3205
- /* @__PURE__ */ e.jsx(kt, { className: "w-16 h-16 text-gray-400 mb-4" }),
3206
- /* @__PURE__ */ e.jsx("p", { className: "text-gray-600 dark:text-gray-400 text-center", children: N })
3227
+ /* @__PURE__ */ e.jsx(Ct, { className: "w-16 h-16 text-gray-400 mb-4" }),
3228
+ /* @__PURE__ */ e.jsx("p", { className: "text-gray-600 dark:text-gray-400 text-center", children: _ })
3207
3229
  ] });
3208
3230
  }
3209
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-3 w-full", children: F.map((N, L) => {
3210
- const V = N.thumbnail || "", U = N.title || "No Title", I = N.permlink || "", q = N.owner || (t == null ? void 0 : t.username) || "", J = N.id || "", ne = $.includes(N.status || "");
3231
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-3 w-full", children: F.map((_, Y) => {
3232
+ const Q = _.thumbnail || "", U = _.title || "No Title", H = _.permlink || "", re = _.owner || (t == null ? void 0 : t.username) || "", X = _.id || "", ue = C.includes(_.status || "");
3211
3233
  return /* @__PURE__ */ e.jsx(
3212
3234
  "div",
3213
3235
  {
@@ -3217,20 +3239,20 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
3217
3239
  /* @__PURE__ */ e.jsx(
3218
3240
  "img",
3219
3241
  {
3220
- src: fe(V) || `https://images.hive.blog/u/${t == null ? void 0 : t.username}/avatar`,
3242
+ src: je(Q) || `https://images.hive.blog/u/${t == null ? void 0 : t.username}/avatar`,
3221
3243
  alt: U,
3222
3244
  className: "w-24 h-16 rounded-lg object-cover",
3223
- onError: (K) => {
3224
- K.target.src = `https://images.hive.blog/u/${t == null ? void 0 : t.username}/avatar`;
3245
+ onError: (Z) => {
3246
+ Z.target.src = `https://images.hive.blog/u/${t == null ? void 0 : t.username}/avatar`;
3225
3247
  }
3226
3248
  }
3227
3249
  ),
3228
- $.includes(N.status || "") ? /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/30 rounded-lg", children: /* @__PURE__ */ e.jsx(_t, { className: "w-6 h-6 text-red-500" }) }) : /* @__PURE__ */ e.jsx(
3250
+ C.includes(_.status || "") ? /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/30 rounded-lg", children: /* @__PURE__ */ e.jsx(St, { className: "w-6 h-6 text-red-500" }) }) : /* @__PURE__ */ e.jsx(
3229
3251
  "div",
3230
3252
  {
3231
3253
  className: "absolute inset-0 flex items-center justify-center bg-black/20 opacity-0 hover:opacity-100 transition-opacity cursor-pointer rounded-lg",
3232
- onClick: () => Y(N),
3233
- children: /* @__PURE__ */ e.jsx(et, { className: "w-6 h-6 text-white" })
3254
+ onClick: () => $(_),
3255
+ children: /* @__PURE__ */ e.jsx(ot, { className: "w-6 h-6 text-white" })
3234
3256
  }
3235
3257
  )
3236
3258
  ] }),
@@ -3239,7 +3261,7 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
3239
3261
  "h3",
3240
3262
  {
3241
3263
  className: "font-semibold text-gray-900 dark:text-white text-sm cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",
3242
- onClick: () => Y(N),
3264
+ onClick: () => $(_),
3243
3265
  style: {
3244
3266
  display: "-webkit-box",
3245
3267
  WebkitLineClamp: 2,
@@ -3252,31 +3274,31 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
3252
3274
  ),
3253
3275
  /* @__PURE__ */ e.jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-xs mt-1", children: [
3254
3276
  "By ",
3255
- q
3277
+ re
3256
3278
  ] }),
3257
- N.status && /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: /* @__PURE__ */ e.jsx(
3279
+ _.status && /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: /* @__PURE__ */ e.jsx(
3258
3280
  "span",
3259
3281
  {
3260
- className: `inline-block px-2 py-1 rounded-full text-xs font-semibold text-white ${h(
3261
- N.status
3282
+ className: `inline-block px-2 py-1 rounded-full text-xs font-semibold text-white ${g(
3283
+ _.status
3262
3284
  )}`,
3263
- children: N.status.toUpperCase()
3285
+ children: _.status.toUpperCase()
3264
3286
  }
3265
3287
  ) })
3266
3288
  ] }),
3267
- ne ? /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 pl-2", children: /* @__PURE__ */ e.jsx(_t, { className: "w-5 h-5 text-red-500" }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-end gap-2", children: [
3268
- G === "publishNow" && u && /* @__PURE__ */ e.jsx(
3289
+ ue ? /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 pl-2", children: /* @__PURE__ */ e.jsx(St, { className: "w-5 h-5 text-red-500" }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-end gap-2", children: [
3290
+ O === "publishNow" && u && /* @__PURE__ */ e.jsx(
3269
3291
  "button",
3270
3292
  {
3271
- onClick: () => r == null ? void 0 : r(q, I),
3293
+ onClick: () => r == null ? void 0 : r(re, H),
3272
3294
  className: "bg-green-600 hover:bg-green-700 text-white text-xs px-3 py-1 rounded-md transition-colors",
3273
3295
  children: "Publish"
3274
3296
  }
3275
3297
  ),
3276
- G === "myVideos" && /* @__PURE__ */ e.jsx(
3298
+ O === "myVideos" && /* @__PURE__ */ e.jsx(
3277
3299
  "button",
3278
3300
  {
3279
- onClick: () => a ? a(q, I) : Y(N),
3301
+ onClick: () => n ? n(re, H) : $(_),
3280
3302
  className: "bg-blue-600 hover:bg-blue-700 text-white text-xs px-3 py-1 rounded-md transition-colors",
3281
3303
  children: "View"
3282
3304
  }
@@ -3284,15 +3306,15 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
3284
3306
  c && /* @__PURE__ */ e.jsx(
3285
3307
  "button",
3286
3308
  {
3287
- onClick: () => o == null ? void 0 : o(J),
3309
+ onClick: () => o == null ? void 0 : o(X),
3288
3310
  className: "p-1 h-6 w-6 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",
3289
- children: /* @__PURE__ */ e.jsx(at, { className: "w-4 h-4" })
3311
+ children: /* @__PURE__ */ e.jsx(dt, { className: "w-4 h-4" })
3290
3312
  }
3291
3313
  )
3292
3314
  ] })
3293
3315
  ] })
3294
3316
  },
3295
- `${J}-${L}`
3317
+ `${X}-${Y}`
3296
3318
  );
3297
3319
  }) });
3298
3320
  };
@@ -3303,7 +3325,7 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
3303
3325
  onClick: d,
3304
3326
  className: "flex items-center justify-center mr-4 my-2 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",
3305
3327
  children: [
3306
- /* @__PURE__ */ e.jsx(Ce, { className: "w-4 h-4 mr-2" }),
3328
+ /* @__PURE__ */ e.jsx(Le, { className: "w-4 h-4 mr-2" }),
3307
3329
  "Back"
3308
3330
  ]
3309
3331
  }
@@ -3327,9 +3349,9 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
3327
3349
  /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(
3328
3350
  "button",
3329
3351
  {
3330
- onClick: E,
3352
+ onClick: R,
3331
3353
  className: "p-2 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",
3332
- children: /* @__PURE__ */ e.jsx(se, { className: "w-5 h-5" })
3354
+ children: /* @__PURE__ */ e.jsx(ce, { className: "w-5 h-5" })
3333
3355
  }
3334
3356
  ) })
3335
3357
  ] }),
@@ -3337,78 +3359,78 @@ const ce = new Qr(), vs = ({ onSelectCommunity: t }) => {
3337
3359
  /* @__PURE__ */ e.jsxs(
3338
3360
  "button",
3339
3361
  {
3340
- onClick: () => C(0),
3362
+ onClick: () => A(0),
3341
3363
  className: `flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${l === 0 ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,
3342
3364
  children: [
3343
3365
  /* @__PURE__ */ e.jsx(vr, { className: "w-4 h-4" }),
3344
3366
  /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: "Publish Now" }),
3345
3367
  /* @__PURE__ */ e.jsx("span", { className: "sm:hidden", children: "Publish" }),
3346
- M.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full", children: M.length })
3368
+ D.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full", children: D.length })
3347
3369
  ]
3348
3370
  }
3349
3371
  ),
3350
3372
  /* @__PURE__ */ e.jsxs(
3351
3373
  "button",
3352
3374
  {
3353
- onClick: () => C(1),
3375
+ onClick: () => A(1),
3354
3376
  className: `flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${l === 1 ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,
3355
3377
  children: [
3356
- /* @__PURE__ */ e.jsx(kt, { className: "w-4 h-4" }),
3378
+ /* @__PURE__ */ e.jsx(Ct, { className: "w-4 h-4" }),
3357
3379
  /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: "My Videos" }),
3358
3380
  /* @__PURE__ */ e.jsx("span", { className: "sm:hidden", children: "Videos" }),
3359
- _.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full", children: _.length })
3381
+ N.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full", children: N.length })
3360
3382
  ]
3361
3383
  }
3362
3384
  ),
3363
3385
  /* @__PURE__ */ e.jsxs(
3364
3386
  "button",
3365
3387
  {
3366
- onClick: () => C(2),
3388
+ onClick: () => A(2),
3367
3389
  className: `flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${l === 2 ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,
3368
3390
  children: [
3369
3391
  /* @__PURE__ */ e.jsx(jr, { className: "w-4 h-4" }),
3370
3392
  /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: "Encoding" }),
3371
3393
  /* @__PURE__ */ e.jsx("span", { className: "sm:hidden", children: "Encoding" }),
3372
- b.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full", children: b.length })
3394
+ v.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full", children: v.length })
3373
3395
  ]
3374
3396
  }
3375
3397
  )
3376
3398
  ] }) })
3377
3399
  ] }),
3378
- /* @__PURE__ */ e.jsx("div", { className: "py-4 md:py-6 w-full", children: k ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsx("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600" }) }) : f ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center min-h-[400px] text-center", children: [
3379
- /* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ e.jsx(Rt, { className: "w-8 h-8 text-red-600 dark:text-red-400" }) }),
3400
+ /* @__PURE__ */ e.jsx("div", { className: "py-4 md:py-6 w-full", children: h ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsx("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600" }) }) : w ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center min-h-[400px] text-center", children: [
3401
+ /* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ e.jsx(At, { className: "w-8 h-8 text-red-600 dark:text-red-400" }) }),
3380
3402
  /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Failed to load videos" }),
3381
- /* @__PURE__ */ e.jsx("p", { className: "text-gray-600 dark:text-gray-400 mb-4", children: f }),
3403
+ /* @__PURE__ */ e.jsx("p", { className: "text-gray-600 dark:text-gray-400 mb-4", children: w }),
3382
3404
  /* @__PURE__ */ e.jsx(
3383
3405
  "button",
3384
3406
  {
3385
- onClick: E,
3407
+ onClick: R,
3386
3408
  className: "bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md transition-colors",
3387
3409
  children: "Retry"
3388
3410
  }
3389
3411
  )
3390
3412
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-6", children: [
3391
- l === 0 && O(
3392
- M,
3413
+ l === 0 && S(
3414
+ D,
3393
3415
  "publishNow"
3394
3416
  /* PUBLISH_NOW */
3395
3417
  ),
3396
- l === 1 && O(
3397
- _,
3418
+ l === 1 && S(
3419
+ N,
3398
3420
  "myVideos"
3399
3421
  /* MY_VIDEOS */
3400
3422
  ),
3401
- l === 2 && O(
3402
- b,
3423
+ l === 2 && S(
3424
+ v,
3403
3425
  "encoding"
3404
3426
  /* ENCODING */
3405
3427
  )
3406
3428
  ] }) })
3407
3429
  ] }) : /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsx("p", { className: "text-gray-600 dark:text-gray-400", children: "Please login to view your account" }) });
3408
3430
  };
3409
- class ts {
3431
+ class es {
3410
3432
  constructor() {
3411
- $e(this, "HIVE_API_URL", "https://api.hive.blog");
3433
+ De(this, "HIVE_API_URL", "https://api.hive.blog");
3412
3434
  }
3413
3435
  async getProfile(s) {
3414
3436
  const r = {
@@ -3418,16 +3440,16 @@ class ts {
3418
3440
  account: s
3419
3441
  },
3420
3442
  id: 1
3421
- }, a = await fetch(this.HIVE_API_URL, {
3443
+ }, n = await fetch(this.HIVE_API_URL, {
3422
3444
  method: "POST",
3423
3445
  headers: {
3424
3446
  "Content-Type": "application/json"
3425
3447
  },
3426
3448
  body: JSON.stringify(r)
3427
3449
  });
3428
- if (!a.ok)
3429
- throw new Error(`HTTP error! status: ${a.status}`);
3430
- return await a.json();
3450
+ if (!n.ok)
3451
+ throw new Error(`HTTP error! status: ${n.status}`);
3452
+ return await n.json();
3431
3453
  }
3432
3454
  async getFollowers(s) {
3433
3455
  const r = {
@@ -3435,16 +3457,16 @@ class ts {
3435
3457
  method: "condenser_api.get_followers",
3436
3458
  params: [s, null, "blog"],
3437
3459
  id: 1
3438
- }, a = await fetch(this.HIVE_API_URL, {
3460
+ }, n = await fetch(this.HIVE_API_URL, {
3439
3461
  method: "POST",
3440
3462
  headers: {
3441
3463
  "Content-Type": "application/json"
3442
3464
  },
3443
3465
  body: JSON.stringify(r)
3444
3466
  });
3445
- if (!a.ok)
3446
- throw new Error(`HTTP error! status: ${a.status}`);
3447
- return (await a.json()).result;
3467
+ if (!n.ok)
3468
+ throw new Error(`HTTP error! status: ${n.status}`);
3469
+ return (await n.json()).result;
3448
3470
  }
3449
3471
  async getFollowing(s) {
3450
3472
  const r = {
@@ -3452,30 +3474,30 @@ class ts {
3452
3474
  method: "condenser_api.get_following",
3453
3475
  params: [s, null, "blog"],
3454
3476
  id: 1
3455
- }, a = await fetch(this.HIVE_API_URL, {
3477
+ }, n = await fetch(this.HIVE_API_URL, {
3456
3478
  method: "POST",
3457
3479
  headers: {
3458
3480
  "Content-Type": "application/json"
3459
3481
  },
3460
3482
  body: JSON.stringify(r)
3461
3483
  });
3462
- if (!a.ok)
3463
- throw new Error(`HTTP error! status: ${a.status}`);
3464
- return (await a.json()).result;
3484
+ if (!n.ok)
3485
+ throw new Error(`HTTP error! status: ${n.status}`);
3486
+ return (await n.json()).result;
3465
3487
  }
3466
3488
  userAvatar(s) {
3467
3489
  return `https://images.hive.blog/u/${s}/avatar`;
3468
3490
  }
3469
3491
  }
3470
- const ie = new ts(), rs = ({
3492
+ const he = new es(), ts = ({
3471
3493
  username: t,
3472
3494
  onSelectUser: s
3473
3495
  }) => {
3474
- const [r, a] = p([]), [o, d] = p(!0), [i, u] = p(null), c = async () => {
3496
+ const [r, n] = y([]), [o, d] = y(!0), [i, u] = y(null), c = async () => {
3475
3497
  try {
3476
3498
  d(!0), u(null);
3477
- const m = await ie.getFollowers(t);
3478
- a(m);
3499
+ const m = await he.getFollowers(t);
3500
+ n(m);
3479
3501
  } catch (m) {
3480
3502
  u(
3481
3503
  m instanceof Error ? m.message : "Failed to load followers"
@@ -3484,10 +3506,10 @@ const ie = new ts(), rs = ({
3484
3506
  d(!1);
3485
3507
  }
3486
3508
  };
3487
- return H(() => {
3509
+ return B(() => {
3488
3510
  c();
3489
3511
  }, [t]), o ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
3490
- /* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 animate-spin" }),
3512
+ /* @__PURE__ */ e.jsx(de, { className: "w-5 h-5 animate-spin" }),
3491
3513
  "Loading followers..."
3492
3514
  ] }) }) : i ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center min-h-[400px] space-y-4", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
3493
3515
  /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Failed to load followers" }),
@@ -3498,7 +3520,7 @@ const ie = new ts(), rs = ({
3498
3520
  onClick: c,
3499
3521
  className: "m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",
3500
3522
  children: [
3501
- /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4 mr-2" }),
3523
+ /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4 mr-2" }),
3502
3524
  "Try Again"
3503
3525
  ]
3504
3526
  }
@@ -3514,11 +3536,11 @@ const ie = new ts(), rs = ({
3514
3536
  /* @__PURE__ */ e.jsx(
3515
3537
  "img",
3516
3538
  {
3517
- src: ie.userAvatar(m.follower),
3539
+ src: he.userAvatar(m.follower),
3518
3540
  alt: m.follower,
3519
3541
  className: "w-12 h-12 rounded-full object-cover",
3520
- onError: (x) => {
3521
- x.target.src = `https://ui-avatars.com/api/?name=${m.follower}&background=random`;
3542
+ onError: (f) => {
3543
+ f.target.src = `https://ui-avatars.com/api/?name=${m.follower}&background=random`;
3522
3544
  }
3523
3545
  }
3524
3546
  ),
@@ -3530,15 +3552,15 @@ const ie = new ts(), rs = ({
3530
3552
  },
3531
3553
  `${m.follower}-${l}`
3532
3554
  )) }) });
3533
- }, ss = ({
3555
+ }, rs = ({
3534
3556
  username: t,
3535
3557
  onSelectUser: s
3536
3558
  }) => {
3537
- const [r, a] = p([]), [o, d] = p(!0), [i, u] = p(null), c = async () => {
3559
+ const [r, n] = y([]), [o, d] = y(!0), [i, u] = y(null), c = async () => {
3538
3560
  try {
3539
3561
  d(!0), u(null);
3540
- const m = await ie.getFollowing(t);
3541
- a(m);
3562
+ const m = await he.getFollowing(t);
3563
+ n(m);
3542
3564
  } catch (m) {
3543
3565
  u(
3544
3566
  m instanceof Error ? m.message : "Failed to load following list"
@@ -3547,10 +3569,10 @@ const ie = new ts(), rs = ({
3547
3569
  d(!1);
3548
3570
  }
3549
3571
  };
3550
- return H(() => {
3572
+ return B(() => {
3551
3573
  c();
3552
3574
  }, [t]), o ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
3553
- /* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 animate-spin" }),
3575
+ /* @__PURE__ */ e.jsx(de, { className: "w-5 h-5 animate-spin" }),
3554
3576
  "Loading following list..."
3555
3577
  ] }) }) : i ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center min-h-[400px] space-y-4", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
3556
3578
  /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Failed to load following list" }),
@@ -3561,7 +3583,7 @@ const ie = new ts(), rs = ({
3561
3583
  onClick: c,
3562
3584
  className: "m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",
3563
3585
  children: [
3564
- /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4 mr-2" }),
3586
+ /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4 mr-2" }),
3565
3587
  "Try Again"
3566
3588
  ]
3567
3589
  }
@@ -3577,11 +3599,11 @@ const ie = new ts(), rs = ({
3577
3599
  /* @__PURE__ */ e.jsx(
3578
3600
  "img",
3579
3601
  {
3580
- src: ie.userAvatar(m.following),
3602
+ src: he.userAvatar(m.following),
3581
3603
  alt: m.following,
3582
3604
  className: "w-12 h-12 rounded-full object-cover",
3583
- onError: (x) => {
3584
- x.target.src = `https://ui-avatars.com/api/?name=${m.following}&background=random`;
3605
+ onError: (f) => {
3606
+ f.target.src = `https://ui-avatars.com/api/?name=${m.following}&background=random`;
3585
3607
  }
3586
3608
  }
3587
3609
  ),
@@ -3593,38 +3615,38 @@ const ie = new ts(), rs = ({
3593
3615
  },
3594
3616
  `${m.following}-${l}`
3595
3617
  )) }) });
3596
- }, as = ({ username: t }) => {
3597
- var v, w, k, T, f, j;
3598
- const [s, r] = p(null), [a, o] = p(!0), [d, i] = p(null), u = async () => {
3618
+ }, ss = ({ username: t }) => {
3619
+ var b, p, h, T, w, k;
3620
+ const [s, r] = y(null), [n, o] = y(!0), [d, i] = y(null), u = async () => {
3599
3621
  try {
3600
3622
  o(!0), i(null);
3601
- const b = await ie.getProfile(t);
3602
- r(b);
3603
- } catch (b) {
3623
+ const v = await he.getProfile(t);
3624
+ r(v);
3625
+ } catch (v) {
3604
3626
  i(
3605
- b instanceof Error ? b.message : "Failed to load user details"
3627
+ v instanceof Error ? v.message : "Failed to load user details"
3606
3628
  );
3607
3629
  } finally {
3608
3630
  o(!1);
3609
3631
  }
3610
3632
  };
3611
- H(() => {
3633
+ B(() => {
3612
3634
  u();
3613
3635
  }, [t]);
3614
- const c = (b) => {
3636
+ const c = (v) => {
3615
3637
  try {
3616
- return new Date(b).toLocaleDateString("en-US", {
3638
+ return new Date(v).toLocaleDateString("en-US", {
3617
3639
  year: "numeric",
3618
3640
  month: "long",
3619
3641
  day: "numeric"
3620
3642
  });
3621
3643
  } catch {
3622
- return b;
3644
+ return v;
3623
3645
  }
3624
- }, m = (b) => b.replace(/<[^>]*>/g, "");
3625
- if (a)
3646
+ }, m = (v) => v.replace(/<[^>]*>/g, "");
3647
+ if (n)
3626
3648
  return /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
3627
- /* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 animate-spin" }),
3649
+ /* @__PURE__ */ e.jsx(de, { className: "w-5 h-5 animate-spin" }),
3628
3650
  "Loading user details..."
3629
3651
  ] }) });
3630
3652
  if (d)
@@ -3637,7 +3659,7 @@ const ie = new ts(), rs = ({
3637
3659
  onClick: u,
3638
3660
  className: "m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",
3639
3661
  children: [
3640
- /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4" }),
3662
+ /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4" }),
3641
3663
  "Try Again"
3642
3664
  ]
3643
3665
  }
@@ -3645,20 +3667,20 @@ const ie = new ts(), rs = ({
3645
3667
  ] }) });
3646
3668
  if (!(s != null && s.result))
3647
3669
  return /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 dark:text-gray-400", children: "No user details available" }) });
3648
- const l = s.result, x = (v = l.metadata) == null ? void 0 : v.profile;
3670
+ const l = s.result, f = (b = l.metadata) == null ? void 0 : b.profile;
3649
3671
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ e.jsxs("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6", children: [
3650
- (x == null ? void 0 : x.about) && /* @__PURE__ */ e.jsxs("div", { className: "mb-6", children: [
3672
+ (f == null ? void 0 : f.about) && /* @__PURE__ */ e.jsxs("div", { className: "mb-6", children: [
3651
3673
  /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-3", children: "About" }),
3652
- /* @__PURE__ */ e.jsx("div", { className: "text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap", children: m(x.about) })
3674
+ /* @__PURE__ */ e.jsx("div", { className: "text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap", children: m(f.about) })
3653
3675
  ] }),
3654
3676
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: [
3655
3677
  /* @__PURE__ */ e.jsxs("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded-lg", children: [
3656
3678
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium text-gray-500 dark:text-gray-400 mb-1", children: "Location" }),
3657
- /* @__PURE__ */ e.jsx("p", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: (x == null ? void 0 : x.location) || "Not specified" })
3679
+ /* @__PURE__ */ e.jsx("p", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: (f == null ? void 0 : f.location) || "Not specified" })
3658
3680
  ] }),
3659
3681
  /* @__PURE__ */ e.jsxs("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded-lg", children: [
3660
3682
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium text-gray-500 dark:text-gray-400 mb-1", children: "Website" }),
3661
- /* @__PURE__ */ e.jsx("a", { href: x == null ? void 0 : x.website, target: "_blank", rel: "noopener noreferrer", className: "text-lg font-semibold text-blue-500 hover:underline", children: (x == null ? void 0 : x.website) || "Not specified" })
3683
+ /* @__PURE__ */ e.jsx("a", { href: f == null ? void 0 : f.website, target: "_blank", rel: "noopener noreferrer", className: "text-lg font-semibold text-blue-500 hover:underline", children: (f == null ? void 0 : f.website) || "Not specified" })
3662
3684
  ] }),
3663
3685
  /* @__PURE__ */ e.jsxs("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded-lg", children: [
3664
3686
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium text-gray-500 dark:text-gray-400 mb-1", children: "Joined" }),
@@ -3666,52 +3688,64 @@ const ie = new ts(), rs = ({
3666
3688
  ] }),
3667
3689
  /* @__PURE__ */ e.jsxs("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded-lg", children: [
3668
3690
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium text-gray-500 dark:text-gray-400 mb-1", children: "Followers" }),
3669
- /* @__PURE__ */ e.jsx("p", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: ((k = (w = l.stats) == null ? void 0 : w.followers) == null ? void 0 : k.toLocaleString()) || "0" })
3691
+ /* @__PURE__ */ e.jsx("p", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: ((h = (p = l.stats) == null ? void 0 : p.followers) == null ? void 0 : h.toLocaleString()) || "0" })
3670
3692
  ] }),
3671
3693
  /* @__PURE__ */ e.jsxs("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded-lg", children: [
3672
3694
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium text-gray-500 dark:text-gray-400 mb-1", children: "Following" }),
3673
- /* @__PURE__ */ e.jsx("p", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: ((f = (T = l.stats) == null ? void 0 : T.following) == null ? void 0 : f.toLocaleString()) || "0" })
3695
+ /* @__PURE__ */ e.jsx("p", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: ((w = (T = l.stats) == null ? void 0 : T.following) == null ? void 0 : w.toLocaleString()) || "0" })
3674
3696
  ] }),
3675
3697
  /* @__PURE__ */ e.jsxs("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded-lg", children: [
3676
3698
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium text-gray-500 dark:text-gray-400 mb-1", children: "Post Count" }),
3677
- /* @__PURE__ */ e.jsx("p", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: ((j = l.post_count) == null ? void 0 : j.toLocaleString()) || "0" })
3699
+ /* @__PURE__ */ e.jsx("p", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: ((k = l.post_count) == null ? void 0 : k.toLocaleString()) || "0" })
3678
3700
  ] })
3679
3701
  ] })
3680
3702
  ] }) });
3681
- }, Ns = ({
3703
+ }, ws = ({
3682
3704
  username: t,
3683
3705
  onVideoClick: s,
3684
3706
  onAuthorClick: r,
3685
- onBack: a
3707
+ onBack: n,
3708
+ onClickUserInfoTab: o,
3709
+ onClickFollowersTab: d,
3710
+ onClickFollowingTab: i,
3711
+ onBookmarkToggle: u,
3712
+ onRss: c,
3713
+ onShare: m,
3714
+ onMoreMenu: l,
3715
+ showMoreMenu: f = !1
3686
3716
  }) => {
3687
- var b, M, _;
3688
- const o = Ie(), [d, i] = p("videos"), [u, c] = p(null), [m, l] = p(!1), [x, v] = p(!0);
3689
- H(() => {
3717
+ var C, S, F;
3718
+ const [b, p] = y("videos"), [h, T] = y(null), [w, k] = y(!1), [v, D] = y(!0);
3719
+ B(() => {
3690
3720
  (async () => {
3691
3721
  try {
3692
- v(!0);
3693
- const C = await ie.getProfile(t);
3694
- c(C);
3695
- } catch (C) {
3696
- console.error("Failed to fetch user details:", C);
3722
+ D(!0);
3723
+ const _ = await he.getProfile(t);
3724
+ T(_);
3725
+ } catch (_) {
3726
+ console.error("Failed to fetch user details:", _);
3697
3727
  } finally {
3698
- v(!1);
3728
+ D(!1);
3699
3729
  }
3700
3730
  })();
3701
3731
  }, [t]);
3702
- const w = () => {
3703
- var C;
3704
- const E = `https://3speak.tv/user/${t}`;
3705
- navigator.share ? navigator.share({
3706
- title: ((C = u == null ? void 0 : u.result) == null ? void 0 : C.name) || t,
3707
- url: E
3708
- }) : navigator.clipboard.writeText(E);
3709
- }, k = () => {
3710
- window.open(`https://3speak.tv/rss/${t}.xml`, "_blank");
3711
- }, T = (E) => {
3712
- o(`/user/${E}`);
3732
+ const N = () => {
3733
+ var O;
3734
+ if (m)
3735
+ m(t);
3736
+ else {
3737
+ const _ = `https://3speak.tv/user/${t}`;
3738
+ navigator.share ? navigator.share({
3739
+ title: ((O = h == null ? void 0 : h.result) == null ? void 0 : O.name) || t,
3740
+ url: _
3741
+ }) : navigator.clipboard.writeText(_);
3742
+ }
3743
+ }, R = () => {
3744
+ c ? c(t) : window.open(`https://3speak.tv/rss/${t}.xml`, "_blank");
3745
+ }, A = (O) => {
3746
+ r(O);
3713
3747
  };
3714
- if (x)
3748
+ if (v)
3715
3749
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ e.jsxs("div", { className: "animate-pulse", children: [
3716
3750
  /* @__PURE__ */ e.jsx("div", { className: "h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6" }),
3717
3751
  /* @__PURE__ */ e.jsxs("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6", children: [
@@ -3722,24 +3756,24 @@ const ie = new ts(), rs = ({
3722
3756
  /* @__PURE__ */ e.jsx("div", { className: "h-4 bg-gray-200 dark:bg-gray-700 rounded w-32" })
3723
3757
  ] })
3724
3758
  ] }),
3725
- /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: Array.from({ length: 4 }).map((E, C) => /* @__PURE__ */ e.jsx(
3759
+ /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: Array.from({ length: 4 }).map((O, _) => /* @__PURE__ */ e.jsx(
3726
3760
  "div",
3727
3761
  {
3728
3762
  className: "h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"
3729
3763
  },
3730
- C
3764
+ _
3731
3765
  )) })
3732
3766
  ] })
3733
3767
  ] }) });
3734
- const f = u == null ? void 0 : u.result, j = (b = f == null ? void 0 : f.metadata) == null ? void 0 : b.profile;
3768
+ const $ = h == null ? void 0 : h.result, g = (C = $ == null ? void 0 : $.metadata) == null ? void 0 : C.profile;
3735
3769
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6", children: [
3736
3770
  /* @__PURE__ */ e.jsxs(
3737
3771
  "button",
3738
3772
  {
3739
- onClick: a,
3773
+ onClick: n,
3740
3774
  className: "flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",
3741
3775
  children: [
3742
- /* @__PURE__ */ e.jsx(Ce, { className: "w-4 h-4 mr-2" }),
3776
+ /* @__PURE__ */ e.jsx(Le, { className: "w-4 h-4 mr-2" }),
3743
3777
  "Back"
3744
3778
  ]
3745
3779
  }
@@ -3748,11 +3782,11 @@ const ie = new ts(), rs = ({
3748
3782
  /* @__PURE__ */ e.jsx(
3749
3783
  "img",
3750
3784
  {
3751
- src: j.cover_image || ie.userAvatar(t),
3785
+ src: g.cover_image || he.userAvatar(t),
3752
3786
  alt: "Cover",
3753
3787
  className: "w-full h-48 object-cover",
3754
- onError: (E) => {
3755
- E.target.src = ie.userAvatar(t);
3788
+ onError: (O) => {
3789
+ O.target.src = he.userAvatar(t);
3756
3790
  }
3757
3791
  }
3758
3792
  ),
@@ -3760,134 +3794,149 @@ const ie = new ts(), rs = ({
3760
3794
  /* @__PURE__ */ e.jsx(
3761
3795
  "img",
3762
3796
  {
3763
- src: j == null ? void 0 : j.profile_image,
3764
- alt: j == null ? void 0 : j.name,
3797
+ src: g == null ? void 0 : g.profile_image,
3798
+ alt: g == null ? void 0 : g.name,
3765
3799
  className: "w-24 h-24 rounded-full object-cover border-4 border-white dark:border-gray-800 -mt-16",
3766
- onError: (E) => {
3767
- E.target.src = ie.userAvatar(t);
3800
+ onError: (O) => {
3801
+ O.target.src = he.userAvatar(t);
3768
3802
  }
3769
3803
  }
3770
3804
  ),
3771
3805
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
3772
- /* @__PURE__ */ e.jsx("h1", { className: "text-2xl font-bold text-gray-900 dark:text-white mb-2", children: (j == null ? void 0 : j.name) || t }),
3773
- /* @__PURE__ */ e.jsx("p", { className: "text-gray-600 dark:text-gray-400 mb-4", children: (j == null ? void 0 : j.about) || "No description available" }),
3806
+ /* @__PURE__ */ e.jsx("h1", { className: "text-2xl font-bold text-gray-900 dark:text-white mb-2", children: (g == null ? void 0 : g.name) || t }),
3807
+ /* @__PURE__ */ e.jsx("p", { className: "text-gray-600 dark:text-gray-400 mb-4", children: (g == null ? void 0 : g.about) || "No description available" }),
3774
3808
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap gap-6 text-sm", children: [
3775
3809
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
3776
- /* @__PURE__ */ e.jsx(De, { className: "w-4 h-4" }),
3810
+ /* @__PURE__ */ e.jsx(ze, { className: "w-4 h-4" }),
3777
3811
  /* @__PURE__ */ e.jsxs("span", { children: [
3778
- (((M = f == null ? void 0 : f.stats) == null ? void 0 : M.followers) || 0).toLocaleString(),
3812
+ (((S = $ == null ? void 0 : $.stats) == null ? void 0 : S.followers) || 0).toLocaleString(),
3779
3813
  " Followers"
3780
3814
  ] })
3781
3815
  ] }),
3782
3816
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
3783
- /* @__PURE__ */ e.jsx(De, { className: "w-4 h-4" }),
3817
+ /* @__PURE__ */ e.jsx(ze, { className: "w-4 h-4" }),
3784
3818
  /* @__PURE__ */ e.jsxs("span", { children: [
3785
- (((_ = f == null ? void 0 : f.stats) == null ? void 0 : _.following) || 0).toLocaleString(),
3819
+ (((F = $ == null ? void 0 : $.stats) == null ? void 0 : F.following) || 0).toLocaleString(),
3786
3820
  " Following"
3787
3821
  ] })
3788
3822
  ] }),
3789
3823
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-gray-500 dark:text-gray-400", children: [
3790
- /* @__PURE__ */ e.jsx(Pt, { className: "w-4 h-4" }),
3824
+ /* @__PURE__ */ e.jsx(Dt, { className: "w-4 h-4" }),
3791
3825
  /* @__PURE__ */ e.jsxs("span", { children: [
3792
3826
  "Joined",
3793
3827
  " ",
3794
- f != null && f.created ? new Date(f.created).getFullYear() : "Unknown"
3828
+ $ != null && $.created ? new Date($.created).getFullYear() : "Unknown"
3795
3829
  ] })
3796
3830
  ] })
3797
3831
  ] })
3798
3832
  ] }),
3799
3833
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
3800
3834
  /* @__PURE__ */ e.jsx(
3801
- Mt,
3835
+ Wt,
3802
3836
  {
3803
3837
  id: t,
3804
3838
  toastType: "user",
3805
- onAdd: (E, C) => console.log("Added:", E, C),
3806
- onRemove: (E, C) => console.log("Removed:", E, C)
3839
+ onAdd: (O, _) => {
3840
+ u ? u(O, !0) : console.log("Added:", O, _);
3841
+ },
3842
+ onRemove: (O, _) => {
3843
+ u ? u(O, !1) : console.log("Removed:", O, _);
3844
+ }
3807
3845
  }
3808
3846
  ),
3809
3847
  /* @__PURE__ */ e.jsx(
3810
3848
  "button",
3811
3849
  {
3812
- onClick: k,
3850
+ onClick: R,
3813
3851
  className: "p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",
3814
- children: /* @__PURE__ */ e.jsx(Vt, { className: "w-4 h-4" })
3852
+ children: /* @__PURE__ */ e.jsx(Mt, { className: "w-4 h-4" })
3815
3853
  }
3816
3854
  ),
3817
3855
  /* @__PURE__ */ e.jsx(
3818
3856
  "button",
3819
3857
  {
3820
- onClick: w,
3858
+ onClick: N,
3821
3859
  className: "p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",
3822
- children: /* @__PURE__ */ e.jsx(st, { className: "w-4 h-4" })
3860
+ children: /* @__PURE__ */ e.jsx(ct, { className: "w-4 h-4" })
3823
3861
  }
3824
3862
  ),
3825
- /* @__PURE__ */ e.jsx("button", { className: "p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700", children: /* @__PURE__ */ e.jsx(at, { className: "w-4 h-4" }) })
3863
+ f && /* @__PURE__ */ e.jsx(
3864
+ "button",
3865
+ {
3866
+ onClick: () => {
3867
+ l && l(t);
3868
+ },
3869
+ className: "p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",
3870
+ children: /* @__PURE__ */ e.jsx(dt, { className: "w-4 h-4" })
3871
+ }
3872
+ )
3826
3873
  ] })
3827
3874
  ] }) })
3828
3875
  ] }),
3829
3876
  /* @__PURE__ */ e.jsxs("div", { children: [
3830
3877
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden", children: [
3831
3878
  { key: "videos", label: "Videos" },
3832
- { key: "about", label: "User Info" },
3833
- { key: "followers", label: "Followers" },
3834
- { key: "following", label: "Following" }
3835
- ].map((E, C) => /* @__PURE__ */ e.jsx(
3879
+ { key: "about", label: "User Info", callback: o },
3880
+ { key: "followers", label: "Followers", callback: d },
3881
+ { key: "following", label: "Following", callback: i }
3882
+ ].map((O, _) => /* @__PURE__ */ e.jsx(
3836
3883
  "button",
3837
3884
  {
3838
- onClick: () => i(E.key),
3839
- className: `px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${d === E.key ? "bg-blue-600 dark:bg-blue-500 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,
3840
- children: E.label
3885
+ onClick: () => {
3886
+ O.callback ? O.callback() : p(O.key);
3887
+ },
3888
+ className: `px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${b === O.key ? "bg-blue-600 dark:bg-blue-500 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,
3889
+ children: O.label
3841
3890
  },
3842
- E.key
3891
+ O.key
3843
3892
  )) }),
3844
3893
  /* @__PURE__ */ e.jsxs("div", { className: "mt-6", children: [
3845
- d === "videos" && /* @__PURE__ */ e.jsx(
3846
- ot,
3894
+ b === "videos" && /* @__PURE__ */ e.jsx(
3895
+ ut,
3847
3896
  {
3848
- feedType: Q.USER,
3897
+ feedType: K.USER,
3849
3898
  username: t,
3850
3899
  onVideoClick: s,
3851
3900
  onAuthorClick: r
3852
3901
  }
3853
3902
  ),
3854
- d === "about" && /* @__PURE__ */ e.jsx(as, { username: t }),
3855
- d === "followers" && /* @__PURE__ */ e.jsx(rs, { username: t, onSelectUser: T }),
3856
- d === "following" && /* @__PURE__ */ e.jsx(ss, { username: t, onSelectUser: T })
3903
+ b === "about" && /* @__PURE__ */ e.jsx(ss, { username: t }),
3904
+ b === "followers" && /* @__PURE__ */ e.jsx(ts, { username: t, onSelectUser: A }),
3905
+ b === "following" && /* @__PURE__ */ e.jsx(rs, { username: t, onSelectUser: A })
3857
3906
  ] })
3858
3907
  ] })
3859
3908
  ] });
3860
- }, Ke = 768;
3861
- function ks() {
3862
- const [t, s] = Ae.useState(void 0);
3863
- return Ae.useEffect(() => {
3864
- const r = window.matchMedia(`(max-width: ${Ke - 1}px)`), a = () => {
3865
- s(window.innerWidth < Ke);
3909
+ }, rt = 768;
3910
+ function Ns() {
3911
+ const [t, s] = Be.useState(void 0);
3912
+ return Be.useEffect(() => {
3913
+ const r = window.matchMedia(`(max-width: ${rt - 1}px)`), n = () => {
3914
+ s(window.innerWidth < rt);
3866
3915
  };
3867
- return r.addEventListener("change", a), s(window.innerWidth < Ke), () => r.removeEventListener("change", a);
3916
+ return r.addEventListener("change", n), s(window.innerWidth < rt), () => r.removeEventListener("change", n);
3868
3917
  }, []), !!t;
3869
3918
  }
3870
- const ns = 1, os = 1e6;
3871
- let Qe = 0;
3872
- function is() {
3873
- return Qe = (Qe + 1) % Number.MAX_SAFE_INTEGER, Qe.toString();
3919
+ const as = 1, ns = 1e6;
3920
+ let st = 0;
3921
+ function os() {
3922
+ return st = (st + 1) % Number.MAX_SAFE_INTEGER, st.toString();
3874
3923
  }
3875
- const Xe = /* @__PURE__ */ new Map(), $t = (t) => {
3876
- if (Xe.has(t))
3924
+ const at = /* @__PURE__ */ new Map(), Rt = (t) => {
3925
+ if (at.has(t))
3877
3926
  return;
3878
3927
  const s = setTimeout(() => {
3879
- Xe.delete(t), Ee({
3928
+ at.delete(t), Fe({
3880
3929
  type: "REMOVE_TOAST",
3881
3930
  toastId: t
3882
3931
  });
3883
- }, os);
3884
- Xe.set(t, s);
3885
- }, ls = (t, s) => {
3932
+ }, ns);
3933
+ at.set(t, s);
3934
+ }, is = (t, s) => {
3886
3935
  switch (s.type) {
3887
3936
  case "ADD_TOAST":
3888
3937
  return {
3889
3938
  ...t,
3890
- toasts: [s.toast, ...t.toasts].slice(0, ns)
3939
+ toasts: [s.toast, ...t.toasts].slice(0, as)
3891
3940
  };
3892
3941
  case "UPDATE_TOAST":
3893
3942
  return {
@@ -3896,15 +3945,15 @@ const Xe = /* @__PURE__ */ new Map(), $t = (t) => {
3896
3945
  };
3897
3946
  case "DISMISS_TOAST": {
3898
3947
  const { toastId: r } = s;
3899
- return r ? $t(r) : t.toasts.forEach((a) => {
3900
- $t(a.id);
3948
+ return r ? Rt(r) : t.toasts.forEach((n) => {
3949
+ Rt(n.id);
3901
3950
  }), {
3902
3951
  ...t,
3903
3952
  toasts: t.toasts.map(
3904
- (a) => a.id === r || r === void 0 ? {
3905
- ...a,
3953
+ (n) => n.id === r || r === void 0 ? {
3954
+ ...n,
3906
3955
  open: !1
3907
- } : a
3956
+ } : n
3908
3957
  )
3909
3958
  };
3910
3959
  }
@@ -3917,72 +3966,72 @@ const Xe = /* @__PURE__ */ new Map(), $t = (t) => {
3917
3966
  toasts: t.toasts.filter((r) => r.id !== s.toastId)
3918
3967
  };
3919
3968
  }
3920
- }, Pe = [];
3921
- let Ve = { toasts: [] };
3922
- function Ee(t) {
3923
- Ve = ls(Ve, t), Pe.forEach((s) => {
3924
- s(Ve);
3969
+ }, He = [];
3970
+ let We = { toasts: [] };
3971
+ function Fe(t) {
3972
+ We = is(We, t), He.forEach((s) => {
3973
+ s(We);
3925
3974
  });
3926
3975
  }
3927
- function cs({ ...t }) {
3928
- const s = is(), r = (o) => Ee({
3976
+ function ls({ ...t }) {
3977
+ const s = os(), r = (o) => Fe({
3929
3978
  type: "UPDATE_TOAST",
3930
3979
  toast: { ...o, id: s }
3931
- }), a = () => Ee({ type: "DISMISS_TOAST", toastId: s });
3932
- return Ee({
3980
+ }), n = () => Fe({ type: "DISMISS_TOAST", toastId: s });
3981
+ return Fe({
3933
3982
  type: "ADD_TOAST",
3934
3983
  toast: {
3935
3984
  ...t,
3936
3985
  id: s,
3937
3986
  open: !0,
3938
3987
  onOpenChange: (o) => {
3939
- o || a();
3988
+ o || n();
3940
3989
  }
3941
3990
  }
3942
3991
  }), {
3943
3992
  id: s,
3944
- dismiss: a,
3993
+ dismiss: n,
3945
3994
  update: r
3946
3995
  };
3947
3996
  }
3948
- function _s() {
3949
- const [t, s] = Ae.useState(Ve);
3950
- return Ae.useEffect(() => (Pe.push(s), () => {
3951
- const r = Pe.indexOf(s);
3952
- r > -1 && Pe.splice(r, 1);
3997
+ function ks() {
3998
+ const [t, s] = Be.useState(We);
3999
+ return Be.useEffect(() => (He.push(s), () => {
4000
+ const r = He.indexOf(s);
4001
+ r > -1 && He.splice(r, 1);
3953
4002
  }), [t]), {
3954
4003
  ...t,
3955
- toast: cs,
3956
- dismiss: (r) => Ee({ type: "DISMISS_TOAST", toastId: r })
4004
+ toast: ls,
4005
+ dismiss: (r) => Fe({ type: "DISMISS_TOAST", toastId: r })
3957
4006
  };
3958
4007
  }
3959
4008
  export {
3960
- Q as ApiVideoFeedType,
3961
- $r as CommentsModal,
3962
- vs as CommunitiesList,
3963
- Xr as CommunityAbout,
3964
- js as CommunityDetail,
3965
- es as CommunityMembers,
3966
- Zr as CommunityTeam,
3967
- Lr as DescriptionModal,
3968
- Mt as FavouriteWidget,
3969
- it as Modal,
3970
- Fr as UpvoteListModal,
3971
- ws as UserAccount,
3972
- rs as UserFollowers,
3973
- ss as UserFollowing,
3974
- as as UserInfo,
3975
- Ns as UserProfilePage,
3976
- Tr as VideoCard,
3977
- bs as VideoDetail,
3978
- ot as VideoFeed,
3979
- Or as VideoInfo,
3980
- ys as Wallet,
3981
- Z as apiService,
3982
- ls as reducer,
3983
- me as server,
3984
- cs as toast,
3985
- ks as useIsMobile,
3986
- _s as useToast,
3987
- Kr as useWalletStore
4009
+ K as ApiVideoFeedType,
4010
+ Or as CommentsModal,
4011
+ ys as CommunitiesList,
4012
+ Qr as CommunityAbout,
4013
+ vs as CommunityDetail,
4014
+ Zr as CommunityMembers,
4015
+ Xr as CommunityTeam,
4016
+ Fr as DescriptionModal,
4017
+ Wt as FavouriteWidget,
4018
+ gt as Modal,
4019
+ $r as UpvoteListModal,
4020
+ js as UserAccount,
4021
+ ts as UserFollowers,
4022
+ rs as UserFollowing,
4023
+ ss as UserInfo,
4024
+ ws as UserProfilePage,
4025
+ Sr as VideoCard,
4026
+ ps as VideoDetail,
4027
+ ut as VideoFeed,
4028
+ Tr as VideoInfo,
4029
+ bs as Wallet,
4030
+ te as apiService,
4031
+ is as reducer,
4032
+ pe as server,
4033
+ ls as toast,
4034
+ Ns as useIsMobile,
4035
+ ks as useToast,
4036
+ Gr as useWalletStore
3988
4037
  };