liveroom-client-element 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/README.md
CHANGED
|
@@ -717,7 +717,7 @@ class P extends D {
|
|
|
717
717
|
return { doc: n };
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
|
-
const
|
|
720
|
+
const $t = (s, n) => {
|
|
721
721
|
if (s === n)
|
|
722
722
|
return !0;
|
|
723
723
|
if (s && n && typeof s == "object" && typeof n == "object") {
|
|
@@ -728,7 +728,7 @@ const Et = (s, n) => {
|
|
|
728
728
|
if (t = s.length, t !== n.length)
|
|
729
729
|
return !1;
|
|
730
730
|
for (e = t; e-- !== 0; )
|
|
731
|
-
if (
|
|
731
|
+
if (!$t(s[e], n[e]))
|
|
732
732
|
return !1;
|
|
733
733
|
return !0;
|
|
734
734
|
}
|
|
@@ -736,7 +736,7 @@ const Et = (s, n) => {
|
|
|
736
736
|
return !1;
|
|
737
737
|
for (e = t; e-- !== 0; ) {
|
|
738
738
|
const i = r[e];
|
|
739
|
-
if (
|
|
739
|
+
if (!$t(s[i], n[i]))
|
|
740
740
|
return !1;
|
|
741
741
|
}
|
|
742
742
|
return !0;
|
|
@@ -760,7 +760,7 @@ class vs extends P {
|
|
|
760
760
|
const { val: e } = O(t, this.path);
|
|
761
761
|
if (e === void 0)
|
|
762
762
|
return !!this.not;
|
|
763
|
-
const r =
|
|
763
|
+
const r = $t(e, this.value);
|
|
764
764
|
return this.not ? !r : r;
|
|
765
765
|
}
|
|
766
766
|
toJson(t) {
|
|
@@ -921,11 +921,11 @@ class _s extends D {
|
|
|
921
921
|
t.encodeArrayHeader(r ? 4 : 5), t.writer.u8(7), t.encodeArray(this.path), t.encodeNumber(this.pos), r ? t.encodeString(this.str) : (t.writer.u8(0), t.encodeNumber(this.len));
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
|
-
const { isArray: bs } = Array, Rt = (s) => !!s && typeof s == "object" && typeof s.text == "string", Ht = (s) => !!s && typeof s == "object" && bs(s.children),
|
|
924
|
+
const { isArray: bs } = Array, Rt = (s) => !!s && typeof s == "object" && typeof s.text == "string", Ht = (s) => !!s && typeof s == "object" && bs(s.children), $s = (s, n) => {
|
|
925
925
|
const t = new RegExp(s, n ? "i" : void 0);
|
|
926
926
|
return (e) => t.test(e);
|
|
927
927
|
};
|
|
928
|
-
class
|
|
928
|
+
class Es extends D {
|
|
929
929
|
constructor(t, e, r) {
|
|
930
930
|
super(t);
|
|
931
931
|
f(this, "pos");
|
|
@@ -1389,7 +1389,7 @@ class Hs extends P {
|
|
|
1389
1389
|
test(t) {
|
|
1390
1390
|
const { val: e } = O(t, this.path);
|
|
1391
1391
|
for (const r of this.value)
|
|
1392
|
-
if (
|
|
1392
|
+
if ($t(e, r))
|
|
1393
1393
|
return !0;
|
|
1394
1394
|
return !1;
|
|
1395
1395
|
}
|
|
@@ -1682,7 +1682,7 @@ const Fs = (s, n) => {
|
|
|
1682
1682
|
case "str_del":
|
|
1683
1683
|
return new _s(w(s.path), s.pos, s.str, s.len);
|
|
1684
1684
|
case "split":
|
|
1685
|
-
return new
|
|
1685
|
+
return new Es(w(s.path), s.pos, s.props || null);
|
|
1686
1686
|
case "merge":
|
|
1687
1687
|
return new Cs(w(s.path), s.pos, s.props || null);
|
|
1688
1688
|
case "extend":
|
|
@@ -1713,7 +1713,7 @@ const Fs = (s, n) => {
|
|
|
1713
1713
|
case "starts":
|
|
1714
1714
|
return new Rs(w(s.path), s.value, !!s.ignore_case);
|
|
1715
1715
|
case "matches":
|
|
1716
|
-
return new Js(w(s.path), s.value, !!s.ignore_case, n.createMatcher ||
|
|
1716
|
+
return new Js(w(s.path), s.value, !!s.ignore_case, n.createMatcher || $s);
|
|
1717
1717
|
case "in":
|
|
1718
1718
|
return new Hs(w(s.path), s.value);
|
|
1719
1719
|
case "less":
|
|
@@ -1916,7 +1916,7 @@ var ot = (s) => typeof s == "function" ? s : function() {
|
|
|
1916
1916
|
isLeaving() {
|
|
1917
1917
|
return this.state === I.leaving;
|
|
1918
1918
|
}
|
|
1919
|
-
},
|
|
1919
|
+
}, Et = class {
|
|
1920
1920
|
static request(s, n, t, e, r, i, o) {
|
|
1921
1921
|
if (at.XDomainRequest) {
|
|
1922
1922
|
let h = new at.XDomainRequest();
|
|
@@ -1978,7 +1978,7 @@ var ot = (s) => typeof s == "function" ? s : function() {
|
|
|
1978
1978
|
return s.replace("ws://", "http://").replace("wss://", "https://").replace(new RegExp("(.*)/" + Pt.websocket), "$1/" + Pt.longpoll);
|
|
1979
1979
|
}
|
|
1980
1980
|
endpointURL() {
|
|
1981
|
-
return
|
|
1981
|
+
return Et.appendParams(this.pollEndpoint, { token: this.token });
|
|
1982
1982
|
}
|
|
1983
1983
|
closeAndRetry(s, n, t) {
|
|
1984
1984
|
this.close(s, n, t), this.readyState = J.connecting;
|
|
@@ -2036,7 +2036,7 @@ var ot = (s) => typeof s == "function" ? s : function() {
|
|
|
2036
2036
|
let r, i = () => {
|
|
2037
2037
|
this.reqs.delete(r), t();
|
|
2038
2038
|
};
|
|
2039
|
-
r =
|
|
2039
|
+
r = Et.request(s, this.endpointURL(), "application/json", n, this.timeout, i, (o) => {
|
|
2040
2040
|
this.reqs.delete(r), this.isActive() && e(o);
|
|
2041
2041
|
}), this.reqs.add(r);
|
|
2042
2042
|
}
|
|
@@ -2129,7 +2129,7 @@ var ot = (s) => typeof s == "function" ? s : function() {
|
|
|
2129
2129
|
return location.protocol.match(/^https/) ? "wss" : "ws";
|
|
2130
2130
|
}
|
|
2131
2131
|
endPointURL() {
|
|
2132
|
-
let s =
|
|
2132
|
+
let s = Et.appendParams(Et.appendParams(this.endPoint, this.params()), { vsn: this.vsn });
|
|
2133
2133
|
return s.charAt(0) !== "/" ? s : s.charAt(1) === "/" ? `${this.protocol()}:${s}` : `${this.protocol()}://${location.host}${s}`;
|
|
2134
2134
|
}
|
|
2135
2135
|
disconnect(s, n, t) {
|
|
@@ -2599,12 +2599,12 @@ var se;
|
|
|
2599
2599
|
if (l.length <= 0)
|
|
2600
2600
|
return g;
|
|
2601
2601
|
for (var H = new T(), y = [], m = 0, v = l; m < v.length; m++) {
|
|
2602
|
-
var
|
|
2603
|
-
|
|
2602
|
+
var $ = v[m], E = H.has($);
|
|
2603
|
+
E || (H.add($), y.push($));
|
|
2604
2604
|
}
|
|
2605
2605
|
for (var W = 0, Yt = g; W < Yt.length; W++) {
|
|
2606
|
-
var
|
|
2607
|
-
|
|
2606
|
+
var $ = Yt[W], E = H.has($);
|
|
2607
|
+
E || (H.add($), y.push($));
|
|
2608
2608
|
}
|
|
2609
2609
|
return y;
|
|
2610
2610
|
}
|
|
@@ -2617,18 +2617,18 @@ var se;
|
|
|
2617
2617
|
);
|
|
2618
2618
|
if (M(u))
|
|
2619
2619
|
return l;
|
|
2620
|
-
for (var g = u.keys(), H =
|
|
2620
|
+
for (var g = u.keys(), H = $e(g), y = 0; ; ) {
|
|
2621
2621
|
var m = Ce(H);
|
|
2622
2622
|
if (!m)
|
|
2623
2623
|
return l.length = y, l;
|
|
2624
|
-
var v =
|
|
2624
|
+
var v = Ee(m);
|
|
2625
2625
|
try {
|
|
2626
2626
|
l[y] = v;
|
|
2627
|
-
} catch (
|
|
2627
|
+
} catch ($) {
|
|
2628
2628
|
try {
|
|
2629
2629
|
ke(H);
|
|
2630
2630
|
} finally {
|
|
2631
|
-
throw
|
|
2631
|
+
throw $;
|
|
2632
2632
|
}
|
|
2633
2633
|
}
|
|
2634
2634
|
y++;
|
|
@@ -2761,7 +2761,7 @@ var se;
|
|
|
2761
2761
|
return l;
|
|
2762
2762
|
}
|
|
2763
2763
|
}
|
|
2764
|
-
function
|
|
2764
|
+
function $e(a) {
|
|
2765
2765
|
var c = qt(a, i);
|
|
2766
2766
|
if (!Z(c))
|
|
2767
2767
|
throw new TypeError();
|
|
@@ -2770,7 +2770,7 @@ var se;
|
|
|
2770
2770
|
throw new TypeError();
|
|
2771
2771
|
return l;
|
|
2772
2772
|
}
|
|
2773
|
-
function
|
|
2773
|
+
function Ee(a) {
|
|
2774
2774
|
return a.value;
|
|
2775
2775
|
}
|
|
2776
2776
|
function Ce(a) {
|
|
@@ -2795,8 +2795,8 @@ var se;
|
|
|
2795
2795
|
var a = {}, c = [], l = (
|
|
2796
2796
|
/** @class */
|
|
2797
2797
|
function() {
|
|
2798
|
-
function y(m, v,
|
|
2799
|
-
this._index = 0, this._keys = m, this._values = v, this._selector =
|
|
2798
|
+
function y(m, v, $) {
|
|
2799
|
+
this._index = 0, this._keys = m, this._values = v, this._selector = $;
|
|
2800
2800
|
}
|
|
2801
2801
|
return y.prototype["@@iterator"] = function() {
|
|
2802
2802
|
return this;
|
|
@@ -2842,12 +2842,12 @@ var se;
|
|
|
2842
2842
|
);
|
|
2843
2843
|
return v >= 0 ? this._values[v] : void 0;
|
|
2844
2844
|
}, y.prototype.set = function(m, v) {
|
|
2845
|
-
var
|
|
2845
|
+
var $ = this._find(
|
|
2846
2846
|
m,
|
|
2847
2847
|
/*insert*/
|
|
2848
2848
|
!0
|
|
2849
2849
|
);
|
|
2850
|
-
return this._values[
|
|
2850
|
+
return this._values[$] = v, this;
|
|
2851
2851
|
}, y.prototype.delete = function(m) {
|
|
2852
2852
|
var v = this._find(
|
|
2853
2853
|
m,
|
|
@@ -2855,8 +2855,8 @@ var se;
|
|
|
2855
2855
|
!1
|
|
2856
2856
|
);
|
|
2857
2857
|
if (v >= 0) {
|
|
2858
|
-
for (var
|
|
2859
|
-
this._keys[
|
|
2858
|
+
for (var $ = this._keys.length, E = v + 1; E < $; E++)
|
|
2859
|
+
this._keys[E - 1] = this._keys[E], this._values[E - 1] = this._values[E];
|
|
2860
2860
|
return this._keys.length--, this._values.length--, m === this._cacheKey && (this._cacheKey = a, this._cacheIndex = -2), !0;
|
|
2861
2861
|
}
|
|
2862
2862
|
return !1;
|
|
@@ -2930,34 +2930,34 @@ var se;
|
|
|
2930
2930
|
function v() {
|
|
2931
2931
|
this._key = u();
|
|
2932
2932
|
}
|
|
2933
|
-
return v.prototype.has = function(
|
|
2934
|
-
var
|
|
2935
|
-
|
|
2933
|
+
return v.prototype.has = function($) {
|
|
2934
|
+
var E = g(
|
|
2935
|
+
$,
|
|
2936
2936
|
/*create*/
|
|
2937
2937
|
!1
|
|
2938
2938
|
);
|
|
2939
|
-
return
|
|
2940
|
-
}, v.prototype.get = function(
|
|
2941
|
-
var
|
|
2942
|
-
|
|
2939
|
+
return E !== void 0 ? d.has(E, this._key) : !1;
|
|
2940
|
+
}, v.prototype.get = function($) {
|
|
2941
|
+
var E = g(
|
|
2942
|
+
$,
|
|
2943
2943
|
/*create*/
|
|
2944
2944
|
!1
|
|
2945
2945
|
);
|
|
2946
|
-
return
|
|
2947
|
-
}, v.prototype.set = function(E
|
|
2946
|
+
return E !== void 0 ? d.get(E, this._key) : void 0;
|
|
2947
|
+
}, v.prototype.set = function($, E) {
|
|
2948
2948
|
var W = g(
|
|
2949
|
-
|
|
2949
|
+
$,
|
|
2950
2950
|
/*create*/
|
|
2951
2951
|
!0
|
|
2952
2952
|
);
|
|
2953
|
-
return W[this._key] =
|
|
2954
|
-
}, v.prototype.delete = function(
|
|
2955
|
-
var
|
|
2956
|
-
|
|
2953
|
+
return W[this._key] = E, this;
|
|
2954
|
+
}, v.prototype.delete = function($) {
|
|
2955
|
+
var E = g(
|
|
2956
|
+
$,
|
|
2957
2957
|
/*create*/
|
|
2958
2958
|
!1
|
|
2959
2959
|
);
|
|
2960
|
-
return
|
|
2960
|
+
return E !== void 0 ? delete E[this._key] : !1;
|
|
2961
2961
|
}, v.prototype.clear = function() {
|
|
2962
2962
|
this._key = u();
|
|
2963
2963
|
}, v;
|
|
@@ -2970,17 +2970,17 @@ var se;
|
|
|
2970
2970
|
while (d.has(c, v));
|
|
2971
2971
|
return c[v] = !0, v;
|
|
2972
2972
|
}
|
|
2973
|
-
function g(v,
|
|
2973
|
+
function g(v, $) {
|
|
2974
2974
|
if (!t.call(v, l)) {
|
|
2975
|
-
if (
|
|
2975
|
+
if (!$)
|
|
2976
2976
|
return;
|
|
2977
2977
|
Object.defineProperty(v, l, { value: d.create() });
|
|
2978
2978
|
}
|
|
2979
2979
|
return v[l];
|
|
2980
2980
|
}
|
|
2981
|
-
function H(v,
|
|
2982
|
-
for (var
|
|
2983
|
-
v[
|
|
2981
|
+
function H(v, $) {
|
|
2982
|
+
for (var E = 0; E < $; ++E)
|
|
2983
|
+
v[E] = Math.random() * 255 | 0;
|
|
2984
2984
|
return v;
|
|
2985
2985
|
}
|
|
2986
2986
|
function y(v) {
|
|
@@ -2989,11 +2989,11 @@ var se;
|
|
|
2989
2989
|
function m() {
|
|
2990
2990
|
var v = y(a);
|
|
2991
2991
|
v[6] = v[6] & 79 | 64, v[8] = v[8] & 191 | 128;
|
|
2992
|
-
for (var
|
|
2993
|
-
var W = v[
|
|
2994
|
-
(
|
|
2992
|
+
for (var $ = "", E = 0; E < a; ++E) {
|
|
2993
|
+
var W = v[E];
|
|
2994
|
+
(E === 4 || E === 6 || E === 8) && ($ += "-"), W < 16 && ($ += "0"), $ += W.toString(16).toLowerCase();
|
|
2995
2995
|
}
|
|
2996
|
-
return
|
|
2996
|
+
return $;
|
|
2997
2997
|
}
|
|
2998
2998
|
}
|
|
2999
2999
|
function Ot(a) {
|
|
@@ -3058,7 +3058,7 @@ function ie(s, n) {
|
|
|
3058
3058
|
c() {
|
|
3059
3059
|
t = G("div"), e = Qt("svg"), r = Qt("path"), i = jt(), o = G("span"), p = he(h), d = jt(), b = G("div"), A = jt(), x(r, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), x(e, "width", "23"), x(e, "viewBox", "0 0 27 24"), x(e, "fill", "currentColor"), x(e, "aria-hidden", "true"), x(e, "xmlns", "http://www.w3.org/2000/svg"), x(e, "class", "cursor svelte-or6zbb"), x(o, "class", "user-name svelte-or6zbb"), x(b, "class", "halo svelte-or6zbb"), x(b, "data-show", _ = /*user*/
|
|
3060
3060
|
n[14].is_mouse_down || /*user*/
|
|
3061
|
-
n[14].
|
|
3061
|
+
n[14].is_shift_key_down), x(t, "id", T = "user-" + /*user*/
|
|
3062
3062
|
n[14].id), x(t, "class", "user svelte-or6zbb"), x(t, "data-isself", j = /*user*/
|
|
3063
3063
|
n[14].id == /*me*/
|
|
3064
3064
|
n[1].id), Q(
|
|
@@ -3083,7 +3083,7 @@ function ie(s, n) {
|
|
|
3083
3083
|
n[14].name + "") && Pe(p, h), N & /*users*/
|
|
3084
3084
|
4 && _ !== (_ = /*user*/
|
|
3085
3085
|
n[14].is_mouse_down || /*user*/
|
|
3086
|
-
n[14].
|
|
3086
|
+
n[14].is_shift_key_down) && x(b, "data-show", _), N & /*users*/
|
|
3087
3087
|
4 && T !== (T = "user-" + /*user*/
|
|
3088
3088
|
n[14].id) && x(t, "id", T), N & /*users, me*/
|
|
3089
3089
|
6 && j !== (j = /*user*/
|
|
@@ -3172,7 +3172,7 @@ function nn(s, n, t) {
|
|
|
3172
3172
|
function _() {
|
|
3173
3173
|
o && (h != null && h.id) && o.dispatchEvent(new CustomEvent("mouse_up", { detail: { user_id: h.id } }));
|
|
3174
3174
|
}
|
|
3175
|
-
const A = ["
|
|
3175
|
+
const A = ["Shift"];
|
|
3176
3176
|
function T(k) {
|
|
3177
3177
|
!k.repeat && A.includes(k.key) && o && (h != null && h.id) && o.dispatchEvent(new CustomEvent("key_down", { detail: { key: k.key, user_id: h.id } }));
|
|
3178
3178
|
}
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
|
|
12
12
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
13
|
and limitations under the License.
|
|
14
|
-
***************************************************************************** */var te;(function(s){(function(n){var t=typeof Kt=="object"?Kt:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),e=r(s);typeof t.Reflect>"u"?t.Reflect=s:e=r(t.Reflect,e),n(e);function r(i,o){return function(h,p){typeof i[h]!="function"&&Object.defineProperty(i,h,{configurable:!0,writable:!0,value:p}),o&&o(h,p)}}})(function(n){var t=Object.prototype.hasOwnProperty,e=typeof Symbol=="function",r=e&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",i=e&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",o=typeof Object.create=="function",h={__proto__:[]}instanceof Array,p=!o&&!h,d={create:o?function(){return zt(Object.create(null))}:h?function(){return zt({__proto__:null})}:function(){return zt({})},has:p?function(a,c){return t.call(a,c)}:function(a,c){return c in a},get:p?function(a,c){return t.call(a,c)?a[c]:void 0}:function(a,c){return a[c]}},b=Object.getPrototypeOf(Function),_=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",A=!_&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:tn(),O=!_&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:en(),x=!_&&typeof WeakMap=="function"?WeakMap:sn(),R=new x;function L(a,c,l,u){if(M(l)){if(!pe(a))throw new TypeError;if(!fe(c))throw new TypeError;return st(a,c)}else{if(!pe(a))throw new TypeError;if(!N(c))throw new TypeError;if(!N(u)&&!M(u)&&!nt(u))throw new TypeError;return nt(u)&&(u=void 0),l=G(l),Vs(a,c,l,u)}}n("decorate",L);function k(a,c){function l(u,g){if(!N(u))throw new TypeError;if(!M(g)&&!qs(g))throw new TypeError;he(a,c,u,g)}return l}n("metadata",k);function et(a,c,l,u){if(!N(l))throw new TypeError;return M(u)||(u=G(u)),he(a,c,l,u)}n("defineMetadata",et);function kt(a,c,l){if(!N(c))throw new TypeError;return M(l)||(l=G(l)),ie(a,c,l)}n("hasMetadata",kt);function At(a,c,l){if(!N(c))throw new TypeError;return M(l)||(l=G(l)),Dt(a,c,l)}n("hasOwnMetadata",At);function Tt(a,c,l){if(!N(c))throw new TypeError;return M(l)||(l=G(l)),oe(a,c,l)}n("getMetadata",Tt);function dt(a,c,l){if(!N(c))throw new TypeError;return M(l)||(l=G(l)),ae(a,c,l)}n("getOwnMetadata",dt);function S(a,c){if(!N(a))throw new TypeError;return M(c)||(c=G(c)),ce(a,c)}n("getMetadataKeys",S);function J(a,c){if(!N(a))throw new TypeError;return M(c)||(c=G(c)),le(a,c)}n("getOwnMetadataKeys",J);function V(a,c,l){if(!N(c))throw new TypeError;M(l)||(l=G(l));var u=gt(c,l,!1);if(M(u)||!u.delete(a))return!1;if(u.size>0)return!0;var g=R.get(c);return g.delete(l),g.size>0||R.delete(c),!0}n("deleteMetadata",V);function st(a,c){for(var l=a.length-1;l>=0;--l){var u=a[l],g=u(c);if(!M(g)&&!nt(g)){if(!fe(g))throw new TypeError;c=g}}return c}function Vs(a,c,l,u){for(var g=a.length-1;g>=0;--g){var H=a[g],y=H(c,l,u);if(!M(y)&&!nt(y)){if(!N(y))throw new TypeError;u=y}}return u}function gt(a,c,l){var u=R.get(a);if(M(u)){if(!l)return;u=new A,R.set(a,u)}var g=u.get(c);if(M(g)){if(!l)return;g=new A,u.set(c,g)}return g}function ie(a,c,l){var u=Dt(a,c,l);if(u)return!0;var g=Ut(c);return nt(g)?!1:ie(a,g,l)}function Dt(a,c,l){var u=gt(c,l,!1);return M(u)?!1:Gs(u.has(a))}function oe(a,c,l){var u=Dt(a,c,l);if(u)return ae(a,c,l);var g=Ut(c);if(!nt(g))return oe(a,g,l)}function ae(a,c,l){var u=gt(c,l,!1);if(!M(u))return u.get(a)}function he(a,c,l,u){var g=gt(l,u,!0);g.set(a,c)}function ce(a,c){var l=le(a,c),u=Ut(a);if(u===null)return l;var g=ce(u,c);if(g.length<=0)return l;if(l.length<=0)return g;for(var H=new O,y=[],m=0,v=l;m<v.length;m++){var $=v[m],C=H.has($);C||(H.add($),y.push($))}for(var q=0,ge=g;q<ge.length;q++){var $=ge[q],C=H.has($);C||(H.add($),y.push($))}return y}function le(a,c){var l=[],u=gt(a,c,!1);if(M(u))return l;for(var g=u.keys(),H=Ys(g),y=0;;){var m=Qs(H);if(!m)return l.length=y,l;var v=Zs(m);try{l[y]=v}catch($){try{Ks(H)}finally{throw $}}y++}}function ue(a){if(a===null)return 1;switch(typeof a){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return a===null?1:6;default:return 6}}function M(a){return a===void 0}function nt(a){return a===null}function Bs(a){return typeof a=="symbol"}function N(a){return typeof a=="object"?a!==null:typeof a=="function"}function Fs(a,c){switch(ue(a)){case 0:return a;case 1:return a;case 2:return a;case 3:return a;case 4:return a;case 5:return a}var l=c===3?"string":c===5?"number":"default",u=de(a,r);if(u!==void 0){var g=u.call(a,l);if(N(g))throw new TypeError;return g}return Ws(a,l==="default"?"number":l)}function Ws(a,c){if(c==="string"){var l=a.toString;if(rt(l)){var u=l.call(a);if(!N(u))return u}var g=a.valueOf;if(rt(g)){var u=g.call(a);if(!N(u))return u}}else{var g=a.valueOf;if(rt(g)){var u=g.call(a);if(!N(u))return u}var H=a.toString;if(rt(H)){var u=H.call(a);if(!N(u))return u}}throw new TypeError}function Gs(a){return!!a}function Xs(a){return""+a}function G(a){var c=Fs(a,3);return Bs(c)?c:Xs(c)}function pe(a){return Array.isArray?Array.isArray(a):a instanceof Object?a instanceof Array:Object.prototype.toString.call(a)==="[object Array]"}function rt(a){return typeof a=="function"}function fe(a){return typeof a=="function"}function qs(a){switch(ue(a)){case 3:return!0;case 4:return!0;default:return!1}}function de(a,c){var l=a[c];if(l!=null){if(!rt(l))throw new TypeError;return l}}function Ys(a){var c=de(a,i);if(!rt(c))throw new TypeError;var l=c.call(a);if(!N(l))throw new TypeError;return l}function Zs(a){return a.value}function Qs(a){var c=a.next();return c.done?!1:c}function Ks(a){var c=a.return;c&&c.call(a)}function Ut(a){var c=Object.getPrototypeOf(a);if(typeof a!="function"||a===b||c!==b)return c;var l=a.prototype,u=l&&Object.getPrototypeOf(l);if(u==null||u===Object.prototype)return c;var g=u.constructor;return typeof g!="function"||g===a?c:g}function tn(){var a={},c=[],l=function(){function y(m,v,$){this._index=0,this._keys=m,this._values=v,this._selector=$}return y.prototype["@@iterator"]=function(){return this},y.prototype[i]=function(){return this},y.prototype.next=function(){var m=this._index;if(m>=0&&m<this._keys.length){var v=this._selector(this._keys[m],this._values[m]);return m+1>=this._keys.length?(this._index=-1,this._keys=c,this._values=c):this._index++,{value:v,done:!1}}return{value:void 0,done:!0}},y.prototype.throw=function(m){throw this._index>=0&&(this._index=-1,this._keys=c,this._values=c),m},y.prototype.return=function(m){return this._index>=0&&(this._index=-1,this._keys=c,this._values=c),{value:m,done:!0}},y}();return function(){function y(){this._keys=[],this._values=[],this._cacheKey=a,this._cacheIndex=-2}return Object.defineProperty(y.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),y.prototype.has=function(m){return this._find(m,!1)>=0},y.prototype.get=function(m){var v=this._find(m,!1);return v>=0?this._values[v]:void 0},y.prototype.set=function(m,v){var $=this._find(m,!0);return this._values[$]=v,this},y.prototype.delete=function(m){var v=this._find(m,!1);if(v>=0){for(var $=this._keys.length,C=v+1;C<$;C++)this._keys[C-1]=this._keys[C],this._values[C-1]=this._values[C];return this._keys.length--,this._values.length--,m===this._cacheKey&&(this._cacheKey=a,this._cacheIndex=-2),!0}return!1},y.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=a,this._cacheIndex=-2},y.prototype.keys=function(){return new l(this._keys,this._values,u)},y.prototype.values=function(){return new l(this._keys,this._values,g)},y.prototype.entries=function(){return new l(this._keys,this._values,H)},y.prototype["@@iterator"]=function(){return this.entries()},y.prototype[i]=function(){return this.entries()},y.prototype._find=function(m,v){return this._cacheKey!==m&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=m)),this._cacheIndex<0&&v&&(this._cacheIndex=this._keys.length,this._keys.push(m),this._values.push(void 0)),this._cacheIndex},y}();function u(y,m){return y}function g(y,m){return m}function H(y,m){return[y,m]}}function en(){return function(){function a(){this._map=new A}return Object.defineProperty(a.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),a.prototype.has=function(c){return this._map.has(c)},a.prototype.add=function(c){return this._map.set(c,c),this},a.prototype.delete=function(c){return this._map.delete(c)},a.prototype.clear=function(){this._map.clear()},a.prototype.keys=function(){return this._map.keys()},a.prototype.values=function(){return this._map.values()},a.prototype.entries=function(){return this._map.entries()},a.prototype["@@iterator"]=function(){return this.keys()},a.prototype[i]=function(){return this.keys()},a}()}function sn(){var a=16,c=d.create(),l=u();return function(){function v(){this._key=u()}return v.prototype.has=function($){var C=g($,!1);return C!==void 0?d.has(C,this._key):!1},v.prototype.get=function($){var C=g($,!1);return C!==void 0?d.get(C,this._key):void 0},v.prototype.set=function($,C){var q=g($,!0);return q[this._key]=C,this},v.prototype.delete=function($){var C=g($,!1);return C!==void 0?delete C[this._key]:!1},v.prototype.clear=function(){this._key=u()},v}();function u(){var v;do v="@@WeakMap@@"+m();while(d.has(c,v));return c[v]=!0,v}function g(v,$){if(!t.call(v,l)){if(!$)return;Object.defineProperty(v,l,{value:d.create()})}return v[l]}function H(v,$){for(var C=0;C<$;++C)v[C]=Math.random()*255|0;return v}function y(v){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(v)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(v)):H(new Uint8Array(v),v):H(new Array(v),v)}function m(){var v=y(a);v[6]=v[6]&79|64,v[8]=v[8]&191|128;for(var $="",C=0;C<a;++C){var q=v[C];(C===4||C===6||C===8)&&($+="-"),q<16&&($+="0"),$+=q.toString(16).toLowerCase()}return $}}function zt(a){return a.__=void 0,delete a.__,a}})})(te||(te={}));function Us(s){me(s,"svelte-or6zbb",'#liveroom-client-element.svelte-or6zbb.svelte-or6zbb{font-family:Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#users-container.svelte-or6zbb.svelte-or6zbb{position:fixed;inset:0;overflow:hidden;pointer-events:none}.user.svelte-or6zbb.svelte-or6zbb{z-index:1000;position:absolute;top:0;left:0;user-select:none;transform:translate(var(--x), var(--y))}.user.svelte-or6zbb .cursor.svelte-or6zbb{position:absolute;top:0;left:0;color:var(--color);transform-origin:top left;transform:rotate(6deg)}.user[data-isself="true"].svelte-or6zbb .cursor.svelte-or6zbb{display:none}.user-name.svelte-or6zbb.svelte-or6zbb{padding:4px 10px;font-size:14px;line-height:20px;font-weight:600;color:black;background-color:var(--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-or6zbb .user-name.svelte-or6zbb{position:absolute;top:20px;left:16px}.user[data-isself="true"].svelte-or6zbb .user-name.svelte-or6zbb{display:none}.user.svelte-or6zbb .halo.svelte-or6zbb{transform:scale(0);z-index:-1;position:absolute;top:-60px;left:-60px;width:120px;height:120px;border-radius:9999px;background-color:var(--color);opacity:0.25;transition:transform 0.15s ease-out;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-or6zbb .halo[data-show="true"].svelte-or6zbb{transform:scale(1)}')}function ee(s,n,t){const e=s.slice();return e[14]=n[t],e}function se(s){let n,t=[],e=new Map,r=Xt(Object.values(s[2]));const i=o=>o[14].id;for(let o=0;o<r.length;o+=1){let h=ee(s,r,o),p=i(h);e.set(p,t[o]=ne(p,h))}return{c(){n=Y("div");for(let o=0;o<t.length;o+=1)t[o].c();j(n,"id","users-container"),j(n,"class","svelte-or6zbb")},m(o,h){vt(o,n,h);for(let p=0;p<t.length;p+=1)t[p]&&t[p].m(n,null)},p(o,h){h&6&&(r=Xt(Object.values(o[2])),t=Me(t,h,i,1,o,r,e,n,Se,ne,null,ee))},d(o){o&&ot(n);for(let h=0;h<t.length;h+=1)t[h].d()}}}function ne(s,n){let t,e,r,i,o,h=n[14].name+"",p,d,b,_,A,O,x;return{key:s,first:null,c(){t=Y("div"),e=Vt("svg"),r=Vt("path"),i=Ot(),o=Y("span"),p=Bt(h),d=Ot(),b=Y("div"),A=Ot(),j(r,"d","M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"),j(e,"width","23"),j(e,"viewBox","0 0 27 24"),j(e,"fill","currentColor"),j(e,"aria-hidden","true"),j(e,"xmlns","http://www.w3.org/2000/svg"),j(e,"class","cursor svelte-or6zbb"),j(o,"class","user-name svelte-or6zbb"),j(b,"class","halo svelte-or6zbb"),j(b,"data-show",_=n[14].is_mouse_down||n[14].is_escape_key_down),j(t,"id",O="user-"+n[14].id),j(t,"class","user svelte-or6zbb"),j(t,"data-isself",x=n[14].id==n[1].id),Z(t,"--color",n[14].color),Z(t,"--x",parseFloat(n[14].x)+"vw"),Z(t,"--y",parseFloat(n[14].y)+"vh"),this.first=t},m(R,L){vt(R,t,L),F(t,e),F(e,r),F(t,i),F(t,o),F(o,p),F(t,d),F(t,b),F(t,A)},p(R,L){n=R,L&4&&h!==(h=n[14].name+"")&&Ee(p,h),L&4&&_!==(_=n[14].is_mouse_down||n[14].is_escape_key_down)&&j(b,"data-show",_),L&4&&O!==(O="user-"+n[14].id)&&j(t,"id",O),L&6&&x!==(x=n[14].id==n[1].id)&&j(t,"data-isself",x),L&4&&Z(t,"--color",n[14].color),L&4&&Z(t,"--x",parseFloat(n[14].x)+"vw"),L&4&&Z(t,"--y",parseFloat(n[14].y)+"vh")},d(R){R&&ot(t)}}}function zs(s){let n,t=s[1]&&s[2]&&se(s);return{c(){n=Y("div"),t&&t.c(),j(n,"id","liveroom-client-element"),j(n,"class","svelte-or6zbb")},m(e,r){vt(e,n,r),t&&t.m(n,null),s[5](n)},p(e,[r]){e[1]&&e[2]?t?t.p(e,r):(t=se(e),t.c(),t.m(n,null)):t&&(t.d(1),t=null)},i:P,o:P,d(e){e&&ot(n),t&&t.d(),s[5](null)}}}function Js(s,n,t){let{url:e}=n,{room_id:r}=n,i,o,h,p;Ce(async()=>{o=new Ds({url:e,topic:`liveroom-livestate:${r}`,params:{room_id:r,current_url:window.origin,inner_width:window.innerWidth,inner_height:window.innerHeight}}),o.connect(),o.addEventListener("livestate-change",({detail:{state:k}})=>{t(3,r=k.room_id),t(1,h=k.me),t(2,p=k.users)}),window.addEventListener("mousemove",d),window.addEventListener("mousedown",b),window.addEventListener("mouseup",_),window.addEventListener("keydown",O),window.addEventListener("keyup",x),window.addEventListener("resize",R)}),ke(()=>{window.removeEventListener("resize",R),window.removeEventListener("keyup",x),window.removeEventListener("keydown",O),window.removeEventListener("mouseup",_),window.removeEventListener("mousedown",b),window.removeEventListener("mousemove",d),o==null||o.disconnect()});function d(k){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_move",{detail:{user_id:h.id,x:Number(k.clientX/window.innerWidth*100).toFixed(2),y:Number(k.clientY/window.innerHeight*100).toFixed(2)}}))}function b(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_down",{detail:{user_id:h.id}}))}function _(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_up",{detail:{user_id:h.id}}))}const A=["Escape"];function O(k){!k.repeat&&A.includes(k.key)&&o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("key_down",{detail:{key:k.key,user_id:h.id}}))}function x(k){A.includes(k.key)&&o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("key_up",{detail:{key:k.key,user_id:h.id}}))}function R(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("window_resize",{detail:{inner_width:window.innerWidth,inner_height:window.innerHeight,user_id:h.id}}))}function L(k){jt[k?"unshift":"push"](()=>{i=k,t(0,i)})}return s.$$set=k=>{"url"in k&&t(4,e=k.url),"room_id"in k&&t(3,r=k.room_id)},[i,h,p,r,e,L]}class re extends Ie{constructor(n){super(),He(this,n,Js,zs,ve,{url:4,room_id:3},Us)}get url(){return this.$$.ctx[4]}set url(n){this.$$set({url:n}),yt()}get room_id(){return this.$$.ctx[3]}set room_id(n){this.$$set({room_id:n}),yt()}}return customElements.define("liveroom-client-element",Pe(re,{url:{},room_id:{}},[],[],!0)),re});
|
|
14
|
+
***************************************************************************** */var te;(function(s){(function(n){var t=typeof Kt=="object"?Kt:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),e=r(s);typeof t.Reflect>"u"?t.Reflect=s:e=r(t.Reflect,e),n(e);function r(i,o){return function(h,p){typeof i[h]!="function"&&Object.defineProperty(i,h,{configurable:!0,writable:!0,value:p}),o&&o(h,p)}}})(function(n){var t=Object.prototype.hasOwnProperty,e=typeof Symbol=="function",r=e&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",i=e&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",o=typeof Object.create=="function",h={__proto__:[]}instanceof Array,p=!o&&!h,d={create:o?function(){return zt(Object.create(null))}:h?function(){return zt({__proto__:null})}:function(){return zt({})},has:p?function(a,c){return t.call(a,c)}:function(a,c){return c in a},get:p?function(a,c){return t.call(a,c)?a[c]:void 0}:function(a,c){return a[c]}},b=Object.getPrototypeOf(Function),_=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",A=!_&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:tn(),O=!_&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:en(),x=!_&&typeof WeakMap=="function"?WeakMap:sn(),R=new x;function L(a,c,l,u){if(M(l)){if(!pe(a))throw new TypeError;if(!fe(c))throw new TypeError;return st(a,c)}else{if(!pe(a))throw new TypeError;if(!N(c))throw new TypeError;if(!N(u)&&!M(u)&&!nt(u))throw new TypeError;return nt(u)&&(u=void 0),l=G(l),Vs(a,c,l,u)}}n("decorate",L);function k(a,c){function l(u,g){if(!N(u))throw new TypeError;if(!M(g)&&!qs(g))throw new TypeError;he(a,c,u,g)}return l}n("metadata",k);function et(a,c,l,u){if(!N(l))throw new TypeError;return M(u)||(u=G(u)),he(a,c,l,u)}n("defineMetadata",et);function kt(a,c,l){if(!N(c))throw new TypeError;return M(l)||(l=G(l)),ie(a,c,l)}n("hasMetadata",kt);function At(a,c,l){if(!N(c))throw new TypeError;return M(l)||(l=G(l)),Dt(a,c,l)}n("hasOwnMetadata",At);function Tt(a,c,l){if(!N(c))throw new TypeError;return M(l)||(l=G(l)),oe(a,c,l)}n("getMetadata",Tt);function dt(a,c,l){if(!N(c))throw new TypeError;return M(l)||(l=G(l)),ae(a,c,l)}n("getOwnMetadata",dt);function S(a,c){if(!N(a))throw new TypeError;return M(c)||(c=G(c)),ce(a,c)}n("getMetadataKeys",S);function J(a,c){if(!N(a))throw new TypeError;return M(c)||(c=G(c)),le(a,c)}n("getOwnMetadataKeys",J);function V(a,c,l){if(!N(c))throw new TypeError;M(l)||(l=G(l));var u=gt(c,l,!1);if(M(u)||!u.delete(a))return!1;if(u.size>0)return!0;var g=R.get(c);return g.delete(l),g.size>0||R.delete(c),!0}n("deleteMetadata",V);function st(a,c){for(var l=a.length-1;l>=0;--l){var u=a[l],g=u(c);if(!M(g)&&!nt(g)){if(!fe(g))throw new TypeError;c=g}}return c}function Vs(a,c,l,u){for(var g=a.length-1;g>=0;--g){var H=a[g],y=H(c,l,u);if(!M(y)&&!nt(y)){if(!N(y))throw new TypeError;u=y}}return u}function gt(a,c,l){var u=R.get(a);if(M(u)){if(!l)return;u=new A,R.set(a,u)}var g=u.get(c);if(M(g)){if(!l)return;g=new A,u.set(c,g)}return g}function ie(a,c,l){var u=Dt(a,c,l);if(u)return!0;var g=Ut(c);return nt(g)?!1:ie(a,g,l)}function Dt(a,c,l){var u=gt(c,l,!1);return M(u)?!1:Gs(u.has(a))}function oe(a,c,l){var u=Dt(a,c,l);if(u)return ae(a,c,l);var g=Ut(c);if(!nt(g))return oe(a,g,l)}function ae(a,c,l){var u=gt(c,l,!1);if(!M(u))return u.get(a)}function he(a,c,l,u){var g=gt(l,u,!0);g.set(a,c)}function ce(a,c){var l=le(a,c),u=Ut(a);if(u===null)return l;var g=ce(u,c);if(g.length<=0)return l;if(l.length<=0)return g;for(var H=new O,y=[],m=0,v=l;m<v.length;m++){var $=v[m],C=H.has($);C||(H.add($),y.push($))}for(var q=0,ge=g;q<ge.length;q++){var $=ge[q],C=H.has($);C||(H.add($),y.push($))}return y}function le(a,c){var l=[],u=gt(a,c,!1);if(M(u))return l;for(var g=u.keys(),H=Ys(g),y=0;;){var m=Qs(H);if(!m)return l.length=y,l;var v=Zs(m);try{l[y]=v}catch($){try{Ks(H)}finally{throw $}}y++}}function ue(a){if(a===null)return 1;switch(typeof a){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return a===null?1:6;default:return 6}}function M(a){return a===void 0}function nt(a){return a===null}function Bs(a){return typeof a=="symbol"}function N(a){return typeof a=="object"?a!==null:typeof a=="function"}function Fs(a,c){switch(ue(a)){case 0:return a;case 1:return a;case 2:return a;case 3:return a;case 4:return a;case 5:return a}var l=c===3?"string":c===5?"number":"default",u=de(a,r);if(u!==void 0){var g=u.call(a,l);if(N(g))throw new TypeError;return g}return Ws(a,l==="default"?"number":l)}function Ws(a,c){if(c==="string"){var l=a.toString;if(rt(l)){var u=l.call(a);if(!N(u))return u}var g=a.valueOf;if(rt(g)){var u=g.call(a);if(!N(u))return u}}else{var g=a.valueOf;if(rt(g)){var u=g.call(a);if(!N(u))return u}var H=a.toString;if(rt(H)){var u=H.call(a);if(!N(u))return u}}throw new TypeError}function Gs(a){return!!a}function Xs(a){return""+a}function G(a){var c=Fs(a,3);return Bs(c)?c:Xs(c)}function pe(a){return Array.isArray?Array.isArray(a):a instanceof Object?a instanceof Array:Object.prototype.toString.call(a)==="[object Array]"}function rt(a){return typeof a=="function"}function fe(a){return typeof a=="function"}function qs(a){switch(ue(a)){case 3:return!0;case 4:return!0;default:return!1}}function de(a,c){var l=a[c];if(l!=null){if(!rt(l))throw new TypeError;return l}}function Ys(a){var c=de(a,i);if(!rt(c))throw new TypeError;var l=c.call(a);if(!N(l))throw new TypeError;return l}function Zs(a){return a.value}function Qs(a){var c=a.next();return c.done?!1:c}function Ks(a){var c=a.return;c&&c.call(a)}function Ut(a){var c=Object.getPrototypeOf(a);if(typeof a!="function"||a===b||c!==b)return c;var l=a.prototype,u=l&&Object.getPrototypeOf(l);if(u==null||u===Object.prototype)return c;var g=u.constructor;return typeof g!="function"||g===a?c:g}function tn(){var a={},c=[],l=function(){function y(m,v,$){this._index=0,this._keys=m,this._values=v,this._selector=$}return y.prototype["@@iterator"]=function(){return this},y.prototype[i]=function(){return this},y.prototype.next=function(){var m=this._index;if(m>=0&&m<this._keys.length){var v=this._selector(this._keys[m],this._values[m]);return m+1>=this._keys.length?(this._index=-1,this._keys=c,this._values=c):this._index++,{value:v,done:!1}}return{value:void 0,done:!0}},y.prototype.throw=function(m){throw this._index>=0&&(this._index=-1,this._keys=c,this._values=c),m},y.prototype.return=function(m){return this._index>=0&&(this._index=-1,this._keys=c,this._values=c),{value:m,done:!0}},y}();return function(){function y(){this._keys=[],this._values=[],this._cacheKey=a,this._cacheIndex=-2}return Object.defineProperty(y.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),y.prototype.has=function(m){return this._find(m,!1)>=0},y.prototype.get=function(m){var v=this._find(m,!1);return v>=0?this._values[v]:void 0},y.prototype.set=function(m,v){var $=this._find(m,!0);return this._values[$]=v,this},y.prototype.delete=function(m){var v=this._find(m,!1);if(v>=0){for(var $=this._keys.length,C=v+1;C<$;C++)this._keys[C-1]=this._keys[C],this._values[C-1]=this._values[C];return this._keys.length--,this._values.length--,m===this._cacheKey&&(this._cacheKey=a,this._cacheIndex=-2),!0}return!1},y.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=a,this._cacheIndex=-2},y.prototype.keys=function(){return new l(this._keys,this._values,u)},y.prototype.values=function(){return new l(this._keys,this._values,g)},y.prototype.entries=function(){return new l(this._keys,this._values,H)},y.prototype["@@iterator"]=function(){return this.entries()},y.prototype[i]=function(){return this.entries()},y.prototype._find=function(m,v){return this._cacheKey!==m&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=m)),this._cacheIndex<0&&v&&(this._cacheIndex=this._keys.length,this._keys.push(m),this._values.push(void 0)),this._cacheIndex},y}();function u(y,m){return y}function g(y,m){return m}function H(y,m){return[y,m]}}function en(){return function(){function a(){this._map=new A}return Object.defineProperty(a.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),a.prototype.has=function(c){return this._map.has(c)},a.prototype.add=function(c){return this._map.set(c,c),this},a.prototype.delete=function(c){return this._map.delete(c)},a.prototype.clear=function(){this._map.clear()},a.prototype.keys=function(){return this._map.keys()},a.prototype.values=function(){return this._map.values()},a.prototype.entries=function(){return this._map.entries()},a.prototype["@@iterator"]=function(){return this.keys()},a.prototype[i]=function(){return this.keys()},a}()}function sn(){var a=16,c=d.create(),l=u();return function(){function v(){this._key=u()}return v.prototype.has=function($){var C=g($,!1);return C!==void 0?d.has(C,this._key):!1},v.prototype.get=function($){var C=g($,!1);return C!==void 0?d.get(C,this._key):void 0},v.prototype.set=function($,C){var q=g($,!0);return q[this._key]=C,this},v.prototype.delete=function($){var C=g($,!1);return C!==void 0?delete C[this._key]:!1},v.prototype.clear=function(){this._key=u()},v}();function u(){var v;do v="@@WeakMap@@"+m();while(d.has(c,v));return c[v]=!0,v}function g(v,$){if(!t.call(v,l)){if(!$)return;Object.defineProperty(v,l,{value:d.create()})}return v[l]}function H(v,$){for(var C=0;C<$;++C)v[C]=Math.random()*255|0;return v}function y(v){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(v)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(v)):H(new Uint8Array(v),v):H(new Array(v),v)}function m(){var v=y(a);v[6]=v[6]&79|64,v[8]=v[8]&191|128;for(var $="",C=0;C<a;++C){var q=v[C];(C===4||C===6||C===8)&&($+="-"),q<16&&($+="0"),$+=q.toString(16).toLowerCase()}return $}}function zt(a){return a.__=void 0,delete a.__,a}})})(te||(te={}));function Us(s){me(s,"svelte-or6zbb",'#liveroom-client-element.svelte-or6zbb.svelte-or6zbb{font-family:Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#users-container.svelte-or6zbb.svelte-or6zbb{position:fixed;inset:0;overflow:hidden;pointer-events:none}.user.svelte-or6zbb.svelte-or6zbb{z-index:1000;position:absolute;top:0;left:0;user-select:none;transform:translate(var(--x), var(--y))}.user.svelte-or6zbb .cursor.svelte-or6zbb{position:absolute;top:0;left:0;color:var(--color);transform-origin:top left;transform:rotate(6deg)}.user[data-isself="true"].svelte-or6zbb .cursor.svelte-or6zbb{display:none}.user-name.svelte-or6zbb.svelte-or6zbb{padding:4px 10px;font-size:14px;line-height:20px;font-weight:600;color:black;background-color:var(--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-or6zbb .user-name.svelte-or6zbb{position:absolute;top:20px;left:16px}.user[data-isself="true"].svelte-or6zbb .user-name.svelte-or6zbb{display:none}.user.svelte-or6zbb .halo.svelte-or6zbb{transform:scale(0);z-index:-1;position:absolute;top:-60px;left:-60px;width:120px;height:120px;border-radius:9999px;background-color:var(--color);opacity:0.25;transition:transform 0.15s ease-out;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-or6zbb .halo[data-show="true"].svelte-or6zbb{transform:scale(1)}')}function ee(s,n,t){const e=s.slice();return e[14]=n[t],e}function se(s){let n,t=[],e=new Map,r=Xt(Object.values(s[2]));const i=o=>o[14].id;for(let o=0;o<r.length;o+=1){let h=ee(s,r,o),p=i(h);e.set(p,t[o]=ne(p,h))}return{c(){n=Y("div");for(let o=0;o<t.length;o+=1)t[o].c();j(n,"id","users-container"),j(n,"class","svelte-or6zbb")},m(o,h){vt(o,n,h);for(let p=0;p<t.length;p+=1)t[p]&&t[p].m(n,null)},p(o,h){h&6&&(r=Xt(Object.values(o[2])),t=Me(t,h,i,1,o,r,e,n,Se,ne,null,ee))},d(o){o&&ot(n);for(let h=0;h<t.length;h+=1)t[h].d()}}}function ne(s,n){let t,e,r,i,o,h=n[14].name+"",p,d,b,_,A,O,x;return{key:s,first:null,c(){t=Y("div"),e=Vt("svg"),r=Vt("path"),i=Ot(),o=Y("span"),p=Bt(h),d=Ot(),b=Y("div"),A=Ot(),j(r,"d","M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"),j(e,"width","23"),j(e,"viewBox","0 0 27 24"),j(e,"fill","currentColor"),j(e,"aria-hidden","true"),j(e,"xmlns","http://www.w3.org/2000/svg"),j(e,"class","cursor svelte-or6zbb"),j(o,"class","user-name svelte-or6zbb"),j(b,"class","halo svelte-or6zbb"),j(b,"data-show",_=n[14].is_mouse_down||n[14].is_shift_key_down),j(t,"id",O="user-"+n[14].id),j(t,"class","user svelte-or6zbb"),j(t,"data-isself",x=n[14].id==n[1].id),Z(t,"--color",n[14].color),Z(t,"--x",parseFloat(n[14].x)+"vw"),Z(t,"--y",parseFloat(n[14].y)+"vh"),this.first=t},m(R,L){vt(R,t,L),F(t,e),F(e,r),F(t,i),F(t,o),F(o,p),F(t,d),F(t,b),F(t,A)},p(R,L){n=R,L&4&&h!==(h=n[14].name+"")&&Ee(p,h),L&4&&_!==(_=n[14].is_mouse_down||n[14].is_shift_key_down)&&j(b,"data-show",_),L&4&&O!==(O="user-"+n[14].id)&&j(t,"id",O),L&6&&x!==(x=n[14].id==n[1].id)&&j(t,"data-isself",x),L&4&&Z(t,"--color",n[14].color),L&4&&Z(t,"--x",parseFloat(n[14].x)+"vw"),L&4&&Z(t,"--y",parseFloat(n[14].y)+"vh")},d(R){R&&ot(t)}}}function zs(s){let n,t=s[1]&&s[2]&&se(s);return{c(){n=Y("div"),t&&t.c(),j(n,"id","liveroom-client-element"),j(n,"class","svelte-or6zbb")},m(e,r){vt(e,n,r),t&&t.m(n,null),s[5](n)},p(e,[r]){e[1]&&e[2]?t?t.p(e,r):(t=se(e),t.c(),t.m(n,null)):t&&(t.d(1),t=null)},i:P,o:P,d(e){e&&ot(n),t&&t.d(),s[5](null)}}}function Js(s,n,t){let{url:e}=n,{room_id:r}=n,i,o,h,p;Ce(async()=>{o=new Ds({url:e,topic:`liveroom-livestate:${r}`,params:{room_id:r,current_url:window.origin,inner_width:window.innerWidth,inner_height:window.innerHeight}}),o.connect(),o.addEventListener("livestate-change",({detail:{state:k}})=>{t(3,r=k.room_id),t(1,h=k.me),t(2,p=k.users)}),window.addEventListener("mousemove",d),window.addEventListener("mousedown",b),window.addEventListener("mouseup",_),window.addEventListener("keydown",O),window.addEventListener("keyup",x),window.addEventListener("resize",R)}),ke(()=>{window.removeEventListener("resize",R),window.removeEventListener("keyup",x),window.removeEventListener("keydown",O),window.removeEventListener("mouseup",_),window.removeEventListener("mousedown",b),window.removeEventListener("mousemove",d),o==null||o.disconnect()});function d(k){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_move",{detail:{user_id:h.id,x:Number(k.clientX/window.innerWidth*100).toFixed(2),y:Number(k.clientY/window.innerHeight*100).toFixed(2)}}))}function b(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_down",{detail:{user_id:h.id}}))}function _(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_up",{detail:{user_id:h.id}}))}const A=["Shift"];function O(k){!k.repeat&&A.includes(k.key)&&o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("key_down",{detail:{key:k.key,user_id:h.id}}))}function x(k){A.includes(k.key)&&o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("key_up",{detail:{key:k.key,user_id:h.id}}))}function R(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("window_resize",{detail:{inner_width:window.innerWidth,inner_height:window.innerHeight,user_id:h.id}}))}function L(k){jt[k?"unshift":"push"](()=>{i=k,t(0,i)})}return s.$$set=k=>{"url"in k&&t(4,e=k.url),"room_id"in k&&t(3,r=k.room_id)},[i,h,p,r,e,L]}class re extends Ie{constructor(n){super(),He(this,n,Js,zs,ve,{url:4,room_id:3},Us)}get url(){return this.$$.ctx[4]}set url(n){this.$$set({url:n}),yt()}get room_id(){return this.$$.ctx[3]}set room_id(n){this.$$set({room_id:n}),yt()}}return customElements.define("liveroom-client-element",Pe(re,{url:{},room_id:{}},[],[],!0)),re});
|