frame.identify 0.5.1 → 0.5.3

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.
@@ -31,23 +31,23 @@ function L(e) {
31
31
  }
32
32
  //#endregion
33
33
  //#region node_modules/@mui/utils/getScrollbarSize/getScrollbarSize.mjs
34
- function R(e = window) {
34
+ function te(e = window) {
35
35
  let t = e.document.documentElement.clientWidth;
36
36
  return e.innerWidth - t;
37
37
  }
38
38
  //#endregion
39
39
  //#region node_modules/@mui/material/Modal/ModalManager.mjs
40
- function z(e) {
40
+ function R(e) {
41
41
  let t = I(e);
42
42
  return e === t.body || e === t.documentElement ? L(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight;
43
43
  }
44
- function te(e, t) {
44
+ function ne(e, t) {
45
45
  t ? e.setAttribute("aria-hidden", "true") : e.removeAttribute("aria-hidden");
46
46
  }
47
- function ne(e) {
47
+ function re(e) {
48
48
  return parseFloat(L(e).getComputedStyle(e).paddingRight) || 0;
49
49
  }
50
- function re(e) {
50
+ function z(e) {
51
51
  let t = [
52
52
  "TEMPLATE",
53
53
  "SCRIPT",
@@ -73,8 +73,8 @@ function ie(e, t, n, r, i) {
73
73
  ...r
74
74
  ];
75
75
  [].forEach.call(e.children, (e) => {
76
- let t = !a.includes(e), n = !re(e);
77
- t && n && te(e, i);
76
+ let t = !a.includes(e), n = !z(e);
77
+ t && n && ne(e, i);
78
78
  });
79
79
  }
80
80
  function ae(e, t) {
@@ -86,20 +86,20 @@ function ae(e, t) {
86
86
  let t = r.parentElement, n = L(r);
87
87
  e = t?.nodeName === "HTML" && n.getComputedStyle(t).overflowY === "scroll" ? t : r;
88
88
  }
89
- if (z(e)) {
90
- let t = R(L(e));
89
+ if (R(e)) {
90
+ let t = te(L(e));
91
91
  n.push({
92
92
  value: e.style.paddingRight,
93
93
  property: "padding-right",
94
94
  el: e
95
- }), e.style.paddingRight = `${ne(e) + t}px`;
95
+ }), e.style.paddingRight = `${re(e) + t}px`;
96
96
  let i = I(r).querySelectorAll(".mui-fixed");
97
97
  [].forEach.call(i, (e) => {
98
98
  n.push({
99
99
  value: e.style.paddingRight,
100
100
  property: "padding-right",
101
101
  el: e
102
- }), e.style.paddingRight = `${ne(e) + t}px`;
102
+ }), e.style.paddingRight = `${re(e) + t}px`;
103
103
  });
104
104
  }
105
105
  n.push({
@@ -135,7 +135,7 @@ var oe = class {
135
135
  add(e, t) {
136
136
  let n = this.modals.indexOf(e);
137
137
  if (n !== -1) return n;
138
- n = this.modals.length, this.modals.push(e), e.modalRef && te(e.modalRef, !1);
138
+ n = this.modals.length, this.modals.push(e), e.modalRef && ne(e.modalRef, !1);
139
139
  let r = B(t);
140
140
  ie(t, e.mount, e.modalRef, r, !0);
141
141
  let i = this.containers.findIndex((e) => e.container === t);
@@ -154,10 +154,10 @@ var oe = class {
154
154
  let n = this.modals.indexOf(e);
155
155
  if (n === -1) return n;
156
156
  let r = this.containers.findIndex((t) => t.modals.includes(e)), i = this.containers[r];
157
- if (i.modals.splice(i.modals.indexOf(e), 1), this.modals.splice(n, 1), i.modals.length === 0) i.restore && i.restore(), e.modalRef && te(e.modalRef, t), ie(i.container, e.mount, e.modalRef, i.hiddenSiblings, !1), this.containers.splice(r, 1);
157
+ if (i.modals.splice(i.modals.indexOf(e), 1), this.modals.splice(n, 1), i.modals.length === 0) i.restore && i.restore(), e.modalRef && ne(e.modalRef, t), ie(i.container, e.mount, e.modalRef, i.hiddenSiblings, !1), this.containers.splice(r, 1);
158
158
  else {
159
159
  let e = i.modals[i.modals.length - 1];
160
- e.modalRef && te(e.modalRef, !1);
160
+ e.modalRef && ne(e.modalRef, !1);
161
161
  }
162
162
  return n;
163
163
  }
@@ -264,19 +264,19 @@ var oe = class {
264
264
  function L(e) {
265
265
  return x(e) === c;
266
266
  }
267
- function R(e) {
267
+ function te(e) {
268
268
  return x(e) === s;
269
269
  }
270
- function z(e) {
270
+ function R(e) {
271
271
  return typeof e == "object" && !!e && e.$$typeof === n;
272
272
  }
273
- function te(e) {
273
+ function ne(e) {
274
274
  return x(e) === d;
275
275
  }
276
- function ne(e) {
276
+ function re(e) {
277
277
  return x(e) === i;
278
278
  }
279
- function re(e) {
279
+ function z(e) {
280
280
  return x(e) === h;
281
281
  }
282
282
  function ie(e) {
@@ -294,7 +294,7 @@ var oe = class {
294
294
  function se(e) {
295
295
  return x(e) === f;
296
296
  }
297
- e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = F, e.isConcurrentMode = I, e.isContextConsumer = L, e.isContextProvider = R, e.isElement = z, e.isForwardRef = te, e.isFragment = ne, e.isLazy = re, e.isMemo = ie, e.isPortal = ae, e.isProfiler = B, e.isStrictMode = oe, e.isSuspense = se, e.isValidElementType = b, e.typeOf = x;
297
+ e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = F, e.isConcurrentMode = I, e.isContextConsumer = L, e.isContextProvider = te, e.isElement = R, e.isForwardRef = ne, e.isFragment = re, e.isLazy = z, e.isMemo = ie, e.isPortal = ae, e.isProfiler = B, e.isStrictMode = oe, e.isSuspense = se, e.isValidElementType = b, e.typeOf = x;
298
298
  })();
299
299
  })), le = /* @__PURE__ */ P(((e, t) => {
300
300
  t.exports = process.env.NODE_ENV === "production" ? se() : ce();
@@ -3779,7 +3779,7 @@ function $a(t) {
3779
3779
  return;
3780
3780
  }
3781
3781
  M.current = e.reduceMotion, e.onExit?.(), E.current = "exiting", T("exiting");
3782
- }, [N]), R = e.useCallback((e, t) => {
3782
+ }, [N]), te = e.useCallback((e, t) => {
3783
3783
  if (P(), t === "entering") {
3784
3784
  let t = N.current;
3785
3785
  if (t.mountOnEnter || t.unmountOnExit) {
@@ -3794,17 +3794,17 @@ function $a(t) {
3794
3794
  L,
3795
3795
  N
3796
3796
  ]);
3797
- return Ve(() => (O.current = !0, D.current && (D.current = !1, R(!0, "entering")), () => {
3797
+ return Ve(() => (O.current = !0, D.current && (D.current = !1, te(!0, "entering")), () => {
3798
3798
  O.current = !1, P();
3799
- }), [P, R]), Ve(() => {
3799
+ }), [P, te]), Ve(() => {
3800
3800
  if (!O.current) return;
3801
3801
  let e = E.current;
3802
- n ? e !== "entering" && e !== "entered" && R(!1, "entering") : e === "entering" || e === "entered" ? R(!1, "exiting") : e === "exited" && s && (E.current = "unmounted", T("unmounted"));
3802
+ n ? e !== "entering" && e !== "entered" && te(!1, "entering") : e === "entering" || e === "entered" ? te(!1, "exiting") : e === "exited" && s && (E.current = "unmounted", T("unmounted"));
3803
3803
  }, [
3804
3804
  n,
3805
3805
  w,
3806
3806
  s,
3807
- R
3807
+ te
3808
3808
  ]), Ve(() => {
3809
3809
  if (w === "unmounted" || A.current === "unmounted") {
3810
3810
  A.current = w;
@@ -4127,7 +4127,7 @@ function Do(t) {
4127
4127
  let e = Co(n) || b().body;
4128
4128
  Eo.add(x(), e), m.current && S();
4129
4129
  }), w = () => Eo.isTopModal(x()), T = xo((e) => {
4130
- f.current = e, e && (p.current = e, l && w() ? S() : m.current && te(m.current, y));
4130
+ f.current = e, e && (p.current = e, l && w() ? S() : m.current && ne(m.current, y));
4131
4131
  }), E = e.useCallback(() => {
4132
4132
  Eo.remove(x(), y);
4133
4133
  }, [y]);
@@ -4251,23 +4251,23 @@ var ko = (e) => {
4251
4251
  let { onEnter: e, onExited: t } = A();
4252
4252
  L.onEnter = e, L.onExited = t;
4253
4253
  }
4254
- let R = {
4254
+ let te = {
4255
4255
  slots: w,
4256
4256
  slotProps: C
4257
- }, [z, te] = Pa("root", {
4257
+ }, [R, ne] = Pa("root", {
4258
4258
  ref: n,
4259
4259
  elementType: Ao,
4260
4260
  externalForwardedProps: {
4261
- ...R,
4261
+ ...te,
4262
4262
  ...E,
4263
4263
  component: d
4264
4264
  },
4265
4265
  getSlotProps: O,
4266
4266
  ownerState: F,
4267
4267
  className: V(a, I?.root, !F.open && F.exited && I?.hidden)
4268
- }), [ne, re] = Pa("backdrop", {
4268
+ }), [re, z] = Pa("backdrop", {
4269
4269
  elementType: jo,
4270
- externalForwardedProps: R,
4270
+ externalForwardedProps: te,
4271
4271
  shouldForwardComponentProp: !0,
4272
4272
  getSlotProps: (e) => k({
4273
4273
  ...e,
@@ -4282,9 +4282,9 @@ var ko = (e) => {
4282
4282
  ref: j,
4283
4283
  container: M,
4284
4284
  disablePortal: m,
4285
- children: /*#__PURE__*/ l(z, {
4286
- ...te,
4287
- children: [_ ? null : /*#__PURE__*/ c(ne, { ...re }), /*#__PURE__*/ c(Be, {
4285
+ children: /*#__PURE__*/ l(R, {
4286
+ ...ne,
4287
+ children: [_ ? null : /*#__PURE__*/ c(re, { ...z }), /*#__PURE__*/ c(Be, {
4288
4288
  disableEnforceFocus: p,
4289
4289
  disableAutoFocus: f,
4290
4290
  disableRestoreFocus: h,
@@ -4333,96 +4333,130 @@ process.env.NODE_ENV !== "production" && (Mo.propTypes = {
4333
4333
  });
4334
4334
  //#endregion
4335
4335
  //#region src/state/machine.ts
4336
- var No = "idle", Po = "Image loaded", Fo = "Values defined", Io = "Image cropped", Lo = "X-axis started", Ro = "X-axis finished", zo = "Points defined", Bo = "Shape defined", Vo = "Trademark defined", Ho = "RESET", Uo = "LOAD_IMAGE", Wo = "ENTER_VALUES", Go = "CROP", Ko = "SKIP_CROP", qo = "UNDO_CROP", Jo = "START_X_AXIS", Yo = "FINISH_X_AXIS", Xo = "UNDO_X_AXIS", Zo = "ADD_POINT", Qo = "DEFINE_TRADEMARK", $o = "FINISH_POINTS", es = "define values", ts = E({
4337
- types: { context: {} },
4336
+ var No = "idle", Po = "Image loaded", Fo = "Values defined", Io = "Image cropped", Lo = "X-axis started", Ro = "X-axis finished", zo = "Points defined", Bo = "Shape defined", Vo = "Trademark defined", Ho = "Finished", Uo = "FINISH", Wo = "RESET", Go = "LOAD_IMAGE", Ko = "ENTER_VALUES", qo = "CROP", Jo = "SKIP_CROP", Yo = "UNDO_CROP", Xo = "START_X_AXIS", Zo = "FINISH_X_AXIS", Qo = "UNDO_X_AXIS", $o = "ADD_POINT", es = "UNDO_POINT", ts = "DEFINE_TRADEMARK", ns = "FINISH_POINTS", rs = "UNDO_SHAPE", is = "UNDO_TRADEMARK", as = "UNDO_FINISH", os = "define values", ss = E({
4337
+ types: {
4338
+ events: {},
4339
+ context: {}
4340
+ },
4338
4341
  actions: {
4339
4342
  "reset rotation angle": T({ rotationAngle: 0 }),
4340
4343
  "define rotation angle": T({ rotationAngle: ({ context: e, event: t }) => (t && t.type === "FINISH_X_AXIS" && (e.rotationAngle = t.rotationAngle), e.rotationAngle) }),
4341
- [es]: T({
4344
+ "define trademark": T({ trademark: () => ({
4345
+ x: 0,
4346
+ y: 0
4347
+ }) }),
4348
+ "clear trademark": T({ trademark: () => void 0 }),
4349
+ [os]: T({
4342
4350
  SL: ({ event: e }) => e.type === "ENTER_VALUES" ? e.SL : 0,
4343
4351
  SH: ({ event: e }) => e.type === "ENTER_VALUES" ? e.SH : 0,
4344
4352
  AZG: ({ event: e }) => e.type === "ENTER_VALUES" ? e.AZG : 0
4345
4353
  })
4346
- }
4354
+ },
4355
+ guards: { hasTrademark: ({ context: e }) => !!e.trademark }
4347
4356
  }).createMachine({
4348
4357
  id: "identify",
4349
4358
  context: { rotationAngle: 0 },
4350
4359
  initial: No,
4351
4360
  states: {
4352
- [No]: { on: { [Uo]: Po } },
4361
+ [No]: { on: { [Go]: Po } },
4353
4362
  [Po]: { on: {
4354
- [Ho]: No,
4355
- [Wo]: {
4356
- actions: [{ type: es }],
4363
+ [Wo]: No,
4364
+ [Ko]: {
4365
+ actions: [{ type: os }],
4357
4366
  target: Fo
4358
4367
  }
4359
4368
  } },
4360
4369
  [Fo]: { on: {
4361
- [Ho]: No,
4362
- [Go]: Io,
4363
- [Ko]: Io
4370
+ [Wo]: No,
4371
+ [qo]: Io,
4372
+ [Jo]: Io
4364
4373
  } },
4365
4374
  [Io]: { on: {
4366
- [Ho]: No,
4367
- [qo]: Po,
4368
- [Jo]: Lo
4375
+ [Wo]: No,
4376
+ [Yo]: Po,
4377
+ [Xo]: Lo
4369
4378
  } },
4370
4379
  [Lo]: { on: {
4371
- [Ho]: No,
4372
- [Xo]: Io,
4373
- [Yo]: {
4380
+ [Wo]: No,
4381
+ [Qo]: Io,
4382
+ [Zo]: {
4374
4383
  actions: [{ type: "define rotation angle" }],
4375
4384
  target: Ro
4376
4385
  }
4377
4386
  } },
4378
4387
  [Ro]: { on: {
4379
- [Ho]: No,
4380
- [Xo]: {
4388
+ [Wo]: No,
4389
+ [Qo]: {
4381
4390
  actions: [{ type: "reset rotation angle" }],
4382
4391
  target: Lo
4383
4392
  },
4384
- [Zo]: zo
4393
+ [$o]: zo
4385
4394
  } },
4386
4395
  [zo]: { on: {
4387
- [Zo]: zo,
4388
- [Ho]: No,
4389
- [$o]: Bo
4396
+ [$o]: zo,
4397
+ [es]: Ro,
4398
+ [Wo]: No,
4399
+ [ns]: Bo
4390
4400
  } },
4391
4401
  [Bo]: { on: {
4392
- [Ho]: No,
4393
- [Qo]: Vo
4402
+ [Wo]: No,
4403
+ [rs]: zo,
4404
+ [ts]: {
4405
+ actions: [{ type: "define trademark" }],
4406
+ target: Vo
4407
+ },
4408
+ [Uo]: Ho
4409
+ } },
4410
+ [Vo]: { on: {
4411
+ [is]: {
4412
+ actions: [{ type: "clear trademark" }],
4413
+ target: zo
4414
+ },
4415
+ [Uo]: Ho
4394
4416
  } },
4395
- [Vo]: { on: { [Ho]: No } }
4417
+ [Ho]: { on: {
4418
+ [as]: [{
4419
+ target: Vo,
4420
+ guard: "hasTrademark"
4421
+ }, { target: Bo }],
4422
+ [Wo]: No
4423
+ } }
4396
4424
  }
4397
4425
  });
4398
4426
  //#endregion
4399
4427
  //#region src/MachineState.tsx
4400
- function ns(e) {
4428
+ function cs(e) {
4401
4429
  let { t } = h(), n, r = e.actor.getSnapshot();
4402
4430
  switch (r.value) {
4403
4431
  case No:
4404
- n = t("main.identify.startProcess", { defaultValue: "Please load an image to start the process" });
4432
+ n = t("main.identify.help.startProcess", { defaultValue: "Please load an image to start the process" });
4405
4433
  break;
4406
4434
  case Po:
4407
- n = t("main.identify.defineValues", { defaultValue: "Please define SL, SH, AZG values and click \"Submit\"" });
4435
+ n = t("main.identify.help.defineValues", { defaultValue: "Please define SL, SH, AZG values and click \"Submit\"" });
4408
4436
  break;
4409
4437
  case Fo:
4410
- n = t("main.identify.cropImage", { defaultValue: "Please crop the image by clicking and dragging the mouse" });
4438
+ n = t("main.identify.help.cropImage", { defaultValue: "Please crop the image by clicking and dragging the mouse" });
4411
4439
  break;
4412
4440
  case Io:
4413
- n = t("main.identify.defineHorizontalLine", { defaultValue: "Please define a horizontal line (point 1)" });
4441
+ n = t("main.identify.help.defineHorizontalLine", { defaultValue: "Please define a horizontal line (point 1)" });
4414
4442
  break;
4415
4443
  case Lo:
4416
- n = t("main.identify.finishHorizontalLine", { defaultValue: "Please define a horizontal line (point 2))" });
4444
+ n = t("main.identify.help.finishHorizontalLine", { defaultValue: "Please define a horizontal line (point 2))" });
4417
4445
  break;
4418
4446
  case Ro:
4419
- n = t("main.identify.addPoints", { defaultValue: "Please mark some points to define the frame contour" });
4447
+ n = t("main.identify.help.addPoints", { defaultValue: "Please mark some points to define the frame contour" });
4420
4448
  break;
4421
4449
  case zo:
4422
- n = t("main.identify.clickDone", { defaultValue: "Please click \"Done\" to finish the process" });
4450
+ n = t("main.identify.help.clickDone", { defaultValue: "Please click \"Done\" to finish the process" });
4423
4451
  break;
4424
4452
  case Bo:
4425
- n = t("main.identify.finish", { defaultValue: "Please define a trademark" });
4453
+ n = t("main.identify.help.defineTrademark", { defaultValue: "Please define a trademark" });
4454
+ break;
4455
+ case Vo:
4456
+ n = t("main.identify.help.trademarkDefined", { defaultValue: "trademark is now defined" });
4457
+ break;
4458
+ case Ho:
4459
+ n = t("main.identify.help.finished", { defaultValue: "The process is finished" });
4426
4460
  break;
4427
4461
  default: n = t("main.identify.unknownState", {
4428
4462
  defaultValue: "unknown state: {{value}}",
@@ -4450,7 +4484,7 @@ function ns(e) {
4450
4484
  }
4451
4485
  //#endregion
4452
4486
  //#region node_modules/frame.theme/dist/frame.theme.js
4453
- function rs(e) {
4487
+ function ls(e) {
4454
4488
  let t = w(), [n, i] = o(""), s = a(null), { t: l } = h(), u = (e, t, n) => {
4455
4489
  let r = parseFloat(e);
4456
4490
  i(isNaN(r) ? l("main.identify.error.validNumber", { field: t }) : r < 0 ? l("main.identify.error.positive", { field: t }) : r === 0 ? l("main.identify.error.notNull", { field: t }) : n !== void 0 && r > n ? l("main.identify.error.notGreaterThan", {
@@ -4511,7 +4545,7 @@ function rs(e) {
4511
4545
  }
4512
4546
  //#endregion
4513
4547
  //#region src/EnterValues.tsx
4514
- function is(e) {
4548
+ function us(e) {
4515
4549
  let [t, n] = o(e.testMode ? "50" : ""), [r, i] = o(e.testMode ? "44" : ""), [a, u] = o(e.testMode ? "15" : ""), d = D(e.actor, (e) => e), f = (e, t, n, r) => {
4516
4550
  let i = parseFloat(t);
4517
4551
  n(isNaN(i) ? v("main.identify.error.validNumber", { field: e }) : i <= 0 ? v("main.identify.error.positive", { field: e }) : i > r ? v("main.identify.error.notGreaterThan", {
@@ -4525,12 +4559,14 @@ function is(e) {
4525
4559
  }, p = {
4526
4560
  textTransform: "none",
4527
4561
  width: "calc(100% - 100px)",
4562
+ marginTop: "30px",
4563
+ marginBottom: "30px",
4528
4564
  marginLeft: "50px",
4529
4565
  marginRight: "50px"
4530
4566
  };
4531
4567
  function m(t, n, r) {
4532
4568
  e.actor.send({
4533
- type: Wo,
4569
+ type: Ko,
4534
4570
  SL: Number(t),
4535
4571
  SH: Number(n),
4536
4572
  AZG: Number(r)
@@ -4554,7 +4590,7 @@ function is(e) {
4554
4590
  gap: 2
4555
4591
  },
4556
4592
  children: [
4557
- /* @__PURE__ */ c(rs, {
4593
+ /* @__PURE__ */ c(ls, {
4558
4594
  value: t,
4559
4595
  onChange: n,
4560
4596
  checkValue: (e, t) => f("SL", e, t, 80),
@@ -4562,14 +4598,14 @@ function is(e) {
4562
4598
  dataTestid: "scheibenlaenge-input",
4563
4599
  autofocus: !0
4564
4600
  }),
4565
- /* @__PURE__ */ c(rs, {
4601
+ /* @__PURE__ */ c(ls, {
4566
4602
  value: r,
4567
4603
  checkValue: (e, t) => f("SH", e, t, 60),
4568
4604
  onChange: i,
4569
4605
  label: v("main.identify.label.scheibenhoehe", { defaultValue: "box height" }),
4570
4606
  dataTestid: "scheibenhoehe-input"
4571
4607
  }),
4572
- /* @__PURE__ */ c(rs, {
4608
+ /* @__PURE__ */ c(ls, {
4573
4609
  value: a,
4574
4610
  checkValue: (e, t) => f("AzG", e, t, 40),
4575
4611
  onChange: u,
@@ -4591,85 +4627,122 @@ function is(e) {
4591
4627
  }
4592
4628
  //#endregion
4593
4629
  //#region src/ModalImageLoaded.tsx
4594
- function as(e) {
4595
- let t = a(null), n = a(null), i = a(null), [s, u] = o(!1), d = a(null), [f, p] = o(null), [m, v] = o(0), b = w(), { t: x } = h(), S = D(e.actor, (e) => e), C = e.actor.getSnapshot();
4596
- r(() => {}, [e.actor]);
4597
- function T(r) {
4598
- let i = new Image();
4599
- i.onload = () => {
4600
- let e = t.current;
4601
- e && (e.width = i.naturalWidth, e.height = i.naturalHeight, e.getContext("2d")?.drawImage(i, 0, 0), n.current = i);
4602
- }, i.src = r, e.actor.send({ type: Uo });
4603
- }
4604
- function E(e) {
4630
+ function ds(e) {
4631
+ let t = "ModalImageLoaded", i = a(null), s = a(null), u = a(null), [d, f] = o(!1), p = a(null), [m, v] = o(null), [b, x] = o(0), [S, C] = o(!1);
4632
+ w();
4633
+ let { t: T } = h(), E = D(e.actor, (e) => e), O = e.actor.getSnapshot(), k = n((t) => {
4634
+ let n = new Image();
4635
+ n.onload = () => {
4636
+ let e = i.current;
4637
+ e && (e.width = n.naturalWidth, e.height = n.naturalHeight, e.getContext("2d")?.drawImage(n, 0, 0), s.current = n);
4638
+ }, n.src = t, e.actor.send({ type: Go });
4639
+ }, [e.actor]);
4640
+ r(() => {}, [e.actor]), r(() => {
4641
+ if (!e.modalIsOpen || O.value !== "idle") return;
4642
+ let t = !1;
4643
+ async function n() {
4644
+ if (!navigator.clipboard?.read) {
4645
+ t || C(!1);
4646
+ return;
4647
+ }
4648
+ try {
4649
+ let e = await navigator.clipboard.read(), n = e.flatMap((e) => e.types).find((e) => e.startsWith("image/"));
4650
+ if (!n || t) {
4651
+ t || C(!1);
4652
+ return;
4653
+ }
4654
+ let r = await e.find((e) => e.types.includes(n))?.getType(n);
4655
+ if (!r || t) {
4656
+ t || C(!1);
4657
+ return;
4658
+ }
4659
+ let i = new FileReader();
4660
+ i.onload = () => {
4661
+ t || (C(!0), k(String(i.result)));
4662
+ }, i.onerror = () => {
4663
+ t || C(!1);
4664
+ }, i.readAsDataURL(r);
4665
+ } catch {
4666
+ t || C(!1);
4667
+ }
4668
+ }
4669
+ return n(), () => {
4670
+ t = !0;
4671
+ };
4672
+ }, [
4673
+ k,
4674
+ e.modalIsOpen,
4675
+ O.value
4676
+ ]);
4677
+ function A(e) {
4605
4678
  let t = e.target.files?.[0];
4606
4679
  if (!t) return;
4607
4680
  let n = new FileReader();
4608
- n.onload = () => T(n.result), n.readAsDataURL(t), e.target.value = "";
4681
+ n.onload = () => k(n.result), n.readAsDataURL(t), e.target.value = "";
4609
4682
  }
4610
- function O(e, t) {
4683
+ function j(e, t) {
4611
4684
  let n = e.getBoundingClientRect();
4612
4685
  return {
4613
4686
  x: (t.clientX - n.left) * (e.width / n.width),
4614
4687
  y: (t.clientY - n.top) * (e.height / n.height)
4615
4688
  };
4616
4689
  }
4617
- function k(e, r) {
4618
- let i = t.current, a = n.current;
4619
- if (!i || !a) return;
4620
- let o = i.getContext("2d");
4621
- o && (o.drawImage(a, 0, 0), e && (o.strokeStyle = "red", o.lineWidth = 4, o.setLineDash([6, 3]), o.strokeRect(e.x, e.y, e.w, e.h)), r && (o.setLineDash([]), o.strokeStyle = "rgba(0,0,0,0.6)", o.lineWidth = 1, o.beginPath(), o.moveTo(r.x, 0), o.lineTo(r.x, i.height), o.moveTo(0, r.y), o.lineTo(i.width, r.y), o.stroke()));
4622
- }
4623
- function A(e) {
4624
- let r = t.current;
4625
- !r || !n.current || C.value !== "Values defined" || (p(null), d.current = O(r, e));
4626
- }
4627
- function j(e) {
4628
- let r = t.current;
4629
- if (!r || !n.current) return;
4630
- let { x: i, y: a } = O(r, e), o = d.current ? {
4631
- x: d.current.x,
4632
- y: d.current.y,
4633
- w: i - d.current.x,
4634
- h: a - d.current.y
4690
+ function M(e, t) {
4691
+ let n = i.current, r = s.current;
4692
+ if (!n || !r) return;
4693
+ let a = n.getContext("2d");
4694
+ a && (a.drawImage(r, 0, 0), e && (a.strokeStyle = "red", a.lineWidth = 4, a.setLineDash([6, 3]), a.strokeRect(e.x, e.y, e.w, e.h)), t && (a.setLineDash([]), a.strokeStyle = "rgba(0,0,0,0.6)", a.lineWidth = 1, a.beginPath(), a.moveTo(t.x, 0), a.lineTo(t.x, n.height), a.moveTo(0, t.y), a.lineTo(n.width, t.y), a.stroke()));
4695
+ }
4696
+ function N(e) {
4697
+ let t = i.current;
4698
+ !t || !s.current || O.value !== "Values defined" || (v(null), p.current = j(t, e));
4699
+ }
4700
+ function P(e) {
4701
+ let t = i.current;
4702
+ if (!t || !s.current) return;
4703
+ let { x: n, y: r } = j(t, e), a = p.current ? {
4704
+ x: p.current.x,
4705
+ y: p.current.y,
4706
+ w: n - p.current.x,
4707
+ h: r - p.current.y
4635
4708
  } : void 0;
4636
- S.value === "Values defined" ? k(o, {
4637
- x: i,
4638
- y: a
4639
- }) : k(o);
4640
- }
4641
- function M(e) {
4642
- let n = t.current;
4643
- if (!n || !d.current) return;
4644
- let r = O(n, e), { x: i, y: a } = d.current;
4645
- d.current = null;
4646
- let o = Math.min(i, r.x), s = Math.min(a, r.y), c = Math.abs(r.x - i), l = Math.abs(r.y - a);
4647
- k(), !(c < 2 || l < 2) && ee(c, l, o, s, Go);
4648
- }
4649
- function N() {
4650
- k();
4651
- }
4652
- function P() {
4653
- e.actor.send({ type: Ho });
4654
- let t = C.context.SL ?? 0, n = C.context.SH ?? 0, r = C.context.AZG ?? 0;
4655
- e.onAfterCloseModal(t, n, r, 0, [], [])();
4656
- }
4657
- function ee(t, r, i, a, o) {
4658
- let s = document.createElement("canvas");
4659
- s.width = t * 2, s.height = r * 2, s.getContext("2d")?.drawImage(n.current, i, a, t, r, 0, 0, t * 2, r * 2);
4660
- let c = n.current.src;
4661
- p(s.toDataURL()), v((e) => e + 1), u(!0), e.onAfterCropImage?.(c, C.context.SL ?? 0, C.context.SH ?? 0, C.context.AZG ?? 0, i, a, t, r), e.actor.send({ type: o });
4709
+ E.value === "Values defined" ? M(a, {
4710
+ x: n,
4711
+ y: r
4712
+ }) : M(a);
4713
+ }
4714
+ function ee(e) {
4715
+ let t = i.current;
4716
+ if (!t || !p.current) return;
4717
+ let n = j(t, e), { x: r, y: a } = p.current;
4718
+ p.current = null;
4719
+ let o = Math.min(r, n.x), s = Math.min(a, n.y), c = Math.abs(n.x - r), l = Math.abs(n.y - a);
4720
+ M(), !(c < 2 || l < 2) && L(c, l, o, s, qo);
4721
+ }
4722
+ function F() {
4723
+ M();
4724
+ }
4725
+ function I() {
4726
+ e.actor.send({ type: Wo });
4727
+ let t = O.context.SL ?? 0, n = O.context.SH ?? 0, r = O.context.AZG ?? 0;
4728
+ e.onAfterCloseModal(t, n, r, 0, [], [], O.context.trademark)();
4729
+ }
4730
+ function L(t, n, r, i, a) {
4731
+ let o = document.createElement("canvas");
4732
+ o.width = t * 2, o.height = n * 2, o.getContext("2d")?.drawImage(s.current, r, i, t, n, 0, 0, t * 2, n * 2);
4733
+ let c = s.current.src;
4734
+ v(o.toDataURL()), x((e) => e + 1), f(!0), e.onAfterCropImage?.(c, O.context.SL ?? 0, O.context.SH ?? 0, O.context.AZG ?? 0, r, i, t, n), e.actor.send({ type: a });
4662
4735
  }
4663
4736
  return /* @__PURE__ */ c(Mo, {
4664
4737
  keepMounted: !0,
4665
- "data-testid": "ModalImageLoaded.Modal",
4738
+ "data-testid": `${t}.Modal`,
4666
4739
  sx: {
4667
4740
  display: "flex",
4668
4741
  justifyContent: "center",
4669
4742
  alignItems: "center"
4670
4743
  },
4671
4744
  open: e.modalIsOpen,
4672
- onClose: e.onAfterCloseModal(C.context.SL ?? 0, C.context.SH ?? 0, C.context.AZG ?? 0, 0, [], [], void 0),
4745
+ onClose: e.onAfterCloseModal(O.context.SL ?? 0, O.context.SH ?? 0, O.context.AZG ?? 0, 0, [], [], O.context.trademark),
4673
4746
  children: /* @__PURE__ */ l(y, {
4674
4747
  elevation: 1,
4675
4748
  sx: {
@@ -4678,28 +4751,28 @@ function as(e) {
4678
4751
  borderRight: 1,
4679
4752
  borderColor: "divider",
4680
4753
  borderRadius: 0,
4681
- backgroundColor: b.palette.primary.light
4754
+ backgroundColor: "lightgrey"
4682
4755
  },
4683
4756
  children: [
4684
- f && /* @__PURE__ */ c(Rc, {
4757
+ m && /* @__PURE__ */ c(Kc, {
4685
4758
  actor: e.actor,
4686
- dataUrl: f,
4687
- modalIsOpen: s,
4759
+ dataUrl: m,
4760
+ modalIsOpen: d,
4688
4761
  onCloseModal: (t, n, r, i) => () => {
4689
- let a = C.context.SL ?? 0, o = C.context.SH ?? 0, s = C.context.AZG ?? 0;
4690
- e.onAfterCloseModal(a, o, s, t, n, r, i)(), u(!1);
4762
+ let a = O.context.SL ?? 0, o = O.context.SH ?? 0, s = O.context.AZG ?? 0;
4763
+ e.onAfterCloseModal(a, o, s, t, n, r, i)(), f(!1);
4691
4764
  },
4692
4765
  testMode: e.testMode
4693
- }, m),
4694
- /* @__PURE__ */ c(ns, {
4766
+ }, b),
4767
+ /* @__PURE__ */ c(cs, {
4695
4768
  actor: e.actor,
4696
4769
  testMode: e.testMode
4697
4770
  }),
4698
- C.value === "Image loaded" && /* @__PURE__ */ c(is, {
4771
+ O.value === "Image loaded" && /* @__PURE__ */ c(us, {
4699
4772
  actor: e.actor,
4700
4773
  testMode: e.testMode
4701
4774
  }),
4702
- C.value !== "idle" && /* @__PURE__ */ c("div", {
4775
+ O.value !== "idle" && /* @__PURE__ */ c("div", {
4703
4776
  style: {
4704
4777
  background: "#fff",
4705
4778
  borderRadius: 8,
@@ -4709,18 +4782,18 @@ function as(e) {
4709
4782
  gap: 12
4710
4783
  },
4711
4784
  children: /* @__PURE__ */ c("canvas", {
4712
- ref: t,
4785
+ ref: i,
4713
4786
  style: {
4714
4787
  display: "block",
4715
4788
  border: "1px solid #ccc",
4716
4789
  maxWidth: "80vw",
4717
4790
  maxHeight: "70vh",
4718
- cursor: C.value === "Values defined" ? "none" : "not-allowed"
4791
+ cursor: O.value === "Values defined" ? "none" : "not-allowed"
4719
4792
  },
4720
- onMouseDown: A,
4721
- onMouseMove: j,
4722
- onMouseUp: M,
4723
- onMouseLeave: N
4793
+ onMouseDown: N,
4794
+ onMouseMove: P,
4795
+ onMouseUp: ee,
4796
+ onMouseLeave: F
4724
4797
  })
4725
4798
  }),
4726
4799
  /* @__PURE__ */ c("div", {
@@ -4731,24 +4804,27 @@ function as(e) {
4731
4804
  gap: 8,
4732
4805
  margin: "10px"
4733
4806
  },
4734
- children: [C.value === "idle" && /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("input", {
4735
- ref: i,
4807
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("input", {
4808
+ ref: u,
4736
4809
  type: "file",
4737
4810
  accept: "image/*",
4738
4811
  style: { display: "none" },
4739
- onChange: E
4812
+ onChange: A
4740
4813
  }), /* @__PURE__ */ c(_, {
4814
+ "data-testid": `${t}.button.loadImage`,
4741
4815
  color: "secondary",
4742
4816
  variant: "contained",
4743
4817
  size: "small",
4744
- onClick: () => i.current?.click(),
4745
- children: x("main.identify.button.loadImage", { defaultValue: "Load Image" })
4818
+ onClick: () => {
4819
+ u.current?.click();
4820
+ },
4821
+ children: T("main.identify.button.loadImage", { defaultValue: "Load Image" })
4746
4822
  })] }), /* @__PURE__ */ c(_, {
4747
4823
  color: "secondary",
4748
4824
  variant: "contained",
4749
4825
  size: "small",
4750
- onClick: P,
4751
- children: x("main.identify.button.close", { defaultValue: "Close" })
4826
+ onClick: I,
4827
+ children: T("main.identify.button.close", { defaultValue: "Close" })
4752
4828
  })]
4753
4829
  })
4754
4830
  })
@@ -4758,23 +4834,23 @@ function as(e) {
4758
4834
  }
4759
4835
  //#endregion
4760
4836
  //#region node_modules/@mui/material/utils/capitalize.mjs
4761
- var os = tt, ss = Vr, cs = xo, ls = H.default.oneOfType([H.default.func, H.default.object]);
4837
+ var fs = tt, ps = Vr, ms = xo, hs = H.default.oneOfType([H.default.func, H.default.object]);
4762
4838
  //#endregion
4763
4839
  //#region node_modules/@mui/utils/elementTypeAcceptingRef/elementTypeAcceptingRef.mjs
4764
- function us(e) {
4840
+ function gs(e) {
4765
4841
  let { prototype: t = {} } = e;
4766
4842
  return !!t.isReactComponent;
4767
4843
  }
4768
- function ds(t, n, r, i, a) {
4844
+ function _s(t, n, r, i, a) {
4769
4845
  let o = t[n], s = a || n;
4770
4846
  if (o == null || typeof window > "u") return null;
4771
4847
  let c;
4772
- return typeof o == "function" && !us(o) && (c = "Did you accidentally provide a plain function component instead?"), o === e.Fragment && (c = "Did you accidentally provide a React.Fragment instead?"), c === void 0 ? null : /* @__PURE__ */ Error(`Invalid ${i} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`);
4848
+ return typeof o == "function" && !gs(o) && (c = "Did you accidentally provide a plain function component instead?"), o === e.Fragment && (c = "Did you accidentally provide a React.Fragment instead?"), c === void 0 ? null : /* @__PURE__ */ Error(`Invalid ${i} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`);
4773
4849
  }
4774
- var fs = ye(H.default.elementType, ds);
4850
+ var vs = ye(H.default.elementType, _s);
4775
4851
  //#endregion
4776
4852
  //#region node_modules/@mui/utils/isFocusVisible/isFocusVisible.mjs
4777
- function ps(e) {
4853
+ function ys(e) {
4778
4854
  try {
4779
4855
  return e.matches(":focus-visible");
4780
4856
  } catch {
@@ -4784,7 +4860,7 @@ function ps(e) {
4784
4860
  }
4785
4861
  //#endregion
4786
4862
  //#region node_modules/@mui/material/utils/useFocusableWhenDisabled.mjs
4787
- function ms(t) {
4863
+ function bs(t) {
4788
4864
  let { focusableWhenDisabled: n, disabled: r, composite: i = !1, tabIndex: a = 0, isNativeButton: o } = t, s = i && n !== !1, c = i && n === !1;
4789
4865
  return e.useMemo(() => {
4790
4866
  let e = { onKeyDown(e) {
@@ -4803,9 +4879,9 @@ function ms(t) {
4803
4879
  }
4804
4880
  //#endregion
4805
4881
  //#region node_modules/@mui/material/ButtonBase/useButtonBase.mjs
4806
- var hs = {};
4807
- function gs(t) {
4808
- let { nativeButton: n, nativeButtonProp: r, internalNativeButton: i = n, allowInferredHostMismatch: a = !1, disabled: o, type: s, hasFormAction: c = !1, tabIndex: l = 0, focusableWhenDisabled: u, stopEventPropagation: d = !1, onBeforeKeyDown: f, onBeforeKeyUp: p } = t, m = e.useRef(null), h = u === !0, g = ms({
4882
+ var xs = {};
4883
+ function Ss(t) {
4884
+ let { nativeButton: n, nativeButtonProp: r, internalNativeButton: i = n, allowInferredHostMismatch: a = !1, disabled: o, type: s, hasFormAction: c = !1, tabIndex: l = 0, focusableWhenDisabled: u, stopEventPropagation: d = !1, onBeforeKeyDown: f, onBeforeKeyUp: p } = t, m = e.useRef(null), h = u === !0, g = bs({
4809
4885
  focusableWhenDisabled: h,
4810
4886
  disabled: o,
4811
4887
  isNativeButton: n,
@@ -4844,7 +4920,7 @@ function gs(t) {
4844
4920
  s
4845
4921
  ]);
4846
4922
  return {
4847
- getButtonProps: e.useCallback((e = hs) => {
4923
+ getButtonProps: e.useCallback((e = xs) => {
4848
4924
  let { onClick: t, onKeyDown: n, onKeyUp: r, ...i } = e, a = (e) => {
4849
4925
  if (d && e.stopPropagation(), o) {
4850
4926
  e.preventDefault();
@@ -4884,36 +4960,36 @@ function gs(t) {
4884
4960
  }
4885
4961
  //#endregion
4886
4962
  //#region \0@oxc-project+runtime@0.146.0/helpers/esm/typeof.js
4887
- function _s(e) {
4963
+ function Cs(e) {
4888
4964
  "@babel/helpers - typeof";
4889
- return _s = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
4965
+ return Cs = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
4890
4966
  return typeof e;
4891
4967
  } : function(e) {
4892
4968
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
4893
- }, _s(e);
4969
+ }, Cs(e);
4894
4970
  }
4895
4971
  //#endregion
4896
4972
  //#region \0@oxc-project+runtime@0.146.0/helpers/esm/toPrimitive.js
4897
- function vs(e, t) {
4898
- if (_s(e) != "object" || !e) return e;
4973
+ function ws(e, t) {
4974
+ if (Cs(e) != "object" || !e) return e;
4899
4975
  var n = e[Symbol.toPrimitive];
4900
4976
  if (n !== void 0) {
4901
4977
  var r = n.call(e, t || "default");
4902
- if (_s(r) != "object") return r;
4978
+ if (Cs(r) != "object") return r;
4903
4979
  throw TypeError("@@toPrimitive must return a primitive value.");
4904
4980
  }
4905
4981
  return (t === "string" ? String : Number)(e);
4906
4982
  }
4907
4983
  //#endregion
4908
4984
  //#region \0@oxc-project+runtime@0.146.0/helpers/esm/toPropertyKey.js
4909
- function ys(e) {
4910
- var t = vs(e, "string");
4911
- return _s(t) == "symbol" ? t : t + "";
4985
+ function Ts(e) {
4986
+ var t = ws(e, "string");
4987
+ return Cs(t) == "symbol" ? t : t + "";
4912
4988
  }
4913
4989
  //#endregion
4914
4990
  //#region \0@oxc-project+runtime@0.146.0/helpers/esm/defineProperty.js
4915
- function bs(e, t, n) {
4916
- return (t = ys(t)) in e ? Object.defineProperty(e, t, {
4991
+ function Es(e, t, n) {
4992
+ return (t = Ts(t)) in e ? Object.defineProperty(e, t, {
4917
4993
  value: n,
4918
4994
  enumerable: !0,
4919
4995
  configurable: !0,
@@ -4922,7 +4998,7 @@ function bs(e, t, n) {
4922
4998
  }
4923
4999
  //#endregion
4924
5000
  //#region node_modules/@mui/material/useLazyRipple/useLazyRipple.mjs
4925
- var xs = class t {
5001
+ var Ds = class t {
4926
5002
  static create() {
4927
5003
  return new t();
4928
5004
  }
@@ -4931,12 +5007,12 @@ var xs = class t {
4931
5007
  return n.shouldMount = r, n.setShouldMount = i, e.useEffect(n.mountEffect, [r]), n;
4932
5008
  }
4933
5009
  constructor() {
4934
- bs(this, "mountEffect", () => {
5010
+ Es(this, "mountEffect", () => {
4935
5011
  this.shouldMount && !this.didMount && this.ref.current !== null && (this.didMount = !0, this.mounted.resolve());
4936
5012
  }), this.ref = { current: null }, this.mounted = null, this.didMount = !1, this.shouldMount = !1, this.setShouldMount = null;
4937
5013
  }
4938
5014
  mount() {
4939
- return this.mounted || (this.mounted = Cs(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
5015
+ return this.mounted || (this.mounted = ks(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
4940
5016
  }
4941
5017
  start(...e) {
4942
5018
  this.mount().then(() => this.ref.current?.start(...e));
@@ -4948,10 +5024,10 @@ var xs = class t {
4948
5024
  this.mount().then(() => this.ref.current?.pulsate(...e));
4949
5025
  }
4950
5026
  };
4951
- function Ss() {
4952
- return xs.use();
5027
+ function Os() {
5028
+ return Ds.use();
4953
5029
  }
4954
- function Cs() {
5030
+ function ks() {
4955
5031
  let e, t, n = new Promise((n, r) => {
4956
5032
  e = n, t = r;
4957
5033
  });
@@ -4959,17 +5035,17 @@ function Cs() {
4959
5035
  }
4960
5036
  //#endregion
4961
5037
  //#region node_modules/@mui/utils/useOnMount/useOnMount.mjs
4962
- var ws = [];
4963
- function Ts(t) {
4964
- e.useEffect(t, ws);
5038
+ var As = [];
5039
+ function js(t) {
5040
+ e.useEffect(t, As);
4965
5041
  }
4966
5042
  //#endregion
4967
5043
  //#region node_modules/@mui/utils/useTimeout/useTimeout.mjs
4968
- var Es = class e {
5044
+ var Ms = class e {
4969
5045
  constructor() {
4970
- bs(this, "currentId", null), bs(this, "clear", () => {
5046
+ Es(this, "currentId", null), Es(this, "clear", () => {
4971
5047
  this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
4972
- }), bs(this, "disposeEffect", () => this.clear);
5048
+ }), Es(this, "disposeEffect", () => this.clear);
4973
5049
  }
4974
5050
  static create() {
4975
5051
  return new e();
@@ -4980,14 +5056,14 @@ var Es = class e {
4980
5056
  }, e);
4981
5057
  }
4982
5058
  };
4983
- function Ds() {
4984
- let e = Ia(Es.create).current;
4985
- return Ts(e.disposeEffect), e;
5059
+ function Ns() {
5060
+ let e = Ia(Ms.create).current;
5061
+ return js(e.disposeEffect), e;
4986
5062
  }
4987
5063
  //#endregion
4988
5064
  //#region node_modules/@mui/material/ButtonBase/Ripple.mjs
4989
- function Os(t) {
4990
- let { className: n, classes: r, pulsate: i = !1, rippleX: a, rippleY: o, rippleSize: s, in: l, onExited: u, timeout: d } = t, [f, p] = e.useState(!1), m = Ds(), h = e.useRef(!1), g = e.useRef(u);
5065
+ function Ps(t) {
5066
+ let { className: n, classes: r, pulsate: i = !1, rippleX: a, rippleY: o, rippleSize: s, in: l, onExited: u, timeout: d } = t, [f, p] = e.useState(!1), m = Ns(), h = e.useRef(!1), g = e.useRef(u);
4991
5067
  g.current = u;
4992
5068
  let _ = u != null, v = V(n, r.ripple, r.rippleVisible, i && r.ripplePulsate), y = {
4993
5069
  width: s,
@@ -5010,7 +5086,7 @@ function Os(t) {
5010
5086
  children: /*#__PURE__*/ c("span", { className: b })
5011
5087
  });
5012
5088
  }
5013
- process.env.NODE_ENV !== "production" && (Os.propTypes = {
5089
+ process.env.NODE_ENV !== "production" && (Ps.propTypes = {
5014
5090
  classes: H.default.object.isRequired,
5015
5091
  className: H.default.string,
5016
5092
  in: H.default.bool,
@@ -5031,8 +5107,8 @@ var $ = tr("MuiTouchRipple", [
5031
5107
  "child",
5032
5108
  "childLeaving",
5033
5109
  "childPulsate"
5034
- ]), ks = 550, As = {}, js = [], Ms = () => {};
5035
- function Ns(e, t) {
5110
+ ]), Fs = 550, Is = {}, Ls = [], Rs = () => {};
5111
+ function zs(e, t) {
5036
5112
  let n = new Set(t), r = /* @__PURE__ */ new Map(), i = [];
5037
5113
  for (let t of e) n.has(t) ? i.length > 0 && (r.set(t, i), i = []) : i.push(t);
5038
5114
  let a = [];
@@ -5042,7 +5118,7 @@ function Ns(e, t) {
5042
5118
  }
5043
5119
  return a.push(...i), a;
5044
5120
  }
5045
- function Ps({ event: e, element: t, center: n }) {
5121
+ function Bs({ event: e, element: t, center: n }) {
5046
5122
  let r = t ? t.getBoundingClientRect() : {
5047
5123
  width: 0,
5048
5124
  height: 0,
@@ -5066,7 +5142,7 @@ function Ps({ event: e, element: t, center: n }) {
5066
5142
  rippleSize: o
5067
5143
  };
5068
5144
  }
5069
- var Fs = m`
5145
+ var Vs = m`
5070
5146
  0% {
5071
5147
  transform: scale(0);
5072
5148
  opacity: 0.1;
@@ -5076,7 +5152,7 @@ var Fs = m`
5076
5152
  transform: scale(1);
5077
5153
  opacity: 0.3;
5078
5154
  }
5079
- `, Is = m`
5155
+ `, Hs = m`
5080
5156
  0% {
5081
5157
  opacity: 1;
5082
5158
  }
@@ -5084,7 +5160,7 @@ var Fs = m`
5084
5160
  100% {
5085
5161
  opacity: 0;
5086
5162
  }
5087
- `, Ls = m`
5163
+ `, Us = m`
5088
5164
  0% {
5089
5165
  transform: scale(1);
5090
5166
  }
@@ -5097,12 +5173,12 @@ var Fs = m`
5097
5173
  transform: scale(1);
5098
5174
  }
5099
5175
  `;
5100
- function Rs(e) {
5176
+ function Ws(e) {
5101
5177
  if (e.motion.reducedMotion === "always") return null;
5102
5178
  let t = p`
5103
5179
  &.${$.rippleVisible} {
5104
- animation-name: ${Fs};
5105
- animation-duration: ${ks}ms;
5180
+ animation-name: ${Vs};
5181
+ animation-duration: ${Fs}ms;
5106
5182
  animation-timing-function: ${e.transitions.easing.easeInOut};
5107
5183
  }
5108
5184
 
@@ -5111,13 +5187,13 @@ function Rs(e) {
5111
5187
  }
5112
5188
 
5113
5189
  & .${$.childLeaving} {
5114
- animation-name: ${Is};
5115
- animation-duration: ${ks}ms;
5190
+ animation-name: ${Hs};
5191
+ animation-duration: ${Fs}ms;
5116
5192
  animation-timing-function: ${e.transitions.easing.easeInOut};
5117
5193
  }
5118
5194
 
5119
5195
  & .${$.childPulsate} {
5120
- animation-name: ${Ls};
5196
+ animation-name: ${Us};
5121
5197
  animation-duration: 2500ms;
5122
5198
  animation-timing-function: ${e.transitions.easing.easeInOut};
5123
5199
  animation-iteration-count: infinite;
@@ -5130,7 +5206,7 @@ function Rs(e) {
5130
5206
  }
5131
5207
  ` : t;
5132
5208
  }
5133
- var zs = Q("span", {
5209
+ var Gs = Q("span", {
5134
5210
  name: "MuiTouchRipple",
5135
5211
  slot: "Root"
5136
5212
  })({
@@ -5143,7 +5219,7 @@ var zs = Q("span", {
5143
5219
  bottom: 0,
5144
5220
  left: 0,
5145
5221
  borderRadius: "inherit"
5146
- }), Bs = Q(Os, {
5222
+ }), Ks = Q(Ps, {
5147
5223
  name: "MuiTouchRipple",
5148
5224
  slot: "Ripple"
5149
5225
  })`
@@ -5183,29 +5259,29 @@ var zs = Q("span", {
5183
5259
  top: 0;
5184
5260
  }
5185
5261
 
5186
- ${({ theme: e }) => Rs(e)}
5187
- `, Vs = /*#__PURE__*/ e.forwardRef(function(t, n) {
5262
+ ${({ theme: e }) => Ws(e)}
5263
+ `, qs = /*#__PURE__*/ e.forwardRef(function(t, n) {
5188
5264
  let r = Ea({
5189
5265
  props: t,
5190
5266
  name: "MuiTouchRipple"
5191
- }), i = fo(Sa().motion.reducedMotion, !1), { center: a = !1, classes: o = As, className: s, ...l } = r, [u, d] = e.useState({
5192
- items: js,
5193
- order: js
5267
+ }), i = fo(Sa().motion.reducedMotion, !1), { center: a = !1, classes: o = Is, className: s, ...l } = r, [u, d] = e.useState({
5268
+ items: Ls,
5269
+ order: Ls
5194
5270
  }), f = u.items, p = e.useRef(0), m = e.useRef(null), h = e.useRef(!1);
5195
- Ts(() => (h.current = !0, () => {
5271
+ js(() => (h.current = !0, () => {
5196
5272
  h.current = !1;
5197
5273
  })), e.useEffect(() => {
5198
5274
  m.current && (m.current(), m.current = null);
5199
5275
  }, [f]);
5200
- let g = e.useRef(!1), _ = Ds(), v = e.useRef(null), y = e.useRef(null), b = cs((e) => {
5276
+ let g = e.useRef(!1), _ = Ns(), v = e.useRef(null), y = e.useRef(null), b = ms((e) => {
5201
5277
  h.current && d((t) => {
5202
5278
  let n = t.items.filter((t) => t.key !== e);
5203
5279
  return {
5204
5280
  items: n,
5205
- order: Ns(t.order.filter((t) => t !== e), n.filter((e) => !e.exiting).map((e) => e.key))
5281
+ order: zs(t.order.filter((t) => t !== e), n.filter((e) => !e.exiting).map((e) => e.key))
5206
5282
  };
5207
5283
  });
5208
- }), x = cs((e) => {
5284
+ }), x = ms((e) => {
5209
5285
  let { pulsate: t, rippleX: n, rippleY: r, rippleSize: i, cb: a } = e, o = p.current;
5210
5286
  p.current += 1, d((e) => {
5211
5287
  let a = [...e.items, {
@@ -5218,17 +5294,17 @@ var zs = Q("span", {
5218
5294
  }];
5219
5295
  return {
5220
5296
  items: a,
5221
- order: Ns(e.order, a.filter((e) => !e.exiting).map((e) => e.key))
5297
+ order: zs(e.order, a.filter((e) => !e.exiting).map((e) => e.key))
5222
5298
  };
5223
5299
  }), m.current = a;
5224
- }), S = cs((e = As, t = As, n = Ms) => {
5300
+ }), S = ms((e = Is, t = Is, n = Rs) => {
5225
5301
  let { pulsate: r = !1, center: i = a || t.pulsate, fakeElement: o = !1 } = t;
5226
5302
  if (e?.type === "mousedown" && g.current) {
5227
5303
  g.current = !1;
5228
5304
  return;
5229
5305
  }
5230
5306
  e?.type === "touchstart" && (g.current = !0);
5231
- let { rippleX: s, rippleY: c, rippleSize: l } = Ps({
5307
+ let { rippleX: s, rippleY: c, rippleSize: l } = Bs({
5232
5308
  event: e,
5233
5309
  element: o ? null : y.current,
5234
5310
  center: i
@@ -5250,9 +5326,9 @@ var zs = Q("span", {
5250
5326
  rippleSize: l,
5251
5327
  cb: n
5252
5328
  });
5253
- }), C = cs(() => {
5254
- S(As, { pulsate: !0 });
5255
- }), w = cs((e, t) => {
5329
+ }), C = ms(() => {
5330
+ S(Is, { pulsate: !0 });
5331
+ }), w = ms((e, t) => {
5256
5332
  if (_.clear(), e?.type === "touchend" && v.current) {
5257
5333
  v.current(), v.current = null, _.start(0, () => {
5258
5334
  w(e, t);
@@ -5268,7 +5344,7 @@ var zs = Q("span", {
5268
5344
  exiting: !0
5269
5345
  }, {
5270
5346
  items: n,
5271
- order: Ns(e.order, n.filter((e) => !e.exiting).map((e) => e.key))
5347
+ order: zs(e.order, n.filter((e) => !e.exiting).map((e) => e.key))
5272
5348
  };
5273
5349
  }), m.current = t;
5274
5350
  });
@@ -5282,11 +5358,11 @@ var zs = Q("span", {
5282
5358
  w
5283
5359
  ]);
5284
5360
  let T = new Map(f.map((e) => [e.key, e])), E = u.order.map((e) => T.get(e)).filter(Boolean);
5285
- return /*#__PURE__*/ c(zs, {
5361
+ return /*#__PURE__*/ c(Gs, {
5286
5362
  className: V($.root, o.root, s),
5287
5363
  ref: y,
5288
5364
  ...l,
5289
- children: E.map((e) => /*#__PURE__*/ c(Bs, {
5365
+ children: E.map((e) => /*#__PURE__*/ c(Ks, {
5290
5366
  classes: {
5291
5367
  ripple: V(o.ripple, $.ripple),
5292
5368
  rippleVisible: V(o.rippleVisible, $.rippleVisible),
@@ -5295,7 +5371,7 @@ var zs = Q("span", {
5295
5371
  childLeaving: V(o.childLeaving, $.childLeaving),
5296
5372
  childPulsate: V(o.childPulsate, $.childPulsate)
5297
5373
  },
5298
- timeout: i.shouldReduceMotion ? 0 : ks,
5374
+ timeout: i.shouldReduceMotion ? 0 : Fs,
5299
5375
  pulsate: e.pulsate,
5300
5376
  rippleX: e.rippleX,
5301
5377
  rippleY: e.rippleY,
@@ -5305,28 +5381,28 @@ var zs = Q("span", {
5305
5381
  }, e.key))
5306
5382
  });
5307
5383
  });
5308
- process.env.NODE_ENV !== "production" && (Vs.propTypes = {
5384
+ process.env.NODE_ENV !== "production" && (qs.propTypes = {
5309
5385
  center: H.default.bool,
5310
5386
  classes: H.default.object,
5311
5387
  className: H.default.string
5312
5388
  });
5313
5389
  //#endregion
5314
5390
  //#region node_modules/@mui/material/ButtonBase/buttonBaseClasses.mjs
5315
- function Hs(e) {
5391
+ function Js(e) {
5316
5392
  return er("MuiButtonBase", e);
5317
5393
  }
5318
- var Us = tr("MuiButtonBase", [
5394
+ var Ys = tr("MuiButtonBase", [
5319
5395
  "root",
5320
5396
  "disabled",
5321
5397
  "focusVisible"
5322
- ]), Ws = (e) => {
5398
+ ]), Xs = (e) => {
5323
5399
  let { disabled: t, focusVisible: n, focusVisibleClassName: r, suppressFocusVisible: i, classes: a } = e, o = Ce({ root: [
5324
5400
  "root",
5325
5401
  t && "disabled",
5326
5402
  n && !i && "focusVisible"
5327
- ] }, Hs, a);
5403
+ ] }, Js, a);
5328
5404
  return n && !i && r && (o.root += ` ${r}`), o;
5329
- }, Gs = Q("button", {
5405
+ }, Zs = Q("button", {
5330
5406
  name: "MuiButtonBase",
5331
5407
  slot: "Root"
5332
5408
  })(Ta(({ theme: e }) => ({
@@ -5350,7 +5426,7 @@ var Us = tr("MuiButtonBase", [
5350
5426
  textDecoration: "none",
5351
5427
  color: "inherit",
5352
5428
  "&::-moz-focus-inner": { borderStyle: "none" },
5353
- [`&.${Us.disabled}`]: {
5429
+ [`&.${Ys.disabled}`]: {
5354
5430
  pointerEvents: "none",
5355
5431
  cursor: "default"
5356
5432
  },
@@ -5359,33 +5435,33 @@ var Us = tr("MuiButtonBase", [
5359
5435
  props: { internalDisabledThemeFocusVisible: !1 },
5360
5436
  style: e.focusVisible && {
5361
5437
  ...Ti,
5362
- [`&.${Us.focusVisible}`]: e.focusVisible
5438
+ [`&.${Ys.focusVisible}`]: e.focusVisible
5363
5439
  }
5364
5440
  }]
5365
- }))), Ks = /*#__PURE__*/ e.forwardRef(function(t, n) {
5441
+ }))), Qs = /*#__PURE__*/ e.forwardRef(function(t, n) {
5366
5442
  let r = Ea({
5367
5443
  props: t,
5368
5444
  name: "MuiButtonBase"
5369
- }), { action: i, centerRipple: a = !1, children: o, className: s, component: u = "button", disabled: d = !1, disableRipple: f = !1, disableTouchRipple: p = !1, focusRipple: m = !1, focusVisibleClassName: h, focusableWhenDisabled: g, suppressFocusVisible: _ = !1, internalNativeButton: v, internalDisabledThemeFocusVisible: y = !1, LinkComponent: b = "a", nativeButton: x, onBlur: S, onClick: C, onContextMenu: w, onDragLeave: T, onFocus: E, onFocusVisible: D, onKeyDown: O, onKeyUp: k, onMouseDown: A, onMouseLeave: j, onMouseUp: M, onTouchEnd: N, onTouchMove: P, onTouchStart: ee, tabIndex: F = 0, TouchRippleProps: I, touchRippleRef: L, type: R, ...z } = r, te = !!(z.href || z.to), ne = !!z.formAction, re = u;
5370
- re === "button" && te && (re = b);
5371
- let ie = typeof re == "string" ? re === "button" : v ?? !1, ae = x ?? ie, B = Ss(), oe = po(B.ref, L), [se, ce] = e.useState(!1);
5445
+ }), { action: i, centerRipple: a = !1, children: o, className: s, component: u = "button", disabled: d = !1, disableRipple: f = !1, disableTouchRipple: p = !1, focusRipple: m = !1, focusVisibleClassName: h, focusableWhenDisabled: g, suppressFocusVisible: _ = !1, internalNativeButton: v, internalDisabledThemeFocusVisible: y = !1, LinkComponent: b = "a", nativeButton: x, onBlur: S, onClick: C, onContextMenu: w, onDragLeave: T, onFocus: E, onFocusVisible: D, onKeyDown: O, onKeyUp: k, onMouseDown: A, onMouseLeave: j, onMouseUp: M, onTouchEnd: N, onTouchMove: P, onTouchStart: ee, tabIndex: F = 0, TouchRippleProps: I, touchRippleRef: L, type: te, ...R } = r, ne = !!(R.href || R.to), re = !!R.formAction, z = u;
5446
+ z === "button" && ne && (z = b);
5447
+ let ie = typeof z == "string" ? z === "button" : v ?? !1, ae = x ?? ie, B = Os(), oe = po(B.ref, L), [se, ce] = e.useState(!1);
5372
5448
  (d || _) && se && ce(!1);
5373
- let le = cs((e) => {
5449
+ let le = ms((e) => {
5374
5450
  m && !e.repeat && se && e.key === " " && B.stop(e, () => {
5375
5451
  B.start(e);
5376
5452
  });
5377
- }), ue = cs((e) => {
5453
+ }), ue = ms((e) => {
5378
5454
  m && e.key === " " && se && !e.defaultPrevented && B.stop(e, () => {
5379
5455
  B.pulsate(e);
5380
5456
  });
5381
- }), { getButtonProps: de, rootRef: fe } = gs({
5457
+ }), { getButtonProps: de, rootRef: fe } = Ss({
5382
5458
  nativeButton: ae,
5383
5459
  nativeButtonProp: x,
5384
5460
  internalNativeButton: ie,
5385
- allowInferredHostMismatch: te || typeof re == "string",
5461
+ allowInferredHostMismatch: ne || typeof z == "string",
5386
5462
  disabled: d,
5387
- type: R,
5388
- hasFormAction: ne,
5463
+ type: te,
5464
+ hasFormAction: re,
5389
5465
  tabIndex: F,
5390
5466
  onBeforeKeyDown: le,
5391
5467
  onBeforeKeyUp: ue
@@ -5406,14 +5482,14 @@ var Us = tr("MuiButtonBase", [
5406
5482
  se,
5407
5483
  B
5408
5484
  ]);
5409
- let ve = qs(B, "start", A, p), ye = qs(B, "stop", w, p), H = qs(B, "stop", T, p), be = qs(B, "stop", M, p), xe = qs(B, "stop", (e) => {
5485
+ let ve = $s(B, "start", A, p), ye = $s(B, "stop", w, p), H = $s(B, "stop", T, p), be = $s(B, "stop", M, p), xe = $s(B, "stop", (e) => {
5410
5486
  se && e.preventDefault(), j && j(e);
5411
- }, p), Se = qs(B, "start", ee, p), Ce = qs(B, "stop", N, p), we = qs(B, "stop", P, p), Te = qs(B, "stop", (e) => {
5412
- ps(e.target) || ce(!1), S && S(e);
5413
- }, !1), Ee = cs((e) => {
5414
- fe.current || (fe.current = e.currentTarget), !_ && ps(e.target) && (ce(!0), D && D(e)), E && E(e);
5487
+ }, p), Se = $s(B, "start", ee, p), Ce = $s(B, "stop", N, p), we = $s(B, "stop", P, p), Te = $s(B, "stop", (e) => {
5488
+ ys(e.target) || ce(!1), S && S(e);
5489
+ }, !1), Ee = ms((e) => {
5490
+ fe.current || (fe.current = e.currentTarget), !_ && ys(e.target) && (ce(!0), D && D(e)), E && E(e);
5415
5491
  }), De = {};
5416
- te && (De.tabIndex = d ? -1 : F, d && (De["aria-disabled"] = d), De.type = R);
5492
+ ne && (De.tabIndex = d ? -1 : F, d && (De["aria-disabled"] = d), De.type = te);
5417
5493
  let Oe = po(n, fe), ke = {
5418
5494
  ...r,
5419
5495
  centerRipple: a,
@@ -5426,9 +5502,9 @@ var Us = tr("MuiButtonBase", [
5426
5502
  tabIndex: F,
5427
5503
  focusVisible: se,
5428
5504
  internalDisabledThemeFocusVisible: y
5429
- }, Ae = Ws(ke);
5430
- return /*#__PURE__*/ l(Gs, {
5431
- as: re,
5505
+ }, Ae = Xs(ke);
5506
+ return /*#__PURE__*/ l(Zs, {
5507
+ as: z,
5432
5508
  className: V(Ae.root, s),
5433
5509
  ownerState: ke,
5434
5510
  onBlur: Te,
@@ -5445,25 +5521,25 @@ var Us = tr("MuiButtonBase", [
5445
5521
  onTouchMove: we,
5446
5522
  onTouchStart: Se,
5447
5523
  ref: Oe,
5448
- ...te ? De : ge,
5449
- ...z,
5450
- children: [o, _e ? /*#__PURE__*/ c(Vs, {
5524
+ ...ne ? De : ge,
5525
+ ...R,
5526
+ children: [o, _e ? /*#__PURE__*/ c(qs, {
5451
5527
  ref: oe,
5452
5528
  center: a,
5453
5529
  ...I
5454
5530
  }) : null]
5455
5531
  });
5456
5532
  });
5457
- function qs(e, t, n, r = !1) {
5458
- return cs((i) => (n && n(i), r || e[t](i), !0));
5533
+ function $s(e, t, n, r = !1) {
5534
+ return ms((i) => (n && n(i), r || e[t](i), !0));
5459
5535
  }
5460
- process.env.NODE_ENV !== "production" && (Ks.propTypes = {
5461
- action: ls,
5536
+ process.env.NODE_ENV !== "production" && (Qs.propTypes = {
5537
+ action: hs,
5462
5538
  centerRipple: H.default.bool,
5463
5539
  children: H.default.node,
5464
5540
  classes: H.default.object,
5465
5541
  className: H.default.string,
5466
- component: fs,
5542
+ component: vs,
5467
5543
  disabled: H.default.bool,
5468
5544
  disableRipple: H.default.bool,
5469
5545
  disableTouchRipple: H.default.bool,
@@ -5507,20 +5583,20 @@ process.env.NODE_ENV !== "production" && (Ks.propTypes = {
5507
5583
  });
5508
5584
  //#endregion
5509
5585
  //#region node_modules/@mui/material/utils/createSimplePaletteValueFilter.mjs
5510
- function Js(e) {
5586
+ function ec(e) {
5511
5587
  return typeof e.main == "string";
5512
5588
  }
5513
- function Ys(e, t = []) {
5514
- if (!Js(e)) return !1;
5589
+ function tc(e, t = []) {
5590
+ if (!ec(e)) return !1;
5515
5591
  for (let n of t) if (!e.hasOwnProperty(n) || typeof e[n] != "string") return !1;
5516
5592
  return !0;
5517
5593
  }
5518
- function Xs(e = []) {
5519
- return ([, t]) => t && Ys(t, e);
5594
+ function nc(e = []) {
5595
+ return ([, t]) => t && tc(t, e);
5520
5596
  }
5521
5597
  //#endregion
5522
5598
  //#region node_modules/@mui/material/CircularProgress/circularProgressClasses.mjs
5523
- function Zs(e) {
5599
+ function rc(e) {
5524
5600
  return er("MuiCircularProgress", e);
5525
5601
  }
5526
5602
  tr("MuiCircularProgress", [
@@ -5536,7 +5612,7 @@ tr("MuiCircularProgress", [
5536
5612
  ]);
5537
5613
  //#endregion
5538
5614
  //#region node_modules/@mui/material/CircularProgress/CircularProgress.mjs
5539
- var Qs = 44, $s = !1, ec = !1, tc = m`
5615
+ var ic = 44, ac = !1, oc = !1, sc = m`
5540
5616
  0% {
5541
5617
  transform: rotate(0deg);
5542
5618
  }
@@ -5544,7 +5620,7 @@ var Qs = 44, $s = !1, ec = !1, tc = m`
5544
5620
  100% {
5545
5621
  transform: rotate(360deg);
5546
5622
  }
5547
- `, nc = m`
5623
+ `, cc = m`
5548
5624
  0% {
5549
5625
  stroke-dasharray: 1px, 200px;
5550
5626
  stroke-dashoffset: 0;
@@ -5559,23 +5635,23 @@ var Qs = 44, $s = !1, ec = !1, tc = m`
5559
5635
  stroke-dasharray: 1px, 200px;
5560
5636
  stroke-dashoffset: -126px;
5561
5637
  }
5562
- `, rc = typeof tc == "string" ? null : p`
5563
- animation: ${tc} 1.4s linear infinite;
5564
- `, ic = typeof nc == "string" ? null : p`
5565
- animation: ${nc} 1.4s ease-in-out infinite;
5566
- `, ac = (e) => {
5638
+ `, lc = typeof sc == "string" ? null : p`
5639
+ animation: ${sc} 1.4s linear infinite;
5640
+ `, uc = typeof cc == "string" ? null : p`
5641
+ animation: ${cc} 1.4s ease-in-out infinite;
5642
+ `, dc = (e) => {
5567
5643
  let { classes: t, variant: n, color: r, disableShrink: i } = e;
5568
5644
  return Ce({
5569
5645
  root: [
5570
5646
  "root",
5571
5647
  n,
5572
- `color${os(r)}`
5648
+ `color${fs(r)}`
5573
5649
  ],
5574
5650
  svg: ["svg"],
5575
5651
  track: ["track"],
5576
5652
  circle: ["circle", i && "circleDisableShrink"]
5577
- }, Zs, t);
5578
- }, oc = Q("span", {
5653
+ }, rc, t);
5654
+ }, fc = Q("span", {
5579
5655
  name: "MuiCircularProgress",
5580
5656
  slot: "Root",
5581
5657
  overridesResolver: (e, t) => {
@@ -5583,7 +5659,7 @@ var Qs = 44, $s = !1, ec = !1, tc = m`
5583
5659
  return [
5584
5660
  t.root,
5585
5661
  t[n.variant],
5586
- t[`color${os(n.color)}`]
5662
+ t[`color${fs(n.color)}`]
5587
5663
  ];
5588
5664
  }
5589
5665
  })(Ta(({ theme: e }) => {
@@ -5597,22 +5673,22 @@ var Qs = 44, $s = !1, ec = !1, tc = m`
5597
5673
  },
5598
5674
  {
5599
5675
  props: { variant: "indeterminate" },
5600
- style: rc || { animation: `${tc} 1.4s linear infinite` }
5676
+ style: lc || { animation: `${sc} 1.4s linear infinite` }
5601
5677
  },
5602
5678
  ...t ? [{
5603
5679
  props: { variant: "indeterminate" },
5604
5680
  style: t
5605
5681
  }] : [],
5606
- ...Object.entries(e.palette).filter(Xs()).map(([t]) => ({
5682
+ ...Object.entries(e.palette).filter(nc()).map(([t]) => ({
5607
5683
  props: { color: t },
5608
5684
  style: { color: (e.vars || e).palette[t].main }
5609
5685
  }))
5610
5686
  ]
5611
5687
  };
5612
- })), sc = Q("svg", {
5688
+ })), pc = Q("svg", {
5613
5689
  name: "MuiCircularProgress",
5614
5690
  slot: "Svg"
5615
- })({ display: "block" }), cc = Q("circle", {
5691
+ })({ display: "block" }), mc = Q("circle", {
5616
5692
  name: "MuiCircularProgress",
5617
5693
  slot: "Circle",
5618
5694
  overridesResolver: (e, t) => {
@@ -5637,7 +5713,7 @@ var Qs = 44, $s = !1, ec = !1, tc = m`
5637
5713
  },
5638
5714
  {
5639
5715
  props: ({ ownerState: e }) => e.variant === "indeterminate" && !e.disableShrink,
5640
- style: ic || { animation: `${nc} 1.4s ease-in-out infinite` }
5716
+ style: uc || { animation: `${cc} 1.4s ease-in-out infinite` }
5641
5717
  },
5642
5718
  ...t ? [{
5643
5719
  props: ({ ownerState: e }) => e.variant === "indeterminate" && !e.disableShrink,
@@ -5645,18 +5721,18 @@ var Qs = 44, $s = !1, ec = !1, tc = m`
5645
5721
  }] : []
5646
5722
  ]
5647
5723
  };
5648
- })), lc = Q("circle", {
5724
+ })), hc = Q("circle", {
5649
5725
  name: "MuiCircularProgress",
5650
5726
  slot: "Track"
5651
5727
  })(Ta(({ theme: e }) => ({
5652
5728
  stroke: "currentColor",
5653
5729
  opacity: (e.vars || e).palette.action.activatedOpacity
5654
- }))), uc = /*#__PURE__*/ e.forwardRef(function(e, t) {
5730
+ }))), gc = /*#__PURE__*/ e.forwardRef(function(e, t) {
5655
5731
  let n = Ea({
5656
5732
  props: e,
5657
5733
  name: "MuiCircularProgress"
5658
5734
  }), { className: r, color: i = "primary", disableShrink: a = !1, enableTrackSlot: o = !1, min: s, max: u, size: d = 40, style: f, thickness: p = 3.6, value: m = n.min ?? 0, variant: h = "indeterminate", ...g } = n;
5659
- process.env.NODE_ENV !== "production" && !$s && h === "indeterminate" && (s !== void 0 || u !== void 0) && (console.warn("MUI: You have provided the `min` or `max` props with an 'indeterminate' variant. These props will have no effect."), $s = !0);
5735
+ process.env.NODE_ENV !== "production" && !ac && h === "indeterminate" && (s !== void 0 || u !== void 0) && (console.warn("MUI: You have provided the `min` or `max` props with an 'indeterminate' variant. These props will have no effect."), ac = !0);
5660
5736
  let _ = s ?? 0, v = u ?? 100, y = {
5661
5737
  ...n,
5662
5738
  color: i,
@@ -5666,14 +5742,14 @@ var Qs = 44, $s = !1, ec = !1, tc = m`
5666
5742
  value: m,
5667
5743
  variant: h,
5668
5744
  enableTrackSlot: o
5669
- }, b = ac(y), x = {}, S = {}, C = {};
5745
+ }, b = dc(y), x = {}, S = {}, C = {};
5670
5746
  if (h === "determinate") {
5671
- let e = 2 * Math.PI * ((Qs - p) / 2);
5672
- process.env.NODE_ENV !== "production" && !ec && (m < _ || m > v || _ >= v) && (console.error(`MUI: The min, max, and value props in CircularProgress should be numbers where min < max and min <= value <= max. Received min=${_}, max=${v}, value=${m}.`), ec = !0);
5747
+ let e = 2 * Math.PI * ((ic - p) / 2);
5748
+ process.env.NODE_ENV !== "production" && !oc && (m < _ || m > v || _ >= v) && (console.error(`MUI: The min, max, and value props in CircularProgress should be numbers where min < max and min <= value <= max. Received min=${_}, max=${v}, value=${m}.`), oc = !0);
5673
5749
  let t = v - _;
5674
5750
  x.strokeDasharray = e.toFixed(3), x.strokeDashoffset = t > 0 ? `${((v - m) / t * e).toFixed(3)}px` : `${e.toFixed(3)}px`, S.transform = "rotate(-90deg)", C["aria-valuenow"] = m, C["aria-valuemin"] = _, C["aria-valuemax"] = v;
5675
5751
  }
5676
- return /*#__PURE__*/ c(oc, {
5752
+ return /*#__PURE__*/ c(fc, {
5677
5753
  className: V(b.root, r),
5678
5754
  style: {
5679
5755
  width: d,
@@ -5686,33 +5762,33 @@ var Qs = 44, $s = !1, ec = !1, tc = m`
5686
5762
  role: "progressbar",
5687
5763
  ...C,
5688
5764
  ...g,
5689
- children: /*#__PURE__*/ l(sc, {
5765
+ children: /*#__PURE__*/ l(pc, {
5690
5766
  className: b.svg,
5691
5767
  ownerState: y,
5692
- viewBox: `${Qs / 2} ${Qs / 2} ${Qs} ${Qs}`,
5693
- children: [o ? /*#__PURE__*/ c(lc, {
5768
+ viewBox: `${ic / 2} ${ic / 2} ${ic} ${ic}`,
5769
+ children: [o ? /*#__PURE__*/ c(hc, {
5694
5770
  className: b.track,
5695
5771
  ownerState: y,
5696
- cx: Qs,
5697
- cy: Qs,
5698
- r: (Qs - p) / 2,
5772
+ cx: ic,
5773
+ cy: ic,
5774
+ r: (ic - p) / 2,
5699
5775
  fill: "none",
5700
5776
  strokeWidth: p,
5701
5777
  "aria-hidden": "true"
5702
- }) : null, /*#__PURE__*/ c(cc, {
5778
+ }) : null, /*#__PURE__*/ c(mc, {
5703
5779
  className: b.circle,
5704
5780
  style: x,
5705
5781
  ownerState: y,
5706
- cx: Qs,
5707
- cy: Qs,
5708
- r: (Qs - p) / 2,
5782
+ cx: ic,
5783
+ cy: ic,
5784
+ r: (ic - p) / 2,
5709
5785
  fill: "none",
5710
5786
  strokeWidth: p
5711
5787
  })]
5712
5788
  })
5713
5789
  });
5714
5790
  });
5715
- process.env.NODE_ENV !== "production" && (uc.propTypes = {
5791
+ process.env.NODE_ENV !== "production" && (gc.propTypes = {
5716
5792
  classes: H.default.object,
5717
5793
  className: H.default.string,
5718
5794
  color: H.default.oneOfType([H.default.oneOf([
@@ -5745,39 +5821,39 @@ process.env.NODE_ENV !== "production" && (uc.propTypes = {
5745
5821
  });
5746
5822
  //#endregion
5747
5823
  //#region node_modules/@mui/material/Button/buttonClasses.mjs
5748
- function dc(e) {
5824
+ function _c(e) {
5749
5825
  return er("MuiButton", e);
5750
5826
  }
5751
- var fc = tr("MuiButton", /* @__PURE__ */ "root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd".split(".")), pc = /*#__PURE__*/ e.createContext({});
5752
- process.env.NODE_ENV !== "production" && (pc.displayName = "ButtonGroupContext");
5827
+ var vc = tr("MuiButton", /* @__PURE__ */ "root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd".split(".")), yc = /*#__PURE__*/ e.createContext({});
5828
+ process.env.NODE_ENV !== "production" && (yc.displayName = "ButtonGroupContext");
5753
5829
  //#endregion
5754
5830
  //#region node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext.mjs
5755
- var mc = /*#__PURE__*/ e.createContext(void 0);
5756
- process.env.NODE_ENV !== "production" && (mc.displayName = "ButtonGroupButtonContext");
5831
+ var bc = /*#__PURE__*/ e.createContext(void 0);
5832
+ process.env.NODE_ENV !== "production" && (bc.displayName = "ButtonGroupButtonContext");
5757
5833
  //#endregion
5758
5834
  //#region node_modules/@mui/material/Button/Button.mjs
5759
- var hc = (e) => {
5835
+ var xc = (e) => {
5760
5836
  let { color: t, disableElevation: n, fullWidth: r, size: i, variant: a, loading: o, loadingPosition: s, classes: c } = e, l = Ce({
5761
5837
  root: [
5762
5838
  "root",
5763
5839
  o && "loading",
5764
5840
  a,
5765
- `size${os(i)}`,
5766
- `color${os(t)}`,
5841
+ `size${fs(i)}`,
5842
+ `color${fs(t)}`,
5767
5843
  n && "disableElevation",
5768
5844
  r && "fullWidth",
5769
- o && `loadingPosition${os(s)}`
5845
+ o && `loadingPosition${fs(s)}`
5770
5846
  ],
5771
5847
  startIcon: ["icon", "startIcon"],
5772
5848
  endIcon: ["icon", "endIcon"],
5773
5849
  loadingIndicator: ["loadingIndicator"],
5774
5850
  loadingWrapper: ["loadingWrapper"]
5775
- }, dc, c);
5851
+ }, _c, c);
5776
5852
  return {
5777
5853
  ...c,
5778
5854
  ...l
5779
5855
  };
5780
- }, gc = [
5856
+ }, Sc = [
5781
5857
  {
5782
5858
  props: { size: "small" },
5783
5859
  style: { "& > *:nth-of-type(1)": { fontSize: 18 } }
@@ -5790,7 +5866,7 @@ var hc = (e) => {
5790
5866
  props: { size: "large" },
5791
5867
  style: { "& > *:nth-of-type(1)": { fontSize: 22 } }
5792
5868
  }
5793
- ], _c = Q(Ks, {
5869
+ ], Cc = Q(Qs, {
5794
5870
  shouldForwardProp: (e) => wa(e) || e === "classes",
5795
5871
  name: "MuiButton",
5796
5872
  slot: "Root",
@@ -5799,7 +5875,7 @@ var hc = (e) => {
5799
5875
  return [
5800
5876
  t.root,
5801
5877
  t[n.variant],
5802
- t[`size${os(n.size)}`],
5878
+ t[`size${fs(n.size)}`],
5803
5879
  n.color === "inherit" && t.colorInherit,
5804
5880
  n.disableElevation && t.disableElevation,
5805
5881
  n.fullWidth && t.fullWidth,
@@ -5821,7 +5897,7 @@ var hc = (e) => {
5821
5897
  "color"
5822
5898
  ], { duration: e.transitions.duration.short }),
5823
5899
  "&:hover": { textDecoration: "none" },
5824
- [`&.${fc.disabled}`]: { color: (e.vars || e).palette.action.disabled },
5900
+ [`&.${vc.disabled}`]: { color: (e.vars || e).palette.action.disabled },
5825
5901
  variants: [
5826
5902
  {
5827
5903
  props: { variant: "contained" },
@@ -5834,11 +5910,11 @@ var hc = (e) => {
5834
5910
  "@media (hover: none)": { boxShadow: (e.vars || e).shadows[2] }
5835
5911
  },
5836
5912
  "&:active": { boxShadow: (e.vars || e).shadows[8] },
5837
- [`&.${fc.focusVisible}`]: {
5913
+ [`&.${vc.focusVisible}`]: {
5838
5914
  ...e.focusVisible,
5839
5915
  boxShadow: e.focusVisible?.boxShadow ? `${(e.vars || e).shadows[6]}, ${e.focusVisible.boxShadow}` : (e.vars || e).shadows[6]
5840
5916
  },
5841
- [`&.${fc.disabled}`]: {
5917
+ [`&.${vc.disabled}`]: {
5842
5918
  color: (e.vars || e).palette.action.disabled,
5843
5919
  boxShadow: (e.vars || e).shadows[0],
5844
5920
  backgroundColor: (e.vars || e).palette.action.disabledBackground
@@ -5853,7 +5929,7 @@ var hc = (e) => {
5853
5929
  borderColor: "var(--variant-outlinedBorder, currentColor)",
5854
5930
  backgroundColor: "var(--variant-outlinedBg)",
5855
5931
  color: "var(--variant-outlinedColor)",
5856
- [`&.${fc.disabled}`]: { border: `1px solid ${(e.vars || e).palette.action.disabledBackground}` }
5932
+ [`&.${vc.disabled}`]: { border: `1px solid ${(e.vars || e).palette.action.disabledBackground}` }
5857
5933
  }
5858
5934
  },
5859
5935
  {
@@ -5864,7 +5940,7 @@ var hc = (e) => {
5864
5940
  backgroundColor: "var(--variant-textBg)"
5865
5941
  }
5866
5942
  },
5867
- ...Object.entries(e.palette).filter(Xs()).map(([t]) => ({
5943
+ ...Object.entries(e.palette).filter(nc()).map(([t]) => ({
5868
5944
  props: { color: t },
5869
5945
  style: {
5870
5946
  "--variant-textColor": (e.vars || e).palette[t].main,
@@ -5958,9 +6034,9 @@ var hc = (e) => {
5958
6034
  style: {
5959
6035
  boxShadow: "none",
5960
6036
  "&:hover": { boxShadow: "none" },
5961
- [`&.${fc.focusVisible}`]: { boxShadow: e.focusVisible?.boxShadow ?? "none" },
6037
+ [`&.${vc.focusVisible}`]: { boxShadow: e.focusVisible?.boxShadow ?? "none" },
5962
6038
  "&:active": { boxShadow: "none" },
5963
- [`&.${fc.disabled}`]: { boxShadow: "none" }
6039
+ [`&.${vc.disabled}`]: { boxShadow: "none" }
5964
6040
  }
5965
6041
  },
5966
6042
  {
@@ -5975,12 +6051,12 @@ var hc = (e) => {
5975
6051
  "box-shadow",
5976
6052
  "border-color"
5977
6053
  ], { duration: e.transitions.duration.short }),
5978
- [`&.${fc.loading}`]: { color: "transparent" }
6054
+ [`&.${vc.loading}`]: { color: "transparent" }
5979
6055
  }
5980
6056
  }
5981
6057
  ]
5982
6058
  };
5983
- })), vc = Q("span", {
6059
+ })), wc = Q("span", {
5984
6060
  name: "MuiButton",
5985
6061
  slot: "StartIcon",
5986
6062
  overridesResolver: (e, t) => {
@@ -6020,9 +6096,9 @@ var hc = (e) => {
6020
6096
  },
6021
6097
  style: { marginRight: -8 }
6022
6098
  },
6023
- ...gc
6099
+ ...Sc
6024
6100
  ]
6025
- })), yc = Q("span", {
6101
+ })), Tc = Q("span", {
6026
6102
  name: "MuiButton",
6027
6103
  slot: "EndIcon",
6028
6104
  overridesResolver: (e, t) => {
@@ -6056,9 +6132,9 @@ var hc = (e) => {
6056
6132
  },
6057
6133
  style: { marginLeft: -8 }
6058
6134
  },
6059
- ...gc
6135
+ ...Sc
6060
6136
  ]
6061
- })), bc = Q("span", {
6137
+ })), Ec = Q("span", {
6062
6138
  name: "MuiButton",
6063
6139
  slot: "LoadingIndicator"
6064
6140
  })(({ theme: e }) => ({
@@ -6135,18 +6211,18 @@ var hc = (e) => {
6135
6211
  }
6136
6212
  }
6137
6213
  ]
6138
- })), xc = Q("span", {
6214
+ })), Dc = Q("span", {
6139
6215
  name: "MuiButton",
6140
6216
  slot: "LoadingIconPlaceholder"
6141
6217
  })({
6142
6218
  display: "inline-block",
6143
6219
  width: "1em",
6144
6220
  height: "1em"
6145
- }), Sc = /*#__PURE__*/ e.forwardRef(function(t, n) {
6146
- let r = e.useContext(pc), i = e.useContext(mc), a = Ea({
6221
+ }), Oc = /*#__PURE__*/ e.forwardRef(function(t, n) {
6222
+ let r = e.useContext(yc), i = e.useContext(bc), a = Ea({
6147
6223
  props: vr(r, t),
6148
6224
  name: "MuiButton"
6149
- }), { children: o, color: s = "primary", component: u = "button", className: d, disabled: f = !1, disableElevation: p = !1, disableFocusRipple: m = !1, endIcon: h, focusVisibleClassName: g, fullWidth: _ = !1, id: v, loading: y = null, loadingIndicator: b, loadingPosition: x = "center", size: S = "medium", startIcon: C, type: w, variant: T = "text", ...E } = a, D = ss(v), O = b ?? /*#__PURE__*/ c(uc, {
6225
+ }), { children: o, color: s = "primary", component: u = "button", className: d, disabled: f = !1, disableElevation: p = !1, disableFocusRipple: m = !1, endIcon: h, focusVisibleClassName: g, fullWidth: _ = !1, id: v, loading: y = null, loadingIndicator: b, loadingPosition: x = "center", size: S = "medium", startIcon: C, type: w, variant: T = "text", ...E } = a, D = ps(v), O = b ?? /*#__PURE__*/ c(gc, {
6150
6226
  "aria-labelledby": D,
6151
6227
  color: "inherit",
6152
6228
  size: 16
@@ -6164,30 +6240,30 @@ var hc = (e) => {
6164
6240
  size: S,
6165
6241
  type: w,
6166
6242
  variant: T
6167
- }, A = hc(k), j = (C || y && x === "start") && /*#__PURE__*/ c(vc, {
6243
+ }, A = xc(k), j = (C || y && x === "start") && /*#__PURE__*/ c(wc, {
6168
6244
  className: A.startIcon,
6169
6245
  ownerState: k,
6170
- children: C || /*#__PURE__*/ c(xc, {
6246
+ children: C || /*#__PURE__*/ c(Dc, {
6171
6247
  className: A.loadingIconPlaceholder,
6172
6248
  ownerState: k
6173
6249
  })
6174
- }), M = (h || y && x === "end") && /*#__PURE__*/ c(yc, {
6250
+ }), M = (h || y && x === "end") && /*#__PURE__*/ c(Tc, {
6175
6251
  className: A.endIcon,
6176
6252
  ownerState: k,
6177
- children: h || /*#__PURE__*/ c(xc, {
6253
+ children: h || /*#__PURE__*/ c(Dc, {
6178
6254
  className: A.loadingIconPlaceholder,
6179
6255
  ownerState: k
6180
6256
  })
6181
6257
  }), N = i || "", P = typeof y == "boolean" ? /*#__PURE__*/ c("span", {
6182
6258
  className: A.loadingWrapper,
6183
6259
  style: { display: "contents" },
6184
- children: y && /*#__PURE__*/ c(bc, {
6260
+ children: y && /*#__PURE__*/ c(Ec, {
6185
6261
  className: A.loadingIndicator,
6186
6262
  ownerState: k,
6187
6263
  children: O
6188
6264
  })
6189
6265
  }) : null, { root: ee, ...F } = A;
6190
- return /*#__PURE__*/ l(_c, {
6266
+ return /*#__PURE__*/ l(Cc, {
6191
6267
  ownerState: k,
6192
6268
  className: V(r.className, A.root, d, N),
6193
6269
  component: u,
@@ -6209,7 +6285,7 @@ var hc = (e) => {
6209
6285
  ]
6210
6286
  });
6211
6287
  });
6212
- process.env.NODE_ENV !== "production" && (Sc.propTypes = {
6288
+ process.env.NODE_ENV !== "production" && (Oc.propTypes = {
6213
6289
  children: H.default.node,
6214
6290
  classes: H.default.object,
6215
6291
  className: H.default.string,
@@ -6263,54 +6339,54 @@ process.env.NODE_ENV !== "production" && (Sc.propTypes = {
6263
6339
  });
6264
6340
  //#endregion
6265
6341
  //#region node_modules/ai.akima/dist/ai-akima.es.js
6266
- function Cc(e) {
6342
+ function kc(e) {
6267
6343
  let t = e % 1;
6268
6344
  return t < 0 ? t + 1 : t;
6269
6345
  }
6270
- function wc(e, t, n) {
6346
+ function Ac(e, t, n) {
6271
6347
  return {
6272
6348
  x: e.x + (t.x - e.x) * n,
6273
6349
  y: e.y + (t.y - e.y) * n
6274
6350
  };
6275
6351
  }
6276
- function Tc(e, t, n, r, i) {
6352
+ function jc(e, t, n, r, i) {
6277
6353
  let a = i * i, o = a * i;
6278
6354
  return {
6279
6355
  x: .5 * (2 * t.x + (-e.x + n.x) * i + (2 * e.x - 5 * t.x + 4 * n.x - r.x) * a + (-e.x + 3 * t.x - 3 * n.x + r.x) * o),
6280
6356
  y: .5 * (2 * t.y + (-e.y + n.y) * i + (2 * e.y - 5 * t.y + 4 * n.y - r.y) * a + (-e.y + 3 * t.y - 3 * n.y + r.y) * o)
6281
6357
  };
6282
6358
  }
6283
- function Ec(e, t) {
6359
+ function Mc(e, t) {
6284
6360
  return e[(t % e.length + e.length) % e.length];
6285
6361
  }
6286
- function Dc(e, t) {
6362
+ function Nc(e, t) {
6287
6363
  return (e % t + t) % t;
6288
6364
  }
6289
- function Oc(e, t) {
6365
+ function Pc(e, t) {
6290
6366
  let n = t * e.length, r = Math.floor(n), i = n - r;
6291
- return Tc(Ec(e, r - 1), Ec(e, r), Ec(e, r + 1), Ec(e, r + 2), i);
6367
+ return jc(Mc(e, r - 1), Mc(e, r), Mc(e, r + 1), Mc(e, r + 2), i);
6292
6368
  }
6293
- function kc(e) {
6369
+ function Fc(e) {
6294
6370
  let t = e.length;
6295
6371
  if (t === 0) return [];
6296
- let n = Array.from({ length: t }, (n, r) => e[Dc(r + 1, t)] - e[r]);
6372
+ let n = Array.from({ length: t }, (n, r) => e[Nc(r + 1, t)] - e[r]);
6297
6373
  return Array.from({ length: t }, (e, r) => {
6298
- let i = n[Dc(r - 2, t)], a = n[Dc(r - 1, t)], o = n[Dc(r, t)], s = n[Dc(r + 1, t)], c = Math.abs(s - o), l = Math.abs(a - i), u = c + l;
6374
+ let i = n[Nc(r - 2, t)], a = n[Nc(r - 1, t)], o = n[Nc(r, t)], s = n[Nc(r + 1, t)], c = Math.abs(s - o), l = Math.abs(a - i), u = c + l;
6299
6375
  return u > 1e-12 ? (c * a + l * o) / u : (a + o) / 2;
6300
6376
  });
6301
6377
  }
6302
- function Ac(e, t, n, r, i) {
6378
+ function Ic(e, t, n, r, i) {
6303
6379
  let a = i * i, o = a * i;
6304
6380
  return (2 * o - 3 * a + 1) * e + (o - 2 * a + i) * t + (-2 * o + 3 * a) * n + (o - a) * r;
6305
6381
  }
6306
- function jc(e, t) {
6307
- let n = e.length, r = e.map((e) => e.x), i = e.map((e) => e.y), a = kc(r), o = kc(i), s = t * n, c = Math.floor(s), l = s - c, u = Dc(c, n), d = Dc(c + 1, n);
6382
+ function Lc(e, t) {
6383
+ let n = e.length, r = e.map((e) => e.x), i = e.map((e) => e.y), a = Fc(r), o = Fc(i), s = t * n, c = Math.floor(s), l = s - c, u = Nc(c, n), d = Nc(c + 1, n);
6308
6384
  return {
6309
- x: Ac(r[u], a[u], r[d], a[d], l),
6310
- y: Ac(i[u], o[u], i[d], o[d], l)
6385
+ x: Ic(r[u], a[u], r[d], a[d], l),
6386
+ y: Ic(i[u], o[u], i[d], o[d], l)
6311
6387
  };
6312
6388
  }
6313
- function Mc(e) {
6389
+ function Rc(e) {
6314
6390
  if (e.length < 3) return e;
6315
6391
  let t = e.reduce((e, t) => ({
6316
6392
  x: e.x + t.x,
@@ -6329,7 +6405,7 @@ function Mc(e) {
6329
6405
  distanceSquared: (e.x - n.x) * (e.x - n.x) + (e.y - n.y) * (e.y - n.y)
6330
6406
  })).sort((e, t) => e.angle - t.angle || e.distanceSquared - t.distanceSquared || e.index - t.index).map(({ point: e }) => e);
6331
6407
  }
6332
- function Nc(e) {
6408
+ function zc(e) {
6333
6409
  if (e.length === 0) return {
6334
6410
  x: 0,
6335
6411
  y: 0
@@ -6346,8 +6422,8 @@ function Nc(e) {
6346
6422
  y: t.y / e.length
6347
6423
  };
6348
6424
  }
6349
- function Pc(e, t, n) {
6350
- let r = Nc(e), i = Lc(e, 1024, n), a = Math.cos(t), o = Math.sin(t), s = i[0] ?? {
6425
+ function Bc(e, t, n) {
6426
+ let r = zc(e), i = Uc(e, 1024, n), a = Math.cos(t), o = Math.sin(t), s = i[0] ?? {
6351
6427
  x: r.x,
6352
6428
  y: r.y
6353
6429
  }, c = Infinity;
@@ -6362,62 +6438,92 @@ function Pc(e, t, n) {
6362
6438
  }
6363
6439
  return s;
6364
6440
  }
6365
- function Fc(e, t = "catmull") {
6366
- let n = Mc(e), r = Nc(n);
6441
+ function Vc(e, t = "catmull") {
6442
+ let n = Rc(e), r = zc(n);
6367
6443
  return (e) => {
6368
- let i = Pc(n, e, t);
6444
+ let i = Bc(n, e, t);
6369
6445
  return {
6370
6446
  x: i.x + r.x,
6371
6447
  y: i.y + r.y
6372
6448
  };
6373
6449
  };
6374
6450
  }
6375
- function Ic(e, t, n = "catmull") {
6376
- let r = Mc(e);
6451
+ function Hc(e, t, n = "catmull") {
6452
+ let r = Rc(e);
6377
6453
  if (r.length === 0) return {
6378
6454
  x: 0,
6379
6455
  y: 0
6380
6456
  };
6381
6457
  if (r.length === 1) return { ...r[0] };
6382
- let i = Cc(t);
6458
+ let i = kc(t);
6383
6459
  if (r.length === 2) {
6384
6460
  let e = i * 2;
6385
- return e <= 1 ? wc(r[0], r[1], e) : wc(r[1], r[0], e - 1);
6461
+ return e <= 1 ? Ac(r[0], r[1], e) : Ac(r[1], r[0], e - 1);
6386
6462
  }
6387
- return n === "akima" ? jc(r, i) : Oc(r, i);
6463
+ return n === "akima" ? Lc(r, i) : Pc(r, i);
6388
6464
  }
6389
- function Lc(e, t, n = "catmull") {
6465
+ function Uc(e, t, n = "catmull") {
6390
6466
  if (t <= 0) return [];
6391
6467
  let r = [];
6392
- for (let i = 0; i < t; i += 1) r.push(Ic(e, i / t, n));
6468
+ for (let i = 0; i < t; i += 1) r.push(Hc(e, i / t, n));
6393
6469
  return r;
6394
6470
  }
6395
6471
  //#endregion
6472
+ //#region src/rotate.ts
6473
+ function Wc(e, t, n = {
6474
+ x: 0,
6475
+ y: 0
6476
+ }) {
6477
+ if (t !== 0) {
6478
+ let r = e.x - n.x, i = e.y - n.y, a = Math.cos(t), o = Math.sin(t);
6479
+ return {
6480
+ x: n.x + r * a - i * o,
6481
+ y: n.y + r * o + i * a
6482
+ };
6483
+ }
6484
+ return e;
6485
+ }
6486
+ function Gc(e, t, n = {
6487
+ x: 0,
6488
+ y: 0
6489
+ }) {
6490
+ return t === 0 ? e : e.map((e) => Wc(e, t, n));
6491
+ }
6492
+ //#endregion
6396
6493
  //#region src/ModalImageCropped.tsx
6397
- function Rc(e) {
6398
- let t = "ModalImageCropped", s = a(null), u = a(null), [d, f] = o([]), [p, m] = o([]), [g, _] = o(0), [x, T] = o(0), [E, D] = o(!1), [O, k] = o(void 0), [A, j] = o(0), [M, N] = o(0), [P, ee] = o(!1), [F, I] = o("[{ \"x\": 225.77, \"y\": 71.09 },\n{ \"x\": 225.77, \"y\": 289.70 },\n{ \"x\": 394.13, \"y\": 114.60 },\n{ \"x\": 60.40, \"y\": 176.28 },\n{ \"x\": 82.32, \"y\": 269.80 },\n{ \"x\": 335.36, \"y\": 271.79 },\n{ \"x\": 70.37, \"y\": 94.70 },\n{ \"x\": 376.20, \"y\": 89.72 },\n{ \"x\": 380.19, \"y\": 206.13 },\n{ \"x\": 320.41, \"y\": 75.80 },\n{ \"x\": 65.38, \"y\": 119.57 },\n{ \"x\": 113.20, \"y\": 78.78 }]"), L = w(), { t: R } = h(), z = e.actor.getSnapshot();
6399
- function te(e, t) {
6494
+ function Kc(e) {
6495
+ let t = "ModalImageCropped", s = a(null), u = a(null), [d, f] = o([]), [p, m] = o([]), [g, _] = o(0), [x, T] = o(0), [E, D] = o(!1), [O, k] = o(void 0), [A, j] = o(0), [M, N] = o(0), [P, ee] = o(!1), [F, I] = o("[{ \"x\": 225.77, \"y\": 71.09 },\n{ \"x\": 225.77, \"y\": 289.70 },\n{ \"x\": 394.13, \"y\": 114.60 },\n{ \"x\": 60.40, \"y\": 176.28 },\n{ \"x\": 82.32, \"y\": 269.80 },\n{ \"x\": 335.36, \"y\": 271.79 },\n{ \"x\": 70.37, \"y\": 94.70 },\n{ \"x\": 376.20, \"y\": 89.72 },\n{ \"x\": 380.19, \"y\": 206.13 },\n{ \"x\": 320.41, \"y\": 75.80 },\n{ \"x\": 65.38, \"y\": 119.57 },\n{ \"x\": 113.20, \"y\": 78.78 }]"), L = w(), { t: te } = h(), R = e.actor.getSnapshot();
6496
+ function ne(e, t) {
6400
6497
  e.save(), e.fillStyle = "black", e.font = "bold 14px sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillText("®", t.x, t.y), e.restore();
6401
6498
  }
6402
- let ne = n((e) => {
6403
- O && te(e, O);
6499
+ let re = n((e) => {
6500
+ if (d.length < 2) return;
6501
+ let t = {
6502
+ x: e.canvas.width / 2,
6503
+ y: e.canvas.height / 2
6504
+ }, n = Gc(d, x, t);
6505
+ e.strokeStyle = "green", e.lineWidth = 2, e.beginPath(), e.moveTo(n[0].x, n[0].y);
6506
+ for (let t = 1; t < n.length; t++) e.lineTo(n[t].x, n[t].y);
6507
+ e.stroke();
6508
+ }, [d, x]), z = n((e) => {
6509
+ O && ne(e, O);
6404
6510
  }, [O]);
6405
- function re(e, t, n = "blue") {
6511
+ function ie(e, t, n = "blue") {
6406
6512
  e.fillStyle = n, e.beginPath(), e.arc(t.x, t.y, 5, 0, Math.PI * 2), e.fill();
6407
6513
  }
6408
- function ie(e, t) {
6514
+ function ae(e, t) {
6409
6515
  let n = t.map((t) => {
6410
6516
  let n = t.x - e.x, r = t.y - e.y;
6411
6517
  return Math.sqrt(n * n + r * r);
6412
6518
  }), r = Math.min(...n);
6413
6519
  return n.findIndex((e) => e === r);
6414
6520
  }
6415
- let ae = n((e, t, n = "blue") => {
6521
+ let B = n((e, t, n = "blue") => {
6416
6522
  t.forEach((t) => {
6417
- re(e, t, n);
6523
+ ie(e, t, n);
6418
6524
  });
6419
6525
  }, []);
6420
- function B(e, t, n, r = "red") {
6526
+ function oe(e, t, n, r = "red") {
6421
6527
  if (t.length < 2) return;
6422
6528
  e.strokeStyle = r, e.lineWidth = 2, e.beginPath();
6423
6529
  let i = t.length - 1;
@@ -6425,14 +6531,14 @@ function Rc(e) {
6425
6531
  for (let n = 1; n <= i; n++) e.lineTo(t[n].x, t[n].y);
6426
6532
  e.stroke();
6427
6533
  }
6428
- let oe = n((e, t, n = "magenta", r = !1) => {
6534
+ let se = n((e, t, n = "magenta", r = !1) => {
6429
6535
  if (t.length < 2) return;
6430
6536
  e.strokeStyle = n;
6431
6537
  let i = Infinity, a = -Infinity, o = Infinity, s = -Infinity;
6432
6538
  for (let e of t) e.x < i && (i = e.x), e.x > a && (a = e.x), e.y < o && (o = e.y), e.y > s && (s = e.y);
6433
6539
  r && (j(a - i), N(s - o)), e.strokeRect(i, o, a - i, s - o);
6434
6540
  }, []);
6435
- function se(t, n = 2) {
6541
+ function ce(t, n = 2) {
6436
6542
  let r = "", i = "";
6437
6543
  for (let e = 0; e < t.length; e += 1) {
6438
6544
  let a = t[e], o = `${a.x.toFixed(2)}; ${a.y.toFixed(2)}`.replaceAll(".", ","), s = Math.round(Math.hypot(a.x * n, a.y * n) * 100);
@@ -6441,17 +6547,17 @@ function Rc(e) {
6441
6547
  }
6442
6548
  return e.testMode && console.log(i), r;
6443
6549
  }
6444
- function ce(e) {
6550
+ function le(e) {
6445
6551
  let t = Math.atan2(e.y, e.x);
6446
6552
  return t < 0 && (t += 2 * Math.PI), t;
6447
6553
  }
6448
- function le(t) {
6554
+ function ue(t) {
6449
6555
  if (t.length < 2) return [];
6450
6556
  let n = [], r = 0, i = "";
6451
6557
  for (let e = 0; e < 128; e++) {
6452
6558
  let a = 2 * Math.PI * e / 128, o = 0;
6453
6559
  for (let e = 0; e < t.length; e += 1) {
6454
- let s = t[e], c = ce(s);
6560
+ let s = t[e], c = le(s);
6455
6561
  if (c >= a) {
6456
6562
  let l = (a - o) / (c - o), u = e > 0 ? t[e - 1] : t[t.length - 1], d = Math.hypot(u.x, u.y), f = d + l * (Math.hypot(s.x, s.y) - d), p = {
6457
6563
  x: u.x + l * (s.x - u.x),
@@ -6467,30 +6573,30 @@ function Rc(e) {
6467
6573
  }
6468
6574
  return e.testMode && (console.log("maximum difference between interpolated and actual radius:", r), console.log(`createEquidistantPoints: ${i}`)), n;
6469
6575
  }
6470
- function ue(e, t) {
6576
+ function de(e, t) {
6471
6577
  if (e.length === 0) return [];
6472
6578
  let n = Math.max(0, Math.min(t, e.length - 1));
6473
6579
  return e.slice(n + 1).concat(e.slice(0, n + 1));
6474
6580
  }
6475
- let de = n((t) => {
6581
+ let fe = n((t) => {
6476
6582
  let n = -1, r = -1;
6477
6583
  for (let e = 0; e < t.length; e += 1) {
6478
- let i = t[e], a = ce(i);
6584
+ let i = t[e], a = le(i);
6479
6585
  if (e > 0 && a < n) {
6480
6586
  console.log(`switched from negative to positive at index ${e} -> [${i.x}, ${i.y}]`), r = e;
6481
6587
  break;
6482
6588
  }
6483
6589
  n = a;
6484
6590
  }
6485
- return e.testMode && console.log(`splitIndex: ${r}`), ue(t, r - 1);
6486
- }, [e.testMode]), fe = n((e, t, n) => e.map((e) => ({
6591
+ return e.testMode && console.log(`splitIndex: ${r}`), de(t, r - 1);
6592
+ }, [e.testMode]), pe = n((e, t, n) => e.map((e) => ({
6487
6593
  x: e.x * t,
6488
6594
  y: e.y * (n ?? t)
6489
- })), []), pe = (e) => {
6595
+ })), []), me = (e) => {
6490
6596
  let t = e[0], n = e[1];
6491
6597
  return -Math.atan2(t.y, t.x) > -Math.atan2(n.y, n.x);
6492
- }, me = n((e, t, n, r = !1) => {
6493
- let i = Fc(n, E ? "akima" : "catmull"), a = -Infinity, o = Infinity, s = -Infinity, c = Infinity, l = Array.from({ length: 128 }, (e, t) => {
6598
+ }, he = n((e, t, n, r = !1) => {
6599
+ let i = Vc(n, E ? "akima" : "catmull"), a = -Infinity, o = Infinity, s = -Infinity, c = Infinity, l = Array.from({ length: 128 }, (e, t) => {
6494
6600
  let n = i(t * 2 * Math.PI / 128);
6495
6601
  return n.x > a && (a = n.x), n.x < o && (o = n.x), n.y > s && (s = n.y), n.y < c && (c = n.y), n;
6496
6602
  });
@@ -6501,9 +6607,9 @@ function Rc(e) {
6501
6607
  })).map((e) => ({
6502
6608
  x: e.x,
6503
6609
  y: -e.y
6504
- })), u = fe(i, r);
6505
- return pe(u) || u.reverse(), {
6506
- polygon: de(u),
6610
+ })), u = pe(i, r);
6611
+ return me(u) || u.reverse(), {
6612
+ polygon: fe(u),
6507
6613
  box: {
6508
6614
  minX: o,
6509
6615
  maxX: a,
@@ -6523,18 +6629,18 @@ function Rc(e) {
6523
6629
  };
6524
6630
  }, [
6525
6631
  E,
6526
- fe,
6527
- de
6632
+ pe,
6633
+ fe
6528
6634
  ]);
6529
- function he(t, n, r = !1) {
6530
- let i = le(me(t, n, p, r).polygon);
6635
+ function ge(t, n, r = !1) {
6636
+ let i = ue(he(t, n, p, r).polygon);
6531
6637
  if (e.testMode) {
6532
- let e = se(i);
6638
+ let e = ce(i);
6533
6639
  console.log("rt1:"), console.log(e);
6534
6640
  }
6535
6641
  return i;
6536
6642
  }
6537
- let ge = i(() => p.length < 2 ? {
6643
+ let _e = i(() => p.length < 2 ? {
6538
6644
  polygon: [],
6539
6645
  box: {
6540
6646
  minX: 0,
@@ -6542,25 +6648,25 @@ function Rc(e) {
6542
6648
  minY: 0,
6543
6649
  maxY: 0
6544
6650
  }
6545
- } : me(z.context.SL ?? 0, z.context.SH ?? 0, p), [
6651
+ } : he(R.context.SL ?? 0, R.context.SH ?? 0, p), [
6546
6652
  p,
6547
- me,
6548
- z.context.SH,
6549
- z.context.SL
6550
- ]), _e = n((e) => {
6551
- if (ge.polygon.length === 0) return ge;
6552
- e.beginPath(), e.strokeStyle = "green", e.lineWidth = 3, e.fillStyle = "rgba(255, 0, 0, 0.3)", e.moveTo(ge.polygon[0].x, ge.polygon[0].y);
6553
- for (let t of ge.polygon) e.lineTo(t.x, t.y);
6554
- return e.closePath(), e.fill(), e.stroke(), ge;
6555
- }, [ge]), V = i(() => {
6556
- if (z.value !== "Shape defined" || ge.polygon.length === 0) return {
6653
+ he,
6654
+ R.context.SH,
6655
+ R.context.SL
6656
+ ]), V = n((e) => {
6657
+ if (_e.polygon.length === 0) return _e;
6658
+ e.beginPath(), e.strokeStyle = "green", e.lineWidth = 3, e.fillStyle = "rgba(255, 0, 0, 0.3)", e.moveTo(_e.polygon[0].x, _e.polygon[0].y);
6659
+ for (let t of _e.polygon) e.lineTo(t.x, t.y);
6660
+ return e.closePath(), e.fill(), e.stroke(), _e;
6661
+ }, [_e]), ve = i(() => {
6662
+ if (R.value !== "Shape defined" && R.value !== "Trademark defined" || _e.polygon.length === 0) return {
6557
6663
  points: [],
6558
6664
  center: {
6559
6665
  x: 0,
6560
6666
  y: 0
6561
6667
  }
6562
6668
  };
6563
- let { polygon: e, box: t } = ge, n = {
6669
+ let { polygon: e, box: t } = _e, n = {
6564
6670
  x: (t.minX + t.maxX) / 2,
6565
6671
  y: (t.minY + t.maxY) / 2
6566
6672
  };
@@ -6571,53 +6677,104 @@ function Rc(e) {
6571
6677
  })).slice(40, 80),
6572
6678
  center: n
6573
6679
  };
6574
- }, [ge, z.value]);
6575
- function ve(e, t, n) {
6680
+ }, [_e, R.value]);
6681
+ function ye(e, t, n) {
6576
6682
  e.strokeStyle = "red", e.lineWidth = 3, n ? e.setLineDash([4, 3]) : e.setLineDash([]), e.beginPath(), e.moveTo(t[0].x, t[0].y), e.lineTo(n?.x ?? t[1].x, n?.y ?? t[1].y), e.stroke(), n && e.setLineDash([]);
6577
6683
  }
6578
- let ye = n((e, t) => {
6684
+ let H = n((e, t) => {
6579
6685
  let n = s.current, r = u.current;
6580
6686
  if (!n || !r) return [];
6581
6687
  let i = n.getContext("2d");
6582
- x === 0 ? i.drawImage(r, 0, 0) : (i.clearRect(0, 0, n.width, n.height), i.save(), i.translate(n.width / 2, n.height / 2), i.rotate(x), i.drawImage(r, -r.naturalWidth / 2, -r.naturalHeight / 2), i.restore()), i.setLineDash([]), x === 0 && ae(i, e, "red"), z.value !== "Shape defined" && z.value !== "idle" && (ae(i, p, "orange"), oe(i, p, "magenta", !0));
6583
- let { polygon: a } = _e(i);
6584
- if (z.value === "Shape defined") {
6585
- let { points: e, center: n } = V;
6586
- if (B(i, e, n, "red"), t && e.length > 0) {
6587
- let n = e[ie(t, e)], r = [
6588
- {
6589
- x: n.x + 10,
6590
- y: n.y
6591
- },
6592
- {
6593
- x: n.x,
6594
- y: n.y + 10
6595
- },
6596
- {
6597
- x: n.x - 10,
6598
- y: n.y
6599
- },
6600
- {
6601
- x: n.x,
6602
- y: n.y - 10
6688
+ x === 0 ? i.drawImage(r, 0, 0) : (i.clearRect(0, 0, n.width, n.height), i.save(), i.translate(n.width / 2, n.height / 2), i.rotate(x), i.drawImage(r, -r.naturalWidth / 2, -r.naturalHeight / 2), i.restore()), i.setLineDash([]);
6689
+ let a = {
6690
+ x: n.width / 2,
6691
+ y: n.height / 2
6692
+ };
6693
+ switch (Gc(e, x, a), R.value) {
6694
+ case Io:
6695
+ case Lo: break;
6696
+ case Ro:
6697
+ re(i);
6698
+ break;
6699
+ case zo:
6700
+ B(i, p, "orange"), se(i, p, "magenta", !0);
6701
+ break;
6702
+ case Bo:
6703
+ {
6704
+ let { points: e, center: n } = ve;
6705
+ if (oe(i, e, n, "red"), t && e.length > 0) {
6706
+ let n = e[ae(t, e)], r = [
6707
+ {
6708
+ x: n.x + 10,
6709
+ y: n.y
6710
+ },
6711
+ {
6712
+ x: n.x,
6713
+ y: n.y + 10
6714
+ },
6715
+ {
6716
+ x: n.x - 10,
6717
+ y: n.y
6718
+ },
6719
+ {
6720
+ x: n.x,
6721
+ y: n.y - 10
6722
+ }
6723
+ ];
6724
+ se(i, r, "black"), z(i);
6603
6725
  }
6604
- ];
6605
- oe(i, r, "black");
6606
- }
6726
+ }
6727
+ break;
6728
+ case Vo:
6729
+ {
6730
+ let { points: e, center: n } = ve;
6731
+ if (oe(i, e, n, "red"), t && e.length > 0) {
6732
+ let n = e[ae(t, e)], r = [
6733
+ {
6734
+ x: n.x + 10,
6735
+ y: n.y
6736
+ },
6737
+ {
6738
+ x: n.x,
6739
+ y: n.y + 10
6740
+ },
6741
+ {
6742
+ x: n.x - 10,
6743
+ y: n.y
6744
+ },
6745
+ {
6746
+ x: n.x,
6747
+ y: n.y - 10
6748
+ }
6749
+ ];
6750
+ se(i, r, "black"), z(i);
6751
+ }
6752
+ }
6753
+ z(i);
6754
+ break;
6755
+ case Ho:
6756
+ z(i);
6757
+ break;
6758
+ default: console.log(`unknown state: ${R.value}`);
6759
+ }
6760
+ let { polygon: o } = V(i);
6761
+ if (e.length === 2 && (R.value === "Image cropped" || R.value === "X-axis started") && ye(i, Gc(e, x, a)), e.length === 1 && R.value === "X-axis started" && t) {
6762
+ let n = Wc(t, x, a);
6763
+ ye(i, Gc(e, x, a), n);
6607
6764
  }
6608
- return (z.value === "Shape defined" || z.value === "idle") && O && ne(i), e.length === 2 && (z.value === "Image cropped" || z.value === "X-axis started") && ve(i, e), e.length === 1 && z.value === "X-axis started" && t && ve(i, e, t), a;
6765
+ return o;
6609
6766
  }, [
6610
6767
  p,
6611
- oe,
6612
- _e,
6613
- ae,
6614
- ne,
6768
+ re,
6769
+ se,
6770
+ V,
6771
+ B,
6772
+ z,
6615
6773
  x,
6616
- z.value,
6617
- O,
6618
- V
6774
+ R.value,
6775
+ ve
6619
6776
  ]);
6620
- function H(e) {
6777
+ function be(e) {
6621
6778
  let t = s.current, n = u.current;
6622
6779
  if (!t || !n) return;
6623
6780
  let r = t.getContext("2d");
@@ -6630,29 +6787,32 @@ function Rc(e) {
6630
6787
  e && (e.width = t.naturalWidth, e.height = t.naturalHeight, e.getContext("2d")?.drawImage(t, 0, 0), u.current = t);
6631
6788
  }, t.src = e.dataUrl;
6632
6789
  }, [e.dataUrl]), r(() => {
6633
- ye(d);
6634
- }, [d, ye]), r(() => {
6635
- H(x);
6790
+ H(d);
6791
+ }, [d, H]), r(() => {
6792
+ be(x);
6636
6793
  }, [x]);
6637
- function be(t) {
6794
+ function xe(t) {
6638
6795
  e.actor.send({ type: t }), _((e) => e + 1);
6639
6796
  }
6640
- function xe(t, n) {
6797
+ function Se(t, n) {
6641
6798
  let r = n.x - t.x, i = n.y - t.y, a = -Math.atan2(i, r);
6642
6799
  a > Math.PI / 2 && (a -= Math.PI), a < -Math.PI / 2 && (a += Math.PI), T(a), e.actor.send({
6643
- type: Yo,
6800
+ type: Zo,
6644
6801
  rotationAngle: a
6645
6802
  }), _((e) => e + 1);
6646
6803
  }
6647
- function Se(e, t) {
6804
+ function Ce(e, t) {
6648
6805
  let n = e.getBoundingClientRect();
6649
6806
  return {
6650
6807
  x: (t.clientX - n.left) * (e.width / n.width),
6651
6808
  y: (t.clientY - n.top) * (e.height / n.height)
6652
6809
  };
6653
6810
  }
6654
- function Ce() {
6655
- e.actor.getSnapshot().value === "Image cropped" && e.actor.send({ type: Jo }), e.actor.getSnapshot().value === "X-axis started" && e.actor.send({ type: Yo }), e.actor.getSnapshot().value === "X-axis finished" && e.actor.send({ type: Zo }), m((e) => [
6811
+ function we() {
6812
+ e.actor.getSnapshot().value === "Image cropped" && e.actor.send({ type: Xo }), e.actor.getSnapshot().value === "X-axis started" && e.actor.send({
6813
+ type: Zo,
6814
+ rotationAngle: 0
6815
+ }), e.actor.getSnapshot().value === "X-axis finished" && e.actor.send({ type: $o }), m((e) => [
6656
6816
  ...e,
6657
6817
  {
6658
6818
  x: 50,
@@ -6680,27 +6840,31 @@ function Rc(e) {
6680
6840
  }
6681
6841
  ]);
6682
6842
  }
6683
- function we() {
6684
- if (e.actor.send({ type: Qo }), !Fe) throw Error("SL is undefined");
6685
- if (!Ie) throw Error("SH is undefined");
6686
- let t = he(Fe, Ie, !0);
6687
- e.actor.getSnapshot().value === "Points defined" ? e.actor.send({ type: $o }) : e.actor.getSnapshot().value === "Trademark defined" ? e.actor.send({ type: Ho }) : e.onCloseModal(x, p, t, O)();
6688
- }
6689
6843
  function Te() {
6690
- ee(!1);
6844
+ if (!Ie) throw Error("SL is undefined");
6845
+ if (!Le) throw Error("SH is undefined");
6846
+ let t = ge(Ie, Le, !0);
6847
+ if (R.value === "Points defined") e.actor.send({ type: ns });
6848
+ else if (R.value === "Shape defined") e.actor.send({ type: Uo });
6849
+ else if (R.value === "Trademark defined") e.actor.send({ type: Uo });
6850
+ else if (R.value === "Finished") e.onCloseModal(x, p, t, O)(), e.actor.send({ type: Wo });
6851
+ else throw Error(`Unexpected state: ${R.value}`);
6691
6852
  }
6692
6853
  function Ee() {
6854
+ ee(!1);
6855
+ }
6856
+ function De() {
6693
6857
  ee(!0);
6694
6858
  }
6695
- function De(e) {
6859
+ function Oe(e) {
6696
6860
  console.log(`handleChange called with value: ${e.target.value}`), I(e.target.value);
6697
6861
  }
6698
- function Oe() {
6699
- e.actor.getSnapshot().value === "Image cropped" && e.actor.send({ type: Jo }), e.actor.getSnapshot().value === "X-axis started" && e.actor.send({ type: Yo }), e.actor.getSnapshot().value === "X-axis finished" && e.actor.send({ type: Zo });
6862
+ function ke() {
6863
+ e.actor.getSnapshot().value === "Image cropped" && e.actor.send({ type: Xo }), e.actor.getSnapshot().value === "X-axis finished" && e.actor.send({ type: $o });
6700
6864
  let t = JSON.parse(F);
6701
6865
  Array.isArray(t) && m((e) => [...e, ...t]);
6702
6866
  }
6703
- function ke(e, t) {
6867
+ function Ae(e, t) {
6704
6868
  if (e.length === 0) return -1;
6705
6869
  let n = 0, r = Infinity;
6706
6870
  return e.forEach((e, i) => {
@@ -6708,51 +6872,110 @@ function Rc(e) {
6708
6872
  s < r && (r = s, n = i);
6709
6873
  }), n;
6710
6874
  }
6711
- function Ae(t) {
6875
+ function je(t) {
6712
6876
  let n = e.actor.getSnapshot(), r = s.current;
6713
6877
  if (!r || !u.current) return;
6714
- let i = Se(r, t), a = t.button === 2;
6715
- if (n.value === "Image cropped" || n.value === "X-axis started") {
6716
- if (a) {
6717
- console.log("right mouse button clicked"), f((e) => e.slice(0, -1)), T(0), be(Xo);
6718
- return;
6719
- }
6720
- {
6721
- let e = Se(r, t);
6722
- f((t) => (t.length % 2 == 0 ? be(Jo) : t.length % 2 == 1 && xe(t[0], e), t.length < 2 ? [...t, e] : [e]));
6723
- }
6724
- return;
6725
- }
6726
- if (n.value === "X-axis finished" || n.value === "Points defined") {
6727
- let e = Se(r, t);
6728
- a ? m((t) => {
6729
- let n = ke(t, e);
6730
- if (n !== -1) {
6731
- let e = [...t];
6732
- return e.splice(n, 1), e;
6878
+ let i = Ce(r, t), a = t.button === 2;
6879
+ switch (n.value) {
6880
+ case No:
6881
+ console.log("handleMouseDown: state is IDLE");
6882
+ break;
6883
+ case Io:
6884
+ case Lo:
6885
+ if (a) {
6886
+ console.log("right mouse button clicked"), f((e) => e.slice(0, -1)), T(0), xe(Qo);
6887
+ return;
6888
+ }
6889
+ {
6890
+ let e = Ce(r, t);
6891
+ f((t) => (t.length % 2 == 0 ? xe(Xo) : t.length % 2 == 1 && Se(t[0], e), t.length < 2 ? [...t, e] : [e]));
6733
6892
  }
6734
- return t;
6735
- }) : (m((t) => [...t, e]), be(Zo));
6736
- } else if (n.value === "Shape defined") {
6737
- let { points: e } = V, t = e[ie(i, e)];
6738
- k(t);
6739
- } else console.error(`handleMouseDown: unexpected state ${n.value}`);
6740
- }
6741
- function je(e) {
6893
+ break;
6894
+ case Ro:
6895
+ if (a) f((e) => e.slice(0, -1)), T(0), xe(Qo);
6896
+ else {
6897
+ let e = Ce(r, t);
6898
+ m((t) => [...t, e]), xe($o);
6899
+ }
6900
+ break;
6901
+ case zo:
6902
+ {
6903
+ let e = Ce(r, t);
6904
+ a ? m((t) => {
6905
+ let n = [...t], r = Ae(t, e);
6906
+ return r !== -1 && n.splice(r, 1), n.length === 0 && xe(es), n;
6907
+ }) : (m((t) => [...t, e]), xe($o));
6908
+ }
6909
+ break;
6910
+ case Bo:
6911
+ if (a) k(void 0), e.actor.send({ type: rs });
6912
+ else {
6913
+ let { points: t } = ve, n = t[ae(i, t)];
6914
+ k(n), e.actor.send({
6915
+ type: ts,
6916
+ trademark: n
6917
+ });
6918
+ }
6919
+ break;
6920
+ case Vo:
6921
+ if (console.log("handleMouseDown: state is TRADEMARK_DEFINED"), a) k(void 0), e.actor.send({ type: is });
6922
+ else {
6923
+ let { points: t } = ve, n = t[ae(i, t)];
6924
+ k(n), e.actor.send({
6925
+ type: ts,
6926
+ trademark: n
6927
+ });
6928
+ }
6929
+ break;
6930
+ case Ho:
6931
+ console.log("handleMouseDown: state is FINISHED"), a && e.actor.send({ type: as });
6932
+ break;
6933
+ default: console.log(`handleMouseDown: unhandled state ${n.value}`);
6934
+ }
6935
+ }
6936
+ function Me(e) {
6742
6937
  let t = s.current;
6743
6938
  if (!t || !u.current) return;
6744
- let n = Se(t, e);
6745
- ye(d, n);
6939
+ let n = Ce(t, e);
6940
+ H(d, n);
6746
6941
  }
6747
- function Me() {
6748
- ye(d);
6942
+ function Ne() {
6943
+ H(d);
6749
6944
  }
6750
- function Ne(e) {
6945
+ function Pe(e) {
6751
6946
  e.preventDefault();
6752
6947
  }
6753
- let Pe = (e) => {
6948
+ let Fe = (e) => {
6754
6949
  D(e.target.checked);
6755
- }, Fe = e.actor.getSnapshot().context.SL, Ie = e.actor.getSnapshot().context.SH, Le = e.actor.getSnapshot().context.AZG, Re = z.value === "Points defined" && p.length > 3 ? R("main.identify.button.finish", { defaultValue: "Finish" }) : z.value === "Trademark defined" ? R("main.identify.button.finish1", { defaultValue: "Finish 1" }) : z.value === "idle" ? R("main.identify.button.finish2", { defaultValue: "Finish 2" }) : R("main.identify.button.undo", { defaultValue: "Undo" });
6950
+ }, Ie = e.actor.getSnapshot().context.SL, Le = e.actor.getSnapshot().context.SH, Re = e.actor.getSnapshot().context.AZG, ze, Be = !1;
6951
+ switch (R.value) {
6952
+ case Io:
6953
+ ze = "imageCropped", Be = !0;
6954
+ break;
6955
+ case Lo:
6956
+ Be = !0;
6957
+ break;
6958
+ case Ro:
6959
+ Be = !0;
6960
+ break;
6961
+ case zo:
6962
+ ze = "confirmShape", p.length <= 3 && (Be = !0);
6963
+ break;
6964
+ case Vo:
6965
+ ze = "confirmTrademark";
6966
+ break;
6967
+ case Bo:
6968
+ ze = "withoutTrademark";
6969
+ break;
6970
+ case No:
6971
+ ze = "finishActionReally";
6972
+ break;
6973
+ case Ho:
6974
+ ze = "finished";
6975
+ break;
6976
+ default: ze = "unknownState";
6977
+ }
6978
+ let Ve = te(`main.identify.button.${ze}`, { defaultValue: `main.identify.button.${ze}` });
6756
6979
  return /* @__PURE__ */ c(Mo, {
6757
6980
  "data-testid": `${t}.Modal`,
6758
6981
  sx: {
@@ -6773,7 +6996,7 @@ function Rc(e) {
6773
6996
  backgroundColor: L.palette.primary.main
6774
6997
  },
6775
6998
  children: [
6776
- /* @__PURE__ */ c(ns, {
6999
+ /* @__PURE__ */ c(cs, {
6777
7000
  actor: e.actor,
6778
7001
  testMode: e.testMode
6779
7002
  }, g),
@@ -6786,10 +7009,10 @@ function Rc(e) {
6786
7009
  maxHeight: "70vh",
6787
7010
  cursor: "crosshair"
6788
7011
  },
6789
- onMouseDown: Ae,
6790
- onMouseMove: je,
6791
- onMouseLeave: Me,
6792
- onContextMenu: Ne
7012
+ onMouseDown: je,
7013
+ onMouseMove: Me,
7014
+ onMouseLeave: Ne,
7015
+ onContextMenu: Pe
6793
7016
  }),
6794
7017
  /* @__PURE__ */ l("div", {
6795
7018
  className: "modal-content",
@@ -6809,13 +7032,13 @@ function Rc(e) {
6809
7032
  },
6810
7033
  children: [
6811
7034
  "SL: ",
6812
- Fe,
6813
- ", SH: ",
6814
7035
  Ie,
7036
+ ", SH: ",
7037
+ Le,
6815
7038
  " -> [",
6816
- Fe && Ie && Ie !== 0 ? (Fe / Ie).toFixed(3) : 0,
7039
+ Ie && Le && Le !== 0 ? (Ie / Le).toFixed(3) : 0,
6817
7040
  "], AZG: ",
6818
- Le
7041
+ Re
6819
7042
  ]
6820
7043
  }),
6821
7044
  /* @__PURE__ */ l(C, {
@@ -6840,7 +7063,7 @@ function Rc(e) {
6840
7063
  control: /* @__PURE__ */ c(b, {
6841
7064
  "data-testid": `${t}.Switch`,
6842
7065
  checked: E,
6843
- onChange: Pe
7066
+ onChange: Fe
6844
7067
  }),
6845
7068
  label: /* @__PURE__ */ c(C, {
6846
7069
  sx: {
@@ -6851,42 +7074,44 @@ function Rc(e) {
6851
7074
  })
6852
7075
  })
6853
7076
  ] }),
6854
- (z.value === "Image cropped" || z.value === "X-axis started" || z.value === "X-axis finished") && /* @__PURE__ */ l("div", { children: [
6855
- /* @__PURE__ */ c(Sc, {
7077
+ (R.value === "Image cropped" || R.value === "X-axis started" || R.value === "X-axis finished") && /* @__PURE__ */ l("div", { children: [
7078
+ /* @__PURE__ */ c(Oc, {
6856
7079
  color: "secondary",
6857
7080
  variant: "outlined",
6858
7081
  size: "small",
6859
- onClick: Ce,
7082
+ onClick: we,
6860
7083
  children: "Test"
6861
7084
  }),
6862
- /* @__PURE__ */ c(Sc, {
7085
+ /* @__PURE__ */ c(Oc, {
6863
7086
  color: "secondary",
6864
7087
  variant: "outlined",
6865
7088
  size: "small",
6866
- onClick: Ee,
7089
+ onClick: De,
6867
7090
  children: "Insert points"
6868
7091
  }),
6869
7092
  /* @__PURE__ */ c(Mo, {
6870
7093
  open: P,
6871
- onClose: Te,
6872
- children: /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c(Sc, {
7094
+ onClose: Ee,
7095
+ children: /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c(Oc, {
6873
7096
  color: "secondary",
6874
7097
  variant: "outlined",
6875
7098
  size: "small",
6876
- onClick: Oe,
7099
+ onClick: ke,
6877
7100
  children: "OK"
6878
7101
  }), /* @__PURE__ */ c(S, {
6879
7102
  value: "[{ \"x\": 225.77, \"y\": 71.09 },\n{ \"x\": 225.77, \"y\": 289.70 },\n{ \"x\": 394.13, \"y\": 114.60 },\n{ \"x\": 60.40, \"y\": 176.28 },\n{ \"x\": 82.32, \"y\": 269.80 },\n{ \"x\": 335.36, \"y\": 271.79 },\n{ \"x\": 70.37, \"y\": 94.70 },\n{ \"x\": 376.20, \"y\": 89.72 },\n{ \"x\": 380.19, \"y\": 206.13 },\n{ \"x\": 320.41, \"y\": 75.80 },\n{ \"x\": 65.38, \"y\": 119.57 },\n{ \"x\": 113.20, \"y\": 78.78 }]",
6880
- onChange: De
7103
+ onChange: Oe
6881
7104
  })] })
6882
7105
  })
6883
7106
  ] }),
6884
- /* @__PURE__ */ c(Sc, {
7107
+ /* @__PURE__ */ c(Oc, {
7108
+ "data-testId": `${t}.button.finish`,
6885
7109
  color: "secondary",
6886
7110
  variant: "contained",
6887
7111
  size: "small",
6888
- onClick: we,
6889
- children: Re
7112
+ disabled: Be,
7113
+ onClick: Te,
7114
+ children: Ve
6890
7115
  })
6891
7116
  ]
6892
7117
  })
@@ -6895,6 +7120,6 @@ function Rc(e) {
6895
7120
  });
6896
7121
  }
6897
7122
  //#endregion
6898
- export { Go as ACTION_CROP, Ho as ACTION_RESET, Ko as ACTION_SKIP_CROP, qo as ACTION_UNDO_CROP, Rc as ModalImageCropped, as as ModalImageLoaded, ts as identifyMachine };
7123
+ export { qo as ACTION_CROP, Wo as ACTION_RESET, Jo as ACTION_SKIP_CROP, Yo as ACTION_UNDO_CROP, Kc as ModalImageCropped, ds as ModalImageLoaded, ss as identifyMachine };
6899
7124
 
6900
7125
  //# sourceMappingURL=frame.identify.js.map