@genai-fi/base 3.0.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/Button-CGKw9sMz.js +656 -0
  2. package/dist/CircularProgress-C6sMwjDC.js +1275 -0
  3. package/dist/{DefaultPropsProvider-C0Ib4Mye.js → DefaultPropsProvider-D2IJ8Qbs.js} +5 -1
  4. package/dist/{DialogQR-DVWhImXI.js → DialogQR-CyZcX7ul.js} +9 -5
  5. package/dist/{FlashWifi-CaAOKd3g.js → FlashWifi-CYp0UP0B.js} +1 -1
  6. package/dist/Portal-BqkDy0Wc.js +613 -0
  7. package/dist/SvgLayer-CA0elY7q.js +36 -0
  8. package/dist/assets/IconButtonDot.css +1 -0
  9. package/dist/assets/LangSelect.css +1 -0
  10. package/dist/assets/Loading.css +1 -0
  11. package/dist/assets/PercentageBar.css +1 -0
  12. package/dist/assets/PieScore.css +1 -0
  13. package/dist/assets/SvgLayer.css +1 -0
  14. package/dist/assets/Widget.css +1 -0
  15. package/dist/assets/style.css +1 -1
  16. package/dist/assets/style2.css +1 -0
  17. package/dist/colours.module.css +4 -0
  18. package/dist/components/AlertPara/AlertPara.js +1 -1
  19. package/dist/components/Application/Application.d.ts +10 -0
  20. package/dist/components/Application/Application.js +1610 -0
  21. package/dist/components/BusyButton/BusyButton.js +7 -6
  22. package/dist/components/Button/Button.js +12 -4
  23. package/dist/components/ConnectionStatus/ConnectionStatus.d.ts +1 -5
  24. package/dist/components/ConnectionStatus/ConnectionStatus.js +48 -47
  25. package/dist/components/ConnectionStatus/FlashWifi.js +1 -1
  26. package/dist/components/ContentLoader/ContentError.js +1 -1
  27. package/dist/components/ContentLoader/ContentLoader.js +5 -1
  28. package/dist/components/ContentLoader/ContentProgress.js +1 -1
  29. package/dist/components/IconButtonDot/IconButtonDot.d.ts +7 -0
  30. package/dist/components/IconButtonDot/IconButtonDot.js +22 -0
  31. package/dist/components/IconMenu/IconMenu.d.ts +12 -0
  32. package/dist/components/IconMenu/IconMenu.js +26 -0
  33. package/dist/components/IconMenu/IconMenuInline.d.ts +6 -0
  34. package/dist/components/IconMenu/IconMenuInline.js +12 -0
  35. package/dist/components/IconMenu/Item.d.ts +9 -0
  36. package/dist/components/IconMenu/Item.js +34 -0
  37. package/dist/components/IconMenu/Spacer.d.ts +1 -0
  38. package/dist/components/IconMenu/Spacer.js +11 -0
  39. package/dist/components/IconMenu/context.d.ts +1 -0
  40. package/dist/components/IconMenu/context.js +5 -0
  41. package/dist/components/IconMenu/index.d.ts +4 -0
  42. package/dist/components/IconMenu/index.js +10 -0
  43. package/dist/components/LangSelect/LangSelect.d.ts +12 -0
  44. package/dist/components/LangSelect/LangSelect.js +46 -0
  45. package/dist/components/Loading/Loading.d.ts +7 -0
  46. package/dist/components/Loading/Loading.js +15 -0
  47. package/dist/components/Motd/Motd.js +1 -1
  48. package/dist/components/PercentageBar/PercentageBar.d.ts +7 -0
  49. package/dist/components/PercentageBar/PercentageBar.js +37 -0
  50. package/dist/components/PieScore/PieScore.d.ts +6 -0
  51. package/dist/components/PieScore/PieScore.js +10676 -0
  52. package/dist/components/QRCode/DialogQR.js +8 -4
  53. package/dist/components/QRCode/QRCode.js +1 -1
  54. package/dist/components/Webcam/Webcam.js +3 -3
  55. package/dist/components/WorkflowLayout/Layout.d.ts +7 -0
  56. package/dist/components/WorkflowLayout/Layout.js +43 -0
  57. package/dist/components/WorkflowLayout/SvgLayer.d.ts +14 -0
  58. package/dist/components/WorkflowLayout/SvgLayer.js +5 -0
  59. package/dist/components/WorkflowLayout/Widget.d.ts +18 -0
  60. package/dist/components/WorkflowLayout/Widget.js +7413 -0
  61. package/dist/components/WorkflowLayout/index.d.ts +3 -0
  62. package/dist/components/WorkflowLayout/index.js +6 -0
  63. package/dist/components/WorkflowLayout/lines.d.ts +17 -0
  64. package/dist/components/WorkflowLayout/lines.js +37 -0
  65. package/dist/{createSvgIcon-BfF8yuCp.js → createSvgIcon-DmrVEdN7.js} +2 -2
  66. package/dist/{createTheme-BIcG8YPQ.js → createTheme-a85zdZWm.js} +4 -0
  67. package/dist/hooks/peer.d.ts +25 -2
  68. package/dist/hooks/peer.js +196 -54
  69. package/dist/main.d.ts +6 -0
  70. package/dist/main.js +53 -33
  71. package/dist/react-D_xU5dL6.js +112 -0
  72. package/dist/state/webrtcState.js +5 -4
  73. package/dist/style/theme.js +1 -1
  74. package/dist/style.module-BAnhZ_KJ.js +9 -0
  75. package/dist/style.module-BDpZJv9y.js +26 -0
  76. package/dist/util/Observer.d.ts +7 -0
  77. package/dist/util/Observer.js +9 -0
  78. package/dist/{webrtcState-D0nJpE9Z.js → vanilla-BJxibF1U.js} +83 -85
  79. package/package.json +8 -2
  80. package/dist/Button-DQwRVw4a.js +0 -1918
  81. package/dist/react-D-b-Xrzv.js +0 -98
  82. package/dist/style.module-DSFm2eLD.js +0 -9
