@@ -4743,6 +4743,38 @@ var _Crypto_noble=(()=>{var ie=Object.defineProperty;var Nn=Object.getOwnPropert
4744/*! Bundled license information:
4744/*! Bundled license information:
4746+@noble/hashes/utils.js:
4747+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
4749+@noble/curves/utils.js:
4750+@noble/curves/abstract/modular.js:
4751+@noble/curves/abstract/curve.js:
4752+@noble/curves/abstract/weierstrass.js:
4753+@noble/curves/secp256k1.js:
4754+@noble/curves/abstract/edwards.js:
4755+@noble/curves/abstract/montgomery.js:
4756+@noble/curves/ed25519.js:
4757+@noble/curves/nist.js:
4758+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
4760+/*! Bundled license information:
4762+@noble/hashes/utils.js:
4763+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
4765+@noble/curves/utils.js:
4766+@noble/curves/abstract/modular.js:
4767+@noble/curves/abstract/curve.js:
4768+@noble/curves/abstract/weierstrass.js:
4769+@noble/curves/secp256k1.js:
4770+@noble/curves/abstract/edwards.js:
4771+@noble/curves/abstract/montgomery.js:
4772+@noble/curves/ed25519.js:
4773+@noble/curves/nist.js:
4774+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
4776+/*! Bundled license information:
4746@noble/hashes/utils.js:
4778@noble/hashes/utils.js:
4747 (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
4779 (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
@@ -7440,21 +7472,43 @@ var $author$project$Main$charToHexBytes = function (c) {
7440 A2($elm$core$Basics$modBy, 16, b2))
7472 A2($elm$core$Basics$modBy, 16, b2))
7442 } else {
7474 } else {
7475+ if (code < 65536) {
7443− var b3 = 128 + A2($elm$core$Basics$modBy, 64, code);
7476+ var b3 = 128 + A2($elm$core$Basics$modBy, 64, code);
7444− var b2 = 128 + A2($elm$core$Basics$modBy, 64, (code / 64) | 0);
7477+ var b2 = 128 + A2($elm$core$Basics$modBy, 64, (code / 64) | 0);
7445− var b1 = 224 + ((code / 4096) | 0);
7478+ var b1 = 224 + ((code / 4096) | 0);
7446− return _List_fromArray(
7479+ return _List_fromArray(
7448− $author$project$Main$nibbleToHex((b1 / 16) | 0),
7481+ $author$project$Main$nibbleToHex((b1 / 16) | 0),
7449− $author$project$Main$nibbleToHex(
7482+ $author$project$Main$nibbleToHex(
7450− A2($elm$core$Basics$modBy, 16, b1)),
7483+ A2($elm$core$Basics$modBy, 16, b1)),
7451− $author$project$Main$nibbleToHex((b2 / 16) | 0),
7484+ $author$project$Main$nibbleToHex((b2 / 16) | 0),
7452− $author$project$Main$nibbleToHex(
7485+ $author$project$Main$nibbleToHex(
7453− A2($elm$core$Basics$modBy, 16, b2)),
7486+ A2($elm$core$Basics$modBy, 16, b2)),
7454− $author$project$Main$nibbleToHex((b3 / 16) | 0),
7487+ $author$project$Main$nibbleToHex((b3 / 16) | 0),
7455− $author$project$Main$nibbleToHex(
7488+ $author$project$Main$nibbleToHex(
7456− A2($elm$core$Basics$modBy, 16, b3))
7489+ A2($elm$core$Basics$modBy, 16, b3))
7492+ var b4 = 128 + A2($elm$core$Basics$modBy, 64, code);
7493+ var b3 = 128 + A2($elm$core$Basics$modBy, 64, (code / 64) | 0);
7494+ var b2 = 128 + A2($elm$core$Basics$modBy, 64, (code / 4096) | 0);
7495+ var b1 = 240 + ((code / 262144) | 0);
7496+ return _List_fromArray(
7498+ $author$project$Main$nibbleToHex((b1 / 16) | 0),
7499+ $author$project$Main$nibbleToHex(
7500+ A2($elm$core$Basics$modBy, 16, b1)),
7501+ $author$project$Main$nibbleToHex((b2 / 16) | 0),
7502+ $author$project$Main$nibbleToHex(
7503+ A2($elm$core$Basics$modBy, 16, b2)),
7504+ $author$project$Main$nibbleToHex((b3 / 16) | 0),
7505+ $author$project$Main$nibbleToHex(
7506+ A2($elm$core$Basics$modBy, 16, b3)),
7507+ $author$project$Main$nibbleToHex((b4 / 16) | 0),
7508+ $author$project$Main$nibbleToHex(
7509+ A2($elm$core$Basics$modBy, 16, b4))
@@ -7917,68 +7971,77 @@ var $author$project$Main$messagePayloadDecoder = A5(
7917 A2($elm$json$Json$Decode$field, 'body', $elm$json$Json$Decode$string));
7971 A2($elm$json$Json$Decode$field, 'body', $elm$json$Json$Decode$string));
7918var $author$project$Main$processEvents = F4(
7972var $author$project$Main$processEvents = F4(
7919 function (xPriv, myEdHex, events, seenIds) {
7973 function (xPriv, myEdHex, events, seenIds) {
7920− return A3(
7974+ return function (_v5) {
7978+ return _Utils_Tuple3(
7979+ $elm$core$List$reverse(msgs),
7921− $elm$core$List$foldl,
7984+ $elm$core$List$foldl,
7923− function (event, _v0) {
7986+ function (event, _v0) {
7924− var msgs = _v0.a;
7987+ var msgs = _v0.a;
7925− var seen = _v0.b;
7988+ var seen = _v0.b;
7926− var acks = _v0.c;
7989+ var acks = _v0.c;
7927− if (event.eventType !== 'message') {
7990+ if (event.eventType !== 'message') {
7928− return _Utils_Tuple3(msgs, seen, acks);
7930− var _v1 = A2($elm$json$Json$Decode$decodeString, $author$project$Main$envelopeDecoder, event.payload);
7931− if (_v1.$ === 'Err') {
7932− return _Utils_Tuple3(
7991+ return _Utils_Tuple3(msgs, seen, acks);
7935− A2($elm$core$List$cons, event.id, acks));
7936 } else {
7992 } else {
7937− var envelope = _v1.a;
7993+ var _v1 = A2($elm$json$Json$Decode$decodeString, $author$project$Main$envelopeDecoder, event.payload);
7938− if (_Utils_eq(envelope.fromKey, myEdHex)) {
7994+ if (_v1.$ === 'Err') {
7939 return _Utils_Tuple3(
7995 return _Utils_Tuple3(
7942 A2($elm$core$List$cons, event.id, acks));
7998 A2($elm$core$List$cons, event.id, acks));
7943 } else {
7999 } else {
7944− var _v2 = A2($author$project$Main$decryptMessage, xPriv, envelope.encryptedBlob);
8000+ var envelope = _v1.a;
7945− if (_v2.$ === 'Nothing') {
8001+ if (_Utils_eq(envelope.fromKey, myEdHex)) {
7946 return _Utils_Tuple3(
8002 return _Utils_Tuple3(
7949 A2($elm$core$List$cons, event.id, acks));
8005 A2($elm$core$List$cons, event.id, acks));
7950 } else {
8006 } else {
7951− var _v3 = _v2.a;
8007+ var _v2 = A2($author$project$Main$decryptMessage, xPriv, envelope.encryptedBlob);
7952− var senderPub = _v3.a;
8008+ if (_v2.$ === 'Nothing') {
7954− var _v4 = A2($elm$json$Json$Decode$decodeString, $author$project$Main$messagePayloadDecoder, json);
7955− if (_v4.$ === 'Err') {
7956 return _Utils_Tuple3(
8009 return _Utils_Tuple3(
7959 A2($elm$core$List$cons, event.id, acks));
8012 A2($elm$core$List$cons, event.id, acks));
7960 } else {
8013 } else {
8015+ var senderPub = _v3.a;
8017+ var _v4 = A2($elm$json$Json$Decode$decodeString, $author$project$Main$messagePayloadDecoder, json);
8018+ if (_v4.$ === 'Err') {
8019+ return _Utils_Tuple3(
8022+ A2($elm$core$List$cons, event.id, acks));
7961− var payload = _v4.a;
8024+ var payload = _v4.a;
7962− return A2($elm$core$Set$member, payload.id, seen) ? _Utils_Tuple3(
8025+ return A2($elm$core$Set$member, payload.id, seen) ? _Utils_Tuple3(
7965− A2($elm$core$List$cons, event.id, acks)) : _Utils_Tuple3(
8028+ A2($elm$core$List$cons, event.id, acks)) : _Utils_Tuple3(
7967− $elm$core$List$cons,
8030+ $elm$core$List$cons,
7968− _Utils_Tuple2(
8031+ _Utils_Tuple2(
7969− senderPub,
8032+ senderPub,
7970− {body: payload.body, id: payload.id, outgoing: false, timestamp: payload.timestamp}),
8033+ {body: payload.body, id: payload.id, outgoing: false, timestamp: payload.timestamp}),
7972− A2($elm$core$Set$insert, payload.id, seen),
8035+ A2($elm$core$Set$insert, payload.id, seen),
7973− A2($elm$core$List$cons, event.id, acks));
8036+ A2($elm$core$List$cons, event.id, acks));
7980− _Utils_Tuple3(_List_Nil, seenIds, _List_Nil),
8043+ _Utils_Tuple3(_List_Nil, seenIds, _List_Nil),
7981− events);
8044+ events));
7983var $author$project$Main$GotChallenge = function (a) {
8046var $author$project$Main$GotChallenge = function (a) {
7984 return {$: 'GotChallenge', a: a};
8047 return {$: 'GotChallenge', a: a};