@@ -0,0 +1,3 @@
1
+ export { default as WorkflowLayout } from './Layout';
2
+ export type { IConnection } from './lines';
3
+ export { Widget } from './Widget';
@@ -0,0 +1,6 @@
1
+ import { default as t } from "./Layout.js";
2
+ import { Widget as f } from "./Widget.js";
3
+ export {
4
+ f as Widget,
5
+ t as WorkflowLayout
6
+ };
@@ -0,0 +1,17 @@
1
+ import { ILine } from '../../components/WorkflowLayout/SvgLayer';
2
+ export interface INode {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ id: string;
8
+ }
9
+ export declare function extractNodesFromElements(div: HTMLElement, initial?: Map<string, INode[]>): Map<string, INode[]>;
10
+ export type ConnectionPoint = 'left' | 'right' | 'top' | 'bottom';
11
+ export interface IConnection {
12
+ start: string;
13
+ startPoint: ConnectionPoint;
14
+ end: string;
15
+ endPoint: ConnectionPoint;
16
+ }
17
+ export declare function generateLines(data: Map<string, INode[]>, connections: IConnection[]): ILine[];
@@ -0,0 +1,37 @@
1
+ function f(s, h) {
2
+ var o;
3
+ const n = h || /* @__PURE__ */ new Map();
4
+ for (let r = 0; r < s.children.length; ++r) {
5
+ const e = s.children[r], t = e.getAttribute("data-widget");
6
+ if (t === "container")
7
+ f(e, n);
8
+ else if (t) {
9
+ n.has(t) || n.set(t, []);
10
+ const i = e.offsetWidth, d = e.offsetHeight;
11
+ i > 0 && d > 0 && ((o = n.get(t)) == null || o.push({ x: e.offsetLeft, y: e.offsetTop, width: i, height: d, id: e.id || "noid" }));
12
+ }
13
+ }
14
+ return n;
15
+ }
16
+ function c(s, h) {
17
+ const n = [];
18
+ for (const o of h) {
19
+ const r = s.get(o.start) || [], e = s.get(o.end) || [];
20
+ for (const t of r)
21
+ for (const i of e)
22
+ n.push({
23
+ id1: t.id,
24
+ id2: i.id,
25
+ x1: o.startPoint === "left" ? t.x : o.startPoint === "right" ? t.x + t.width : t.x + t.width / 2,
26
+ x2: o.endPoint === "left" ? i.x : o.endPoint === "right" ? i.x + i.width : i.x + i.width / 2,
27
+ y1: o.startPoint === "top" ? t.y : o.startPoint === "bottom" ? t.y + t.height : t.y + t.height / 2,
28
+ y2: o.endPoint === "top" ? i.y : o.endPoint === "bottom" ? i.y + i.height : i.y + i.height / 2,
29
+ direction: o.startPoint === "top" || o.startPoint === "bottom" ? "vertical" : "horizontal"
30
+ });
31
+ }
32
+ return n;
33
+ }
34
+ export {
35
+ f as extractNodesFromElements,
36
+ c as generateLines
37
+ };
@@ -1,7 +1,7 @@
1
1
  import * as h from "react";
2
2
  import { jsxs as b, jsx as I } from "react/jsx-runtime";
3
- import { g as w, a as z, P as e } from "./createTheme-BIcG8YPQ.js";
4
- import { g as N, u as C, s as O, c as T, a as R, m as E } from "./DefaultPropsProvider-C0Ib4Mye.js";
3
+ import { g as w, a as z, P as e } from "./createTheme-a85zdZWm.js";
4
+ import { g as N, u as C, s as O, c as T, a as R, m as E } from "./DefaultPropsProvider-D2IJ8Qbs.js";
5
5
  function j(o) {
6
6
  return w("MuiSvgIcon", o);
7
7
  }
@@ -2888,8 +2888,12 @@ export {
2888
2888
  yn as b,
2889
2889
  no as c,
2890
2890
  fn as d,
2891
+ Ge as e,
2892
+ de as f,
2891
2893
  pn as g,
2894
+ Z as h,
2892
2895
  fe as i,
2896
+ qn as j,
2893
2897
  Yr as r,
2894
2898
  Ke as s
2895
2899
  };
@@ -1,5 +1,28 @@
1
+ import { PropsWithChildren } from 'react';
1
2
  import { default as Peer2Peer, P2POptions } from '../services/peer2peer/Peer2Peer';
2
- import { Connection, PeerEvent } from '../services/peer2peer/types';
3
+ import { Connection, PeerEvent, PeerStatus } from '../services/peer2peer/types';
4
+ export declare const PeerProvider: import('react').Provider<Peer2Peer<PeerEvent> | null>;
5
+ interface PeerProps extends PropsWithChildren {
6
+ code: string;
7
+ server?: string;
8
+ forceTURN?: boolean;
9
+ forceWebsocket?: boolean;
10
+ host?: string;
11
+ secure?: boolean;
12
+ peerkey: string;
13
+ port?: number;
14
+ disabled?: boolean;
15
+ }
16
+ export declare function Peer<T extends PeerEvent>({ children, code, server, host, secure, peerkey, port, forceTURN, forceWebsocket, disabled, }: PeerProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function usePeerObject<T extends PeerEvent>(): Peer2Peer<T> | null;
18
+ export declare function usePeerSender<T extends PeerEvent>(): (data: T, exclude?: string[]) => void;
19
+ export declare function usePeerStatus(): PeerStatus;
20
+ export declare function usePeerOpen(fn: () => void): void;
21
+ export declare function usePeerClose<T extends PeerEvent>(fn: (conn?: Connection<T>) => void): void;
22
+ export declare function usePeerData<T extends PeerEvent>(fn: (data: T, conn: Connection<T>) => void): void;
23
+ export declare function usePeerEvent<T extends PeerEvent>(event: T['event'], fn: (data: T, conn: Connection<T>) => void): void;
24
+ export declare function usePeerConnect<T extends PeerEvent>(fn: (conn: Connection<T>) => void): void;
25
+ export declare function usePeerError(fn: (err: string) => void): void;
3
26
  interface Callbacks<T extends PeerEvent> {
4
27
  onOpen?: () => void;
5
28
  onConnect?: (conn: Connection<T>) => void;
@@ -16,7 +39,7 @@ interface Props<T extends PeerEvent> extends Callbacks<T>, P2POptions {
16
39
  port?: number;
17
40
  disabled?: boolean;
18
41
  }
19
- export type PeerProps<T extends PeerEvent> = Props<T>;
42
+ /** @deprecated */
20
43
  export default function usePeer<T extends PeerEvent>({ code, server, host, secure, port, key, disabled, onOpen, onClose, onError, onData, onConnect, forceTURN, forceWebsocket, }: Props<T>): {
21
44
  send: ((data: T, exclude?: string[]) => void) | undefined;
22
45
  ready: boolean;
@@ -1,70 +1,212 @@
1
- import { useState as S, useRef as x, useEffect as D } from "react";
2
- import { i as E, w as T } from "../webrtcState-D0nJpE9Z.js";
3
- import V from "../services/peer2peer/Peer2Peer.js";
4
- import { u as q, a as z } from "../react-D-b-Xrzv.js";
5
- function I({
6
- code: u,
7
- server: i,
8
- host: f,
9
- secure: l,
10
- port: d,
11
- key: m,
12
- disabled: p,
1
+ import { jsx as B } from "react/jsx-runtime";
2
+ import { createContext as F, useState as y, useRef as p, useEffect as c, useContext as i } from "react";
3
+ import { iceConfig as E, webrtcActive as O } from "../state/webrtcState.js";
4
+ import R from "../services/peer2peer/Peer2Peer.js";
5
+ import { a as T, u as V } from "../react-D_xU5dL6.js";
6
+ const f = F(null), G = f.Provider;
7
+ function Q({
8
+ children: e,
9
+ code: t,
10
+ server: n,
11
+ host: r,
12
+ secure: o,
13
+ peerkey: s,
14
+ port: a,
15
+ forceTURN: C,
16
+ forceWebsocket: b,
17
+ disabled: S
18
+ }) {
19
+ const [v, w] = y(null), [l, P] = T(O), d = V(E);
20
+ return c(() => {
21
+ if (S) {
22
+ P("disabled");
23
+ return;
24
+ }
25
+ if (l === "unset") return;
26
+ if (l === "disabled") {
27
+ P("unset");
28
+ return;
29
+ }
30
+ if (!t || !d)
31
+ return;
32
+ const x = new R(
33
+ t,
34
+ r || "api2.gen-ai.fi",
35
+ o || !0,
36
+ s,
37
+ a || 443,
38
+ d,
39
+ l === "relay",
40
+ n,
41
+ { forceTURN: C, forceWebsocket: b }
42
+ );
43
+ return w(x), () => {
44
+ x.destroy();
45
+ };
46
+ }, [t, r, o, s, a, n, l, d, C, b, S, P]), /* @__PURE__ */ B(G, { value: v, children: e });
47
+ }
48
+ function W() {
49
+ return i(f);
50
+ }
51
+ const H = () => {
52
+ };
53
+ function X() {
54
+ const e = i(f);
55
+ return e ? e.boundSendAll : H;
56
+ }
57
+ function Y() {
58
+ const e = i(f), [t, n] = y((e == null ? void 0 : e.status) || "connecting");
59
+ return c(() => {
60
+ if (e) {
61
+ const r = (o) => n(o);
62
+ return n(e.status), e.on("status", r), () => {
63
+ e.off("status", r);
64
+ };
65
+ }
66
+ }, [e]), t;
67
+ }
68
+ function Z(e) {
69
+ const t = i(f), n = p(e);
70
+ n.current = e, c(() => {
71
+ if (t) {
72
+ const r = () => n.current();
73
+ return t.on("open", r), () => {
74
+ t.off("open", r);
75
+ };
76
+ }
77
+ }, [t]);
78
+ }
79
+ function _(e) {
80
+ const t = i(f), n = p(e);
81
+ n.current = e, c(() => {
82
+ if (t) {
83
+ const r = (o) => n.current(o);
84
+ return t.on("close", r), () => {
85
+ t.off("close", r);
86
+ };
87
+ }
88
+ }, [t]);
89
+ }
90
+ function $(e) {
91
+ const t = i(f), n = p(e);
92
+ n.current = e, c(() => {
93
+ if (t) {
94
+ const r = (o, s) => n.current(o, s);
95
+ return t.on("data", r), () => {
96
+ t.off("data", r);
97
+ };
98
+ }
99
+ }, [t]);
100
+ }
101
+ function N(e, t) {
102
+ const n = i(f), r = p(t);
103
+ r.current = t, c(() => {
104
+ if (n) {
105
+ const o = (s, a) => {
106
+ s.event === e && r.current(s, a);
107
+ };
108
+ return n.on("data", o), () => {
109
+ n.off("data", o);
110
+ };
111
+ }
112
+ }, [n, e]);
113
+ }
114
+ function U(e) {
115
+ const t = i(f), n = p(e);
116
+ n.current = e, c(() => {
117
+ if (t) {
118
+ const r = (o) => n.current(o);
119
+ return t.on("connect", r), () => {
120
+ t.off("connect", r);
121
+ };
122
+ }
123
+ }, [t]);
124
+ }
125
+ function k(e) {
126
+ const t = i(f), n = p(e);
127
+ n.current = e, c(() => {
128
+ if (t) {
129
+ const r = (o) => n.current(o);
130
+ return t.on("error", r), () => {
131
+ t.off("error", r);
132
+ };
133
+ }
134
+ }, [t]);
135
+ }
136
+ function ee({
137
+ code: e,
138
+ server: t,
139
+ host: n,
140
+ secure: r,
141
+ port: o,
142
+ key: s,
143
+ disabled: a,
13
144
  onOpen: C,
14
145
  onClose: b,
15
- onError: w,
16
- onData: A,
17
- onConnect: P,
18
- forceTURN: g,
19
- forceWebsocket: y
146
+ onError: S,
147
+ onData: v,
148
+ onConnect: w,
149
+ forceTURN: l,
150
+ forceWebsocket: P
20
151
  }) {
21
- const [s, R] = S(), e = x({}), [o, c] = q(T), a = z(E), [j, n] = S("connecting");
22
- return D(() => {
23
- e.current.onClose = b, e.current.onOpen = C, e.current.onConnect = P, e.current.onError = w, e.current.onData = A;
24
- }, [A, C, b, w, P]), D(() => {
25
- if (p) {
26
- n("failed"), c("disabled");
152
+ const [d, x] = y(), u = p({}), [A, j] = T(O), D = V(E), [q, g] = y("connecting");
153
+ return c(() => {
154
+ u.current.onClose = b, u.current.onOpen = C, u.current.onConnect = w, u.current.onError = S, u.current.onData = v;
155
+ }, [v, C, b, S, w]), c(() => {
156
+ if (a) {
157
+ g("failed"), j("disabled");
27
158
  return;
28
159
  } else
29
- n("connecting");
30
- if (o === "unset") return;
31
- if (o === "disabled") {
32
- c("unset");
160
+ g("connecting");
161
+ if (A === "unset") return;
162
+ if (A === "disabled") {
163
+ j("unset");
33
164
  return;
34
165
  }
35
- if (!u) return;
36
- if (!a) {
166
+ if (!e) return;
167
+ if (!D) {
37
168
  setTimeout(() => {
38
- n("failed");
39
- }, 5e3), n("failed");
169
+ g("failed");
170
+ }, 5e3), g("failed");
40
171
  return;
41
172
  }
42
- const t = new V(
43
- u,
44
- f,
45
- l || !1,
46
- m || "peerjs",
47
- d || 443,
48
- a,
49
- o === "relay",
50
- i,
51
- { forceTURN: g, forceWebsocket: y }
173
+ const m = new R(
174
+ e,
175
+ n,
176
+ r || !1,
177
+ s || "peerjs",
178
+ o || 443,
179
+ D,
180
+ A === "relay",
181
+ t,
182
+ { forceTURN: l, forceWebsocket: P }
52
183
  );
53
- return t.on("status", n), t.on("data", (r, v) => {
54
- e.current.onData && e.current.onData(r, v);
55
- }), t.on("close", (r) => {
56
- e.current.onClose && e.current.onClose(r);
57
- }), t.on("connect", (r) => {
58
- e.current.onConnect && e.current.onConnect(r);
59
- }), R(t), () => {
60
- t.destroy();
184
+ return m.on("status", g), m.on("data", (h, z) => {
185
+ u.current.onData && u.current.onData(h, z);
186
+ }), m.on("close", (h) => {
187
+ u.current.onClose && u.current.onClose(h);
188
+ }), m.on("connect", (h) => {
189
+ u.current.onConnect && u.current.onConnect(h);
190
+ }), x(m), () => {
191
+ m.destroy();
61
192
  };
62
- }, [u, i, o, a, f, m, d, l, p, c, g, y]), {
63
- send: s ? s.boundSendAll : void 0,
64
- ready: j === "ready",
65
- peer: s
193
+ }, [e, t, A, D, n, s, o, r, a, j, l, P]), {
194
+ send: d ? d.boundSendAll : void 0,
195
+ ready: q === "ready",
196
+ peer: d
66
197
  };
67
198
  }
68
199
  export {
69
- I as default
200
+ Q as Peer,
201
+ G as PeerProvider,
202
+ ee as default,
203
+ _ as usePeerClose,
204
+ U as usePeerConnect,
205
+ $ as usePeerData,
206
+ k as usePeerError,
207
+ N as usePeerEvent,
208
+ W as usePeerObject,
209
+ Z as usePeerOpen,
210
+ X as usePeerSender,
211
+ Y as usePeerStatus
70
212
  };
package/dist/main.d.ts CHANGED
@@ -19,3 +19,9 @@ export { default as AlertPara } from './components/AlertPara/AlertPara';
19
19
  export { default as QRCode } from './components/QRCode/QRCode';
20
20
  export { default as Webcam } from './components/Webcam/Webcam';
21
21
  export { default as ContentLoader } from './components/ContentLoader/ContentLoader';
22
+ export { WorkflowLayout, type IConnection, Widget } from './components/WorkflowLayout';
23
+ export { default as LangSelect } from './components/LangSelect/LangSelect';
24
+ export { IconMenu, IconMenuInline, IconMenuItem, Spacer } from './components/IconMenu';
25
+ export { default as PercentageBar } from './components/PercentageBar/PercentageBar';
26
+ export { default as PieScore } from './components/PieScore/PieScore';
27
+ export { default as Application } from './components/Application/Application';
package/dist/main.js CHANGED
@@ -1,49 +1,69 @@
1
- import { default as o } from "./components/ConnectionStatus/ConnectionStatus.js";
2
- import { B as t, L as f } from "./Button-DQwRVw4a.js";
3
- import { default as m } from "./hooks/peer.js";
1
+ import { default as r } from "./components/ConnectionStatus/ConnectionStatus.js";
2
+ import { Button as t, LargeButton as f } from "./components/Button/Button.js";
3
+ import { default as s } from "./hooks/peer.js";
4
4
  import { default as u } from "./services/peer2peer/Peer2Peer.js";
5
5
  import { useID as n } from "./hooks/id.js";
6
6
  import { useOnlyOnce as d } from "./hooks/onlyOnce.js";
7
7
  import { default as i } from "./hooks/random.js";
8
8
  import { theme as v } from "./style/theme.js";
9
9
  import { default as P } from "./util/randomId.js";
10
- import { canvasFromDataTransfer as T, canvasFromFile as b, canvasFromImage as y, canvasFromURL as C, canvasesFromFiles as D, cropTo as I, urlFromDataTransfer as R } from "./util/canvas.js";
11
- import { createZipBlob as g, loadZipFile as A, saveZipFile as O } from "./util/zip.js";
12
- import { useTabActive as h } from "./hooks/useTabActive.js";
13
- import { default as U } from "./components/Spinner/Spinner.js";
14
- import { default as j } from "./components/Privacy/Privacy.js";
15
- import { default as q } from "./components/BusyButton/BusyButton.js";
16
- import { default as z } from "./components/AlertPara/AlertPara.js";
17
- import { default as G } from "./components/QRCode/QRCode.js";
18
- import { default as J } from "./components/Webcam/Webcam.js";
19
- import { default as M } from "./components/ContentLoader/ContentLoader.js";
10
+ import { canvasFromDataTransfer as g, canvasFromFile as L, canvasFromImage as S, canvasFromURL as y, canvasesFromFiles as T, cropTo as b, urlFromDataTransfer as A } from "./util/canvas.js";
11
+ import { createZipBlob as D, loadZipFile as M, saveZipFile as R } from "./util/zip.js";
12
+ import { useTabActive as Z } from "./hooks/useTabActive.js";
13
+ import { default as h } from "./components/Spinner/Spinner.js";
14
+ import { default as w } from "./components/Privacy/Privacy.js";
15
+ import { default as U } from "./components/BusyButton/BusyButton.js";
16
+ import { default as q } from "./components/AlertPara/AlertPara.js";
17
+ import { default as E } from "./components/QRCode/QRCode.js";
18
+ import { default as H } from "./components/Webcam/Webcam.js";
19
+ import { default as K } from "./components/ContentLoader/ContentLoader.js";
20
+ import { default as V } from "./components/WorkflowLayout/Layout.js";
21
+ import { Widget as Y } from "./components/WorkflowLayout/Widget.js";
22
+ import { default as $ } from "./components/LangSelect/LangSelect.js";
23
+ import { default as oe } from "./components/IconMenu/Spacer.js";
24
+ import { default as ae } from "./components/IconMenu/IconMenu.js";
25
+ import { default as fe } from "./components/IconMenu/IconMenuInline.js";
26
+ import { default as se } from "./components/IconMenu/Item.js";
27
+ import { default as ue } from "./components/PercentageBar/PercentageBar.js";
28
+ import { default as ne } from "./components/PieScore/PieScore.js";
29
+ import { default as de } from "./components/Application/Application.js";
20
30
  export {
21
- z as AlertPara,
22
- q as BusyButton,
31
+ q as AlertPara,
32
+ de as Application,
33
+ U as BusyButton,
23
34
  t as Button,
24
- o as ConnectionStatus,
25
- M as ContentLoader,
35
+ r as ConnectionStatus,
36
+ K as ContentLoader,
37
+ ae as IconMenu,
38
+ fe as IconMenuInline,
39
+ se as IconMenuItem,
40
+ $ as LangSelect,
26
41
  f as LargeButton,
27
42
  u as Peer2Peer,
28
- j as Privacy,
29
- G as QRCode,
30
- U as Spinner,
31
- J as Webcam,
32
- T as canvasFromDataTransfer,
33
- b as canvasFromFile,
34
- y as canvasFromImage,
35
- C as canvasFromURL,
36
- D as canvasesFromFiles,
37
- g as createZipBlob,
38
- I as cropTo,
39
- A as loadZipFile,
43
+ ue as PercentageBar,
44
+ ne as PieScore,
45
+ w as Privacy,
46
+ E as QRCode,
47
+ oe as Spacer,
48
+ h as Spinner,
49
+ H as Webcam,
50
+ Y as Widget,
51
+ V as WorkflowLayout,
52
+ g as canvasFromDataTransfer,
53
+ L as canvasFromFile,
54
+ S as canvasFromImage,
55
+ y as canvasFromURL,
56
+ T as canvasesFromFiles,
57
+ D as createZipBlob,
58
+ b as cropTo,
59
+ M as loadZipFile,
40
60
  P as randomId,
41
- O as saveZipFile,
61
+ R as saveZipFile,
42
62
  v as theme,
43
- R as urlFromDataTransfer,
63
+ A as urlFromDataTransfer,
44
64
  n as useID,
45
65
  d as useOnlyOnce,
46
- m as usePeer,
66
+ s as usePeer,
47
67
  i as useRandom,
48
- h as useTabActive
68
+ Z as useTabActive
49
69
  };
@@ -0,0 +1,112 @@
1
+ import _, { useReducer as R, useEffect as A, useDebugValue as S, useRef as x, createElement as y, createContext as C, useCallback as E, useContext as F } from "react";
2
+ import { c as V, g as j, I as h } from "./vanilla-BJxibF1U.js";
3
+ const k = {}, w = C(
4
+ void 0
5
+ );
6
+ function P(t) {
7
+ return F(w) || j();
8
+ }
9
+ function T({
10
+ children: t,
11
+ store: s
12
+ }) {
13
+ const u = x(void 0);
14
+ return !s && !u.current && (u.current = V()), y(
15
+ w.Provider,
16
+ {
17
+ value: s || u.current
18
+ },
19
+ t
20
+ );
21
+ }
22
+ const b = (t) => typeof (t == null ? void 0 : t.then) == "function", g = (t) => {
23
+ t.status || (t.status = "pending", t.then(
24
+ (s) => {
25
+ t.status = "fulfilled", t.value = s;
26
+ },
27
+ (s) => {
28
+ t.status = "rejected", t.reason = s;
29
+ }
30
+ ));
31
+ }, D = _.use || // A shim for older React versions
32
+ ((t) => {
33
+ if (t.status === "pending")
34
+ throw t;
35
+ if (t.status === "fulfilled")
36
+ return t.value;
37
+ throw t.status === "rejected" ? t.reason : (g(t), t);
38
+ }), d = /* @__PURE__ */ new WeakMap(), v = (t, s) => {
39
+ let u = d.get(t);
40
+ return u || (u = new Promise((o, n) => {
41
+ let a = t;
42
+ const l = (e) => (r) => {
43
+ a === e && o(r);
44
+ }, f = (e) => (r) => {
45
+ a === e && n(r);
46
+ }, c = () => {
47
+ try {
48
+ const e = s();
49
+ b(e) ? (d.set(e, u), a = e, e.then(l(e), f(e)), h(e, c)) : o(e);
50
+ } catch (e) {
51
+ n(e);
52
+ }
53
+ };
54
+ t.then(l(t), f(t)), h(t, c);
55
+ }), d.set(t, u)), u;
56
+ };
57
+ function I(t, s) {
58
+ const { delay: u, unstable_promiseStatus: o = !_.use } = {}, n = P(), [[a, l, f], c] = R(
59
+ (r) => {
60
+ const i = n.get(t);
61
+ return Object.is(r[0], i) && r[1] === n && r[2] === t ? r : [i, n, t];
62
+ },
63
+ void 0,
64
+ () => [n.get(t), n, t]
65
+ );
66
+ let e = a;
67
+ if ((l !== n || f !== t) && (c(), e = n.get(t)), A(() => {
68
+ const r = n.sub(t, () => {
69
+ if (o)
70
+ try {
71
+ const i = n.get(t);
72
+ b(i) && g(
73
+ v(i, () => n.get(t))
74
+ );
75
+ } catch {
76
+ }
77
+ if (typeof u == "number") {
78
+ setTimeout(c, u);
79
+ return;
80
+ }
81
+ c();
82
+ });
83
+ return c(), r;
84
+ }, [n, t, u, o]), S(e), b(e)) {
85
+ const r = v(e, () => n.get(t));
86
+ return o && g(r), D(r);
87
+ }
88
+ return e;
89
+ }
90
+ function L(t, s) {
91
+ const u = P();
92
+ return E(
93
+ (...n) => {
94
+ if ((k ? "production" : void 0) !== "production" && !("write" in t))
95
+ throw new Error("not writable atom");
96
+ return u.set(t, ...n);
97
+ },
98
+ [u, t]
99
+ );
100
+ }
101
+ function H(t, s) {
102
+ return [
103
+ I(t),
104
+ // We do wrong type assertion here, which results in throwing an error.
105
+ L(t)
106
+ ];
107
+ }
108
+ export {
109
+ T as P,
110
+ H as a,
111
+ I as u
112
+ };
@@ -1,6 +1,7 @@
1
- import { i, w as t, a as c } from "../webrtcState-D0nJpE9Z.js";
1
+ import { a as t } from "../vanilla-BJxibF1U.js";
2
+ const e = t("disabled"), c = t(void 0), i = t("unset");
2
3
  export {
3
- i as iceConfig,
4
- t as webrtcActive,
5
- c as webrtcCandidate
4
+ c as iceConfig,
5
+ e as webrtcActive,
6
+ i as webrtcCandidate
6
7
  };
@@ -1,4 +1,4 @@
1
- import { c as s } from "../createTheme-BIcG8YPQ.js";
1
+ import { c as s } from "../createTheme-a85zdZWm.js";
2
2
  import '../assets/theme.css';const t = "#008297", a = {
3
3
  primary: t
4
4
  };
@@ -0,0 +1,9 @@
1
+ import './assets/style2.css';const t = "_title_1bpz2_3", e = "_content_1bpz2_8", r = "_errorTitle_1bpz2_18", o = "_errorContent_1bpz2_23", n = {
2
+ title: t,
3
+ content: e,
4
+ errorTitle: r,
5
+ errorContent: o
6
+ };
7
+ export {
8
+ n as s
9
+ };